1 |
ssuominen 11/02/05 13:20:07 |
2 |
|
3 |
Added: twittare-0.7.42-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-im/twittare/files/twittare-0.7.42-libnotify-0.7.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/twittare/files/twittare-0.7.42-libnotify-0.7.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/twittare/files/twittare-0.7.42-libnotify-0.7.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: twittare-0.7.42-libnotify-0.7.patch |
16 |
=================================================================== |
17 |
--- libtwnotification/main.cpp |
18 |
+++ libtwnotification/main.cpp |
19 |
@@ -2,6 +2,10 @@ |
20 |
#include <iostream> |
21 |
#include <libnotify/notify.h> |
22 |
|
23 |
+#ifndef NOTIFY_CHECK_VERSION |
24 |
+#define NOTIFY_CHECK_VERSION(x,y,z) 0 |
25 |
+#endif |
26 |
+ |
27 |
using namespace std; |
28 |
|
29 |
int main(int argv, char* argc[]) |
30 |
@@ -9,7 +13,12 @@ |
31 |
cout << "HOLA" << endl; |
32 |
notify_init("Twittaré"); |
33 |
|
34 |
- NotifyNotification* nots = notify_notification_new("New twitt", "Tabaré Caorsi:\nEsto es un twit de prueba", "", 0); |
35 |
+ NotifyNotification* nots = notify_notification_new("New twitt", "Tabaré Caorsi:\nEsto es un twit de prueba", "" |
36 |
+#if NOTIFY_CHECK_VERSION (0, 7, 0) |
37 |
+ ); |
38 |
+#else |
39 |
+ , 0); |
40 |
+#endif |
41 |
GError* error = 0; |
42 |
notify_notification_show(nots, &error); |
43 |
|
44 |
--- libtwnotification/twnotification.cpp |
45 |
+++ libtwnotification/twnotification.cpp |
46 |
@@ -1,6 +1,10 @@ |
47 |
#include "twnotification.h" |
48 |
#include <libnotify/notify.h> |
49 |
|
50 |
+#ifndef NOTIFY_CHECK_VERSION |
51 |
+#define NOTIFY_CHECK_VERSION(x,y,z) 0 |
52 |
+#endif |
53 |
+ |
54 |
TwNotification::TwNotification() |
55 |
{ |
56 |
notify_init("Twittaré"); |
57 |
@@ -8,7 +12,12 @@ |
58 |
|
59 |
void TwNotification::notify(const char * title, const char * text, const char * icon) |
60 |
{ |
61 |
- NotifyNotification* nots = notify_notification_new(title, text, icon, 0); |
62 |
+ NotifyNotification* nots = notify_notification_new(title, text, icon |
63 |
+#if NOTIFY_CHECK_VERSION (0, 7, 0) |
64 |
+ ); |
65 |
+#else |
66 |
+ , 0); |
67 |
+#endif |
68 |
GError* error = 0; |
69 |
notify_notification_show(nots, &error); |
70 |
} |