]> Dogcows Code - chaz/tint2/blobdiff - src/config.c
fixed WM menu management
[chaz/tint2] / src / config.c
index b6476d94c3b552a1339444292ba3b94f9d9dfcfa..8de01cd54eefc7f14fbe057de17afc7df5128adc 100644 (file)
@@ -79,7 +79,8 @@ void init_config()
        cleanup_panel();
 
        // get monitor and desktop config
-       get_monitors_and_desktops();
+       get_monitors();
+       get_desktops();
 
        // append full transparency background
        list_back = g_slist_append(0, calloc(1, sizeof(Area)));
@@ -87,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 = 0;
@@ -572,10 +573,14 @@ void add_entry (char *key, char *value)
                memcpy(&systray.area.pix.border, &a->pix.border, sizeof(Border));
        }
        else if (strcmp(key, "systray_sort") == 0) {
-               if (strcmp(value, "desc") == 0)
+               if (strcmp(value, "descending") == 0)
                        systray.sort = -1;
-               else
+               else if (strcmp(value, "ascending") == 0)
                        systray.sort = 1;
+               else if (strcmp(value, "left2right") == 0)
+                       systray.sort = 2;
+               else  if (strcmp(value, "right2left") == 0)
+                       systray.sort = 3;
        }
 
        /* Tooltip */
@@ -742,7 +747,7 @@ int parse_line (const char *line)
 void config_finish ()
 {
        if (panel_config->monitor > (server.nb_monitor-1)) {
-               // server.nb_monitor minimum value is 1 (see get_monitors_and_desktops())
+               // server.nb_monitor minimum value is 1 (see get_monitors())
                // and panel_config->monitor is higher
                fprintf(stderr, "warning : monitor not found. tint2 default to monitor 1.\n");
                panel_config->monitor = 0;
This page took 0.021441 seconds and 4 git commands to generate.