Tag Archives: GTK+

Where are messages on the terminal coming from?

From a discussion on #gtk+ this morning: if you’re using recent versions of GLib with structured logging support, and you want to work out which bit of your code is causing a certain message to be printed to the terminal, run your application in gdb and add a breakpoint on g_log_writer_standard_streams.

(This assumes you’re using the default log writer function; if not, you need to add a breakpoint on something in your writer function.)

GTK+ hackfest 2016

A dozen GNOME hackers invaded the Red Hat office in Toronto last week, to spend four days planning the next year of work on our favourite toolkit, GTK+; and to think about how Flatpak applications can best integrate with the rest of the desktop.

What did we do?

  • Worked out an approach for versioning GTK+ in future, to improve the balance between stability and speed of development. This has turned into a wiki page.
  • I demoed Dunfell and added support for visualising GTasks to it. I don’t know how much time I will have for it in the near future, so help and feedback are welcome.
  • There was a detailed discussion of portals for Flatpak, including lots of use cases, and the basics of a security design were decided which allows the most code reuse while also separating functionality. Simon has written more about this.
  • I missed some of the architectural discussion about the future of GTK+ (including moving some classes around, merging some things and stripping out some outdated things), but I believe Benjamin had useful discussions with people about it.
  • Allan, Philip, Mike and I looked at using hotdoc for developer.gnome.org, and possible layouts for a new version of the site. Christian spent some time thinking about integration of documentation into GNOME Builder.
  • Allison did a lot of blogging, and plotted with Alex to add some devious new GVariant functionality to make everyone’s lives easier when writing parsers — I’ll leave her to blog about it.

Thanks to Collabora for sending me along to take part!

After the hackfest, I spent a few days exploring Toronto, and as a result ended up very sunburned.

MCUS version 0.2.1

Here's an announcement I've wanted to make for a while: I'm releasing my microcontroller simulator, MCUS. It's a fairly simple simulator designed to aid in teaching the OCR 2008 A-level electronics syllabus to UK students. As far as I know, it's the only simulator available which follows the new syllabus (for which OCR have deigned to write their own simple assembly language, obsoleting any previous simulators used in schools).

It's already had three releases (this is the fourth), but I didn't want to make the 0.1.x releases too public, as they were mainly for testing the program at school. The 0.2.0 release was a brown paper bag release, due to a bad GTK+ version dependency, and some files necessary for the Windows zip package not being included.

It's available on the MCUS project page, with 0.2.1 being the latest release. A Windows installer is available too, built with NSIS; as well as a simple zip package of the installed directory tree on Windows, since the program's relocatable.

My school is already using it, and I'm releasing it in the hope of other schools being able to make use of it. As always, it's open source, released under the GPLv3+.

Future plans include a graph to visualise the ADC waveform, and the addition of more simulated input and output hardware.

Revamp, GTK+ apps on Windows and more documentation

I've just finished converting the site to use WordPress instead of the custom software I'd previously been using. It'd been getting too time-consuming to keep everything maintained and up-to-date with the latest things going on on the Internet, and I'd been reduced to making posts via phpMyAdmin due to various things breaking. Hopefully, this should be better, and a lot less hassle to keep running. I apologise if the transition has messed up the feed for anyone, but I've tried my hardest to redirect all the old URLs, so things should keep working as before.

Recently, I had to compile my computing coursework for Windows, as the person for whom it's written only uses Windows. Much to my delight, once I'd figured out the terminology and basic principles, getting it to cross-compile for Windows using MinGW was quite easy! Since I couldn't find much documentation on the process while doing it, I've written up the steps I took, and perhaps someone else will find them useful.

Last month, I also managed to write up some API documentation for totem-pl-parser, which has been on the to-do list for a little while. It was quite easy to get the hang of gtk-doc, too, and once I'd got started, the documentation got done quite quickly. If anyone's implementing anything using totem-pl-parser, I'd appreciate any feedback on the usefulness of the documentation, as it can always be improved.

Adding to a GtkTreeView as you scroll?

I'm writing something for Totem, and I want a GtkTreeView to have more rows added to it as you scroll down.

So far I've got it adding more rows nicely when you get to about 80% of the way down the GtkAdjustment, by listening to the adjustment's "changed" signal, but then it keeps on adding rows (ideally it should only add 20 at a time then stop), and the handle of the scrollbar screws up. I presume this is something to do with the fact that the handle is grabbed at the time, and so probably can't resize, or something.

Anyway, has anybody implemented anything similar before (or seen such a feature somewhere) so that I can see where I'm going wrong? I could've sworn I'd seen something similar before (I'm not original enough to think up such features myself :D), but I can't find it. Answers on a postcard, please. :)