diff --git a/Doxyfile b/Doxyfile index 244d9ec0..e318da24 100644 --- a/Doxyfile +++ b/Doxyfile @@ -47,7 +47,7 @@ PROJECT_BRIEF = # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. -PROJECT_LOGO = "src/pixmaps/zoitechat.png" +PROJECT_LOGO = "data/icons/zoitechat.png" # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/data/icons/tray_fileoffer.png b/data/icons/tray_fileoffer.png index 731a230e..01ea79ac 100644 Binary files a/data/icons/tray_fileoffer.png and b/data/icons/tray_fileoffer.png differ diff --git a/data/icons/zoitechat-256.png b/data/icons/zoitechat-256.png new file mode 100644 index 00000000..5be434ab Binary files /dev/null and b/data/icons/zoitechat-256.png differ diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c index f18f3422..c33d0c0d 100644 --- a/src/fe-gtk/plugin-tray.c +++ b/src/fe-gtk/plugin-tray.c @@ -197,6 +197,9 @@ tray_gtk3_cache_pixbuf_icon (const char *basename, GdkPixbuf *pixbuf) char *cache_dir; char *filename; char *path; + char *contents; + char *checksum; + gsize length; if (!pixbuf || !basename) return NULL; @@ -208,13 +211,25 @@ tray_gtk3_cache_pixbuf_icon (const char *basename, GdkPixbuf *pixbuf) return NULL; } - filename = g_strdup_printf ("%s.png", basename); + /* Include the artwork in the cache key so upgrades and theme changes + * cannot reuse an icon cached by an older version. */ + if (!gdk_pixbuf_save_to_buffer (pixbuf, &contents, &length, "png", NULL, NULL)) + { + g_free (cache_dir); + return NULL; + } + checksum = g_compute_checksum_for_data (G_CHECKSUM_SHA256, + (const guchar *)contents, length); + filename = g_strdup_printf ("%s-%s.png", basename, checksum); + g_free (checksum); path = g_build_filename (cache_dir, filename, NULL); g_free (filename); g_free (cache_dir); - if (!g_file_test (path, G_FILE_TEST_EXISTS)) - gdk_pixbuf_save (pixbuf, path, "png", NULL, NULL); + if (!g_file_test (path, G_FILE_TEST_EXISTS) && + !g_file_set_contents (path, contents, length, NULL)) + g_clear_pointer (&path, g_free); + g_free (contents); return path; } diff --git a/win32/installer/wizardimage.bmp b/win32/installer/wizardimage.bmp index bb324f82..aa234e30 100644 Binary files a/win32/installer/wizardimage.bmp and b/win32/installer/wizardimage.bmp differ diff --git a/win32/installer/wizardsmallimage.bmp b/win32/installer/wizardsmallimage.bmp index 5e7a1d2b..4d80ded7 100644 Binary files a/win32/installer/wizardsmallimage.bmp and b/win32/installer/wizardsmallimage.bmp differ diff --git a/win32/msix/build-msix.ps1 b/win32/msix/build-msix.ps1 index 917a268b..a687c3ba 100644 --- a/win32/msix/build-msix.ps1 +++ b/win32/msix/build-msix.ps1 @@ -122,7 +122,7 @@ if (-not (Test-Path (Join-Path $source 'zoitechat.exe'))) { $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot '..\..')).Path $templatePath = Join-Path $PSScriptRoot 'AppxManifest.xml.in' -$iconPath = Join-Path $repoRoot 'data\icons\zoitechat.png' +$iconPath = Join-Path $repoRoot 'data\icons\zoitechat-256.png' if (-not (Test-Path $templatePath)) { throw "MSIX manifest template is missing: $templatePath"