diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app-indicator.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/app-indicator.c b/src/app-indicator.c index c9e7ab9..21276c6 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -1523,21 +1523,30 @@ status_icon_changes (AppIndicator * self, gpointer data) GtkStatusIcon * icon = GTK_STATUS_ICON(data); gchar *longname = NULL; - /* set longname only if its actually in the icon theme */ - longname = append_panel_icon_suffix(app_indicator_get_icon(self)); - if (gtk_icon_theme_has_icon (gtk_icon_theme_get_default(), longname)) - gtk_status_icon_set_from_icon_name(icon, longname); - else - gtk_status_icon_set_from_icon_name(icon, app_indicator_get_icon(self)); - switch (app_indicator_get_status(self)) { case APP_INDICATOR_STATUS_PASSIVE: + longname = append_panel_icon_suffix(app_indicator_get_icon(self)); + if (gtk_icon_theme_has_icon (gtk_icon_theme_get_default(), longname)) + gtk_status_icon_set_from_icon_name(icon, longname); + else + gtk_status_icon_set_from_icon_name(icon, app_indicator_get_icon(self)); gtk_status_icon_set_visible(icon, FALSE); break; case APP_INDICATOR_STATUS_ACTIVE: + longname = append_panel_icon_suffix(app_indicator_get_icon(self)); + if (gtk_icon_theme_has_icon (gtk_icon_theme_get_default(), longname)) + gtk_status_icon_set_from_icon_name(icon, longname); + else + gtk_status_icon_set_from_icon_name(icon, app_indicator_get_icon(self)); gtk_status_icon_set_visible(icon, TRUE); break; case APP_INDICATOR_STATUS_ATTENTION: + /* get the _attention_ icon here */ + longname = append_panel_icon_suffix(app_indicator_get_attention_icon(self)); + if (gtk_icon_theme_has_icon (gtk_icon_theme_get_default(), longname)) + gtk_status_icon_set_from_icon_name(icon, longname); + else + gtk_status_icon_set_from_icon_name(icon, app_indicator_get_icon(self)); gtk_status_icon_set_visible(icon, TRUE); break; }; |