aboutsummaryrefslogtreecommitdiff
path: root/libmessaging-menu
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2012-09-18 21:54:37 +0200
committerLars Uebernickel <lars.uebernickel@canonical.com>2012-09-18 21:54:37 +0200
commit24ee0b6602960f35712adbf668099e06b8ebfb25 (patch)
treec927b8f3bd5208b2f1b518b2581fdd352e81fbb5 /libmessaging-menu
parentda9fde78ca62bd0b05dfbee3e024fd776c29c373 (diff)
downloadayatana-indicator-messages-24ee0b6602960f35712adbf668099e06b8ebfb25.tar.gz
ayatana-indicator-messages-24ee0b6602960f35712adbf668099e06b8ebfb25.tar.bz2
ayatana-indicator-messages-24ee0b6602960f35712adbf668099e06b8ebfb25.zip
Set the global chat status more intelligently
Up until now, the global chat status was set every time an application called _set_status. Thus, global status really meant "status of the app that last changed the status". Now, the service remembers the chat status for each application and sets the global status as a combination of all of application statuses. If applications have different statuses, the menu items are shown in an inconsistent state. This is implemented in IdoMenuItem by making it accept state as an array of strings in addition to a single string. It is drawn inconsistent if the state contains the menu item's target value in addition to other values. When the global status is changed through the messaging menu, the service doesn't update the action immediately anymore. Instead, it notifies all applications about the change via the "status-changed" signal. Applications must call _set_state to acknowledge that they have indeed changed their state. This is consistent with libmessaging-menu's documentation and design. Also, the SetStatus D-Bus call was missing a "desktop-id" parameter to tell the menu which application changed status. Changing this doesn't break existing apps, as the D-Bus interface is considered private to indicator-messages.
Diffstat (limited to 'libmessaging-menu')
-rw-r--r--libmessaging-menu/messaging-menu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libmessaging-menu/messaging-menu.c b/libmessaging-menu/messaging-menu.c
index 1b2e694..8a95b0a 100644
--- a/libmessaging-menu/messaging-menu.c
+++ b/libmessaging-menu/messaging-menu.c
@@ -547,6 +547,7 @@ messaging_menu_app_set_status (MessagingMenuApp *app,
return;
indicator_messages_service_call_set_status (app->messages_service,
+ g_app_info_get_id (G_APP_INFO (app->appinfo)),
status_ids [status],
app->cancellable,
NULL, NULL);