aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/evolution-ldif-importer.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-03 14:14:01 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-03 14:14:01 +0800
commitf54b808bf2b6c6649f33c062036a207fe152bdd8 (patch)
tree9e4f2e0a40597c4ea425ba60501f20f5403ed76f /addressbook/backend/ebook/evolution-ldif-importer.c
parent805e75e7d9315f8cb9f6a7213fc373a8a873a242 (diff)
downloadgsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.tar
gsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.tar.gz
gsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.tar.bz2
gsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.tar.lz
gsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.tar.xz
gsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.tar.zst
gsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.zip
just include glib.h instead of the gtk stuff.
2002-11-02 Chris Toshok <toshok@ximian.com> * backend/ebook/e-book-types.h: just include glib.h instead of the gtk stuff. * backend/ebook/e-book-listener.[ch]: convert to GObject/bonobo-activation/etc/etc. * e-book-util.[ch]: same. * e-book-view-listener.[ch]: same. * e-book-view.[ch]: same. * e-book.[ch]: same. * e-card-compare.[ch]: same. * e-card-cursor.[ch]: same. * e-card-simple.[ch]: same. * e-card.[ch]: same. * e-destination.[ch]: same. * evolution-ldif-importer.c: same. * evolution-vcard-importer.c: same. * load-gnomecard-addressbook.c: same. * load-pine-addressbok.c: same. * test-card.c: same. * test-client-list.c: same. * test-client.c: same. * backend/ebook/Makefile.am: add e-book-marshal.c to SOURCES, add e-book-marshal.[ch] to CLEANFILES, and add e-book-marshal.list to EXTRA_DIST. Also, remove the camel libs from the test LDADD's, and leave e-destination.[ch] out of the build. * backend/ebook/.cvsignore: ignore e-book-marshal.[ch] * backend/ebook/e-book-marshal.list: marshallers for e-book. svn path=/trunk/; revision=18505
Diffstat (limited to 'addressbook/backend/ebook/evolution-ldif-importer.c')
-rw-r--r--addressbook/backend/ebook/evolution-ldif-importer.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/addressbook/backend/ebook/evolution-ldif-importer.c b/addressbook/backend/ebook/evolution-ldif-importer.c
index d792a74172..8ec5b631ab 100644
--- a/addressbook/backend/ebook/evolution-ldif-importer.c
+++ b/addressbook/backend/ebook/evolution-ldif-importer.c
@@ -13,9 +13,6 @@
*/
#include <config.h>
-#include <bonobo.h>
-#include <gnome.h>
-#include <liboaf/liboaf.h>
#include <stdio.h>
#include <ctype.h>
@@ -269,9 +266,9 @@ parseLine( ECardSimple *simple, ECardDeliveryAddress *address, char **buf )
}
else if (!g_strcasecmp (ptr, "member")) {
EList *email;
- gtk_object_get (GTK_OBJECT (simple->card),
- "email", &email,
- NULL);
+ g_object_get (simple->card,
+ "email", &email,
+ NULL);
e_list_append (email, ldif_value->str);
}
}
@@ -326,7 +323,7 @@ getNextLDIFEntry( FILE *f )
while (buf) {
if (!parseLine (simple, address, &buf)) {
/* parsing error */
- gtk_object_unref (GTK_OBJECT (simple));
+ g_object_unref (simple);
e_card_delivery_address_unref (address);
return NULL;
}
@@ -374,17 +371,17 @@ resolve_list_card (LDIFImporter *gci, ECard *card)
if (!e_card_evolution_list (card))
return;
- gtk_object_get (GTK_OBJECT (card),
- "email", &email,
- "full_name", &full_name,
- NULL);
+ g_object_get (card,
+ "email", &email,
+ "full_name", &full_name,
+ NULL);
/* set file_as to full_name so we don't later try and figure
out a first/last name for the list. */
if (full_name)
- gtk_object_set (GTK_OBJECT (card),
- "file_as", full_name,
- NULL);
+ g_object_set (card,
+ "file_as", full_name,
+ NULL);
email_iter = e_list_get_iterator (email);
while (e_iterator_is_valid (email_iter)) {
@@ -397,7 +394,7 @@ resolve_list_card (LDIFImporter *gci, ECard *card)
gchar *dest_xml;
e_destination_set_card (dest, dn_card, 0); /* Hard-wired for default e-mail, since netscape only exports 1 email address */
dest_xml = e_destination_export (dest);
- gtk_object_unref (GTK_OBJECT (dest));
+ g_object_unref (dest);
if (dest_xml) {
e_iterator_set (email_iter, dest_xml);
g_free (dest_xml);
@@ -549,10 +546,10 @@ support_format_fn (EvolutionImporter *importer,
}
static void
-importer_destroy_cb (GtkObject *object,
+importer_destroy_cb (GObject *object,
LDIFImporter *gci)
{
- gtk_main_quit ();
+ g_main_quit ();
}
static gboolean
@@ -584,8 +581,8 @@ factory_fn (BonoboGenericFactory *_factory,
importer = evolution_importer_new (support_format_fn, load_file_fn,
process_item_fn, NULL, gci);
- gtk_signal_connect (GTK_OBJECT (importer), "destroy",
- GTK_SIGNAL_FUNC (importer_destroy_cb), gci);
+ g_signal_connect (importer, "destroy",
+ G_CALLBACK (importer_destroy_cb), gci);
return BONOBO_OBJECT (importer);
}
@@ -615,8 +612,8 @@ main (int argc,
gnome_init_with_popt_table ("Evolution-LDIF-Importer",
"0.0", argc, argv, oaf_popt_options, 0,
NULL);
- orb = oaf_init (argc, argv);
- if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) {
+ orb = bonobo_activation_init (argc, argv);
+ if (bonobo_init_full (&argc, argv, orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) {
g_error ("Could not initialize Bonobo.");
}