aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-08-08 08:10:11 +0800
committerChris Toshok <toshok@src.gnome.org>2001-08-08 08:10:11 +0800
commit1bccb5de6901b2775593af20333dffe3dda37220 (patch)
tree28ed0dc406fdfaa55172bac43f7d581bf33a2558 /addressbook/gui/component
parent0d68b2038e40ca3c2140035e5f549443d88077b3 (diff)
downloadgsoc2013-evolution-1bccb5de6901b2775593af20333dffe3dda37220.tar.gz
gsoc2013-evolution-1bccb5de6901b2775593af20333dffe3dda37220.tar.zst
gsoc2013-evolution-1bccb5de6901b2775593af20333dffe3dda37220.zip
[ Fixes bug #5066 ] new function, remove the source. (register_storage):
2001-08-07 Chris Toshok <toshok@ximian.com> [ Fixes bug #5066 ] * gui/component/addressbook-storage.c (remove_ldap_folder): new function, remove the source. (register_storage): connect to the "remove_folder" signal so we know when to remove the folder. svn path=/trunk/; revision=11756
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r--addressbook/gui/component/addressbook-storage.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/addressbook/gui/component/addressbook-storage.c b/addressbook/gui/component/addressbook-storage.c
index 56b5f1af7d..6364b29b9b 100644
--- a/addressbook/gui/component/addressbook-storage.c
+++ b/addressbook/gui/component/addressbook-storage.c
@@ -56,6 +56,7 @@
#include <errno.h>
#include <glib.h>
+#include <gtk/gtk.h>
#include <gnome-xml/parser.h>
#include <gnome-xml/xmlmemory.h>
@@ -108,6 +109,16 @@ addressbook_storage_setup (EvolutionShellComponent *shell_component,
deregister_storage ();
}
+static void
+remove_ldap_folder (EvolutionStorage *storage,
+ const CORBA_char *path, const CORBA_char *physical_uri,
+ int *result, gpointer data)
+{
+ addressbook_storage_remove_source (path + 1);
+ addressbook_storage_write_sources();
+ *result = GNOME_Evolution_Storage_OK;
+}
+
static void
register_storage (void)
{
@@ -116,6 +127,9 @@ register_storage (void)
if (storage == NULL) {
storage = evolution_storage_new (_("Other Contacts"), NULL, NULL);
+ gtk_signal_connect (GTK_OBJECT (storage),
+ "remove_folder",
+ GTK_SIGNAL_FUNC(remove_ldap_folder), NULL);
result = evolution_storage_register_on_shell (storage, corba_shell);
switch (result) {
case EVOLUTION_STORAGE_OK: