! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
systray using g_hash_table_get_keys() from glib 2.14
Status:
RESOLVED: FIXED
Product:
Xfce4-panel
Component:
Notification Area

Comments

Description Olivier Fourdan editbugs 2008-09-11 08:36:11 CEST
The systray is using g_hash_table_get_keys() from glib 2.14 and whereas the target was glib 2.12.
Comment 1 Nick Schermer editbugs 2008-09-11 12:58:04 CEST
Yeah pretty stupid I've missed that. Will fix it. WIll use the code below (for personal reference).

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);
}

GList *
xfce_tray_widget_name_list (XfceTrayWidget *tray)
{
    GList *keys = NULL;

    /* get the hash table keys */
#if GLIB_CHECK_VERSION (2,14,0)
    keys = g_hash_table_get_keys (tray->names);
#else
    g_hash_table_foreach (tray->names, xfce_tray_widget_name_list_foreach, &keys);
#endif

    /* sort the list */
    keys = g_list_sort (keys, (GCompareFunc) strcmp);

    return keys;
}
Comment 2 Nick Schermer editbugs 2008-09-11 17:50:37 CEST
Fix in rev 27822.

Bug #4376

Reported by:
Olivier Fourdan
Reported on: 2008-09-11
Last modified on: 2010-02-27

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Version:
4.7 (master)

Attachments

Additional information