[gnome-nibbles] Remove more of the broken scores system



commit 4bf47d434b4491b6641abddeccacede791e35813
Author: Bryan Quigley <bryanquigs src gnome org>
Date:   Fri Sep 6 09:48:57 2013 -0400

    Remove more of the broken scores system

 src/Makefile.am            |    2 -
 src/games-scores-backend.c |  133 --------------------------------------------
 src/games-scores-backend.h |   63 ---------------------
 src/games-scores.c         |   29 ----------
 src/games-scores.h         |    1 -
 src/main.c                 |    2 -
 6 files changed, 0 insertions(+), 230 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 825d1ad..6ca61d0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,8 +23,6 @@ gnome_nibbles_SOURCES = \
        games-scores.h                  \
        games-scores-dialog.c   \
        games-scores-dialog.h   \
-       games-scores-backend.c  \
-       games-scores-backend.h  \
        gnibbles.h \
        gnibbles.c \
        properties.h \
diff --git a/src/games-scores.c b/src/games-scores.c
index 8b097e4..be003ac 100644
--- a/src/games-scores.c
+++ b/src/games-scores.c
@@ -28,14 +28,12 @@
 
 #include <glib/gi18n.h>
 
-#include "games-scores-backend.h"
 #include "games-score.h"
 #include "games-scores.h"
 
 /* The local version of the GamesScoresCategory. */
 typedef struct {
   GamesScoresCategory category;
-  GamesScoresBackend *backend;
 } GamesScoresCategoryInternal;
 
 struct GamesScoresPrivate {
@@ -51,19 +49,12 @@ struct GamesScoresPrivate {
   GamesScoresCategoryInternal dummycat;
 };
 
-void
-games_scores_startup (void)
-{
-  games_scores_backend_startup ();
-}
 
 static void
 games_scores_category_free (GamesScoresCategoryInternal *cat)
 {
   g_free (cat->category.key);
   g_free (cat->category.name);
-  if (cat->backend)
-    g_object_unref (cat->backend);
   g_free (cat);
 }
 
@@ -89,11 +80,6 @@ games_scores_get_current (GamesScores * self)
       return NULL;
   }
 
-  if (cat->backend == NULL) {
-    cat->backend = games_scores_backend_new (priv->style, priv->basename,
-                                             cat->category.key);
-  }
-
   return cat;
 }
 
@@ -193,7 +179,6 @@ games_scores_add_category (GamesScores *self,
   cat = g_new (GamesScoresCategoryInternal, 1);
   cat->category.key = g_strdup (key);
   cat->category.name = g_strdup (name);
-  cat->backend = NULL;
 
   g_hash_table_insert (priv->categories, g_strdup (key), cat);
   priv->catsordered = g_slist_append (priv->catsordered, cat);
@@ -252,8 +237,6 @@ games_scores_add_score (GamesScores * self, GamesScore *score)
 
   cat = games_scores_get_current (self);
 
-  scores_list = games_scores_backend_get_scores (cat->backend);
-
   s = scores_list;
   place = 0;
   n = 0;
@@ -291,9 +274,6 @@ games_scores_add_score (GamesScores * self, GamesScore *score)
     s->next = NULL;
   }
 
-  if (games_scores_backend_set_scores (cat->backend, scores_list) == FALSE)
-    place = 0;
-
   priv->last_score_significant = place > 0;
   priv->last_score_position = place;
   g_object_unref (priv->last_score);
@@ -349,8 +329,6 @@ games_scores_update_score_name (GamesScores * self, gchar * new_name, gchar * ol
 
   cat = games_scores_get_current (self);
 
-  scores_list = games_scores_backend_get_scores (cat->backend);
-
   s = g_list_last (scores_list);
   n = g_list_length (scores_list);
 
@@ -371,8 +349,6 @@ games_scores_update_score_name (GamesScores * self, gchar * new_name, gchar * ol
     n--;
   }
 
-  games_scores_backend_set_scores (cat->backend, scores_list);
-
   g_free (old_name);
 }
 
@@ -414,11 +390,6 @@ games_scores_get (GamesScores * self)
 
   cat = games_scores_get_current (self);
 
-  scores = games_scores_backend_get_scores (cat->backend);
-  /* Tell the backend that we won't be altering the scores so it
-   * can release the lock. */
-  games_scores_backend_discard_scores (cat->backend);
-
   return scores;
 }
 
diff --git a/src/games-scores.h b/src/games-scores.h
index 02e31c6..f24a3f0 100644
--- a/src/games-scores.h
+++ b/src/games-scores.h
@@ -29,7 +29,6 @@
 G_BEGIN_DECLS
 
 #include "games-score.h"
-#include "games-scores-backend.h"
 
 /* How many scores get counted as significant. */
 #define GAMES_SCORES_SIGNIFICANT 10
diff --git a/src/main.c b/src/main.c
index aa8fba1..3051e4b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -741,8 +741,6 @@ main (int argc, char **argv)
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);
 
-  games_scores_startup ();
-
   /*
    * Required because the binary doesn't match the desktop file.
    * Has to be before the call to g_option_context_parse.


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