summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/atril-ui.xml2
-rw-r--r--shell/ev-window.c19
2 files changed, 19 insertions, 2 deletions
diff --git a/data/atril-ui.xml b/data/atril-ui.xml
index 5faafaeb..0dda7b52 100644
--- a/data/atril-ui.xml
+++ b/data/atril-ui.xml
@@ -133,6 +133,8 @@
<accelerator name="CtrlKpPlusAccel" action="CtrlKpPlus"/>
<accelerator name="CtrlKpMinusAccel" action="CtrlKpMinus"/>
<accelerator name="CtrlInsertAccel" action="CtrlInsert" />
+ <accelerator name="FitPageAccel" action ="FitPage" />
+ <accelerator name="FitWidthAccel" action ="FitWidth" />
<toolbar name="FullscreenToolbar">
<toolitem name="GoPreviousPage" action="GoPreviousPage"/>
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",