[atomix/wip/gtk3-port: 3/3] Removed games-scores as it was not working anyway
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atomix/wip/gtk3-port: 3/3] Removed games-scores as it was not working anyway
- Date: Sat, 10 Jan 2015 21:35:26 +0000 (UTC)
commit 6ea0c33cb6c932f43eacb2b33a2389f5b7a2abac
Author: Robert Roth <robert roth off gmail com>
Date: Sat Jan 10 23:19:12 2015 +0200
Removed games-scores as it was not working anyway
src/Makefile.am | 5 -
src/games-score.c | 104 -------
src/games-score.h | 57 ----
src/games-scores-backend.c | 335 ----------------------
src/games-scores-backend.h | 68 -----
src/games-scores-dialog-private.h | 53 ----
src/games-scores-dialog.c | 567 -------------------------------------
src/games-scores-dialog.h | 79 -----
src/games-scores.c | 502 --------------------------------
src/games-scores.h | 101 -------
src/main.c | 48 ---
src/main.h | 3 -
12 files changed, 0 insertions(+), 1922 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index e23103a..3975478 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,11 +24,6 @@ atomix_SOURCES = \
games-debug.c games-debug.h \
games-gtk-compat.h \
games-profile.c games-profile.h \
- games-score.c games-score.h \
- games-scores.c games-scores.h \
- games-scores-backend.c games-scores-backend.h \
- games-scores-dialog.c games-scores-dialog.h \
- games-scores-dialog-private.h \
games-show.c games-show.h
atomix_DEPENDENCIES = libatomix.a
diff --git a/src/main.c b/src/main.c
index 49e1d5d..9d37a69 100644
--- a/src/main.c
+++ b/src/main.c
@@ -61,8 +61,6 @@ static void game_init (void);
static void update_statistics (void);
static void view_congratulations (void);
static void calculate_score (void);
-static void log_score (void);
-static void show_scores (gint);
/* ===============================================================
@@ -104,30 +102,6 @@ static void verb_GameUndo_cb (GtkAction * action, gpointer data)
controller_handle_action (GAME_ACTION_UNDO);
}
-static void verb_GameScores_cb (GtkAction * action, gpointer data)
-{
- show_scores (0);
-}
-
-static void
-show_scores (gint pos)
-{
- static GtkWidget *dialog;
-
- if (dialog == NULL) {
- dialog = games_scores_dialog_new (GTK_WINDOW (app->mainwin),
- app->highscores, _("Atomix"));
- }
-
- if (pos > 0) {
- games_scores_dialog_set_hilight (GAMES_SCORES_DIALOG (dialog), pos);
- }
-
- gtk_window_present (GTK_WINDOW (dialog));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_hide (dialog);
-}
-
static void verb_GameExit_cb (GtkAction * action, gpointer data)
{
atomix_exit ();
@@ -206,7 +180,6 @@ static void controller_handle_action (GameAction action)
switch (action)
{
case GAME_ACTION_END:
- log_score ();
level_cleanup_view ();
set_game_not_running_state ();
break;
@@ -233,7 +206,6 @@ static void controller_handle_action (GameAction action)
if (level_manager_is_last_level (app->lm, app->level))
{
view_congratulations ();
- log_score ();
level_cleanup_view ();
set_game_not_running_state ();
}
@@ -377,7 +349,6 @@ static void atomix_exit (void)
if (app->state != GAME_STATE_NOT_RUNNING)
{
- log_score ();
set_game_not_running_state ();
}
@@ -467,19 +438,6 @@ static void calculate_score (void)
app->score = app->score * (2 - (seconds / 300));
}
-static void log_score (void)
-{
- int pos;
- GamesScoreValue hiscore;
-
- if (app->score == 0)
- return;
-
- hiscore.plain = app->score;
- pos = games_scores_add_score (app->highscores, hiscore);
- show_scores (pos);
-}
-
static void view_congratulations (void)
{
GtkWidget *dlg;
@@ -738,7 +696,6 @@ static AtomixApp *create_gui (void)
{"GameUndo", "gtk-undo", NULL, NULL, NULL, G_CALLBACK (verb_GameUndo_cb)},
{"GamePause", NULL, N_("_Pause Game"), NULL, NULL, G_CALLBACK (verb_GamePause_cb)},
{"GameContinue", NULL, N_("_Continue Game"), NULL, NULL, G_CALLBACK (verb_GameContinue_cb)},
- {"GameScores", NULL, N_("_Scores..."), NULL, NULL, G_CALLBACK (verb_GameScores_cb)},
{"GameExit", "gtk-quit", NULL, NULL, NULL, G_CALLBACK (verb_GameExit_cb)},
{"HelpAbout", NULL, N_("About"), NULL, NULL, G_CALLBACK (verb_HelpAbout_cb)}
};
@@ -756,8 +713,6 @@ static AtomixApp *create_gui (void)
" <menuitem action='GamePause'/>"
" <menuitem action='GameContinue'/>"
" <separator/>"
- " <menuitem action='GameScores'/>"
- " <separator/>"
" <menuitem action='GameExit'/>"
" </menu>"
" <menu action='HelpMenu'>"
@@ -833,9 +788,6 @@ int main (int argc, char *argv[])
/* make a few initalisations here */
app = create_gui ();
- app->highscores = games_scores_new ("Atomix", NULL, 0, NULL, NULL, 0,
- GAMES_SCORES_STYLE_PLAIN_DESCENDING);
-
game_init ();
gtk_widget_set_size_request (GTK_WIDGET (app->mainwin), 660, 480);
diff --git a/src/main.h b/src/main.h
index 193adeb..4d44183 100644
--- a/src/main.h
+++ b/src/main.h
@@ -27,8 +27,6 @@
#include "theme-manager.h"
#include "level-manager.h"
#include "goal.h"
-#include "games-scores.h"
-#include "games-scores-dialog.h"
typedef enum
{
@@ -59,7 +57,6 @@ typedef struct
Goal *goal;
gint level_no;
guint score;
- GamesScores *highscores;
} AtomixApp;
void game_level_finished (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]