[empathy] Add 'Respond' button only for text channels and approve it directly
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Add 'Respond' button only for text channels and approve it directly
- Date: Wed, 7 Jul 2010 08:04:03 +0000 (UTC)
commit 8963051c95e0c4511f264eff2e7bc1336e4b9735
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Jul 6 14:07:17 2010 +0200
Add 'Respond' button only for text channels and approve it directly
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 1e9c867..0f3fff1 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]