[gnome-games/gnome-2-26] Fix build on hildon
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games/gnome-2-26] Fix build on hildon
- Date: Fri, 12 Jun 2009 10:23:04 -0400 (EDT)
commit f092348c6e3fc5461b02c8f8f932dedabc227764
Author: Christian Persch <chpe gnome org>
Date: Tue Jun 2 00:17:11 2009 +0200
Fix build on hildon
There's no statusbar in the UI on hildon, so guard the statusbar toggle
code with #ifndef HAVE_HILDON.
aisleriot/window.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/aisleriot/window.c b/aisleriot/window.c
index 2f62ec0..ec28605 100644
--- a/aisleriot/window.c
+++ b/aisleriot/window.c
@@ -1010,6 +1010,8 @@ toolbar_toggled_cb (GtkToggleAction *action,
games_conf_set_boolean (NULL, aisleriot_conf_get_key (CONF_SHOW_TOOLBAR), state);
}
+#ifndef HAVE_HILDON
+
static void
statusbar_toggled_cb (GtkToggleAction *action,
AisleriotWindow *window)
@@ -1026,6 +1028,8 @@ statusbar_toggled_cb (GtkToggleAction *action,
games_conf_set_boolean (NULL, aisleriot_conf_get_key (CONF_SHOW_STATUSBAR), state);
}
+#endif /* !HAVE_HILDON */
+
static void
set_fullscreen_actions (AisleriotWindow *window,
gboolean is_fullscreen)
@@ -2236,11 +2240,13 @@ aisleriot_window_init (AisleriotWindow *window)
G_CALLBACK (toolbar_toggled_cb),
FALSE
},
+#ifndef HAVE_HILDON
{ "Statusbar", NULL, N_("_Statusbar"), NULL,
ACTION_TOOLTIP (N_("Show or hide statusbar")),
G_CALLBACK (statusbar_toggled_cb),
FALSE
},
+#endif /* !HAVE_HILDON */
{ "ClickToMove", NULL, N_("_Click to Move"), NULL,
ACTION_TOOLTIP (N_("Pick up and drop cards by clicking")),
G_CALLBACK (clickmove_toggle_cb),
@@ -2609,10 +2615,6 @@ aisleriot_window_init (AisleriotWindow *window)
priv->toolbar_visible = games_conf_get_boolean (NULL, aisleriot_conf_get_key (CONF_SHOW_TOOLBAR), NULL) != FALSE;
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
priv->toolbar_visible);
- action = gtk_action_group_get_action (priv->action_group, "Statusbar");
- priv->statusbar_visible = games_conf_get_boolean (NULL, aisleriot_conf_get_key (CONF_SHOW_STATUSBAR), NULL) != FALSE;
- gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
- priv->statusbar_visible);
action = gtk_action_group_get_action (priv->action_group, "ClickToMove");
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
games_conf_get_boolean (NULL, aisleriot_conf_get_key (CONF_CLICK_TO_MOVE), NULL));
@@ -2623,6 +2625,13 @@ aisleriot_window_init (AisleriotWindow *window)
action = gtk_action_group_get_action (priv->action_group, "RecentMenu");
g_object_set (action, "hide-if-empty", FALSE, NULL);
+#ifndef HAVE_HILDON
+ action = gtk_action_group_get_action (priv->action_group, "Statusbar");
+ priv->statusbar_visible = games_conf_get_boolean (NULL, aisleriot_conf_get_key (CONF_SHOW_STATUSBAR), NULL) != FALSE;
+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
+ priv->statusbar_visible);
+#endif /* !HAVE_HILDON */
+
#ifdef ENABLE_CARD_THEMES_INSTALLER
action = gtk_action_group_get_action (priv->action_group, "InstallThemes");
gtk_action_set_sensitive (action, games_card_themes_can_install_themes (priv->theme_manager));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]