added left2right and right2left value to systray_sort option

git-svn-id: http://tint2.googlecode.com/svn/trunk@205 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
lorthiois@bbsoft.fr 2009-09-27 20:00:34 +00:00
parent 277ca7502c
commit a372cfbd60
2 changed files with 8 additions and 4 deletions

View file

@ -88,7 +88,7 @@ void init_config()
panel_config = calloc(1, sizeof(Panel));
panel_config->g_task.alpha = 100;
panel_config->g_task.alpha_active = 100;
systray.sort = 1;
systray.sort = 3;
// window manager's menu default value == false
wm_menu = wm_menu_open = 0;
@ -577,8 +577,10 @@ void add_entry (char *key, char *value)
systray.sort = -1;
else if (strcmp(value, "asc") == 0)
systray.sort = 1;
else
systray.sort = 0;
else if (strcmp(value, "left2right") == 0)
systray.sort = 2;
else if (strcmp(value, "right2left") == 0)
systray.sort = 3;
}
/* Tooltip */

View file

@ -319,8 +319,10 @@ gboolean add_icon(Window id)
traywin = g_new0(TrayWindow, 1);
traywin->id = id;
if (systray.sort == 0)
if (systray.sort == 3)
systray.list_icons = g_slist_prepend(systray.list_icons, traywin);
else if (systray.sort == 2)
systray.list_icons = g_slist_append(systray.list_icons, traywin);
else
systray.list_icons = g_slist_insert_sorted(systray.list_icons, traywin, compare_traywindows);
systray.area.resize = 1;