[nautilus] application: remove unused code



commit 7d7d92a315a3e233c61a0073ee7801594b8b70a4
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Apr 25 13:19:41 2012 -0400

    application: remove unused code
    
    Just activate the GAction when the menu item is clicked.

 src/nautilus-application.c  |   16 ----------------
 src/nautilus-application.h  |    2 --
 src/nautilus-window-menus.c |    3 ++-
 3 files changed, 2 insertions(+), 19 deletions(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 7795024..6ae188d 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -441,22 +441,6 @@ nautilus_application_close_desktop (void)
 	}
 }
 
-void
-nautilus_application_close_all_windows (NautilusApplication *self)
-{
-	GList *list_copy;
-	GList *l;
-	
-	list_copy = g_list_copy (gtk_application_get_windows (GTK_APPLICATION (self)));
-	for (l = list_copy; l != NULL; l = l->next) {
-		NautilusWindow *window;
-		
-		window = NAUTILUS_WINDOW (l->data);
-		nautilus_window_close (window);
-	}
-	g_list_free (list_copy);
-}
-
 static gboolean
 another_navigation_window_already_showing (NautilusApplication *application,
 					   NautilusWindow *the_window)
diff --git a/src/nautilus-application.h b/src/nautilus-application.h
index 53b5897..7a979df 100644
--- a/src/nautilus-application.h
+++ b/src/nautilus-application.h
@@ -73,6 +73,4 @@ void nautilus_application_open_location (NautilusApplication *application,
 					 GFile *selection,
 					 const char *startup_id);
 
-void nautilus_application_close_all_windows (NautilusApplication *self);
-
 #endif /* __NAUTILUS_APPLICATION_H__ */
diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c
index c2ce9d0..4fd0217 100644
--- a/src/nautilus-window-menus.c
+++ b/src/nautilus-window-menus.c
@@ -440,7 +440,8 @@ static void
 action_close_all_windows_callback (GtkAction *action, 
 				   gpointer user_data)
 {
-	nautilus_application_close_all_windows (nautilus_application_get_singleton ());
+	g_action_group_activate_action (G_ACTION_GROUP (g_application_get_default ()),
+					"quit", NULL);
 }
 
 static void



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