[gnome-sudoku] Code cleanup as per gnome coding conventions



commit 68875ed5d09a690d98e0aedef0ab08c4f843a3d4
Author: Sahil Sareen <sahil sareen hotmail com>
Date:   Tue Oct 21 18:11:51 2014 +0530

    Code cleanup as per gnome coding conventions
    
    Code convention fixes
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738930

 src/number-picker.vala |    4 ++--
 src/sudoku-view.vala   |   14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/number-picker.vala b/src/number-picker.vala
index 80109d0..e16f385 100644
--- a/src/number-picker.vala
+++ b/src/number-picker.vala
@@ -92,7 +92,7 @@ private class NumberPicker : Gtk.Grid
             label.show ();
 
             clear_button.clicked.connect (() => {
-                number_picked(0);
+                number_picked (0);
             });
         }
 
@@ -115,7 +115,7 @@ private class NumberPicker : Gtk.Grid
     public void set_earmarks (int row, int col)
     {
         for (var i = 0; i < board.max_val; i++)
-            set_earmark (row, col, i, board.is_earmark_enabled(row, col, i + 1));
+            set_earmark (row, col, i, board.is_earmark_enabled (row, col, i + 1));
     }
 
     public bool set_earmark (int row, int col, int index, bool state)
diff --git a/src/sudoku-view.vala b/src/sudoku-view.vala
index 3a3ef58..50882a1 100644
--- a/src/sudoku-view.vala
+++ b/src/sudoku-view.vala
@@ -136,10 +136,10 @@ private class SudokuCellView : Gtk.DrawingArea
         earmark_picker = new NumberPicker (ref game.board, true);
         earmark_picker.earmark_state_changed.connect ((number, state) => {
             if (state)
-                this.game.board.enable_earmark(row, col, number);
+                this.game.board.enable_earmark (row, col, number);
             else
-                this.game.board.disable_earmark(row, col, number);
-            this.game.cell_changed(row, col, value, value);
+                this.game.board.disable_earmark (row, col, number);
+            this.game.cell_changed (row, col, value, value);
             queue_draw ();
         });
         earmark_picker.set_earmarks (row, col);
@@ -248,13 +248,13 @@ private class SudokuCellView : Gtk.DrawingArea
         {
             if ((event.state & ModifierType.CONTROL_MASK) > 0)
             {
-                var new_state = !game.board.is_earmark_enabled(row, col, k_no);
+                var new_state = !game.board.is_earmark_enabled (row, col, k_no);
                 if (earmark_picker.set_earmark (row, col, k_no-1, new_state))
                 {
                     if (new_state)
-                        game.board.enable_earmark(row, col, k_no);
+                        game.board.enable_earmark (row, col, k_no);
                     else
-                        game.board.disable_earmark(row, col, k_no);
+                        game.board.disable_earmark (row, col, k_no);
                     queue_draw ();
                 }
             }
@@ -496,7 +496,7 @@ public class SudokuView : Gtk.AspectFrame
         /* not exactly the tile's edge length: includes the width of a border line (1) */
         double tile_length = ((double) (board_length - 1)) / game.board.cols;
 
-        if (Gtk.Widget.get_default_direction() == Gtk.TextDirection.RTL)
+        if (Gtk.Widget.get_default_direction () == Gtk.TextDirection.RTL)
         {
             c.translate (board_length, 0);
             c.scale (-1, 1);


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