[nautilus/gnome-3-20] files-view: disable zoom action when empty directory



commit 4576e047c0bd4990ec84552f309125dc22c1aebd
Author: Carlos Soriano <csoriano gnome org>
Date:   Mon Mar 14 22:15:40 2016 +0100

    files-view: disable zoom action when empty directory
    
    We don't want to change the settings when there is nothing to look at.

 src/nautilus-files-view.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 69bab53..af8af23 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -6585,6 +6585,10 @@ real_update_actions_state (NautilusFilesView *view)
                                              "zoom-default");
         g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
                                      nautilus_files_view_supports_zooming (view));
+        action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group),
+                                             "zoom-to-level");
+        g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
+                                     !nautilus_files_view_is_empty (view));
 }
 
 /* Convenience function to be called when updating menus,


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