From 900426025e49224875709faccd619d7fd5944496 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Tue, 29 Oct 2019 21:03:39 +0100 Subject: [PATCH] Put ifdef around tray.h functions Only define in case we built with GTK support. --- src/ui/tray.c | 6 ++++++ src/ui/tray.h | 11 ++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/ui/tray.c b/src/ui/tray.c index 39420def..a40b7dec 100644 --- a/src/ui/tray.c +++ b/src/ui/tray.c @@ -195,6 +195,12 @@ tray_set_timer(int interval) timer = g_timeout_add(interval * 1000, _tray_change_icon, NULL); } +/* + * Create tray icon + * + * This will initialize the timer that will be called in order to change the icons + * and will search the icons in the defaults paths + */ void tray_enable(void) { diff --git a/src/ui/tray.h b/src/ui/tray.h index b7b75fa9..939dd4e7 100644 --- a/src/ui/tray.h +++ b/src/ui/tray.h @@ -35,22 +35,15 @@ #ifndef UI_TRAY_H #define UI_TRAY_H +#ifdef HAVE_GTK void tray_init(void); void tray_update(void); void tray_shutdown(void); -/* - * Create tray icon - * - * This will initialize the timer that will be called in order to change the icons - * and will search the icons in the defaults paths - */ void tray_enable(void); -/* - * Destroy tray icon - */ void tray_disable(void); void tray_set_timer(int interval); +#endif #endif