[gnome-games/wip/exalm/controller-preferences: 5/6] ui: Inherit controller mapper and tester from GtkBin



commit b759f74d1ed1a1a9d1cca9e9e78b8186e1f1fa04
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Sep 11 22:30:17 2018 +0500

    ui: Inherit controller mapper and tester from GtkBin
    
    Since they only have one child, GtkBox is not necessary here.

 data/ui/gamepad-mapper.ui   | 5 +----
 data/ui/gamepad-tester.ui   | 5 +----
 data/ui/keyboard-mapper.ui  | 5 +----
 data/ui/keyboard-tester.ui  | 5 +----
 src/ui/gamepad-mapper.vala  | 2 +-
 src/ui/gamepad-tester.vala  | 2 +-
 src/ui/keyboard-mapper.vala | 2 +-
 src/ui/keyboard-tester.vala | 2 +-
 8 files changed, 8 insertions(+), 20 deletions(-)
---
diff --git a/data/ui/gamepad-mapper.ui b/data/ui/gamepad-mapper.ui
index 3ee8af1a..86e8548d 100644
--- a/data/ui/gamepad-mapper.ui
+++ b/data/ui/gamepad-mapper.ui
@@ -1,13 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <template class="GamesGamepadMapper" parent="GtkBox">
+  <template class="GamesGamepadMapper" parent="GtkBin">
     <property name="visible">True</property>
-    <property name="orientation">vertical</property>
     <child>
       <object class="GamesGamepadView" id="gamepad_view">
         <property name="visible">True</property>
-        <property name="hexpand">True</property>
-        <property name="vexpand">True</property>
       </object>
     </child>
   </template>
diff --git a/data/ui/gamepad-tester.ui b/data/ui/gamepad-tester.ui
index 314c9140..17a90137 100644
--- a/data/ui/gamepad-tester.ui
+++ b/data/ui/gamepad-tester.ui
@@ -1,13 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <template class="GamesGamepadTester" parent="GtkBox">
+  <template class="GamesGamepadTester" parent="GtkBin">
     <property name="visible">True</property>
-    <property name="orientation">vertical</property>
     <child>
       <object class="GamesGamepadView" id="gamepad_view">
         <property name="visible">True</property>
-        <property name="hexpand">True</property>
-        <property name="vexpand">True</property>
       </object>
     </child>
   </template>
diff --git a/data/ui/keyboard-mapper.ui b/data/ui/keyboard-mapper.ui
index baee6d68..c9fced3b 100644
--- a/data/ui/keyboard-mapper.ui
+++ b/data/ui/keyboard-mapper.ui
@@ -1,13 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <template class="GamesKeyboardMapper" parent="GtkBox">
+  <template class="GamesKeyboardMapper" parent="GtkBin">
     <property name="visible">True</property>
-    <property name="orientation">vertical</property>
     <child>
       <object class="GamesGamepadView" id="gamepad_view">
         <property name="visible">True</property>
-        <property name="hexpand">True</property>
-        <property name="vexpand">True</property>
       </object>
     </child>
   </template>
diff --git a/data/ui/keyboard-tester.ui b/data/ui/keyboard-tester.ui
index 3648c41a..4a1d68ee 100644
--- a/data/ui/keyboard-tester.ui
+++ b/data/ui/keyboard-tester.ui
@@ -1,13 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <template class="GamesKeyboardTester" parent="GtkBox">
+  <template class="GamesKeyboardTester" parent="GtkBin">
     <property name="visible">True</property>
-    <property name="orientation">vertical</property>
     <child>
       <object class="GamesGamepadView" id="gamepad_view">
         <property name="visible">True</property>
-        <property name="hexpand">True</property>
-        <property name="vexpand">True</property>
       </object>
     </child>
   </template>
diff --git a/src/ui/gamepad-mapper.vala b/src/ui/gamepad-mapper.vala
index 7f452361..93eb3bdc 100644
--- a/src/ui/gamepad-mapper.vala
+++ b/src/ui/gamepad-mapper.vala
@@ -1,7 +1,7 @@
 // This file is part of GNOME Games. License: GPL-3.0+.
 
 [GtkTemplate (ui = "/org/gnome/Games/ui/gamepad-mapper.ui")]
-private class Games.GamepadMapper : Gtk.Box {
+private class Games.GamepadMapper : Gtk.Bin {
        public signal void finished (string sdl_string);
 
        [GtkChild]
diff --git a/src/ui/gamepad-tester.vala b/src/ui/gamepad-tester.vala
index 3caaf28e..774104f2 100644
--- a/src/ui/gamepad-tester.vala
+++ b/src/ui/gamepad-tester.vala
@@ -1,7 +1,7 @@
 // This file is part of GNOME Games. License: GPL-3.0+.
 
 [GtkTemplate (ui = "/org/gnome/Games/ui/gamepad-tester.ui")]
-private class Games.GamepadTester : Gtk.Box {
+private class Games.GamepadTester : Gtk.Bin {
        [GtkChild]
        private GamepadView gamepad_view;
 
diff --git a/src/ui/keyboard-mapper.vala b/src/ui/keyboard-mapper.vala
index f7ac9f2e..505ed1f8 100644
--- a/src/ui/keyboard-mapper.vala
+++ b/src/ui/keyboard-mapper.vala
@@ -1,7 +1,7 @@
 // This file is part of GNOME Games. License: GPL-3.0+.
 
 [GtkTemplate (ui = "/org/gnome/Games/ui/keyboard-mapper.ui")]
-private class Games.KeyboardMapper : Gtk.Box {
+private class Games.KeyboardMapper : Gtk.Bin {
        public signal void finished (Retro.KeyJoypadMapping mapping);
 
        [GtkChild]
diff --git a/src/ui/keyboard-tester.vala b/src/ui/keyboard-tester.vala
index 338e0e7a..1aba4703 100644
--- a/src/ui/keyboard-tester.vala
+++ b/src/ui/keyboard-tester.vala
@@ -1,7 +1,7 @@
 // This file is part of GNOME Games. License: GPL-3.0+.
 
 [GtkTemplate (ui = "/org/gnome/Games/ui/keyboard-tester.ui")]
-private class Games.KeyboardTester : Gtk.Box {
+private class Games.KeyboardTester : Gtk.Bin {
        [GtkChild]
        private GamepadView gamepad_view;
 


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