chat_window_notification_closed_cb (NotifyNotification *notify,
NotificationData *cb_data)
{
- int reason = 0;
+ EmpathyNotificationClosedReason 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 == NOTIFICATION_CLOSED_DISMISSED) {
+ if (reason == EMPATHY_NOTIFICATION_CLOSED_DISMISSED) {
empathy_chat_window_present_chat (cb_data->chat);
}
/* 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;
+ EMPATHY_NOTIFICATION_CLOSED_INVALID = 0,
+ EMPATHY_NOTIFICATION_CLOSED_EXPIRED = 1,
+ EMPATHY_NOTIFICATION_CLOSED_DISMISSED = 2,
+ EMPATHY_NOTIFICATION_CLOSED_PROGRAMMATICALY = 3,
+ EMPATHY_NOTIFICATION_CLOSED_RESERVED = 4
+} EmpathyNotificationClosedReason;
gboolean empathy_notification_is_enabled (void);
GdkPixbuf * empathy_misc_get_pixbuf_for_notification (EmpathyContact *contact,
EmpathyStatusIcon *icon)
{
EmpathyStatusIconPriv *priv = GET_PRIV (icon);
- int reason = 1;
+ EmpathyNotificationClosedReason reason = 0;
#ifdef notify_notification_get_closed_reason
reason = notify_notification_get_closed_reason (notification);
/* the notification has been closed by the user, see the
* DesktopNotification spec.
*/
- if (reason == NOTIFICATION_CLOSED_DISMISSED) {
+ if (reason == EMPATHY_NOTIFICATION_CLOSED_DISMISSED) {
/* use an idle here, as this callback is called from a
* DBus signal handler inside libnotify, and we might call
* a *_run_* method when activating the event.