aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-01-18 02:30:02 +0800
committerIain Holmes <iain@src.gnome.org>2001-01-18 02:30:02 +0800
commitf25eabaf508d2622e908dab4b6b7a2ce5efc0633 (patch)
treefea3ab06fdd7b83542dd204cd12afccdabb89a9f /addressbook
parent59bd12b76388b33ccde74bc151fabda14a763924 (diff)
downloadgsoc2013-evolution-f25eabaf508d2622e908dab4b6b7a2ce5efc0633.tar
gsoc2013-evolution-f25eabaf508d2622e908dab4b6b7a2ce5efc0633.tar.gz
gsoc2013-evolution-f25eabaf508d2622e908dab4b6b7a2ce5efc0633.tar.bz2
gsoc2013-evolution-f25eabaf508d2622e908dab4b6b7a2ce5efc0633.tar.lz
gsoc2013-evolution-f25eabaf508d2622e908dab4b6b7a2ce5efc0633.tar.xz
gsoc2013-evolution-f25eabaf508d2622e908dab4b6b7a2ce5efc0633.tar.zst
gsoc2013-evolution-f25eabaf508d2622e908dab4b6b7a2ce5efc0633.zip
Support the new interfaces
svn path=/trunk/; revision=7591
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oaf.in1
-rw-r--r--addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oafinfo1
-rw-r--r--addressbook/backend/ebook/evolution-gnomecard-importer.c40
3 files changed, 16 insertions, 26 deletions
diff --git a/addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oaf.in b/addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oaf.in
index e6a4a3ed40..46f2a1fa4e 100644
--- a/addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oaf.in
+++ b/addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oaf.in
@@ -17,7 +17,6 @@
location="OAFIID:GNOME_Evolution_Addressbook_GnomeCard_ImporterFactory">
<oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/ImporterFactory:1.0"/>
<item value="IDL:GNOME/Evolution/Importer:1.0"/>
</oaf_attribute>
diff --git a/addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oafinfo b/addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oafinfo
index e6a4a3ed40..46f2a1fa4e 100644
--- a/addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oafinfo
+++ b/addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oafinfo
@@ -17,7 +17,6 @@
location="OAFIID:GNOME_Evolution_Addressbook_GnomeCard_ImporterFactory">
<oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/ImporterFactory:1.0"/>
<item value="IDL:GNOME/Evolution/Importer:1.0"/>
</oaf_attribute>
diff --git a/addressbook/backend/ebook/evolution-gnomecard-importer.c b/addressbook/backend/ebook/evolution-gnomecard-importer.c
index fa724fd512..aac268e09d 100644
--- a/addressbook/backend/ebook/evolution-gnomecard-importer.c
+++ b/addressbook/backend/ebook/evolution-gnomecard-importer.c
@@ -8,7 +8,6 @@
#include <e-book.h>
#include <evolution-importer.h>
-#include <evolution-importer-factory.h>
#include <GNOME_Evolution_Importer.h>
#define COMPONENT_FACTORY_IID "OAFIID:GNOME_Evolution_Addressbook_GnomeCard_ImporterFactory"
@@ -111,21 +110,12 @@ process_item_fn (EvolutionImporter *importer,
return;
}
-static char *
-get_error_fn (EvolutionImporter *importer,
- void *closure)
-{
- return NULL;
-}
-
-/* EvolutionImporterFactory methods */
-
static char *supported_extensions[3] = {
".vcf", ".gcrd", NULL
};
static gboolean
-support_format_fn (EvolutionImporterFactory *_factory,
+support_format_fn (EvolutionImporter *importer,
const char *filename,
void *closure)
{
@@ -148,36 +138,38 @@ importer_destroy_cb (GtkObject *object,
gtk_main_quit ();
}
-static EvolutionImporter *
-load_file_fn (EvolutionImporterFactory *_factory,
+static gboolean
+load_file_fn (EvolutionImporter *importer,
const char *filename,
void *closure)
{
- EvolutionImporter *importer;
GnomeCardImporter *gci;
- gci = g_new (GnomeCardImporter, 1);
+ gci = (GnomeCardImporter *) closure;
gci->filename = g_strdup (filename);
gci->cardlist = NULL;
gci->iterator = NULL;
gci->ready = FALSE;
ebook_create (gci);
- importer = evolution_importer_new (process_item_fn, get_error_fn, gci);
- gtk_signal_connect (GTK_OBJECT (importer), "destroy",
- GTK_SIGNAL_FUNC (importer_destroy_cb), gci);
-
- return importer;
+ return TRUE;
}
static BonoboObject *
factory_fn (BonoboGenericFactory *_factory,
void *closure)
{
- EvolutionImporterFactory *importer_factory;
- importer_factory = evolution_importer_factory_new (support_format_fn,
- load_file_fn, NULL);
- return BONOBO_OBJECT (importer_factory);
+ EvolutionImporter *importer;
+ GnomeCardImporter *gci;
+
+ gci = g_new (GnomeCardImporter, 1);
+ 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);
+
+ return BONOBO_OBJECT (importer);
}
static void