[gnome-robots/wip/libgames-support: 9/22] Signals for libgames-scores. 1st draft.
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-robots/wip/libgames-support: 9/22] Signals for libgames-scores. 1st draft.
- Date: Sun, 28 Jun 2015 20:00:10 +0000 (UTC)
commit 0519074e37685e3a5928ff588a7a2c817954e31c
Author: Nikhar Agrawal <nikharagrawal2006 gmail com>
Date: Fri Aug 15 23:24:02 2014 +0530
Signals for libgames-scores. 1st draft.
Signals mechanism doesn't work.
src/gnome-robots.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-robots.c b/src/gnome-robots.c
index 55b02cb..4324471 100644
--- a/src/gnome-robots.c
+++ b/src/gnome-robots.c
@@ -55,6 +55,7 @@ static gboolean window_is_maximized = FALSE;
GtkWidget *game_area = NULL;
GamesScoresContext *highscores;
GSettings *settings;
+GamesScoresCategory cat = {"",""};
/**********************************************************************/
/**********************************************************************/
@@ -305,6 +306,13 @@ shutdown (GtkApplication *app, gpointer user_data)
g_settings_set_boolean (settings, "window-is-maximized", window_is_maximized);
}
+GamesScoresCategory *create_category_from_key (GamesScoresContext *context, gpointer key)
+{
+ cat.key = (gchar*) key;
+ cat.name = "whoa";
+ return &cat;
+}
+
static void
activate (GtkApplication *app, gpointer user_data)
{
@@ -395,7 +403,7 @@ activate (GtkApplication *app, gpointer user_data)
_("Game Type"),
window,
GAMES_SCORES_STYLE_PLAIN_DESCENDING);
-
+ g_signal_connect (GTK_WINDOW (highscores), "request-category", G_CALLBACK (create_category_from_key),
NULL);
gtk_widget_show_all (window);
if (!load_game_configs ()) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]