1 === modified file 'src/app-indicator.c'
2 --- src/app-indicator.c 2011-07-22 19:04:23 +0000
3 +++ src/app-indicator.c 2011-09-30 16:14:52 +0000
4 @@ -1523,20 +1523,52 @@
5 GtkStatusIcon * icon = GTK_STATUS_ICON(data);
6 gchar *longname = NULL;
8 + /* add the icon_theme_path once if needed */
9 + GtkIconTheme *icon_theme = gtk_icon_theme_get_default();
10 + if (self->priv->icon_theme_path != NULL)
14 + gboolean found=FALSE;
15 + gtk_icon_theme_get_search_path(icon_theme, &path, &n_elements);
16 + for (i=0; i< n_elements || path[i] == NULL; i++)
18 + if(g_strcmp0(path[i], self->priv->icon_theme_path) == 0)
25 + gtk_icon_theme_append_search_path(icon_theme, self->priv->icon_theme_path);
29 switch (app_indicator_get_status(self)) {
30 case APP_INDICATOR_STATUS_PASSIVE:
31 - longname = append_panel_icon_suffix(app_indicator_get_icon(self));
32 - gtk_status_icon_set_visible(icon, FALSE);
33 - gtk_status_icon_set_from_icon_name(icon, longname);
34 + /* hide first to avoid that the change is visible to the user */
35 + gtk_status_icon_set_visible(icon, FALSE);
36 + longname = append_panel_icon_suffix(app_indicator_get_icon(self));
37 + if (gtk_icon_theme_has_icon (icon_theme, longname))
38 + gtk_status_icon_set_from_icon_name(icon, longname);
40 + gtk_status_icon_set_from_icon_name(icon, app_indicator_get_icon(self));
42 case APP_INDICATOR_STATUS_ACTIVE:
43 - longname = append_panel_icon_suffix(app_indicator_get_icon(self));
44 - gtk_status_icon_set_from_icon_name(icon, longname);
45 + longname = append_panel_icon_suffix(app_indicator_get_icon(self));
46 + if (gtk_icon_theme_has_icon (icon_theme, longname))
47 + gtk_status_icon_set_from_icon_name(icon, longname);
49 + gtk_status_icon_set_from_icon_name(icon, app_indicator_get_icon(self));
50 gtk_status_icon_set_visible(icon, TRUE);
52 case APP_INDICATOR_STATUS_ATTENTION:
53 - longname = append_panel_icon_suffix(app_indicator_get_attention_icon(self));
54 - gtk_status_icon_set_from_icon_name(icon, longname);
55 + /* get the _attention_ icon here */
56 + longname = append_panel_icon_suffix(app_indicator_get_attention_icon(self));
57 + if (gtk_icon_theme_has_icon (icon_theme, longname))
58 + gtk_status_icon_set_from_icon_name(icon, longname);
60 + gtk_status_icon_set_from_icon_name(icon, app_indicator_get_icon(self));
61 gtk_status_icon_set_visible(icon, TRUE);