summaryrefslogtreecommitdiff
path: root/games-arcade/gnome-nibbles/files/gnome-nibbles-3.38.2-vala-0.50.4-GtkChild-1.patch
blob: c7a86316925e9ee60c83076abbce493a921c2206 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From 1b48446068608aff9b5edf1fdbd4b8c0d9f0be94 Mon Sep 17 00:00:00 2001
From: Rico Tzschichholz <ricotz@ubuntu.com>
Date: Sat, 16 Jan 2021 13:56:10 +0100
Subject: [PATCH] Don't alter or try to write [GtkChild] fields

See https://gitlab.gnome.org/GNOME/vala/issues/1121
---
 src/controls.vala | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/controls.vala b/src/controls.vala
index 4f07358..584c9ff 100644
--- a/src/controls.vala
+++ b/src/controls.vala
@@ -140,25 +140,25 @@ private class ControlsGrid : Button
         arrow_left.set_from_pixbuf  (arrow.rotate_simple (Gdk.PixbufRotation.COUNTERCLOCKWISE));
         arrow_right.set_from_pixbuf (arrow.rotate_simple (Gdk.PixbufRotation.CLOCKWISE));
 
-           up_handler = worm_props.notify ["up"].connect    (() => configure_label (worm_props.up,    ref move_up_label));
-         down_handler = worm_props.notify ["down"].connect  (() => configure_label (worm_props.down,  ref move_down_label));
-         left_handler = worm_props.notify ["left"].connect  (() => configure_label (worm_props.left,  ref move_left_label));
-        right_handler = worm_props.notify ["right"].connect (() => configure_label (worm_props.right, ref move_right_label));
-
-        configure_label (worm_props.up,    ref move_up_label);
-        configure_label (worm_props.down,  ref move_down_label);
-        configure_label (worm_props.left,  ref move_left_label);
-        configure_label (worm_props.right, ref move_right_label);
+           up_handler = worm_props.notify ["up"].connect    (() => configure_label (worm_props.up,    move_up_label));
+         down_handler = worm_props.notify ["down"].connect  (() => configure_label (worm_props.down,  move_down_label));
+         left_handler = worm_props.notify ["left"].connect  (() => configure_label (worm_props.left,  move_left_label));
+        right_handler = worm_props.notify ["right"].connect (() => configure_label (worm_props.right, move_right_label));
+
+        configure_label (worm_props.up,    move_up_label);
+        configure_label (worm_props.down,  move_down_label);
+        configure_label (worm_props.left,  move_left_label);
+        configure_label (worm_props.right, move_right_label);
     }
 
     internal void mark_duplicated_keys (GenericSet<uint> duplicate_keys)
     {
-        set_duplicate_class (worm_props.up    in duplicate_keys, ref move_up_label);
-        set_duplicate_class (worm_props.down  in duplicate_keys, ref move_down_label);
-        set_duplicate_class (worm_props.left  in duplicate_keys, ref move_left_label);
-        set_duplicate_class (worm_props.right in duplicate_keys, ref move_right_label);
+        set_duplicate_class (worm_props.up    in duplicate_keys, move_up_label);
+        set_duplicate_class (worm_props.down  in duplicate_keys, move_down_label);
+        set_duplicate_class (worm_props.left  in duplicate_keys, move_left_label);
+        set_duplicate_class (worm_props.right in duplicate_keys, move_right_label);
     }
-    private static void set_duplicate_class (bool new_value, ref Label label)
+    private static void set_duplicate_class (bool new_value, Label label)
     {
         if (new_value)
             label.get_style_context ().add_class ("duplicate");
@@ -175,7 +175,7 @@ private class ControlsGrid : Button
         worm_props.disconnect (color_handler);
     }
 
-    private static void configure_label (uint key_value, ref Label label)
+    private static void configure_label (uint key_value, Label label)
     {
         string? key_name = Gdk.keyval_name (key_value);
         if (key_name == "Up")
-- 
GitLab