[nautilus] views: initialize zoom-to-level action value
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] views: initialize zoom-to-level action value
- Date: Wed, 25 Feb 2015 15:19:07 +0000 (UTC)
commit ff04d46ec0597dc76bfd8efbfc13b9fe348bb364
Author: Carlos Soriano <csoriano gnome org>
Date: Wed Feb 25 15:59:12 2015 +0100
views: initialize zoom-to-level action value
So the toolbar can poll it when creating the menu.
Previously the slider in the toolbar had the wrong value when
initialized.
https://bugzilla.gnome.org/show_bug.cgi?id=745035
src/nautilus-canvas-view.c | 3 +++
src/nautilus-list-view.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c
index 3604aca..543b713 100644
--- a/src/nautilus-canvas-view.c
+++ b/src/nautilus-canvas-view.c
@@ -1963,6 +1963,9 @@ nautilus_canvas_view_init (NautilusCanvasView *canvas_view)
canvas_view_entries,
G_N_ELEMENTS (canvas_view_entries),
canvas_view);
+ /* Keep the action synced with the actual value, so the toolbar can poll it */
+ g_action_group_change_action_state (nautilus_view_get_action_group (NAUTILUS_VIEW (canvas_view)),
+ "zoom-to-level", g_variant_new_int32 (get_default_zoom_level
(canvas_view)));
}
NautilusView *
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 449a22c..569a449 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -3580,6 +3580,9 @@ nautilus_list_view_init (NautilusListView *list_view)
list_view_entries,
G_N_ELEMENTS (list_view_entries),
list_view);
+ /* Keep the action synced with the actual value, so the toolbar can poll it */
+ g_action_group_change_action_state (nautilus_view_get_action_group (NAUTILUS_VIEW (list_view)),
+ "zoom-to-level", g_variant_new_int32 (get_default_zoom_level ()));
}
NautilusView *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]