[tracker] Use conditional to work around gtk+-3.0.vapi breakage
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Use conditional to work around gtk+-3.0.vapi breakage
- Date: Sat, 11 Mar 2017 15:50:39 +0000 (UTC)
commit b351a636949814c300de85470c884ad5f14f0804
Author: Sam Thursfield <sam afuera me uk>
Date: Sat Mar 11 12:27:23 2017 +0000
Use conditional to work around gtk+-3.0.vapi breakage
Commit 53007652ce1ed3cf350ec042b310606e0115377a breaks the build with
versions of Vala older than 0.35.6. It's more convenient for people
building Tracker if we use a #if block instead to allow building with
older stable versions Vala.
src/tracker-needle/tracker-tags-view.vala | 4 ++++
src/tracker-preferences/tracker-preferences.vala | 8 ++++++++
2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-needle/tracker-tags-view.vala b/src/tracker-needle/tracker-tags-view.vala
index d0309c8..565bb5e 100644
--- a/src/tracker-needle/tracker-tags-view.vala
+++ b/src/tracker-needle/tracker-tags-view.vala
@@ -514,7 +514,11 @@ public class TrackerTagsView : Box {
yield connection.update_async (query, Priority.DEFAULT, td.cancellable);
debug ("Tag removed");
+ #if VALA_0_36
store.remove (ref td.iter);
+ #else
+ store.remove (td.iter);
+ #endif
} catch (GLib.Error e) {
warning ("Could not run Sparql update query: %s", e.message);
show_error_dialog (_("Could not remove tag"), e);
diff --git a/src/tracker-preferences/tracker-preferences.vala
b/src/tracker-preferences/tracker-preferences.vala
index 79a7249..c94cb49 100644
--- a/src/tracker-preferences/tracker-preferences.vala
+++ b/src/tracker-preferences/tracker-preferences.vala
@@ -428,7 +428,11 @@ public class Tracker.Preferences {
Value value;
store.get_value (iter, 0, out value);
if (value.get_string () == to_check) {
+ #if VALA_0_36
store.remove (ref iter);
+ #else
+ store.remove (iter);
+ #endif
valid = store.get_iter_first (out iter);
} else {
valid = store.iter_next (ref iter);
@@ -634,7 +638,11 @@ public class Tracker.Preferences {
// Check which UserDirectorys we match with str
UserDirectory[] matches = dir_match_user_directories (dir);
+ #if VALA_0_36
store.remove (ref iter);
+ #else
+ store.remove (iter);
+ #endif
// Check if we need to untoggle a button
toggles_update (matches, false);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]