Actually use custom libnotify.vapi
[debian/pino.git] / debian / patches / 012_libnotify-0.7.diff
1 Description: Remove the widget argument removed from notify_notification_new in 
2  libnotify 0.7 
3 Author: Julien Valroff <julien@debian.org>
4 Last-Updated: 2011-06-12
5 Bug-Debian: http://bugs.debian.org/630296
6
7 --- a/src/popups.vala
8 +++ b/src/popups.vala
9 @@ -76,7 +76,7 @@
10                         head = "%s %s %s".printf(_("Direct message"), _("from"), head);
11                 
12                 Notification popup = new Notification(GLib.Markup.escape_text(head),
13 -                       GLib.Markup.escape_text(status.text), null, null);
14 +                       GLib.Markup.escape_text(status.text), null);
15                 
16                 string av_path = cache.get_or_download(status.user_avatar,
17                         Cache.Method.ASYNC, false);
18 @@ -92,7 +92,7 @@
19         
20         private void show_short_popup(string text) {
21                 Notification popup = new Notification(_("Updates"),
22 -                       text, null, null);
23 +                       text, null);
24                 popup.set_icon_from_pixbuf(logo);
25                 popup.set_timeout(5000);
26                 popup.set_urgency(Notify.Urgency.NORMAL);
27 --- /dev/null
28 +++ b/src/vapi/libnotify.vapi
29 @@ -0,0 +1,69 @@
30 +/* libnotify.vapi generated by vapigen, do not modify. */
31 +
32 +[CCode (cprefix = "Notify", lower_case_cprefix = "notify_")]
33 +namespace Notify {
34 +       [CCode (cheader_filename = "libnotify/notify.h")]
35 +       public class Notification : GLib.Object {
36 +               [CCode (has_construct_function = false)]
37 +               public Notification (string summary, string? body, string? icon);
38 +               public void add_action (string action, string label, owned Notify.ActionCallback callback);
39 +               public void clear_actions ();
40 +               public void clear_hints ();
41 +               public bool close () throws GLib.Error;
42 +               public int get_closed_reason ();
43 +               public void set_category (string category);
44 +               public void set_hint (string key, GLib.Variant value);
45 +               public void set_hint_byte (string key, uchar value);
46 +               public void set_hint_byte_array (string key, uchar[] value, size_t len);
47 +               public void set_hint_double (string key, double value);
48 +               public void set_hint_int32 (string key, int value);
49 +               public void set_hint_string (string key, string value);
50 +               public void set_hint_uint32 (string key, uint value);
51 +               public void set_icon_from_pixbuf (Gdk.Pixbuf icon);
52 +               public void set_image_from_pixbuf (Gdk.Pixbuf image);
53 +               public void set_timeout (int timeout);
54 +               public void set_urgency (Notify.Urgency urgency);
55 +               public bool show () throws GLib.Error;
56 +               public bool update (string summary, string body, string icon);
57 +               [NoAccessorMethod]
58 +               public string body { owned get; set construct; }
59 +               public int closed_reason { get; }
60 +               [NoAccessorMethod]
61 +               public string icon_name { owned get; set construct; }
62 +               [NoAccessorMethod]
63 +               public int id { get; set construct; }
64 +               [NoAccessorMethod]
65 +               public string summary { owned get; set construct; }
66 +               public virtual signal void closed ();
67 +       }
68 +       [CCode (cprefix = "NOTIFY_URGENCY_", cheader_filename = "libnotify/notify.h")]
69 +       public enum Urgency {
70 +               LOW,
71 +               NORMAL,
72 +               CRITICAL
73 +       }
74 +       [CCode (cheader_filename = "libnotify/notify.h")]
75 +       public delegate void ActionCallback (Notify.Notification notification, string action);
76 +       [CCode (cheader_filename = "libnotify/notify.h")]
77 +       public const int EXPIRES_DEFAULT;
78 +       [CCode (cheader_filename = "libnotify/notify.h")]
79 +       public const int EXPIRES_NEVER;
80 +       [CCode (cheader_filename = "libnotify/notify.h")]
81 +       public const int VERSION_MAJOR;
82 +       [CCode (cheader_filename = "libnotify/notify.h")]
83 +       public const int VERSION_MICRO;
84 +       [CCode (cheader_filename = "libnotify/notify.h")]
85 +       public const int VERSION_MINOR;
86 +       [CCode (cheader_filename = "libnotify/notify.h")]
87 +       public static unowned string get_app_name ();
88 +       [CCode (cheader_filename = "libnotify/notify.h")]
89 +       public static unowned GLib.List get_server_caps ();
90 +       [CCode (cheader_filename = "libnotify/notify.h")]
91 +       public static bool get_server_info (out unowned string ret_name, out unowned string ret_vendor, out unowned string ret_version, out unowned string ret_spec_version);
92 +       [CCode (cheader_filename = "libnotify/notify.h")]
93 +       public static bool init (string app_name);
94 +       [CCode (cheader_filename = "libnotify/notify.h")]
95 +       public static bool is_initted ();
96 +       [CCode (cheader_filename = "libnotify/notify.h")]
97 +       public static void uninit ();
98 +}
99 --- a/CMakeLists.txt
100 +++ b/CMakeLists.txt
101 @@ -100,6 +100,7 @@
102    ${pino_VALA_OPTIONS}
103  CUSTOM_VAPIS
104    ${CMAKE_CURRENT_SOURCE_DIR}/src/vapi/config.vapi
105 +  ${CMAKE_CURRENT_SOURCE_DIR}/src/vapi/libnotify.vapi
106  )
107  
108