aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-notify-manager.c3
-rw-r--r--libempathy-gtk/empathy-notify-manager.h6
-rw-r--r--src/empathy-chat-window.c7
-rw-r--r--src/empathy-status-icon.c3
4 files changed, 14 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-notify-manager.c b/libempathy-gtk/empathy-notify-manager.c
index 44f77937f..7954dd9c7 100644
--- a/libempathy-gtk/empathy-notify-manager.c
+++ b/libempathy-gtk/empathy-notify-manager.c
@@ -146,7 +146,8 @@ empathy_notify_manager_has_capability (EmpathyNotifyManager *self,
}
GdkPixbuf *
-empathy_misc_get_pixbuf_for_notification (EmpathyContact *contact,
+empathy_notify_manager_get_pixbuf_for_notification (EmpathyNotifyManager *self,
+ EmpathyContact *contact,
const char *icon_name)
{
GdkPixbuf *pixbuf = NULL;
diff --git a/libempathy-gtk/empathy-notify-manager.h b/libempathy-gtk/empathy-notify-manager.h
index d56e50852..15740468e 100644
--- a/libempathy-gtk/empathy-notify-manager.h
+++ b/libempathy-gtk/empathy-notify-manager.h
@@ -83,9 +83,11 @@ gboolean empathy_notify_manager_has_capability (EmpathyNotifyManager *self,
const gchar *capa);
gboolean empathy_notification_is_enabled (void);
-GdkPixbuf * empathy_misc_get_pixbuf_for_notification (EmpathyContact *contact,
- const char *icon_name);
+GdkPixbuf * empathy_notify_manager_get_pixbuf_for_notification (
+ EmpathyNotifyManager *self,
+ EmpathyContact *contact,
+ const char *icon_name);
G_END_DECLS
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 6d69235a3..fc64d340f 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -75,6 +75,7 @@ typedef struct {
gboolean dnd_same_window;
guint save_geometry_id;
EmpathyChatroomManager *chatroom_manager;
+ EmpathyNotifyManager *notify_mgr;
GtkWidget *dialog;
GtkWidget *notebook;
NotifyNotification *notification;
@@ -1111,7 +1112,8 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window,
G_CALLBACK (chat_window_notification_closed_cb), cb_data);
}
- pixbuf = empathy_misc_get_pixbuf_for_notification (sender, EMPATHY_IMAGE_NEW_MESSAGE);
+ pixbuf = empathy_notify_manager_get_pixbuf_for_notification (priv->notify_mgr,
+ sender, EMPATHY_IMAGE_NEW_MESSAGE);
if (pixbuf != NULL) {
notify_notification_set_icon_from_pixbuf (priv->notification, pixbuf);
@@ -1508,6 +1510,7 @@ chat_window_finalize (GObject *object)
g_object_unref (priv->ui_manager);
g_object_unref (priv->chatroom_manager);
+ g_object_unref (priv->notify_mgr);
if (priv->save_geometry_id != 0) {
g_source_remove (priv->save_geometry_id);
chat_window_save_geometry_timeout_cb (window);
@@ -1690,6 +1693,8 @@ empathy_chat_window_init (EmpathyChatWindow *window)
priv->chats_new_msg = NULL;
priv->chats_composing = NULL;
priv->current_chat = NULL;
+
+ priv->notify_mgr = empathy_notify_manager_dup_singleton ();
}
EmpathyChatWindow *
diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c
index aaf827dc3..76c549ebb 100644
--- a/src/empathy-status-icon.c
+++ b/src/empathy-status-icon.c
@@ -187,7 +187,8 @@ status_icon_update_notification (EmpathyStatusIcon *icon)
G_CALLBACK (status_icon_notification_closed_cb), icon);
}
- pixbuf = empathy_misc_get_pixbuf_for_notification (priv->event->contact,
+ pixbuf = empathy_notify_manager_get_pixbuf_for_notification (
+ priv->notify_mgr, priv->event->contact,
priv->event->icon_name);
if (pixbuf != NULL) {