GNOME Bugzilla – Bug 571878
Get rid of deprecated Bonobo
Last modified: 2010-12-13 10:22:20 UTC
libbonobo and libbonoboui are deprecated as per http://live.gnome.org/TwoPointTwentyfive/Platform and hence the dependency should be completely removed. See for example http://www.ibm.com/developerworks/linux/library/l-dbus.html or http://www.mail-archive.com/gnome-devel-list@gnome.org/msg00997.html . ./seahorse-plugins/plugins/applet/seahorse-applet.c:#include <bonobo.h>
...and of course also seahorse/seahorse-plugins/configure.in
Has something changed in libpanel-applet that it no longer requires Bonobo?
No - so we depend on gnome-panel here. Good to know.
gnome-panel has a bonobo-free branch now and will switch for 2.31.x. See dependency bug.
http://live.gnome.org/GnomeGoals/AppletsDbusMigration if that helps anybody.
JFTR: Carlos Garcia did a good work with gnome-panel in bug #572131. It's very useful as it's doing the same.
Created attachment 163349 [details] [review] Get rid of Bonobo I have made a patch. It compiles well but I haven't tested it yet. Comments are welcome.
Hi Pablo, thanks for trying to port the applet, some comments: - Menu xml file, service file and panel-applet file are missing in the patch, you probnably forgot to run git add - In order to hide the properties menu when the applet is locked down you can use something like: if (panel_applet_get_locked_down (applet)) { GtkAction *action; action = gtk_action_group_get_action (action_group, "Props"); gtk_action_set_visible (action, FALSE); } - I wonder why there's a custom main instead of using the factory macro. I think we could use PANEL_APPLET_OUT_PROCESS_FACTORY macro and move seahorse_secure_memory_init() to seahorse_applet_factory(), but I'm not sure. Another solution might be adding a new macro PANEL_APPLET_OUT_PROCESS_FACTORY_WITH_CODE or something like that
Created attachment 163379 [details] [review] Get rid of Bonobo (v2) Thanks for your comments Carlos. Changes: * added missing files to the patch * panel_applet_get_locked_down() About the last change, I'm not sure if it would work. Quoted from the documentation: "seahorse_secure_memory_init (). Configures non-pageable (secure) memory. Must be called before the first memory allocation." Maybe gtk_init() does some memory allocations, :? Stef can you give us a clue here?
The way seahorse_secure_memory_init() is written, it needs to be called before any glib or gtk+ code, because it replaces the glib memory allocator. The alternative is to rewrite all the secure memory handling stuff in seahorse so we explicitly, and stop using WITH_SECURE_MEM() and related macros. This would remove the need for seahorse_secure_memory_init().
Well, not using factory macro is not a problem anyway.
So, has anyone tested my patch?
*ping* Carlos
Created attachment 167091 [details] [review] Fix minor issues of previous patch Right, I knew I was going to forget it. During guadec Pablo and I tested his patch and we found some minor issues. This patch that goes on top of pablo's, fixes the problems.
Created attachment 170015 [details] [review] Get rid of Bonobo (v3) Please someone test this patch. I think it's done.
Review of attachment 170015 [details] [review]: It works for me, there's just a minor issue. ::: plugins/applet/seahorse-applet.c @@ +1029,3 @@ + + if (panel_applet_get_locked_down (applet)) { + action = gtk_action_group_get_action (action_group, "Props"); You are using action_group here that has been already unrefed, just move g_object_unref (action_group); after this block
Created attachment 170140 [details] [review] Get rid of Bonobo (FINAL) This is my proposed final patch. It would be good to commit it today, since tomorrow begins Hard Code Freeze. * Fixed g_object_unref * Fixed POTFILES.in
(In reply to comment #17) > It would be good to commit it today, since tomorrow begins Hard Code Freeze. It can be committed to master at any time after branching for gnome-2-32.
Pablo, unless Adam speaks up, I'm okay with you committing this before the 2.31.92 release. Especially if you work on releasing 2.31.92.
Pablo, Stef; could this be commited now?
This was applied, so I'm closing the bug.