[nautilus] toolbar: don't explicitly show/hide the sort menu
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] toolbar: don't explicitly show/hide the sort menu
- Date: Sun, 25 Jan 2015 15:22:45 +0000 (UTC)
commit 50c3198d9bb5cc438587294d24c76bf7c0bb4a47
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Jan 25 12:46:40 2015 +0000
toolbar: don't explicitly show/hide the sort menu
Look at whether the action exists in the view action group instead.
src/nautilus-canvas-view.c | 2 --
src/nautilus-toolbar.c | 9 ++-------
src/nautilus-toolbar.h | 1 -
3 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c
index b453c30..e938718 100644
--- a/src/nautilus-canvas-view.c
+++ b/src/nautilus-canvas-view.c
@@ -1066,8 +1066,6 @@ nautilus_canvas_view_update_toolbar_menus (NautilusView *view)
toolbar = NAUTILUS_TOOLBAR (nautilus_window_get_toolbar (nautilus_view_get_window (view)));
- nautilus_toolbar_show_sort_menu (toolbar);
-
file = nautilus_view_get_directory_as_file (NAUTILUS_VIEW (view));
if (file != NULL && nautilus_file_is_in_trash (file))
nautilus_toolbar_show_sort_trash_time (toolbar);
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index 0c0244b..ff2169d 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -613,19 +613,14 @@ nautilus_toolbar_reset_menus (NautilusToolbar *self)
gtk_widget_set_visible (self->priv->visible_columns,
g_action_group_has_action (view_action_group, "visible-columns"));
+ gtk_widget_set_visible (self->priv->sort_menu,
+ g_action_group_has_action (view_action_group, "sort"));
- gtk_widget_hide (self->priv->sort_menu);
gtk_widget_hide (self->priv->sort_trash_time);
gtk_widget_hide (self->priv->sort_search_relevance);
}
void
-nautilus_toolbar_show_sort_menu (NautilusToolbar *self)
-{
- gtk_widget_show (self->priv->sort_menu);
-}
-
-void
nautilus_toolbar_show_sort_trash_time (NautilusToolbar *self)
{
gtk_widget_show (self->priv->sort_trash_time);
diff --git a/src/nautilus-toolbar.h b/src/nautilus-toolbar.h
index 8d18304..4a8411d 100644
--- a/src/nautilus-toolbar.h
+++ b/src/nautilus-toolbar.h
@@ -83,7 +83,6 @@ void nautilus_toolbar_view_menu_widget_set_zoom_level (NautilusToolbar *self,
void nautilus_toolbar_update_view_mode (NautilusToolbar *self,
const gchar *view_mode);
-void nautilus_toolbar_show_sort_menu (NautilusToolbar *self);
void nautilus_toolbar_show_sort_trash_time (NautilusToolbar *self);
void nautilus_toolbar_show_sort_search_relevance (NautilusToolbar *self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]