[gnome-games] libgames-support: Build fix for gtk 2.8
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] libgames-support: Build fix for gtk 2.8
- Date: Thu, 9 Jul 2009 23:12:26 +0000 (UTC)
commit 3d6f984587c5708e28875bd7a6e7bbd8e24ef9c4
Author: Christian Persch <chpe gnome org>
Date: Fri Jul 3 23:54:31 2009 +0200
libgames-support: Build fix for gtk 2.8
gtk_widget_get_action only exists since 2.10.
libgames-support/games-conf.c | 9 +++++++++
libgames-support/games-stock.c | 2 +-
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/libgames-support/games-conf.c b/libgames-support/games-conf.c
index 7b89f03..e8edb5b 100644
--- a/libgames-support/games-conf.c
+++ b/libgames-support/games-conf.c
@@ -132,7 +132,11 @@ free_window_state (WindowState *state)
g_free (state->group);
+#if GLIB_CHECK_VERSION (2, 10, 0)
g_slice_free (WindowState, state);
+#else
+ g_free (state);
+#endif
}
static gboolean
@@ -1255,7 +1259,12 @@ games_conf_add_window (GtkWindow *window,
g_return_if_fail (GTK_IS_WINDOW (window));
g_return_if_fail (!GTK_WIDGET_REALIZED (window));
+#if GLIB_CHECK_VERSION (2, 10, 0)
state = g_slice_new0 (WindowState);
+#else
+ state = g_new0 (WindowState, 1);
+#endif
+
state->window = window;
state->group = g_strdup (group);
g_object_set_data_full (G_OBJECT (window), "GamesConf::WindowState",
diff --git a/libgames-support/games-stock.c b/libgames-support/games-stock.c
index 4fc832d..e9055c2 100644
--- a/libgames-support/games-stock.c
+++ b/libgames-support/games-stock.c
@@ -90,7 +90,7 @@ menu_item_select_cb (GtkWidget * widget, GtkStatusbar * statusbar)
context_id = gtk_statusbar_get_context_id (statusbar, "games-tooltip");
-#if GTK_CHECK_VERSION (2, 8, 0)
+#if GTK_CHECK_VERSION (2, 10, 0)
action = gtk_widget_get_action (widget);
#else
action = g_object_get_data (G_OBJECT (widget), "gtk-action");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]