GNOME Bugzilla – Bug 527903
port libslab to GIO
Last modified: 2008-09-07 12:13:12 UTC
see http://live.gnome.org/GioPort . complete list is: $:andre\> grep -l -R gnome_vfs . ./libslab/document-tile.c ./libslab/app-shell.c ./libslab/slab-gnome-util.c ./libslab/bookmark-agent.c ./libslab/directory-tile.c ./libslab/egg-recent-model.c ./libslab/egg-recent-item.c ./libslab/recent-files.c
according to sreeves planned after the release of opensuse 11
*ping* now that suse 11 is out
Starting to work on this issue right now. (Is there someone already working on it?)
just start, i guess that really nobody's working on this... thanks in advance!
I made series of patches for this, will attach in a short while.
Created attachment 115425 [details] [review] 01 - port to GIO
Created attachment 115426 [details] [review] 02 - remove all the copy-paste stuff, bump reqs
The issue here is that for some reason, gnome-main-menu contains a lot of #ifdefs for glib and gtk+ versions, many c/p files from glib and egg and two parallels implementations of recent files: both with EggRecentModel&friends and with GtkRecentManager. My first patch removes gnome-vfs from main-menu and libslab, but doesn't touch configure.in and leaves the Egg/ifdef stuff in place. The second patch, to apply on top of the first one, actually removes all the cruft in g-m-m, bump gtk+ and glib requisites and completely drops gnome-vfs. Another issue is that we won't be able to drop gnome-vfs until we completely remove the Egg stuff, as that files require it as a dependency, so I propose the second way as the best one for actually making the g-m-m codebase maintainable and up-to-date. Last thing: if a req for GTK+ 2.13.x is too hard, we can avoid that just by adding two ifdefs when creating the GdkAppLaunchContext.
sreeves: ping. please review.
Nice, thanks for the work on this. As far as the #ifdefs and pasted code, that was needed for features we wanted in SLED before they were officially released in GNOME. I agree it's a good idea to clean all that up and just depend on the latest versions. A dependency on GTK+ 2.13.x should be no problem. Let me go through this patch ...
Awesome patch, Cosimo, thanks! :) A few comments: * From bookmark-agent.c: + if (priv->store_monitor) { + g_file_monitor_cancel (priv->store_monitor); + g_object_unref (priv->store_monitor); + } Do we need to disconnect from the monitor's "changed" signal as well? From a quick reading of the code in gfilemonitor.c, nothing guarantees that doing g_file_monitor_cancel() will prevent a pending signal from being emitted (emit_in_idle() and emit_cb() don't check for cancellation). * From bookmark-agent.c: + if (priv->user_store_monitor) { + g_file_monitor_cancel (priv->user_store_monitor); + g_object_unref (priv->store_monitor); + } Cut&paste typo; ->store_monitor should be ->user_store_monitor. * From directory-tile.c: + gdk_app_launch_context_set_screen (launch_context, + gtk_widget_get_screen (GTK_WIDGET (tile))); Sweet! I'm sure we had a bug about not launching stuff on the correct screen somewhere... Please go ahead and commit after making those changes. Also, could you please tag svn with "BEFORE_GIO_PORT" or something like that? Thanks again :)
(In reply to comment #11) > Do we need to disconnect from the monitor's "changed" signal as well? > From a quick reading of the code in gfilemonitor.c, nothing guarantees > that doing g_file_monitor_cancel() will prevent a pending signal from > being emitted (emit_in_idle() and emit_cb() don't check for > cancellation). Yes, don't know if that's required but it shouldn't harm anyway...fixed. > * From bookmark-agent.c: > > + if (priv->user_store_monitor) { > + g_file_monitor_cancel (priv->user_store_monitor); > + g_object_unref (priv->store_monitor); > + } > > Cut&paste typo; ->store_monitor should be ->user_store_monitor. Fixed. > Please go ahead and commit after making those changes. Also, could you please > tag svn with "BEFORE_GIO_PORT" or something like that? > > Thanks again :) You're welcome ;) Tagged and committed to trunk, closing as FIXED.
The nautilus extension isn't ported yet: mv -f .deps/main-menu.Tpo .deps/main-menu.Plo nautilus-main-menu.c:37:41: error: libgnomevfs/gnome-vfs-utils.h: No such file or directory make[2]: *** [nautilus-main-menu.lo] Error 1
Good catch. This was trivial, as the nautilus extension included the gnome-vfs header without really using it, so I just fixed the includes in trunk (while I was at it, I also fixed a warning due to a missing libnautilus-extension include and I replaced gtk/gtkfoo.h includes with a single gtk/gtk.h as for the new GTK+ policy). 2008-08-22 Cosimo Cecchi <cosimoc@gnome.org> * nautilus-main-menu/main-menu.c: * nautilus-main-menu/nautilus-main-menu.c: Leftover from the GIO transition: fix includes in the nautilus extension.
Thanks a lot, builds perfectly fine now :)
Fantastic. Thanks, Cosimo :)
(In reply to comment #15) > Thanks a lot, builds perfectly fine now :) > Unfortunately it doesn't work for me, when I try to start it immediately crashes and I get the following in .xsession-errors: gnome-session[2326]: DEBUG(+): GsmXsmpServer: accept_ice_connection() gnome-session[2326]: DEBUG(+): GsmXSMPClient: Setting up new connection gnome-session[2326]: DEBUG(+): GsmXSMPClient: New client '0x808a458 []' gnome-session[2326]: DEBUG(+): GsmStore: Adding object id /org/gnome/SessionManager/Client20 to store gnome-session[2326]: DEBUG(+): GsmManager: Client added: /org/gnome/SessionManager/Client20 gnome-session[2326]: DEBUG(+): GsmXSMPClient: Initializing client 0x808a458 [] gnome-session[2326]: DEBUG(+): GsmXSMPClient: Client '0x808a458 []' received RegisterClient(NULL) gnome-session[2326]: DEBUG(+): GsmManager: Adding new client 10d615c0fabce5a9e4121943694547648400000023260042 to session gnome-session[2326]: DEBUG(+): GsmXSMPClient: Sending RegisterClientReply to '0x808a458 [10d615c0fabce5a9e4121943694547648400000023260042]' gnome-session[2326]: DEBUG(+): GsmXSMPClient: Sending initial SaveYourself gnome-session[2326]: DEBUG(+): GsmXSMPClient: Set properties from client '0x808a458 [10d615c0fabce5a9e4121943694547648400000023260042]' gnome-session[2326]: DEBUG(+): GsmXSMPClient: CurrentDirectory = '/' gnome-session[2326]: DEBUG(+): GsmXSMPClient: Set properties from client '0x808a458 [10d615c0fabce5a9e4121943694547648400000023260042]' gnome-session[2326]: DEBUG(+): GsmXSMPClient: ProcessID = '15588' gnome-session[2326]: DEBUG(+): GsmXSMPClient: Set properties from client '0x808a458 [10d615c0fabce5a9e4121943694547648400000023260042]' gnome-session[2326]: DEBUG(+): GsmXSMPClient: Program = 'slab' gnome-session[2326]: DEBUG(+): GsmXSMPClient: Set properties from client '0x808a458 [slab 10d615c0fabce5a9e4121943694547648400000023260042]' gnome-session[2326]: DEBUG(+): GsmXSMPClient: CloneCommand = 'slab' gnome-session[2326]: DEBUG(+): GsmXSMPClient: Set properties from client '0x808a458 [slab 10d615c0fabce5a9e4121943694547648400000023260042]' gnome-session[2326]: DEBUG(+): GsmXSMPClient: RestartCommand = 'slab' '--sm-client-id' '10d615c0fabce5a9e4121943694547648400000023260042' '--screen' '0' gnome-session[2326]: DEBUG(+): GsmXSMPClient: Set properties from client '0x808a458 [slab 10d615c0fabce5a9e4121943694547648400000023260042]' gnome-session[2326]: DEBUG(+): GsmXSMPClient: UserID = 'suka' (gnome-panel:2390): Bonobo-WARNING **: add_listener failed 'Unknown CORBA exception id: 'IDL:omg.org/CORBA/COMM_FAILURE:1.0'' ** (gnome-panel:2390): WARNING **: panel-applet-frame.c:1377: failed to load applet OAFIID:GNOME_MainMenu (cannot get popup component): Error checking error; no exception gnome-session[2326]: DEBUG(+): GsmXsmpServer: ice_io_error_handler (0x80e2658) gnome-session[2326]: DEBUG(+): GsmXSMPClient: IceProcessMessagesIOError on '0x808a458 [slab 10d615c0fabce5a9e4121943694547648400000023260042]' gnome-session[2326]: DEBUG(+): GsmManager: disconnect client gnome-session[2326]: DEBUG(+): GsmManager: disconnect client: /org/gnome/SessionManager/Client20 gnome-session[2326]: DEBUG(+): GsmManager: no application associated with client, not restarting application gnome-session[2326]: DEBUG(+): GsmStore: Unreffing object: 0x808a458 gnome-session[2326]: DEBUG(+): GsmManager: Client removed: /org/gnome/SessionManager/Client20 gnome-session[2326]: DEBUG(+): GsmClient: disposing /org/gnome/SessionManager/Client20 gnome-session[2326]: DEBUG(+): GsmXSMPClient: xsmp_finalize (0x808a458 [slab 10d615c0fabce5a9e4121943694547648400000023260042]) Unfortunately I have no clue how to better debug panel applets ;)
I finally found the time to test again trunk in a openSUSE factory installation and I realized that the GIO port introduced a regression which would cause gnome-main-menu not to start up properly. I now fixed this in trunk and tested the basic functionality: it should work fine. Closing again as FIXED. For other regressions please file new bugs here in bugzilla (and CC me if you like). 2008-09-07 Cosimo Cecchi <cosimoc@gnome.org> * main-menu/src/main-menu-ui.c: (main_menu_ui_new), (get_recently_used_store_filename), (setup_recently_used_throttle_timeout), (setup_recently_used_store_monitor), (update_recently_used_sections): Call update_recently_used_sections () in an idle when starting up the program (this was a regression from the GIO porting, as we were using this very same mechanism before).