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
parent 04098963
...@@ -1963,6 +1963,9 @@ nautilus_canvas_view_init (NautilusCanvasView *canvas_view) ...@@ -1963,6 +1963,9 @@ nautilus_canvas_view_init (NautilusCanvasView *canvas_view)
canvas_view_entries, canvas_view_entries,
G_N_ELEMENTS (canvas_view_entries), G_N_ELEMENTS (canvas_view_entries),
canvas_view); 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 * NautilusView *
......
...@@ -3580,6 +3580,9 @@ nautilus_list_view_init (NautilusListView *list_view) ...@@ -3580,6 +3580,9 @@ nautilus_list_view_init (NautilusListView *list_view)
list_view_entries, list_view_entries,
G_N_ELEMENTS (list_view_entries), G_N_ELEMENTS (list_view_entries),
list_view); 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 * NautilusView *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment