gnome-games r8509 - in trunk: aisleriot libgames-support
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8509 - in trunk: aisleriot libgames-support
- Date: Tue, 6 Jan 2009 18:20:49 +0000 (UTC)
Author: chpe
Date: Tue Jan 6 18:20:49 2009
New Revision: 8509
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8509&view=rev
Log:
Build the card themes menu immediately if loading the theme resulted in
the themes list getting loaded (when it was necessary to fall back to
loading just any theme).
Modified:
trunk/aisleriot/window.c
trunk/libgames-support/games-card-themes.c
trunk/libgames-support/games-card-themes.h
Modified: trunk/aisleriot/window.c
==============================================================================
--- trunk/aisleriot/window.c (original)
+++ trunk/aisleriot/window.c Tue Jan 6 18:20:49 2009
@@ -2575,6 +2575,14 @@
#endif
#endif
+ /* It's possible that the themes list has already been loaded (e.g.
+ * if the theme loading above involved the fallback); in that case
+ * we need to update the menu right now.
+ */
+ if (games_card_themes_get_themes_loaded (priv->theme_manager))
+ install_card_theme_menu (priv->theme_manager, window);
+
+ /* Rebuild the themes menu when the themes list changes */
g_signal_connect (priv->theme_manager, "changed",
G_CALLBACK (install_card_theme_menu), window);
Modified: trunk/libgames-support/games-card-themes.c
==============================================================================
--- trunk/libgames-support/games-card-themes.c (original)
+++ trunk/libgames-support/games-card-themes.c Tue Jan 6 18:20:49 2009
@@ -617,6 +617,19 @@
}
/**
+ * games_card_themes_get_themes_loaded:
+ *
+ * Returns: %TRUE iff the themes list has been loaded
+ */
+gboolean
+games_card_themes_get_themes_loaded (GamesCardThemes *theme_manager)
+{
+ g_return_val_if_fail (GAMES_IS_CARD_THEMES (theme_manager), FALSE);
+
+ return theme_manager->theme_infos_loaded;
+}
+
+/**
* games_card_themes_get_themes:
*
* Gets the list of known themes. Note that you may need to call
Modified: trunk/libgames-support/games-card-themes.h
==============================================================================
--- trunk/libgames-support/games-card-themes.h (original)
+++ trunk/libgames-support/games-card-themes.h Tue Jan 6 18:20:49 2009
@@ -45,6 +45,8 @@
void games_card_themes_request_themes (GamesCardThemes *theme_manager);
+gboolean games_card_themes_get_themes_loaded (GamesCardThemes *theme_manager);
+
GList *games_card_themes_get_themes (GamesCardThemes *theme_manager);
GamesCardTheme *games_card_themes_get_theme (GamesCardThemes *theme_manager,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]