[nautilus/gtk3-breakage] application: remove get_n_windows()



commit 8495b23904218dbed311a9586806d92e8b300087
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Oct 27 15:05:39 2010 +0200

    application: remove get_n_windows()

 src/nautilus-application.c         |    7 -------
 src/nautilus-application.h         |    1 -
 src/nautilus-window-manage-views.c |    2 +-
 3 files changed, 1 insertions(+), 9 deletions(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index fc1e5fc..7217768 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -119,13 +119,6 @@ nautilus_application_get_spatial_window_list (void)
 	return nautilus_application_spatial_window_list;
 }
 
-guint
-nautilus_application_get_n_windows (NautilusApplication *self)
-{
-	return g_list_length (gtk_application_get_windows (GTK_APPLICATION (self))) +
-	       g_list_length (nautilus_application_desktop_windows);
-}
-
 static void
 startup_volume_mount_cb (GObject *source_object,
 			 GAsyncResult *res,
diff --git a/src/nautilus-application.h b/src/nautilus-application.h
index 3e8e88d..dfe8f1c 100644
--- a/src/nautilus-application.h
+++ b/src/nautilus-application.h
@@ -74,7 +74,6 @@ GType nautilus_application_get_type (void);
 
 NautilusApplication *nautilus_application_dup_singleton (void);
 
-guint nautilus_application_get_n_windows (NautilusApplication *self);
 NautilusWindow *     nautilus_application_get_spatial_window     (NautilusApplication *application,
 								  NautilusWindow      *requesting_window,
 								  const char          *startup_id,
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index a294e54..f93fc56 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -1186,7 +1186,7 @@ got_file_info_for_view_selection_callback (NautilusFile *file,
 
 			app = nautilus_application_dup_singleton ();
 			
-			if (nautilus_application_get_n_windows (app) == 1) {
+			if (g_list_length (gtk_application_get_windows (GTK_APPLICATION (app))) == 1) {
 				/* the user could have typed in a home directory that doesn't exist,
 				   in which case going home would cause an infinite loop, so we
 				   better test for that */



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