summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2015-06-11 18:29:49 +0200
committerAlexander Larsson <alexl@redhat.com>2015-06-25 15:06:16 +0200
commit2c5b8eacea56e8417f64de0a9bbf4ee549c87738 (patch)
tree7c80cf3a3d55b9b6091cfe6e0393641b27ba22d0 /src
parentefca1c7c912e85e7ccbfd3e76f54952509d35caa (diff)
downloadgnome-contacts-2c5b8eacea56e8417f64de0a9bbf4ee549c87738.tar.gz
Don't show authentication UI from the search provide
https://bugzilla.gnome.org/show_bug.cgi?id=750724
Diffstat (limited to 'src')
-rw-r--r--src/contacts-app.vala2
-rw-r--r--src/contacts-esd-setup.c5
-rw-r--r--src/contacts-esd-setup.h2
-rw-r--r--src/contacts-shell-search-provider.vala2
4 files changed, 7 insertions, 4 deletions
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index 9123051..050569b 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -254,7 +254,7 @@ public class Contacts.App : Gtk.Application {
}
public override void startup () {
- if (!ensure_eds_accounts ())
+ if (!ensure_eds_accounts (true))
quit ();
contacts_store = new Store ();
diff --git a/src/contacts-esd-setup.c b/src/contacts-esd-setup.c
index 3560c59..049635a 100644
--- a/src/contacts-esd-setup.c
+++ b/src/contacts-esd-setup.c
@@ -97,7 +97,7 @@ eds_source_credentials_required_cb (ESourceRegistry *registry,
ESourceRegistry *eds_source_registry = NULL;
static ECredentialsPrompter *eds_credentials_prompter = NULL;
-gboolean contacts_ensure_eds_accounts (void)
+gboolean contacts_ensure_eds_accounts (gboolean allow_interaction)
{
ESourceCredentialsProvider *credentials_provider;
GList *list, *link;
@@ -121,6 +121,9 @@ gboolean contacts_ensure_eds_accounts (void)
eds_credentials_prompter = e_credentials_prompter_new (eds_source_registry);
+ if (!allow_interaction)
+ e_credentials_prompter_set_auto_prompt (eds_credentials_prompter, FALSE);
+
/* First disable credentials prompt for all but addressbook sources... */
list = e_source_registry_list_sources (eds_source_registry, NULL);
diff --git a/src/contacts-esd-setup.h b/src/contacts-esd-setup.h
index be4cfcd..0096618 100644
--- a/src/contacts-esd-setup.h
+++ b/src/contacts-esd-setup.h
@@ -1,7 +1,7 @@
#include <libebook/libebook.h>
#include <gtk/gtk.h>
-gboolean contacts_ensure_eds_accounts (void);
+gboolean contacts_ensure_eds_accounts (gboolean allow_interaction);
const char *contacts_lookup_esource_name_by_uid (const char *uid);
const char *contacts_lookup_esource_name_by_uid_for_contact (const char *uid);
gboolean contacts_esource_uid_is_google (const char *uid);
diff --git a/src/contacts-shell-search-provider.vala b/src/contacts-shell-search-provider.vala
index d029ee3..53a00dd 100644
--- a/src/contacts-shell-search-provider.vala
+++ b/src/contacts-shell-search-provider.vala
@@ -10,7 +10,7 @@ public class Contacts.SearchProvider : Object {
public SearchProvider (SearchProviderApp app) {
this.app = app;
- if (!ensure_eds_accounts ())
+ if (!ensure_eds_accounts (false))
app.quit ();
store = new Store ();
contacts_map = new Gee.HashMap<string, Contact> ();