[Xfce4-commits] <xfce4-panel:devel> * Fix glib 2.14 dependency. Bug 4376.

Nick Schermer nick at xfce.org
Tue Aug 11 20:24:11 CEST 2009


Updating branch refs/heads/devel
         to f4473090c8e8bc0b7668d8ac18b33caef6db2484 (commit)
       from 405cff281441b6a12f92f088217c0cd74077cd57 (commit)

commit f4473090c8e8bc0b7668d8ac18b33caef6db2484
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Sep 11 19:52:18 2008 +0200

    * Fix glib 2.14 dependency. Bug 4376.

 plugins/systray/xfce-tray-widget.c |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/plugins/systray/xfce-tray-widget.c b/plugins/systray/xfce-tray-widget.c
index 20f3595..04714f0 100644
--- a/plugins/systray/xfce-tray-widget.c
+++ b/plugins/systray/xfce-tray-widget.c
@@ -812,13 +812,31 @@ xfce_tray_widget_name_hidden (XfceTrayWidget *tray,
 
 
 
+#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);



More information about the Xfce4-commits mailing list