[gnome-2048] Do not notify when unneeded.



commit 04a8cb6e9f164ee20aaff586ca7c93fad14d2d37
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Feb 7 21:24:21 2019 +0100

    Do not notify when unneeded.

 src/game.vala | 4 ++--
 src/grid.vala | 8 ++++----
 src/view.vala | 8 ++++----
 3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/game.vala b/src/game.vala
index 45929db..1abbdca 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -72,7 +72,7 @@ private class Game : Object
     private Clutter.Actor _view_background;
     private Clutter.Actor _view_foreground;
 
-    internal Clutter.Actor view {
+    [CCode (notify = false)] internal Clutter.Actor view {
         internal get { return _view; }
         internal set {
             _view = value;
@@ -99,7 +99,7 @@ private class Game : Object
     * * others
     \*/
 
-    internal long score { internal get; private set; default = 0; }
+    [CCode (notify = true)] internal long score { internal get; private set; default = 0; }
 
     internal void new_game (ref GLib.Settings settings)
     {
diff --git a/src/grid.vala b/src/grid.vala
index 6b47030..773bbd7 100644
--- a/src/grid.vala
+++ b/src/grid.vala
@@ -21,11 +21,11 @@ private class Grid : Object
 {
     private uint8 [,] _grid;
 
-    public int rows { internal get; protected construct; }
-    public int cols { internal get; protected construct; }
+    [CCode (notify = false)] public int rows { internal get; protected construct; }
+    [CCode (notify = false)] public int cols { internal get; protected construct; }
 
-    internal uint target_value          { internal get; internal set; default = 0; }
-    internal bool target_value_reached  { internal get; internal set; default = false; }
+    [CCode (notify = false)] internal uint target_value          { internal get; internal set; default = 0; }
+    [CCode (notify = false)] internal bool target_value_reached  { internal get; internal set; default = 
false; }
 
     construct
     {
diff --git a/src/view.vala b/src/view.vala
index cff1089..b187d02 100644
--- a/src/view.vala
+++ b/src/view.vala
@@ -19,11 +19,11 @@
 
 private class RoundedRectangle : Object
 {
-    internal Clutter.Actor  actor   { internal get; private set; default = new Clutter.Actor (); }
-    internal Clutter.Canvas canvas  { internal get; private set; default = new Clutter.Canvas (); }
+    [CCode (notify = false)] internal Clutter.Actor  actor   { internal get; private set; default = new 
Clutter.Actor (); }
+    [CCode (notify = false)] internal Clutter.Canvas canvas  { internal get; private set; default = new 
Clutter.Canvas (); }
 
     private Clutter.Color _color;
-    public Clutter.Color color {
+    [CCode (notify = false)] public Clutter.Color color {
         get { return _color; }
         construct {
             _color = value;
@@ -86,7 +86,7 @@ private class RoundedRectangle : Object
 
 private class TileView : RoundedRectangle
 {
-    internal uint8 tile_value { internal get; private set; default = 1; }
+    [CCode (notify = false)] internal uint8 tile_value { internal get; private set; default = 1; }
 
     internal TileView (float x, float y, float width, float height, uint8 val)
     {


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