[nautilus] Remove the statusbar



commit 676b96d2b7d91cc579bbac6e44d9aafc100e67a2
Author: William Jon McCann <jmccann redhat com>
Date:   Fri May 25 13:23:08 2012 -0400

    Remove the statusbar
    
    We use a floating status bar now.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=676840

 libnautilus-private/nautilus-global-preferences.h  |    1 -
 libnautilus-private/nautilus.convert               |    1 -
 .../org.gnome.nautilus.gschema.xml.in              |    5 --
 src/nautilus-actions.h                             |    1 -
 src/nautilus-desktop-window.c                      |    1 -
 src/nautilus-shell-ui.xml                          |    1 -
 src/nautilus-tree-sidebar.c                        |   22 +-------
 src/nautilus-view.c                                |    4 -
 src/nautilus-window-menus.c                        |   61 --------------------
 src/nautilus-window-private.h                      |    1 -
 src/nautilus-window-slot.c                         |   15 +-----
 src/nautilus-window.c                              |   31 ----------
 src/nautilus-window.h                              |    2 -
 13 files changed, 2 insertions(+), 144 deletions(-)
---
diff --git a/libnautilus-private/nautilus-global-preferences.h b/libnautilus-private/nautilus-global-preferences.h
index 716328d..92eb6d4 100644
--- a/libnautilus-private/nautilus-global-preferences.h
+++ b/libnautilus-private/nautilus-global-preferences.h
@@ -77,7 +77,6 @@ typedef enum
 #define NAUTILUS_PREFERENCES_ALWAYS_USE_LOCATION_ENTRY		"always-use-location-entry"
 
 /* Which views should be displayed for new windows */
-#define NAUTILUS_WINDOW_STATE_START_WITH_STATUS_BAR		"start-with-status-bar"
 #define NAUTILUS_WINDOW_STATE_START_WITH_SIDEBAR		"start-with-sidebar"
 #define NAUTILUS_WINDOW_STATE_SIDE_PANE_VIEW                    "side-pane-view"
 #define NAUTILUS_WINDOW_STATE_GEOMETRY				"geometry"
diff --git a/libnautilus-private/nautilus.convert b/libnautilus-private/nautilus.convert
index ab3f96b..41603d5 100644
--- a/libnautilus-private/nautilus.convert
+++ b/libnautilus-private/nautilus.convert
@@ -59,6 +59,5 @@ geometry = /apps/nautilus/preferences/navigation_window_saved_geometry
 maximized = /apps/nautilus/preferences/navigation_window_saved_maximized
 sidebar-width = /apps/nautilus/preferences/sidebar_width
 start-with-location-bar = /apps/nautilus/preferences/start_with_location_bar
-start-with-status-bar = /apps/nautilus/preferences/start_with_status_bar
 start-with-sidebar = /apps/nautilus/preferences/start_with_sidebar
 side-pane-view = /apps/nautilus/preferences/side_pane_view
diff --git a/libnautilus-private/org.gnome.nautilus.gschema.xml.in b/libnautilus-private/org.gnome.nautilus.gschema.xml.in
index f1f18c5..846d880 100644
--- a/libnautilus-private/org.gnome.nautilus.gschema.xml.in
+++ b/libnautilus-private/org.gnome.nautilus.gschema.xml.in
@@ -372,11 +372,6 @@
       <_summary>Show location bar in new windows</_summary>
       <_description>If set to true, newly opened windows will have the location bar visible.</_description>
     </key>
-    <key name="start-with-status-bar" type="b">
-      <default>false</default>
-      <_summary>Show status bar in new windows</_summary>
-      <_description>If set to true, newly opened windows will have the status bar visible.</_description>
-    </key>
     <key name="start-with-sidebar" type="b">
       <default>true</default>
       <_summary>Show side pane in new windows</_summary>
diff --git a/src/nautilus-actions.h b/src/nautilus-actions.h
index c6a5b4f..72d2627 100644
--- a/src/nautilus-actions.h
+++ b/src/nautilus-actions.h
@@ -34,7 +34,6 @@
 #define NAUTILUS_ACTION_UP_ACCEL "UpAccel"
 #define NAUTILUS_ACTION_FORWARD "Forward"
 #define NAUTILUS_ACTION_SHOW_HIDE_SIDEBAR "Show Hide Sidebar"
-#define NAUTILUS_ACTION_SHOW_HIDE_STATUSBAR "Show Hide Statusbar"
 #define NAUTILUS_ACTION_SHOW_HIDE_LOCATION_BAR "Show Hide Location Bar"
 #define NAUTILUS_ACTION_SHOW_HIDE_EXTRA_PANE "Show Hide Extra Pane"
 #define NAUTILUS_ACTION_GO_TO_BURN_CD "Go to Burn CD"
diff --git a/src/nautilus-desktop-window.c b/src/nautilus-desktop-window.c
index abead5f..db68816 100644
--- a/src/nautilus-desktop-window.c
+++ b/src/nautilus-desktop-window.c
@@ -73,7 +73,6 @@ nautilus_desktop_window_constructed (GObject *obj)
 
 	G_OBJECT_CLASS (nautilus_desktop_window_parent_class)->constructed (obj);
 	
-	gtk_widget_hide (nwindow->details->statusbar);
 	gtk_widget_hide (nwindow->details->menubar);
 
 	action_group = nautilus_window_get_main_action_group (nwindow);
diff --git a/src/nautilus-shell-ui.xml b/src/nautilus-shell-ui.xml
index ed927ad..325756a 100644
--- a/src/nautilus-shell-ui.xml
+++ b/src/nautilus-shell-ui.xml
@@ -63,7 +63,6 @@
 				<separator/>
 				<menuitem name="Show Hide Sidebar" action="Show Hide Sidebar"/>
 			</menu>
-			<menuitem name="Show Hide Statusbar" action="Show Hide Statusbar"/>
 			<menuitem name="Show Hide Extra Pane" action="Show Hide Extra Pane"/>
 		</placeholder>
 		<separator/>
diff --git a/src/nautilus-tree-sidebar.c b/src/nautilus-tree-sidebar.c
index a93e4aa..986c373 100644
--- a/src/nautilus-tree-sidebar.c
+++ b/src/nautilus-tree-sidebar.c
@@ -880,7 +880,6 @@ static void
 copy_or_cut_files (FMTreeView *view,
 		   gboolean cut)
 {
-	char *status_string, *name;
 	NautilusClipboardInfo info;
         GtkTargetList *target_list;
         GtkTargetEntry *targets;
@@ -906,22 +905,6 @@ copy_or_cut_files (FMTreeView *view,
 	nautilus_clipboard_monitor_set_clipboard_info (nautilus_clipboard_monitor_get (),
 	                                               &info);
 	g_list_free (info.files);
-
-	name = nautilus_file_get_display_name (view->details->popup_file);
-	if (cut) {
-		status_string = g_strdup_printf (_("\"%s\" will be moved "
-						   "if you select the Paste command"),
-						 name);
-	} else {
-		status_string = g_strdup_printf (_("\"%s\" will be copied "
-						   "if you select the Paste command"),
-						 name);
-	}
-	g_free (name);
-	
-	nautilus_window_push_status (view->details->window,
-					  status_string);
-	g_free (status_string);
 }
 
 static void
@@ -950,10 +933,7 @@ paste_clipboard_data (FMTreeView *view,
 	item_uris = nautilus_clipboard_get_uri_list_from_selection_data (selection_data, &cut,
 									 copied_files_atom);
 
-	if (item_uris == NULL|| destination_uri == NULL) {
-		nautilus_window_push_status (view->details->window,
-						  _("There is nothing on the clipboard to paste."));
-	} else {
+	if (item_uris != NULL && destination_uri != NULL) {
 		nautilus_file_operations_copy_move
 			(item_uris, NULL, destination_uri,
 			 cut ? GDK_ACTION_MOVE : GDK_ACTION_COPY,
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 5db4608..55e2015 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -2678,10 +2678,6 @@ nautilus_view_init (NautilusView *view)
 				  "changed::" NAUTILUS_PREFERENCES_LOCKDOWN_COMMAND_LINE,
 				  G_CALLBACK (schedule_update_menus), view);
 
-	g_signal_connect_swapped (nautilus_window_state,
-				  "changed::" NAUTILUS_WINDOW_STATE_START_WITH_STATUS_BAR,
-				  G_CALLBACK (nautilus_view_display_selection_info), view);
-				  
 	manager = nautilus_file_undo_manager_get ();
 	g_signal_connect_object (manager, "undo-changed",
 				 G_CALLBACK (undo_manager_changed_cb), view, 0);				  
diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c
index 8546f73..1a76fd8 100644
--- a/src/nautilus-window-menus.c
+++ b/src/nautilus-window-menus.c
@@ -349,46 +349,6 @@ action_nautilus_manual_callback (GtkAction *action,
 }
 
 static void
-menu_item_select_cb (GtkMenuItem *proxy,
-		     NautilusWindow *window)
-{
-	GtkAction *action;
-	char *message;
-
-	action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (proxy));
-	g_return_if_fail (action != NULL);
-	
-	g_object_get (G_OBJECT (action), "tooltip", &message, NULL);
-	if (message) {
-		gtk_statusbar_push (GTK_STATUSBAR (window->details->statusbar),
-				    window->details->help_message_cid, message);
-		g_free (message);
-	}
-}
-
-static void
-menu_item_deselect_cb (GtkMenuItem *proxy,
-		       NautilusWindow *window)
-{
-	gtk_statusbar_pop (GTK_STATUSBAR (window->details->statusbar),
-			   window->details->help_message_cid);
-}
-
-static void
-disconnect_proxy_cb (GtkUIManager *manager,
-		     GtkAction *action,
-		     GtkWidget *proxy,
-		     NautilusWindow *window)
-{
-	if (GTK_IS_MENU_ITEM (proxy)) {
-		g_signal_handlers_disconnect_by_func
-			(proxy, G_CALLBACK (menu_item_select_cb), window);
-		g_signal_handlers_disconnect_by_func
-			(proxy, G_CALLBACK (menu_item_deselect_cb), window);
-	}
-}
-
-static void
 trash_state_changed_cb (NautilusTrashMonitor *monitor,
 			gboolean state,
 			NautilusWindow *window)
@@ -630,11 +590,6 @@ connect_proxy_cb (GtkActionGroup *action_group,
 
 	gtk_label_set_ellipsize (label, PANGO_ELLIPSIZE_END);
 	gtk_label_set_max_width_chars (label, MENU_ITEM_MAX_WIDTH_CHARS);
-
-	g_signal_connect (proxy, "select",
-			  G_CALLBACK (menu_item_select_cb), window);
-	g_signal_connect (proxy, "deselect",
-			  G_CALLBACK (menu_item_deselect_cb), window);
 }
 
 static const char* icon_entries[] = {
@@ -940,11 +895,6 @@ static const GtkToggleActionEntry main_toggle_entries[] = {
   /* tooltip */              N_("Change the visibility of this window's side pane"),
                              G_CALLBACK (action_show_hide_sidebar_callback),
   /* is_active */            TRUE }, 
-  /* name, stock id */     { "Show Hide Statusbar", NULL,
-  /* label, accelerator */   N_("St_atusbar"), NULL,
-  /* tooltip */              N_("Change the visibility of this window's statusbar"),
-                             NULL,
-  /* is_active */            TRUE },
   /* name, stock id */     { "Search", "edit-find-symbolic",
   /* label, accelerator */   N_("_Search for Files..."), "<control>f",
   /* tooltip */              N_("Search documents and folders by name"),
@@ -1046,15 +996,6 @@ window_menus_set_bindings (NautilusWindow *window)
 	action_group = nautilus_window_get_main_action_group (window);
 
 	action = gtk_action_group_get_action (action_group,
-					      NAUTILUS_ACTION_SHOW_HIDE_STATUSBAR);
-
-	g_settings_bind (nautilus_window_state,
-			 NAUTILUS_WINDOW_STATE_START_WITH_STATUS_BAR,
-			 action,
-			 "active",
-			 G_SETTINGS_BIND_DEFAULT);
-
-	action = gtk_action_group_get_action (action_group,
 					      NAUTILUS_ACTION_SHOW_HIDE_SIDEBAR);	
 
 	g_settings_bind (nautilus_window_state,
@@ -1192,8 +1133,6 @@ nautilus_window_initialize_menus (NautilusWindow *window)
 	
 	g_signal_connect (ui_manager, "connect_proxy",
 			  G_CALLBACK (connect_proxy_cb), window);
-	g_signal_connect (ui_manager, "disconnect_proxy",
-			  G_CALLBACK (disconnect_proxy_cb), window);
 
 	/* add the UI */
 	gtk_ui_manager_add_ui_from_resource (ui_manager, "/org/gnome/nautilus/nautilus-shell-ui.xml", NULL);
diff --git a/src/nautilus-window-private.h b/src/nautilus-window-private.h
index ef7b26b..ffbb6d4 100644
--- a/src/nautilus-window-private.h
+++ b/src/nautilus-window-private.h
@@ -39,7 +39,6 @@
 /* FIXME bugzilla.gnome.org 42575: Migrate more fields into here. */
 struct NautilusWindowDetails
 {
-        GtkWidget *statusbar;
         GtkWidget *menubar;
         
         GtkUIManager *ui_manager;
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 7644056..e859a3b 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -139,7 +139,6 @@ real_active (NautilusWindowSlot *slot)
 	gtk_notebook_set_current_page (GTK_NOTEBOOK (pane->notebook), page_num);
 
 	/* sync window to new slot */
-	nautilus_window_push_status (window, slot->status_text);
 	nautilus_window_sync_allow_stop (window, slot);
 	nautilus_window_sync_title (window, slot);
 	nautilus_window_sync_zoom_widgets (window);
@@ -469,22 +468,17 @@ static void
 real_slot_set_short_status (NautilusWindowSlot *slot,
 			    const gchar *status)
 {
-	
-	gboolean show_statusbar;
 	gboolean disable_chrome;
 
 	nautilus_floating_bar_cleanup_actions (NAUTILUS_FLOATING_BAR (slot->floating_bar));
 	nautilus_floating_bar_set_show_spinner (NAUTILUS_FLOATING_BAR (slot->floating_bar),
 						FALSE);
 
-	show_statusbar = g_settings_get_boolean (nautilus_window_state,
-						 NAUTILUS_WINDOW_STATE_START_WITH_STATUS_BAR);
-
 	g_object_get (nautilus_window_slot_get_window (slot),
 		      "disable-chrome", &disable_chrome,
 		      NULL);
 
-	if (status == NULL || show_statusbar || disable_chrome) {
+	if (status == NULL || disable_chrome) {
 		gtk_widget_hide (slot->floating_bar);
 		return;
 	}
@@ -558,8 +552,6 @@ nautilus_window_slot_set_status (NautilusWindowSlot *slot,
 				 const char *status,
 				 const char *short_status)
 {
-	NautilusWindow *window;
-
 	g_assert (NAUTILUS_IS_WINDOW_SLOT (slot));
 
 	g_free (slot->status_text);
@@ -568,11 +560,6 @@ nautilus_window_slot_set_status (NautilusWindowSlot *slot,
 	if (slot->content_view != NULL) {
 		set_floating_bar_status (slot, short_status);
 	}
-
-	window = nautilus_window_slot_get_window (slot);
-	if (slot == nautilus_window_get_active_slot (window)) {
-		nautilus_window_push_status (window, slot->status_text);
-	}
 }
 
 /* nautilus_window_slot_update_query_editor:
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index a46c43d..10957d6 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -147,20 +147,6 @@ static const struct {
 };
 
 void
-nautilus_window_push_status (NautilusWindow *window,
-			     const char *text)
-{
-	g_return_if_fail (NAUTILUS_IS_WINDOW (window));
-
-	/* clear any previous message, underflow is allowed */
-	gtk_statusbar_pop (GTK_STATUSBAR (window->details->statusbar), 0);
-
-	if (text != NULL && text[0] != '\0') {
-		gtk_statusbar_push (GTK_STATUSBAR (window->details->statusbar), 0, text);
-	}
-}
-
-void
 nautilus_window_go_to (NautilusWindow *window, GFile *location)
 {
 	g_return_if_fail (NAUTILUS_IS_WINDOW (window));
@@ -518,7 +504,6 @@ nautilus_window_constructed (GObject *self)
 	NautilusWindow *window;
 	GtkWidget *grid;
 	GtkWidget *menu;
-	GtkWidget *statusbar;
 	GtkWidget *hpaned;
 	GtkWidget *vbox;
 	NautilusWindowPane *pane;
@@ -538,12 +523,6 @@ nautilus_window_constructed (GObject *self)
 	gtk_widget_show (grid);
 	gtk_container_add (GTK_CONTAINER (window), grid);
 
-	statusbar = gtk_statusbar_new ();
-	window->details->statusbar = statusbar;
-	window->details->help_message_cid = gtk_statusbar_get_context_id
-		(GTK_STATUSBAR (statusbar), "help_message");
-	/* Statusbar is packed in the subclasses */
-
 	nautilus_window_initialize_menus (window);
 	nautilus_window_initialize_actions (window);
 
@@ -574,16 +553,6 @@ nautilus_window_constructed (GObject *self)
 	gtk_widget_show (hpaned);
 	window->details->split_view_hpane = hpaned;
 
-	gtk_box_pack_start (GTK_BOX (vbox), window->details->statusbar, FALSE, FALSE, 0);
-
-	g_settings_bind_with_mapping (nautilus_window_state,
-				      NAUTILUS_WINDOW_STATE_START_WITH_STATUS_BAR,
-				      window->details->statusbar,
-				      "visible",
-				      G_SETTINGS_BIND_DEFAULT,
-				      nautilus_window_disable_chrome_mapping, NULL,
-				      window, NULL);
-
 	pane = nautilus_window_pane_new (window);
 	window->details->panes = g_list_prepend (window->details->panes, pane);
 
diff --git a/src/nautilus-window.h b/src/nautilus-window.h
index a65fdf0..589e84f 100644
--- a/src/nautilus-window.h
+++ b/src/nautilus-window.h
@@ -132,8 +132,6 @@ void                 nautilus_window_report_load_underway  (NautilusWindow *wind
 void                 nautilus_window_view_visible          (NautilusWindow *window,
                                                             NautilusView *view);
 NautilusWindowSlot * nautilus_window_get_active_slot       (NautilusWindow *window);
-void                 nautilus_window_push_status           (NautilusWindow *window,
-                                                            const char *text);
 
 void     nautilus_window_hide_sidebar         (NautilusWindow *window);
 void     nautilus_window_show_sidebar         (NautilusWindow *window);



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