]> git.0d.be Git - empathy.git/blobdiff - src/empathy-notifications-approver.c
Updated Greek translation
[empathy.git] / src / empathy-notifications-approver.c
index 92b3f7475531fe729497d4d3923d6ce9f87db39f..fb36f2ac34b19d3b7e2ef6cd26211bdfe122c6f7 100644 (file)
  * Authors: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
  */
 
-#include <config.h>
-#include <string.h>
+#include "config.h"
+#include "empathy-notifications-approver.h"
 
 #include <glib/gi18n.h>
-#include <libnotify/notification.h>
-#include <libnotify/notify.h>
-#include <telepathy-glib/telepathy-glib.h>
-
-#include <libempathy/empathy-tp-streamed-media.h>
-
-#include <libempathy-gtk/empathy-notify-manager.h>
-#include <libempathy-gtk/empathy-call-utils.h>
 
+#include "empathy-call-utils.h"
 #include "empathy-event-manager.h"
+#include "empathy-notify-manager.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_OTHER
-#include <libempathy/empathy-debug.h>
-
-#include "empathy-notifications-approver.h"
+#include "empathy-debug.h"
 
 struct _EmpathyNotificationsApproverPrivate
 {
@@ -191,12 +183,7 @@ add_notification_actions (EmpathyNotificationsApprover *self,
           self, NULL);
       break;
 
-    case EMPATHY_EVENT_TYPE_VOIP:
     case EMPATHY_EVENT_TYPE_CALL:
-      if (self->priv->event->type == EMPATHY_EVENT_TYPE_VOIP)
-        video = empathy_tp_streamed_media_has_initial_video (
-            EMPATHY_TP_STREAMED_MEDIA (self->priv->event->handler_instance));
-      else
         video = tp_call_channel_has_initial_video (
             TP_CALL_CHANNEL (self->priv->event->handler_instance), NULL);
 
@@ -261,7 +248,6 @@ notification_is_urgent (EmpathyNotificationsApprover *self,
    * interact ASAP */
   switch (self->priv->event->type) {
     case EMPATHY_EVENT_TYPE_CHAT:
-    case EMPATHY_EVENT_TYPE_VOIP:
     case EMPATHY_EVENT_TYPE_CALL:
     case EMPATHY_EVENT_TYPE_TRANSFER:
     case EMPATHY_EVENT_TYPE_INVITATION:
@@ -288,7 +274,6 @@ get_category_for_event_type (EmpathyEventType type)
     CASE(CHAT)
     CASE(PRESENCE_ONLINE)
     CASE(PRESENCE_OFFLINE)
-    CASE(VOIP)
     CASE(CALL)
     CASE(TRANSFER)
     CASE(INVITATION)
@@ -348,8 +333,8 @@ update_notification (EmpathyNotificationsApprover *self)
        * to an existing notification with the same title.
        * In this way the previous message will not be lost: the new
        * message will appear below it, in the same notification */
-      notification = notify_notification_new (self->priv->event->header,
-           message_esc, NULL);
+      notification = empathy_notify_manager_create_notification (
+          self->priv->event->header, message_esc, NULL);
 
       if (self->priv->notification == NULL)
         {
@@ -359,9 +344,6 @@ update_notification (EmpathyNotificationsApprover *self)
               G_CALLBACK (notification_closed_cb), self);
         }
 
-      notify_notification_set_timeout (notification,
-          NOTIFY_EXPIRES_DEFAULT);
-
       if (has_x_canonical_append)
         {
           notify_notification_set_hint (notification,