]> Dogcows Code - chaz/tint2/blobdiff - src/config.c
fixed issue 130 by maato
[chaz/tint2] / src / config.c
index a2d6fa83dbc4301b1443ac2a87f98830303fd607..a7d11a28645354ad66019e0c5b6f809ff33fa1bc 100644 (file)
@@ -48,6 +48,9 @@
 #include "battery.h"
 #endif
 
+// global path
+char *config_path = 0;
+char *thumbnail_path = 0;
 
 // --------------------------------------------------
 // backward compatibility
@@ -81,6 +84,7 @@ void init_config()
    list_back = g_slist_append(0, calloc(1, sizeof(Area)));
 
        panel_config = calloc(1, sizeof(Panel));
+       systray.sort = 1;
        // window manager's menu default value == false
        wm_menu = 0;
        max_tick_urgent = 7;
@@ -554,6 +558,12 @@ void add_entry (char *key, char *value)
       memcpy(&systray.area.pix.back, &a->pix.back, sizeof(Color));
       memcpy(&systray.area.pix.border, &a->pix.border, sizeof(Border));
    }
+       else if (strcmp(key, "systray_sort") == 0) {
+               if (strcmp(value, "desc") == 0)
+                       systray.sort = -1;
+               else
+                       systray.sort = 1;
+       }
 
    /* Mouse actions */
    else if (strcmp (key, "mouse_middle") == 0)
@@ -739,6 +749,7 @@ deb:
    path1 = g_build_filename (g_get_user_config_dir(), "tint2", "tint2rc", NULL);
    if (g_file_test (path1, G_FILE_TEST_EXISTS)) {
                i = config_read_file (path1);
+               config_path = strdup(path1);
                g_free(path1);
           return i;
        }
@@ -781,6 +792,7 @@ deb:
                g_free(path2);
 
                i = config_read_file (path1);
+               config_path = strdup(path1);
                g_free(path1);
                return i;
        }
This page took 0.023038 seconds and 4 git commands to generate.