[gnome-games] libgames-support: Build with glib < 2.12
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] libgames-support: Build with glib < 2.12
- Date: Thu, 9 Jul 2009 23:12:11 +0000 (UTC)
commit 3f585d3367a995d50fdf563c6de87bb812a1bf0c
Author: Christian Persch <chpe gnome org>
Date: Fri Jul 3 23:39:40 2009 +0200
libgames-support: Build with glib < 2.12
g_key_file_[sg]et_double is only available since 2.12, so make this
libgames-support/games-conf.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/libgames-support/games-conf.c b/libgames-support/games-conf.c
index b08853a..7b89f03 100644
--- a/libgames-support/games-conf.c
+++ b/libgames-support/games-conf.c
@@ -1060,13 +1060,14 @@ games_conf_get_double (const char *group, const char *key,
g_free (key_name);
return value;
-#elif defined(HAVE_HILDON)
-#warning games_conf_get_double not supported on maemo!
- return 0.0;
-#else
+#elif GLIB_CHECK_VERSION (2, 12, 0)
GamesConfPrivate *priv = instance->priv;
return g_key_file_get_double (priv->key_file, group ? group : priv->main_group, key, error);
+#else
+#warning games_conf_get_double not implemented on glib < 2.12!
+ /* Not supported */
+ return 0.0;
#endif /* HAVE_GNOME */
}
@@ -1088,13 +1089,13 @@ games_conf_set_double (const char *group, const char *key, double value)
key_name = get_gconf_key_name (group, key);
gconf_client_set_float (priv->gconf_client, key_name, value, NULL);
g_free (key_name);
-#elif defined(HAVE_HILDON)
-#warning games_conf_set_double not implemented on maemo!
-#else
+#elif GLIB_CHECK_VERSION (2, 12, 0)
GamesConfPrivate *priv = instance->priv;
g_key_file_set_double (priv->key_file, group ? group : priv->main_group, key, value);
g_signal_emit (instance, signals[VALUE_CHANGED], 0, group, key);
+#else
+#warning games_conf_set_double not implemented on glib < 2.12!
#endif /* HAVE_GNOME */
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]