After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 498157 - Use GtkBuilder for UI
Use GtkBuilder for UI
Status: RESOLVED WONTFIX
Product: gnome-games-superseded
Classification: Deprecated
Component: general
2.21.x
Other All
: Normal normal
: ---
Assigned To: gnome-games-general-maint
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-19 12:01 UTC by Robert Ancell
Modified: 2012-11-14 01:19 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Robert Ancell 2007-11-19 12:01:51 UTC
All the C Gnome games currently have hard-coded UIs. It would be nice to change these to Glade.
Comment 1 Christian Persch 2007-11-20 12:18:16 UTC
libglade is going to be deprecated soon; surely if we do change it, we should change it to use GtkBuilder from gtk+ 2.12.
Comment 2 Robert Ancell 2007-11-21 00:24:04 UTC
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.
Comment 3 Christian Persch 2007-11-21 11:29:56 UTC
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.
Comment 4 Robert Ancell 2007-11-22 00:29:13 UTC
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.
Comment 5 João Matos 2008-02-13 02:35:00 UTC
I think we should move to GtkBuilder, it's the future and no external dependencies.
Comment 6 Christian Persch 2008-03-25 12:09:00 UTC
Re-assigning to new default owner.
Comment 7 André Klapper 2009-02-23 18:11:54 UTC
...now is this a duplicate of bug 556808?
Comment 8 Thomas Andersen 2009-02-23 18:58:18 UTC
Not a duplicate. This is about using gtkbuilder for games that currently have hard coded UI's.
Comment 9 Thomas Andersen 2009-04-07 21:55:42 UTC
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."