1 |
ssuominen 11/02/05 16:34:01 |
2 |
|
3 |
Added: dhcpcd-ui-0.5.1-libnotify-0.7.patch |
4 |
Log: |
5 |
Fix building with x11-libs/libnotify >= 0.7. |
6 |
|
7 |
(Portage version: 2.2.0_alpha19/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 net-misc/dhcpcd-ui/files/dhcpcd-ui-0.5.1-libnotify-0.7.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/dhcpcd-ui/files/dhcpcd-ui-0.5.1-libnotify-0.7.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/dhcpcd-ui/files/dhcpcd-ui-0.5.1-libnotify-0.7.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: dhcpcd-ui-0.5.1-libnotify-0.7.patch |
16 |
=================================================================== |
17 |
--- src/dhcpcd-gtk/main.c |
18 |
+++ src/dhcpcd-gtk/main.c |
19 |
@@ -31,6 +31,9 @@ |
20 |
|
21 |
#ifdef NOTIFY |
22 |
# include <libnotify/notify.h> |
23 |
+#ifndef NOTIFY_CHECK_VERSION |
24 |
+#define NOTIFY_CHECK_VERSION(x,y,z) 0 |
25 |
+#endif |
26 |
static NotifyNotification *nn; |
27 |
#endif |
28 |
|
29 |
@@ -194,11 +197,15 @@ |
30 |
g_strfreev(msgs); |
31 |
if (nn != NULL) |
32 |
notify_notification_close(nn, NULL); |
33 |
+#if NOTIFY_CHECK_VERSION (0, 7, 0) |
34 |
+ nn = notify_notification_new(title, msg, icon); |
35 |
+#else |
36 |
if (gtk_status_icon_get_visible(status_icon)) |
37 |
nn = notify_notification_new_with_status_icon(title, |
38 |
msg, icon, status_icon); |
39 |
else |
40 |
nn = notify_notification_new(title, msg, icon, NULL); |
41 |
+#endif |
42 |
notify_notification_set_timeout(nn, 5000); |
43 |
g_signal_connect(nn, "closed", G_CALLBACK(notify_closed), NULL); |
44 |
notify_notification_show(nn, NULL); |