X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fpanel.c;h=a753dfec1646f033342734788d2b6f1885be4739;hb=8354267448dab01626da0c4b3d2eedfa20e6858a;hp=7ef7e205f263360ebea094ce86a011b6385e3b1b;hpb=501a421b337b6e08b58904b1c008bd05dbbf954b;p=chaz%2Ftint2 diff --git a/src/panel.c b/src/panel.c index 7ef7e20..a753dfe 100644 --- a/src/panel.c +++ b/src/panel.c @@ -29,6 +29,7 @@ #include "window.h" #include "task.h" #include "panel.h" +#include "tooltip.h" int signal_pending; @@ -57,6 +58,7 @@ int max_tick_urgent; Panel *panel1 = 0; int nb_panel; +Imlib_Image default_icon; void init_panel() @@ -64,6 +66,17 @@ void init_panel() int i; Panel *p; + // load default icon + char *path; + const gchar * const *data_dirs; + data_dirs = g_get_system_data_dirs (); + for (i = 0; data_dirs[i] != NULL; i++) { + path = g_build_filename(data_dirs[i], "tint2", "default_icon.png", NULL); + if (g_file_test (path, G_FILE_TEST_EXISTS)) + default_icon = imlib_load_image(path); + g_free(path); + } + for (i=0 ; i < nb_panel ; i++) { p = &panel1[i]; @@ -174,6 +187,11 @@ void cleanup_panel() cleanup_systray(); cleanup_taskbar(); + if (default_icon) { + imlib_context_set_image(default_icon); + imlib_free_image(); + } + // font allocated once if (panel1[0].g_task.font_desc) { pango_font_description_free(panel1[0].g_task.font_desc);