[empathy] change empathy_notification_is_enabled to empathy_notify_manager_notification_is_enabled



commit e5b71631aacf92ba8d242e0a3e3763555b8c751c
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Nov 12 13:25:23 2009 +0000

    change empathy_notification_is_enabled to empathy_notify_manager_notification_is_enabled
    
    Making it a method of EmpathyNotifyManager would allow us to cache the
    gconf values if we want to.

 libempathy-gtk/empathy-notify-manager.c |    2 +-
 libempathy-gtk/empathy-notify-manager.h |    3 ++-
 src/empathy-chat-window.c               |    2 +-
 src/empathy-status-icon.c               |    6 +++---
 4 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/libempathy-gtk/empathy-notify-manager.c b/libempathy-gtk/empathy-notify-manager.c
index 7954dd9..ffcc34f 100644
--- a/libempathy-gtk/empathy-notify-manager.c
+++ b/libempathy-gtk/empathy-notify-manager.c
@@ -162,7 +162,7 @@ empathy_notify_manager_get_pixbuf_for_notification (EmpathyNotifyManager *self,
 }
 
 gboolean
-empathy_notification_is_enabled (void)
+empathy_notify_manager_notification_is_enabled  (EmpathyNotifyManager *self)
 {
   EmpathyConf *conf;
   gboolean res;
diff --git a/libempathy-gtk/empathy-notify-manager.h b/libempathy-gtk/empathy-notify-manager.h
index 1574046..4faa13b 100644
--- a/libempathy-gtk/empathy-notify-manager.h
+++ b/libempathy-gtk/empathy-notify-manager.h
@@ -82,7 +82,8 @@ EmpathyNotifyManager * empathy_notify_manager_dup_singleton (void);
 gboolean empathy_notify_manager_has_capability (EmpathyNotifyManager *self,
     const gchar *capa);
 
-gboolean empathy_notification_is_enabled  (void);
+gboolean empathy_notify_manager_notification_is_enabled  (
+    EmpathyNotifyManager *self);
 
 GdkPixbuf * empathy_notify_manager_get_pixbuf_for_notification (
     EmpathyNotifyManager *self,
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index fc64d34..4d99afd 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1080,7 +1080,7 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window,
 	EmpathyChatWindowPriv *priv = GET_PRIV (window);
 	gboolean res;
 
-	if (!empathy_notification_is_enabled ()) {
+	if (!empathy_notify_manager_notification_is_enabled (priv->notify_mgr)) {
 		return;
 	} else {
 		empathy_conf_get_bool (empathy_conf_get (),
diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c
index 76c549e..1b0abdc 100644
--- a/src/empathy-status-icon.c
+++ b/src/empathy-status-icon.c
@@ -147,7 +147,7 @@ status_icon_update_notification (EmpathyStatusIcon *icon)
 	EmpathyStatusIconPriv *priv = GET_PRIV (icon);
 	GdkPixbuf *pixbuf = NULL;
 
-	if (!empathy_notification_is_enabled ()) {
+	if (!empathy_notify_manager_notification_is_enabled (priv->notify_mgr)) {
 		/* always close the notification if this happens */
 		notification_close_helper (priv);
 		return;
@@ -331,7 +331,7 @@ status_icon_event_updated_cb (EmpathyEventManager *manager,
 		return;
 	}
 
-	if (empathy_notification_is_enabled ()) {
+	if (empathy_notify_manager_notification_is_enabled (priv->notify_mgr)) {
 		status_icon_update_notification (icon);
 	}
 
@@ -388,7 +388,7 @@ status_icon_idle_notify_cb (EmpathyStatusIcon *icon)
 	status_icon_update_icon (icon);
 	status_icon_update_tooltip (icon);
 
-	if (!empathy_notification_is_enabled ()) {
+	if (!empathy_notify_manager_notification_is_enabled (priv->notify_mgr)) {
 		/* dismiss the outstanding notification if present */
 
 		if (priv->notification) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]