aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/addressbook.c
diff options
context:
space:
mode:
authorSivaiah Nallagatla <siva@src.gnome.org>2004-11-22 07:55:45 +0800
committerSivaiah Nallagatla <siva@src.gnome.org>2004-11-22 07:55:45 +0800
commit3c80fbd004c256274bf6856c19cb119226415a89 (patch)
treee009875c0c1d8c715849b2b4b0a1388ba25e65f1 /addressbook/gui/component/addressbook.c
parent17df6f69a2a9521ffa3ed41ad93d951909df8f0b (diff)
downloadgsoc2013-evolution-3c80fbd004c256274bf6856c19cb119226415a89.tar.gz
gsoc2013-evolution-3c80fbd004c256274bf6856c19cb119226415a89.tar.zst
gsoc2013-evolution-3c80fbd004c256274bf6856c19cb119226415a89.zip
reverting commit
svn path=/trunk/; revision=27954
Diffstat (limited to 'addressbook/gui/component/addressbook.c')
-rw-r--r--addressbook/gui/component/addressbook.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index dbeccd75fc..cbf908c17f 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -120,8 +120,7 @@ load_source_auth_cb (EBook *book, EBookStatus status, gpointer closure)
}
}
- if (data->cb)
- data->cb (book, status, data->closure);
+ data->cb (book, status, data->closure);
free_load_source_data (data);
}
@@ -210,28 +209,12 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc
}
else {
/* they hit cancel */
-
- cb (book, E_BOOK_ERROR_CANCELLED, closure);
+ cb (book, E_BOOK_ERROR_CANCELLED, closure);
}
g_free (uri);
}
-
-
-static void
-auth_required_cb (EBook *book, gpointer data)
-{
- LoadSourceData *load_source_data = g_new0(LoadSourceData, 1);
-
- load_source_data->source = g_object_ref (g_object_ref (e_book_get_source (book)));
- load_source_data->cancelled = FALSE;
- addressbook_authenticate (book, FALSE, load_source_data->source,
- load_source_auth_cb, load_source_data);
-
-
-
-}
static void
load_source_cb (EBook *book, EBookStatus status, gpointer closure)
{
@@ -246,16 +229,17 @@ load_source_cb (EBook *book, EBookStatus status, gpointer closure)
const gchar *auth;
auth = e_source_get_property (load_source_data->source, "auth");
+
+ /* check if the addressbook needs authentication */
+
if (auth && strcmp (auth, "none")) {
- g_signal_connect (book, "auth_required", auth_required_cb, NULL);
-
- if (e_book_is_online (book)) {
- addressbook_authenticate (book, FALSE, load_source_data->source,
- load_source_auth_cb, closure);
- return;
- }
+ addressbook_authenticate (book, FALSE, load_source_data->source,
+ load_source_auth_cb, closure);
+
+ return;
}
}
+
load_source_data->cb (book, status, load_source_data->closure);
free_load_source_data (load_source_data);
}