gnome-settings-daemon r119 - in trunk: . plugins/background plugins/default-editor plugins/keybindings plugins/media-keys plugins/xsettings



Author: jensg
Date: Fri Feb  8 17:43:59 2008
New Revision: 119
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=119&view=rev

Log:
2008-02-08  Jens Granseuer  <jensgr gmx net>

	* plugins/background/gsd-background-manager.c:
	(gsd_background_manager_start), (gsd_background_manager_stop):
	* plugins/keybindings/gsd-keybindings-manager.c:
	(gsd_keybindings_manager_start):
	* plugins/media-keys/gsd-media-keys-manager.c:
	(gsd_media_keys_manager_stop): fix leaks

	* plugins/default-editor/gsd-default-editor-manager.c:
	(gsd_default_editor_manager_start): fix leak and pass the correct data
	to the mime type callback

	* plugins/xsettings/gsd-xsettings-manager.c:
	(gnome_xsettings_manager_start): unref the GConfClient only after
	we're done with it


Modified:
   trunk/ChangeLog
   trunk/plugins/background/gsd-background-manager.c
   trunk/plugins/default-editor/gsd-default-editor-manager.c
   trunk/plugins/keybindings/gsd-keybindings-manager.c
   trunk/plugins/media-keys/gsd-media-keys-manager.c
   trunk/plugins/xsettings/gsd-xsettings-manager.c

Modified: trunk/plugins/background/gsd-background-manager.c
==============================================================================
--- trunk/plugins/background/gsd-background-manager.c	(original)
+++ trunk/plugins/background/gsd-background-manager.c	Fri Feb  8 17:43:59 2008
@@ -55,10 +55,6 @@
         guint          timeout_id;
 };
 
-enum {
-        PROP_0,
-};
-
 static void     gsd_background_manager_class_init  (GsdBackgroundManagerClass *klass);
 static void     gsd_background_manager_init        (GsdBackgroundManager      *background_manager);
 static void     gsd_background_manager_finalize    (GObject             *object);
@@ -277,6 +273,7 @@
                               GError              **error)
 {
         GConfClient *client;
+        gboolean nautilus_show_desktop;
 
         g_debug ("Starting background manager");
 
@@ -306,15 +303,13 @@
 	 * don't waste time setting the background only to have
 	 * nautilus overwrite it.
 	 */
-        if (gconf_client_get_bool (client,
-                                   "/apps/nautilus/preferences/show_desktop",
-                                   NULL)) {
-                return TRUE;
-        }
-
+	nautilus_show_desktop = gconf_client_get_bool (client,
+                                                       "/apps/nautilus/preferences/show_desktop",
+                                                       NULL);
         g_object_unref (client);
 
-        apply_prefs (manager);
+        if (!nautilus_show_desktop)
+                apply_prefs (manager);
 
         return TRUE;
 }
@@ -323,6 +318,16 @@
 gsd_background_manager_stop (GsdBackgroundManager *manager)
 {
         g_debug ("Stopping background manager");
+
+        if (manager->priv->prefs != NULL) {
+        	g_object_unref (manager->priv->prefs);
+        	manager->priv->prefs = NULL;
+        }
+
+        if (manager->priv->bg != NULL) {
+        	g_object_unref (manager->priv->bg);
+        	manager->priv->bg = NULL;
+        }
 }
 
 static void

Modified: trunk/plugins/default-editor/gsd-default-editor-manager.c
==============================================================================
--- trunk/plugins/default-editor/gsd-default-editor-manager.c	(original)
+++ trunk/plugins/default-editor/gsd-default-editor-manager.c	Fri Feb  8 17:43:59 2008
@@ -62,10 +62,6 @@
         gboolean sync_changes;
 };
 
-enum {
-        PROP_0,
-};
-
 static void     gsd_default_editor_manager_class_init  (GsdDefaultEditorManagerClass *klass);
 static void     gsd_default_editor_manager_init        (GsdDefaultEditorManager      *default_editor_manager);
 static void     gsd_default_editor_manager_finalize    (GObject             *object);
@@ -155,12 +151,14 @@
 
         manager->priv->sync_changes = gconf_client_get_bool (client, SYNC_CHANGES_KEY, NULL);
 
-        register_config_callback (manager, SYNC_CHANGES_KEY, (GConfClientNotifyFunc)sync_changes_cb);
+        g_object_unref (client);
+
+        register_config_callback (manager, SYNC_CHANGES_KEY, (GConfClientNotifyFunc) sync_changes_cb);
 
         g_signal_connect (gnome_vfs_mime_monitor_get (),
                           "data_changed",
                           G_CALLBACK (vfs_change_cb),
-                          client);
+                          manager);
 
         vfs_change_cb (NULL, manager);
 

Modified: trunk/plugins/keybindings/gsd-keybindings-manager.c
==============================================================================
--- trunk/plugins/keybindings/gsd-keybindings-manager.c	(original)
+++ trunk/plugins/keybindings/gsd-keybindings-manager.c	Fri Feb  8 17:43:59 2008
@@ -75,10 +75,6 @@
         GSList *screens;
 };
 
-enum {
-        PROP_0,
-};
-
 static void     gsd_keybindings_manager_class_init  (GsdKeybindingsManagerClass *klass);
 static void     gsd_keybindings_manager_init        (GsdKeybindingsManager      *keybindings_manager);
 static void     gsd_keybindings_manager_finalize    (GObject             *object);
@@ -595,6 +591,7 @@
         }
 
         g_slist_free (list);
+        g_object_unref (client);
 
         binding_register_keys (manager);
 

Modified: trunk/plugins/media-keys/gsd-media-keys-manager.c
==============================================================================
--- trunk/plugins/media-keys/gsd-media-keys-manager.c	(original)
+++ trunk/plugins/media-keys/gsd-media-keys-manager.c	Fri Feb  8 17:43:59 2008
@@ -90,10 +90,6 @@
 };
 
 enum {
-        PROP_0,
-};
-
-enum {
         MEDIA_PLAYER_KEY_PRESSED,
         LAST_SIGNAL
 };
@@ -1024,6 +1020,21 @@
 gsd_media_keys_manager_stop (GsdMediaKeysManager *manager)
 {
         g_debug ("Stopping media_keys manager");
+
+        GsdMediaKeysManagerPrivate *priv = manager->priv;
+
+        if (priv->conf_client) {
+                g_object_unref (priv->conf_client);
+                priv->conf_client = NULL;
+        }
+
+        if (priv->volume) {
+                g_object_unref (priv->volume);
+                priv->volume = NULL;
+        }
+
+        g_slist_free (priv->screens);
+        priv->screens = NULL;
 }
 
 static void

Modified: trunk/plugins/xsettings/gsd-xsettings-manager.c
==============================================================================
--- trunk/plugins/xsettings/gsd-xsettings-manager.c	(original)
+++ trunk/plugins/xsettings/gsd-xsettings-manager.c	Fri Feb  8 17:43:59 2008
@@ -83,10 +83,6 @@
         XSettingsManager **managers;
 };
 
-enum {
-        PROP_0,
-};
-
 static void     gnome_xsettings_manager_class_init  (GnomeXSettingsManagerClass *klass);
 static void     gnome_xsettings_manager_init        (GnomeXSettingsManager      *xsettings_manager);
 static void     gnome_xsettings_manager_finalize    (GObject                  *object);
@@ -593,12 +589,12 @@
                 }
         }
 
-        g_object_unref (client);
-
 #ifdef HAVE_XFT2
         update_xft_settings (manager, client);
 #endif /* HAVE_XFT */
 
+        g_object_unref (client);
+
         for (i = 0; manager->priv->managers [i]; i++)
                 xsettings_manager_set_string (manager->priv->managers [i],
                                               "Net/FallbackIconTheme",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]