]> git.0d.be Git - empathy.git/commitdiff
add answer/decline buttons in call notifications (#597124)
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 6 Jul 2010 12:20:55 +0000 (14:20 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 7 Jul 2010 08:03:37 +0000 (10:03 +0200)
src/empathy-status-icon.c

index 0f3fff1b78c6e56048e05475d3569d09f73305f7..08129b61dc5e893ff0c00fdde781e0a4ca561042 100644 (file)
@@ -118,6 +118,17 @@ notification_approve_cb (NotifyNotification *notification,
                empathy_event_approve (priv->event);
 }
 
                empathy_event_approve (priv->event);
 }
 
+static void
+notification_decline_cb (NotifyNotification *notification,
+                       gchar              *action,
+                       EmpathyStatusIcon  *icon)
+{
+       EmpathyStatusIconPriv *priv = GET_PRIV (icon);
+
+       if (priv->event)
+               empathy_event_decline (priv->event);
+}
+
 static void
 add_notification_actions (EmpathyStatusIcon *self,
                          NotifyNotification *notification)
 static void
 add_notification_actions (EmpathyStatusIcon *self,
                          NotifyNotification *notification)
@@ -131,6 +142,16 @@ add_notification_actions (EmpathyStatusIcon *self,
                                        self, NULL);
                        break;
 
                                        self, NULL);
                        break;
 
+               case EMPATHY_EVENT_TYPE_VOIP:
+                       notify_notification_add_action (notification,
+                               "reject", _("Reject"), (NotifyActionCallback) notification_decline_cb,
+                                       self, NULL);
+
+                       notify_notification_add_action (notification,
+                               "answer", _("Answer"), (NotifyActionCallback) notification_approve_cb,
+                                       self, NULL);
+                       break;
+
                default:
                        break;
        }
                default:
                        break;
        }