In an effort to convert a GnomeUIInfo based menu to a GtkUIManager one, I ran into a few annoying holes in the GTK+ documentation. First and foremost, the GTK+ tutorial itself is completely silent about GtkUIManager. Thankfully there is a
migration whitepaper in the API reference, but it is still missing a lot of info too. For example, it does not say what the signature of the callbacks for various action entry types look like, let alone give an example how such callbacks could work. And the API reference for GtkActionGroup, which lists the various action entry types does not specify callback signatures either. Only on the GtkAction, GtkToggleAction and GtkRadioAction pages the signatures are listed. Likely because that is where the signals they connect to are documented, but neither from the migration paper nor from the GtkActionEntry page one can find this out.
Another issue is that there apparently is no replacement for the
gnome_app_install_*_menu_hints calls. I'm not sure if such method should be in GTK+ itself, and if so, where it should go. Perhaps added to GtkStatusbar, or to a new higher level widget on top of GtkStatusbar (rather than an "application" type widget, I think). Or maybe simply added to gnome-app-helper as an interim solution.
But given the lack of such replacement method, a bigger problem is that no useful documentation is available on how to extract the tooltips from the gtk action entries and set them manually. The
connect-proxy signal for GtkActionGroup does mention menuitem tooltips, but that's it. Perhaps I've simply missed a thorough explanation, but if there is one, shouldn't the migration paper link to it?
And finally, something which is more of a problem with the API itself, there's a lack of placeholder macros like the
GNOMEUIINFO_MENU_*_ITEM ones. It's easy enough to replace them by fully written action entries, but all of a sudden menus cease to be translated as the translation strings are now part of the application rather than an underlying library. And worse, this is a setback in providing consistency, both for menu names, associated tooltip texts, and translations of both of these. (As for translations, there is a
gtk_action_group_set_translate_func method, but it is not clear or explained how to use it)
Enough about this — back to coding.
Comments
Sun, 06.04.2008 16:59 CEST
You're right, that not only so me, but many questions in the LPI are not up to date and tha t you probably don't use [...]
Fri, 04.04.2008 13:14 CEST
Sure, it does it's job fine (m ost of the time :). And it's straightforward. Why not us e it?
Thu, 27.03.2008 19:53 CET
You still use LILO?!
Thu, 27.03.2008 00:51 CET
Can't you use UUID-naming?
Tue, 18.03.2008 21:45 CET
If it were the old blog, it /m ight/ have been from some comm ent spam. Then again, I cou ldn't find any reference [...]
Tue, 18.03.2008 21:34 CET
That's highly dependent on you r age. I do know who Racquel Darrian is...
Tue, 18.03.2008 18:16 CET
In my logs I was interested to find that searching for "ladi es pro wrestling" (6 hits from this one) and "jello wr [...]
Tue, 18.03.2008 12:12 CET
You dont have to pretend not k nowing sylvia saint, its gener al education! :-)
Thu, 13.03.2008 16:25 CET
Do both. Trying to regulate /eradicate all sound pollution is just not going to work wel l enough. You just need [...]
Thu, 13.03.2008 14:12 CET
Last time I went out to a live gig I wore earplugs for the f irst time, and enjoyed the mus ic much more because I c [...]