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 578046 - Sound juicer needs to use GtkBuilder and drop libglade support
Sound juicer needs to use GtkBuilder and drop libglade support
Status: RESOLVED FIXED
Product: sound-juicer
Classification: Applications
Component: interface
git master
Other All
: Normal blocker
: ---
Assigned To: Sound Juicer Maintainers
Sound Juicer Maintainers
Depends on: 578230 608169 608170
Blocks: 112930 572883
 
 
Reported: 2009-04-05 16:59 UTC by David King
Modified: 2010-04-15 15:13 UTC
See Also:
GNOME target: 3.0
GNOME version: 2.29/2.30


Attachments
Patch to remove libglade support and switch to GtkBuilder. (591.65 KB, patch)
2009-04-05 17:05 UTC, David King
none Details | Review
Updated patch, adds G_MODULE_EXPORT (604.86 KB, patch)
2009-04-05 17:37 UTC, David King
none Details | Review
Revised patch, calls gtk_builder_new before use (588.26 KB, patch)
2009-04-06 09:11 UTC, David King
none Details | Review
Revised patch, adds GtkVolumeButton in main window, and BraseroDriveSelection in prefs. (589.64 KB, patch)
2009-04-07 13:52 UTC, David King
needs-work Details | Review
Port from libglade to GtkBuilder (156.16 KB, patch)
2010-01-18 03:21 UTC, Javier Jardón (IRC: jjardon)
needs-work Details | Review
Patch that fills missing holes left behind by first patch. (16.47 KB, patch)
2010-01-20 21:49 UTC, Tadej Borovšak
needs-work Details | Review
Patch that removes libglade dependency. (156.38 KB, patch)
2010-01-29 13:17 UTC, Tadej Borovšak
none Details | Review
Latest patch that removes libglade dependency. (156.64 KB, patch)
2010-03-06 17:00 UTC, Tadej Borovšak
committed Details | Review

Description David King 2009-04-05 16:59:31 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).
Comment 1 David King 2009-04-05 17:05:12 UTC
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.
Comment 2 David King 2009-04-05 17:37:24 UTC
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.
Comment 3 David King 2009-04-06 09:11:26 UTC
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.
Comment 4 David King 2009-04-07 13:52:45 UTC
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.
Comment 5 Javier Jardón (IRC: jjardon) 2009-07-12 19:14:50 UTC
Can some sound-juicer developer review this?
Comment 6 André Klapper 2009-08-10 12:23:26 UTC
ping.
Comment 7 Javier Jardón (IRC: jjardon) 2009-10-11 13:55:01 UTC
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
Comment 8 Bastien Nocera 2010-01-06 16:37:22 UTC
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.
Comment 9 David King 2010-01-13 10:55:42 UTC
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.
Comment 10 André Klapper 2010-01-17 15:48:36 UTC
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.
Comment 11 Javier Jardón (IRC: jjardon) 2010-01-18 03:21:18 UTC
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.
Comment 12 Bastien Nocera 2010-01-19 13:27:14 UTC
When opening the preferences:

gnome-media-profiles-CRITICAL **: gm_audio_profile_choose_set_active: assertion `GTK_IS_COMBO_BOX (choose)' failed

  • #0 IA__g_logv
    at gmessages.c line 555
  • #1 IA__g_log
    at gmessages.c line 569
  • #2 gm_audio_profile_choose_set_active
    at audio-profile-choose.c line 165
  • #3 on_edit_preferences_cb
    at sj-prefs.c line 467
  • #4 IA__g_closure_invoke
    at gclosure.c line 767
  • #5 signal_emit_unlocked_R
    at gsignal.c line 3247
  • #6 IA__g_signal_emit_valist
    at gsignal.c line 2980
  • #7 IA__g_signal_emit
    at gsignal.c line 3037
  • #8 IA__gtk_widget_activate
    at gtkwidget.c line 4980
  • #9 IA__gtk_menu_shell_activate_item
    at gtkmenushell.c line 1223
  • #10 gtk_menu_shell_button_release
    at gtkmenushell.c line 679
  • #11 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 84
  • #12 IA__g_closure_invoke
    at gclosure.c line 767
  • #13 signal_emit_unlocked_R
    at gsignal.c line 3285
  • #14 IA__g_signal_emit_valist
    at gsignal.c line 2990
  • #15 IA__g_signal_emit
    at gsignal.c line 3037
  • #16 gtk_widget_event_internal
    at gtkwidget.c line 4949
  • #17 IA__gtk_propagate_event
    at gtkmain.c line 2442
  • #18 IA__gtk_main_do_event
    at gtkmain.c line 1647
  • #19 gdk_event_dispatch
    at gdkevents-x11.c line 2372
  • #20 g_main_dispatch
    at gmain.c line 1960
  • #21 IA__g_main_context_dispatch
    at gmain.c line 2513
  • #22 g_main_context_iterate
    at gmain.c line 2591
  • #23 IA__g_main_loop_run
    at gmain.c line 2799
  • #24 IA__gtk_main
    at gtkmain.c line 1219
  • #25 main
    at sj-main.c line 1884

"audio_profile" doesn't exist. And I'm pretty sure the button's class is wrong as well.
Comment 13 Tadej Borovšak 2010-01-20 21:49:38 UTC
Created attachment 151873 [details] [review]
Patch that fills missing holes left behind by first patch.
Comment 14 Tadej Borovšak 2010-01-20 21:50:28 UTC
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
Comment 15 Bastien Nocera 2010-01-26 16:35:05 UTC
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.
Comment 16 Tadej Borovšak 2010-01-29 13:17:09 UTC
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
Comment 17 Tadej Borovšak 2010-03-06 17:00:02 UTC
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.
Comment 18 Bastien Nocera 2010-04-15 15:13:39 UTC
Tadej, make sure your email is correct in your git changelogs in the future.

Committed to master, after branching for gnome-2-28.