Merge lp:~codygarver/pantheon-files/workaround-1252491 into lp:~elementary-apps/pantheon-files/trunk

Proposed by Cody Garver on 2013-11-30
Status: Merged
Approved by: Julián Unrrein on 2013-12-02
Approved revision: 1377
Merged at revision: 1378
Proposed branch: lp:~codygarver/pantheon-files/workaround-1252491
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 22 lines (+10/-1)
1 file modified
src/ProgressUIHandler.vala (+10/-1)
To merge this branch: bzr merge lp:~codygarver/pantheon-files/workaround-1252491
Reviewer Review Type Date Requested Status
Julián Unrrein (community) 2013-11-30 Approve on 2013-12-02
Review via email: mp+197277@code.launchpad.net

Commit message

Provide a custom binding to preserve backwards compatibility with a binding change to a libnotify function. Fixes bug #1252491.

To post a comment you must log in.
Julián Unrrein (junrrein) wrote :

Compiles and works with Vala 0.16, 0.20 and 0.22.1.

Code style is good too, so I'm approving this.

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ProgressUIHandler.vala'
2--- src/ProgressUIHandler.vala 2013-11-21 01:08:15 +0000
3+++ src/ProgressUIHandler.vala 2013-11-30 02:20:34 +0000
4@@ -63,8 +63,17 @@
5 this.notification_supports_persistence = server_has_persistence ();
6 }
7
8+#if !VALA_0_24
9+ [CCode (cheader_filename = "libnotify/notify.h", cname = "notify_get_server_caps")]
10+ extern static GLib.List<string> notify_get_server_caps ();
11+#endif
12+
13 private bool server_has_persistence () {
14- unowned List<string> capabilities = Notify.get_server_caps ();
15+#if VALA_0_24
16+ var capabilities = Notify.get_server_caps ();
17+#else
18+ var capabilities = notify_get_server_caps ();
19+#endif
20
21 return capabilities.find ("persistence") != null;
22 }

Subscribers

People subscribed via source and target branches

to all changes: