[tali/sils/coala1: 2/2] Correct spacing



commit 229f9a3a9f204000dc0dd1d01079eec07d04cdc4
Author: Lasse Schuirmann <lasse schuirmann gmail com>
Date:   Mon Aug 15 11:57:01 2016 +0200

    Correct spacing

 data/icons/Makefile.am     |    2 +-
 help/C/legal.xml           |   66 +++++++++---------
 src/Makefile.am            |   22 +++---
 src/clist.c                |   52 +++++++-------
 src/computer.c             |   58 ++++++++--------
 src/games-score.c          |   16 ++--
 src/games-scores-backend.c |   10 ++--
 src/games-scores-backend.h |    2 +-
 src/games-scores-dialog.c  |  156 ++++++++++++++++++++++----------------------
 src/games-scores-dialog.h  |    6 +-
 src/games-scores.c         |   18 +++---
 src/games-scores.h         |    8 +-
 src/gyahtzee.c             |   90 +++++++++++++-------------
 src/gyahtzee.h             |    6 +-
 src/setup.c                |   46 +++++++-------
 src/yahtzee.c              |    8 +-
 src/yahtzee.h              |    4 +-
 17 files changed, 285 insertions(+), 285 deletions(-)
---
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index e5c40ff..149f506 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -21,7 +21,7 @@ EXTRA_DIST = \
        $(icon16_DATA) \
        $(icon22_DATA) \
        $(icon24_DATA) \
-       $(icon32_DATA) \ 
+       $(icon32_DATA) \
        $(icon48_DATA) \
        $(icon256_DATA) \
        $(icon512_DATA) \
diff --git a/help/C/legal.xml b/help/C/legal.xml
index 899282c..fdafbcb 100644
--- a/help/C/legal.xml
+++ b/help/C/legal.xml
@@ -1,38 +1,38 @@
   <legalnotice id="legalnotice">
-       <para>
-         Permission is granted to copy, distribute and/or modify this
-         document under the terms of the GNU Free Documentation
-         License (GFDL), Version 1.1 or any later version published
-         by the Free Software Foundation with no Invariant Sections,
-         no Front-Cover Texts, and no Back-Cover Texts.  You can find
-         a copy of the GFDL at this <ulink type="help"
-         url="help:fdl">link</ulink> or in the file COPYING-DOCS
-         distributed with this manual.
+        <para>
+          Permission is granted to copy, distribute and/or modify this
+          document under the terms of the GNU Free Documentation
+          License (GFDL), Version 1.1 or any later version published
+          by the Free Software Foundation with no Invariant Sections,
+          no Front-Cover Texts, and no Back-Cover Texts.  You can find
+          a copy of the GFDL at this <ulink type="help"
+          url="help:fdl">link</ulink> or in the file COPYING-DOCS
+          distributed with this manual.
          </para>
          <para> This manual is part of a collection of GNOME manuals
           distributed under the GFDL.  If you want to distribute this
           manual separately from the collection, you can do so by
           adding a copy of the license to the manual, as described in
           section 6 of the license.
-       </para>
+        </para>
 
-       <para>
-         Many of the names used by companies to distinguish their
-         products and services are claimed as trademarks. Where those
-         names appear in any GNOME documentation, and the members of
-         the GNOME Documentation Project are made aware of those
-         trademarks, then the names are in capital letters or initial
-         capital letters.
-       </para>
+        <para>
+          Many of the names used by companies to distinguish their
+          products and services are claimed as trademarks. Where those
+          names appear in any GNOME documentation, and the members of
+          the GNOME Documentation Project are made aware of those
+          trademarks, then the names are in capital letters or initial
+          capital letters.
+        </para>
 
-       <para>
-         DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED
-         UNDER  THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE
-         WITH THE FURTHER UNDERSTANDING THAT:
+        <para>
+          DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED
+          UNDER  THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE
+          WITH THE FURTHER UNDERSTANDING THAT:
 
-         <orderedlist>
-               <listitem>
-                 <para>DOCUMENT IS PROVIDED ON AN "AS IS" BASIS,
+          <orderedlist>
+                <listitem>
+                  <para>DOCUMENT IS PROVIDED ON AN "AS IS" BASIS,
                     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
                     IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
                     THAT THE DOCUMENT OR MODIFIED VERSION OF THE
@@ -49,10 +49,10 @@
                     LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED
                     VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER
                     EXCEPT UNDER THIS DISCLAIMER; AND
-                 </para>
-               </listitem>
-               <listitem>
-                 <para>UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
+                  </para>
+                </listitem>
+                <listitem>
+                  <para>UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
                        THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE),
                        CONTRACT, OR OTHERWISE, SHALL THE AUTHOR,
                        INITIAL WRITER, ANY CONTRIBUTOR, OR ANY
@@ -68,9 +68,9 @@
                        DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT,
                        EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF
                        THE POSSIBILITY OF SUCH DAMAGES.
-                 </para>
-               </listitem>
-         </orderedlist>
-       </para>
+                  </para>
+                </listitem>
+          </orderedlist>
+        </para>
   </legalnotice>
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 617a193..a07e677 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,15 +1,15 @@
 bin_PROGRAMS = tali
 
-tali_SOURCES =       \
-       gyahtzee.c       \
-       gyahtzee.h       \
-       clist.c          \
-       yahtzee.h        \
-       yahtzee.c        \
-       computer.c       \
-       setup.c          \
-       games-frame.c    \
-       games-frame.h    \
+tali_SOURCES =      \
+       gyahtzee.c       \
+       gyahtzee.h       \
+       clist.c          \
+       yahtzee.h        \
+       yahtzee.c        \
+       computer.c       \
+       setup.c          \
+       games-frame.c    \
+       games-frame.h    \
        games-score.h                   \
        games-score.c                   \
        games-scores.c                  \
@@ -34,7 +34,7 @@ tali_CFLAGS = \
        -DLOCALEDIR=\"$(datadir)/locale\" \
        -DICON_THEME_DIRECTORY="\"$(datadir)/icons\"" \
        $(TALI_CFLAGS)
-               
+
 tali_LDADD = \
        $(TALI_LIBS)
 
diff --git a/src/clist.c b/src/clist.c
index 7d3c6e5..2d1fa64 100644
--- a/src/clist.c
+++ b/src/clist.c
@@ -116,7 +116,7 @@ static gint gtk_tree_path_to_row (GtkTreePath *path)
   gint  row;
   if (sscanf (path_str, "%i", &row) != 1) {
     g_warning ("%s: could not convert '%s' to integer\n",
-              G_STRFUNC, path_str);
+               G_STRFUNC, path_str);
     g_free (path_str);
     return -1;
   }
@@ -145,7 +145,7 @@ static gint score_row (GtkTreePath *path)
 
 static void
 row_activated_cb (GtkTreeView * treeview, GtkTreePath * path,
-                 GtkTreeViewColumn * column, gpointer user_data)
+                  GtkTreeViewColumn * column, gpointer user_data)
 {
   int row = score_row (path);
 
@@ -184,7 +184,7 @@ activate_selected_row_idle_cb (gpointer data)
     gtk_tree_view_row_activated (tree, path, column);
   }
 
-  /* Quoted from docs: "The returned GtkTreePath must be freed 
+  /* Quoted from docs: "The returned GtkTreePath must be freed
    * with gtk_tree_path_free() when you are done with it." */
   gtk_tree_path_free (path);
 
@@ -194,7 +194,7 @@ activate_selected_row_idle_cb (gpointer data)
 /* Returns: FALSE to let the GtkTreeView focus the selected row */
 static gboolean
 tree_button_press_cb (GtkWidget * widget, GdkEventButton * event,
-                     gpointer data)
+                      gpointer data)
 {
   GtkTreeView *tree = GTK_TREE_VIEW (data);
 
@@ -205,7 +205,7 @@ tree_button_press_cb (GtkWidget * widget, GdkEventButton * event,
     return FALSE;
 
   g_idle_add_full (G_PRIORITY_HIGH, activate_selected_row_idle_cb,
-                  (gpointer) tree, NULL);
+                   (gpointer) tree, NULL);
 
   return FALSE;
 }
@@ -241,9 +241,9 @@ create_score_list (void)
   GtkListStore *store;
 
   store = gtk_list_store_new (MAX_NUMBER_OF_PLAYERS + 3,
-                             G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
-                             G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
-                             G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT);
+                              G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+                              G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
+                              G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT);
   tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
   gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (tree), TRUE);
   gtk_tree_view_set_enable_search (GTK_TREE_VIEW (tree), FALSE);
@@ -252,9 +252,9 @@ create_score_list (void)
   g_object_unref (store);
 
   g_signal_connect (G_OBJECT (tree), "row-activated",
-                   G_CALLBACK (row_activated_cb), NULL);
+                    G_CALLBACK (row_activated_cb), NULL);
   g_signal_connect (G_OBJECT (tree), "button-press-event",
-                   G_CALLBACK (tree_button_press_cb), (gpointer) tree);
+                    G_CALLBACK (tree_button_press_cb), (gpointer) tree);
   g_signal_connect (G_OBJECT (tree), "query-tooltip",
             G_CALLBACK (tree_query_tooltip_cb), (gpointer) tree);
 
@@ -273,9 +273,9 @@ add_columns (GtkTreeView * tree)
   /* Create columns */
   renderer = gtk_cell_renderer_text_new ();
   column = gtk_tree_view_column_new_with_attributes ("", renderer,
-                                                    "text", 0,
-                                                    "weight", LAST_COL,
-                                                    NULL);
+                                                     "text", 0,
+                                                     "weight", LAST_COL,
+                                                     NULL);
   g_object_set (renderer, "weight-set", TRUE, NULL);
   gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
   for (i = 0; i < MAX_NUMBER_OF_PLAYERS; i++) {
@@ -291,8 +291,8 @@ add_columns (GtkTreeView * tree)
     column = gtk_tree_view_column_new ();
     gtk_tree_view_column_pack_start (column, renderer, TRUE);
     gtk_tree_view_column_set_attributes (column, renderer,
-                                        "text", i + 1,
-                                        "weight", LAST_COL, NULL);
+                                         "text", i + 1,
+                                         "weight", LAST_COL, NULL);
     gtk_tree_view_column_set_min_width (column, 95);
     gtk_tree_view_column_set_alignment (column, 1.0);
     label = gtk_label_new (players[i].name);
@@ -303,14 +303,14 @@ add_columns (GtkTreeView * tree)
   }
   renderer = gtk_cell_renderer_text_new ();
   column = gtk_tree_view_column_new_with_attributes ("", renderer, "text",
-                                                    MAX_NUMBER_OF_PLAYERS
-                                                    + 1, NULL);
+                                                     MAX_NUMBER_OF_PLAYERS
+                                                     + 1, NULL);
   gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
 }
 
 void
 score_list_set_column_title (GtkWidget * treeview, int column,
-                            const char *str)
+                             const char *str)
 {
   GtkTreeViewColumn *col;
   GtkWidget *label;
@@ -373,31 +373,31 @@ setup_score_list (GtkWidget * treeview)
   for (i = 0; i < NUM_UPPER; i++) {
     gtk_list_store_append (store, &iter);
     gtk_list_store_set (store, &iter, 0, _(FieldLabels[i]),
-                       LAST_COL, PANGO_WEIGHT_NORMAL, -1);
+                        LAST_COL, PANGO_WEIGHT_NORMAL, -1);
   }
 
   gtk_list_store_append (store, &iter);
   gtk_list_store_set (store, &iter, 0, _(FieldLabels[F_BONUS]),
-                     LAST_COL, PANGO_WEIGHT_BOLD, -1);
+                      LAST_COL, PANGO_WEIGHT_BOLD, -1);
   gtk_list_store_append (store, &iter);
   gtk_list_store_set (store, &iter, 0, _(FieldLabels[F_UPPERT]),
-                     LAST_COL, PANGO_WEIGHT_BOLD, -1);
+                      LAST_COL, PANGO_WEIGHT_BOLD, -1);
   gtk_list_store_append (store, &iter);
   gtk_list_store_set (store, &iter, 0, "", -1);
 
   for (i = 0; i < NUM_LOWER; i++) {
     gtk_list_store_append (store, &iter);
     gtk_list_store_set (store, &iter,
-                       0, _(FieldLabels[i + NUM_UPPER]),
-                       LAST_COL, PANGO_WEIGHT_NORMAL, -1);
+                        0, _(FieldLabels[i + NUM_UPPER]),
+                        LAST_COL, PANGO_WEIGHT_NORMAL, -1);
   }
 
   gtk_list_store_append (store, &iter);
   gtk_list_store_set (store, &iter, 0, _(FieldLabels[F_LOWERT]),
-                     LAST_COL, PANGO_WEIGHT_BOLD, -1);
+                      LAST_COL, PANGO_WEIGHT_BOLD, -1);
   gtk_list_store_append (store, &iter);
   gtk_list_store_set (store, &iter, 0, _(FieldLabels[F_GRANDT]),
-                     LAST_COL, PANGO_WEIGHT_BOLD, -1);
+                      LAST_COL, PANGO_WEIGHT_BOLD, -1);
 }
 
 void
@@ -417,7 +417,7 @@ update_score_tooltips (void)
     }
 }
 
-/* Arrgh - lets all use the same tabs under emacs: 
+/* Arrgh - lets all use the same tabs under emacs:
 Local Variables:
 tab-width: 8
 c-basic-offset: 8
diff --git a/src/computer.c b/src/computer.c
index 6b0745b..fce8a3c 100644
--- a/src/computer.c
+++ b/src/computer.c
@@ -34,10 +34,10 @@
 
 
 /*
-**     questions are:
-**             0:      none
-**             1:      "what dice to roll again?"
-**             2:      "where do you want to put that?"
+**      questions are:
+**              0:      none
+**              1:      "what dice to roll again?"
+**              2:      "where do you want to put that?"
 */
 
 static int bc_table[MAX_FIELDS];
@@ -57,7 +57,7 @@ BuildTable (int player)
   }
 
 /*
-**     HANDLING UPPER SLOTS
+**      HANDLING UPPER SLOTS
 */
 
   for (i = 0; i < NUM_UPPER; ++i) {
@@ -65,18 +65,18 @@ BuildTable (int player)
       continue;
 
 /*
-**     ok. now we set a base value on the roll based on its count and
-**     how much it is worth to us.
+**      ok. now we set a base value on the roll based on its count and
+**      how much it is worth to us.
 */
     bc_table[i] = (count (i + 1) - 2) * (i + 1) * 4 - (i + 1);
   }
 
 /*
-**     HANDLING LOWER SLOTS
+**      HANDLING LOWER SLOTS
 */
 
 /*
-**     now we look hard at what we got
+**      now we look hard at what we got
 */
 
   /* Small straight */
@@ -133,7 +133,7 @@ BuildTable (int player)
       bc_table[H_YA] = -99;
   }
   else if (find_n_of_a_kind (5, 0)) {
-      bc_table[H_YA] = 150;    /* so he will use it! */
+      bc_table[H_YA] = 150;     /* so he will use it! */
   }
 
   if (DisplayComputerThoughts) {
@@ -144,11 +144,11 @@ BuildTable (int player)
 }
 
 /*
-**     The idea here is to use a Monte Carlo simulation.
-**     For each possible set of dice to roll, try NUM_TRIALS random rolls,
-**     and average the scores. The highest average score will be the set
-**     that we decide to roll.
-**     Currently, this ignores the number of rolls a player has left.
+**      The idea here is to use a Monte Carlo simulation.
+**      For each possible set of dice to roll, try NUM_TRIALS random rolls,
+**      and average the scores. The highest average score will be the set
+**      that we decide to roll.
+**      Currently, this ignores the number of rolls a player has left.
 **  We could try to do a second set of trials when there are two rolls
 **  left, but that would take a lot more CPU time.
 */
@@ -213,21 +213,21 @@ ComputerRolling (int player)
       if (die_comp[ii] & best) {
           DiceValues[ii].sel = 1;
           if (DisplayComputerThoughts)
-             printf ("Reset to roll die %d value %d bit %d comp %d test %d\n", ii, DiceValues[ii].val, ii, 
best, ii & best);
+              printf ("Reset to roll die %d value %d bit %d comp %d test %d\n", ii, DiceValues[ii].val, ii, 
best, ii & best);
       }
       else {
           DiceValues[ii].sel = 0;
           if (DisplayComputerThoughts)
-             printf ("Reset NOT to roll die %d value %d bit %d comp %d test %d\n",
-                     ii, DiceValues[ii].val, ii, best, ii & best);
+              printf ("Reset NOT to roll die %d value %d bit %d comp %d test %d\n",
+                      ii, DiceValues[ii].val, ii, best, ii & best);
       }
   }
 }
 
 /*
-**     what we do here is generate a table of all the choices then choose
-**     the highest value one.  in case of a tie, we go for the lower choice
-**     cause higher choices tend to be easier to better
+**      what we do here is generate a table of all the choices then choose
+**      the highest value one.  in case of a tie, we go for the lower choice
+**      cause higher choices tend to be easier to better
 */
 
 void
@@ -237,7 +237,7 @@ ComputerScoring (int player)
   int best;
   int bestv;
 
-  NumberOfRolls = 3;           /* in case skipped middle */
+  NumberOfRolls = 3;            /* in case skipped middle */
 
   BuildTable (player);
 
@@ -248,24 +248,24 @@ ComputerScoring (int player)
   for (i = NUM_FIELDS - 1; i >= 0; --i) {
     if (player % 2) {
       if (bc_table[i] > bestv) {
-       best = i;
+        best = i;
 
-       bestv = bc_table[i];
+        bestv = bc_table[i];
       }
     }
 
     else {
       if (bc_table[i] >= bestv) {
-       best = i;
+        best = i;
 
-       bestv = bc_table[i];
+        bestv = bc_table[i];
       }
     }
 
     if (DisplayComputerThoughts) {
       fprintf (stderr, "<<BEST>> %s : VALUE = %d\n",
-              _(FieldLabels[best]),
-              bc_table[best]);
+               _(FieldLabels[best]),
+               bc_table[best]);
     }
 
   }
@@ -278,7 +278,7 @@ ComputerScoring (int player)
 
 }
 
-/* Arrgh - lets all use the same tabs under emacs: 
+/* Arrgh - lets all use the same tabs under emacs:
 Local Variables:
 tab-width: 8
 c-basic-offset: 8
diff --git a/src/games-score.c b/src/games-score.c
index cbcc6cd..ee62c97 100644
--- a/src/games-score.c
+++ b/src/games-score.c
@@ -26,16 +26,16 @@ G_DEFINE_TYPE (GamesScore, games_score, G_TYPE_OBJECT)
 struct GamesScorePrivate {
   union {
     guint32 plain;
-    gdouble time_double;               /* minutes.seconds */
+    gdouble time_double;                /* minutes.seconds */
   } value;
   time_t time;
 };
 
 /**
  * games_score_new:
- * 
+ *
  * Creates a new score object.
- * 
+ *
  * Return value: the new #GamesScore
  **/
 GamesScore *
@@ -47,9 +47,9 @@ games_score_new ()
 /**
  * games_score_new_plain:
  * @value: The value of the score.
- * 
+ *
  * Creates a new score object.
- * 
+ *
  * Return value: the new #GamesScore
  **/
 GamesScore *
@@ -63,9 +63,9 @@ games_score_new_plain (guint32 value)
 /**
  * games_score_new_time:
  * @value: The timer value of the score.
- * 
+ *
  * Creates a new score object.
- * 
+ *
  * Return value: the new #GamesScore
  **/
 GamesScore *
@@ -85,7 +85,7 @@ games_score_get_time (GamesScore *score)
 void
 games_score_set_time (GamesScore *score, time_t time)
 {
-  score->priv->time = time;  
+  score->priv->time = time;
 }
 
 guint32
diff --git a/src/games-scores-backend.c b/src/games-scores-backend.c
index 26e2f93..fabd307 100644
--- a/src/games-scores-backend.c
+++ b/src/games-scores-backend.c
@@ -1,4 +1,4 @@
-/* games-scores-backend.c 
+/* games-scores-backend.c
  *
  * Copyright (C) 2005 Callum McKenzie
  *
@@ -108,7 +108,7 @@ games_scores_backend_new (GamesScoreStyle style,
 }
 
 
-/* Get a lock on the scores file. Block until it is available. 
+/* Get a lock on the scores file. Block until it is available.
  * This also supplies the file descriptor we need. The return value
  * is whether we were succesful or not. */
 static gboolean
@@ -171,7 +171,7 @@ games_scores_backend_release_lock (GamesScoresBackend * self)
 /**
  * games_scores_backend_get_scores:
  * @self: the backend to get the scores from
- * 
+ *
  * You can alter the list returned by this function, but you must
  * make sure you set it again with the _set_scores method or discard it
  * with with the _discard_scores method. Otherwise deadlocks will ensue.
@@ -190,7 +190,7 @@ games_scores_backend_get_scores (GamesScoresBackend * self)
   int error;
   ssize_t length, target;
   GList *t;
-  
+
   /* Check for a change in the scores file and update if necessary. */
   error = stat (self->priv->filename, &info);
 
@@ -238,7 +238,7 @@ games_scores_backend_get_scores (GamesScoresBackend * self)
     /* FIXME: These details should be in a sub-class. */
 
     /* Parse the list. We start by breaking it into lines. */
-    /* Since the buffer is null-terminated 
+    /* Since the buffer is null-terminated
      * we can do the string stuff reasonably safely. */
     eol = strchr (buffer, '\n');
     scorestr = buffer;
diff --git a/src/games-scores-backend.h b/src/games-scores-backend.h
index c094431..d97c168 100644
--- a/src/games-scores-backend.h
+++ b/src/games-scores-backend.h
@@ -1,4 +1,4 @@
- /* games-scores-backend.c 
+ /* games-scores-backend.c
   *
   * Copyright (C) 2005 Callum McKenzie
   *
diff --git a/src/games-scores-dialog.c b/src/games-scores-dialog.c
index 9018543..d2b7fe0 100644
--- a/src/games-scores-dialog.c
+++ b/src/games-scores-dialog.c
@@ -79,31 +79,31 @@ games_scores_dialog_class_init (GamesScoresDialogClass *klass)
  * @key: an identifier for the category. This should also be a valid
  * score category for the gnome_score system.
  * @name: the category name
- * 
+ *
  * Adds a new category to combo box selector.
  *
  **/
-static void games_scores_dialog_add_category (GamesScoresDialog *self, 
-                                      const gchar *key, 
-                                      const gchar *name)
+static void games_scores_dialog_add_category (GamesScoresDialog *self,
+                                       const gchar *key,
+                                       const gchar *name)
 {
   gchar *k;
 
   k = g_strdup (key);
 
-  g_hash_table_insert (self->priv->categories, k, 
-                        GINT_TO_POINTER (self->priv->catcounter));
-  g_hash_table_insert (self->priv->catindices, 
-                        GINT_TO_POINTER (self->priv->catcounter),
-                        k);
+  g_hash_table_insert (self->priv->categories, k,
+                         GINT_TO_POINTER (self->priv->catcounter));
+  g_hash_table_insert (self->priv->catindices,
+                         GINT_TO_POINTER (self->priv->catcounter),
+                         k);
   self->priv->catcounter++;
   gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (self->priv->combo), name);
 }
 
 /* This is a helper function for loading the initial list of categories
  * in a _foreach function. If only C had lambda... */
-static void games_scores_dialog_load_categories (GamesScoresCategory *cat, 
-                                                GamesScoresDialog *self) 
+static void games_scores_dialog_load_categories (GamesScoresCategory *cat,
+                                                 GamesScoresDialog *self)
 {
     /* category->name is already translated here! */
     games_scores_dialog_add_category (self, cat->key, cat->name);
@@ -113,14 +113,14 @@ static void games_scores_dialog_load_categories (GamesScoresCategory *cat,
  * set_style:
  * @self: a pointer to a GamesScoresDialog
  * @style: the style to use
- * 
+ *
  * Sets the style of score displayed. e.g. GAMES_SCORES_STYLE_TIME
  * displays the scores as times. Note that the order of the scores
  * is determined at the gnome_score layer but their interpretation
  * is at this layer.
  *
  **/
-static void games_scores_dialog_set_style (GamesScoresDialog *self, GamesScoreStyle style) 
+static void games_scores_dialog_set_style (GamesScoresDialog *self, GamesScoreStyle style)
 {
   const gchar *header;
 
@@ -145,12 +145,12 @@ static void games_scores_dialog_set_style (GamesScoresDialog *self, GamesScoreSt
  * set_category:
  * @self: a pointer to a GamesScoresDialog
  * @key: the category to change to
- * 
+ *
  * Sets the category the scores dialog is displaying.
  *
  **/
-static void games_scores_dialog_set_category (GamesScoresDialog *self, 
-                                             const gchar *key) 
+static void games_scores_dialog_set_category (GamesScoresDialog *self,
+                                              const gchar *key)
 {
   gpointer value;
   int idx;
@@ -166,8 +166,8 @@ static void games_scores_dialog_set_category (GamesScoresDialog *self,
  * new:
  * @domain: the scores domain to use, usually the application name
  * @title: the title for the dialog
- * 
- * Creates a new high scores dialog. Use gtk_dialog_run and 
+ *
+ * Creates a new high scores dialog. Use gtk_dialog_run and
  * gtk_widget_destroy to manage it.
  *
  * Returns: a new widget
@@ -184,7 +184,7 @@ GtkWidget * games_scores_dialog_new (GtkWindow *parent_window, GamesScores *scor
   gtk_window_set_title (GTK_WINDOW (dialog), title);
   gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent_window));
 
-  _games_scores_category_foreach (scores, 
+  _games_scores_category_foreach (scores,
                                   (GamesScoresCategoryForeachFunc) games_scores_dialog_load_categories,
                                   dialog);
 
@@ -222,10 +222,10 @@ static void games_scores_dialog_redraw (GamesScoresDialog *self) {
       dscore = games_score_get_value_as_time ((GamesScore *)scorelist->data);
       score = (int) (100.0 * dscore + 0.5);
       ss = g_strdup_printf (/* Score format for time based scores.
-                              %1$d is the time in minutes, %2$d is the time in seconds */
+                               %1$d is the time in minutes, %2$d is the time in seconds */
                             C_("score-dialog", "%1$dm %2$ds"),
                             score/100, score%100);
-      break; 
+      break;
     case GAMES_SCORES_STYLE_PLAIN_ASCENDING:
     case GAMES_SCORES_STYLE_PLAIN_DESCENDING:
     default:
@@ -243,20 +243,20 @@ static void games_scores_dialog_redraw (GamesScoresDialog *self) {
 /* Change the currently viewed score category. There is a little bit
  * of silly-buggers here to make sure the change is temporary and
  * we end up on the right page next time. */
-static void games_scores_dialog_change_category (GtkComboBox *widget, 
-                                                GamesScoresDialog *self)
+static void games_scores_dialog_change_category (GtkComboBox *widget,
+                                                 GamesScoresDialog *self)
 {
   gchar *catcopy;
   gint idx;
   gchar *newcat;
-  
+
   /* This seems like a bit of a hack, but since we're trying to
    * temporarily change the category it sort of makes sense. */
 
   catcopy = g_strdup (games_scores_get_category (self->priv->scores));
   idx = gtk_combo_box_get_active (widget);
   newcat = g_hash_table_lookup (self->priv->catindices,
-                                GINT_TO_POINTER (idx));
+                                 GINT_TO_POINTER (idx));
 
   games_scores_set_category (self->priv->scores, newcat);
   if (self->priv->preservehilight) {
@@ -275,9 +275,9 @@ static void games_scores_dialog_change_category (GtkComboBox *widget,
 /* FIXME: We should monitor the high scores list (or get games-scores to
  * send us a signal. */
 static void games_scores_dialog_show (GamesScoresDialog *self)
-{ 
+{
   const gchar *cat;
-  
+
   cat = games_scores_get_category (self->priv->scores);
   if (cat)
     games_scores_dialog_set_category (self, cat);
@@ -293,14 +293,14 @@ static void games_scores_dialog_hide (GamesScoresDialog *self) {
 /**
  * set_category_description:
  * @self: a pointer to a GamesScoresDialog
- * @description: A description of the categories 
- * 
+ * @description: A description of the categories
+ *
  * Sets the category description label. i.e. the widget to the
- * left of the category combo box. 
+ * left of the category combo box.
  *
  **/
-void games_scores_dialog_set_category_description (GamesScoresDialog *self, 
-                                                  const gchar *description)
+void games_scores_dialog_set_category_description (GamesScoresDialog *self,
+                                                   const gchar *description)
 {
   gchar *lstr;
 
@@ -314,12 +314,12 @@ void games_scores_dialog_set_category_description (GamesScoresDialog *self,
  * set_message:
  * @self: a pointer to a GamesScoresDialog
  * @message: the message
- * 
+ *
  * Sets the message at the top of the dialog. Pango markup is understood.
  *
  **/
-void games_scores_dialog_set_message (GamesScoresDialog *self, 
-                                     const gchar *message)
+void games_scores_dialog_set_message (GamesScoresDialog *self,
+                                      const gchar *message)
 {
   if ((message == NULL) || (*message == '\0')) {
     gtk_widget_hide (self->priv->message);
@@ -336,7 +336,7 @@ void games_scores_dialog_set_message (GamesScoresDialog *self,
  * @self: a pointer to a GamesScoresDialog
  * @pos: the position in the high score list to hilight. Should be in the
  * range 1 to 10.
- * 
+ *
  * Hilights an entry in the high score list. This is suitable for indicating
  * to the player where the game they just played is.
  *
@@ -353,7 +353,7 @@ void games_scores_dialog_set_hilight (GamesScoresDialog *self, guint pos)
  * set_buttons:
  * @self: a pointer to a GamesScoresDialog
  * @buttons: An or-ed list of GamesScoresButtons
- * 
+ *
  * Changes the button sets at the buttom of the dialog
  *
  **/
@@ -366,38 +366,38 @@ void games_scores_dialog_set_buttons (GamesScoresDialog *self, guint buttons)
   /* The default is a single close button, suitable for the scores
      menu item. */
   if (buttons == 0)
-       buttons = GAMES_SCORES_CLOSE_BUTTON;
+        buttons = GAMES_SCORES_CLOSE_BUTTON;
 
   if (buttons & GAMES_SCORES_QUIT_BUTTON) {
-       gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_QUIT,
-                              GTK_RESPONSE_REJECT);
-      gtk_dialog_set_default_response (GTK_DIALOG (self), 
-                                        GTK_RESPONSE_REJECT);
+        gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_QUIT,
+                               GTK_RESPONSE_REJECT);
+      gtk_dialog_set_default_response (GTK_DIALOG (self),
+                                         GTK_RESPONSE_REJECT);
   }
 
   if (buttons & GAMES_SCORES_UNDO_BUTTON) {
-       gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_UNDO,
-                              GTK_RESPONSE_DELETE_EVENT);
-      gtk_dialog_set_default_response (GTK_DIALOG (self), 
-                                        GTK_RESPONSE_DELETE_EVENT);
+        gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_UNDO,
+                               GTK_RESPONSE_DELETE_EVENT);
+      gtk_dialog_set_default_response (GTK_DIALOG (self),
+                                         GTK_RESPONSE_DELETE_EVENT);
   }
 
   if (buttons & GAMES_SCORES_NEW_GAME_BUTTON) {
-       gtk_dialog_add_button (GTK_DIALOG (self), _("New Game"),
-                              GTK_RESPONSE_ACCEPT);
-      gtk_dialog_set_default_response (GTK_DIALOG (self), 
-                                        GTK_RESPONSE_ACCEPT);
+        gtk_dialog_add_button (GTK_DIALOG (self), _("New Game"),
+                               GTK_RESPONSE_ACCEPT);
+      gtk_dialog_set_default_response (GTK_DIALOG (self),
+                                         GTK_RESPONSE_ACCEPT);
   }
 
   if (buttons & GAMES_SCORES_CLOSE_BUTTON) {
-       gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CLOSE,
-                              GTK_RESPONSE_CLOSE);
-      gtk_dialog_set_default_response (GTK_DIALOG (self), 
-                                        GTK_RESPONSE_CLOSE);
+        gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CLOSE,
+                               GTK_RESPONSE_CLOSE);
+      gtk_dialog_set_default_response (GTK_DIALOG (self),
+                                         GTK_RESPONSE_CLOSE);
   }
 }
 
-static void games_scores_dialog_init (GamesScoresDialog *self) 
+static void games_scores_dialog_init (GamesScoresDialog *self)
 {
   GtkWidget *vbox;
   GtkWidget *scroll;
@@ -411,23 +411,23 @@ static void games_scores_dialog_init (GamesScoresDialog *self)
                                             GamesScoresDialogPrivate);
 
   self->priv->style = GAMES_SCORES_STYLE_PLAIN_DESCENDING;
-  /* These two hashes are the reverse of each other. As an optimisation 
+  /* These two hashes are the reverse of each other. As an optimisation
    * they share the same set of strings (as keys in the first case and
-   * as data in the second). The first hash is responsible for 
+   * as data in the second). The first hash is responsible for
    * deallocating the memory for the strings. These two are only
    * valid as a pair. */
   self->priv->categories = g_hash_table_new_full (g_str_hash, g_str_equal,
-                                                    g_free, NULL);
+                                                     g_free, NULL);
   self->priv->catindices = g_hash_table_new (g_direct_hash, g_direct_equal);
   self->priv->catcounter = 0;
   self->priv->hilight = 0;
   gtk_container_set_border_width (GTK_CONTAINER (self), 5);
   gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (self))), 2);
 
-  g_signal_connect (G_OBJECT (self), "show", 
-                     G_CALLBACK (games_scores_dialog_show), NULL);
-  g_signal_connect (G_OBJECT (self), "hide", 
-                     G_CALLBACK (games_scores_dialog_hide), NULL);
+  g_signal_connect (G_OBJECT (self), "show",
+                      G_CALLBACK (games_scores_dialog_show), NULL);
+  g_signal_connect (G_OBJECT (self), "hide",
+                      G_CALLBACK (games_scores_dialog_hide), NULL);
 
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
@@ -436,17 +436,17 @@ static void games_scores_dialog_init (GamesScoresDialog *self)
 
   scroll = gtk_scrolled_window_new (NULL, NULL);
   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
-                                   GTK_POLICY_AUTOMATIC,
-                                   GTK_POLICY_AUTOMATIC);
+                                    GTK_POLICY_AUTOMATIC,
+                                    GTK_POLICY_AUTOMATIC);
   gtk_widget_set_size_request (scroll, 200, 265);
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll),
-                                        GTK_SHADOW_ETCHED_IN);
+                                         GTK_SHADOW_ETCHED_IN);
   gtk_box_pack_end (GTK_BOX (vbox), scroll, TRUE, TRUE, 0);
-  
+
   self->priv->message = gtk_label_new ("");
   gtk_label_set_use_markup (GTK_LABEL (self->priv->message), TRUE);
-  gtk_label_set_justify (GTK_LABEL (self->priv->message), 
-                          GTK_JUSTIFY_CENTER);    
+  gtk_label_set_justify (GTK_LABEL (self->priv->message),
+                           GTK_JUSTIFY_CENTER);
   gtk_box_pack_start (GTK_BOX (vbox), self->priv->message, FALSE, FALSE, 0);
 
   self->priv->hdiv = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
@@ -458,16 +458,16 @@ static void games_scores_dialog_init (GamesScoresDialog *self)
   self->priv->label = gtk_label_new (NULL);
   gtk_label_set_use_markup (GTK_LABEL (self->priv->label), TRUE);
   gtk_box_pack_start (GTK_BOX (self->priv->catbar), self->priv->label,
-                       FALSE, FALSE, 0);       
- 
+                        FALSE, FALSE, 0);
+
   self->priv->combo = gtk_combo_box_text_new ();
   gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (self->priv->combo), FALSE);
-  gtk_box_pack_start (GTK_BOX (self->priv->catbar), 
-                       self->priv->combo, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (self->priv->catbar),
+                        self->priv->combo, TRUE, TRUE, 0);
   gtk_label_set_mnemonic_widget (GTK_LABEL (self->priv->label), self->priv->combo);
 
-  g_signal_connect (G_OBJECT (self->priv->combo), "changed", 
-                     G_CALLBACK (games_scores_dialog_change_category), self);
+  g_signal_connect (G_OBJECT (self->priv->combo), "changed",
+                      G_CALLBACK (games_scores_dialog_change_category), self);
 
   self->priv->list = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
 
@@ -476,7 +476,7 @@ static void games_scores_dialog_init (GamesScoresDialog *self)
 
   timerenderer = gtk_cell_renderer_text_new ();
   timecolumn = gtk_tree_view_column_new_with_attributes (/* Score dialog column header for the date
-                                                           the score was recorded */
+                                                            the score was recorded */
                                                          _("Date"),
                                                          timerenderer,
                                                          "text", 0,
@@ -490,11 +490,11 @@ static void games_scores_dialog_init (GamesScoresDialog *self)
   column = gtk_tree_view_column_new_with_attributes ("", renderer, "text", 1, NULL);
   g_object_set (G_OBJECT (renderer), "xalign", 1.0, NULL);
   gtk_tree_view_append_column (GTK_TREE_VIEW (listview),
-                                GTK_TREE_VIEW_COLUMN (column));
+                                 GTK_TREE_VIEW_COLUMN (column));
   self->priv->column = column;
- 
+
   gtk_container_add (GTK_CONTAINER (scroll), listview);
-  
+
   games_scores_dialog_set_buttons (self, GAMES_SCORES_CLOSE_BUTTON);
 
   gtk_window_set_destroy_with_parent (GTK_WINDOW (self), TRUE);
diff --git a/src/games-scores-dialog.h b/src/games-scores-dialog.h
index 8b168ae..9b92fba 100644
--- a/src/games-scores-dialog.h
+++ b/src/games-scores-dialog.h
@@ -47,7 +47,7 @@ G_BEGIN_DECLS
 
 typedef enum {
   GAMES_SCORES_CLOSE_BUTTON = 1,
-  GAMES_SCORES_NEW_GAME_BUTTON = 2,    
+  GAMES_SCORES_NEW_GAME_BUTTON = 2,
   GAMES_SCORES_UNDO_BUTTON = 4,
   GAMES_SCORES_QUIT_BUTTON = 8,
 } GamesScoresButtons;
@@ -68,11 +68,11 @@ GType      games_scores_dialog_get_type                 (void);
 GtkWidget *games_scores_dialog_new                      (GtkWindow *parent_window,
                                                          GamesScores *scores,
                                                          const gchar *title);
-void       games_scores_dialog_set_category_description (GamesScoresDialog *self, 
+void       games_scores_dialog_set_category_description (GamesScoresDialog *self,
                                                          const gchar *description);
 void       games_scores_dialog_set_hilight              (GamesScoresDialog *self,
                                                          guint pos);
-void       games_scores_dialog_set_message              (GamesScoresDialog *self, 
+void       games_scores_dialog_set_message              (GamesScoresDialog *self,
                                                          const gchar *message);
 void       games_scores_dialog_set_buttons              (GamesScoresDialog *self,
                                                          guint buttons);
diff --git a/src/games-scores.c b/src/games-scores.c
index fe9d718..18a92f5 100644
--- a/src/games-scores.c
+++ b/src/games-scores.c
@@ -13,8 +13,8 @@
  *
  * You should have received a copy of the GNU Library General Public License
  * along with this library; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  
- * 
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
  */
 
 /* Authors:   Callum McKenzie <callum physics otago ac nz> */
@@ -115,7 +115,7 @@ G_DEFINE_TYPE (GamesScores, games_scores, G_TYPE_OBJECT);
  *   or %NULL to use the default domain
  * @default_category_index: (allow-none): the key of the default category, or %NULL
  * @style: the category style
- * 
+ *
  *
  * Returns: a new #GamesScores object
  */
@@ -134,7 +134,7 @@ games_scores_new (const char *app_name,
 
   /* FIXME: Input sanity checks. */
 
-  /* catsordered is a record of the ordering of the categories. 
+  /* catsordered is a record of the ordering of the categories.
    * Its data is shared with the hash table. */
   self->priv->catsordered = NULL;
 
@@ -224,7 +224,7 @@ games_scores_set_category (GamesScores * self, const gchar * category)
   g_free (priv->currentcat);
   priv->currentcat = g_strdup (category);
 
-  /* FIXME: Check validity of category (Null, the same as current, 
+  /* FIXME: Check validity of category (Null, the same as current,
    * is actually a category) then just set it in the structure. */
 }
 
@@ -266,7 +266,7 @@ games_scores_add_score (GamesScores * self, GamesScore *score)
     /* If beat someone in the list, add us there. */
     if (games_score_compare (priv->style, oldscore, score) < 0) {
       scores_list = g_list_insert_before (scores_list, s,
-                                         g_object_ref (score));
+                                          g_object_ref (score));
       place = n;
       break;
     }
@@ -274,8 +274,8 @@ games_scores_add_score (GamesScores * self, GamesScore *score)
     s = g_list_next (s);
   }
 
-  /* If we haven't placed anywhere and the list still has 
-   * room to grow, put us on the end. 
+  /* If we haven't placed anywhere and the list still has
+   * room to grow, put us on the end.
    * This also handles the empty-file case. */
   if ((place == 0) && (n < GAMES_SCORES_SIGNIFICANT)) {
     place = n + 1;
@@ -440,7 +440,7 @@ games_scores_finalize (GObject * object)
 static void
 games_scores_class_init (GamesScoresClass * klass)
 {
-  GObjectClass *object_class = (GObjectClass *) klass;  
+  GObjectClass *object_class = (GObjectClass *) klass;
   object_class->finalize = games_scores_finalize;
   g_type_class_add_private (klass, sizeof (GamesScoresPrivate));
 }
diff --git a/src/games-scores.h b/src/games-scores.h
index f9180fd..c0fb1e2 100644
--- a/src/games-scores.h
+++ b/src/games-scores.h
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU Library General Public License
  * along with this library; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  */
 
@@ -35,9 +35,9 @@ G_BEGIN_DECLS
 #define GAMES_SCORES_SIGNIFICANT 10
 
 typedef struct {
-  gchar *key;                  /* A unique identifier (warning: this is used to generate the
+  gchar *key;                   /* A unique identifier (warning: this is used to generate the
                          * scores file name, so it should match the old domains) */
-  gchar *name;                 /* A human-readable description. */
+  gchar *name;                  /* A human-readable description. */
 } GamesScoresCategory;
 
 typedef void (*GamesScoresCategoryForeachFunc) (GamesScoresCategory * cat,
@@ -45,7 +45,7 @@ typedef void (*GamesScoresCategoryForeachFunc) (GamesScoresCategory * cat,
 
 #define GAMES_TYPE_SCORES (games_scores_get_type())
 #define GAMES_SCORES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), games_scores_get_type(), GamesScores)
-#define GAMES_SCORES_CONST(obj)        G_TYPE_CHECK_INSTANCE_CAST((obj), games_scores_get_type(), 
GamesScores const)
+#define GAMES_SCORES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), games_scores_get_type(), GamesScores const)
 #define GAMES_SCORES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), games_scores_get_type(), GamesScoresClass)
 #define GAMES_IS_SCORES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), games_scores_get_type ())
 #define GAMES_SCORES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), games_scores_get_type(), 
GamesScoresClass)
diff --git a/src/gyahtzee.c b/src/gyahtzee.c
index 450e4d8..39be04d 100644
--- a/src/gyahtzee.c
+++ b/src/gyahtzee.c
@@ -169,7 +169,7 @@ CheerWinner (void)
   if (winner < 0) {
     for (i = 0; i < NumberOfPlayers; i++) {
       if (total_score (i) == -winner) {
-       ShowoffPlayer (ScoreList, i, 1);
+        ShowoffPlayer (ScoreList, i, 1);
       }
     }
 
@@ -188,7 +188,7 @@ CheerWinner (void)
       } else {
         dialog = games_scores_dialog_new (GTK_WINDOW (window), highscores, _("Tali Scores"));
         message =
-         g_strdup_printf ("<b>%s</b>\n\n%s", _("Congratulations!"),
+          g_strdup_printf ("<b>%s</b>\n\n%s", _("Congratulations!"),
                            pos == 1 ? _("Your score is the best!") :
                            _("Your score has made the top ten."));
         games_scores_dialog_set_message (GAMES_SCORES_DIALOG (dialog), message);
@@ -203,8 +203,8 @@ CheerWinner (void)
 
   if (players[winner].name)
     say (ngettext ("%s wins the game with %d point",
-                  "%s wins the game with %d points", WinningScore),
-        players[winner].name, WinningScore);
+                   "%s wins the game with %d points", WinningScore),
+         players[winner].name, WinningScore);
   else
     say (_("Game over!"));
 
@@ -307,8 +307,8 @@ NextPlayer (void)
   if (players[CurrentPlayer].comp) {
     if (DoDelay) {
       if (!last_timeout)
-       last_timeout = g_timeout_add (DELAY_MS,
-                                     (GSourceFunc) do_computer_turns, NULL);
+        last_timeout = g_timeout_add (DELAY_MS,
+                                      (GSourceFunc) do_computer_turns, NULL);
     } else {
       do_computer_turns ();
     }
@@ -377,12 +377,12 @@ ShowPlayer (int num, int field)
       line = i;
 
       if (i >= NUM_UPPER)
-       line += 3;
+        line += 3;
 
       if (players[num].used[i])
-       score = players[num].score[i];
+        score = players[num].score[i];
       else
-       score = -1;
+        score = -1;
 
       if (test_computer_play == 0) update_score_cell (ScoreList, line, num + 1, score);
     }
@@ -435,7 +435,7 @@ key_press (GtkWidget * widget, GdkEventKey * event, gpointer data)
   }
 
   gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (diceBox[offset]),
-                                    !DiceValues[offset].sel);
+                                     !DiceValues[offset].sel);
 
   return FALSE;
 }
@@ -513,7 +513,7 @@ DeselectAllDice (void)
   if (test_computer_play > 0) return;
   for (i = 0; i < NUMBER_OF_DICE; i++)
     gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (diceBox[i]),
-                                      FALSE);
+                                       FALSE);
 }
 
 /* Callback on dice press */
@@ -606,20 +606,20 @@ about_cb (GSimpleAction * action, GVariant * parameter, gpointer data)
   };
 
   gtk_show_about_dialog (GTK_WINDOW (window),
-                        "name", appName,
-                        "version", VERSION,
-                        "copyright", "Copyright © 1998–2008 "
-                        "Free Software Foundation, Inc.",
-                        "license-type", GTK_LICENSE_GPL_2_0,
-                        "comments", _("A variation on poker with "
-                                      "dice and less money."),
-                        "authors", authors,
-                        "documenters", documenters,
-                        "translator-credits", _("translator-credits"),
-                        "logo-icon-name", "tali",
-                        "website",
-                        "https://wiki.gnome.org/Apps/Tali";,
-                        NULL);
+                         "name", appName,
+                         "version", VERSION,
+                         "copyright", "Copyright © 1998–2008 "
+                         "Free Software Foundation, Inc.",
+                         "license-type", GTK_LICENSE_GPL_2_0,
+                         "comments", _("A variation on poker with "
+                                       "dice and less money."),
+                         "authors", authors,
+                         "documenters", documenters,
+                         "translator-credits", _("translator-credits"),
+                         "logo-icon-name", "tali",
+                         "website",
+                         "https://wiki.gnome.org/Apps/Tali";,
+                         NULL);
 }
 
 void
@@ -628,7 +628,7 @@ ShowHighScores (void)
   if (!dialog)
     dialog = games_scores_dialog_new (GTK_WINDOW (window), highscores, _("Tali Scores"));
 
-  gtk_dialog_run (GTK_DIALOG (dialog));    
+  gtk_dialog_run (GTK_DIALOG (dialog));
   gtk_widget_hide (dialog);
 }
 
@@ -653,12 +653,12 @@ LoadDicePixmaps (void)
 
   for (i = 0; i < NUMBER_OF_PIXMAPS; i++) {
     /* This is not efficient, but it lets us load animated types,
-     * there is no way for us to copy a general GtkImage (the old 
+     * there is no way for us to copy a general GtkImage (the old
      * code had a way for static images). */
     path = g_build_filename (DATA_DIRECTORY, dicefiles[i], NULL);
     path_kismet = g_build_filename (DATA_DIRECTORY, kdicefiles[i], NULL);
 
-    if (g_file_test (path, G_FILE_TEST_EXISTS) && 
+    if (g_file_test (path, G_FILE_TEST_EXISTS) &&
           g_file_test (path_kismet, G_FILE_TEST_EXISTS)) {
 
       for (j = 0; j < NUMBER_OF_DICE; j++) {
@@ -735,7 +735,7 @@ GyahtzeeCreateMainWindow (GApplication *app, gpointer user_data)
   //games_conf_add_window (GTK_WINDOW (window), NULL);
 
   g_signal_connect (GTK_WIDGET (window), "key_press_event",
-                   G_CALLBACK (key_press), NULL);
+                    G_CALLBACK (key_press), NULL);
 
   g_action_map_add_action_entries (G_ACTION_MAP (application), app_entries, G_N_ELEMENTS (app_entries), 
application);
   const gchar *vaccels_undo[] = {"<Primary>z", NULL};
@@ -764,7 +764,7 @@ GyahtzeeCreateMainWindow (GApplication *app, gpointer user_data)
   gtk_widget_show (undo_button);
   gtk_header_bar_pack_start (GTK_HEADER_BAR (hbar), undo_button);
 
-       /*---- Content ----*/
+        /*---- Content ----*/
 
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
@@ -789,12 +789,12 @@ GyahtzeeCreateMainWindow (GApplication *app, gpointer user_data)
   mbutton = gtk_button_new_with_label (_("Roll!"));
   gtk_box_pack_end (GTK_BOX (dicebox), mbutton, FALSE, FALSE, 5);
   g_signal_connect (GTK_BUTTON (mbutton), "clicked",
-                   G_CALLBACK (roll_button_pressed_cb), NULL);
+                    G_CALLBACK (roll_button_pressed_cb), NULL);
   gtk_widget_show (GTK_WIDGET (mbutton));
 
   toolbar = gtk_toolbar_new ();
   gtk_orientable_set_orientation (GTK_ORIENTABLE (toolbar),
-                              GTK_ORIENTATION_VERTICAL);
+                               GTK_ORIENTATION_VERTICAL);
   gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS);
   gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), FALSE);
   gtk_box_pack_end (GTK_BOX (dicebox), toolbar, TRUE, TRUE, 0);
@@ -810,10 +810,10 @@ GyahtzeeCreateMainWindow (GApplication *app, gpointer user_data)
     diceBox[i] = gtk_toggle_tool_button_new ();
     gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (diceBox[i]), tmp);
     g_signal_connect (GTK_TOOL_BUTTON (diceBox[i]), "clicked",
-                     G_CALLBACK (modify_dice), &DiceValues[i]);
+                      G_CALLBACK (modify_dice), &DiceValues[i]);
 
     gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
-                       GTK_TOOL_ITEM (diceBox[i]), -1);
+                        GTK_TOOL_ITEM (diceBox[i]), -1);
 
     gtk_widget_show (GTK_WIDGET (diceBox[i]));
     gtk_widget_show (tmp);
@@ -867,7 +867,7 @@ main (int argc, char *argv[])
   context = g_option_context_new (NULL);
   g_option_context_add_group (context, gtk_get_option_group (TRUE));
   g_option_context_add_main_entries (context, yahtzee_options,
-                                    GETTEXT_PACKAGE);
+                                     GETTEXT_PACKAGE);
   retval = g_option_context_parse (context, &argc, &argv, &error);
   g_option_context_free (context);
   if (!retval) {
@@ -927,10 +927,10 @@ main (int argc, char *argv[])
 
   gtk_window_set_default_icon_name ("tali");
 
-  if (NumberOfComputers == 0)  /* Not set on the command-line. */
+  if (NumberOfComputers == 0)   /* Not set on the command-line. */
     NumberOfComputers = g_settings_get_int (settings, "number-of-computer-opponents");
 
-  if (NumberOfHumans == 0)     /* Not set on the command-line. */
+  if (NumberOfHumans == 0)      /* Not set on the command-line. */
     NumberOfHumans = g_settings_get_int (settings, "number-of-human-opponents");
 
   if (NumberOfHumans < 1)
@@ -957,11 +957,11 @@ main (int argc, char *argv[])
   if (NUM_TRIALS <= 0)
       NUM_TRIALS = g_settings_get_int (settings, "monte-carlo-trials");
 
-  if (DoDelay == 0)            /* Not set on the command-line */
+  if (DoDelay == 0)             /* Not set on the command-line */
     DoDelay = g_settings_get_boolean (settings, "delay-between-rolls");
-  if (DisplayComputerThoughts == 0)    /* Not set on the command-line */
+  if (DisplayComputerThoughts == 0)     /* Not set on the command-line */
     DisplayComputerThoughts = g_settings_get_boolean (settings, "display-computer-thoughts");
-  
+
   /* Read in new player names */
   player_names = g_settings_get_strv (settings, "player-names");
   n_player_names = g_strv_length (player_names);
@@ -970,15 +970,15 @@ main (int argc, char *argv[])
 
     for (i = 0; i < n_player_names; ++i) {
       if (i == 0 && strcasecmp (player_names[i], _("Human")) == 0) {
-       const char *realname;
+        const char *realname;
 
-       realname = g_get_real_name ();
+        realname = g_get_real_name ();
         if (realname && realname[0] && strcmp (realname, "Unknown") != 0) {
           players[i].name = g_locale_to_utf8 (realname, -1, NULL, NULL, NULL);
         }
         if (!players[i].name) {
-         players[i].name = g_strdup (player_names[i]);
-       }
+          players[i].name = g_strdup (player_names[i]);
+        }
       } else {
         players[i].name = g_strdup (player_names[i]);
       }
@@ -992,7 +992,7 @@ main (int argc, char *argv[])
   exit (0);
 }
 
-/* Arrgh - lets all use the same tabs under emacs: 
+/* Arrgh - lets all use the same tabs under emacs:
 Local Variables:
 tab-width: 8
 c-basic-offset: 8
diff --git a/src/gyahtzee.h b/src/gyahtzee.h
index 654d4ba..2cd25fc 100644
--- a/src/gyahtzee.h
+++ b/src/gyahtzee.h
@@ -22,11 +22,11 @@
 extern GtkWidget *create_score_list (void);
 extern void setup_score_list (GtkWidget * scorelist);
 extern void update_score_cell (GtkWidget * scorelist, int row, int col,
-                              int val);
+                               int val);
 extern void ShowoffPlayerColumn (GtkWidget * scorelist, int player, int so);
 extern void ShowoffPlayer (GtkWidget * scorelist, int player, int so);
 extern void score_list_set_column_title (GtkWidget * scorelist, int column,
-                                        const char *str);
+                                         const char *str);
 extern void update_score_tooltips (void);
 /* setup.c */
 extern void setup_game (void);
@@ -41,7 +41,7 @@ extern GtkWidget *ScoreList;
 extern void update_undo_sensitivity(void);
 #endif /* _Gyahtzee_H_ */
 
-/* Arrgh - lets all use the same tabs under emacs: 
+/* Arrgh - lets all use the same tabs under emacs:
 Local Variables:
 tab-width: 8
 c-basic-offset: 8
diff --git a/src/setup.c b/src/setup.c
index 1c7bf5c..dbbe4c3 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -8,7 +8,7 @@
  *
  * Author: Scott Heavner
  *
- *   Contains parser for command line arguments and 
+ *   Contains parser for command line arguments and
  *   code for properties window.
  *
  *   Variables are exported in gyahtzee.h
@@ -117,10 +117,10 @@ WarnNumPlayersChanged (void)
   GtkWidget *mb;
 
   mb = gtk_message_dialog_new (GTK_WINDOW (window), GTK_DIALOG_DESTROY_WITH_PARENT,
-                              GTK_MESSAGE_INFO,
-                              GTK_BUTTONS_OK,
-                              _("Preferences will be updated"
-                                " in the next game."));
+                               GTK_MESSAGE_INFO,
+                               GTK_BUTTONS_OK,
+                               _("Preferences will be updated"
+                                 " in the next game."));
   gtk_window_set_position (GTK_WINDOW (mb), GTK_WIN_POS_MOUSE);
   gtk_dialog_run (GTK_DIALOG (mb));
   gtk_widget_destroy (mb);
@@ -139,7 +139,7 @@ do_setup (GtkWidget * widget, gpointer data)
     gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (ComputerSpinner));
   NumberOfHumans =
     gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (HumanSpinner));
-    
+
   if (tmpDoDelay == -1)
     tmpDoDelay = DoDelay;
   else
@@ -182,7 +182,7 @@ do_setup (GtkWidget * widget, gpointer data)
   g_settings_set_int (settings, "monte-carlo-trials", NUM_TRIALS);
 
   if (((NumberOfComputers != OriginalNumberOfComputers)
-       || (NumberOfHumans != OriginalNumberOfHumans) 
+       || (NumberOfHumans != OriginalNumberOfHumans)
        || (NewGameType != game_type))
       && !GameIsOver ())
     WarnNumPlayersChanged ();
@@ -219,10 +219,10 @@ MaxPlayersCheck (GtkWidget * widget, gpointer * data)
   if ((numc + numh) > MAX_NUMBER_OF_PLAYERS) {
     if (GTK_ADJUSTMENT (data) == GTK_ADJUSTMENT (HumanAdj)) {
       gtk_adjustment_set_value (GTK_ADJUSTMENT (ComputerAdj),
-                               (gfloat) (numc - 1));
+                                (gfloat) (numc - 1));
     } else {
       gtk_adjustment_set_value (GTK_ADJUSTMENT (HumanAdj),
-                               (gfloat) (numh - 1));
+                                (gfloat) (numh - 1));
     }
 
   }
@@ -262,21 +262,21 @@ setup_game (void)
   }
 
   setupdialog = gtk_dialog_new_with_buttons (_("Preferences"),
-                                            GTK_WINDOW (window),
-                                            GTK_DIALOG_USE_HEADER_BAR, NULL);
+                                             GTK_WINDOW (window),
+                                             GTK_DIALOG_USE_HEADER_BAR, NULL);
   gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (setupdialog))), 2);
   gtk_window_set_resizable (GTK_WINDOW (setupdialog), FALSE);
   g_signal_connect (G_OBJECT (setupdialog), "delete_event",
-                   G_CALLBACK (setupdialog_destroy), NULL);
+                    G_CALLBACK (setupdialog_destroy), NULL);
   g_signal_connect (G_OBJECT (setupdialog), "response",
-                   G_CALLBACK (do_setup), NULL);
+                    G_CALLBACK (do_setup), NULL);
 
   grid = gtk_grid_new ();
   gtk_container_set_border_width (GTK_CONTAINER (grid), 5);
   gtk_grid_set_row_spacing (GTK_GRID (grid), 18);
   gtk_grid_set_column_spacing (GTK_GRID (grid), 18);
 
-  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (setupdialog))), 
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (setupdialog))),
                       grid, FALSE, FALSE, 0);
 
   frame = games_frame_new (_("Human Players"));
@@ -285,7 +285,7 @@ setup_game (void)
   box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
   gtk_container_add (GTK_CONTAINER (frame), box);
 
-       /*--- Spinner (number of humans) ---*/
+        /*--- Spinner (number of humans) ---*/
   OriginalNumberOfHumans = NumberOfHumans;
   box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
   gtk_box_pack_start (GTK_BOX (box), box2, FALSE, FALSE, 0);
@@ -293,12 +293,12 @@ setup_game (void)
 
   gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0);
   HumanAdj = gtk_adjustment_new ((gfloat) NumberOfHumans, 1.0,
-                                6.0, 1.0, 6.0, 0.0);
+                                 6.0, 1.0, 6.0, 0.0);
   HumanSpinner = gtk_spin_button_new (GTK_ADJUSTMENT (HumanAdj), 10, 0);
   gtk_label_set_mnemonic_widget (GTK_LABEL (label), HumanSpinner);
 
   g_signal_connect (G_OBJECT (HumanAdj), "value_changed",
-                   G_CALLBACK (MaxPlayersCheck), HumanAdj);
+                    G_CALLBACK (MaxPlayersCheck), HumanAdj);
 
   gtk_box_pack_start (GTK_BOX (box2), HumanSpinner, TRUE, TRUE, 0);
 
@@ -309,14 +309,14 @@ setup_game (void)
   box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
   gtk_container_add (GTK_CONTAINER (frame), box);
 
-       /*--- Button ---*/
+        /*--- Button ---*/
   button = gtk_check_button_new_with_mnemonic (_("_Delay between rolls"));
   gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), DoDelay);
   g_signal_connect (G_OBJECT (button), "clicked",
-                   G_CALLBACK (set_as_int), &tmpDoDelay);
+                    G_CALLBACK (set_as_int), &tmpDoDelay);
 
-       /*--- Spinner (number of computers) ---*/
+        /*--- Spinner (number of computers) ---*/
   OriginalNumberOfComputers = NumberOfComputers;
   box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
   gtk_box_pack_start (GTK_BOX (box), box2, FALSE, FALSE, 0);
@@ -324,12 +324,12 @@ setup_game (void)
   gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0);
 
   ComputerAdj = gtk_adjustment_new ((gfloat) NumberOfComputers,
-                                   0.0, 5.0, 1.0, 5.0, 0.0);
+                                    0.0, 5.0, 1.0, 5.0, 0.0);
   ComputerSpinner = gtk_spin_button_new (GTK_ADJUSTMENT (ComputerAdj), 10, 0);
   gtk_label_set_mnemonic_widget (GTK_LABEL (label), ComputerSpinner);
 
   g_signal_connect (G_OBJECT (ComputerAdj), "value_changed",
-                   G_CALLBACK (MaxPlayersCheck), ComputerAdj);
+                    G_CALLBACK (MaxPlayersCheck), ComputerAdj);
   gtk_box_pack_start (GTK_BOX (box2), ComputerSpinner, TRUE, TRUE, 0);
 
   box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
@@ -361,7 +361,7 @@ setup_game (void)
                     combo);
   gtk_container_add (GTK_CONTAINER (frame), combo);
 
-       /*--- PLAYER NAMES FRAME ----*/
+        /*--- PLAYER NAMES FRAME ----*/
   frame = games_frame_new (_("Player Names"));
   gtk_grid_attach (GTK_GRID (grid), frame, 1, 0, 1, 3);
 
diff --git a/src/yahtzee.c b/src/yahtzee.c
index 0508a9c..95cad5f 100644
--- a/src/yahtzee.c
+++ b/src/yahtzee.c
@@ -355,7 +355,7 @@ find_straight (int run, int notstart, int notrun)
 
     for (j = 0; j < run; ++j)
       if (!count (i + j))
-       break;
+        break;
 
     if (j == run)
       return (i);
@@ -509,7 +509,7 @@ score_kismet (int field) {
   return 0;
 }
 
-FieldInfo field_table[] = { 
+FieldInfo field_table[] = {
   { N_("1s [total of 1s]"),                   0,  0, score_basic },
   { N_("2s [total of 2s]"),                   1,  1, score_basic },
   { N_("3s [total of 3s]"),                   2,  2, score_basic },
@@ -754,7 +754,7 @@ FindWinner (void)
     }
   }
 
-  /* Detect a drawn game. Returning the negative of the score 
+  /* Detect a drawn game. Returning the negative of the score
    * is a bit of a hack, but it allows us to find out who the winners
    * were without having to pass around a list. */
   for (i = 0; i < NumberOfPlayers; ++i) {
@@ -786,7 +786,7 @@ RedoPossible (void)
   return RedoList != NULL;
 }
 
-/* Arrgh - lets all use the same tabs under emacs: 
+/* Arrgh - lets all use the same tabs under emacs:
 Local Variables:
 tab-width: 8
 c-basic-offset: 8
diff --git a/src/yahtzee.h b/src/yahtzee.h
index 6317ae7..56b54ee 100644
--- a/src/yahtzee.h
+++ b/src/yahtzee.h
@@ -14,7 +14,7 @@
 
 #include <glib/gi18n.h>
 
-#define COMPUTER_DELAY 1       /* sec */
+#define COMPUTER_DELAY 1        /* sec */
 
 #define NUM_ROLLS 3
 #define NUMBER_OF_DICE       5
@@ -148,7 +148,7 @@ extern GameType game_type;
 #endif /* _yahtzee_H_ */
 
 
-/* Arrgh - lets all use the same tabs under emacs: 
+/* Arrgh - lets all use the same tabs under emacs:
 Local Variables:
 tab-width: 8
 c-basic-offset: 8


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