From b968c0101475dd6bcb657d50b983d0935e5b2307 Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Mon, 9 Sep 2013 19:11:27 +0100 Subject: Hide debug messages by default --- mktrayicon.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mktrayicon.c b/mktrayicon.c index 86d0c1b..f4deb10 100644 --- a/mktrayicon.c +++ b/mktrayicon.c @@ -25,19 +25,25 @@ void tray_icon_on_click(GtkStatusIcon *status_icon, void tray_icon_on_menu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data) { +#ifdef DEBUG printf("Popup menu\n"); +#endif } gboolean set_tooltip(gpointer data) { char *p = (char*)data; if (*p == '\0') { +#ifdef DEBUG printf("Removing tooltip\n"); +#endif gtk_status_icon_set_has_tooltip(icon, FALSE); return FALSE; } +#ifdef DEBUG printf("Setting tooltip to '%s'\n", p); +#endif gtk_status_icon_set_tooltip_text(icon, p); free(data); return FALSE; @@ -46,7 +52,9 @@ gboolean set_tooltip(gpointer data) gboolean set_icon(gpointer data) { char *p = (char*)data; +#ifdef DEBUG printf("Setting icon to '%s'\n", p); +#endif gtk_status_icon_set_from_icon_name(icon, p); free(data); return FALSE; @@ -151,12 +159,16 @@ gpointer watch_fifo(gpointer argv) } if (*param == '\0') { +#ifdef DEBUG printf("Removing onclick handler\n"); +#endif break; } onclick = param; +#ifdef DEBUG printf("Setting onclick handler to '%s'\n", onclick); +#endif break; case 'm': /* menu */ fprintf(stderr, "Menu command not yet implemented\n"); -- cgit