[gnome-games] preferences-subpage-gamepad: Fix info message



commit f9883b9ce3683e2254a52537bf9f23c768568186
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Mar 4 18:08:40 2020 +0500

    preferences-subpage-gamepad: Fix info message
    
    It was trying to bind a nonexistent property.

 data/ui/preferences-subpage-gamepad.ui  | 2 +-
 src/ui/preferences-subpage-gamepad.vala | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/data/ui/preferences-subpage-gamepad.ui b/data/ui/preferences-subpage-gamepad.ui
index 221914dd..ed70871b 100644
--- a/data/ui/preferences-subpage-gamepad.ui
+++ b/data/ui/preferences-subpage-gamepad.ui
@@ -61,7 +61,7 @@
               <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"/>
+                <property name="label" bind-source="GamesPreferencesSubpageGamepad" 
bind-property="info-message" bind-flags="bidirectional"/>
               </object>
             </child>
           </object>
diff --git a/src/ui/preferences-subpage-gamepad.vala b/src/ui/preferences-subpage-gamepad.vala
index 0da34cf6..1f0d073b 100644
--- a/src/ui/preferences-subpage-gamepad.vala
+++ b/src/ui/preferences-subpage-gamepad.vala
@@ -107,6 +107,7 @@ private class Games.PreferencesSubpageGamepad : Gtk.Box, PreferencesSubpage {
        }
 
        public bool request_selection_mode { get; set; }
+       public string info_message { get; set; }
 
        [GtkChild]
        private Gtk.Stack gamepad_view_stack;
@@ -135,6 +136,8 @@ private class Games.PreferencesSubpageGamepad : Gtk.Box, PreferencesSubpage {
                        gamepad_view_stack.add (mapper);
                        tester = new GamepadTester (value, STANDARD_GAMEPAD_VIEW_CONFIGURATION);
                        gamepad_view_stack.add (tester);
+
+                       mapper.bind_property ("info-message", this, "info-message", BindingFlags.SYNC_CREATE);
                }
        }
 


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