summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-window.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index ab8a7c07..9213e50d 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -3979,6 +3979,12 @@ ev_window_cmd_view_fit_page (GtkAction *action, EvWindow *ev_window)
}
static void
+ev_window_cmd_fit_page (GtkAction *action, EvWindow *ev_window)
+{
+ ev_document_model_set_sizing_mode (ev_window->priv->model, EV_SIZING_FIT_PAGE);
+}
+
+static void
ev_window_cmd_view_fit_width (GtkAction *action, EvWindow *ev_window)
{
ev_window_stop_presentation (ev_window, TRUE);
@@ -3991,6 +3997,11 @@ ev_window_cmd_view_fit_width (GtkAction *action, EvWindow *ev_window)
ev_window_update_actions (ev_window);
}
+static void
+ev_window_cmd_fit_width (GtkAction *action, EvWindow *ev_window)
+{
+ ev_document_model_set_sizing_mode (ev_window->priv->model, EV_SIZING_FIT_WIDTH);
+}
static void
ev_window_cmd_edit_select_all (GtkAction *action, EvWindow *ev_window)
@@ -6299,6 +6310,10 @@ static const GtkActionEntry entries[] = {
G_CALLBACK (ev_window_cmd_view_zoom_out) },
{ "CtrlInsert", GTK_STOCK_COPY, NULL, "<control>Insert", NULL,
G_CALLBACK (ev_window_cmd_edit_copy) },
+ { "FitPage", EV_STOCK_ZOOM_PAGE, NULL, "f", NULL,
+ G_CALLBACK (ev_window_cmd_fit_page) },
+ { "FitWidth", EV_STOCK_ZOOM_WIDTH, NULL, "w", NULL,
+ G_CALLBACK (ev_window_cmd_fit_width) },
};
/* Toggle items */
@@ -6325,10 +6340,10 @@ static const GtkToggleActionEntry toggle_entries[] = {
{ "ViewPresentation", EV_STOCK_RUN_PRESENTATION, N_("Pre_sentation"), "F5",
N_("Run document as a presentation"),
G_CALLBACK (ev_window_cmd_view_presentation) },
- { "ViewFitPage", EV_STOCK_ZOOM_PAGE, N_("Fit Pa_ge"), NULL,
+ { "ViewFitPage", EV_STOCK_ZOOM_PAGE, N_("Fit Pa_ge"), "f",
N_("Make the current document fill the window"),
G_CALLBACK (ev_window_cmd_view_fit_page) },
- { "ViewFitWidth", EV_STOCK_ZOOM_WIDTH, N_("Fit _Width"), NULL,
+ { "ViewFitWidth", EV_STOCK_ZOOM_WIDTH, N_("Fit _Width"), "w",
N_("Make the current document fill the window width"),
G_CALLBACK (ev_window_cmd_view_fit_width) },
{ "ViewInvertedColors", EV_STOCK_INVERTED_COLORS, N_("_Inverted Colors"), "<control>I",