[gnome-nibbles] Begun seperation of HUMAN worms from NUMWORMS. Reduced # of human worms to 4. May still switch to 2



commit f7297f6387fdc8e9f86d6a732a736b34003e6ac5
Author: Bryan Quigley <bryanquigs src gnome org>
Date:   Thu Oct 10 09:57:23 2013 -0400

    Begun seperation of HUMAN worms from NUMWORMS.
    Reduced # of human worms to 4.  May still switch to 2.

 src/gnibbles.h    |    1 +
 src/preferences.c |    8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/gnibbles.h b/src/gnibbles.h
index dc8a5f9..32bc863 100644
--- a/src/gnibbles.h
+++ b/src/gnibbles.h
@@ -29,6 +29,7 @@
 #define BLANKPIXMAP 0
 
 #define NUMWORMS 6
+#define NUMHUMWORMS 4
 
 #define NUM_COLORS 7
 #define WORMRED 12
diff --git a/src/preferences.c b/src/preferences.c
index 519a439..c0161d9 100644
--- a/src/preferences.c
+++ b/src/preferences.c
@@ -36,7 +36,7 @@
 #define KB_TEXT_NCHARS 8
 
 extern GSettings *settings;
-extern GSettings *worm_settings[NUMWORMS];
+extern GSettings *worm_settings[NUMHUMWORMS];
 static GtkWidget *pref_dialog = NULL;
 static gint unpause = 0;
 extern GtkWidget *window;
@@ -377,7 +377,7 @@ gnibbles_preferences_cb (GtkWidget * widget, gpointer data)
   gtk_grid_attach (GTK_GRID (grid2), label2, 0, 1, 1, 1);
 
   adjustment = gtk_adjustment_new ((gfloat) properties->human, 0.0,
-                                   NUMWORMS, 1.0, 1.0, 0.0);
+                                   NUMHUMWORMS, 1.0, 1.0, 0.0);
 
   num_human = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 0, 0);
   gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (num_human), FALSE);
@@ -390,7 +390,7 @@ gnibbles_preferences_cb (GtkWidget * widget, gpointer data)
   label2 = gtk_label_new_with_mnemonic (_("Number of _AI players:"));
   gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);
 
-  gtk_widget_set_hexpand (label2, TRUE);  
+  gtk_widget_set_hexpand (label2, TRUE);
   gtk_grid_attach (GTK_GRID (grid2), label2, 0, 2, 1, 1);
 
   adjustment = gtk_adjustment_new ((gfloat) properties->ai, 0.0,
@@ -407,7 +407,7 @@ gnibbles_preferences_cb (GtkWidget * widget, gpointer data)
   
 
   /* Per worm options */
-  for (i = 0; i < NUMWORMS; i++) {
+  for (i = 0; i < NUMHUMWORMS; i++) {
     buffer = g_strdup_printf ("%s %d", _("Worm"), i + 1);
     label = gtk_label_new (buffer);
     g_free (buffer);


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