|
0 |
From: Rico Tzschichholz <ricotz@ubuntu.com>
|
|
1 |
Date: Wed, 17 Mar 2021 11:32:49 +0100
|
|
2 |
Subject: Reference of [GtkChild] fields is handled by GtkBuilder,
|
|
3 |
type must be unowned
|
|
4 |
|
|
5 |
(cherry picked from commit 66be44dc20d114e449fc33156e3939fd05dfbb16)
|
|
6 |
---
|
|
7 |
src/base-headerbar.vala | 14 +++++++-------
|
|
8 |
src/base-view.vala | 4 ++--
|
|
9 |
src/base-window.vala | 6 +++---
|
|
10 |
src/game-actionbar.vala | 6 +++---
|
|
11 |
src/game-headerbar.vala | 4 ++--
|
|
12 |
src/new-game-screen.vala | 18 +++++++++---------
|
|
13 |
src/notifications-revealer.vala | 2 +-
|
|
14 |
src/overlayed-list.vala | 10 +++++-----
|
|
15 |
src/registry-placeholder.vala | 4 ++--
|
|
16 |
9 files changed, 34 insertions(+), 34 deletions(-)
|
|
17 |
|
|
18 |
diff --git a/src/base-headerbar.vala b/src/base-headerbar.vala
|
|
19 |
index 8cb5774..315746f 100644
|
|
20 |
--- a/src/base-headerbar.vala
|
|
21 |
+++ b/src/base-headerbar.vala
|
|
22 |
@@ -20,7 +20,7 @@ using Gtk;
|
|
23 |
[GtkTemplate (ui = "/org/gnome/Taquin/ui/base-headerbar.ui")]
|
|
24 |
private class BaseHeaderBar : NightTimeAwareHeaderBar, AdaptativeWidget
|
|
25 |
{
|
|
26 |
- [GtkChild] protected Box center_box;
|
|
27 |
+ [GtkChild] protected unowned Box center_box;
|
|
28 |
|
|
29 |
construct
|
|
30 |
{
|
|
31 |
@@ -190,13 +190,13 @@ private class BaseHeaderBar : NightTimeAwareHeaderBar, AdaptativeWidget
|
|
32 |
* * default widgets
|
|
33 |
\*/
|
|
34 |
|
|
35 |
- [GtkChild] private Button go_back_button;
|
|
36 |
- [GtkChild] private Separator ltr_left_separator;
|
|
37 |
- [GtkChild] private Label title_label;
|
|
38 |
- [GtkChild] private MenuButton info_button;
|
|
39 |
- [GtkChild] private Separator ltr_right_separator;
|
|
40 |
+ [GtkChild] private unowned Button go_back_button;
|
|
41 |
+ [GtkChild] private unowned Separator ltr_left_separator;
|
|
42 |
+ [GtkChild] private unowned Label title_label;
|
|
43 |
+ [GtkChild] private unowned MenuButton info_button;
|
|
44 |
+ [GtkChild] private unowned Separator ltr_right_separator;
|
|
45 |
|
|
46 |
- [GtkChild] protected Stack quit_button_stack;
|
|
47 |
+ [GtkChild] protected unowned Stack quit_button_stack;
|
|
48 |
|
|
49 |
protected void set_default_widgets_states (string? title_label_text_or_null,
|
|
50 |
bool show_go_back_button,
|
|
51 |
diff --git a/src/base-view.vala b/src/base-view.vala
|
|
52 |
index cc54855..2c74499 100644
|
|
53 |
--- a/src/base-view.vala
|
|
54 |
+++ b/src/base-view.vala
|
|
55 |
@@ -20,7 +20,7 @@ using Gtk;
|
|
56 |
[GtkTemplate (ui = "/org/gnome/Taquin/ui/base-view.ui")]
|
|
57 |
private class BaseView : Stack, AdaptativeWidget
|
|
58 |
{
|
|
59 |
- [GtkChild] protected Grid main_grid;
|
|
60 |
+ [GtkChild] protected unowned Grid main_grid;
|
|
61 |
|
|
62 |
internal virtual bool handle_copy_text (out string copy_text)
|
|
63 |
{
|
|
64 |
@@ -109,7 +109,7 @@ private class BaseView : Stack, AdaptativeWidget
|
|
65 |
* * notifications
|
|
66 |
\*/
|
|
67 |
|
|
68 |
- [GtkChild] private Overlay notifications_overlay;
|
|
69 |
+ [GtkChild] private unowned Overlay notifications_overlay;
|
|
70 |
|
|
71 |
private bool notifications_revealer_created = false;
|
|
72 |
private NotificationsRevealer notifications_revealer;
|
|
73 |
diff --git a/src/base-window.vala b/src/base-window.vala
|
|
74 |
index 2c652ab..02e0de6 100644
|
|
75 |
--- a/src/base-window.vala
|
|
76 |
+++ b/src/base-window.vala
|
|
77 |
@@ -74,9 +74,9 @@ private class BaseWindow : AdaptativeWindow, AdaptativeWidget
|
|
78 |
* * main layout
|
|
79 |
\*/
|
|
80 |
|
|
81 |
- [GtkChild] private Grid main_grid;
|
|
82 |
- [GtkChild] private Button unfullscreen_button;
|
|
83 |
- [GtkChild] private Overlay main_overlay;
|
|
84 |
+ [GtkChild] private unowned Grid main_grid;
|
|
85 |
+ [GtkChild] private unowned Button unfullscreen_button;
|
|
86 |
+ [GtkChild] private unowned Overlay main_overlay;
|
|
87 |
|
|
88 |
protected void add_to_main_overlay (Widget widget)
|
|
89 |
{
|
|
90 |
diff --git a/src/game-actionbar.vala b/src/game-actionbar.vala
|
|
91 |
index e75907e..5ff275f 100644
|
|
92 |
--- a/src/game-actionbar.vala
|
|
93 |
+++ b/src/game-actionbar.vala
|
|
94 |
@@ -28,8 +28,8 @@ private class GameActionBar : Revealer, AdaptativeWidget
|
|
95 |
[CCode (notify = false)] public string window_name { private get; protected construct set; default = "" ; }
|
|
96 |
[CCode (notify = false)] public Widget? game_widget { private get; protected construct ; default = null ; }
|
|
97 |
|
|
98 |
- [GtkChild] private ActionBar action_bar;
|
|
99 |
- [GtkChild] private Label game_label;
|
|
100 |
+ [GtkChild] private unowned ActionBar action_bar;
|
|
101 |
+ [GtkChild] private unowned Label game_label;
|
|
102 |
|
|
103 |
construct
|
|
104 |
{
|
|
105 |
@@ -93,7 +93,7 @@ private class GameActionBar : Revealer, AdaptativeWidget
|
|
106 |
[GtkTemplate (ui = "/org/gnome/Taquin/ui/game-actionbar-placeholder.ui")]
|
|
107 |
private class GameActionBarPlaceHolder : Revealer, AdaptativeWidget
|
|
108 |
{
|
|
109 |
- [GtkChild] private Widget placeholder_child;
|
|
110 |
+ [GtkChild] private unowned Widget placeholder_child;
|
|
111 |
private GameActionBar actionbar;
|
|
112 |
|
|
113 |
internal GameActionBarPlaceHolder (GameActionBar _actionbar)
|
|
114 |
diff --git a/src/game-headerbar.vala b/src/game-headerbar.vala
|
|
115 |
index 94fb7de..324b7bd 100644
|
|
116 |
--- a/src/game-headerbar.vala
|
|
117 |
+++ b/src/game-headerbar.vala
|
|
118 |
@@ -23,8 +23,8 @@ using Gtk;
|
|
119 |
[GtkTemplate (ui = "/org/gnome/Taquin/ui/game-headerbar.ui")]
|
|
120 |
private class GameHeaderBar : BaseHeaderBar, AdaptativeWidget
|
|
121 |
{
|
|
122 |
- [GtkChild] private Button new_game_button;
|
|
123 |
- [GtkChild] private Button back_button;
|
|
124 |
+ [GtkChild] private unowned Button new_game_button;
|
|
125 |
+ [GtkChild] private unowned Button back_button;
|
|
126 |
|
|
127 |
[CCode (notify = false)] public bool window_has_name { private get; protected construct set; default = false; }
|
|
128 |
[CCode (notify = false)] public string window_name { private get; protected construct set; default = ""; }
|
|
129 |
diff --git a/src/new-game-screen.vala b/src/new-game-screen.vala
|
|
130 |
index 3e56b2f..e6919e5 100644
|
|
131 |
--- a/src/new-game-screen.vala
|
|
132 |
+++ b/src/new-game-screen.vala
|
|
133 |
@@ -23,11 +23,11 @@ using Gtk;
|
|
134 |
[GtkTemplate (ui = "/org/gnome/Taquin/ui/new-game-screen.ui")]
|
|
135 |
private class NewGameScreen : Box, AdaptativeWidget
|
|
136 |
{
|
|
137 |
- [GtkChild] private ModelButton modelbutton_one;
|
|
138 |
- [GtkChild] private ModelButton modelbutton_two;
|
|
139 |
+ [GtkChild] private unowned ModelButton modelbutton_one;
|
|
140 |
+ [GtkChild] private unowned ModelButton modelbutton_two;
|
|
141 |
|
|
142 |
- [GtkChild] private Gtk.MenuButton menubutton_one;
|
|
143 |
- [GtkChild] private Gtk.MenuButton menubutton_two;
|
|
144 |
+ [GtkChild] private unowned Gtk.MenuButton menubutton_one;
|
|
145 |
+ [GtkChild] private unowned Gtk.MenuButton menubutton_two;
|
|
146 |
|
|
147 |
construct
|
|
148 |
{
|
|
149 |
@@ -106,12 +106,12 @@ private class NewGameScreen : Box, AdaptativeWidget
|
|
150 |
map.connect (() => games_box.show ());
|
|
151 |
}
|
|
152 |
|
|
153 |
- [GtkChild] private Box games_box;
|
|
154 |
- [GtkChild] private Box options_box;
|
|
155 |
+ [GtkChild] private unowned Box games_box;
|
|
156 |
+ [GtkChild] private unowned Box options_box;
|
|
157 |
|
|
158 |
- [GtkChild] private Label games_label;
|
|
159 |
- [GtkChild] private Label options_label;
|
|
160 |
- [GtkChild] private Separator options_separator;
|
|
161 |
+ [GtkChild] private unowned Label games_label;
|
|
162 |
+ [GtkChild] private unowned Label options_label;
|
|
163 |
+ [GtkChild] private unowned Separator options_separator;
|
|
164 |
|
|
165 |
private bool phone_size = false;
|
|
166 |
private bool extra_thin = false;
|
|
167 |
diff --git a/src/notifications-revealer.vala b/src/notifications-revealer.vala
|
|
168 |
index 8831e3e..92813d5 100644
|
|
169 |
--- a/src/notifications-revealer.vala
|
|
170 |
+++ b/src/notifications-revealer.vala
|
|
171 |
@@ -20,7 +20,7 @@ using Gtk;
|
|
172 |
[GtkTemplate (ui = "/org/gnome/Taquin/ui/notifications-revealer.ui")]
|
|
173 |
private class NotificationsRevealer : Revealer, AdaptativeWidget
|
|
174 |
{
|
|
175 |
- [GtkChild] private Label notification_label;
|
|
176 |
+ [GtkChild] private unowned Label notification_label;
|
|
177 |
|
|
178 |
construct
|
|
179 |
{
|
|
180 |
diff --git a/src/overlayed-list.vala b/src/overlayed-list.vala
|
|
181 |
index 3fbb1c3..18891de 100644
|
|
182 |
--- a/src/overlayed-list.vala
|
|
183 |
+++ b/src/overlayed-list.vala
|
|
184 |
@@ -20,12 +20,12 @@ using Gtk;
|
|
185 |
[GtkTemplate (ui = "/org/gnome/Taquin/ui/overlayed-list.ui")]
|
|
186 |
private abstract class OverlayedList : Overlay, AdaptativeWidget
|
|
187 |
{
|
|
188 |
- [GtkChild] protected ListBox main_list_box;
|
|
189 |
+ [GtkChild] protected unowned ListBox main_list_box;
|
|
190 |
private StyleContext main_list_box_context;
|
|
191 |
protected GLib.ListStore main_list_store = new GLib.ListStore (typeof (Widget));
|
|
192 |
|
|
193 |
- [GtkChild] private ScrolledWindow scrolled;
|
|
194 |
- [GtkChild] private Box edit_mode_box;
|
|
195 |
+ [GtkChild] private unowned ScrolledWindow scrolled;
|
|
196 |
+ [GtkChild] private unowned Box edit_mode_box;
|
|
197 |
|
|
198 |
/*\
|
|
199 |
* * differed construct
|
|
200 |
@@ -45,8 +45,8 @@ private abstract class OverlayedList : Overlay, AdaptativeWidget
|
|
201 |
}
|
|
202 |
|
|
203 |
|
|
204 |
- [GtkChild] private ModelButton enter_edit_mode_button;
|
|
205 |
- [GtkChild] private ModelButton leave_edit_mode_button;
|
|
206 |
+ [GtkChild] private unowned ModelButton enter_edit_mode_button;
|
|
207 |
+ [GtkChild] private unowned ModelButton leave_edit_mode_button;
|
|
208 |
[CCode (notify = false)] public string edit_mode_action_prefix
|
|
209 |
{
|
|
210 |
construct
|
|
211 |
diff --git a/src/registry-placeholder.vala b/src/registry-placeholder.vala
|
|
212 |
index b92c464..c662aff 100644
|
|
213 |
--- a/src/registry-placeholder.vala
|
|
214 |
+++ b/src/registry-placeholder.vala
|
|
215 |
@@ -20,8 +20,8 @@ using Gtk;
|
|
216 |
[GtkTemplate (ui = "/org/gnome/Taquin/ui/registry-placeholder.ui")]
|
|
217 |
private class RegistryPlaceholder : Grid
|
|
218 |
{
|
|
219 |
- [GtkChild] private Label placeholder_label;
|
|
220 |
- [GtkChild] private Image placeholder_image;
|
|
221 |
+ [GtkChild] private unowned Label placeholder_label;
|
|
222 |
+ [GtkChild] private unowned Image placeholder_image;
|
|
223 |
|
|
224 |
[CCode (notify = false)] public string label { internal construct set { placeholder_label.label = value; }}
|
|
225 |
[CCode (notify = false)] public string icon_name { private get; internal construct; }
|