[gnome-calendar/calendar-editor] source-dialog: first action goes top, second goes down
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/calendar-editor] source-dialog: first action goes top, second goes down
- Date: Sun, 19 Apr 2015 18:33:03 +0000 (UTC)
commit 7a3a84e2b4a62114b4149dfd99a344bdd0f851e6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun Apr 19 14:59:36 2015 -0300
source-dialog: first action goes top, second goes down
src/gcal-source-dialog.c | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index 47228fb..dbe3a4a 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -1191,11 +1191,25 @@ validate_url_cb (GcalSourceDialog *dialog)
*/
credentials = e_named_parameters_new ();
- if (priv->prompt_password)
+ if (!priv->prompt_password)
+ {
+ g_debug ("[source-dialog] Trying to connect without credentials...");
+
+ // NULL credentials
+ e_named_parameters_set (credentials, E_SOURCE_CREDENTIAL_USERNAME, NULL);
+ e_named_parameters_set (credentials, E_SOURCE_CREDENTIAL_PASSWORD, NULL);
+
+ e_webdav_discover_sources (source, gtk_entry_get_text (GTK_ENTRY (priv->calendar_address_entry)),
+ E_WEBDAV_DISCOVER_SUPPORTS_EVENTS, credentials, NULL,
discover_sources_cb,
+ dialog);
+ }
+ else
{
gint response;
gchar *user, *password;
+ g_debug ("[source-dialog] No credentials failed, retrying with user credentials...");
+
user = password = NULL;
response = prompt_credentials (dialog, &user, &password);
@@ -1219,18 +1233,6 @@ validate_url_cb (GcalSourceDialog *dialog)
if (password)
g_free (password);
}
- else
- {
- g_debug ("[source-dialog] Trying to connect without credentials...");
-
- // NULL credentials
- e_named_parameters_set (credentials, E_SOURCE_CREDENTIAL_USERNAME, NULL);
- e_named_parameters_set (credentials, E_SOURCE_CREDENTIAL_PASSWORD, NULL);
-
- e_webdav_discover_sources (source, gtk_entry_get_text (GTK_ENTRY (priv->calendar_address_entry)),
- E_WEBDAV_DISCOVER_SUPPORTS_EVENTS, credentials, NULL,
discover_sources_cb,
- dialog);
- }
e_named_parameters_free (credentials);
}
@@ -1406,8 +1408,6 @@ discover_sources_cb (GObject *source,
*/
if (!priv->prompt_password && error->code == 14)
{
- g_debug ("[source-dialog] No credentials failed, retrying with user credentials...");
-
priv->prompt_password = TRUE;
validate_url_cb (GCAL_SOURCE_DIALOG (user_data));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]