diff options
author | Jon Gjengset <jon@thesquareplanet.com> | 2013-09-09 19:11:27 +0100 |
---|---|---|
committer | Jon Gjengset <jon@thesquareplanet.com> | 2013-09-09 19:11:27 +0100 |
commit | b968c0101475dd6bcb657d50b983d0935e5b2307 (patch) | |
tree | 1b8979922af80e3a12d898ad21690749814589c3 | |
parent | Avoid overwriting params to idle functions (diff) | |
download | mktrayicon-b968c0101475dd6bcb657d50b983d0935e5b2307.tar.gz mktrayicon-b968c0101475dd6bcb657d50b983d0935e5b2307.tar.bz2 mktrayicon-b968c0101475dd6bcb657d50b983d0935e5b2307.zip |
Hide debug messages by default
-rw-r--r-- | mktrayicon.c | 12 |
1 files changed, 12 insertions, 0 deletions
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"); |