GNOME Bugzilla – Bug 576038
stop using libgnome
Last modified: 2009-05-09 13:59:58 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.
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.
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.
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.
Actually, I tell a lie: the media profiles library is still dragging libgnome in. See bug 576273.
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.
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.
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.