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 576038 - stop using libgnome
stop using libgnome
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: general
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-20 04:14 UTC by Jonathan Matthew
Modified: 2009-05-09 13:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use GtkMountOperation instead of GnomePasswordDialog (3.88 KB, patch)
2009-03-20 04:18 UTC, Jonathan Matthew
none Details | Review
use EggSMClient and other bits and pieces (10.76 KB, patch)
2009-03-20 04:22 UTC, Jonathan Matthew
none Details | Review
updated daap password request patch (6.72 KB, patch)
2009-03-22 13:16 UTC, Jonathan Matthew
committed Details | Review
updated patch for other stuff (11.42 KB, patch)
2009-03-22 13:20 UTC, Jonathan Matthew
committed Details | Review

Description Jonathan Matthew 2009-03-20 04:14:10 UTC
We still use libgnome/ui in a few places.

GnomeProgram -> just call gtk_init and do option parsing ourselves
GnomePasswordDialog -> GtkMountOperation
GnomeClient -> EggSMClient
gnome_accelerators_sync() -> gtk_accel_map_load and gtk_accel_map_save
GNOME_DOT_GNOME -> ".gnome2"

and we'd either increase the required gtk version to 2.14 or add more complicated #ifdefs for some of it.
Comment 1 Jonathan Matthew 2009-03-20 04:18:45 UTC
Created attachment 131007 [details] [review]
use GtkMountOperation instead of GnomePasswordDialog

This is the bit I was most concerned about, but it turns out it's pretty easy, and the UI doesn't really change much.
Comment 2 Jonathan Matthew 2009-03-20 04:22:06 UTC
Created attachment 131008 [details] [review]
use EggSMClient and other bits and pieces

I haven't included the actual EggSMClient code in this patch, because it's copied directly from libegg.  This also includes the GnomeProgram and gnome_accelerators_sync bits because I was too lazy to keep them separate.
Comment 3 Jonathan Matthew 2009-03-20 07:39:05 UTC
With these patches and the current gnome packages in debian unstable, rhythmbox no longer loads libgnome, libgnomeui, and libgnomevfs, and it only loads the bonobo and orbit libraries via libcamel.
Comment 4 Jonathan Matthew 2009-03-22 10:34:40 UTC
Actually, I tell a lie: the media profiles library is still dragging libgnome in.  See bug 576273.
Comment 5 Jonathan Matthew 2009-03-22 13:16:00 UTC
Created attachment 131120 [details] [review]
updated daap password request patch

This adds #ifdefs switching between the GtkMountOperation and GnomePasswordDialog code.  Ends up simplifying some of the existing #ifdefs, though, so it's not all bad.
Comment 6 Jonathan Matthew 2009-03-22 13:20:27 UTC
Created attachment 131121 [details] [review]
updated patch for other stuff

Now initializes gtk via the option parser (gtk_get_option_group) and only depends on libgnomeui with gtk < 2.14.
Comment 7 Jonathan Matthew 2009-03-30 00:42:41 UTC
2009-03-30  Jonathan Matthew  <jonathan@d14n.org>

        * lib/eggdesktopfile.c: (egg_desktop_file_new),
        * lib/eggdesktopfile.h:
        * lib/eggsmclient-private.h:
        * lib/eggsmclient-xsmp.c: (egg_sm_client_xsmp_init),
        * lib/eggsmclient.c: (egg_sm_client_init),
        * lib/eggsmclient.h:
        * lib/Makefile.am:
        Add session management code copied from libegg.

        * lib/rb-file-helpers.c: (rb_dot_dir):
        Replace GNOME_DOT_GNOME with ".gnome2" - pretty safe to assume that
        this isn't going to change.

        * plugins/daap/rb-daap-source.c: (mount_op_reply_cb),
        (ask_password), (connection_auth_cb):
        When building with gtk+ 2.14 or newer, use GtkMountOperation to ask
        for passwords instead of GnomePasswordDialog.

        * shell/rb-shell-preferences.c: (help_cb):
        Fix the help URI for the preferences section, round up gtk version
        check numbers.

        * shell/rb-shell.c: (rb_shell_create_mount_op_cb),
        (rb_shell_cmd_contents), (session_save_state_cb),
        (session_quit_cb), (rb_shell_session_init):
        Use EggSMClient instead of GnomeClient for session management, round
        up the gtk version check numbers.

        * shell/main.c: (main):
        Parse options directly (including option groups for EggSMClient and
        gtk), load and save the accelerator map file ourselves (replacing
        gnome_accelerators_sync), stop calling glade_gnome_init (it doesn't do
        anything anyway), and set the application name and window icon via
        egg_set_desktop_file.

        * configure.ac:
        Only require libgnome when building with gtk+ < 2.14.  Fixes #576038.