aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-08-15 04:19:12 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-08-15 04:19:12 +0800
commit7ade227e6409c98a4010992450e111cf7bb10520 (patch)
treebdd716d894ae2f3b1affaa6bb68950a89441db13 /addressbook/gui/component
parentcca29c3424aede2bb3c9ec5a6d255ce490d3511b (diff)
downloadgsoc2013-evolution-7ade227e6409c98a4010992450e111cf7bb10520.tar
gsoc2013-evolution-7ade227e6409c98a4010992450e111cf7bb10520.tar.gz
gsoc2013-evolution-7ade227e6409c98a4010992450e111cf7bb10520.tar.bz2
gsoc2013-evolution-7ade227e6409c98a4010992450e111cf7bb10520.tar.lz
gsoc2013-evolution-7ade227e6409c98a4010992450e111cf7bb10520.tar.xz
gsoc2013-evolution-7ade227e6409c98a4010992450e111cf7bb10520.tar.zst
gsoc2013-evolution-7ade227e6409c98a4010992450e111cf7bb10520.zip
Merge revisions 35951:35992 from trunk.
svn path=/branches/kill-bonobo/; revision=35994
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r--addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in2
-rw-r--r--addressbook/gui/component/addressbook-migrate.c2
-rw-r--r--addressbook/gui/component/addressbook-view.c12
-rw-r--r--addressbook/gui/component/addressbook.c41
4 files changed, 28 insertions, 29 deletions
diff --git a/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in b/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
index 4fe2ce7a6a..823d5bd89f 100644
--- a/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
+++ b/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
@@ -102,7 +102,7 @@
<oaf_attribute name="evolution2:config_item:priority" type="string" value="-6"/>
<oaf_attribute name="name" type="string"
- _value="Evolution S/Mime Certificate Management Control"/>
+ _value="Evolution S/MIME Certificate Management Control"/>
</oaf_server>
diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c
index 5b73f7ae1e..e6d5616e13 100644
--- a/addressbook/gui/component/addressbook-migrate.c
+++ b/addressbook/gui/component/addressbook-migrate.c
@@ -122,7 +122,7 @@ dialog_set_folder_name (MigrationContext *context, const char *folder_name)
{
char *text;
- text = g_strdup_printf (_("Migrating `%s':"), folder_name);
+ text = g_strdup_printf (_("Migrating '%s':"), folder_name);
gtk_label_set_text (GTK_LABEL (context->folder_label), text);
g_free (text);
diff --git a/addressbook/gui/component/addressbook-view.c b/addressbook/gui/component/addressbook-view.c
index 7fa76e7fdc..cc8f195c98 100644
--- a/addressbook/gui/component/addressbook-view.c
+++ b/addressbook/gui/component/addressbook-view.c
@@ -43,7 +43,6 @@
#include "misc/e-task-bar.h"
#include "misc/e-info-label.h"
-
#include "e-util/e-icon-factory.h"
#include "e-util/e-util-private.h"
#include "shell/e-user-creatable-items-handler.h"
@@ -66,10 +65,6 @@
#define PARENT_TYPE G_TYPE_OBJECT
static GObjectClass *parent_class = NULL;
-/* This is used for the addressbook status bar */
-#define EVOLUTION_CONTACTS_PROGRESS_IMAGE "contact-new"
-static GdkPixbuf *progress_icon = NULL;
-
#define d(x)
struct _AddressbookViewPrivate {
@@ -489,11 +484,8 @@ set_status_message (EABView *eav, const char *message, AddressbookView *view)
} else if (priv->activity_id == 0) {
char *clientid = g_strdup_printf ("%p", view);
- if (progress_icon == NULL)
- progress_icon = e_icon_factory_get_icon (EVOLUTION_CONTACTS_PROGRESS_IMAGE, E_ICON_SIZE_STATUS);
-
- priv->activity_id = e_activity_handler_operation_started (activity_handler, clientid,
- progress_icon, message, TRUE);
+ priv->activity_id = e_activity_handler_operation_started (
+ activity_handler, clientid, message, TRUE);
g_free (clientid);
} else {
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index ac135a0be0..132ad51cea 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -73,6 +73,9 @@ static void
load_source_auth_cb (EBook *book, EBookStatus status, gpointer closure)
{
LoadSourceData *data = closure;
+ gboolean was_in = g_object_get_data (G_OBJECT (book), "authenticated") != NULL;
+
+ g_object_set_data (G_OBJECT (book), "authenticated", NULL);
if (data->cancelled) {
free_load_source_data (data);
@@ -99,38 +102,42 @@ load_source_auth_cb (EBook *book, EBookStatus status, gpointer closure)
"%s", _("Accessing LDAP Server anonymously"));
g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
gtk_widget_show (dialog);
- if (data->cb)
- data->cb (book, E_BOOK_ERROR_OK, data->closure);
- free_load_source_data (data);
- return;
+ status = E_BOOK_ERROR_OK;
+
+ goto done;
}
} else if (status == E_BOOK_ERROR_INVALID_SERVER_VERSION) {
e_error_run (NULL, "addressbook:server-version", NULL);
status = E_BOOK_ERROR_OK;
- if (data->cb)
- data->cb (book, status, data->closure);
- free_load_source_data (data);
- return;
-
+ goto done;
+ } else if (status == E_BOOK_ERROR_UNSUPPORTED_AUTHENTICATION_METHOD) {
+ goto done;
} else {
- const gchar *uri = e_book_get_uri (book);
- gchar *stripped_uri = remove_parameters_from_uri (uri);
- const gchar *auth_domain = e_source_get_property (data->source, "auth-domain");
- const gchar *component_name;
+ if (status == E_BOOK_ERROR_AUTHENTICATION_FAILED) {
+ const gchar *uri = e_book_get_uri (book);
+ gchar *stripped_uri = remove_parameters_from_uri (uri);
+ const gchar *auth_domain = e_source_get_property (data->source, "auth-domain");
+ const gchar *component_name;
- component_name = auth_domain ? auth_domain : "Addressbook";
+ component_name = auth_domain ? auth_domain : "Addressbook";
- if (status == E_BOOK_ERROR_AUTHENTICATION_FAILED) {
e_passwords_forget_password (component_name, stripped_uri);
+
+ g_free (stripped_uri);
+ } else if (was_in) {
+ /* We already tried to authenticate to the server, and it failed with
+ other reason than with E_BOOK_ERROR_AUTHENTICATION_FAILED, thus stop
+ poking with the server and report error to the user. */
+ goto done;
}
+ g_object_set_data (G_OBJECT (book), "authenticated", GINT_TO_POINTER (1));
addressbook_authenticate (book, TRUE, data->source, load_source_auth_cb, closure);
-
- g_free (stripped_uri);
return;
}
}
+done:
if (data->cb)
data->cb (book, status, data->closure);