[four-in-a-row: 48/72] moved global vars to main



commit bf38f0fbe724f437070d0718120e21fa02051b9b
Author: Jacob Humphrey <jacob ryan humphrey gmail com>
Date:   Sat Dec 15 01:11:49 2018 -0600

    moved global vars to main

 src/four-in-a-row.vala | 2 +-
 src/main.vala          | 4 +++-
 src/prefs.vala         | 9 ---------
 3 files changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/src/four-in-a-row.vala b/src/four-in-a-row.vala
index 0ff5a4f..4c806a8 100644
--- a/src/four-in-a-row.vala
+++ b/src/four-in-a-row.vala
@@ -510,7 +510,7 @@ class FourInARow : Gtk.Application {
         var temp = new Animate(0, this);
         timeout = Timeout.add(SPEED_MOVE, temp.exec);
 
-        blink_tile(0, c, Board.instance.get(0, c), 6);
+        blink_tile(0, c, Board.instance[0, c], 6);
 
         s = _("Hint: Column ")+ (c + 1).to_string();
         set_status_message(s);
diff --git a/src/main.vala b/src/main.vala
index b676904..7fd7a2a 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -81,7 +81,9 @@ SimpleAction new_game_action;
 FourInARow? application;
 Gtk.ApplicationWindow window;
 //Scorebox? scorebox = null;
-
+Settings settings;
+PrefsBox? prefsbox = null;
+Prefs p;
 
 
 public int main(string[] argv) {
diff --git a/src/prefs.vala b/src/prefs.vala
index 9cebc5d..97008b8 100644
--- a/src/prefs.vala
+++ b/src/prefs.vala
@@ -106,17 +106,8 @@ class Prefs {
 
 }
 
-Settings settings;
-PrefsBox? prefsbox = null;
 
 
-/*
- * Needed to force vala to include headers in the correct order.
- * See https://gitlab.gnome.org/GNOME/vala/issues/98
- */
-const string GETTEXT_PACKAGE_CONTENT = Config.GETTEXT_PACKAGE;
-Prefs p;
-
 const uint DEFAULT_KEY_LEFT = Gdk.Key.Left;
 const uint DEFAULT_KEY_RIGHT = Gdk.Key.Right;
 const uint DEFAULT_KEY_DROP = Gdk.Key.Down;


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