aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorvivek jain <jvivek@novell.com>2005-02-04 16:08:59 +0800
committerJain Vivek <jvivek@src.gnome.org>2005-02-04 16:08:59 +0800
commitccecf5ce111a42dadfb0bf9a90aa2756d2361fc1 (patch)
tree3dfda9f15dfa276a155d237975df2f0fe9949f79 /addressbook
parente6acb039d0395c2b346cf1370862e49547484143 (diff)
downloadgsoc2013-evolution-ccecf5ce111a42dadfb0bf9a90aa2756d2361fc1.tar
gsoc2013-evolution-ccecf5ce111a42dadfb0bf9a90aa2756d2361fc1.tar.gz
gsoc2013-evolution-ccecf5ce111a42dadfb0bf9a90aa2756d2361fc1.tar.bz2
gsoc2013-evolution-ccecf5ce111a42dadfb0bf9a90aa2756d2361fc1.tar.lz
gsoc2013-evolution-ccecf5ce111a42dadfb0bf9a90aa2756d2361fc1.tar.xz
gsoc2013-evolution-ccecf5ce111a42dadfb0bf9a90aa2756d2361fc1.tar.zst
gsoc2013-evolution-ccecf5ce111a42dadfb0bf9a90aa2756d2361fc1.zip
display a warning dialog if the server version is not proper added warning
2005-01-04 vivek jain <jvivek@novell.com> * gui/component/addressbook.c: (load_source_auth_cb) display a warning dialog if the server version is not proper * addressbook-errors.xml: added warning message for invalid server version svn path=/trunk/; revision=28706
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/addressbook-errors.xml7
-rw-r--r--addressbook/addressbook-errors.xml.h6
-rw-r--r--addressbook/gui/component/addressbook.c55
4 files changed, 50 insertions, 24 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 9eab108cd8..9fd390167d 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,9 @@
+2005-01-04 vivek jain <jvivek@novell.com>
+
+ * gui/component/addressbook.c: (load_source_auth_cb)
+ display a warning dialog if the server version is not proper
+ * addressbook-errors.xml: added warning message for invalid server version
+
2004-02-02 Hans Petter Jansson <hpj@ximian.com>
* gui/component/addressbook-component.c (ensure_sources): Implement
diff --git a/addressbook/addressbook-errors.xml b/addressbook/addressbook-errors.xml
index 6aa5abb017..3bb5c93e01 100644
--- a/addressbook/addressbook-errors.xml
+++ b/addressbook/addressbook-errors.xml
@@ -90,4 +90,11 @@
<button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
<button stock="gtk-ok" label="_Add" response="GTK_RESPONSE_YES"/>
</error>
+
+ <error id="server-version" type="warning">
+ <title>Server Version</title>
+ <primary>Your server needs to be updated</primary>
+ <secondary>Some features may not work correctly with your current server version</secondary>
+ </error>
+
</error-list>
diff --git a/addressbook/addressbook-errors.xml.h b/addressbook/addressbook-errors.xml.h
index b3d6896910..69f5077682 100644
--- a/addressbook/addressbook-errors.xml.h
+++ b/addressbook/addressbook-errors.xml.h
@@ -60,3 +60,9 @@ char *s = N_("Address '{0}' already exists.");
/* addressbook:ask-list-add-exists secondary */
char *s = N_("A contact already exists with this address. Would you like to add a new card with the same address anyway?");
char *s = N_("_Add");
+/* addressbook:server-version title */
+char *s = N_("Server Version");
+/* addressbook:server-version primary */
+char *s = N_("Your server needs to be updated");
+/* addressbook:server-version secondary */
+char *s = N_("Some features may not work correctly with your current server version");
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index c2ab48e55b..b389cfa78c 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -29,7 +29,7 @@
#include <libebook/e-book.h>
#include "e-util/e-passwords.h"
-
+#include "widgets/misc/e-error.h"
#include "addressbook.h"
#define d(x)
@@ -82,38 +82,45 @@ load_source_auth_cb (EBook *book, EBookStatus status, gpointer closure)
/* the user clicked cancel in the password dialog */
if (status == E_BOOK_ERROR_CANCELLED) {
-
+
if (e_book_check_static_capability (book, "anon-access")) {
-
- GtkWidget *dialog;
-
- /* XXX "LDAP" has to be removed from the folowing message
- so that it wil valid for other servers which provide
- anonymous access*/
-
- dialog = gtk_message_dialog_new (NULL,
- 0,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- _("Accessing LDAP Server anonymously"));
- g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
- gtk_widget_show (dialog);
- data->cb (book, E_BOOK_ERROR_OK, data->closure);
+
+ GtkWidget *dialog;
+
+ /* XXX "LDAP" has to be removed from the folowing message
+ so that it wil valid for other servers which provide
+ anonymous access*/
+
+ dialog = gtk_message_dialog_new (NULL,
+ 0,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+ _("Accessing LDAP Server anonymously"));
+ g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
+ gtk_widget_show (dialog);
+ data->cb (book, E_BOOK_ERROR_OK, data->closure);
+ free_load_source_data (data);
+ return;
+ }
+ } 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;
- }
- }
- else {
+
+ } else {
gchar *uri = e_source_get_uri (data->source);
gchar *stripped_uri = remove_parameters_from_uri (uri);
const gchar *auth_domain = e_source_get_property (data->source, "auth-domain");
- const gchar *component_name;
-
+ const gchar *component_name;
+
component_name = auth_domain ? auth_domain : "Addressbook";
-
+
e_passwords_forget_password (component_name, stripped_uri);
addressbook_authenticate (book, TRUE, data->source, load_source_auth_cb, closure);
-
+
g_free (stripped_uri);
g_free (uri);
return;