]> Dogcows Code - chaz/tint2/blobdiff - src/taskbar/task.c
tint2conf enabled by default, and switch ELLIPSIZE_END to ELLIPSIZE_MIDDLE
[chaz/tint2] / src / taskbar / task.c
index d14f8fa437942176b38d75f9a0c13332a42e94eb..12476bc80250029451aa4354b93f89b6e38db39a 100644 (file)
@@ -35,8 +35,8 @@
 #include "tooltip.h"
 #include "timer.h"
 
-static timeout* urgent_timeout = 0;
-static GSList* urgent_list = 0;
+timeout* urgent_timeout;
+GSList* urgent_list;
 
 const char* task_get_tooltip(void* obj)
 {
@@ -67,8 +67,10 @@ Task *add_task (Window win)
        // even with task_on_all_desktop and with task_on_all_panel
        new_tsk.title = 0;
        int k;
-       for (k=0; k<TASK_STATE_COUNT; ++k)
+       for (k=0; k<TASK_STATE_COUNT; ++k) {
                new_tsk.icon[k] = 0;
+               new_tsk.state_pix[k] = 0;
+       }
        get_title(&new_tsk);
        get_icon(&new_tsk);
 
@@ -323,7 +325,7 @@ void draw_task_icon (Task *tsk, int text_width)
 
        // Render
        imlib_context_set_image (tsk->icon[tsk->current_state]);
-       if (real_transparency) {
+       if (server.real_transparency) {
                render_image(tsk->area.pix, pos_x, panel->g_task.icon_posy, imlib_image_get_width(), imlib_image_get_height() );
        }
        else {
@@ -351,7 +353,8 @@ void draw_task (void *obj, cairo_t *c)
                /* Drawing width and Cut text */
                // pango use U+22EF or U+2026
                pango_layout_set_width (layout, ((Taskbar*)tsk->area.parent)->text_width * PANGO_SCALE);
-               pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
+               pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_MIDDLE);
+               //pango_layout_set_wrap(layout, PANGO_WRAP_CHAR);
 
                /* Center text */
                if (panel->g_task.centered) pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
This page took 0.022497 seconds and 4 git commands to generate.