]> Dogcows Code - chaz/tint2/blobdiff - src/config.c
*add* remove of tooltip = En/Disabled. it's renamed to task_tooltip to enable/disable...
[chaz/tint2] / src / config.c
index 73732af5ca13e0de4d2543d497ba428b4840ef7d..ae6fe31ecd3947c1fe145653732fa77f139cd9a6 100644 (file)
@@ -461,7 +461,7 @@ void add_entry (char *key, char *value)
        else if (strcmp (key, "taskbar_active_background_id") == 0) {
                int id = atoi (value);
                id = (id < backgrounds->len && id >= 0) ? id : 0;
-               panel_config.g_taskbar.background_name[TASKBAR_ACTIVE] = &g_array_index(backgrounds, Background, id);
+               panel_config.g_taskbar.background[TASKBAR_ACTIVE] = &g_array_index(backgrounds, Background, id);
        }
        else if (strcmp (key, "taskbar_name") == 0) {
                taskbarname_enabled = atoi (value);
@@ -557,9 +557,22 @@ void add_entry (char *key, char *value)
                panel_config.g_task.config_background_mask |= (1<<status);
                if (status == TASK_NORMAL) panel_config.g_task.area.bg = panel_config.g_task.background[TASK_NORMAL];
        }
+       // "tooltip" is deprecated but here for backwards compatibility
+       else if (strcmp (key, "task_tooltip") == 0 || strcmp(key, "tooltip") == 0)
+               panel_config.g_task.tooltip_enabled = atoi(value);
 
        /* Systray */
        else if (strcmp (key, "systray_padding") == 0) {
+               if (new_config_file == 0 && systray_enabled == 0) {
+                       systray_enabled = 1;
+                       if (panel_items_order) {
+                               char* tmp = g_strconcat(panel_items_order, "S", NULL);
+                               g_free( panel_items_order );
+                               panel_items_order = tmp;
+                       }
+                       else
+                               panel_items_order = g_strdup("S");
+               }
                extract_values(value, &value1, &value2, &value3);
                systray.area.paddingxlr = systray.area.paddingx = atoi (value1);
                if (value2) systray.area.paddingy = atoi (value2);
@@ -616,8 +629,6 @@ void add_entry (char *key, char *value)
        }
 
        /* Tooltip */
-       else if (strcmp (key, "tooltip") == 0)
-               g_tooltip.enabled = atoi(value);
        else if (strcmp (key, "tooltip_show_timeout") == 0) {
                int timeout_msec = 1000*atof(value);
                g_tooltip.show_timeout_msec = timeout_msec;
This page took 0.022226 seconds and 4 git commands to generate.