GNOME Bugzilla – Bug 628624
Port desktop background stuff to GSettings and new gnome-bg API
Last modified: 2011-09-29 14:21:51 UTC
Created attachment 169373 [details] [review] proposed patch In relation to new gnome-bg API introduced in bug 626021, this patch ports the current background module to GSettings. I've changed only the parts related to GConf, functionality remains unchanged. I've added dependency on gsettings-desktop-schemas package as long as we use their schemas. We should probably add nautilus as well otherwise an attempt to access the 'org.gnome.nautilus.preferences' schema will fail. There's no way to conditionally check for schema existance, same issue as in GEdit. Additionally, the existing code assumes that Nautilus is always present in the session and leave all background setting work on it if the 'show-desktop' key is set. Not sure what are the Gnome 3.0 plans, is this still valid?
Review of attachment 169373 [details] [review]: ::: plugins/background/gsd-background-manager.c @@ +407,3 @@ + manager->priv->settings = g_settings_new ("org.gnome.desktop.background"); + manager->priv->nautilus_preferences = g_settings_new ("org.gnome.nautilus.preferences"); Does this work if nautilus is not installed ? With nautilus becoming less of a desktop component, and more of a regular application, that might be an issue. And it would be bad if g-s-d crashed in that case...
(In reply to comment #1) > Does this work if nautilus is not installed ? With nautilus becoming less of a > desktop component, and more of a regular application, that might be an issue. > And it would be bad if g-s-d crashed in that case... No, it won't. With the classic desktop going away we discussed on irc that background handling should go to g-s-d only and be ripped out of nautilus completely, just like automounting. In fact, the code is somewhat duplicated here and in nautilus. Perhaps we can add an automake check for nautilus and some ifdefs meanwhile...
(In reply to comment #2) > (In reply to comment #1) > > Does this work if nautilus is not installed ? With nautilus becoming less of a > > desktop component, and more of a regular application, that might be an issue. > > And it would be bad if g-s-d crashed in that case... > No, it won't. With the classic desktop going away we discussed on irc that > background handling should go to g-s-d only and be ripped out of nautilus > completely, just like automounting. In fact, the code is somewhat duplicated > here and in nautilus. > > Perhaps we can add an automake check for nautilus and some ifdefs meanwhile... No, it should only use org.gnome.desktop.background. However you could do run-time checks of whether nautilus is running, and use those prefs, if really required.
(In reply to comment #3) > However you could do run-time checks of whether nautilus is running, and use > those prefs, if really required. I would obviously prefer for nautilus to only use the preferences listed in gsettings-desktop-schemas, and add a preference there for the sake of nautilus.
Created attachment 172620 [details] [review] patch (In reply to comment #4) > (In reply to comment #3) > > However you could do run-time checks of whether nautilus is running, and use > > those prefs, if really required. > > I would obviously prefer for nautilus to only use the preferences listed in > gsettings-desktop-schemas, and add a preference there for the sake of nautilus. Right, that seems to be better way than adding nautilus-specific hacks. I've splitted the settings and proposed their inclusion in gsettings-desktop-schemas - bug 632225. Attached is updated patch, I've consolidated some callbacks and used the new 'show-desktop-icons' key. It should work the same way as before, i.e. doing nothing when nautilus is running or the key is set to TRUE, indicating that some file manager (as an integral part of the session) is set to be started. We might want to modify this for Gnome 3 when file manager is kicked out of the session and nautilus becomes just a standalone app.
Created attachment 173823 [details] [review] patch Little update for latest gnome-bg changes, only passing our GSettings object instance to gnome_bg_load_from_preferences().
commit 23b50dfc7078b78a513598060ee22ae46c262534 Author: Tomas Bzatek <tbzatek@redhat.com> Date: Tue Nov 9 19:01:19 2010 +0100 Port backround module to GSettings See bug 628624 for details.
Reopen as g-s-d still depends on gconf, from configure.ac: dnl FIXME we link against gconf-2.0 until all the plugins are ported dnl to GSettings, or we could get crashes on startup
Sorry, close this again and follow discussion in bug #631502