]> www.fi.muni.cz Git - evince.git/blobdiff - ps/ps-document.c
Remove unnecessary translations
[evince.git] / ps / ps-document.c
index 83fa3d9fe93573659b558fadd6d709b87006a6c1..642f5c8ef9a7a3acbf581162bd70d623433f232d 100644 (file)
@@ -1241,6 +1241,35 @@ ps_document_get_info (EvDocument *document)
        return info;
 }
 
+static EvOrientation
+ps_document_get_orientation (EvDocument *document)
+{
+       EvOrientation orientation;
+       PSDocument *ps = PS_DOCUMENT (document);
+
+       g_return_val_if_fail (ps != NULL, EV_ORIENTATION_PORTRAIT);
+
+       switch (ps->orientation) {
+               case GTK_GS_ORIENTATION_PORTRAIT:
+                       orientation = EV_ORIENTATION_PORTRAIT;
+                       break;
+               case GTK_GS_ORIENTATION_LANDSCAPE:
+                       orientation = EV_ORIENTATION_LANDSCAPE;
+                       break;
+               case GTK_GS_ORIENTATION_UPSIDEDOWN:
+                       orientation = EV_ORIENTATION_UPSIDEDOWN;
+                       break;
+               case GTK_GS_ORIENTATION_SEASCAPE:
+                       orientation = EV_ORIENTATION_SEASCAPE;
+                       break;
+               default:
+                       orientation = EV_ORIENTATION_PORTRAIT;
+                       break;
+       }
+
+       return orientation;
+}
+
 static void
 ps_document_set_orientation (EvDocument *document, EvOrientation orientation)
 {
@@ -1249,9 +1278,6 @@ ps_document_set_orientation (EvDocument *document, EvOrientation orientation)
        g_return_if_fail (ps != NULL);
 
        switch (orientation) {
-               case EV_ORIENTATION_DOCUMENT:
-                       ps->orientation = GTK_GS_ORIENTATION_NONE;
-                       break;
                case EV_ORIENTATION_PORTRAIT:
                        ps->orientation = GTK_GS_ORIENTATION_PORTRAIT;
                        break;
@@ -1277,6 +1303,7 @@ ps_document_document_iface_init (EvDocumentIface *iface)
        iface->get_page_size = ps_document_get_page_size;
        iface->get_info = ps_document_get_info;
        iface->set_orientation = ps_document_set_orientation;
+       iface->get_orientation = ps_document_get_orientation;
 }
 
 static void