From 872c5d6572c171404105fd359c24c5944c5b0326 Mon Sep 17 00:00:00 2001 From: deepend Date: Tue, 3 Feb 2026 12:06:04 -0700 Subject: [PATCH] Switched tray menu icon defines to use GTK3 icon names when GTK3 is enabled, avoiding deprecated GTK stock IDs on Windows builds. Added GtkStatusIcon function prototypes for GTK3 Windows builds when deprecated APIs are hidden, preventing implicit declaration errors. --- src/fe-gtk/plugin-tray.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c index 922cd139..0a326bfe 100644 --- a/src/fe-gtk/plugin-tray.c +++ b/src/fe-gtk/plugin-tray.c @@ -45,8 +45,7 @@ typedef struct _GtkStatusIcon GtkStatusIcon; #endif #define ICON_TRAY_PREFERENCES "preferences-system" #define ICON_TRAY_QUIT "application-exit" -#endif -#if !HAVE_GTK3 || defined(WIN32) +#else #define ICON_TRAY_PREFERENCES GTK_STOCK_PREFERENCES #define ICON_TRAY_QUIT GTK_STOCK_QUIT #endif @@ -106,6 +105,12 @@ typedef GdkPixbuf* TrayCustomIcon; #define ICON_HILIGHT pix_tray_highlight #define ICON_FILE pix_tray_fileoffer #endif +#if HAVE_GTK3 && defined(WIN32) && defined(GTK_DISABLE_DEPRECATED) +GtkStatusIcon *gtk_status_icon_new_from_pixbuf (GdkPixbuf *pixbuf); +void gtk_status_icon_set_from_pixbuf (GtkStatusIcon *status_icon, GdkPixbuf *pixbuf); +void gtk_status_icon_set_tooltip_text (GtkStatusIcon *status_icon, const gchar *text); +gboolean gtk_status_icon_is_embedded (GtkStatusIcon *status_icon); +#endif #define TIMEOUT 500 void tray_apply_setup (void);