]> Dogcows Code - chaz/tint2/commitdiff
added left2right and right2left value to systray_sort option
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Sun, 27 Sep 2009 20:00:34 +0000 (20:00 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Sun, 27 Sep 2009 20:00:34 +0000 (20:00 +0000)
src/config.c
src/systray/systraybar.c

index 10cf448e22ebc638ccf6d7c99a472705bed5ca0a..b06abce944c61f4ce146c8d439a0b6fec49e1c5e 100644 (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 */
index 130372e329e33ec3e1f21f482ab1e76056bfa082..af79d1f0adae30ab9ad5291e7df32e0ede1edaf2 100644 (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;
This page took 0.031994 seconds and 4 git commands to generate.