changeset 32266:f28a09bfe22c

Fix compile with glib<2.26.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 08 Oct 2011 02:44:27 +0000
parents 7ccd24d49904
children 512d781a5849
files pidgin/gtkconv-theme.c
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv-theme.c	Sat Oct 08 02:37:14 2011 +0000
+++ b/pidgin/gtkconv-theme.c	Sat Oct 08 02:44:27 2011 +0000
@@ -83,7 +83,9 @@
  *****************************************************************************/
 
 static GObjectClass *parent_class = NULL;
+#if GLIB_CHECK_VERSION(2,26,0)
 static GParamSpec *properties[PROP_LAST];
+#endif
 
 /******************************************************************************
  * Helper Functions
@@ -507,15 +509,18 @@
 			G_TYPE_HASH_TABLE,
 			G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
 	g_object_class_install_property(obj_class, PROP_INFO, pspec);
+#if GLIB_CHECK_VERSION(2,26,0)
 	properties[PROP_INFO] = pspec;
+#endif
 
 	/* VARIANT */
 	pspec = g_param_spec_string("variant", "Variant",
 			"The current variant for this theme",
 			NULL, G_PARAM_READWRITE);
 	g_object_class_install_property(obj_class, PROP_VARIANT, pspec);
+#if GLIB_CHECK_VERSION(2,26,0)
 	properties[PROP_VARIANT] = pspec;
-
+#endif
 }
 
 GType
@@ -680,7 +685,11 @@
 pidgin_conversation_theme_set_variant(PidginConvTheme *theme, const char *variant)
 {
 	_set_variant(theme, variant);
+#if GLIB_CHECK_VERSION(2,26,0)
 	g_object_notify_by_pspec(G_OBJECT(theme), properties[PROP_VARIANT]);
+#else
+	g_object_notify(G_OBJECT(theme), "variant");
+#endif
 }
 
 const GList *