Author: nick
Date: 2008-09-11 17:50:04 +0000 (Thu, 11 Sep 2008)
New Revision: 27822
Modified:
xfce4-panel/trunk/plugins/systray/xfce-tray-widget.c
Log:
Fix dependency on glib 2.14, bug 4376
Modified: xfce4-panel/trunk/plugins/systray/xfce-tray-widget.c
===================================================================
--- xfce4-panel/trunk/plugins/systray/xfce-tray-widget.c 2008-09-11
17:22:55 UTC (rev 27821)
+++ xfce4-panel/trunk/plugins/systray/xfce-tray-widget.c 2008-09-11
17:50:04 UTC (rev 27822)
@@ -814,13 +814,31 @@
+#if !GLIB_CHECK_VERSION (2,14,0)
+static void
+xfce_tray_widget_name_list_foreach (gpointer key,
+ gpointer value,
+ gpointer user_data)
+{
+ GList **keys = user_data;
+
+ *keys = g_list_prepend (*keys, key);
+}
+#endif
+
+
+
GList *
xfce_tray_widget_name_list (XfceTrayWidget *tray)
{
- GList *keys;
+ GList *keys = NULL;
+#if !GLIB_CHECK_VERSION (2,14,0)
+ g_hash_table_foreach (tray->names, xfce_tray_widget_name_list_foreach,
&keys);
+#else
/* get the hash table keys */
keys = g_hash_table_get_keys (tray->names);
+#endif
/* sort the list */
keys = g_list_sort (keys, (GCompareFunc) strcmp);
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits