diff options
author | Cosimo Cecchi <cosimo@endlessm.com> | 2017-11-07 12:18:57 -0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2018-01-01 11:06:29 +0800 |
commit | edb3283f5277d9984765e5e58580f1eaf3256942 (patch) | |
tree | 2fc15efba513f8bd9880d5e2741ad4ff994eacc6 /src/contacts-store.vala | |
parent | 489f6d3c01f4ea0bdfa3a9cca0dae727517706ee (diff) | |
download | gnome-contacts-edb3283f5277d9984765e5e58580f1eaf3256942.tar.gz |
Make telepathy dependency optional
Telepathy is on the way out; remove the mandatory dependency from
gnome-contacts.
https://bugzilla.gnome.org/show_bug.cgi?id=790037
Diffstat (limited to 'src/contacts-store.vala')
-rw-r--r-- | src/contacts-store.vala | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/contacts-store.vala b/src/contacts-store.vala index c92f61a..c1653e4 100644 --- a/src/contacts-store.vala +++ b/src/contacts-store.vala @@ -19,7 +19,6 @@ using Gtk; using Folks; using Gee; -using TelepathyGLib; public class Contacts.Store : GLib.Object { public signal void changed (Contact c); @@ -36,7 +35,9 @@ public class Contacts.Store : GLib.Object { public Gee.HashMultiMap<string, string> dont_suggest_link; - public Account? caller_account { get; private set; default = null; } +#if HAVE_TELEPATHY + public TelepathyGLib.Account? caller_account { get; private set; default = null; } +#endif public bool is_quiescent { get { return this.aggregator.is_quiescent; } @@ -233,7 +234,9 @@ public class Contacts.Store : GLib.Object { }); aggregator.prepare.begin (); +#if HAVE_TELEPATHY check_call_capabilities.begin (); +#endif } private void contact_changed_cb (Contact c) { @@ -311,9 +314,10 @@ public class Contacts.Store : GLib.Object { removed (c); } +#if HAVE_TELEPATHY // TODO: listen for changes in Account#URISchemes private async void check_call_capabilities () { - var account_manager = AccountManager.dup (); + var account_manager = TelepathyGLib.AccountManager.dup (); try { yield account_manager.prepare_async (null); @@ -328,8 +332,8 @@ public class Contacts.Store : GLib.Object { } } - private async void check_account_caps (Account account) { - GLib.Quark addressing = Account.get_feature_quark_addressing (); + private async void check_account_caps (TelepathyGLib.Account account) { + GLib.Quark addressing = TelepathyGLib.Account.get_feature_quark_addressing (); if (!account.is_prepared (addressing)) { GLib.Quark[] features = { addressing }; try { @@ -344,4 +348,5 @@ public class Contacts.Store : GLib.Object { this.caller_account = account; } } +#endif } |