From: Thierry Lorthiois Date: Sun, 27 Sep 2009 20:00:34 +0000 (+0000) Subject: added left2right and right2left value to systray_sort option X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=0c4a1585a2c434fa0c2361a64a12a3d6e14edbf2;p=chaz%2Ftint2 added left2right and right2left value to systray_sort option --- diff --git a/src/config.c b/src/config.c index 10cf448..b06abce 100644 --- a/src/config.c +++ b/src/config.c @@ -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 */ diff --git a/src/systray/systraybar.c b/src/systray/systraybar.c index 130372e..af79d1f 100644 --- a/src/systray/systraybar.c +++ b/src/systray/systraybar.c @@ -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;