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 581346 - Migrate from libglade to GtkBuilder
Migrate from libglade to GtkBuilder
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks: 572883
 
 
Reported: 2009-05-04 18:00 UTC by André Klapper
Modified: 2010-01-12 22:53 UTC
See Also:
GNOME target: 2.30.x
GNOME version: ---


Attachments
Partial patch to migrate to GtkBuilder (70.94 KB, patch)
2009-05-20 05:20 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Correct patch (70.95 KB, patch)
2009-05-20 05:38 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
replace glade by gtkbuilder (71.20 KB, patch)
2009-07-15 05:11 UTC, Jaap A. Haitsma
needs-work Details | Review
Use gtkbuilder take 2 (72.31 KB, patch)
2009-07-29 20:22 UTC, Jaap A. Haitsma
committed Details | Review

Description André Klapper 2009-05-04 18:00:56 UTC
http://live.gnome.org/GnomeGoals/RemoveLibGladeUseGtkBuilder

$:andre\> grep -r glade .
./gui/simple-greeter/gdm-greeter-login-window.glade
./gui/simple-greeter/Makefile.am:gladedir = $(pkgdatadir)
./gui/simple-greeter/Makefile.am:glade_DATA = 	\
./gui/simple-greeter/Makefile.am:gdm-greeter-login-window.glade	\
./gui/simple-greeter/Makefile.am:$(glade_DATA)		\
./gui/simple-greeter/gdm-greeter-login-window.c:#include <glade/glade-xml.h>
./gui/simple-greeter/gdm-greeter-login-window.c:#define GLADE_XML_FILE       "gdm-greeter-login-window.glade"
./gui/simple-greeter/gdm-greeter-login-window.c: box = glade_xml_get_widget (login_window->priv->xml, "auth-input-box");
./gui/simple-greeter/gdm-greeter-login-window.c: box = glade_xml_get_widget (login_window->priv->xml, "buttonbox");
./gui/simple-greeter/gdm-greeter-login-window.c: entry = glade_xml_get_widget (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->xml, "auth-prompt-entry");
./gui/simple-greeter/gdm-greeter-login-window.c: label = glade_xml_get_widget (login_window->priv->xml, "auth-message-label");
./gui/simple-greeter/gdm-greeter-login-window.c: widget = glade_xml_get_widget (login_window->priv->xml, name);
./gui/simple-greeter/gdm-greeter-login-window.c: widget = glade_xml_get_widget (login_window->priv->xml, name);
./gui/simple-greeter/gdm-greeter-login-window.c: entry = glade_xml_get_widget (login_window->priv->xml, "auth-prompt-entry");
./gui/simple-greeter/gdm-greeter-login-window.c: button = glade_xml_get_widget (login_window->priv->xml, "log-in-button");
./gui/simple-greeter/gdm-greeter-login-window.c: box = glade_xml_get_widget (login_window->priv->xml, "buttonbox");
./gui/simple-greeter/gdm-greeter-login-window.c: user_chooser = glade_xml_get_widget (login_window->priv->xml, "user-chooser");
./gui/simple-greeter/gdm-greeter-login-window.c:  widget = glade_xml_get_widget (login_window->priv->xml, default_name);
./gui/simple-greeter/gdm-greeter-login-window.c: entry = glade_xml_get_widget (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->xml, "auth-prompt-entry");
./gui/simple-greeter/gdm-greeter-login-window.c: label = glade_xml_get_widget (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->xml, "auth-prompt-label");
./gui/simple-greeter/gdm-greeter-login-window.c: entry = glade_xml_get_widget (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->xml, "auth-prompt-entry");
./gui/simple-greeter/gdm-greeter-login-window.c: label = glade_xml_get_widget (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->xml, "auth-prompt-label");
./gui/simple-greeter/gdm-greeter-login-window.c: entry = glade_xml_get_widget (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->xml, "auth-prompt-entry");
./gui/simple-greeter/gdm-greeter-login-window.c: label = glade_xml_get_widget (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->xml, "auth-prompt-label");
./gui/simple-greeter/gdm-greeter-login-window.c: notebook = glade_xml_get_widget (login_window->priv->xml, "computer-info-notebook");
./gui/simple-greeter/gdm-greeter-login-window.c: label = glade_xml_get_widget (login_window->priv->xml, "computer-info-name-label");
./gui/simple-greeter/gdm-greeter-login-window.c: label = glade_xml_get_widget (login_window->priv->xml, "computer-info-version-label");
./gui/simple-greeter/gdm-greeter-login-window.c: glade_set_custom_handler ((GladeXMLCustomWidgetHandler) custom_widget_constructor,
./gui/simple-greeter/gdm-greeter-login-window.c: login_window->priv->xml = glade_xml_new (GLADEDIR "/" GLADE_XML_FILE,
./gui/simple-greeter/gdm-greeter-login-window.c: image = glade_xml_get_widget (login_window->priv->xml, "logo-image");
./gui/simple-greeter/gdm-greeter-login-window.c: box = glade_xml_get_widget (login_window->priv->xml, "window-frame");
./gui/simple-greeter/gdm-greeter-login-window.c: login_window->priv->user_chooser = glade_xml_get_widget (login_window->priv->xml,
./gui/simple-greeter/gdm-greeter-login-window.c: login_window->priv->auth_banner_label = glade_xml_get_widget (login_window->priv->xml, "auth-banner-label");
./gui/simple-greeter/gdm-greeter-login-window.c: button = glade_xml_get_widget (login_window->priv->xml, "suspend-button");
./gui/simple-greeter/gdm-greeter-login-window.c: button = glade_xml_get_widget (login_window->priv->xml, "cancel-button");
./gui/simple-greeter/gdm-greeter-login-window.c: button = glade_xml_get_widget (login_window->priv->xml, "disconnect-button");
./gui/simple-greeter/gdm-greeter-login-window.c: button = glade_xml_get_widget (login_window->priv->xml, "restart-button");
./gui/simple-greeter/gdm-greeter-login-window.c: button = glade_xml_get_widget (login_window->priv->xml, "shutdown-button");
./gui/simple-greeter/gdm-greeter-login-window.c: entry = glade_xml_get_widget (login_window->priv->xml, "auth-prompt-entry");
./gui/simple-greeter/gdm-greeter-login-window.c: box = glade_xml_get_widget (login_window->priv->xml, "computer-info-event-box");
./gui/user-switch-applet/applet.c:#include <glade/glade-xml.h>
./configure.ac: libglade-2.0 >= $LIBGLADE_REQUIRED_VERSION
./configure.ac: libglade-2.0 >= $LIBGLADE_REQUIRED_VERSION
./configure.ac: libglade-2.0 >= $LIBGLADE_REQUIRED_VERSION)
Comment 1 Javier Jardón (IRC: jjardon) 2009-05-20 05:20:10 UTC
Created attachment 135001 [details] [review]
Partial patch to migrate to GtkBuilder

This is a partial patch.

I'm not sure how replace 'glade_set_custom_handler' function.

If someone wants to help I've found this: http://blogs.gnome.org/hughsie/2009/04/02/converting-to-gtkbuilder/
Comment 2 Javier Jardón (IRC: jjardon) 2009-05-20 05:38:53 UTC
Created attachment 135002 [details] [review]
Correct patch

Corrected typo in previous patch
Comment 3 Jaap A. Haitsma 2009-07-15 05:11:24 UTC
Created attachment 138423 [details] [review]
replace glade by gtkbuilder

In the previous patch there was still a part the custom widget that needed glade. I've also changed that part.

I'm pretty confident that the patch is OK. The only thing is that I'm not able (don't really know how) to run gdm-simple-greeter. Also before the patch I'm not able to run it. It just bails out.

gdm-simple-greeter[19646]: WARNING: Unable to start greeter session: GDM_GREETER_DBUS_ADDRESS not set
Comment 4 Ray Strode [halfline] 2009-07-15 19:33:46 UTC
hey,

thanks for this patch.  I gave it a try and it isn't quite right, because after building it, installing it and rebooting, I see the GDM greeter crash in a loop.
Comment 5 Sebastien Bacher 2009-07-24 13:42:59 UTC
You can use the test binary in the greeter directory, confirming the crash on current tarball version
Comment 6 Sebastien Bacher 2009-07-24 13:50:12 UTC
the issue seems to be due to the custom widget
Comment 7 Jaap A. Haitsma 2009-07-29 20:22:31 UTC
Created attachment 139503 [details] [review]
Use gtkbuilder take 2

I found why it crashed and fixed that. I see that the crash does not occur anymore, but the greeter does not start on my system because I get

WARNING: Unable to start greeter session: GDM_GREETER_DBUS_ADDRESS not set

So please test this one.
Comment 8 Javier Jardón (IRC: jjardon) 2009-10-11 13:54:32 UTC
Could some GDM developer review Jaap patch?

This is one of the lastest Gnome modules depending on libglade ;)
http://www.gnome.org/~fpeters/299.html
Comment 9 Jaap A. Haitsma 2009-10-19 19:43:38 UTC
Ray,

Can you take a look at this patch. Would be nice to still get this in the 2.28.1 release

Jaap
Comment 10 André Klapper 2009-10-19 20:03:11 UTC
2.29.1 sounds more appropriate then introducing this a few hours before a stable release...
Comment 11 Ray Strode [halfline] 2009-10-29 16:47:00 UTC
Right, this is a good candidate for 2.30, not 2.28
Comment 12 Jaap A. Haitsma 2009-10-30 21:36:49 UTC
(In reply to comment #11)
> Right, this is a good candidate for 2.30, not 2.28

Can you test it and commit it to the 2.30/head branch?

Thanks
Comment 13 Ray Strode [halfline] 2009-10-30 23:32:11 UTC
It's on my todo list, just not near the top.
Comment 14 André Klapper 2009-11-26 22:58:11 UTC
Ray: As long as it happens in the next five weeks that's okay. :-)
Comment 15 Ray Strode [halfline] 2009-12-22 02:06:54 UTC
This didn't make 2.29.4 but will be in before 2.29.5
Comment 16 André Klapper 2010-01-07 17:00:32 UTC
(In reply to comment #15)
> This didn't make 2.29.4 but will be in before 2.29.5

Quick reminder that 2.29.5 is on Monday...
Comment 17 Ray Strode [halfline] 2010-01-12 20:36:13 UTC
I'm a bit behind schedule, but looking at this now.  Luckily, 2.29.5 is a bit behind schedule, too...
Comment 18 Ray Strode [halfline] 2010-01-12 22:53:46 UTC
Comment on attachment 139503 [details] [review]
Use gtkbuilder take 2

This is pushed now with a few follow up commits.