Category Archives: gtk

Gtk.ListStores and Clutter.ListModels in Javascript/gjs

It’s surprisingly hard to find this, and the generated documentation is actually misleaingly wrong1, so here’s how to create ListStores and ListModels in Javascript with gjs. let store = new Gtk.ListStore(); store.set_column_types([GObject.TYPE_STRING, GObject.TYPE_INT]); store.insert_with_valuesv(-1, [ 0, 1 ], [ "test", … Continue reading

Posted in clutter, example code, gtk, javascript | 1 Comment

Quick Tip: gtk_show_uri(): Operation Not Supported

Writing this down because it took me way too long to realise what I was missing. If you’re getting the error “Operation Not Supported” when calling gtk_show_uri() or g_app_info_launch_default_for_uri(), then you’re most likely missing gvfs, which contains the extension points … Continue reading

Posted in gtk | 3 Comments

GTK+ is crushing my spirit

I want a widget that is the combination of GtkComboBoxEntry and GtkEntryCompletion that can display a tree of options in a nice, indented way without the expanders (but with the rows expanded). Basically, a search box with a drop-down and … Continue reading

Posted in gtk, hacking, life, photos, rain | Comments Off

and now for something from the school of pure evil (setting a background on a GtkTextView)

This is something that comes up from time to time, someone wants to set some attractive background on a GtkTextView. Well, unfortunately for you, the theme engine isn't able to help you here because GtkTextView never calls gtk_paint_box() or friends. … Continue reading

Posted in gtk, hacking, hotel, kludge | Comments Off

quick and dirty icon theme viewer

So very often I find myself trying to find the name of an icon in the icon theme, and I end up having to search through my icon theme with a combination of find and eog. Usually I miss the … Continue reading

Posted in gtk, hacking, icon themes, python, tool | Comments Off

GTK+ client-side-windows and threading

Some people (including me) had noticed that recent Empathy's video calling was breaking with recent GTK+ builds. Some people (not including me) were smart enough to work out the bug was related to client-side-windows. In CSW-enabled GTK+, calls to GDK_WINDOW_XID() … Continue reading

Posted in bugfixes, client-side-windows, empathy, gtk, hacking | Comments Off