X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fpanel.c;h=a753dfec1646f033342734788d2b6f1885be4739;hb=8ae318e599f644ca96b09ed2e249ec7881742467;hp=5aca8e46c215fe7b42141eda9bb60075598f3c78;hpb=924af1f53ea647656557182b8372235538aaedb7;p=chaz%2Ftint2 diff --git a/src/panel.c b/src/panel.c index 5aca8e4..a753dfe 100644 --- a/src/panel.c +++ b/src/panel.c @@ -58,6 +58,7 @@ int max_tick_urgent; Panel *panel1 = 0; int nb_panel; +Imlib_Image default_icon; void init_panel() @@ -65,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]; @@ -175,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);