[gnome-games] display-header-bar: Bind game title in xml
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] display-header-bar: Bind game title in xml
- Date: Tue, 28 Jan 2020 14:40:27 +0000 (UTC)
commit 8626b6a816af54202ba3085de778f3c09b9cbb7f
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Jan 28 19:29:28 2020 +0500
display-header-bar: Bind game title in xml
data/ui/display-header-bar.ui | 3 ++-
src/ui/display-header-bar.vala | 10 +---------
2 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/data/ui/display-header-bar.ui b/data/ui/display-header-bar.ui
index b2f501e6..4b231928 100644
--- a/data/ui/display-header-bar.ui
+++ b/data/ui/display-header-bar.ui
@@ -14,7 +14,7 @@
<child>
<object class="GtkHeaderBar" id="ingame_header_bar">
<property name="visible">True</property>
- <property name="title" translatable="yes">Games</property>
+ <property name="title" bind-source="GamesDisplayHeaderBar" bind-property="game-title"
bind-flags="bidirectional"/>
<property name="show_close_button">True</property>
<child>
<object class="GtkButton" id="back">
@@ -131,6 +131,7 @@
<child>
<object class="GtkHeaderBar" id="savestates_header_bar">
<property name="visible">True</property>
+ <property name="title" bind-source="GamesDisplayHeaderBar" bind-property="game-title"
bind-flags="bidirectional"/>
<child>
<object class="GtkButton">
<property name="sensitive">False</property>
diff --git a/src/ui/display-header-bar.vala b/src/ui/display-header-bar.vala
index 875e1098..fde9ec92 100644
--- a/src/ui/display-header-bar.vala
+++ b/src/ui/display-header-bar.vala
@@ -7,15 +7,7 @@ private class Games.DisplayHeaderBar : Gtk.Bin {
[GtkChild]
private MediaMenuButton media_button;
- private string _game_title;
- public string game_title {
- get { return _game_title; }
- set {
- _game_title = value;
- ingame_header_bar.title = value;
- savestates_header_bar.title = value;
- }
- }
+ public string game_title { get; set; }
public bool show_title_buttons {
set { ingame_header_bar.show_close_button = value; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]