GNOME Bugzilla – Bug 578046
Sound juicer needs to use GtkBuilder and drop libglade support
Last modified: 2010-04-15 15:13:39 UTC
A GNOME Goal http://live.gnome.org/GnomeGoals/RemoveLibGladeUseGtkBuilder It should be quite easy to drop libglade support in Sound Juicer, although GTK+ 2.16 will be required for Menus (I think).
Created attachment 132137 [details] [review] Patch to remove libglade support and switch to GtkBuilder. This patch drops libglade support (and the dependency), and adds GtkBuilder support. GTK+ 2.16 is required for menu support in GtkBuilder, so I changed the minimum GTK+ version. I added a new macro GET_WIDGET() to get widgets from the GtkBuilder object (saves typing, can be removed if necessary). I think that I updated the translations correctly, by replacing sound-juicer.glade with sound-juicer.ui. I have not tested this patch for compilation issues, as I do not have GTK+ 2.16 at home, but I will test it tomorrow at work.
Created attachment 132139 [details] [review] Updated patch, adds G_MODULE_EXPORT Updated the patch with G_MODULE_EXPORT for all callbacks that are mentioned in the GtkBuilder UI description.
Created attachment 132175 [details] [review] Revised patch, calls gtk_builder_new before use I forgot to initialise the GtkBuilder object before use, so added a gtk_builder_new() call before calling gtk_builder_new_from_file(). The program appears to work fine, although I don't have a CD around to test most of the UI.
Created attachment 132268 [details] [review] Revised patch, adds GtkVolumeButton in main window, and BraseroDriveSelection in prefs. This revised patch adds a couple of missing custom widgets. First, the GtkVolumeButton in the main window, which is supported directly by GtkBuilder. Second, the BraseroDriveSelection combobox widget is added, but depends on GtkBuildable support in libbrasero-media (bug #578230). I have not yet added the GNOME media audio profile widget back (to the prefs window), and I think that this is the only missing functionality.
Can some sound-juicer developer review this?
ping.
Could some sound-juicer developer review David patch? This is one of the lastest Gnome modules depending on libglade ;) http://www.gnome.org/~fpeters/299.html
Review of attachment 132268 [details] [review]: Remove all the changes to the .po files, and the ChangeLogs. The media profiles widget needs to be working before we can commit this as well. I believe the patch will probably need updating for the latest sources, and be git formatted too. ::: src/sj-main.c @@ +1711,2 @@ } + if (ui == NULL) { That's obviously wrong (ui is never NULL), you need to check for gtk_build_add_from_file() failing instead. ::: README @@ +9,2 @@ Requirements: +* GNOME 2.14 Platform (libgnomeui, gconf, libnautilus-burn) This needs updating to reflect the real requirements.
I do not have time to update the patch right now (real life and all that), sorry. Maybe April I can look at it again.
To any volunteers: Providing an updated patch with the required fixes listed by Bastien in comment 8 is highly welcome, as sound-juicer and mono are the very last modules in the GNOME stack using libglade.
Created attachment 151650 [details] [review] Port from libglade to GtkBuilder Updated patch against current master and with Bastian fixes. I've patched the ui file because GtkBuilder will not accept duplicate object ids. Also, I've modified POTFILES.in in order for intltool to pick up the file correctly.
When opening the preferences: gnome-media-profiles-CRITICAL **: gm_audio_profile_choose_set_active: assertion `GTK_IS_COMBO_BOX (choose)' failed
+ Trace 220148
"audio_profile" doesn't exist. And I'm pretty sure the button's class is wrong as well.
Created attachment 151873 [details] [review] Patch that fills missing holes left behind by first patch.
Hello. I continued the work from where Javier finished (my patch needs to be applied on top of Javier's). Code now compiles cleanly, but it is ugly (some widgets are manually created and inserted into placeholders inside GUI). Tadej
See bug 608169 for the gnome-media bit, and bug 608170 for the brasero part. Could you please respin a patch without the brasero changes? And also make sure to remove all the changes in the UI file that aren't related to this bug.
Created attachment 152569 [details] [review] Patch that removes libglade dependency. Hello. I reworked the patches previously attached to this report. Patch should be nicer now, but hack that accommodates lack of real widget for audio profile selection is still present. I added a comment in that part of code to make it easier to find it when gnome-media package is "fixed". Tadej
Created attachment 155423 [details] [review] Latest patch that removes libglade dependency. This is an updated patch that resolves some whitespace issues and updates libbrasero-media version requirement.
Tadej, make sure your email is correct in your git changelogs in the future. Committed to master, after branching for gnome-2-28.