aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog18
-rw-r--r--addressbook/backend/pas/pas-backend-file.c2
-rw-r--r--addressbook/gui/component/addressbook.c49
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c2
4 files changed, 52 insertions, 19 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 8bd5f347b8..78fb0ebfa6 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,21 @@
+2002-08-16 Chris Toshok <toshok@ximian.com>
+
+ [ fix 27333 ]
+ * gui/widgets/e-addressbook-model.c (get_view): "local" ->
+ "do-initial-query".
+
+ * backend/pas/pas-backend-file.c
+ (pas_backend_file_get_static_capabilities): "local" ->
+ "local,do-initial-query".
+
+ * gui/widgets/e-addressbook-model.c (get_view): "local" ->
+ "do-initial-query".
+
+ * gui/component/addressbook.c (book_open_cb): Only assume the
+ addressbook is local if "local" appears in its static
+ capabilities. We still use the ldap special case, but be nicer to
+ other networked backends.
+
2002-08-12 Dan Winship <danw@ximian.com>
* gui/component/addressbook-component.c (user_create_new_item_cb):
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index 329b919e7d..c0d03d6b5d 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -1584,7 +1584,7 @@ pas_backend_file_remove_client (PASBackend *backend,
static char *
pas_backend_file_get_static_capabilities (PASBackend *backend)
{
- return g_strdup("local");
+ return g_strdup("local,do-initial-query");
}
static gboolean
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 5a84addd3e..bf4de3db4d 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -461,35 +461,50 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure)
"book", book,
NULL);
} else {
- AddressbookSource *source;
GtkWidget *warning_dialog, *label;
+ char *capabilities;
+ AddressbookSource *source = NULL;
warning_dialog = gnome_dialog_new (
_("Unable to open addressbook"),
GNOME_STOCK_BUTTON_CLOSE,
NULL);
- source = addressbook_storage_get_source_by_uri (view->uri);
+ capabilities = e_book_get_static_capabilities (book);
- if (source) {
-#if HAVE_LDAP
- label = gtk_label_new (
- _("We were unable to open this addressbook. This either\n"
- "means you have entered an incorrect URI, or the LDAP server\n"
- "is down"));
-#else
- label = gtk_label_new (
- _("This version of Evolution does not have LDAP support\n"
- "compiled in to it. If you want to use LDAP in Evolution\n"
- "you must compile the program from the CVS sources after\n"
- "retrieving OpenLDAP from the link below.\n"));
-#endif
- }
- else {
+ if (capabilities && strstr (capabilities, "local")) {
label = gtk_label_new (
_("We were unable to open this addressbook. Please check that the\n"
"path exists and that you have permission to access it."));
}
+ else {
+ source = addressbook_storage_get_source_by_uri (view->uri);
+
+ if (source) {
+ /* special case for ldap: contact folders so we can tell the user about openldap */
+#if HAVE_LDAP
+ label = gtk_label_new (
+ _("We were unable to open this addressbook. This either\n"
+ "means you have entered an incorrect URI, or the LDAP server\n"
+ "is unreachable."));
+#else
+ label = gtk_label_new (
+ _("This version of Evolution does not have LDAP support\n"
+ "compiled in to it. If you want to use LDAP in Evolution\n"
+ "you must compile the program from the CVS sources after\n"
+ "retrieving OpenLDAP from the link below.\n"));
+#endif
+ }
+ else {
+ /* other network folders */
+ label = gtk_label_new (
+ _("We were unable to open this addressbook. This either\n"
+ "means you have entered an incorrect URI, or the server\n"
+ "is unreachable."));
+ }
+ }
+
+ g_free (capabilities);
gtk_misc_set_alignment(GTK_MISC(label),
0, .5);
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index 5647e1d88e..aadd5f049f 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -411,7 +411,7 @@ get_view (EAddressbookModel *model)
if (model->first_get_view) {
char *capabilities;
capabilities = e_book_get_static_capabilities (model->book);
- if (capabilities && strstr (capabilities, "local")) {
+ if (capabilities && strstr (capabilities, "do-initial-query")) {
e_book_get_book_view (model->book, model->query, book_view_loaded, model);
} else {
remove_book_view(model);