]> Dogcows Code - chaz/tint2/commitdiff
fixed resize_clock() and snapshot
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Sat, 27 Mar 2010 16:51:12 +0000 (16:51 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Sat, 27 Mar 2010 16:51:12 +0000 (16:51 +0000)
src/clock/clock.c
src/config.c

index b6eb254537f01d31b2f7e2ddb0f7779938963345..e29c138a687cf82825a38d24c2321ce669aebe83 100644 (file)
@@ -258,8 +258,6 @@ void resize_clock (void *obj)
        new_width += (2*clock->area.paddingxlr) + (2*clock->area.bg->border.width);
 
        Panel *panel = ((Area*)obj)->panel;
-       clock->area.posx = panel->area.width - clock->area.width - panel->area.paddingxlr - panel->area.bg->border.width;
-
        if (new_width > clock->area.width || new_width < (clock->area.width-6)) {
                // resize clock
                // we try to limit the number of resize
@@ -274,6 +272,8 @@ void resize_clock (void *obj)
                systray.area.resize = 1;
                panel_refresh = 1;
        }
+       clock->area.posx = panel->area.width - clock->area.width - panel->area.paddingxlr - panel->area.bg->border.width;
+
 
        g_object_unref (layout);
        cairo_destroy (c);
index 150face8b7f172eac0b7536f94dc4c951419a445..9e74f1751d94bb9d9f0642c0a5089b517e6a2c99 100644 (file)
@@ -527,12 +527,13 @@ void add_entry (char *key, char *value)
        }
 
        /* Systray */
-       else if (strcmp (key, "systray") == 0) {
+       // systray disabled in snapshot mode
+       else if (strcmp (key, "systray") == 0 && snapshot_path == 0) {
                systray_enabled = atoi(value);
                // systray is latest option added. files without 'systray' are old.
                old_config_file = 0;
        }
-       else if (strcmp (key, "systray_padding") == 0) {
+       else if (strcmp (key, "systray_padding") == 0 && snapshot_path == 0) {
                if (old_config_file)
                        systray_enabled = 1;
                extract_values(value, &value1, &value2, &value3);
This page took 0.027352 seconds and 4 git commands to generate.