aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2009-01-31 01:08:17 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2009-01-31 01:08:17 +0800
commitae3d11d74ca1519cd75c7fd95388d2bd9a8b99c0 (patch)
treec2fcb6c5a6118ef487cf897791b21da225d67eea
parent5a7cee7df3450bafa2284c2097f0d966d57c6eb8 (diff)
downloadgsoc2013-empathy-ae3d11d74ca1519cd75c7fd95388d2bd9a8b99c0.tar
gsoc2013-empathy-ae3d11d74ca1519cd75c7fd95388d2bd9a8b99c0.tar.gz
gsoc2013-empathy-ae3d11d74ca1519cd75c7fd95388d2bd9a8b99c0.tar.bz2
gsoc2013-empathy-ae3d11d74ca1519cd75c7fd95388d2bd9a8b99c0.tar.lz
gsoc2013-empathy-ae3d11d74ca1519cd75c7fd95388d2bd9a8b99c0.tar.xz
gsoc2013-empathy-ae3d11d74ca1519cd75c7fd95388d2bd9a8b99c0.tar.zst
gsoc2013-empathy-ae3d11d74ca1519cd75c7fd95388d2bd9a8b99c0.zip
Add an enum to define notification close reason.
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@2298 4ee84921-47dd-4033-b63a-18d7a039a3e4
-rw-r--r--src/empathy-chat-window.c4
-rw-r--r--src/empathy-misc.h9
2 files changed, 11 insertions, 2 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 90091c795..fdf1f5443 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -845,13 +845,13 @@ static void
chat_window_notification_closed_cb (NotifyNotification *notify,
NotificationData *cb_data)
{
- int reason = 1;
+ int reason = 0;
EmpathyChatWindowPriv *priv = GET_PRIV (cb_data->window);
#ifdef notify_notification_get_closed_reason
reason = notify_notification_get_closed_reason (notify);
#endif
- if (reason == 2) {
+ if (reason == NOTIFICATION_CLOSED_DISMISSED) {
empathy_chat_window_present_chat (cb_data->chat);
}
diff --git a/src/empathy-misc.h b/src/empathy-misc.h
index 6bc3e2b27..cc407b4ba 100644
--- a/src/empathy-misc.h
+++ b/src/empathy-misc.h
@@ -28,6 +28,15 @@
G_BEGIN_DECLS
+/* FIXME: this should *really* belong to libnotify. */
+typedef enum {
+ NOTIFICATION_CLOSED_INVALID = 0,
+ NOTIFICATION_CLOSED_EXPIRED = 1,
+ NOTIFICATION_CLOSED_DISMISSED = 2,
+ NOTIFICATION_CLOSED_PROGRAMMATICALY = 3,
+ NOTIFICATION_CLOSED_RESERVED = 4
+} NotificationClosedReason;
+
gboolean empathy_notification_is_enabled (void);
G_END_DECLS