GNOME Bugzilla – Bug 581346
Migrate from libglade to GtkBuilder
Last modified: 2010-01-12 22:53:58 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)
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/
Created attachment 135002 [details] [review] Correct patch Corrected typo in previous patch
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
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.
You can use the test binary in the greeter directory, confirming the crash on current tarball version
the issue seems to be due to the custom widget
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.
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
Ray, Can you take a look at this patch. Would be nice to still get this in the 2.28.1 release Jaap
2.29.1 sounds more appropriate then introducing this a few hours before a stable release...
Right, this is a good candidate for 2.30, not 2.28
(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
It's on my todo list, just not near the top.
Ray: As long as it happens in the next five weeks that's okay. :-)
This didn't make 2.29.4 but will be in before 2.29.5
(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...
I'm a bit behind schedule, but looking at this now. Luckily, 2.29.5 is a bit behind schedule, too...
Comment on attachment 139503 [details] [review] Use gtkbuilder take 2 This is pushed now with a few follow up commits.