summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2011-03-07 09:22:31 +0000
committerJustin Lecher <jlec@gentoo.org>2011-03-07 09:22:31 +0000
commit7f3dd85cee70674dce4700fd313c2b978d8be686 (patch)
tree8f678aa88e3903878db32f42a42e9699b8b3b47e /gnome-extra/sensors-applet/files
parentStable on amd64 wrt bug #357289 (diff)
downloadgentoo-2-7f3dd85cee70674dce4700fd313c2b978d8be686.tar.gz
gentoo-2-7f3dd85cee70674dce4700fd313c2b978d8be686.tar.bz2
gentoo-2-7f3dd85cee70674dce4700fd313c2b978d8be686.zip
Fix build against libnotify-0.7.1
(Portage version: 2.2.0_alpha26/cvs/Linux x86_64)
Diffstat (limited to 'gnome-extra/sensors-applet/files')
-rw-r--r--gnome-extra/sensors-applet/files/sensors-applet-2.2.7-libnotify-0.7.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/gnome-extra/sensors-applet/files/sensors-applet-2.2.7-libnotify-0.7.patch b/gnome-extra/sensors-applet/files/sensors-applet-2.2.7-libnotify-0.7.patch
new file mode 100644
index 000000000000..ea2f7803a8fa
--- /dev/null
+++ b/gnome-extra/sensors-applet/files/sensors-applet-2.2.7-libnotify-0.7.patch
@@ -0,0 +1,57 @@
+diff --git a/sensors-applet/active-sensor-libnotify.c b/sensors-applet/active-sensor-libnotify.c
+index e69b005..f7a7eb8 100644
+--- a/sensors-applet/active-sensor-libnotify.c
++++ b/sensors-applet/active-sensor-libnotify.c
+@@ -84,10 +84,23 @@ void active_sensor_libnotify_notify(ActiveSensor *active_sensor,
+
+ /* now create a new one */
+ g_debug("Creating new notification");
++ #ifdef NOTIFY_CHECK_VERSION
++ #if NOTIFY_CHECK_VERSION (0, 7, 1)
++ active_sensor->notification[notif_type] = notify_notification_new(summary,
++ message,
++ icon_filename);
++ #else
++ active_sensor->notification[notif_type] = notify_notification_new(summary,
++ message,
++ icon_filename,
++ attach);
++ #endif
++ #else
+ active_sensor->notification[notif_type] = notify_notification_new(summary,
+ message,
+ icon_filename,
+ attach);
++ #endif
+ g_signal_connect(active_sensor->notification[notif_type], "closed",
+ G_CALLBACK(notif_closed_cb),
+ active_sensor);
+diff --git a/sensors-applet/sensors-applet.c b/sensors-applet/sensors-applet.c
+index 9486173..81675b8 100644
+--- a/sensors-applet/sensors-applet.c
++++ b/sensors-applet/sensors-applet.c
+@@ -303,11 +303,23 @@ void sensors_applet_notify(SensorsApplet *sensors_applet,
+ message = g_strdup_printf(_("An error occurred while trying to save the current sensor configuration. "));
+ break;
+ }
+-
++ #ifdef NOTIFY_CHECK_VERSION
++ #if NOTIFY_CHECK_VERSION (0, 7, 1)
++ sensors_applet->notification = notify_notification_new(summary,
++ message,
++ GTK_STOCK_DIALOG_WARNING);
++ #else
++ sensors_applet->notification = notify_notification_new(summary,
++ message,
++ GTK_STOCK_DIALOG_WARNING,
++ GTK_WIDGET(sensors_applet->applet));
++ #endif
++ #else
+ sensors_applet->notification = notify_notification_new(summary,
+ message,
+ GTK_STOCK_DIALOG_WARNING,
+ GTK_WIDGET(sensors_applet->applet));
++ #endif
+ g_free(summary);
+ g_free(message);
+