[gnome-tetravex] remove fullscreen



commit 7473f7504392f660b24ecd6ab4ca0abfd60a8f4d
Author: Thomas Hindoe Paaboel Andersen <phomes gmail com>
Date:   Sun Oct 13 14:56:28 2013 +0200

    remove fullscreen

 data/org.gnome.tetravex.gschema.xml |    4 ---
 src/gnome-tetravex.vala             |   38 ++--------------------------------
 2 files changed, 3 insertions(+), 39 deletions(-)
---
diff --git a/data/org.gnome.tetravex.gschema.xml b/data/org.gnome.tetravex.gschema.xml
index ae6ea08..9915401 100644
--- a/data/org.gnome.tetravex.gschema.xml
+++ b/data/org.gnome.tetravex.gschema.xml
@@ -18,9 +18,5 @@
       <default>false</default>
       <summary>true if the window is maximized</summary>
     </key>
-    <key name="window-is-fullscreen" type="b">
-      <default>false</default>
-      <summary>true if the window is fullscren</summary>
-    </key>
   </schema>
 </schemalist>
diff --git a/src/gnome-tetravex.vala b/src/gnome-tetravex.vala
index 67bf3df..ddc8c6b 100644
--- a/src/gnome-tetravex.vala
+++ b/src/gnome-tetravex.vala
@@ -23,19 +23,16 @@ public class Tetravex : Gtk.Application
     private Gtk.ApplicationWindow window;
     private int window_width;
     private int window_height;
-    private bool is_fullscreen;
     private bool is_maximized;
 
     Gtk.Button pause_button;
     Gtk.Image pause_image;
     Gtk.Label pause_label;
-    Gtk.Button fullscreen_button;
 
     private const GLib.ActionEntry[] action_entries =
     {
         { "new-game",      new_game_cb                                            },
         { "pause",         pause_cb                                               },
-        { "fullscreen",    fullscreen_cb                                          },
         { "solve",         solve_cb                                               },
         { "scores",        scores_cb                                              },
         { "quit",          quit_cb                                                },
@@ -63,7 +60,6 @@ public class Tetravex : Gtk.Application
         add_action_entries (action_entries, this);
         add_accelerator ("<Primary>n", "app.new-game", null);
         add_accelerator ("Pause", "app.pause", null);
-        add_accelerator ("F11", "app.fullscreen", null);
         add_accelerator ("F1", "app.help", null);
         add_accelerator ("<Primary>q", "app.quit", null);
 
@@ -90,9 +86,7 @@ public class Tetravex : Gtk.Application
         window.configure_event.connect (window_configure_event_cb);
         window.window_state_event.connect (window_state_event_cb);
         window.set_default_size (settings.get_int ("window-width"), settings.get_int ("window-height"));     
   
-        if (settings.get_boolean ("window-is-fullscreen"))
-            window.fullscreen ();
-        else if (settings.get_boolean ("window-is-maximized"))
+        if (settings.get_boolean ("window-is-maximized"))
             window.maximize ();
 
         (lookup_action ("size") as SimpleAction).set_state ("%d".printf (settings.get_int (KEY_GRID_SIZE)));
@@ -103,12 +97,6 @@ public class Tetravex : Gtk.Application
         headerbar.show ();
         window.set_titlebar (headerbar);
 
-        fullscreen_button = new Gtk.Button.from_icon_name ("view-fullscreen-symbolic", Gtk.IconSize.BUTTON);
-        fullscreen_button.valign = Gtk.Align.CENTER;
-        fullscreen_button.action_name = "app.fullscreen";
-        fullscreen_button.show ();
-        headerbar.pack_start (fullscreen_button);
-
         var grid = builder.get_object ("grid") as Gtk.Grid;
 
         view = new PuzzleView ();
@@ -175,7 +163,7 @@ public class Tetravex : Gtk.Application
 
     private bool window_configure_event_cb (Gdk.EventConfigure event)
     {
-        if (!is_maximized && !is_fullscreen)
+        if (!is_maximized)
         {
             window_width = event.width;
             window_height = event.height;
@@ -188,18 +176,7 @@ public class Tetravex : Gtk.Application
     {
         if ((event.changed_mask & Gdk.WindowState.MAXIMIZED) != 0)
             is_maximized = (event.new_window_state & Gdk.WindowState.MAXIMIZED) != 0;
-        if ((event.changed_mask & Gdk.WindowState.FULLSCREEN) != 0)
-        {
-            is_fullscreen = (event.new_window_state & Gdk.WindowState.FULLSCREEN) != 0;
-            if (is_fullscreen)
-            {
-                fullscreen_button.image = new Gtk.Image.from_icon_name ("view-restore-symbolic", 
Gtk.IconSize.BUTTON);
-            }
-            else
-            {
-                fullscreen_button.image = new Gtk.Image.from_icon_name ("view-fullscreen-symbolic", 
Gtk.IconSize.BUTTON);
-            }
-        }
+
         return false;
     }
 
@@ -211,7 +188,6 @@ public class Tetravex : Gtk.Application
         settings.set_int ("window-width", window_width);
         settings.set_int ("window-height", window_height);
         settings.set_boolean ("window-is-maximized", is_maximized);
-        settings.set_boolean ("window-is-fullscreen", is_fullscreen);
     }
 
     protected override void activate ()
@@ -390,14 +366,6 @@ public class Tetravex : Gtk.Application
         }
     }
 
-    private void fullscreen_cb ()
-    {
-        if (is_fullscreen)
-            window.unfullscreen ();
-        else
-            window.fullscreen ();
-    }
-
     private void radio_cb (SimpleAction action, Variant? parameter)
     {
         action.change_state (parameter);


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