Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-window.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-06-14 21:04:23 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-06-14 21:04:23 (GMT)
commit79986dda7231d1ef1c530909bde8e18a507a2a2a (patch)
tree4da2836164c375d4fc17c3bc3dfbc67441b2a1b3 /shell/ev-window.c
parentc7d050d9ac60d8711e8dd6369a1991296bde282f (diff)
Add orientation api. Currently poppler api is not optimal, we need to set
2005-06-14 Marco Pesenti Gritti <mpg@redhat.com> * backend/ev-document.c: (ev_document_set_orientation): * backend/ev-document.h: * pdf/ev-poppler.cc: Add orientation api. Currently poppler api is not optimal, we need to set orientation every time we _get a page * data/evince-ui.xml: * shell/ev-window.c: (ev_window_cmd_edit_landscape), (ev_window_cmd_edit_portrait), (ev_window_cmd_edit_flip): Add orientation menu items * shell/ev-page-cache.c: (ev_page_cache_clear): * shell/ev-page-cache.h: Add api to clear the cache * shell/ev-view.c: (setup_caches), (clear_caches), (ev_view_set_document), (ev_view_zoom_out), (ev_view_set_orientation): * shell/ev-view.h: Implement orientation changing
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r--shell/ev-window.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 46ae9a2..12fa3d8 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -1782,6 +1782,27 @@ ev_window_cmd_edit_toolbar_cb (GtkDialog *dialog, gint response, gpointer data)
}
static void
+ev_window_cmd_edit_landscape (GtkAction *action, EvWindow *ev_window)
+{
+ ev_view_set_orientation (EV_VIEW (ev_window->priv->view),
+ EV_ORIENTATION_LANDSCAPE);
+}
+
+static void
+ev_window_cmd_edit_portrait (GtkAction *action, EvWindow *ev_window)
+{
+ ev_view_set_orientation (EV_VIEW (ev_window->priv->view),
+ EV_ORIENTATION_PORTRAIT);
+}
+
+static void
+ev_window_cmd_edit_flip (GtkAction *action, EvWindow *ev_window)
+{
+ ev_view_set_orientation (EV_VIEW (ev_window->priv->view),
+ EV_ORIENTATION_SEASCAPE);
+}
+
+static void
ev_window_cmd_edit_toolbar (GtkAction *action, EvWindow *ev_window)
{
GtkWidget *dialog;
@@ -2474,6 +2495,15 @@ static const GtkActionEntry entries[] = {
{ "EditToolbar", NULL, N_("T_oolbar"), NULL,
N_("Customize the toolbar"),
G_CALLBACK (ev_window_cmd_edit_toolbar) },
+ { "EditLandscape", NULL, N_("_Landscape"), NULL,
+ N_("Change the document orientation to landscape"),
+ G_CALLBACK (ev_window_cmd_edit_landscape) },
+ { "EditPortrait", NULL, N_("_Portrait"), NULL,
+ N_("Change the document orientation to portrait"),
+ G_CALLBACK (ev_window_cmd_edit_portrait) },
+ { "EditFlip", NULL, N_("_Flip"), NULL,
+ N_("Flip the document"),
+ G_CALLBACK (ev_window_cmd_edit_flip) },
/* View menu */
{ "ViewZoomIn", GTK_STOCK_ZOOM_IN, NULL, "<control>plus",