Browse Source

Fix compilation with Vala 0.24

Patch courtesy of Rico Tzschichholz in
https://bugs.launchpad.net/pantheon-files/+bug/1252491.
Thomas Jost 6 years ago
parent
commit
ee59e4ee5b
1 changed files with 9 additions and 1 deletions
  1. 9
    1
      smd-applet.vala

+ 9
- 1
smd-applet.vala View File

@@ -169,6 +169,10 @@ class smdApplet : Gtk.Application {
169 169
 	// so that the callback is called when the button is clicked
170 170
 	Notify.Notification notification = null;
171 171
 	bool notification_server_has_persistence = false;
172
+#if !VALA_0_24
173
+	[CCode (cheader_filename = "libnotify/notify.h", cname = "notify_get_server_caps")]
174
+	extern static GLib.List<string> notify_get_server_caps();
175
+#endif
172 176
 
173 177
 	static string menu_ui = """
174 178
 	<interface>
@@ -347,7 +351,11 @@ class smdApplet : Gtk.Application {
347 351
 		});
348 352
 
349 353
 		// notification system
350
-		unowned List<string> l = Notify.get_server_caps();
354
+#if VALA_0_24
355
+		var l = Notify.get_server_caps ();
356
+#else
357
+		var l = notify_get_server_caps ();
358
+#endif
351 359
 		notification_server_has_persistence = (0 <= l.index("persistence")); 
352 360
 
353 361
 		// error mode data

Loading…
Cancel
Save