[gnome-chess] Remove fullscreen mode



commit 29dbf3239714ed0f79a29b2b96bb06bd0420fb86
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Jan 5 23:27:04 2014 -0600

    Remove fullscreen mode

 data/gnome-chess.ui                    |   16 ----------------
 data/org.gnome.gnome-chess.gschema.xml |    5 -----
 src/gnome-chess.vala                   |   32 ++------------------------------
 3 files changed, 2 insertions(+), 51 deletions(-)
---
diff --git a/data/gnome-chess.ui b/data/gnome-chess.ui
index 2349027..ba2a96a 100644
--- a/data/gnome-chess.ui
+++ b/data/gnome-chess.ui
@@ -180,22 +180,6 @@
                 <property name="homogeneous">True</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkToolButton" id="fullscreen_button">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="tooltip_text" translatable="yes">Toggle fullscreen</property>
-                <property name="label" translatable="yes">Fullscreen</property>
-                <property name="use_underline">True</property>
-                <property name="stock_id">gtk-fullscreen</property>
-                <accelerator key="F11" signal="clicked"/>
-                <signal name="clicked" handler="toggle_fullscreen_cb" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
           </object>
           <packing>
             <property name="expand">False</property>
diff --git a/data/org.gnome.gnome-chess.gschema.xml b/data/org.gnome.gnome-chess.gschema.xml
index 8bdf75a..52945cc 100644
--- a/data/org.gnome.gnome-chess.gschema.xml
+++ b/data/org.gnome.gnome-chess.gschema.xml
@@ -36,11 +36,6 @@
       <summary>A flag to enable maximized mode</summary>
       <description>A flag to enable maximized mode</description>
     </key>
-    <key name="fullscreen" type="b">
-      <default>false</default>
-      <summary>A flag to enable fullscreen mode</summary>
-      <description>A flag to enable fullscreen mode</description>
-    </key>
     <key name="show-3d" type="b">
       <default>false</default>
       <summary>A flag to enable 3D mode</summary>
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 0527965..0607d9b 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -28,7 +28,6 @@ public class Application : Gtk.Application
     private Gtk.Widget pause_button;
     private Gtk.Widget claim_draw_button;
     private Gtk.Widget resign_button;
-    private Gtk.Widget fullscreen_button;
     private Gtk.Widget first_move_button;
     private Gtk.Widget prev_move_button;
     private Gtk.Widget next_move_button;
@@ -65,7 +64,6 @@ public class Application : Gtk.Application
     private ChessPlayer? opponent = null;
     private ChessPlayer? human_player = null;
     private ChessEngine? opponent_engine = null;
-    private bool is_fullscreen = false;
     private bool widget_sensitivity[8];
 
     private enum SensitivityIndex
@@ -170,7 +168,6 @@ public class Application : Gtk.Application
         pause_button = (Gtk.Widget) builder.get_object ("pause_game_button");
         claim_draw_button = (Gtk.Widget) builder.get_object ("claim_draw_button");
         resign_button = (Gtk.Widget) builder.get_object ("resign_button");
-        fullscreen_button = (Gtk.Widget) builder.get_object ("fullscreen_button");
         first_move_button = (Gtk.Widget) builder.get_object ("first_move_button");
         prev_move_button = (Gtk.Widget) builder.get_object ("prev_move_button");
         next_move_button = (Gtk.Widget) builder.get_object ("next_move_button");
@@ -252,12 +249,7 @@ public class Application : Gtk.Application
 
         window.set_default_size (settings.get_int ("width"), settings.get_int ("height"));        
 
-        if (settings.get_boolean ("fullscreen"))
-        {
-            window.fullscreen ();
-            is_fullscreen = true;
-        }
-        else if (settings.get_boolean ("maximized"))
+        if (settings.get_boolean ("maximized"))
         {
             window.maximize ();
         }
@@ -1169,7 +1161,7 @@ public class Application : Gtk.Application
     [CCode (cname = "G_MODULE_EXPORT gnome_chess_app_configure_event_cb", instance_pos = -1)]
     public bool gnome_chess_app_configure_event_cb (Gtk.Widget widget, Gdk.EventConfigure event)
     {
-        if (!settings.get_boolean ("maximized") && !settings.get_boolean ("fullscreen"))
+        if (!settings.get_boolean ("maximized"))
         {
             settings.set_int ("width", event.width);
             settings.set_int ("height", event.height);
@@ -1186,11 +1178,6 @@ public class Application : Gtk.Application
             var is_maximized = (event.new_window_state & Gdk.WindowState.MAXIMIZED) != 0;
             settings.set_boolean ("maximized", is_maximized);
         }
-        if ((event.changed_mask & Gdk.WindowState.FULLSCREEN) != 0)
-        {
-            is_fullscreen = (event.new_window_state & Gdk.WindowState.FULLSCREEN) != 0;
-            settings.set_boolean ("fullscreen", is_fullscreen);
-        }
 
         return false;
     }
@@ -1484,21 +1471,6 @@ public class Application : Gtk.Application
         scene.move_number = 0;
     }
 
-    [CCode (cname = "G_MODULE_EXPORT toggle_fullscreen_cb", instance_pos = -1)]
-    public void toggle_fullscreen_cb (Gtk.Widget widget)
-    {
-        if (is_fullscreen)
-        {
-            ((Gtk.ToolButton) fullscreen_button).stock_id = "gtk-fullscreen";
-            window.unfullscreen ();
-        }
-        else
-        {
-            ((Gtk.ToolButton) fullscreen_button).stock_id = "gtk-leave-fullscreen";
-            window.fullscreen ();
-        }
-    }
-
     public void preferences_cb ()
     {
         if (preferences_dialog != null)


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