From 8963051c95e0c4511f264eff2e7bc1336e4b9735 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 6 Jul 2010 14:07:17 +0200 Subject: Add 'Respond' button only for text channels and approve it directly --- src/empathy-status-icon.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c index 1e9c8679f..0f3fff1b7 100644 --- a/src/empathy-status-icon.c +++ b/src/empathy-status-icon.c @@ -108,14 +108,14 @@ notification_close_helper (EmpathyStatusIconPriv *priv) } static void -notification_action_cb (NotifyNotification *notification, +notification_approve_cb (NotifyNotification *notification, gchar *action, EmpathyStatusIcon *icon) { EmpathyStatusIconPriv *priv = GET_PRIV (icon); if (priv->event) - empathy_event_activate (priv->event); + empathy_event_approve (priv->event); } static void @@ -124,12 +124,16 @@ add_notification_actions (EmpathyStatusIcon *self, { EmpathyStatusIconPriv *priv = GET_PRIV (self); - if (priv->event->type ==EMPATHY_EVENT_TYPE_PRESENCE) - return; + switch (priv->event->type) { + case EMPATHY_EVENT_TYPE_CHAT: + notify_notification_add_action (notification, + "respond", _("Respond"), (NotifyActionCallback) notification_approve_cb, + self, NULL); + break; - notify_notification_add_action (notification, - "respond", _("Respond"), (NotifyActionCallback) notification_action_cb, - self, NULL); + default: + break; + } } static void -- cgit v1.2.3