[gnome-nibbles] Remove useless End Game menu item
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles] Remove useless End Game menu item
- Date: Tue, 19 Aug 2014 00:44:04 +0000 (UTC)
commit a5ac408eda8fa48691c7c7e5391e8dae7ee07df6
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Feb 15 16:50:43 2014 -0600
Remove useless End Game menu item
https://bugzilla.gnome.org/show_bug.cgi?id=722395
src/main.c | 29 +----------------------------
1 files changed, 1 insertions(+), 28 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 90f5cef..9d0219b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -96,10 +96,7 @@ static gboolean new_game_2_cb (GtkWidget * widget, gpointer data);
static gint add_bonus_cb (gpointer data);
-static GSimpleAction *new_game_action;
-static GSimpleAction *end_game_action;
static GSimpleAction *pause_action;
-static GSimpleAction *preferences_action;
gint
game_running (void)
@@ -175,15 +172,6 @@ newgame_activated (GSimpleAction *action,
}
static void
-endgame_activated (GSimpleAction *action,
- GVariant *parameter,
- gpointer user_data)
-{
- end_game ();
-}
-
-
-static void
scores_activated (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
@@ -252,7 +240,6 @@ quit_activated (GSimpleAction *action,
static GActionEntry app_entries[] = {
{ "newgame", newgame_activated, NULL, NULL, NULL },
- { "endgame", endgame_activated, NULL, NULL, NULL },
{ "pause", activate_toggle, NULL, "false", change_pause_state},
{ "preferences", preferences_activated, NULL, NULL, NULL },
{ "scores", scores_activated, NULL, NULL, NULL },
@@ -340,13 +327,10 @@ gboolean
new_game (void)
{
int i;
- g_simple_action_set_enabled (new_game_action, FALSE);
- g_simple_action_set_enabled (end_game_action, TRUE);
g_simple_action_set_enabled (pause_action, TRUE);
- g_simple_action_set_enabled (preferences_action, FALSE);
if (game_running ()) {
- main_id = 0;
+ end_game ();
}
if (!properties->random) {
@@ -415,10 +399,7 @@ end_game (void)
animate_end_game ();
- g_simple_action_set_enabled (new_game_action, TRUE);
- g_simple_action_set_enabled (end_game_action, FALSE);
g_simple_action_set_enabled (pause_action, FALSE);
- g_simple_action_set_enabled (preferences_action, TRUE);
is_paused = FALSE;
}
@@ -612,10 +593,6 @@ activate (GtkApplication* app,
" <attribute name='label' translatable='yes'>_New Game</attribute>"
" <attribute name='action'>app.newgame</attribute>"
" </item>"
- " <item>"
- " <attribute name='label' translatable='yes'>_End Game</attribute>"
- " <attribute name='action'>app.endgame</attribute>"
- " </item>"
" </section>"
" <section>"
" <item>"
@@ -653,12 +630,8 @@ activate (GtkApplication* app,
gtk_application_set_app_menu (GTK_APPLICATION (app), G_MENU_MODEL (gtk_builder_get_object (builder,
"app-menu")));
- new_game_action = G_SIMPLE_ACTION (g_action_map_lookup_action (G_ACTION_MAP (app) , "newgame"));
- end_game_action = G_SIMPLE_ACTION (g_action_map_lookup_action (G_ACTION_MAP (app) , "endgame"));
pause_action = G_SIMPLE_ACTION (g_action_map_lookup_action (G_ACTION_MAP (app) , "pause"));
- preferences_action = G_SIMPLE_ACTION (g_action_map_lookup_action (G_ACTION_MAP (app) , "preferences"));
- g_simple_action_set_enabled (end_game_action, FALSE);
g_simple_action_set_enabled (pause_action, FALSE);
clutter_widget = gtk_clutter_embed_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]