diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-07-06 20:07:17 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-07-07 16:03:37 +0800 |
commit | 8963051c95e0c4511f264eff2e7bc1336e4b9735 (patch) | |
tree | 6f4650dfbd781847a53d59594ac5ef820339fef4 /src | |
parent | 8e794ecc865cd0cc031963fa8c271de1b2e68993 (diff) | |
download | gsoc2013-empathy-8963051c95e0c4511f264eff2e7bc1336e4b9735.tar gsoc2013-empathy-8963051c95e0c4511f264eff2e7bc1336e4b9735.tar.gz gsoc2013-empathy-8963051c95e0c4511f264eff2e7bc1336e4b9735.tar.bz2 gsoc2013-empathy-8963051c95e0c4511f264eff2e7bc1336e4b9735.tar.lz gsoc2013-empathy-8963051c95e0c4511f264eff2e7bc1336e4b9735.tar.xz gsoc2013-empathy-8963051c95e0c4511f264eff2e7bc1336e4b9735.tar.zst gsoc2013-empathy-8963051c95e0c4511f264eff2e7bc1336e4b9735.zip |
Add 'Respond' button only for text channels and approve it directly
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-status-icon.c | 18 |
1 files changed, 11 insertions, 7 deletions
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 |