Don't show authentication UI from the search provide
https://bugzilla.gnome.org/show_bug.cgi?id=750724
This commit is contained in:
parent
efca1c7c91
commit
2c5b8eacea
5 changed files with 8 additions and 5 deletions
|
@ -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 ();
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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> ();
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace Gnome {
|
|||
[CCode (cprefix = "Contacts", lower_case_cprefix = "contacts_", cheader_filename = "contacts-esd-setup.h")]
|
||||
namespace Contacts {
|
||||
[CCode (cname = "contacts_ensure_eds_accounts")]
|
||||
public static bool ensure_eds_accounts ();
|
||||
public static bool ensure_eds_accounts (bool allow_interaction);
|
||||
[CCode (cname = "contacts_lookup_esource_name_by_uid")]
|
||||
public static unowned string? lookup_esource_name_by_uid (string uid);
|
||||
[CCode (cname = "contacts_lookup_esource_name_by_uid_for_contact")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue