[nautilus] application: remove 'exit-with-last-window' preference



commit 9ef4ac9ee428e7f7952efe33d0784d547ca7bdc6
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Dec 13 19:52:57 2010 +0100

    application: remove 'exit-with-last-window' preference
    
    It makes no sense now that nautilus doesn't do session services such as
    autorun anymore.

 src/nautilus-application.c |   23 ++---------------------
 1 files changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 29d4a45..0541156 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -673,15 +673,10 @@ nautilus_application_create_desktop_windows (NautilusApplication *application)
 	NautilusDesktopWindow *window;
 	GtkWidget *selection_widget;
 	int screens, i;
-	gboolean exit_with_last_window;
 
 	display = gdk_display_get_default ();
 	screens = gdk_display_get_n_screens (display);
 
-	exit_with_last_window =
-		g_settings_get_boolean (nautilus_preferences,
-					NAUTILUS_PREFERENCES_EXIT_WITH_LAST_WINDOW);
-
 	for (i = 0; i < screens; i++) {
 
 		DEBUG ("Creating a desktop window for screen %d", i);
@@ -706,13 +701,8 @@ nautilus_application_create_desktop_windows (NautilusApplication *application)
 			nautilus_application_desktop_windows =
 				g_list_prepend (nautilus_application_desktop_windows, window);
 
-			/* don't add the desktop windows to the GtkApplication hold toplevels
-			 * if we should exit when the last window is closed.
-			 */
-			if (!exit_with_last_window) {
-				gtk_application_add_window (GTK_APPLICATION (application),
-							    GTK_WINDOW (window));
-			}
+			gtk_application_add_window (GTK_APPLICATION (application),
+						    GTK_WINDOW (window));
 		}
 	}
 }
@@ -1339,7 +1329,6 @@ nautilus_application_command_line (GApplication *app,
 	gint argc = 0;
 	gchar **argv = NULL, **uris = NULL;
 	gint retval = EXIT_SUCCESS;
-	gboolean exit_with_last_window;
 
 	context = g_option_context_new (_("\n\nBrowse the file system with the file manager"));
 	g_option_context_add_main_entries (context, options, NULL);
@@ -1429,10 +1418,6 @@ nautilus_application_command_line (GApplication *app,
 	       "self checks %d, no_desktop %d",
 	       no_default_window, browser_window, kill_shell, perform_self_check, no_desktop);
 
-	exit_with_last_window =
-		g_settings_get_boolean (nautilus_preferences,
-					NAUTILUS_PREFERENCES_EXIT_WITH_LAST_WINDOW);
-
 	if (kill_shell) {
 		nautilus_application_quit (self);
 	} else {
@@ -1449,10 +1434,6 @@ nautilus_application_command_line (GApplication *app,
 				nautilus_application_open_desktop (self);
 			}
 
-			if (!exit_with_last_window) {
-				g_application_hold (app);
-			}
-
 			finish_startup (self, no_desktop);
 
 			/* Monitor the preference to show or hide the desktop */



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