aboutsummaryrefslogtreecommitdiff
path: root/src/libappindicator
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-01-13 12:25:49 -0600
committerTed Gould <ted@gould.cx>2010-01-13 12:25:49 -0600
commitb1b9134542bd3bcfa6b5492f0a7f1b83cf0ec32f (patch)
treee1dbd3718a039301f69f2d8a4e3b7158ba38f445 /src/libappindicator
parent5d075987c3469ae7f1538143546e94d208abf1cf (diff)
downloadayatana-indicator-application-b1b9134542bd3bcfa6b5492f0a7f1b83cf0ec32f.tar.gz
ayatana-indicator-application-b1b9134542bd3bcfa6b5492f0a7f1b83cf0ec32f.tar.bz2
ayatana-indicator-application-b1b9134542bd3bcfa6b5492f0a7f1b83cf0ec32f.zip
Fleshing out the fallback function, so it should create an icon.
Diffstat (limited to 'src/libappindicator')
-rw-r--r--src/libappindicator/app-indicator.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c
index 259ba3e..a3ad1ee 100644
--- a/src/libappindicator/app-indicator.c
+++ b/src/libappindicator/app-indicator.c
@@ -739,6 +739,24 @@ fallback_timer_expire (gpointer data)
static GtkStatusIcon *
fallback (AppIndicator * self)
{
+ GtkStatusIcon * icon = gtk_status_icon_new();
+
+ gtk_status_icon_set_title(icon, app_indicator_get_id(self));
+
+ switch (app_indicator_get_status(self)) {
+ case APP_INDICATOR_STATUS_PASSIVE:
+ gtk_status_icon_set_visible(icon, FALSE);
+ gtk_status_icon_set_from_icon_name(icon, app_indicator_get_icon(self));
+ break;
+ case APP_INDICATOR_STATUS_ACTIVE:
+ 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:
+ gtk_status_icon_set_from_icon_name(icon, app_indicator_get_attention_icon(self));
+ gtk_status_icon_set_visible(icon, TRUE);
+ break;
+ };
return NULL;
}
@@ -748,7 +766,7 @@ fallback (AppIndicator * self)
static void
unfallback (AppIndicator * self, GtkStatusIcon * status_icon)
{
-
+ g_object_unref(G_OBJECT(status_icon));
return;
}