[patch] removing a couple of gconf keys



hi

	i have been looking at bug 91543, i went and removed the key, while i
was at it i also removed the show_desktop key, as i understand it
nautilus is now part of the core and i would think that almost nobody
runs nautilus without having it draw the desktop(this option has been
removed from the preferences when the new dialog was integrated).

	i guess this patch will need to be discussed.

Diego

Index: libnautilus-private/nautilus-global-preferences.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-global-preferences.c,v
retrieving revision 1.205
diff -u -r1.205 nautilus-global-preferences.c
--- libnautilus-private/nautilus-global-preferences.c	5 Nov 2002 18:34:24 -0000	1.205
+++ libnautilus-private/nautilus-global-preferences.c	14 Nov 2002 14:32:01 -0000
@@ -378,10 +378,6 @@
 	  PREFERENCE_BOOLEAN,
 	  GINT_TO_POINTER (FALSE)
 	},
-	{ NAUTILUS_PREFERENCES_SHOW_DESKTOP,
-	  PREFERENCE_BOOLEAN,
-	  GINT_TO_POINTER (TRUE)
-	},
 	{ NAUTILUS_PREFERENCES_DESKTOP_IS_HOME_DIR,
 	  PREFERENCE_BOOLEAN,
 	  GINT_TO_POINTER (FALSE)
@@ -490,12 +486,6 @@
 	  "small",
 	  NULL, NULL,
 	  "default_zoom_level"
-	},
-
-	/* non-visible preferences */
-	{ NAUTILUS_PREFERENCES_ADD_TO_SESSION,
-	  PREFERENCE_BOOLEAN,
-	  GINT_TO_POINTER (TRUE)
 	},
 
 	{ NULL }
Index: libnautilus-private/nautilus-global-preferences.h
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-global-preferences.h,v
retrieving revision 1.115
diff -u -r1.115 nautilus-global-preferences.h
--- libnautilus-private/nautilus-global-preferences.h	31 Oct 2002 22:38:46 -0000	1.115
+++ libnautilus-private/nautilus-global-preferences.h	14 Nov 2002 14:32:01 -0000
@@ -54,7 +54,6 @@
 #define NAUTILUS_PREFERENCES_ENABLE_DELETE			"preferences/enable_delete"
 
 /* Desktop options */
-#define NAUTILUS_PREFERENCES_SHOW_DESKTOP			"preferences/show_desktop"
 #define NAUTILUS_PREFERENCES_DESKTOP_IS_HOME_DIR                "preferences/desktop_is_home_dir"
 #define NAUTILUS_PREFERENCES_DESKTOP_FONT			"preferences/desktop_font"
 
@@ -162,9 +161,6 @@
 	NAUTILUS_COMPLEX_SEARCH_BAR,
 	NAUTILUS_SIMPLE_SEARCH_BAR
 } NautilusSearchBarMode;
-
-/* Gnome session management */
-#define NAUTILUS_PREFERENCES_ADD_TO_SESSION		   "preferences/add_to_session"
 
 void nautilus_global_preferences_init                      (void);
 void nautilus_global_preferences_init_with_folder_browsing (void);
Index: src/nautilus-application.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-application.c,v
retrieving revision 1.197
diff -u -r1.197 nautilus-application.c
--- src/nautilus-application.c	2 Oct 2002 05:36:51 -0000	1.197
+++ src/nautilus-application.c	14 Nov 2002 14:32:02 -0000
@@ -83,7 +83,6 @@
 static GList *nautilus_application_window_list;
 
 static gboolean need_to_show_first_time_druid     (void);
-static void     desktop_changed_callback          (gpointer                  user_data);
 static void     desktop_location_changed_callback (gpointer                  user_data);
 static void     volume_mounted_callback           (NautilusVolumeMonitor    *monitor,
 						   NautilusVolume           *volume,
@@ -91,7 +90,6 @@
 static void     volume_unmounted_callback         (NautilusVolumeMonitor    *monitor,
 						   NautilusVolume           *volume,
 						   NautilusApplication      *application);
-static void     update_session                    (gpointer                  callback_data);
 static void     init_session                      (void);
 static gboolean is_kdesktop_present               (void);
 
@@ -528,16 +526,10 @@
 			no_desktop = TRUE;
 		}
 		
-		if (!no_desktop && eel_preferences_get_boolean (NAUTILUS_PREFERENCES_SHOW_DESKTOP)) {
+		if (!no_desktop) {
 			Nautilus_Shell_start_desktop (shell, &ev);
 		}
 		
-		/* Monitor the preference to show or hide the desktop */
-		eel_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_SHOW_DESKTOP,
-							  desktop_changed_callback,
-							  application,
-							  G_OBJECT (application));
-
 		/* Monitor the preference to have the desktop */
 		/* point to the Unix home folder */
 		eel_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_DESKTOP_IS_HOME_DIR,
@@ -780,25 +772,6 @@
 	}
 }
 
-/* callback for showing or hiding the desktop based on the user's preference */
-static void
-desktop_changed_callback (gpointer user_data)
-{
-	NautilusApplication *application;
-	
-	application = NAUTILUS_APPLICATION (user_data);
-	if ( eel_preferences_get_boolean (NAUTILUS_PREFERENCES_SHOW_DESKTOP)) {
-		nautilus_application_open_desktop (application);
-	} else {
-		nautilus_application_close_desktop ();
-	}
-
-	/* Can't make this function just watch the preference
-	 * itself changing since ordering is important
-	 */
-	update_session (gnome_master_client ());
-}
-
 /*
  * need_to_show_first_time_druid
  *
@@ -1013,18 +986,6 @@
 }
 
 static void
-update_session (gpointer callback_data)
-{
-	set_session_restart (callback_data,
-			     eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ADD_TO_SESSION)
-			     /* Only ever add ourselves to the session
-			      * if we have a desktop window. Prevents the
-			      * session thrashing that's seen otherwise
-			      */
-			     && nautilus_application_desktop_windows != NULL);
-}
-
-static void
 init_session (void)
 {
 	GnomeClient *client;
@@ -1037,11 +998,8 @@
 	g_signal_connect (client, "die",
 			  G_CALLBACK (removed_from_session), NULL);
 	
-	eel_preferences_add_callback
-		(NAUTILUS_PREFERENCES_ADD_TO_SESSION,
-		 update_session, client);
-
-	update_session (client);
+	set_session_restart (client, 
+			     nautilus_application_desktop_windows != NULL);
 }
 
 #ifdef UGLY_HACK_TO_DETECT_KDE
Index: src/nautilus-main.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-main.c,v
retrieving revision 1.128
diff -u -r1.128 nautilus-main.c
--- src/nautilus-main.c	10 Jul 2002 10:19:34 -0000	1.128
+++ src/nautilus-main.c	14 Nov 2002 14:32:02 -0000
@@ -227,8 +227,6 @@
 	nautilus_global_preferences_init_with_folder_browsing ();
 	if (no_desktop) {
 		eel_preferences_set_is_invisible
-			(NAUTILUS_PREFERENCES_SHOW_DESKTOP, TRUE);
-		eel_preferences_set_is_invisible
 			(NAUTILUS_PREFERENCES_DESKTOP_IS_HOME_DIR, TRUE);
 	}
 	

Attachment: signature.asc
Description: This is a digitally signed message part



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