]> git.0d.be Git - empathy.git/blobdiff - src/empathy-chat-window.c
Use a flat namespace for internal includes
[empathy.git] / src / empathy-chat-window.c
index 63b5c57549a7c01d9ae80e0eb73266e53aaf7eab..47f588f08cedcb5d6bf3cdb34caa793127d89e74 100644 (file)
  *          Rômulo Fernandes Machado <romulo@castorgroup.net>
  */
 
-#include <config.h>
-
-#include <string.h>
+#include "config.h"
 
 #include <gtk/gtk.h>
-#include <gdk/gdkkeysyms.h>
-#include <gdk/gdkx.h>
 #include <glib/gi18n.h>
-#include <libnotify/notification.h>
-
-#include <libempathy/empathy-client-factory.h>
-#include <libempathy/empathy-contact.h>
-#include <libempathy/empathy-message.h>
-#include <libempathy/empathy-chatroom-manager.h>
-#include <libempathy/empathy-gsettings.h>
-#include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-request-util.h>
-#include <libempathy/empathy-individual-manager.h>
-
-#include <libempathy-gtk/empathy-images.h>
-#include <libempathy-gtk/empathy-log-window.h>
-#include <libempathy-gtk/empathy-geometry.h>
-#include <libempathy-gtk/empathy-smiley-manager.h>
-#include <libempathy-gtk/empathy-sound-manager.h>
-#include <libempathy-gtk/empathy-ui-utils.h>
-#include <libempathy-gtk/empathy-notify-manager.h>
+
+#include "empathy-client-factory.h"
+#include "empathy-chatroom-manager.h"
+#include "empathy-gsettings.h"
+#include "empathy-utils.h"
+#include "empathy-request-util.h"
+#include "empathy-individual-manager.h"
+
+#include "empathy-images.h"
+#include "empathy-geometry.h"
+#include "empathy-smiley-manager.h"
+#include "empathy-sound-manager.h"
+#include "empathy-ui-utils.h"
+#include "empathy-notify-manager.h"
 
 #include "empathy-chat-manager.h"
 #include "empathy-chat-window.h"
@@ -58,7 +50,7 @@
 #include "empathy-invite-participant-dialog.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_CHAT
-#include <libempathy/empathy-debug.h>
+#include "empathy-debug.h"
 
 /* Macro to compare guint32 X timestamps, while accounting for wrapping around
  */
@@ -986,9 +978,9 @@ chat_window_update_chat_tab_full (EmpathyChat *chat,
       const gchar * const *types;
 
       types = empathy_contact_get_client_types (remote_contact);
-      if (types != NULL && !tp_strdiff (types[0], "phone"))
+      if (empathy_client_types_contains_mobile_device ((GStrv) types))
         {
-          /* I'm on a phone ! */
+          /* I'm on a mobile device ! */
           gchar *tmp = name;
 
           name = g_strdup_printf ("☎ %s", name);
@@ -1574,13 +1566,13 @@ chat_window_show_or_update_notification (EmpathyChatWindow *self,
       const gchar *category = empathy_chat_is_room (chat)
         ? EMPATHY_NOTIFICATION_CATEGORY_MENTIONED
         : EMPATHY_NOTIFICATION_CATEGORY_CHAT;
-      notification = notify_notification_new (header, escaped, NULL);
+
+      notification = empathy_notify_manager_create_notification (header,
+          escaped, NULL);
 
       if (self->priv->notification == NULL)
         self->priv->notification = notification;
 
-      notify_notification_set_timeout (notification, NOTIFY_EXPIRES_DEFAULT);
-
       tp_g_signal_connect_object (notification, "closed",
             G_CALLBACK (chat_window_notification_closed_cb), self, 0);