[pdfmod] Added fullscreen view mode



commit a6f06e89f734c4f0e08f806eff8ecaecaa41ea5d
Author: Andreu Correa Casablanca <castarco gmail com>
Date:   Sun Sep 6 01:07:58 2009 +0200

    Added fullscreen view mode

 src/PdfMod/Gui/Actions.cs   |   17 +++++++++++++++--
 src/Resources/UIManager.xml |    1 +
 2 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/src/PdfMod/Gui/Actions.cs b/src/PdfMod/Gui/Actions.cs
index 109d729..5ac3280 100644
--- a/src/PdfMod/Gui/Actions.cs
+++ b/src/PdfMod/Gui/Actions.cs
@@ -81,7 +81,8 @@ namespace PdfMod.Gui
             AddImportant (
                 new ToggleActionEntry ("Properties", Stock.Properties, null, "<alt>Return", Catalog.GetString ("View and edit the title, keywords, and more for this document"), OnProperties, false),
                 new ToggleActionEntry ("ZoomFit", Stock.ZoomFit, null, "<control>0", null, OnZoomFit, true),
-                new ToggleActionEntry ("ViewToolbar", null, Catalog.GetString ("Toolbar"), null, null, OnViewToolbar, Client.Configuration.ShowToolbar)
+                new ToggleActionEntry ("ViewToolbar", null, Catalog.GetString ("Toolbar"), null, null, OnViewToolbar, Client.Configuration.ShowToolbar),
+                new ToggleActionEntry ("FullScreenView", null, Catalog.GetString ("Fullscreen"), "F11", null, OnFullScreenView, false)
             );
 
             this["RotateRight"].IconName = "object-rotate-right";
@@ -210,6 +211,17 @@ namespace PdfMod.Gui
             System.Diagnostics.Process.Start (app.Document.CurrentStateUri);
         }
 
+        private void OnFullScreenView (object o, EventArgs args)
+        {
+            bool fullscreen = (this["FullScreenView"] as ToggleAction).Active;
+
+            if (fullscreen) {
+                this.app.Window.Fullscreen ();
+            } else {
+                this.app.Window.Unfullscreen ();
+            }
+        }
+
         private void OnInsertFrom (object o, EventArgs args)
         {
             var chooser = new Gtk.FileChooserDialog (Catalog.GetString ("Select PDF"), app.Window, FileChooserAction.Open);
@@ -416,7 +428,8 @@ namespace PdfMod.Gui
                     "\tMichael McKinley",
                     "\tÅ?ukasz JernaÅ?",
                     "\tRomain Tartière",
-                    "\tRobert Dyer"
+                    "\tRobert Dyer",
+                    "\tAndreu Correa Casablanca"
                 },
                 Documenters = new string [] { "Gabriel Burt" },
                 Artists = new string [] { "Kalle Persson" },
diff --git a/src/Resources/UIManager.xml b/src/Resources/UIManager.xml
index 288df54..b481b2b 100644
--- a/src/Resources/UIManager.xml
+++ b/src/Resources/UIManager.xml
@@ -37,6 +37,7 @@
       <separator/>
       <menuitem action="OpenInViewer"/>
       <separator/>
+      <menuitem action="FullScreenView"/>
       <menuitem action="ViewToolbar"/>
     </menu>
     <menu action="HelpMenu">



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]