[swell-foop] Code convention fixes
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [swell-foop] Code convention fixes
- Date: Sat, 1 Nov 2014 13:49:40 +0000 (UTC)
commit fa1fbf9245ea8bb51d1d4d83dcc66ecd2a59e697
Author: Sahil Sareen <sahil sareen hotmail com>
Date: Sat Nov 1 13:39:16 2014 +0530
Code convention fixes
Code cleanup as per gnome coding guidelines.
https://bugzilla.gnome.org/show_bug.cgi?id=738937
src/game-view.vala | 12 ++++++------
src/game.vala | 2 +-
src/swell-foop.vala | 8 ++++----
3 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/game-view.vala b/src/game-view.vala
index ec1c664..f6f21dd 100644
--- a/src/game-view.vala
+++ b/src/game-view.vala
@@ -25,14 +25,14 @@ public class GameView : Clutter.Group
public int cursor_x
{
get { return this._cursor_x; }
- set { this._cursor_x = value.clamp(0, game.columns - 1); }
+ set { this._cursor_x = value.clamp (0, game.columns - 1); }
}
private int _cursor_y;
public int cursor_y
{
get { return this._cursor_y; }
- set { this._cursor_y = value.clamp(0, game.rows - 1); }
+ set { this._cursor_y = value.clamp (0, game.rows - 1); }
}
/* A 2D array holding all tiles */
@@ -390,7 +390,7 @@ private class TileActor : Clutter.Actor
var anim_mode = is_zealous ? Clutter.AnimationMode.EASE_OUT_BOUNCE :
Clutter.AnimationMode.EASE_OUT_QUAD;
set_easing_mode (anim_mode);
set_easing_duration (500);
- set_position ( (float)new_x, (float)new_y);
+ set_position ((float) new_x, (float) new_y);
}
}
@@ -429,8 +429,8 @@ public class ScoreActor : Clutter.Group
pivot_point.x = 0.5f;
pivot_point.y = 0.5f;
- this.scene_width = (float)width;
- this.scene_height = (float)height;
+ this.scene_width = (float) width;
+ this.scene_height = (float) height;
this.game_size = game_size;
}
@@ -440,7 +440,7 @@ public class ScoreActor : Clutter.Group
return;
label.set_font_name ("Bitstrem Vera Sans Bold 30");
- label.set_text ("+" + points.to_string());
+ label.set_text ("+" + points.to_string ());
/* The score will be shown repeatedly therefore we need to reset some important properties
* before the actual animation */
diff --git a/src/game.vala b/src/game.vala
index 434a6e5..3688777 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -197,7 +197,7 @@ public class Game : Object
}
/* append closed tiles to not-closed tiles */
- not_closed_tiles.concat ( (owned) closed_tiles);
+ not_closed_tiles.concat ((owned) closed_tiles);
/* update tile array at the current column, not-closed tiles aret at the bottom, closed ones top
*/
for (int y = 0; y < rows; y++)
diff --git a/src/swell-foop.vala b/src/swell-foop.vala
index 063232a..623c295 100644
--- a/src/swell-foop.vala
+++ b/src/swell-foop.vala
@@ -73,7 +73,7 @@ public class SwellFoop : Gtk.Application
var stack = new Gtk.Stack ();
var first_vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 12);
load_css ();
- var logo = new Gtk.Image.from_icon_name ("swell-foop", Gtk.IconSize.DIALOG );
+ var logo = new Gtk.Image.from_icon_name ("swell-foop", Gtk.IconSize.DIALOG);
logo.set_pixel_size (96);
first_vbox.pack_start (logo, false);
var label = new Gtk.Label (_("Welcome to Swell Foop"));
@@ -276,7 +276,7 @@ public class SwellFoop : Gtk.Application
base.shutdown ();
/* Record the score if the game isn't over. */
- if (game != null && !game.has_completed() && game.score > 0)
+ if (game != null && !game.has_completed () && game.score > 0)
complete_cb ();
}
@@ -386,7 +386,7 @@ public class SwellFoop : Gtk.Application
[CCode (cname = "G_MODULE_EXPORT update_colors", instance_pos = -1)]
public void update_colors (Gtk.SpinButton button)
{
- int new_colors = (int) button.get_value();
+ int new_colors = (int) button.get_value ();
if (new_colors == settings.get_int ("colors"))
return;
@@ -475,7 +475,7 @@ public class SwellFoop : Gtk.Application
view.is_zealous = settings.get_boolean ("zealous");
stage.set_size (view.width, view.height);
- clutter_embed.set_size_request ( (int) stage.width, (int) stage.height);
+ clutter_embed.set_size_request ((int) stage.width, (int) stage.height);
game_in_progress = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]