diff options
author | Ted Gould <ted@canonical.com> | 2009-08-08 06:24:04 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-08-08 06:24:04 -0600 |
commit | 0788baad4bd4714e8361a99150046ba4fdb4513a (patch) | |
tree | f4f67065ac5a0ef3f6692d7d39138be1b51d7704 /src | |
parent | e36075a13c2e270b9a240032f8fca244614d6367 (diff) | |
download | ayatana-indicator-session-0788baad4bd4714e8361a99150046ba4fdb4513a.tar.gz ayatana-indicator-session-0788baad4bd4714e8361a99150046ba4fdb4513a.tar.bz2 ayatana-indicator-session-0788baad4bd4714e8361a99150046ba4fdb4513a.zip |
Global status being used and thrown over d' bus
Diffstat (limited to 'src')
-rw-r--r-- | src/status-service-dbus.c | 7 | ||||
-rw-r--r-- | src/status-service-dbus.h | 1 | ||||
-rw-r--r-- | src/status-service.c | 5 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/status-service-dbus.c b/src/status-service-dbus.c index a8e031c..2ac34af 100644 --- a/src/status-service-dbus.c +++ b/src/status-service-dbus.c @@ -172,3 +172,10 @@ _status_service_server_pretty_user_name (StatusServiceDbus * service, gchar ** u return TRUE; } + +void +status_service_dbus_set_status (StatusServiceDbus * self, const gchar * icon) +{ + g_signal_emit(G_OBJECT(self), signals[STATUS_ICONS_CHANGED], 0, icon, TRUE); + return; +} diff --git a/src/status-service-dbus.h b/src/status-service-dbus.h index 66c9206..34a9c3c 100644 --- a/src/status-service-dbus.h +++ b/src/status-service-dbus.h @@ -52,6 +52,7 @@ struct _StatusServiceDbus { }; GType status_service_dbus_get_type (void); +void status_service_dbus_set_status (StatusServiceDbus * self, const gchar * icon); G_END_DECLS diff --git a/src/status-service.c b/src/status-service.c index 3f25c4f..c1f06f5 100644 --- a/src/status-service.c +++ b/src/status-service.c @@ -84,6 +84,9 @@ status_update (void) { if (global_status != oldglobal) { g_debug("Global status changed to: %s", _(status_strings[global_status])); + + dbusmenu_menuitem_property_set(status_menuitem, "label", _(status_strings[global_status])); + status_service_dbus_set_status(dbus_interface, status_icons[global_status]); } return; @@ -175,7 +178,7 @@ build_menu (gpointer data) build_user_item(root); status_menuitem = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(status_menuitem, "label", "Status"); + dbusmenu_menuitem_property_set(status_menuitem, "label", _(status_strings[global_status])); dbusmenu_menuitem_child_append(root, status_menuitem); StatusProviderStatus i; |