Attempt to clean up gconf usage in gnomecc some...



Hi.

This patch tries to clean up gconf usage so we at least unref
GConfClient whenever we use them. There are some other bits in here as
well, but nothing controversial. Feedback is much appreciated.

Cheers
Kjartan

? gnomecc-huge-cleanup.patch
? capplets/common/patch1
? capplets/common/patch2
Index: capplets/about-me/e-image-chooser.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/about-me/e-image-chooser.c,v
retrieving revision 1.1
diff -u -p -r1.1 e-image-chooser.c
--- capplets/about-me/e-image-chooser.c	3 Nov 2004 20:29:08 -0000	1.1
+++ capplets/about-me/e-image-chooser.c	20 Apr 2005 18:36:36 -0000
@@ -23,6 +23,7 @@
 #include <stdio.h>
 #include <string.h>
 
+#include <glib/gi18n.h>
 #include <gtk/gtkalignment.h>
 #include <gtk/gtkframe.h>
 #include <gtk/gtkimage.h>
@@ -30,7 +31,6 @@
 #include <gtk/gtkdnd.h>
 
 #include <libgnomevfs/gnome-vfs-ops.h>
-#include <libgnome/gnome-i18n.h>
 
 #include "e-image-chooser.h"
 #include "e-util-marshal.h"
Index: capplets/accessibility/at-properties/at-startup-session.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/accessibility/at-properties/at-startup-session.h,v
retrieving revision 1.2
diff -u -p -r1.2 at-startup-session.h
--- capplets/accessibility/at-properties/at-startup-session.h	18 Jul 2003 22:22:38 -0000	1.2
+++ capplets/accessibility/at-properties/at-startup-session.h	20 Apr 2005 18:36:36 -0000
@@ -1,5 +1,4 @@
-#include <config.h>
-#include <gtk/gtk.h>
+#include <glib.h>
 
 typedef union {
 	guint flags;
Index: capplets/accessibility/keyboard/accessibility-keyboard.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/accessibility/keyboard/accessibility-keyboard.c,v
retrieving revision 1.24
diff -u -p -r1.24 accessibility-keyboard.c
--- capplets/accessibility/keyboard/accessibility-keyboard.c	19 Feb 2004 17:07:00 -0000	1.24
+++ capplets/accessibility/keyboard/accessibility-keyboard.c	20 Apr 2005 18:36:36 -0000
@@ -386,6 +386,8 @@ load_CDE_file (GtkFileChooser *fchooser)
 	found |= xrm_get_bool (client, &db, CONFIG_ROOT "/enable",
 		"*EnableAccessXToggle.set",	"AccessX*ToggleButtonGadget.XmCSet");
 
+	g_object_unref (client);
+
 	if (!found) {
 		/* it would be nice to have a better message bu that would
 		 * break string freeze
@@ -460,6 +462,7 @@ setup_accessX_dialog (GConfChangeSet *ch
 
 	client = gconf_client_get_default ();
 	gconf_client_add_dir (client, CONFIG_ROOT, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+	g_object_unref (client);
 
 	setup_dialog (dialog, changeset);
 
Index: capplets/background/gnome-wp-info.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/background/gnome-wp-info.c,v
retrieving revision 1.4
diff -u -p -r1.4 gnome-wp-info.c
--- capplets/background/gnome-wp-info.c	26 Feb 2005 19:15:58 -0000	1.4
+++ capplets/background/gnome-wp-info.c	20 Apr 2005 18:36:36 -0000
@@ -28,11 +28,15 @@ GnomeWPInfo * gnome_wp_info_new (const g
   GnomeVFSFileInfo * info;
   GnomeVFSResult result;
 
+  gchar *escaped_uri = gnome_vfs_escape_path_string (uri);
+
   info = gnome_vfs_file_info_new ();
-  result = gnome_vfs_get_file_info (gnome_vfs_escape_path_string (uri), info,
+  result = gnome_vfs_get_file_info (escaped_uri, info,
 				    GNOME_VFS_FILE_INFO_DEFAULT |
 				    GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
 				    GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
+  g_free (escaped_uri);
+
   if (info == NULL || info->mime_type == NULL || result != GNOME_VFS_OK) {
     if (!strcmp (uri, "(none)")) {
       new = g_new0 (GnomeWPInfo, 1);
Index: capplets/common/gconf-property-editor.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/common/gconf-property-editor.c,v
retrieving revision 1.46
diff -u -p -r1.46 gconf-property-editor.c
--- capplets/common/gconf-property-editor.c	2 Jan 2005 00:43:06 -0000	1.46
+++ capplets/common/gconf-property-editor.c	20 Apr 2005 18:36:36 -0000
@@ -261,6 +261,7 @@ gconf_property_editor_set_prop (GObject 
 			gconf_client_notify_add (client, peditor->p->key,
 						 peditor->p->callback,
 						 peditor, NULL, NULL);
+		g_object_unref (client);
 		break;
 
 	case PROP_CHANGESET:
@@ -340,6 +341,7 @@ gconf_property_editor_finalize (GObject 
 		client = gconf_client_get_default ();		
 		gconf_client_notify_remove (client,
 					    gconf_property_editor->p->handler_id);
+		g_object_unref (client);
 	}
 	
 	g_free (gconf_property_editor->p);
@@ -408,10 +410,14 @@ peditor_set_gconf_value (GConfPropertyEd
 			 const gchar         *key,
 			 GConfValue          *value) 
 {
+	GConfClient *client = gconf_client_get_default();
+
 	if (peditor->p->changeset != NULL)
 		gconf_change_set_set (peditor->p->changeset, peditor->p->key, value);
 	else
-		gconf_client_set (gconf_client_get_default (), peditor->p->key, value, NULL);
+		gconf_client_set (client, peditor->p->key, value, NULL);
+
+	g_object_unref (client);
 }
 
 static void
@@ -1107,15 +1113,20 @@ peditor_numeric_range_widget_changed (GC
 				      GtkAdjustment       *adjustment)
 {
 	GConfValue *value, *value_wid, *default_value;
+	GConfClient *client;
 
 	if (!peditor->p->inited) return;
 
 	/* We try to get the default type from the schemas.  if not, we default
 	 * to a float.
 	 */
+	client = gconf_client_get_default();
+
 	default_value = gconf_client_get_default_from_schema (gconf_client_get_default (),
 							      peditor->p->key,
 							      NULL);
+	g_object_unref (client);
+
 	if (default_value)
 		value_wid = gconf_value_new (default_value->type);
 	else {
@@ -1225,6 +1236,7 @@ gconf_peditor_widget_set_guard (GConfPro
 	client = gconf_client_get_default ();
 	
 	value = gconf_client_get (client, peditor->p->key, NULL);
+	g_object_unref (client);
 
 	if (value) {
 		gtk_widget_set_sensitive (widget, guard_get_bool (peditor, value));
@@ -1706,6 +1718,7 @@ peditor_image_clicked_cb (GConfPropertyE
 	{
 		GConfClient *client = gconf_client_get_default ();
 		value = gconf_client_get (client, peditor->p->key, NULL);
+		g_object_unref (client);
 	}
 	
 	value_wid = peditor->p->conv_to_widget_cb (peditor, value);
Index: capplets/common/gnome-theme-apply.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/common/gnome-theme-apply.c,v
retrieving revision 1.2
diff -u -p -r1.2 gnome-theme-apply.c
--- capplets/common/gnome-theme-apply.c	3 Jun 2003 16:42:00 -0000	1.2
+++ capplets/common/gnome-theme-apply.c	20 Apr 2005 18:36:36 -0000
@@ -61,4 +61,5 @@ gnome_meta_theme_set (GnomeThemeMetaInfo
       gconf_client_set_string (client, ICON_THEME_KEY, meta_theme_info->icon_theme_name, NULL);
     }
   g_free (old_key);
+  g_object_unref (client);
 }
Index: capplets/default-applications/gnome-default-applications-properties.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/default-applications/gnome-default-applications-properties.c,v
retrieving revision 1.30
diff -u -p -r1.30 gnome-default-applications-properties.c
--- capplets/default-applications/gnome-default-applications-properties.c	21 Oct 2004 17:47:12 -0000	1.30
+++ capplets/default-applications/gnome-default-applications-properties.c	20 Apr 2005 18:36:36 -0000
@@ -788,6 +788,7 @@ main (int argc, char **argv)
 		dialog = create_dialog (client);
 		gtk_main ();
 	}
+	g_object_unref (client);
 
 	return 0;
 }
Index: capplets/keybindings/gnome-keybinding-properties.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/keybindings/gnome-keybinding-properties.c,v
retrieving revision 1.49
diff -u -p -r1.49 gnome-keybinding-properties.c
--- capplets/keybindings/gnome-keybinding-properties.c	13 Jan 2005 01:08:54 -0000	1.49
+++ capplets/keybindings/gnome-keybinding-properties.c	20 Apr 2005 18:36:36 -0000
@@ -391,6 +391,8 @@ clear_old_model (GladeXML  *dialog,
       g_object_unref (model);
     }
 
+  g_object_unref (client);
+
   model = (GtkTreeModel *) gtk_tree_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER);
   
   sort_model = gtk_tree_model_sort_new_with_model (model);
@@ -425,13 +427,17 @@ static gboolean
 should_show_key (const KeyListEntry *entry)
 {
   gint workspaces;
-  
+  GConfClient *client;
+ 
   switch (entry->visibility) {
   case ALWAYS_VISIBLE:
     return TRUE;
   case N_WORKSPACES_GT:
-    workspaces = gconf_client_get_int (gconf_client_get_default (),
+    client = gconf_client_get_default();
+    workspaces = gconf_client_get_int (client,
 				       "/apps/metacity/general/num_workspaces", NULL);
+    g_object_unref (client);
+
     if (workspaces > entry->data)
       return TRUE;
     else
@@ -544,6 +550,8 @@ append_keys_to_tree (GladeXML           
       gconf_schema_free (schema);
     }
 
+  g_object_unref (client);
+
   if (i == 0)
       gtk_widget_hide (WID ("shortcuts_vbox"));
   else
@@ -884,6 +892,7 @@ setup_dialog (GladeXML *dialog)
 			   "/apps/metacity/general/num_workspaces",
 			   (GConfClientNotifyFunc) &key_entry_controlling_key_changed,
 			   dialog, NULL, NULL);
+  g_object_unref (client);
 
   /* set up the dialog */
   reload_key_entries (wm_common_get_current_window_manager(), dialog);
Index: capplets/keyboard/gnome-keyboard-properties.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/keyboard/gnome-keyboard-properties.c,v
retrieving revision 1.38
diff -u -p -r1.38 gnome-keyboard-properties.c
--- capplets/keyboard/gnome-keyboard-properties.c	20 Dec 2004 23:52:41 -0000	1.38
+++ capplets/keyboard/gnome-keyboard-properties.c	20 Apr 2005 18:36:36 -0000
@@ -242,6 +242,7 @@ main (int argc, char **argv) 
 	client = gconf_client_get_default ();
 	gconf_client_add_dir (client, "/desktop/gnome/peripherals/keyboard", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
 	gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+	g_object_unref (client);
 
 	if (get_legacy) {
 		get_legacy_settings ();
Index: capplets/mouse/gnome-mouse-properties.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/mouse/gnome-mouse-properties.c,v
retrieving revision 1.52
diff -u -p -r1.52 gnome-mouse-properties.c
--- capplets/mouse/gnome-mouse-properties.c	20 Aug 2004 16:50:57 -0000	1.52
+++ capplets/mouse/gnome-mouse-properties.c	20 Apr 2005 18:36:36 -0000
@@ -344,9 +344,12 @@ event_box_button_press_event (GtkWidget 
 
 	image = g_object_get_data (G_OBJECT (widget), "image");
 	
-	if (!(changeset && gconf_change_set_check_value (changeset, DOUBLE_CLICK_KEY, &value))) 
-		double_click_time = gconf_client_get_int (gconf_client_get_default (), DOUBLE_CLICK_KEY, NULL);
-	else
+	if (!(changeset && gconf_change_set_check_value (changeset, DOUBLE_CLICK_KEY, &value))) {
+		client = gconf_client_get_default();
+		double_click_time = gconf_client_get_int (client, DOUBLE_CLICK_KEY, NULL);
+		g_object_unref (client);
+
+	} else
 		double_click_time = gconf_value_get_int (value);
 
 	if (test_maybe_timeout_id != 0)
@@ -519,12 +522,14 @@ cursor_changed (GtkTreeSelection *select
 			    COLUMN_FONT_PATH, &cursor_font,
 			    -1);
 	if (cursor_font != NULL) {
-		gconf_client_set_string (gconf_client_get_default (),
+		client = gconf_client_get_default();
+		gconf_client_set_string (client,
 					 CURSOR_FONT_KEY, cursor_font, NULL);
 		g_free (cursor_font);
 	} else
-		gconf_client_unset (gconf_client_get_default (),
+		gconf_client_unset (client,
 				    CURSOR_FONT_KEY, NULL);
+	g_object_unref (client);
 }
 
 /* Set up the property editors in the dialog. */
@@ -558,7 +563,8 @@ setup_dialog (GladeXML *dialog, GConfCha
 	g_signal_connect (peditor, "value-changed", (GCallback) left_handed_toggle_cb, WID ("orientation_image"));
 
 	/* Make sure the image gets initialized correctly */
-	value = gconf_client_get (gconf_client_get_default (), "/desktop/gnome/peripherals/mouse/left_handed", NULL);
+	client = gconf_client_get_default ();
+	value = gconf_client_get (client, "/desktop/gnome/peripherals/mouse/left_handed", NULL);
 	left_handed_toggle_cb (GCONF_PROPERTY_EDITOR (peditor), NULL, value, WID ("orientation_image"));
 	gconf_value_free (value);
 
@@ -724,13 +730,14 @@ setup_dialog (GladeXML *dialog, GConfCha
 		 NULL);
 
 	/* listen to cursors changing */
-        gconf_client_notify_add (gconf_client_get_default (),
+        gconf_client_notify_add (client,
 				 CURSOR_FONT_KEY,
 				 cursor_font_changed,
 				 tree_view, NULL, NULL);
 
 	/* and set it up initially... */
-	cursor_font_changed (gconf_client_get_default (), 0, NULL, tree_view);
+	cursor_font_changed (client, 0, NULL, tree_view);
+	g_object_unref (client);
 }
 
 /* Construct the dialog */
@@ -829,6 +836,7 @@ main (int argc, char **argv)
 
 	client = gconf_client_get_default ();
 	gconf_client_add_dir (client, "/desktop/gnome/peripherals/mouse", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+	g_object_unref (client);
 
 	if (get_legacy) {
 		get_legacy_settings ();
Index: capplets/network/gnome-network-preferences.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/network/gnome-network-preferences.c,v
retrieving revision 1.19
diff -u -p -r1.19 gnome-network-preferences.c
--- capplets/network/gnome-network-preferences.c	5 Feb 2005 13:19:38 -0000	1.19
+++ capplets/network/gnome-network-preferences.c	20 Apr 2005 18:36:36 -0000
@@ -126,7 +126,7 @@ cb_add_url (GtkButton *button, gpointer 
 		
 	client = gconf_client_get_default ();
 	gconf_client_set_list (client, IGNORE_HOSTS_KEY, GCONF_VALUE_STRING, ignore_hosts, NULL);
-
+	g_object_unref (client);
 }
 
 static void
@@ -161,6 +161,7 @@ cb_remove_url (GtkButton *button, gpoint
 		
 		client = gconf_client_get_default ();
 		gconf_client_set_list(client, IGNORE_HOSTS_KEY, GCONF_VALUE_STRING, ignore_hosts, NULL);
+		g_object_unref (client);
 	}
 }
 
@@ -395,6 +396,8 @@ setup_dialog (GladeXML *dialog)
 
 	gtk_label_set_use_markup (GTK_LABEL (WID ("label_ignore_host")), TRUE);
 	ignore_hosts = gconf_client_get_list(client, IGNORE_HOSTS_KEY, GCONF_VALUE_STRING, NULL);
+	g_object_unref (client);
+
 	model = create_listmodel();
 	populate_listmodel(GTK_LIST_STORE(model), ignore_hosts);
 	config_treeview(GTK_TREE_VIEW(WID("treeview_ignore_host")), model);
Index: capplets/sound/sound-properties-capplet.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/sound/sound-properties-capplet.c,v
retrieving revision 1.44
diff -u -p -r1.44 sound-properties-capplet.c
--- capplets/sound/sound-properties-capplet.c	6 Feb 2005 23:13:21 -0000	1.44
+++ capplets/sound/sound-properties-capplet.c	20 Apr 2005 18:36:36 -0000
@@ -285,6 +285,7 @@ main (int argc, char **argv) 
 		gconf_change_set_unref (changeset);
 	}
 	
+	g_object_unref (client);
 	g_object_unref (dialog);
 	return 0;
 }
Index: capplets/theme-switcher/gnome-theme-details.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/theme-switcher/gnome-theme-details.c,v
retrieving revision 1.18
diff -u -p -r1.18 gnome-theme-details.c
--- capplets/theme-switcher/gnome-theme-details.c	1 Feb 2005 22:33:47 -0000	1.18
+++ capplets/theme-switcher/gnome-theme-details.c	20 Apr 2005 18:36:36 -0000
@@ -269,7 +269,6 @@ update_gconf_key_from_selection (GtkTree
 void
 gnome_theme_details_init (void)
 {
-  GConfClient *client;
   GtkWidget *parent, *widget;
   GnomeWindowManager *window_manager;
   GladeXML *dialog;
@@ -279,7 +278,6 @@ gnome_theme_details_init (void)
   theme_details_initted = TRUE;
 
   dialog = gnome_theme_manager_get_theme_dialog ();
-  client = gconf_client_get_default ();
   window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
   parent = WID ("theme_details_dialog");
 
@@ -565,5 +563,6 @@ gnome_theme_details_update_from_gconf (v
   tree_view = WID ("icon_theme_treeview");
   theme = gconf_client_get_string (client, ICON_THEME_KEY, NULL);
   update_list_something (tree_view, theme);
+  g_object_unref (client);
   g_free (theme);
 }
Index: capplets/theme-switcher/gnome-theme-manager.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/theme-switcher/gnome-theme-manager.c,v
retrieving revision 1.52
diff -u -p -r1.52 gnome-theme-manager.c
--- capplets/theme-switcher/gnome-theme-manager.c	2 Feb 2005 00:30:04 -0000	1.52
+++ capplets/theme-switcher/gnome-theme-manager.c	20 Apr 2005 18:36:36 -0000
@@ -317,6 +317,8 @@ load_meta_themes (GtkTreeView *tree_view
 
   current_gtk_theme = gconf_client_get_string (client, GTK_THEME_KEY, NULL);
   current_icon_theme = gconf_client_get_string (client, ICON_THEME_KEY, NULL);
+  g_object_unref (client);
+
   window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
   wm_settings.flags = GNOME_WM_SETTING_THEME;
 
@@ -577,6 +579,8 @@ meta_theme_selection_changed (GtkTreeSel
     /* Get the settings */
     current_gtk_theme = gconf_client_get_string (client, GTK_THEME_KEY, NULL);
     current_icon_theme = gconf_client_get_string (client, ICON_THEME_KEY, NULL);
+    g_object_unref (client);
+
     window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
     wm_settings.flags = GNOME_WM_SETTING_THEME;
     if (window_manager) {
@@ -785,6 +789,8 @@ update_settings_from_gconf_idle (gpointe
   /* Get the settings */
   current_gtk_theme = gconf_client_get_string (client, GTK_THEME_KEY, NULL);
   current_icon_theme = gconf_client_get_string (client, ICON_THEME_KEY, NULL);
+  g_object_unref (client);
+
   window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
   wm_settings.flags = GNOME_WM_SETTING_THEME;
   if (window_manager) {
@@ -978,7 +984,7 @@ update_font_button_state (GladeXML *dial
 
       g_free (str);
     }  
-  
+  g_object_unref (client);  
 }
 
 static void
@@ -1125,6 +1131,7 @@ apply_font_clicked (GtkWidget *button,
 
       gconf_client_set_string (client, FONT_KEY, meta_theme_info->application_font, NULL);
     }  
+  g_object_unref (client);
 }
 
 static void
@@ -1197,6 +1204,8 @@ setup_dialog (GladeXML *dialog)
 			   FONT_KEY,
 			   (GConfClientNotifyFunc) &font_key_changed,
 			   dialog, NULL, NULL);
+  g_object_unref (client);
+
   if (window_manager)
     g_signal_connect (G_OBJECT (window_manager),
 		      "settings_changed",
@@ -1415,6 +1424,7 @@ get_default_string_from_key (const char 
 
   client = gconf_client_get_default ();
   value = gconf_client_get_default_from_schema (client, key, &error);
+  g_object_unref (client);
 
   if (error)
     {
Index: capplets/ui-properties/gnome-ui-properties.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/ui-properties/gnome-ui-properties.c,v
retrieving revision 1.29
diff -u -p -r1.29 gnome-ui-properties.c
--- capplets/ui-properties/gnome-ui-properties.c	13 Jan 2005 00:56:07 -0000	1.29
+++ capplets/ui-properties/gnome-ui-properties.c	20 Apr 2005 18:36:36 -0000
@@ -223,6 +223,7 @@ setup_dialog (GladeXML *dialog, GConfCha
   GtkWidget *widget;
   GObject *peditor;
   char *toolbar_style;
+  GConfClient *client = gconf_client_get_default ();
 
   peditor = gconf_peditor_new_boolean
     (changeset, "/desktop/gnome/interface/toolbar_detachable", WID ("detachable_toolbars_toggle"), NULL);
@@ -240,7 +241,7 @@ setup_dialog (GladeXML *dialog, GConfCha
     G_CALLBACK (menus_have_icons_cb), dialog);
   
   set_have_icons (dialog, 
-		  gconf_client_get_bool (gconf_client_get_default (),
+		  gconf_client_get_bool (client,
 					 "/desktop/gnome/interface/menus_have_icons",
 					 NULL));
 
@@ -264,14 +265,15 @@ setup_dialog (GladeXML *dialog, GConfCha
 	G_CALLBACK (dialog_button_clicked_cb), changeset);
 
   show_handlebar (dialog, 
-		  gconf_client_get_bool (gconf_client_get_default (),
+		  gconf_client_get_bool (client,
 					 "/desktop/gnome/interface/toolbar_detachable",
 					 NULL));
 
-  toolbar_style = gconf_client_get_string (gconf_client_get_default (),
+  toolbar_style = gconf_client_get_string (client,
 					   "/desktop/gnome/interface/toolbar_style", 
 					   NULL);
-  
+  g_object_unref (client);
+
   set_toolbar_style (dialog, toolbar_style);
 
   g_free (toolbar_style);
@@ -299,7 +301,7 @@ main (int argc, char **argv)
 
   client = gconf_client_get_default ();
   gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
+  g_object_unref (client);
   dialog = create_dialog ();
   setup_dialog (dialog, changeset);
   gtk_main ();
Index: capplets/windows/gnome-window-properties.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/windows/gnome-window-properties.c,v
retrieving revision 1.19
diff -u -p -r1.19 gnome-window-properties.c
--- capplets/windows/gnome-window-properties.c	20 Oct 2004 14:40:45 -0000	1.19
+++ capplets/windows/gnome-window-properties.c	20 Apr 2005 18:36:36 -0000
@@ -27,7 +27,6 @@
 #include <config.h>
 #endif
 
-#include <gconf/gconf-client.h>
 #include <glade/glade.h>
 #include <gnome-wm-manager.h>
 
@@ -42,7 +41,6 @@ typedef struct
         GtkWidget *radio;
 } MouseClickModifier;
 
-static GConfClient *gconf_client;
 static GladeXML *dialog;
 static GnomeWindowManager *current_wm; /* may be NULL */
 static GtkWidget *dialog_win;
@@ -430,8 +428,6 @@ main (int argc, char **argv)
 			    LIBGNOMEUI_MODULE, argc, argv,
 			    NULL);
 
-        gconf_client = gconf_client_get_default ();
-        
         gnome_wm_manager_init ();
 
         screen = gdk_display_get_default_screen (gdk_display_get_default ());
Index: gnome-settings-daemon/factory.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/factory.c,v
retrieving revision 1.9
diff -u -p -r1.9 factory.c
--- gnome-settings-daemon/factory.c	25 Dec 2004 14:32:12 -0000	1.9
+++ gnome-settings-daemon/factory.c	20 Apr 2005 18:36:36 -0000
@@ -6,6 +6,8 @@
 #include <bonobo/bonobo-object.h>
 #include <bonobo/bonobo-generic-factory.h>
 
+#include <gconf/gconf.h>
+
 #include <libgnome/gnome-init.h>
 #include <libgnomeui/gnome-ui-init.h>
 #include <libgnomeui/gnome-client.h>
Index: gnome-settings-daemon/gnome-settings-accessibility-keyboard.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-accessibility-keyboard.c,v
retrieving revision 1.30
diff -u -p -r1.30 gnome-settings-accessibility-keyboard.c
--- gnome-settings-daemon/gnome-settings-accessibility-keyboard.c	14 Mar 2005 21:22:17 -0000	1.30
+++ gnome-settings-daemon/gnome-settings-accessibility-keyboard.c	20 Apr 2005 18:36:36 -0000
@@ -23,9 +23,16 @@
 
 #include "config.h"
 
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n.h>
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkhbox.h>
+#include <gtk/gtkimage.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtkmessagedialog.h>
+#include <gtk/gtkstock.h>
+
 #include <gconf/gconf-client.h>
 #include <libgnome/gnome-help.h>
 
@@ -285,12 +292,13 @@ set_server_from_gconf (GConfEntry *ignor
 
 	XSync (GDK_DISPLAY (), FALSE);
 	gdk_error_trap_pop ();
+
+	g_object_unref (client);
 }
 
 static gboolean
 ax_response_callback (gint response_id, guint revert_controls_mask, gboolean enabled)
 {
-	GConfClient *client = gconf_client_get_default ();
 	GError *err = NULL;
 	gboolean success;
 
@@ -298,6 +306,9 @@ ax_response_callback (gint response_id, 
 	{
 	    case GTK_RESPONSE_REJECT:
 	    case GTK_RESPONSE_CANCEL:
+		{
+		    GConfClient *client = gconf_client_get_default ();
+
 		    /* we're reverting, so we invert sense of 'enabled' flag */
 		    d ("cancelling AccessX request");
 		    if (revert_controls_mask == XkbStickyKeysMask)
@@ -315,6 +326,7 @@ ax_response_callback (gint response_id, 
 		    gconf_client_suggest_sync (client, NULL);
 		    set_server_from_gconf (NULL);
 		    break;
+		}
 	    case GTK_RESPONSE_HELP:
 		    gnome_help_display_desktop (NULL,
 						"user-guide",
@@ -537,6 +549,7 @@ set_gconf_from_server (GConfEntry *ignor
 		gconf_client_suggest_sync (client, NULL);
 	}
 	gconf_change_set_unref (cs);
+	g_object_unref (client);
 }
 
 static GdkFilterReturn 
Index: gnome-settings-daemon/gnome-settings-accessibility-keyboard.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-accessibility-keyboard.h,v
retrieving revision 1.1
diff -u -p -r1.1 gnome-settings-accessibility-keyboard.h
--- gnome-settings-daemon/gnome-settings-accessibility-keyboard.h	23 Mar 2002 04:39:23 -0000	1.1
+++ gnome-settings-daemon/gnome-settings-accessibility-keyboard.h	20 Apr 2005 18:36:36 -0000
@@ -23,7 +23,6 @@
 #ifndef __GNOME_SETTINGS_ACCESSIBILITY_KEYBOARD_H
 #define __GNOME_SETTINGS_ACCESSIBILITY_KEYBOARD_H
 
-#include <gconf/gconf.h>
 #include <gconf/gconf-client.h>
 
 void gnome_settings_accessibility_keyboard_init (GConfClient *client);
Index: gnome-settings-daemon/gnome-settings-background.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-background.c,v
retrieving revision 1.8
diff -u -p -r1.8 gnome-settings-background.c
--- gnome-settings-daemon/gnome-settings-background.c	7 Apr 2004 04:46:27 -0000	1.8
+++ gnome-settings-daemon/gnome-settings-background.c	20 Apr 2005 18:36:36 -0000
@@ -37,11 +37,7 @@
 #include "preferences.h"
 #include "applier.h"
 
-#ifdef HAVE_GTK_MULTIHEAD
 static BGApplier **bg_appliers;
-#else
-static BGApplier *bg_applier;
-#endif
 static BGPreferences *prefs;
 
 static guint applier_idle_id = 0;
@@ -49,13 +45,9 @@ static guint applier_idle_id = 0;
 static gboolean
 applier_idle (gpointer data)
 {
-#ifdef HAVE_GTK_MULTIHEAD
 	int i;
 	for (i = 0; bg_appliers [i]; i++)
 		bg_applier_apply_prefs (bg_appliers [i], prefs);
-#else
-	bg_applier_apply_prefs (bg_applier, prefs);
-#endif
 	applier_idle_id = 0;
 	return FALSE;
 }
@@ -75,7 +67,6 @@ background_callback (GConfEntry *entry) 
 void
 gnome_settings_background_init (GConfClient *client)
 {
-#ifdef HAVE_GTK_MULTIHEAD
 	GdkDisplay *display;
 	int         n_screens;
 	int         i;
@@ -93,9 +84,6 @@ gnome_settings_background_init (GConfCli
 		bg_appliers [i] = BG_APPLIER (bg_applier_new_for_screen (BG_APPLIER_ROOT, screen));
 	}
 	bg_appliers [i] = NULL;
-#else
-	bg_applier = BG_APPLIER (bg_applier_new (BG_APPLIER_ROOT));
-#endif
 
 	prefs = BG_PREFERENCES (bg_preferences_new ());
 	bg_preferences_load (prefs);
@@ -106,9 +94,7 @@ gnome_settings_background_init (GConfCli
 void
 gnome_settings_background_load (GConfClient *client)
 {
-#ifdef HAVE_GTK_MULTIHEAD
 	int i;
-#endif
 
 	/* If this is set, nautilus will draw the background and is
 	 * almost definitely in our session.  however, it may not be
@@ -121,10 +107,6 @@ gnome_settings_background_load (GConfCli
 	if (gconf_client_get_bool (client, "/apps/nautilus/preferences/show_desktop", NULL))
 		return;
 
-#ifdef HAVE_GTK_MULTIHEAD
 	for (i = 0; bg_appliers [i]; i++)
 		bg_applier_apply_prefs (bg_appliers [i], prefs);
-#else
-	bg_applier_apply_prefs (bg_applier, prefs);
-#endif
 }
Index: gnome-settings-daemon/gnome-settings-daemon.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-daemon.c,v
retrieving revision 1.34
diff -u -p -r1.34 gnome-settings-daemon.c
--- gnome-settings-daemon/gnome-settings-daemon.c	31 Jan 2005 15:31:44 -0000	1.34
+++ gnome-settings-daemon/gnome-settings-daemon.c	20 Apr 2005 18:36:36 -0000
@@ -20,17 +20,19 @@
  *
  * Authors:  Owen Taylor, Havoc Pennington
  */
+#include <config.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 
-#include <gtk/gtk.h>
 #include <gdk/gdkx.h>
+#include <gtk/gtkinvisible.h>
+#include <gtk/gtkmain.h>
+
+#include <gconf/gconf-client.h>
 
-#include <gconf/gconf.h>
 #include <libgnome/gnome-init.h>
 #include <libgnomeui/gnome-ui-init.h>
-#include <config.h>
 
 #include <errno.h>
 #include <sys/types.h>
@@ -276,7 +278,7 @@ gnome_settings_daemon_new (void)
   gnome_settings_xsettings_init (client);
   gnome_settings_mouse_init (client);
 /* Essential - xkb initialization should happen before */
-  gnome_settings_keyboard_xkb_set_post_activation_callback (gnome_settings_load_modmap_files, NULL);
+  gnome_settings_keyboard_xkb_set_post_activation_callback ((PostActivationCallback)gnome_settings_load_modmap_files, NULL);
   gnome_settings_keyboard_xkb_init (client);
   gnome_settings_keyboard_init (client);
   gnome_settings_multimedia_keys_init (client);
@@ -344,6 +346,8 @@ gnome_settings_daemon_new (void)
   gnome_settings_gtk1_theme_load (client);
   gnome_settings_xrdb_load (client);
   gnome_settings_typing_break_load (client);
+
+  g_object_unref (client);
 
   return G_OBJECT (daemon);
 }
Index: gnome-settings-daemon/gnome-settings-daemon.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-daemon.h,v
retrieving revision 1.6
diff -u -p -r1.6 gnome-settings-daemon.h
--- gnome-settings-daemon/gnome-settings-daemon.h	6 Feb 2003 21:47:00 -0000	1.6
+++ gnome-settings-daemon/gnome-settings-daemon.h	20 Apr 2005 18:36:36 -0000
@@ -24,9 +24,9 @@
 #ifndef __GNOME_SETTINGS_DAEMON_H
 #define __GNOME_SETTINGS_DAEMON_H
 
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-#include <gtk/gtk.h>
+#include <glib-object.h>
+#include <gtk/gtkwidget.h>
+#include <gconf/gconf-value.h>
 
 #include <bonobo/bonobo-object.h>
 
Index: gnome-settings-daemon/gnome-settings-font.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-font.c,v
retrieving revision 1.7
diff -u -p -r1.7 gnome-settings-font.c
--- gnome-settings-daemon/gnome-settings-font.c	21 Oct 2004 19:41:26 -0000	1.7
+++ gnome-settings-daemon/gnome-settings-font.c	20 Apr 2005 18:36:36 -0000
@@ -1,8 +1,7 @@
 #include <config.h>
-#include <gdk/gdkx.h>
-#include <gconf/gconf.h>
-#include <libgnome/gnome-i18n.h>
+
 #include "gnome-settings-daemon.h"
+
 #include <dirent.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -10,6 +9,11 @@
 #include <dirent.h>
 #include <string.h>
 
+#include <glib/gi18n.h>
+#include <gdk/gdkx.h>
+#include <gtk/gtkmessagedialog.h>
+
+#include <gconf/gconf-client.h>
 
 static void
 load_xcursor_theme (GConfClient *client)
Index: gnome-settings-daemon/gnome-settings-font.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-font.h,v
retrieving revision 1.1
diff -u -p -r1.1 gnome-settings-font.h
--- gnome-settings-daemon/gnome-settings-font.h	20 Feb 2002 05:11:10 -0000	1.1
+++ gnome-settings-daemon/gnome-settings-font.h	20 Apr 2005 18:36:36 -0000
@@ -17,7 +17,7 @@
 #ifndef FONT_SETTINGS_H
 #define FONT_SETTINGS_H
 
-#include <gconf/gconf.h>
+#include <gconf/gconf-client.h>
 
 void gnome_settings_font_init (GConfClient *client);
 void gnome_settings_font_load (GConfClient *client);
Index: gnome-settings-daemon/gnome-settings-gtk1theme.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-gtk1theme.h,v
retrieving revision 1.1
diff -u -p -r1.1 gnome-settings-gtk1theme.h
--- gnome-settings-daemon/gnome-settings-gtk1theme.h	19 Aug 2002 19:14:21 -0000	1.1
+++ gnome-settings-daemon/gnome-settings-gtk1theme.h	20 Apr 2005 18:36:36 -0000
@@ -25,7 +25,6 @@
 #ifndef __GNOME_SETTINGS_GTK1THEME_H
 #define __GNOME_SETTINGS_GTK1THEME_H
 
-#include <gconf/gconf.h>
 #include <gconf/gconf-client.h>
 
 void gnome_settings_gtk1_theme_init (GConfClient *client);
Index: gnome-settings-daemon/gnome-settings-keybindings.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-keybindings.c,v
retrieving revision 1.9
diff -u -p -r1.9 gnome-settings-keybindings.c
--- gnome-settings-daemon/gnome-settings-keybindings.c	25 Dec 2004 14:32:12 -0000	1.9
+++ gnome-settings-daemon/gnome-settings-keybindings.c	20 Apr 2005 18:36:36 -0000
@@ -2,10 +2,10 @@
 
 #include <string.h>
 #include <X11/keysym.h>
+#include <glib/gi18n.h>
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
-#include <libgnome/gnome-i18n.h>
 #include "gnome-settings-daemon.h"
 #include "gnome-settings-keybindings.h"
 #include "eggaccelerators.h"
@@ -178,6 +178,7 @@ bindings_get_entry (char *subdir)
   char *gconf_key;
   char *action = NULL;
   char *key = NULL;
+  GConfClient *client = gconf_client_get_default();
   
   g_return_val_if_fail (subdir != NULL, FALSE);
   
@@ -188,7 +189,8 @@ bindings_get_entry (char *subdir)
     return FALSE;
 
   /* Get entries for this binding */
-  list = gconf_client_all_entries (gconf_client_get_default (), subdir, NULL);
+  list = gconf_client_all_entries (client, subdir, NULL);
+  g_object_unref (client);
 
   for (li = list; li != NULL; li = li->next)
     {
Index: gnome-settings-daemon/gnome-settings-keybindings.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-keybindings.h,v
retrieving revision 1.2
diff -u -p -r1.2 gnome-settings-keybindings.h
--- gnome-settings-daemon/gnome-settings-keybindings.h	13 Jan 2004 15:57:35 -0000	1.2
+++ gnome-settings-daemon/gnome-settings-keybindings.h	20 Apr 2005 18:36:36 -0000
@@ -24,7 +24,7 @@
 #ifndef __GNOME_SETTINGS_KEYBINDINGS_H__
 #define __GNOME_SETTINGS_KEYBINDINGS_H__
 
-#include <gconf/gconf.h>
+#include <gconf/gconf-client.h>
 void gnome_settings_keybindings_init (GConfClient *client);
 void gnome_settings_keybindings_load (GConfClient *client);
 
Index: gnome-settings-daemon/gnome-settings-keyboard-xkb.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-keyboard-xkb.c,v
retrieving revision 1.29
diff -u -p -r1.29 gnome-settings-keyboard-xkb.c
--- gnome-settings-daemon/gnome-settings-keyboard-xkb.c	28 Feb 2005 23:04:52 -0000	1.29
+++ gnome-settings-daemon/gnome-settings-keyboard-xkb.c	20 Apr 2005 18:36:36 -0000
@@ -26,7 +26,7 @@
 # include "config.h"
 #endif
 
-//#include <glib/gstrfuncs.h>
+#include <glib/gi18n.h>
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 #include <gconf/gconf-client.h>
@@ -34,8 +34,6 @@
 
 #include <string.h>
 #include <time.h>
-
-#include <libgnome/gnome-i18n.h>
 
 #include <libxklavier/xklavier.h>
 #include <libxklavier/xklavier_config.h>
Index: gnome-settings-daemon/gnome-settings-keyboard-xkb.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-keyboard-xkb.h,v
retrieving revision 1.2
diff -u -p -r1.2 gnome-settings-keyboard-xkb.h
--- gnome-settings-daemon/gnome-settings-keyboard-xkb.h	25 May 2004 17:36:44 -0000	1.2
+++ gnome-settings-daemon/gnome-settings-keyboard-xkb.h	20 Apr 2005 18:36:36 -0000
@@ -25,7 +25,6 @@
 #ifndef __GNOME_SETTINGS_KEYBOARD_XKB_H
 #define __GNOME_SETTINGS_KEYBOARD_XKB_H
 
-#include <gconf/gconf.h>
 #include <gconf/gconf-client.h>
 
 void gnome_settings_keyboard_xkb_init (GConfClient * client);
Index: gnome-settings-daemon/gnome-settings-keyboard.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-keyboard.c,v
retrieving revision 1.14
diff -u -p -r1.14 gnome-settings-keyboard.c
--- gnome-settings-daemon/gnome-settings-keyboard.c	21 Oct 2004 19:41:26 -0000	1.14
+++ gnome-settings-daemon/gnome-settings-keyboard.c	20 Apr 2005 18:36:36 -0000
@@ -106,6 +106,7 @@ apply_settings (void)
 	volume_string = gconf_client_get_string (client, "/desktop/gnome/peripherals/keyboard/bell_mode", NULL);
 	bell_volume   = (volume_string && !strcmp (volume_string, "on")) ? 50 : 0;
 	g_free (volume_string);
+	g_object_unref (client);
 
 	gdk_error_trap_push ();
         if (repeat) {
Index: gnome-settings-daemon/gnome-settings-keyboard.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-keyboard.h,v
retrieving revision 1.2
diff -u -p -r1.2 gnome-settings-keyboard.h
--- gnome-settings-daemon/gnome-settings-keyboard.h	4 Jan 2002 20:48:17 -0000	1.2
+++ gnome-settings-daemon/gnome-settings-keyboard.h	20 Apr 2005 18:36:36 -0000
@@ -25,7 +25,6 @@
 #ifndef __GNOME_SETTINGS_KEYBOARD_H
 #define __GNOME_SETTINGS_KEYBOARD_H
 
-#include <gconf/gconf.h>
 #include <gconf/gconf-client.h>
 
 void gnome_settings_keyboard_init (GConfClient *client);
Index: gnome-settings-daemon/gnome-settings-locate-pointer.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-locate-pointer.h,v
retrieving revision 1.2
diff -u -p -r1.2 gnome-settings-locate-pointer.h
--- gnome-settings-daemon/gnome-settings-locate-pointer.h	31 Jul 2003 18:27:44 -0000	1.2
+++ gnome-settings-daemon/gnome-settings-locate-pointer.h	20 Apr 2005 18:36:36 -0000
@@ -17,6 +17,8 @@
 #ifndef LOCATE_POINTER_H
 #define LOCATE_POINTER_H
 
+#include <gdk/gdkscreen.h>
+
 void gnome_settings_locate_pointer (GdkScreen *screen);
 
 #endif
Index: gnome-settings-daemon/gnome-settings-mouse.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-mouse.c,v
retrieving revision 1.14
diff -u -p -r1.14 gnome-settings-mouse.c
--- gnome-settings-daemon/gnome-settings-mouse.c	7 Jan 2005 13:24:56 -0000	1.14
+++ gnome-settings-daemon/gnome-settings-mouse.c	20 Apr 2005 18:36:36 -0000
@@ -1,10 +1,13 @@
+#include <string.h>
+#include <math.h>
+
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
-#include <gconf/gconf.h>
-#include <math.h>
 #include <gdk/gdkkeysyms.h>
 #include <X11/keysym.h>
-#include <string.h>
+
+#include <gconf/gconf-client.h>
+
 #include "gnome-settings-locate-pointer.h"
 #include "gnome-settings-daemon.h"
 
Index: gnome-settings-daemon/gnome-settings-multimedia-keys.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-multimedia-keys.c,v
retrieving revision 1.12
diff -u -p -r1.12 gnome-settings-multimedia-keys.c
--- gnome-settings-daemon/gnome-settings-multimedia-keys.c	17 Feb 2005 18:19:06 -0000	1.12
+++ gnome-settings-daemon/gnome-settings-multimedia-keys.c	20 Apr 2005 18:36:36 -0000
@@ -21,12 +21,18 @@
 
 #include <config.h>
 
+#include <string.h>
 #include <sys/file.h>
 #include <X11/X.h>
 
 /* Gnome headers */
+#include <glib/gi18n.h>
 #include <gdk/gdkx.h>
-#include <gnome.h>
+#include <gtk/gtkimage.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkmessagedialog.h>
+#include <gtk/gtkprogressbar.h>
+
 #include <glade/glade.h>
 #include <gconf/gconf-client.h>
 
Index: gnome-settings-daemon/gnome-settings-screensaver.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-screensaver.c,v
retrieving revision 1.2
diff -u -p -r1.2 gnome-settings-screensaver.c
--- gnome-settings-daemon/gnome-settings-screensaver.c	30 Apr 2002 09:45:05 -0000	1.2
+++ gnome-settings-daemon/gnome-settings-screensaver.c	20 Apr 2005 18:36:36 -0000
@@ -24,9 +24,10 @@
 
 #include <config.h>
 
-#include <libgnome/gnome-i18n.h>
 #include "gnome-settings-screensaver.h"
 
+#include <glib/gi18n.h>
+
 #include <gtk/gtkcheckbutton.h>
 #include <gtk/gtkbox.h>
 #include <gtk/gtkmessagedialog.h>
@@ -61,6 +62,7 @@ key_toggled_cb (GtkWidget *toggle, gpoin
 			       gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle))
 			       ? 0 : 1,
 			       NULL);
+	g_object_unref (client);
 }
 
 void
Index: gnome-settings-daemon/gnome-settings-sound.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-sound.c,v
retrieving revision 1.10
diff -u -p -r1.10 gnome-settings-sound.c
--- gnome-settings-daemon/gnome-settings-sound.c	8 Oct 2002 16:53:53 -0000	1.10
+++ gnome-settings-daemon/gnome-settings-sound.c	20 Apr 2005 18:36:36 -0000
@@ -29,13 +29,14 @@
 #include <string.h>
 #include <stdlib.h>
 #include <time.h>
-#include <esd.h>
 #include <sys/types.h>
 
+#include <glib/gi18n.h>
+
+#include <esd.h>
+
 #include <gconf/gconf-client.h>
-#include <libgnome/gnome-i18n.h>
 #include <libgnome/gnome-sound.h>
-#include <libgnome/gnome-util.h>
 #include <libgnome/gnome-exec.h>
 #include <libgnomeui/gnome-client.h>
 #include "libsounds/sound-properties.h"
Index: gnome-settings-daemon/gnome-settings-sound.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-sound.h,v
retrieving revision 1.3
diff -u -p -r1.3 gnome-settings-sound.h
--- gnome-settings-daemon/gnome-settings-sound.h	21 Apr 2002 21:21:11 -0000	1.3
+++ gnome-settings-daemon/gnome-settings-sound.h	20 Apr 2005 18:36:36 -0000
@@ -25,7 +25,7 @@
 #ifndef __GNOME_SETTINGS_SOUND_H__
 #define __GNOME_SETTINGS_SOUND_H__
 
-#include <gconf/gconf.h>
+#include <gconf/gconf-client.h>
 
 void gnome_settings_sound_init (GConfClient *client);
 void gnome_settings_sound_load (GConfClient *client);
Index: gnome-settings-daemon/gnome-settings-typing-break.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-typing-break.h,v
retrieving revision 1.1
diff -u -p -r1.1 gnome-settings-typing-break.h
--- gnome-settings-daemon/gnome-settings-typing-break.h	26 Jun 2003 11:40:08 -0000	1.1
+++ gnome-settings-daemon/gnome-settings-typing-break.h	20 Apr 2005 18:36:36 -0000
@@ -17,7 +17,7 @@
 #ifndef TYPING_BREAK_SETTINGS_H
 #define TYPING_BREAK_SETTINGS_H
 
-#include <gconf/gconf.h>
+#include <gconf/gconf-client.h>
 
 void gnome_settings_typing_break_init (GConfClient *client);
 void gnome_settings_typing_break_load (GConfClient *client);
Index: gnome-settings-daemon/gnome-settings-xmodmap.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-xmodmap.c,v
retrieving revision 1.1
diff -u -p -r1.1 gnome-settings-xmodmap.c
--- gnome-settings-daemon/gnome-settings-xmodmap.c	2 Feb 2005 00:59:51 -0000	1.1
+++ gnome-settings-daemon/gnome-settings-xmodmap.c	20 Apr 2005 18:36:36 -0000
@@ -20,13 +20,25 @@
  * 02111-1307, USA.
  */
 
+#include <config.h>
 
+#include "gnome-settings-xmodmap.h"
 
-#include <glade/glade.h>
-#include <gnome.h>
+#include <string.h>
+
+#include <glib.h>
+#include <gtk/gtkcellrenderertext.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkliststore.h>
+#include <gtk/gtktogglebutton.h>
+#include <gtk/gtktreeselection.h>
+#include <gtk/gtktreemodel.h>
+#include <gtk/gtktreemodelsort.h>
+#include <gtk/gtktreeview.h>
+#include <gtk/gtkwidget.h>
 #include <gconf/gconf-client.h>
-#include "gnome-settings-xmodmap.h"
-#include "config.h"
+
+#include <glade/glade.h>
 
 static const char DISABLE_XMM_WARNING_KEY[] =
     "/desktop/gnome/peripherals/keyboard/disable_xmm_and_xkb_warning";
@@ -48,7 +60,7 @@ check_button_callback (GtkWidget *chk_bu
 		gconf_client_set_bool (confClient, DISABLE_XMM_WARNING_KEY, FALSE,
 				       NULL);
 	}
-
+	g_object_unref (confClient);
 }
 
 void
@@ -65,6 +77,7 @@ gnome_settings_load_modmap_files ()
 		tmp = tmp->next;
 		g_free (command);
 	}
+	g_object_unref (confClient);
 }
 
 static void
@@ -336,6 +349,7 @@ gnome_settings_modmap_dialog_call (void)
 	gtk_tree_view_column_set_sort_column_id (column, 0);
 
 	loaded_files = gconf_client_get_list (confClient, LOADED_FILES_KEY, GCONF_VALUE_STRING, NULL);
+	g_object_unref (confClient);
 
 	/* Add the data */
 	tmp = loaded_files;
Index: gnome-settings-daemon/gnome-settings-xrdb.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-xrdb.c,v
retrieving revision 1.4
diff -u -p -r1.4 gnome-settings-xrdb.c
--- gnome-settings-daemon/gnome-settings-xrdb.c	28 Oct 2004 17:37:50 -0000	1.4
+++ gnome-settings-daemon/gnome-settings-xrdb.c	20 Apr 2005 18:36:36 -0000
@@ -25,7 +25,8 @@
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n.h>
+#include <gtk/gtkwindow.h>
 #include <gconf/gconf-client.h>
 
 #include "gnome-settings-daemon.h"
Index: gnome-settings-daemon/gnome-settings-xsettings.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-xsettings.c,v
retrieving revision 1.27
diff -u -p -r1.27 gnome-settings-xsettings.c
--- gnome-settings-daemon/gnome-settings-xsettings.c	21 Oct 2004 19:41:26 -0000	1.27
+++ gnome-settings-daemon/gnome-settings-xsettings.c	20 Apr 2005 18:36:36 -0000
@@ -1,9 +1,10 @@
 #include <config.h>
 #include <string.h>
 #include <stdio.h>
-#include <glib.h>
-#include <libgnome/gnome-i18n.h>
 #include <locale.h>
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <gconf/gconf-client.h>
 
 #include "gnome-settings-daemon.h"
 #include "gnome-settings-xsettings.h"
@@ -251,6 +252,7 @@ xft_callback (GConfEntry *entry)
   client = gconf_client_get_default ();
 
   gnome_settings_update_xft (client);
+  g_object_unref (client);
 
   for (i = 0; managers [i]; i++)  
     xsettings_manager_notify (managers [i]);
Index: libbackground/applier.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/libbackground/applier.c,v
retrieving revision 1.41
diff -u -p -r1.41 applier.c
--- libbackground/applier.c	28 Jun 2004 03:39:56 -0000	1.41
+++ libbackground/applier.c	20 Apr 2005 18:36:36 -0000
@@ -35,7 +35,6 @@
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
 #include <unistd.h>
-#include <bonobo.h>
 
 #include "applier.h"
 
Index: libbackground/applier.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/libbackground/applier.h,v
retrieving revision 1.6
diff -u -p -r1.6 applier.h
--- libbackground/applier.h	28 Jul 2002 19:09:02 -0000	1.6
+++ libbackground/applier.h	20 Apr 2005 18:36:36 -0000
@@ -28,7 +28,6 @@
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
 #include <X11/Xlib.h>
-#include <pthread.h>
 
 #include "preferences.h"
 
Index: libbackground/preferences.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/libbackground/preferences.c,v
retrieving revision 1.26
diff -u -p -r1.26 preferences.c
--- libbackground/preferences.c	19 Apr 2002 16:57:58 -0000	1.26
+++ libbackground/preferences.c	20 Apr 2005 18:36:36 -0000
@@ -26,9 +26,11 @@
 #endif
 
 #include <stdlib.h>
+#include <string.h>
 
-#include <gnome.h>
-#include <bonobo.h>
+#include <glib-object.h>
+#include <gdk/gdkcolor.h>
+#include <gdk/gdkrgb.h>
 
 #include "preferences.h"
 
@@ -274,6 +276,8 @@ bg_preferences_load (BGPreferences *pref
 	} else {
 	  prefs->wallpaper_enabled = TRUE;
 	}
+
+	g_object_unref (client);
 }
 
 /* Parse the event name given (the event being notification of a property having
@@ -439,10 +443,13 @@ bg_preferences_save (BGPreferences *pref
 {
 	GConfChangeSet *cs;
 	gchar *tmp;
+	GConfClient *client;
 	
 	g_return_if_fail (prefs != NULL);
 	g_return_if_fail (IS_BG_PREFERENCES (prefs));
 
+	client = gconf_client_get_default();
+	
 	cs = gconf_change_set_new ();
 	gconf_change_set_set_bool (cs, BG_PREFERENCES_DRAW_BACKGROUND, prefs->enabled);
 	if (prefs->wallpaper_enabled)
@@ -468,8 +475,9 @@ bg_preferences_save (BGPreferences *pref
 
 	gconf_change_set_set_string (cs, BG_PREFERENCES_COLOR_SHADING_TYPE, bg_preferences_get_orientation_as_string (prefs->orientation));
 
-	gconf_client_commit_change_set (gconf_client_get_default (), cs, TRUE, NULL);
+	gconf_client_commit_change_set (client, cs, TRUE, NULL);
 	gconf_change_set_unref (cs);
+	g_object_unref (client);
 }
 
 
Index: libsounds/sound-properties.c
===================================================================
RCS file: /cvs/gnome/libsounds/libsounds/sound-properties.c,v
retrieving revision 1.15
diff -u -p -r1.15 sound-properties.c
--- libsounds/sound-properties.c	14 Feb 2003 00:02:48 -0000	1.15
+++ libsounds/sound-properties.c	20 Apr 2005 18:36:36 -0000
@@ -1,12 +1,15 @@
-#include "sound-properties.h"
 #include <config.h>
-#include <gtk/gtk.h>
+#include "sound-properties.h"
 #include <string.h>
 #include <stdlib.h>
 /* opendir */
 #include <sys/types.h>
 #include <dirent.h>
-#include <libgnome/libgnome.h>
+
+#include <gtk/gtkobject.h>
+#include <libgnome/gnome-config.h>
+#include <libgnome/gnome-program.h>
+#include <libgnome/gnome-util.h>
 
 #define ensure_category(category) ((category && category[0]) ? category : "gnome-2")
 
Index: libsounds/sound-view.h
===================================================================
RCS file: /cvs/gnome/libsounds/libsounds/sound-view.h,v
retrieving revision 1.3
diff -u -p -r1.3 sound-view.h
--- libsounds/sound-view.h	5 Nov 2001 03:06:40 -0000	1.3
+++ libsounds/sound-view.h	20 Apr 2005 18:36:36 -0000
@@ -2,6 +2,7 @@
 #define __SOUND_VIEW_H__
 
 #include <gtk/gtkvbox.h>
+#include <gtk/gtkwidget.h>
 #include "sound-properties.h"
 
 #define SOUND_VIEW_TYPE			(sound_view_get_type ())
Index: libwindow-settings/gnome-wm-manager.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/libwindow-settings/gnome-wm-manager.c,v
retrieving revision 1.7
diff -u -p -r1.7 gnome-wm-manager.c
--- libwindow-settings/gnome-wm-manager.c	25 Dec 2004 14:40:07 -0000	1.7
+++ libwindow-settings/gnome-wm-manager.c	20 Apr 2005 18:36:36 -0000
@@ -29,10 +29,10 @@
 #include "gnome-wm-manager.h"
 
 #include <glib.h>
+#include <glib/gi18n.h>
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 #include <libgnome/gnome-util.h>
-#include <libgnome/gnome-i18n.h>
 
 #include <sys/types.h>
 #include <dirent.h>
Index: libwindow-settings/metacity-window-manager.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/libwindow-settings/metacity-window-manager.c,v
retrieving revision 1.4
diff -u -p -r1.4 metacity-window-manager.c
--- libwindow-settings/metacity-window-manager.c	2 May 2003 21:50:48 -0000	1.4
+++ libwindow-settings/metacity-window-manager.c	20 Apr 2005 18:36:36 -0000
@@ -27,8 +27,8 @@
 #include <sys/types.h>
 #include <dirent.h>
 #include <string.h>
+#include <glib/gi18n.h>
 #include <gconf/gconf-client.h>
-#include <libgnome/gnome-i18n.h>
 
 #include "metacity-window-manager.h"
 
Index: libwindow-settings/wm-exec.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/libwindow-settings/wm-exec.c,v
retrieving revision 1.2
diff -u -p -r1.2 wm-exec.c
--- libwindow-settings/wm-exec.c	29 Jan 2003 20:56:39 -0000	1.2
+++ libwindow-settings/wm-exec.c	20 Apr 2005 18:36:36 -0000
@@ -6,7 +6,6 @@
 
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
-#include <libgnome/libgnome.h>
 #include "wm-properties.h"
 
 typedef struct _RestartInfo RestartInfo;
Index: libwindow-settings/wm-list.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/libwindow-settings/wm-list.c,v
retrieving revision 1.2
diff -u -p -r1.2 wm-list.c
--- libwindow-settings/wm-list.c	29 Jan 2003 20:56:39 -0000	1.2
+++ libwindow-settings/wm-list.c	20 Apr 2005 18:36:36 -0000
@@ -9,7 +9,7 @@
 #include <dirent.h>
 #include <unistd.h>
 #include <ctype.h>
-#include <libgnome/libgnome.h>
+#include <libgnome/gnome-config.h>
 #include <gconf/gconf-client.h>
 #include <string.h>
 
Index: libwindow-settings/wm-properties.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/libwindow-settings/wm-properties.h,v
retrieving revision 1.1
diff -u -p -r1.1 wm-properties.h
--- libwindow-settings/wm-properties.h	3 Jun 2002 00:33:59 -0000	1.1
+++ libwindow-settings/wm-properties.h	20 Apr 2005 18:36:36 -0000
@@ -6,7 +6,6 @@
  */
 
 #include <gdk/gdk.h>
-#include <libgnome/libgnome.h>
 #include <libgnome/gnome-desktop-item.h>
 
 #include <libxml/tree.h>
Index: typing-break/drw-break-window.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/typing-break/drw-break-window.c,v
retrieving revision 1.7
diff -u -p -r1.7 drw-break-window.c
--- typing-break/drw-break-window.c	13 Oct 2004 23:39:47 -0000	1.7
+++ typing-break/drw-break-window.c	20 Apr 2005 18:36:36 -0000
@@ -23,10 +23,10 @@
 #include <config.h>
 #include <string.h>
 #include <math.h>
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 #include <gconf/gconf-client.h>
-#include <libgnome/gnome-i18n.h>
 #include "drwright.h"
 #include "drw-utils.h"
 #include "drw-break-window.h"
@@ -151,18 +151,21 @@ drw_break_window_init (DrwBreakWindow *w
 	GdkRectangle        monitor;
 	gint                right_padding;
 	gint                bottom_padding;
-
+	GConfClient	    *client;
 
         priv = g_new0 (DrwBreakWindowPriv, 1);
         window->priv = priv;
 
-	priv->break_time = 60 * gconf_client_get_int (gconf_client_get_default (),
+	client = gconf_client_get_default();
+
+	priv->break_time = 60 * gconf_client_get_int (client,
 						      GCONF_PATH "/break_time",
 						      NULL);
 	
-	allow_postpone = gconf_client_get_bool (gconf_client_get_default (),
+	allow_postpone = gconf_client_get_bool (client,
 					      GCONF_PATH "/allow_postpone",
 					      NULL);
+	g_object_unref (client);
 
 	GTK_WINDOW (window)->type = GTK_WINDOW_POPUP;
 
@@ -414,12 +417,14 @@ postpone_entry_activate_cb (GtkWidget   
 {
 	const gchar *str;
 	const gchar *phrase;
+	GConfClient *client = gconf_client_get_default();
 
 	str = gtk_entry_get_text (GTK_ENTRY (entry));
 
-	phrase = gconf_client_get_string (gconf_client_get_default (),
+	phrase = gconf_client_get_string (client,
 					  GCONF_PATH "/unlock_phrase",
 					  NULL);
+	g_object_unref (client);
 	
 	if (!strcmp (str, phrase)) {
 		g_signal_emit (window, signals[POSTPONE], 0, NULL);
Index: typing-break/drw-utils.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/typing-break/drw-utils.h,v
retrieving revision 1.1
diff -u -p -r1.1 drw-utils.h
--- typing-break/drw-utils.h	24 Aug 2003 16:29:20 -0000	1.1
+++ typing-break/drw-utils.h	20 Apr 2005 18:36:36 -0000
@@ -21,6 +21,8 @@
 #ifndef __DRW_UTILS_H__
 #define __DRW_UTILS_H__
 
+#include <gtk/gtkwidget.h>
+
 void drw_setup_background (GtkWidget *window);
 
 
Index: typing-break/drwright.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/typing-break/drwright.c,v
retrieving revision 1.11
diff -u -p -r1.11 drwright.c
--- typing-break/drwright.c	3 Feb 2005 23:23:59 -0000	1.11
+++ typing-break/drwright.c	20 Apr 2005 18:36:36 -0000
@@ -21,17 +21,22 @@
  */
 
 #include <config.h>
+
+#include "drwright.h"
+
 #include <time.h>
 #include <string.h>
 #include <math.h>
+
+#include <glib/gi18n.h>
 #include <gdk/gdk.h>
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 #include <libgnomeui/gnome-stock-icons.h>
 #include <libgnomeui/gnome-client.h>
-#include <libgnome/gnome-i18n.h>
+
 #include <gconf/gconf-client.h>
-#include "drwright.h"
+
 #include "drw-break-window.h"
 #include "drw-monitor.h"
 #include "drw-utils.h"
@@ -139,7 +144,6 @@ static GtkItemFactoryEntry popup_items[]
 	{ N_("/_Take a Break"), NULL, GIF_CB (popup_break_cb),       POPUP_ITEM_BREAK,   "<Item>",       NULL }
 };
 
-GConfClient *client = NULL;
 extern gboolean debug;
 
 static void
@@ -914,7 +918,8 @@ drwright_new (void)
 
         dr = g_new0 (DrWright, 1);
 
-	client = gconf_client_get_default ();
+
+	GConfClient *client = gconf_client_get_default ();
 	
 	gconf_client_add_dir (client,
 			      GCONF_PATH,
@@ -939,6 +944,8 @@ drwright_new (void)
 		client,
 		GCONF_PATH "/enabled",
 		NULL);
+
+	g_object_unref (client);
 
 	if (debug) {
 		setup_debug_values (dr);
Index: vfs-methods/fontilus/font-view.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/vfs-methods/fontilus/font-view.c,v
retrieving revision 1.20
diff -u -p -r1.20 font-view.c
--- vfs-methods/fontilus/font-view.c	10 Dec 2004 09:51:25 -0000	1.20
+++ vfs-methods/fontilus/font-view.c	20 Apr 2005 18:36:37 -0000
@@ -21,18 +21,6 @@
 #  include <config.h>
 #endif
 
-#ifdef ENABLE_NLS
-#  include <libintl.h>
-#  define _(String) gettext(String)
-#  define N_(String) gettext_noop(String)
-#else
-#  define _(String) (String)
-#  define N_(String) (String)
-#  define textdomain(String) (String)
-#  define bindtextdomain(Domain,Directory) (Domain)
-#  define bind_textdomain_codeset(Domain,Codeset) (Domain)
-#endif
-
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_TYPE1_TABLES_H
@@ -40,11 +28,13 @@
 #include FT_TRUETYPE_IDS_H
 #include <X11/Xlib.h>
 #include <X11/Xft/Xft.h>
+
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
 #include <libgnomevfs/gnome-vfs.h>
 #include <libgnomevfs/gnome-vfs-mime-handlers.h>
-#include <libgnomeui/libgnomeui.h>
+#include <libgnomeui/gnome-icon-lookup.h>
 
 FT_Error FT_New_Face_From_URI(FT_Library library,
 			      const gchar *uri,
Index: vfs-methods/themus/themus-theme-applier.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/vfs-methods/themus/themus-theme-applier.c,v
retrieving revision 1.5
diff -u -p -r1.5 themus-theme-applier.c
--- vfs-methods/themus/themus-theme-applier.c	25 Dec 2004 14:37:57 -0000	1.5
+++ vfs-methods/themus/themus-theme-applier.c	20 Apr 2005 18:36:37 -0000
@@ -19,9 +19,11 @@
 
 #include <stdlib.h>
 
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <glade/glade.h>
-#include <libgnome/libgnome.h>
+#include <libgnome/gnome-init.h>
+#include <libgnome/gnome-program.h>
 #include <libgnomevfs/gnome-vfs.h>
 #include <gconf/gconf-client.h>
 
@@ -34,7 +36,6 @@ int main (int argc, char **argv)
 {
 	GnomeVFSURI *uri;
 	GnomeThemeMetaInfo *theme;
-	GConfClient *client;
 	GnomeProgram *program;
 	GladeXML *font_xml;
 	GtkWidget *font_dialog;
@@ -90,8 +91,9 @@ int main (int argc, char **argv)
 	gnome_meta_theme_set (theme);
 			
 	if (apply_font) {
-		client = gconf_client_get_default ();
+		GConfClient *client = gconf_client_get_default ();
 		gconf_client_set_string (client, FONT_KEY, theme->application_font, NULL);
+		g_object_unref (client);
 	}
 		
 	return 0;


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