aboutsummaryrefslogtreecommitdiffstats
path: root/importers/netscape-importer.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-05-10 04:00:35 +0800
committerChris Lahey <clahey@src.gnome.org>2001-05-10 04:00:35 +0800
commit3d170b71061db4d817838854bebaa49387bc4fa9 (patch)
tree958911e7376284c23ea335c468f68f8068efec1f /importers/netscape-importer.c
parent33b9baa06344722188b76e54e9396b9a322b9ddf (diff)
downloadgsoc2013-evolution-3d170b71061db4d817838854bebaa49387bc4fa9.tar
gsoc2013-evolution-3d170b71061db4d817838854bebaa49387bc4fa9.tar.gz
gsoc2013-evolution-3d170b71061db4d817838854bebaa49387bc4fa9.tar.bz2
gsoc2013-evolution-3d170b71061db4d817838854bebaa49387bc4fa9.tar.lz
gsoc2013-evolution-3d170b71061db4d817838854bebaa49387bc4fa9.tar.xz
gsoc2013-evolution-3d170b71061db4d817838854bebaa49387bc4fa9.tar.zst
gsoc2013-evolution-3d170b71061db4d817838854bebaa49387bc4fa9.zip
Include bonobo-context.h.
2001-05-09 Christopher James Lahey <clahey@ximian.com> * elm-importer.c, netscape-importer.c, pine-importer.c: Include bonobo-context.h. * netscape-importer.c (netscape_import_accounts): Made a bunch of const char *s here. (importer_cb): Replaced CORBA_OBJECT_NIL with CORBA_NO_EXCEPTION in a error check here. (netscape_create_structure): Removed unused data variable here. Added BONOBO_OBJECT casts. (importer_init): Changed factory to be a BonoboGenericFactory * instead of a BonoboObject *. * pine-importer.c (import_addressfile): Changed signature to match EBookCallback signature. Added char *email variable. Removed EList since we only need to deal with one email for now. Changed this to not set the file as to the fullname. (pine_can_import): Removed unused settings and addressbook variables. (pine_create_structure): Added BONOBO_OBJECT casts. svn path=/trunk/; revision=9731
Diffstat (limited to 'importers/netscape-importer.c')
-rw-r--r--importers/netscape-importer.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/importers/netscape-importer.c b/importers/netscape-importer.c
index 41e3a080f6..67d20d835b 100644
--- a/importers/netscape-importer.c
+++ b/importers/netscape-importer.c
@@ -40,6 +40,7 @@
#include <bonobo/bonobo-object.h>
#include <bonobo/bonobo-generic-factory.h>
#include <bonobo/bonobo-control.h>
+#include <bonobo/bonobo-context.h>
#include <importer/evolution-intelligent-importer.h>
#include <importer/GNOME_Evolution_Importer.h>
@@ -292,8 +293,8 @@ netscape_init_prefs (void)
static void
netscape_import_accounts (NetscapeImporter *importer)
{
- char *nstr;
- char *imap;
+ const char *nstr;
+ const char *imap;
GNOME_Evolution_MailConfig_Account account;
GNOME_Evolution_MailConfig_Service source, transport;
GNOME_Evolution_MailConfig_Identity id;
@@ -332,7 +333,8 @@ netscape_import_accounts (NetscapeImporter *importer)
/* Create transport */
nstr = netscape_get_string ("network.hosts.smtp_server");
if (nstr != NULL) {
- char *url, *nstr2;
+ char *url;
+ const char *nstr2;
nstr2 = netscape_get_string ("mail.smtp_name");
if (nstr2) {
@@ -365,7 +367,8 @@ netscape_import_accounts (NetscapeImporter *importer)
/* Create POP3 source */
nstr = netscape_get_string ("network.hosts.pop_server");
if (nstr != NULL && *nstr != 0) {
- char *url, *nstr2;
+ char *url;
+ const char *nstr2;
nstr2 = netscape_get_string ("mail.pop_name");
if (nstr2) {
@@ -390,7 +393,8 @@ netscape_import_accounts (NetscapeImporter *importer)
servers = g_strsplit (imap, ",", 1024);
for (i = 0; servers[i] != NULL; i++) {
GNOME_Evolution_MailConfig_Service imapsource;
- char *serverstr, *name, *url, *username;
+ char *serverstr, *name, *url;
+ const char *username;
g_warning ("i: %d", i);
/* Create a server for each of these */
@@ -520,7 +524,7 @@ importer_cb (EvolutionImporterListener *listener,
objref = bonobo_object_corba_objref (BONOBO_OBJECT (importer->listener));
GNOME_Evolution_Importer_processItem (importer->importer,
objref, &ev);
- if (ev._major != CORBA_OBJECT_NIL) {
+ if (ev._major != CORBA_NO_EXCEPTION) {
g_warning ("Exception: %s", CORBA_exception_id (&ev));
CORBA_exception_free (&ev);
return;
@@ -701,14 +705,13 @@ netscape_create_structure (EvolutionIntelligentImporter *ii,
void *closure)
{
NetscapeImporter *importer = closure;
- NetscapeCreateDirectoryData *data;
char *key, *evolution_dir;
g_return_if_fail (nsmail_dir != NULL);
/* Reference our object so when the shell release_unrefs us
we will still exist and not go byebye */
- bonobo_object_ref (ii);
+ bonobo_object_ref (BONOBO_OBJECT (ii));
netscape_store_settings (importer);
evolution_dir = gnome_util_prepend_user_home ("evolution");
@@ -743,7 +746,7 @@ netscape_create_structure (EvolutionIntelligentImporter *ii,
/* Destroy it here if we weren't importing mail
otherwise the mail importer destroys itself
once the mail in imported */
- bonobo_object_unref (ii);
+ bonobo_object_unref (BONOBO_OBJECT (ii));
}
}
@@ -876,7 +879,7 @@ factory_fn (BonoboGenericFactory *_factory,
static void
importer_init (void)
{
- BonoboObject *factory;
+ BonoboGenericFactory *factory;
g_print ("Hi");
factory = bonobo_generic_factory_new (FACTORY_IID, factory_fn, NULL);