From 97384dc09263c4bd3afb76e2755645538727dc7f Mon Sep 17 00:00:00 2001 From: GNUser Date: Wed, 16 Oct 2019 12:18:07 -0400 Subject: Update mktrayicon.c --- mktrayicon.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/mktrayicon.c b/mktrayicon.c index 8c8dad0..d793c89 100644 --- a/mktrayicon.c +++ b/mktrayicon.c @@ -13,7 +13,6 @@ GtkStatusIcon *icon; char *onclick = NULL; -char *icon_type; /* stock (name only) vs. custom (full path) */ void tray_icon_on_click(GtkStatusIcon *status_icon, gpointer user_data) @@ -56,7 +55,7 @@ gboolean set_icon(gpointer data) #ifdef DEBUG printf("Setting icon to '%s'\n", p); #endif - if (strcmp(icon_type, "custom") == 0) + if (strchr(p, '/')) { gtk_status_icon_set_from_file(icon, p); } @@ -150,14 +149,6 @@ gpointer watch_fifo(gpointer argv) gdk_threads_add_idle(set_tooltip, param); break; case 'i': /* icon */ - if (strchr(param, '/')) - { - icon_type="custom"; - } - else - { - icon_type="stock"; - } gdk_threads_add_idle(set_icon, param); break; case 'h': /* hide */ -- cgit