aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/pas
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-09-07 08:33:57 +0800
committerChris Toshok <toshok@src.gnome.org>2001-09-07 08:33:57 +0800
commit79d3756857257531993dc16b83a68e2ba4ed444b (patch)
treefa028eb8fc0c582b00927fb660c438cdaa1c2926 /addressbook/backend/pas
parentcc50420bf04f13fb7c3697bf524ed7772bfe6601 (diff)
downloadgsoc2013-evolution-79d3756857257531993dc16b83a68e2ba4ed444b.tar.gz
gsoc2013-evolution-79d3756857257531993dc16b83a68e2ba4ed444b.tar.zst
gsoc2013-evolution-79d3756857257531993dc16b83a68e2ba4ed444b.zip
add -DEVOLUTION_IMAGESDIR.
2001-09-06 Chris Toshok <toshok@ximian.com> * gui/component/Makefile.am (INCLUDES): add -DEVOLUTION_IMAGESDIR. * gui/widgets/e-addressbook-view.c (card_deleted_cb): remove status messages from here. (e_addressbook_view_delete_selection): same. * gui/widgets/e-addressbook-model.c (sequence_complete): emit a NULL status message along with the stop_state_changed. The null status message will clear the status bar for this view. * gui/component/addressbook.c (set_status_message): use the EvolutionActivityClient stuff. * backend/pas/pas-backend-ldap.c (view_destroy): remove status message for abandoning a search. (ldap_op_process_current): wrap status messages in _(). (ldap_op_process): same. (create_card_handler): same, and remove the notify_status for "" and add a notify_complete call after the card is added. (remove_card_handler): same. (modify_card_handler): same. (poll_ldap): wrap status messages with _(), and remove the "Search Complete" message. (ldap_search_handler): wrap status message. * backend/pas/pas-backend-file.c (pas_backend_file_search): use _() on status messages, and make sure the last notify_* called is notify_complete. svn path=/trunk/; revision=12663
Diffstat (limited to 'addressbook/backend/pas')
-rw-r--r--addressbook/backend/pas/pas-backend-file.c10
-rw-r--r--addressbook/backend/pas/pas-backend-ldap.c37
2 files changed, 31 insertions, 16 deletions
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index c8d63104d4..f13f486d97 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -15,6 +15,9 @@
#include <time.h>
#include <db.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-i18n.h>
+
#include <e-util/e-db3-utils.h>
#if DB_VERSION_MAJOR != 3 || \
@@ -251,9 +254,9 @@ pas_backend_file_search (PASBackendFile *bf,
search_needed = FALSE;
if (search_needed)
- pas_book_view_notify_status_message (view->book_view, "Searching...");
+ pas_book_view_notify_status_message (view->book_view, _("Searching..."));
else
- pas_book_view_notify_status_message (view->book_view, "Loading...");
+ pas_book_view_notify_status_message (view->book_view, _("Loading..."));
if (view->card_sexp)
gtk_object_unref (GTK_OBJECT(view->card_sexp));
@@ -262,8 +265,8 @@ pas_backend_file_search (PASBackendFile *bf,
if (!view->card_sexp) {
/* need a different error message here. */
+ pas_book_view_notify_status_message (view->book_view, _("Error in search expression."));
pas_book_view_notify_complete (view->book_view);
- pas_book_view_notify_status_message (view->book_view, "Error in search expression.");
return;
}
@@ -323,7 +326,6 @@ pas_backend_file_search (PASBackendFile *bf,
pas_book_view_notify_add (view->book_view, cards);
pas_book_view_notify_complete (view->book_view);
- pas_book_view_notify_status_message (view->book_view, "Search complete");
/*
** It's fine to do this now since the data has been handed off.
diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c
index da49f8ea9a..7e1634da64 100644
--- a/addressbook/backend/pas/pas-backend-ldap.c
+++ b/addressbook/backend/pas/pas-backend-ldap.c
@@ -14,6 +14,9 @@
#include <lber.h>
#include <gtk/gtksignal.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-i18n.h>
+
#ifdef DEBUG
#define LDAP_DEBUG
#define LDAP_DEBUG_ADD
@@ -245,7 +248,6 @@ view_destroy(GtkObject *object, gpointer data)
ldap connection. remove the idle
handler and anbandon the msg id */
g_source_remove(view->search_idle);
- pas_book_view_notify_status_message (view->book_view, "Abandoning pending search.");
if (view->search_msgid != -1)
ldap_abandon (bl->priv->ldap, view->search_msgid);
@@ -462,7 +464,7 @@ ldap_op_process_current (PASBackend *backend)
if (!bl->priv->connected) {
if (op->view)
- pas_book_view_notify_status_message (op->view, "Connecting to LDAP server...");
+ pas_book_view_notify_status_message (op->view, _("Connecting to LDAP server..."));
pas_backend_ldap_connect(bl);
}
@@ -472,8 +474,8 @@ ldap_op_process_current (PASBackend *backend)
}
else {
if (op->view) {
+ pas_book_view_notify_status_message (op->view, _("Unable to connect to LDAP server."));
pas_book_view_notify_complete (op->view);
- pas_book_view_notify_status_message (op->view, "Unable to connect to LDAP server.");
}
ldap_op_finished (op);
@@ -488,7 +490,7 @@ ldap_op_process (LDAPOp *op)
if (bl->priv->current_op) {
/* operation in progress. queue this op for later and return. */
if (op->view)
- pas_book_view_notify_status_message (op->view, "Waiting for connection to ldap server...");
+ pas_book_view_notify_status_message (op->view, _("Waiting for connection to LDAP server..."));
bl->priv->pending_ops = g_list_append (bl->priv->pending_ops, op);
}
else {
@@ -857,14 +859,11 @@ create_card_handler (PASBackend *backend, LDAPOp *op)
ldap_mods = (LDAPMod**)mod_array->pdata;
if (op->view)
- pas_book_view_notify_status_message (op->view, "Adding card to LDAP server...");
+ pas_book_view_notify_status_message (op->view, _("Adding card to LDAP server..."));
/* actually perform the ldap add */
ldap_error = ldap_add_s (ldap, dn, ldap_mods);
- if (op->view)
- pas_book_view_notify_status_message (op->view, "");
-
if (ldap_error == LDAP_SUCCESS) {
/* the card was created, let's let the views know about it */
GList *l;
@@ -890,6 +889,9 @@ create_card_handler (PASBackend *backend, LDAPOp *op)
ldap_perror (ldap, "ldap_add_s");
}
+ if (op->view)
+ pas_book_view_notify_complete (op->view);
+
/* and clean up */
free_mods (mod_array);
g_free (dn);
@@ -953,6 +955,9 @@ remove_card_handler (PASBackend *backend, LDAPOp *op)
int ldap_error;
ECardSimple *simple;
+ if (op->view)
+ pas_book_view_notify_status_message (op->view, _("Removing card from LDAP server..."));
+
simple = search_for_dn (bl, remove_op->id);
if (simple) {
@@ -991,6 +996,9 @@ remove_card_handler (PASBackend *backend, LDAPOp *op)
pas_book_respond_remove (remove_op->op.book,
response);
+ if (op->view)
+ pas_book_view_notify_complete (op->view);
+
/* we're synchronous */
return TRUE;
}
@@ -1052,6 +1060,9 @@ modify_card_handler (PASBackend *backend, LDAPOp *op)
ldap = bl->priv->ldap;
+ if (op->view)
+ pas_book_view_notify_status_message (op->view, _("Modifying card from LDAP server..."));
+
current_card = search_for_dn (bl, id);
if (current_card) {
@@ -1114,6 +1125,9 @@ modify_card_handler (PASBackend *backend, LDAPOp *op)
pas_book_respond_modify (modify_op->op.book,
response);
+ if (op->view)
+ pas_book_view_notify_complete (op->view);
+
/* we're synchronous */
return TRUE;
}
@@ -1975,12 +1989,12 @@ poll_ldap (LDAPSearchOp *op)
GList *cards = NULL;
static int received = 0;
- pas_book_view_notify_status_message (view->book_view, "Receiving LDAP search results...");
+ pas_book_view_notify_status_message (view->book_view, _("Receiving LDAP search results..."));
rc = ldap_result (ldap, view->search_msgid, 0, NULL, &res);
if (rc == -1 && received == 0) {
- pas_book_view_notify_status_message (view->book_view, "Restarting search.");
+ pas_book_view_notify_status_message (view->book_view, _("Restarting search."));
/* connection went down and we never got any. */
bl->priv->connected = FALSE;
@@ -1994,7 +2008,6 @@ poll_ldap (LDAPSearchOp *op)
pas_book_view_notify_complete (view->book_view);
ldap_op_finished ((LDAPOp*)op);
received = 0;
- pas_book_view_notify_status_message (view->book_view, "Search complete.");
return FALSE;
}
@@ -2031,7 +2044,7 @@ ldap_search_handler (PASBackend *backend, LDAPOp *op)
LDAPSearchOp *search_op = (LDAPSearchOp*) op;
if (op->view)
- pas_book_view_notify_status_message (op->view, "Searching...");
+ pas_book_view_notify_status_message (op->view, _("Searching..."));
/* it might not be NULL if we've been restarted */
if (search_op->ldap_query == NULL)