@@ -575,6 +575,9 @@ ev_window_update_actions (EvWindow *ev_window)
575575 has_pages &&
576576 ev_view_can_zoom_out (view ) &&
577577 !presentation_mode );
578+ ev_window_set_action_sensitive (ev_window , "ViewZoomReset" ,
579+ has_pages &&
580+ !presentation_mode );
578581 ev_window_set_action_sensitive (ev_window , "ViewDualOddLeft" ,
579582 dual_mode );
580583 }
@@ -4724,6 +4727,23 @@ ev_window_cmd_view_zoom_out (GtkAction *action, EvWindow *ev_window)
47244727 }
47254728}
47264729
4730+ static void
4731+ ev_window_cmd_view_zoom_reset (GtkAction * action , EvWindow * ev_window )
4732+ {
4733+ g_return_if_fail (EV_IS_WINDOW (ev_window ));
4734+
4735+ ev_document_model_set_sizing_mode (ev_window -> priv -> model , EV_SIZING_FREE );
4736+ #if ENABLE_EPUB
4737+ if ( ev_window -> priv -> document -> iswebdocument ) {
4738+ ev_web_view_zoom_reset (EV_WEB_VIEW (ev_window -> priv -> webview ));
4739+ }
4740+ else
4741+ #endif
4742+ {
4743+ ev_view_zoom_reset (EV_VIEW (ev_window -> priv -> view ));
4744+ }
4745+ }
4746+
47274747static void
47284748ev_window_cmd_go_previous_page (GtkAction * action , EvWindow * ev_window )
47294749{
@@ -6300,6 +6320,9 @@ static const GtkActionEntry entries[] = {
63006320 { "ViewZoomOut" , "zoom-out" , N_ ("Zoom _Out" ), "<control>minus" ,
63016321 N_ ("Shrink the document" ),
63026322 G_CALLBACK (ev_window_cmd_view_zoom_out ) },
6323+ { "ViewZoomReset" , "zoom-original" , N_ ("_Reset Zoom" ), "<control>0" ,
6324+ N_ ("Reset zoom to 100\%" ),
6325+ G_CALLBACK (ev_window_cmd_view_zoom_reset ) },
63036326 { "ViewReload" , "view-refresh" , N_ ("_Reload" ), "<control>R" ,
63046327 N_ ("Reload the document" ),
63056328 G_CALLBACK (ev_window_cmd_view_reload ) },
@@ -6653,6 +6676,10 @@ set_action_properties (GtkActionGroup *action_group)
66536676 /*translators: this is the label for toolbar button*/
66546677 g_object_set (action , "short_label" , _ ("Zoom Out" ), NULL );
66556678
6679+ action = gtk_action_group_get_action (action_group , "ViewZoomReset" );
6680+ /*translators: this is the label for toolbar button*/
6681+ g_object_set (action , "short_label" , _ ("Reset Zoom" ), NULL );
6682+
66566683 action = gtk_action_group_get_action (action_group , "ViewFitPage" );
66576684 /*translators: this is the label for toolbar button*/
66586685 g_object_set (action , "short_label" , _ ("Fit Page" ), NULL );
0 commit comments