[gnome-games] aisleriot: Only get the gtk-touchscreen-mode setting on gtk >= 2.10
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] aisleriot: Only get the gtk-touchscreen-mode setting on gtk >= 2.10
- Date: Thu, 9 Jul 2009 23:12:56 +0000 (UTC)
commit d89b7e6cf690fc85afc9538f40af891fcc96d3c5
Author: Christian Persch <chpe gnome org>
Date: Mon Jul 6 01:25:29 2009 +0200
aisleriot: Only get the gtk-touchscreen-mode setting on gtk >= 2.10
aisleriot/board-noclutter.c | 16 ++++++++--------
aisleriot/board.c | 16 ++++++++--------
2 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/aisleriot/board-noclutter.c b/aisleriot/board-noclutter.c
index 39209cb..2dbd8a2 100644
--- a/aisleriot/board-noclutter.c
+++ b/aisleriot/board-noclutter.c
@@ -1387,21 +1387,21 @@ aisleriot_board_settings_update (GtkSettings *settings,
AisleriotBoard *board)
{
AisleriotBoardPrivate *priv = board->priv;
-#ifndef HAVE_HILDON
+#if GTK_CHECK_VERSION (2, 10, 0)
gboolean touchscreen_mode;
-#endif /* !HAVE_HILDON */
+#endif /* GTK >= 2.10.0 */
/* Set up the double-click detection. */
g_object_get (settings,
"gtk-double-click-time", &priv->double_click_time,
-#ifndef HAVE_HILDON
+#if GTK_CHECK_VERSION (2, 10, 0)
"gtk-touchscreen-mode", &touchscreen_mode,
-#endif /* !HAVE_HILDON */
+#endif /* GTK >= 2.10.0 */
NULL);
-#ifndef HAVE_HILDON
+#if GTK_CHECK_VERSION (2, 10, 0)
priv->touchscreen_mode = touchscreen_mode != FALSE;
-#endif /* !HAVE_HILDON */
+#endif /* GTK >= 2.10.0 */
}
/* Note: this unsets the selection! hslot may be equal to priv->selection_slot. */
@@ -2494,10 +2494,10 @@ aisleriot_board_screen_changed (GtkWidget *widget,
aisleriot_board_settings_update (settings, NULL, board);
g_signal_connect (settings, "notify::gtk-double-click-time",
G_CALLBACK (aisleriot_board_settings_update), board);
-#ifndef HAVE_HILDON
+#if GTK_CHECK_VERSION (2, 10, 0)
g_signal_connect (settings, "notify::gtk-touchscreen-mode",
G_CALLBACK (aisleriot_board_settings_update), board);
-#endif /* !HAVE_HILDON */
+#endif /* GTK >= 2.10.0 */
}
static void
diff --git a/aisleriot/board.c b/aisleriot/board.c
index f688349..7aaba39 100644
--- a/aisleriot/board.c
+++ b/aisleriot/board.c
@@ -1520,24 +1520,24 @@ aisleriot_board_settings_update (GtkSettings *settings,
{
AisleriotBoardPrivate *priv = board->priv;
gboolean animations_enabled;
-#ifndef HAVE_HILDON
+#if GTK_CHECK_VERSION (2, 10, 0)
gboolean touchscreen_mode;
-#endif /* !HAVE_HILDON */
+#endif /* GTK >= 2.10.0 */
/* Set up the double-click detection. */
g_object_get (settings,
"gtk-double-click-time", &priv->double_click_time,
"gtk-enable-animations", &animations_enabled,
-#ifndef HAVE_HILDON
+#if GTK_CHECK_VERSION (2, 10, 0)
"gtk-touchscreen-mode", &touchscreen_mode,
-#endif /* !HAVE_HILDON */
+#endif /* GTK >= 2.10.0 */
NULL);
priv->animations_enabled = animations_enabled;
-#ifndef HAVE_HILDON
+#if GTK_CHECK_VERSION (2, 10, 0)
priv->touchscreen_mode = touchscreen_mode != FALSE;
-#endif /* !HAVE_HILDON */
+#endif /* GTK >= 2.10.0 */
}
/* Note: this unsets the selection! */
@@ -2620,10 +2620,10 @@ aisleriot_board_screen_changed (GtkWidget *widget,
G_CALLBACK (aisleriot_board_settings_update), board);
g_signal_connect (settings, "notify::gtk-enable-animations",
G_CALLBACK (aisleriot_board_settings_update), board);
-#ifndef HAVE_HILDON
+#if GTK_CHECK_VERSION (2, 10, 0)
g_signal_connect (settings, "notify::gtk-touchscreen-mode",
G_CALLBACK (aisleriot_board_settings_update), board);
-#endif /* !HAVE_HILDON */
+#endif /* GTK >= 2.10.0 */
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]