diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2015-08-20 08:41:07 -0300 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2015-08-20 08:41:07 -0300 |
commit | acf2f76b00fbac08bf348244688ca15b9bcddf73 (patch) | |
tree | d070fd8bb8b925b23d437a8472f288234b23c759 | |
parent | 6594207b305f4afb5842dd9732fc8e4dae5355b9 (diff) | |
download | nautilus-acf2f76b00fbac08bf348244688ca15b9bcddf73.tar.gz |
canvas-view: change state of 'keep-aligned' action
The last action assigned was 'sort', and then we immediately
try to change the 'keep-aligned' state, causing a bunch of
criticals when using the Desktop Icons.
Fix that by correctly ordering the actions and avoiding set
the state of the wrong action.
-rw-r--r-- | src/nautilus-canvas-view.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c index 81cc2d80c..c3c2d540c 100644 --- a/src/nautilus-canvas-view.c +++ b/src/nautilus-canvas-view.c @@ -1118,13 +1118,13 @@ nautilus_canvas_view_update_actions_state (NautilusFilesView *view) g_variant_unref (sort_state); } - action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group), "keep-aligned"); - g_simple_action_set_enabled (G_SIMPLE_ACTION (action), - canvas_view->details->supports_keep_aligned); action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group), "sort"); g_simple_action_set_enabled (G_SIMPLE_ACTION (action), !showing_recent_directory (view) && !showing_search_directory (view)); + action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group), "keep-aligned"); + g_simple_action_set_enabled (G_SIMPLE_ACTION (action), + canvas_view->details->supports_keep_aligned); if (canvas_view->details->supports_keep_aligned) { keep_aligned = nautilus_canvas_container_is_keep_aligned (get_canvas_container (canvas_view)); g_action_change_state (action, g_variant_new_boolean (keep_aligned)); |