Lines 47-52
Link Here
|
47 |
#include <libnotify/notify.h> |
47 |
#include <libnotify/notify.h> |
48 |
#include <gdk/gdk.h> |
48 |
#include <gdk/gdk.h> |
49 |
|
49 |
|
|
|
50 |
#ifndef NOTIFY_CHECK_VERSION |
51 |
#define NOTIFY_CHECK_VERSION(x,y,z) 0 |
52 |
#endif |
53 |
|
50 |
static PRBool gHasActions = PR_FALSE; |
54 |
static PRBool gHasActions = PR_FALSE; |
51 |
|
55 |
|
52 |
static void notify_action_cb(NotifyNotification *notification, |
56 |
static void notify_action_cb(NotifyNotification *notification, |
Lines 202-210
Link Here
|
202 |
nsresult |
206 |
nsresult |
203 |
nsAlertsIconListener::ShowAlert(GdkPixbuf* aPixbuf) |
207 |
nsAlertsIconListener::ShowAlert(GdkPixbuf* aPixbuf) |
204 |
{ |
208 |
{ |
205 |
NotifyNotification* notify = notify_notification_new(mAlertTitle.get(), |
209 |
NotifyNotification* notify; |
206 |
mAlertText.get(), |
210 |
/* libnotify 0.7.0 and later has no support for attaching to widgets */ |
207 |
NULL, NULL); |
211 |
#if NOTIFY_CHECK_VERSION(0,7,0) |
|
|
212 |
notify = notify_notification_new(mAlertTitle.get(), mAlertText.get(), NULL); |
213 |
#else |
214 |
notify = notify_notification_new(mAlertTitle.get(), mAlertText.get(), NULL, NULL); |
215 |
#endif |
216 |
|
208 |
if (!notify) |
217 |
if (!notify) |
209 |
return NS_ERROR_OUT_OF_MEMORY; |
218 |
return NS_ERROR_OUT_OF_MEMORY; |
210 |
|
219 |
|