[four-in-a-row/KaKnife/four-in-a-row-vala: 24/65] style update



commit f883d98e2993e37bdca17e230e620204afb3cdd6
Author: Jacob Humphrey <jacob ryan humphrey gmail com>
Date:   Sun Nov 25 13:08:00 2018 -0600

    style update

 src/games-controls-list.vala |  5 ++---
 src/gfx.vala                 |  2 +-
 src/main.vala                | 15 +++++++++------
 src/prefs.vala               | 10 +++++-----
 4 files changed, 17 insertions(+), 15 deletions(-)
---
diff --git a/src/games-controls-list.vala b/src/games-controls-list.vala
index 7f6088a..578c7a8 100644
--- a/src/games-controls-list.vala
+++ b/src/games-controls-list.vala
@@ -142,7 +142,7 @@ public class GamesControlsList : Gtk.ScrolledWindow {
 
             model.get(iter, Columns.CONFKEY_COLUMN, actual_conf_key);
 
-            if (settings.get_int(actual_conf_key) == keyval){
+            if (settings.get_int(actual_conf_key) == keyval) {
                 unused_key = false;
 
                 if (conf_key == actual_conf_key) {
@@ -182,8 +182,7 @@ public class GamesControlsList : Gtk.ScrolledWindow {
             Columns.KEYCODE_COLUMN, keyval,
             Columns.KEYMODS_COLUMN, 0,
             Columns.DEFAULT_KEYCODE_COLUMN, default_keyval,
-            Columns.DEFAULT_KEYMODS_COLUMN, 0
-            );
+            Columns.DEFAULT_KEYMODS_COLUMN, 0);
 
     }
 
diff --git a/src/gfx.vala b/src/gfx.vala
index 07b7f76..18c8a14 100644
--- a/src/gfx.vala
+++ b/src/gfx.vala
@@ -25,7 +25,7 @@ int boardsize = 0;
 int tilesize = 0;
 int offset[6];
 
-namespace Gfx{
+namespace Gfx {
     /* unscaled pixbufs */
     Gdk.Pixbuf pb_tileset_raw;
     Gdk.Pixbuf pb_bground_raw;
diff --git a/src/main.vala b/src/main.vala
index 5160d53..30a6d8a 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -55,7 +55,7 @@ public enum Move {
     DROP
 }
 
-public enum SoundID{
+public enum SoundID {
     DROP,
     I_WIN,
     YOU_WIN,
@@ -582,8 +582,7 @@ void on_help_about(SimpleAction action, Variant? parameter) {
         artists: artists,
         translator_credits: _("translator-credits"),
         logo_icon_name: "four-in-a-row",
-        website: "https://wiki.gnome.org/Apps/Four-in-a-row";
-        );
+        website: "https://wiki.gnome.org/Apps/Four-in-a-row";);
 }
 
 void check_game_state() {
@@ -954,11 +953,13 @@ void create_app(GLib.Application app) {
     css_provider = new Gtk.CssProvider();
     try {
         css_provider.load_from_data("GtkButtonBox{-GtkButtonBox-child-internal-pad-x:0;}\0");
-    } catch (Error error){
+    } catch (Error error) {
         stderr.printf("Could not load UI: %s\n", error.message);
         return;
     }
-    Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), css_provider, 
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+    Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(),
+                                             css_provider,
+                                             Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
 
     builder = new Gtk.Builder.from_file(Config.DATA_DIRECTORY + "/four-in-a-row.ui");
 
@@ -1001,7 +1002,9 @@ void create_app(GLib.Application app) {
     drawarea.valign = Gtk.Align.FILL;
     frame.add(drawarea);
 
-    drawarea.events = Gdk.EventMask.EXPOSURE_MASK | Gdk.EventMask.BUTTON_PRESS_MASK | 
Gdk.EventMask.BUTTON_RELEASE_MASK;
+    drawarea.events = Gdk.EventMask.EXPOSURE_MASK |
+                      Gdk.EventMask.BUTTON_PRESS_MASK |
+                      Gdk.EventMask.BUTTON_RELEASE_MASK;
     drawarea.configure_event.connect(on_drawarea_resize);
     drawarea.draw.connect(on_drawarea_draw);
     drawarea.button_press_event.connect(on_button_press);
diff --git a/src/prefs.vala b/src/prefs.vala
index 427ba40..a84c680 100644
--- a/src/prefs.vala
+++ b/src/prefs.vala
@@ -69,7 +69,7 @@ public void on_toggle_sound(Gtk.ToggleButton t) {
 
 void prefs_init() {
     p.do_sound = settings.get_boolean("sound");
-    p.level[PlayerID.PLAYER1] = Level.HUMAN;           /* Human. Always human. */
+    p.level[PlayerID.PLAYER1] = Level.HUMAN; /* Human. Always human. */
     p.level[PlayerID.PLAYER2] = (Level) settings.get_int("opponent");
     p.keypress[Move.LEFT] = settings.get_int("key-left");
     p.keypress[Move.RIGHT] = settings.get_int("key-right");
@@ -88,11 +88,11 @@ public void settings_changed_cb(string key) {
         p.do_sound = settings.get_boolean("sound");
         ((Gtk.ToggleButton)checkbutton_sound).set_active(p.do_sound);
     } else if (key == "key-left") {
-        p.keypress[Move.LEFT] = settings.get_int( "key-left");
+        p.keypress[Move.LEFT] = settings.get_int("key-left");
     } else if (key == "key-right") {
-        p.keypress[Move.RIGHT] = settings.get_int( "key-right");
+        p.keypress[Move.RIGHT] = settings.get_int("key-right");
     } else if (key == "key-drop") {
-        p.keypress[Move.DROP] = settings.get_int( "key-drop");
+        p.keypress[Move.DROP] = settings.get_int("key-drop");
     } else if (key == "theme-id") {
         int val = sane_theme_id(settings.get_int("theme-id"));
         if (val != p.theme_id) {
@@ -116,7 +116,7 @@ public void on_select_opponent(Gtk.ComboBox w) {
     p.level[PlayerID.PLAYER2] = (Level)value;
     settings.set_int("opponent", value);
     scorebox_reset();
-    who_starts = PlayerID.PLAYER2;             /* This gets reversed in game_reset. */
+    who_starts = PlayerID.PLAYER2; /* This gets reversed in game_reset. */
     game_reset();
 }
 


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