[nautilus] canvas-view: change state of 'keep-aligned' action
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] canvas-view: change state of 'keep-aligned' action
- Date: Thu, 20 Aug 2015 11:44:07 +0000 (UTC)
commit acf2f76b00fbac08bf348244688ca15b9bcddf73
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Aug 20 08:41:07 2015 -0300
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.
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 81cc2d8..c3c2d54 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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]