* 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"
#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
*/
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);
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);