[emerillon] Add fullscreen mode



commit 3e68493f637b07762f5903526a9cdadbe7f8e70a
Author: Simon Wenner <simon wenner ch>
Date:   Tue Oct 27 14:50:23 2009 -0400

    Add fullscreen mode

 AUTHORS               |    1 +
 data/emerillon-ui.xml |    2 ++
 emerillon/window.c    |   19 +++++++++++++++++++
 3 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/AUTHORS b/AUTHORS
index a90a4fc..a4d8261 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -4,3 +4,4 @@ Guilhem Bonnefille <guilhem bonnefille gmail com>
 Javier Jardón <javierjc1982 gmail com>
 Å?ukasz JernaÅ? <deejay1 srem org>
 Debarshi Ray <rishi gnu org>
+Simon Wenner <simon wenner ch>
diff --git a/data/emerillon-ui.xml b/data/emerillon-ui.xml
index 94f5a72..2f37c7f 100644
--- a/data/emerillon-ui.xml
+++ b/data/emerillon-ui.xml
@@ -18,6 +18,8 @@
       <menuitem name="StatusbarToggle" action="ViewStatusbar"/>
       <menuitem name="SidebarToggle" action="ViewSidebar"/>
       <separator/>
+      <menuitem name="FullscreenToggle" action="ViewFullscreen"/>
+      <separator/>
       <menuitem action="ViewZoomIn"/>
       <menuitem action="ViewZoomOut"/>
     </menu>
diff --git a/emerillon/window.c b/emerillon/window.c
index 4a7c824..1426ef2 100644
--- a/emerillon/window.c
+++ b/emerillon/window.c
@@ -476,6 +476,22 @@ cmd_show_hide_bar (GtkAction *action,
 }
 
 static void
+cmd_toggle_fullscreen (GtkAction *action,
+              EmerillonWindow *self)
+{
+  gboolean fullscreen;
+
+  fullscreen = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
+
+  if (fullscreen) {
+    gtk_window_fullscreen (GTK_WINDOW (default_window));
+  } else {
+    gtk_window_unfullscreen (GTK_WINDOW (default_window));
+  }
+
+}
+
+static void
 cmd_zoom_in (GtkAction *action,
              EmerillonWindow *self)
 {
@@ -619,6 +635,9 @@ static const GtkToggleActionEntry toggle_entries[] = {
       { "ViewSidebar", NULL, N_("Side _Pane"), "F9",
         N_("Show or hide the side pane in the current window"),
         G_CALLBACK (cmd_show_hide_bar), TRUE },
+      { "ViewFullscreen", NULL, N_("_Full Screen"), "F11",
+        N_("Enable or disable full screen mode"),
+        G_CALLBACK (cmd_toggle_fullscreen), FALSE },
 };
 
 static const GtkRadioActionEntry radio_entries[] = {



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