[evolution-patches] seek review for bug #46844 (addressbook)
- From: jack <jack jia sun com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] seek review for bug #46844 (addressbook)
- Date: Thu, 24 Jul 2003 16:38:34 +0800
Hi toshok:
The bug #46844 is a bug of addressbook, Could you review this patch for it?
http://bugzilla.ximian.com/show_bug.cgi?id=46844
summary of this bug is "Deleting contact folder does not remove files"
Thanks
jack
Index: addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1439
diff -u -r1.1439 ChangeLog
--- addressbook/ChangeLog 23 Jul 2003 16:41:47 -0000 1.1439
+++ addressbook/ChangeLog 24 Jul 2003 08:12:38 -0000
@@ -1,3 +1,15 @@
+2003-07-24 Jack Jia <jack jia sun com>
+
+ ** For #46844
+
+ * backend/idl/addressbook.idl: add closeBook IDL call.
+ * backend/pas/pas-book-factory.c
+ (impl_GNOME_Evolution_Addressbook_BookFactory_closeBook):
+ add a new function the implement the new function(closeBook) in the idl.
+ (pas_book_factory_construct) : set the function pointer.
+ * gui/component/addressbook-component.c (remove_folder): close the EBook
+ when the addressbook subfolder was removed.
+
2003-07-23 Dan Winship <danw ximian com>
* backend/ebook/Makefile.am: use EVO_MARSHAL_RULE
Index: addressbook/backend/idl/addressbook.idl
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/backend/idl/addressbook.idl,v
retrieving revision 1.30
diff -u -r1.30 addressbook.idl
--- addressbook/backend/idl/addressbook.idl 8 Feb 2003 09:06:15 -0000 1.30
+++ addressbook/backend/idl/addressbook.idl 24 Jul 2003 08:12:38 -0000
@@ -208,6 +208,8 @@
void openBook (in string uri, in BookListener listener)
raises (ProtocolNotSupported);
+
+ void closeBook (in string uri);
};
};
};
Index: addressbook/backend/pas/pas-book-factory.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/backend/pas/pas-book-factory.c,v
retrieving revision 1.33
diff -u -r1.33 pas-book-factory.c
--- addressbook/backend/pas/pas-book-factory.c 5 Feb 2003 23:47:01 -0000 1.33
+++ addressbook/backend/pas/pas-book-factory.c 24 Jul 2003 08:12:39 -0000
@@ -412,6 +412,22 @@
}
static void
+impl_GNOME_Evolution_Addressbook_BookFactory_closeBook (PortableServer_Servant servant,
+ const CORBA_char *uri,
+ CORBA_Environment *ev)
+{
+ PASBookFactory *factory = PAS_BOOK_FACTORY (bonobo_object (servant));
+ PASBackend *backend;
+
+
+ backend = g_hash_table_lookup (factory->priv->active_server_map, (char *)uri);
+
+ if (backend)
+ backend_last_client_gone_cb (backend, factory);
+
+}
+
+static void
pas_book_factory_construct (PASBookFactory *factory)
{
/* nothing to do here.. */
@@ -585,7 +601,8 @@
epv = &klass->epv;
- epv->openBook = impl_GNOME_Evolution_Addressbook_BookFactory_openBook;
+ epv->openBook = impl_GNOME_Evolution_Addressbook_BookFactory_openBook;
+ epv->closeBook = impl_GNOME_Evolution_Addressbook_BookFactory_closeBook;
}
BONOBO_TYPE_FUNC_FULL (
Index: addressbook/gui/component/addressbook-component.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook-component.c,v
retrieving revision 1.90
diff -u -r1.90 addressbook-component.c
--- addressbook/gui/component/addressbook-component.c 17 Jul 2003 16:54:50 -0000 1.90
+++ addressbook/gui/component/addressbook-component.c 24 Jul 2003 08:12:40 -0000
@@ -135,7 +135,7 @@
void *closure)
{
CORBA_Environment ev;
- char *db_path, *summary_path, *subdir_path;
+ char *db_path, *summary_path, *subdir_path, *tmp_path;
struct stat sb;
int rv;
@@ -176,6 +176,7 @@
}
db_path = g_build_filename (physical_uri + 7, "addressbook.db", NULL);
+ tmp_path = g_build_filename (physical_uri,"addressbook.db", NULL);
summary_path = g_build_filename (physical_uri + 7, "addressbook.db.summary", NULL);
rv = unlink (db_path);
@@ -183,6 +184,12 @@
rv = unlink (summary_path);
if (rv == 0 || (rv == -1 && errno == ENOENT)) {
+ GNOME_Evolution_Addressbook_BookFactory factory;
+
+ factory = bonobo_activation_activate_from_id ("OAFIID:GNOME_Evolution_Wombat_ServerFactory", 0, NULL, NULL);
+
+ GNOME_Evolution_Addressbook_BookFactory_closeBook (factory, tmp_path, NULL);
+
GNOME_Evolution_ShellComponentListener_notifyResult (listener,
GNOME_Evolution_ShellComponentListener_OK,
&ev);
@@ -194,6 +201,7 @@
}
g_free (db_path);
+ g_free (tmp_path);
g_free (summary_path);
CORBA_exception_free(&ev);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]