diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-03-30 15:51:29 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-04-02 06:04:22 +0800 |
commit | c81f08fb5baebdd855089f05828f1c68fbc74893 (patch) | |
tree | 82e4058c540084c7f0fb128b78ed141f5853f99a /src | |
parent | aaf4798dd5eb270c95964441cf29768e580ef80b (diff) | |
download | gsoc2013-empathy-c81f08fb5baebdd855089f05828f1c68fbc74893.tar.gz gsoc2013-empathy-c81f08fb5baebdd855089f05828f1c68fbc74893.tar.zst gsoc2013-empathy-c81f08fb5baebdd855089f05828f1c68fbc74893.zip |
set a category on presence notifications
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-event-manager.c | 6 | ||||
-rw-r--r-- | src/empathy-event-manager.h | 3 | ||||
-rw-r--r-- | src/empathy-notifications-approver.c | 8 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index e2ad93db3..342d3e11e 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -1121,7 +1121,8 @@ event_manager_presence_changed_cb (EmpathyContact *contact, EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNOUT)) { event_manager_add (manager, NULL, contact, - EMPATHY_EVENT_TYPE_PRESENCE, EMPATHY_IMAGE_AVATAR_DEFAULT, + EMPATHY_EVENT_TYPE_PRESENCE_OFFLINE, + EMPATHY_IMAGE_AVATAR_DEFAULT, empathy_contact_get_alias (contact), _("Disconnected"), NULL, NULL, NULL); } @@ -1141,7 +1142,8 @@ event_manager_presence_changed_cb (EmpathyContact *contact, EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNIN)) { event_manager_add (manager, NULL, contact, - EMPATHY_EVENT_TYPE_PRESENCE, EMPATHY_IMAGE_AVATAR_DEFAULT, + EMPATHY_EVENT_TYPE_PRESENCE_ONLINE, + EMPATHY_IMAGE_AVATAR_DEFAULT, empathy_contact_get_alias (contact), _("Connected"), NULL, NULL, NULL); } diff --git a/src/empathy-event-manager.h b/src/empathy-event-manager.h index 16d97c6df..c8b032ae0 100644 --- a/src/empathy-event-manager.h +++ b/src/empathy-event-manager.h @@ -53,7 +53,8 @@ typedef enum { EMPATHY_EVENT_TYPE_VOIP, EMPATHY_EVENT_TYPE_TRANSFER, EMPATHY_EVENT_TYPE_SUBSCRIPTION, - EMPATHY_EVENT_TYPE_PRESENCE, + EMPATHY_EVENT_TYPE_PRESENCE_ONLINE, + EMPATHY_EVENT_TYPE_PRESENCE_OFFLINE, EMPATHY_EVENT_TYPE_INVITATION, EMPATHY_EVENT_TYPE_AUTH, } EmpathyEventType; diff --git a/src/empathy-notifications-approver.c b/src/empathy-notifications-approver.c index 4bfe23cf1..af074470e 100644 --- a/src/empathy-notifications-approver.c +++ b/src/empathy-notifications-approver.c @@ -237,7 +237,8 @@ notification_is_urgent (EmpathyNotificationsApprover *self, return TRUE; case EMPATHY_EVENT_TYPE_SUBSCRIPTION: - case EMPATHY_EVENT_TYPE_PRESENCE: + case EMPATHY_EVENT_TYPE_PRESENCE_ONLINE: + case EMPATHY_EVENT_TYPE_PRESENCE_OFFLINE: return FALSE; } @@ -250,12 +251,15 @@ get_category_for_event_type (EmpathyEventType type) switch (type) { case EMPATHY_EVENT_TYPE_CHAT: return "im.received"; + case EMPATHY_EVENT_TYPE_PRESENCE_ONLINE: + return "presence.online"; + case EMPATHY_EVENT_TYPE_PRESENCE_OFFLINE: + return "presence.offline"; case EMPATHY_EVENT_TYPE_VOIP: case EMPATHY_EVENT_TYPE_TRANSFER: case EMPATHY_EVENT_TYPE_INVITATION: case EMPATHY_EVENT_TYPE_AUTH: case EMPATHY_EVENT_TYPE_SUBSCRIPTION: - case EMPATHY_EVENT_TYPE_PRESENCE: return NULL; } |