[gnome-games] preferences-subpage-keyboard: Unify info message handling with gamepad page
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] preferences-subpage-keyboard: Unify info message handling with gamepad page
- Date: Wed, 4 Mar 2020 13:10:55 +0000 (UTC)
commit 49b7a97038a0d25eb51cea5b59ef7688776400ce
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Mar 4 18:09:09 2020 +0500
preferences-subpage-keyboard: Unify info message handling with gamepad page
data/ui/preferences-subpage-keyboard.ui | 3 ++-
src/ui/preferences-subpage-keyboard.vala | 5 ++---
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/data/ui/preferences-subpage-keyboard.ui b/data/ui/preferences-subpage-keyboard.ui
index 238044c8..17675b8a 100644
--- a/data/ui/preferences-subpage-keyboard.ui
+++ b/data/ui/preferences-subpage-keyboard.ui
@@ -59,9 +59,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="GamesPreferencesSubpageKeyboard"
bind-property="info-message" bind-flags="bidirectional"/>
</object>
</child>
</object>
diff --git a/src/ui/preferences-subpage-keyboard.vala b/src/ui/preferences-subpage-keyboard.vala
index 3ef49b45..ecba319c 100644
--- a/src/ui/preferences-subpage-keyboard.vala
+++ b/src/ui/preferences-subpage-keyboard.vala
@@ -95,6 +95,7 @@ private class Games.PreferencesSubpageKeyboard : Gtk.Box, PreferencesSubpage {
}
public bool request_selection_mode { get; set; }
+ public string info_message { get; set; }
[GtkChild]
private Gtk.Stack gamepad_view_stack;
@@ -110,8 +111,6 @@ private class Games.PreferencesSubpageKeyboard : Gtk.Box, PreferencesSubpage {
private Gtk.Button back_button;
[GtkChild]
private Gtk.Button cancel_button;
- [GtkChild]
- private Gtk.Label info_message;
private KeyboardMapper mapper;
private KeyboardTester tester;
@@ -129,7 +128,7 @@ private class Games.PreferencesSubpageKeyboard : Gtk.Box, PreferencesSubpage {
tester.mapping = mapping_manager.mapping;
});
- mapper.bind_property ("info-message", info_message, "label", BindingFlags.SYNC_CREATE);
+ mapper.bind_property ("info-message", this, "info-message", BindingFlags.SYNC_CREATE);
state = State.TEST;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]