GNOME Bugzilla – Bug 498157
Use GtkBuilder for UI
Last modified: 2012-11-14 01:19:49 UTC
All the C Gnome games currently have hard-coded UIs. It would be nice to change these to Glade.
libglade is going to be deprecated soon; surely if we do change it, we should change it to use GtkBuilder from gtk+ 2.12.
GtkBuilder will provide a tool to convert from Glade (http://mail.gnome.org/archives/gtk-devel-list/2006-May/msg00087.html) so we should be able to change to GtkBuilder when it is stable/well supported (and Glade is gone). Agree we should move to the latest supported technology when it occurs; don't see it as a roadblock to changing now.
That tool already exists in gtk+: gtk-builder-convert. That way you can edit the UI in glade-[23], but still use gtkbuilder in the code. If you meant in comment 0 to use a glade UI for the main window (not just dialogues etc) of the programmes, then gtkbuilder has the distinct, huge advantage in that you can use GtkAction/GtkUIManager based menus with it (gtk-builder-convert converts glade's gtkmenus to gtkaction/uimanager ones), instead of having to revert to plain gtkmenus like you had to when you converted gcalctool to glade. Also, please don't do this in aisleriot: I worked hard at removing the glade dependency there, and since I need to keep it working on gtk 2.6 (maemo 3.x) and gtk 2.10 (maemo 4.x), I cannot afford to depend on gtk 2.12 for gtkbuilder there.
No problem, I'm not trying to force this change on any game. The games I plan to look at providing patches for initially are: - tetravex - gnomine - mahjongg as these are the codebases I understand quite well now (aisleriot is the least :) ). I will post all patches for review. Does anyone know if any of the other games have special distribution requirements like aisleriot? Are there any reasons why we shouldn't be considering moving to Glade/GtkBuilder? I still propose using Glade initially as: - It's proven technology - It's natively handled by the UI designers out there (easier for contributors to modify) - I don't think the GtkMenu/GtkAction improvement gives us much for these games which have relatively simple menus. And move to GtkBuilder when libglade is deprecated.
I think we should move to GtkBuilder, it's the future and no external dependencies.
Re-assigning to new default owner.
...now is this a duplicate of bug 556808?
Not a duplicate. This is about using gtkbuilder for games that currently have hard coded UI's.
This looks really interesting for this: http://www.hadess.net/2009/04/because-i-suck-at-glade.html "a patch to gtk-parasite to dump a whole widget tree into a GtkBuilder UI file."