Commit c81f08fb authored by Guillaume Desmottes's avatar Guillaume Desmottes

set a category on presence notifications

parent aaf4798d
......@@ -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);
}
......
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment