fixed issue 97 and issue 95
git-svn-id: http://tint2.googlecode.com/svn/trunk@106 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
d47cfb0761
commit
597d492860
4 changed files with 18 additions and 20 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2009-06-08
|
||||||
|
- fixed issue 97 and issue 95
|
||||||
|
|
||||||
2009-06-08
|
2009-06-08
|
||||||
- allow 'taskbar_mode = multi_desktop' config with 'panel_monitor = all'
|
- allow 'taskbar_mode = multi_desktop' config with 'panel_monitor = all'
|
||||||
|
|
||||||
|
|
|
@ -255,6 +255,7 @@ void draw_battery (void *obj, cairo_t *c, int active)
|
||||||
g_object_unref(layout);
|
g_object_unref(layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void resize_battery(void *obj)
|
void resize_battery(void *obj)
|
||||||
{
|
{
|
||||||
Battery *battery = obj;
|
Battery *battery = obj;
|
||||||
|
@ -292,23 +293,19 @@ void resize_battery(void *obj)
|
||||||
|
|
||||||
new_width += (2*battery->area.paddingxlr) + (2*battery->area.pix.border.width);
|
new_width += (2*battery->area.paddingxlr) + (2*battery->area.pix.border.width);
|
||||||
|
|
||||||
if(new_width > battery->area.width || new_width < (battery->area.width-6)) {
|
int old_width = battery->area.width;
|
||||||
int i;
|
|
||||||
Panel *panel = ((Area*)obj)->panel;
|
|
||||||
|
|
||||||
|
Panel *panel = ((Area*)obj)->panel;
|
||||||
|
battery->area.width = new_width + 1;
|
||||||
|
battery->area.posx = panel->area.width - battery->area.width - panel->area.paddingxlr - panel->area.pix.border.width;
|
||||||
|
if (panel->clock.area.on_screen)
|
||||||
|
battery->area.posx -= (panel->clock.area.width + panel->area.paddingx);
|
||||||
|
|
||||||
|
if(new_width > old_width || new_width < (old_width-6)) {
|
||||||
|
// refresh and resize other objects on panel
|
||||||
|
// we try to limit the number of refresh
|
||||||
printf("battery_width %d, new_width %d\n", battery->area.width, new_width);
|
printf("battery_width %d, new_width %d\n", battery->area.width, new_width);
|
||||||
|
panel->area.resize = 1;
|
||||||
// resize battery
|
|
||||||
// we try to limit the number of resize
|
|
||||||
battery->area.width = new_width + 1;
|
|
||||||
battery->area.posx = panel->area.width - battery->area.width - panel->area.paddingxlr - panel->area.pix.border.width;
|
|
||||||
if (panel->clock.area.on_screen)
|
|
||||||
battery->area.posx -= (panel->clock.area.width + panel->area.paddingx);
|
|
||||||
|
|
||||||
// resize other objects on panel
|
|
||||||
for (i=0 ; i < nb_panel ; i++)
|
|
||||||
panel1[i].area.resize = 1;
|
|
||||||
|
|
||||||
systray.area.resize = 1;
|
systray.area.resize = 1;
|
||||||
panel_refresh = 1;
|
panel_refresh = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,7 +175,6 @@ void resize_clock (void *obj)
|
||||||
new_width += (2*clock->area.paddingxlr) + (2*clock->area.pix.border.width);
|
new_width += (2*clock->area.paddingxlr) + (2*clock->area.pix.border.width);
|
||||||
|
|
||||||
if (new_width > clock->area.width || new_width < (clock->area.width-6)) {
|
if (new_width > clock->area.width || new_width < (clock->area.width-6)) {
|
||||||
int i;
|
|
||||||
Panel *panel = ((Area*)obj)->panel;
|
Panel *panel = ((Area*)obj)->panel;
|
||||||
|
|
||||||
printf("clock_width %d, new_width %d\n", clock->area.width, new_width);
|
printf("clock_width %d, new_width %d\n", clock->area.width, new_width);
|
||||||
|
@ -185,9 +184,8 @@ void resize_clock (void *obj)
|
||||||
clock->area.posx = panel->area.width - clock->area.width - panel->area.paddingxlr - panel->area.pix.border.width;
|
clock->area.posx = panel->area.width - clock->area.width - panel->area.paddingxlr - panel->area.pix.border.width;
|
||||||
|
|
||||||
// resize other objects on panel
|
// resize other objects on panel
|
||||||
for (i=0 ; i < nb_panel ; i++) {
|
panel->area.resize = 1;
|
||||||
panel1[i].area.resize = 1;
|
panel->battery.area.resize = 1;
|
||||||
}
|
|
||||||
systray.area.resize = 1;
|
systray.area.resize = 1;
|
||||||
panel_refresh = 1;
|
panel_refresh = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -620,7 +620,7 @@ load_config:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else event_timer();
|
event_timer();
|
||||||
|
|
||||||
switch (signal_pending) {
|
switch (signal_pending) {
|
||||||
case SIGUSR1:
|
case SIGUSR1:
|
||||||
|
|
Loading…
Reference in a new issue