fixed issue 45, segfault without clock
git-svn-id: http://tint2.googlecode.com/svn/trunk@55 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
15
src/panel.c
15
src/panel.c
@@ -66,6 +66,12 @@ void init_panel()
|
||||
p->g_taskbar.panel = p;
|
||||
p->g_task.area.panel = p;
|
||||
|
||||
// add childs
|
||||
if (time1_format)
|
||||
p->area.list = g_slist_append(p->area.list, &p->clock);
|
||||
//panel->area.list = g_slist_append(panel->area.list, &panel->trayer);
|
||||
|
||||
// detect panel size
|
||||
if (p->pourcentx)
|
||||
p->area.width = (float)server.monitor[p->monitor].width * p->initial_width / 100;
|
||||
else
|
||||
@@ -75,7 +81,6 @@ void init_panel()
|
||||
else
|
||||
p->area.height = p->initial_height;
|
||||
|
||||
|
||||
// full width mode
|
||||
if (!p->area.width)
|
||||
p->area.width = server.monitor[p->monitor].width;
|
||||
@@ -139,12 +144,6 @@ void cleanup_panel()
|
||||
for (i=0 ; i < nb_panel ; i++) {
|
||||
p = &panel1[i];
|
||||
|
||||
// freed list of visible objects
|
||||
if (p->list_visible) {
|
||||
g_slist_free(p->list_visible);
|
||||
p->list_visible = 0;
|
||||
}
|
||||
|
||||
free_area(&p->area);
|
||||
free_area(&p->g_task.area);
|
||||
free_area(&p->g_taskbar);
|
||||
@@ -220,8 +219,6 @@ void visible_object()
|
||||
else
|
||||
panel->clock.area.visible = 0;
|
||||
|
||||
//panel->area.list = g_slist_append(panel->area.list, &panel->trayer);
|
||||
|
||||
Taskbar *taskbar;
|
||||
for (j=0 ; j < panel->nb_desktop ; j++) {
|
||||
taskbar = &panel->taskbar[j];
|
||||
|
||||
Reference in New Issue
Block a user