*add* option for ascending/descending/unsorted systray

git-svn-id: http://tint2.googlecode.com/svn/trunk@204 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
Andreas.Fink85
2009-09-27 19:52:25 +00:00
parent 7fa7bf77c0
commit 277ca7502c
2 changed files with 7 additions and 3 deletions

View File

@@ -319,8 +319,10 @@ gboolean add_icon(Window id)
traywin = g_new0(TrayWindow, 1);
traywin->id = id;
// systray.list_icons = g_slist_prepend(systray.list_icons, traywin);
systray.list_icons = g_slist_insert_sorted(systray.list_icons, traywin, compare_traywindows);
if (systray.sort == 0)
systray.list_icons = g_slist_prepend(systray.list_icons, traywin);
else
systray.list_icons = g_slist_insert_sorted(systray.list_icons, traywin, compare_traywindows);
systray.area.resize = 1;
systray.area.redraw = 1;
//printf("add_icon id %lx, %d\n", id, g_slist_length(systray.list_icons));