[gnome-games/wip/exalm/actions: 6/10] preferences-subpage-gamepad: Bind label property in xml



commit c88c80a8c5a4ea206227601c4a4c32939cd8f706
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sun Jan 26 21:47:41 2020 +0500

    preferences-subpage-gamepad: Bind label property in xml

 data/ui/preferences-subpage-gamepad.ui  | 3 ++-
 src/ui/preferences-subpage-gamepad.vala | 6 ------
 2 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/data/ui/preferences-subpage-gamepad.ui b/data/ui/preferences-subpage-gamepad.ui
index f72a19d3..221914dd 100644
--- a/data/ui/preferences-subpage-gamepad.ui
+++ b/data/ui/preferences-subpage-gamepad.ui
@@ -58,9 +58,10 @@
               </packing>
             </child>
             <child type="center">
-              <object class="GtkLabel" id="info_message">
+              <object class="GtkLabel">
                 <property name="visible">True</property>
                 <property name="ellipsize">end</property>
+                <property name="label" bind-source="GamesPreferencesSubpageGamepad" 
bind-property="info-message" bind-flags="sync-create"/>
               </object>
             </child>
           </object>
diff --git a/src/ui/preferences-subpage-gamepad.vala b/src/ui/preferences-subpage-gamepad.vala
index fc661136..6ea4557d 100644
--- a/src/ui/preferences-subpage-gamepad.vala
+++ b/src/ui/preferences-subpage-gamepad.vala
@@ -122,14 +122,10 @@ private class Games.PreferencesSubpageGamepad : Gtk.Box, PreferencesSubpage {
        private Gtk.Button back_button;
        [GtkChild]
        private Gtk.Button cancel_button;
-       [GtkChild]
-       private Gtk.Label info_message;
 
        private GamepadMapper mapper;
        private GamepadTester tester;
 
-       private Binding info_message_binding;
-
        private Manette.Device _device;
        public Manette.Device device {
                get { return _device; }
@@ -147,8 +143,6 @@ private class Games.PreferencesSubpageGamepad : Gtk.Box, PreferencesSubpage {
        }
 
        construct {
-               info_message_binding = mapper.bind_property ("info-message", info_message, "label", 
BindingFlags.SYNC_CREATE);
-
                state = State.TEST;
        }
 


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