]> Dogcows Code - chaz/tint2/blobdiff - src/config.c
fixed segfault
[chaz/tint2] / src / config.c
index 10fd1aae0065baf90c8e7e8432b11f16754f75a3..931dc388d82bc40f6db99bd684f13f87944e70da 100644 (file)
@@ -84,6 +84,8 @@ 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;
@@ -346,7 +348,7 @@ void add_entry (char *key, char *value)
                        panel_config->battery.area.on_screen = 1;
 #else
                if(atoi(value) == 1)
-                       printf("tint2 is build without battery support\n");
+                       fprintf(stderr, "tint2 is build without battery support\n");
 #endif
    }
    else if (strcmp (key, "battery_low_status") == 0) {
@@ -475,6 +477,13 @@ void add_entry (char *key, char *value)
       memcpy(&panel_config->g_taskbar.pix.back, &a->pix.back, sizeof(Color));
       memcpy(&panel_config->g_taskbar.pix.border, &a->pix.border, sizeof(Border));
    }
+   else if (strcmp (key, "taskbar_active_background_id") == 0) {
+      int id = atoi (value);
+      Area *a = g_slist_nth_data(list_back, id);
+      memcpy(&panel_config->g_taskbar.pix_active.back, &a->pix.back, sizeof(Color));
+      memcpy(&panel_config->g_taskbar.pix_active.border, &a->pix.border, sizeof(Border));
+               panel_config->g_taskbar.use_active = 1;
+   }
 
    /* Task */
    else if (strcmp (key, "task_text") == 0)
@@ -557,6 +566,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)
This page took 0.02075 seconds and 4 git commands to generate.