diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-06-27 18:21:55 +0200 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-06-27 18:21:55 +0200 |
commit | 9ebfba3cde97027e4db9e220886760b802b8a213 (patch) | |
tree | 1cccc2ebd98c482db397b5480fafb479f82bbe3f | |
parent | eec8624cd87d14d083fc2c81dec85e79e93e494b (diff) | |
download | ayatana-indicator-messages-9ebfba3cde97027e4db9e220886760b802b8a213.tar.gz ayatana-indicator-messages-9ebfba3cde97027e4db9e220886760b802b8a213.tar.bz2 ayatana-indicator-messages-9ebfba3cde97027e4db9e220886760b802b8a213.zip |
Set status action when requested
-rw-r--r-- | src/messages-service.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/messages-service.c b/src/messages-service.c index f7bcc2a..e892aef 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -245,6 +245,18 @@ change_status (GSimpleAction *action, GVariant *value, gpointer user_data) { + const gchar *status; + + g_variant_get (value, "&s", &status); + + g_return_if_fail (g_str_equal (status, "available") || + g_str_equal (status, "away")|| + g_str_equal (status, "busy") || + g_str_equal (status, "invisible") || + g_str_equal (status, "offline")); + + g_simple_action_set_state (action, value); + g_message ("changing status to %s", g_variant_get_string (value, NULL)); } |