Commit 676b96d2 authored by William Jon McCann's avatar William Jon McCann

Remove the statusbar

We use a floating status bar now.

https://bugzilla.gnome.org/show_bug.cgi?id=676840
parent 0a80b533
......@@ -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"
......
......@@ -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
......@@ -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>
......
......@@ -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"
......
......@@ -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);
......
......@@ -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/>
......
......@@ -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,
......
......@@ -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);
......
......@@ -348,46 +348,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,
......@@ -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"),
......@@ -1045,15 +995,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);
......@@ -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);
......
......@@ -39,7 +39,6 @@
/* FIXME bugzilla.gnome.org 42575: Migrate more fields into here. */
struct NautilusWindowDetails
{
GtkWidget *statusbar;
GtkWidget *menubar;
GtkUIManager *ui_manager;
......
......@@ -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:
......
......@@ -146,20 +146,6 @@ static const struct {
#endif
};
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)
{
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment