aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/importers
diff options
context:
space:
mode:
authorHans Petter Jansson <hpj@ximian.com>2003-03-01 07:35:51 +0800
committerHans Petter <hansp@src.gnome.org>2003-03-01 07:35:51 +0800
commit58be26a2498b99b7018dd9880e75addbc62a74f3 (patch)
treefde55d3e647526e66191e54917ca7aa38883d0f1 /calendar/importers
parente923674e247e076b0e90ac493c68db59c8edf211 (diff)
downloadgsoc2013-evolution-58be26a2498b99b7018dd9880e75addbc62a74f3.tar.gz
gsoc2013-evolution-58be26a2498b99b7018dd9880e75addbc62a74f3.tar.zst
gsoc2013-evolution-58be26a2498b99b7018dd9880e75addbc62a74f3.zip
Shlibify.
2003-02-28 Hans Petter Jansson <hpj@ximian.com> * importers/Makefile.am: Shlibify. * importers/GNOME_Evolution_Calendar_Importer.server.in.in: Shlibify. * importers/icalendar-importer.c: Add necessary includes. (importer_destroy_cb): This is now a GWeakNotify func. gtk_ -> g_. (ical_importer_new) (vcal_importer_new) (gnome_calendar_importer_destroy_cb): Destroy signal -> weak ref. * importers/main.c: Add necessary includes. Shlibify. svn path=/trunk/; revision=20115
Diffstat (limited to 'calendar/importers')
-rw-r--r--calendar/importers/GNOME_Evolution_Calendar_Importer.server.in.in4
-rw-r--r--calendar/importers/Makefile.am40
-rw-r--r--calendar/importers/icalendar-importer.c21
-rw-r--r--calendar/importers/main.c39
4 files changed, 44 insertions, 60 deletions
diff --git a/calendar/importers/GNOME_Evolution_Calendar_Importer.server.in.in b/calendar/importers/GNOME_Evolution_Calendar_Importer.server.in.in
index c60468f5e8..5492a32f7b 100644
--- a/calendar/importers/GNOME_Evolution_Calendar_Importer.server.in.in
+++ b/calendar/importers/GNOME_Evolution_Calendar_Importer.server.in.in
@@ -1,8 +1,8 @@
<oaf_info>
<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_ImporterFactory"
- type="exe"
- location="@LIBEXECDIR@/evolution-calendar-importer">
+ type="shlib"
+ location="@IMPORTERSDIR@/libevolution-calendar-importers.so">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/ObjectFactory:1.0"/>
diff --git a/calendar/importers/Makefile.am b/calendar/importers/Makefile.am
index 887e1b97cc..5f82341223 100644
--- a/calendar/importers/Makefile.am
+++ b/calendar/importers/Makefile.am
@@ -1,4 +1,8 @@
-privlibexec_PROGRAMS = evolution-calendar-importer
+importersdir = $(privlibdir)/evolution-calendar-importers
+
+importers_LTLIBRARIES = libevolution-calendar-importers.la
+
+# privlibexec_PROGRAMS = evolution-calendar-importer
INCLUDES = \
-DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
@@ -16,26 +20,38 @@ INCLUDES = \
-I$(top_srcdir)/libical/src/libicalvcal \
$(EVOLUTION_CALENDAR_CFLAGS)
-evolution_calendar_importer_SOURCES = \
- evolution-calendar-importer.h \
- icalendar-importer.c \
+libevolution_calendar_importers_la_SOURCES = \
+ evolution-calendar-importer.h \
+ icalendar-importer.c \
main.c
-evolution_calendar_importer_LDADD = \
- $(top_builddir)/shell/libeshell.la \
+libevolution_calendar_importers_la_LDFLAGS = -avoid-version -module
+
+libevolution_calendar_importers_la_LIBADD = \
$(top_builddir)/shell/importer/libevolution-importer.la \
- $(top_builddir)/calendar/cal-util/libcal-util.la \
- $(top_builddir)/calendar/cal-client/libcal-client.la \
- $(top_builddir)/libwombat/libwombat.la \
- $(top_builddir)/libical/src/libical/libical-evolution.la \
$(top_builddir)/libical/src/libicalvcal/libicalvcal-evolution.la \
- $(EVOLUTION_CALENDAR_LIBS)
+ $(IMPORTERS_LIBS)
+
+# evolution_calendar_importer_SOURCES = \
+# evolution-calendar-importer.h \
+# icalendar-importer.c \
+# main.c
+#
+# evolution_calendar_importer_LDADD = \
+# $(top_builddir)/shell/libeshell.la \
+# $(top_builddir)/shell/importer/libevolution-importer.la \
+# $(top_builddir)/calendar/cal-util/libcal-util.la \
+# $(top_builddir)/calendar/cal-client/libcal-client.la \
+# $(top_builddir)/libwombat/libwombat.la \
+# $(top_builddir)/libical/src/libical/libical-evolution.la \
+# $(top_builddir)/libical/src/libicalvcal/libicalvcal-evolution.la \
+# $(EVOLUTION_CALENDAR_LIBS)
server_in_files = GNOME_Evolution_Calendar_Importer.server.in.in
server_DATA = $(server_in_files:.server.in.in=.server)
%.server.in: %.server.in.in
- sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@
+ sed -e "s|\@IMPORTERSDIR\@|$(importersdir)|" $< > $@
EXTRA_DIST = $(server_in_files) $(server_DATA)
diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c
index b8168ff39e..6de5624805 100644
--- a/calendar/importers/icalendar-importer.c
+++ b/calendar/importers/icalendar-importer.c
@@ -20,6 +20,8 @@
* Boston, MA 02111-1307, USA.
*/
+#include <string.h>
+#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
#include <gtk/gtksignal.h>
@@ -63,14 +65,14 @@ typedef struct {
*/
static void
-importer_destroy_cb (GtkObject *object, gpointer user_data)
+importer_destroy_cb (gpointer user_data)
{
ICalImporter *ici = (ICalImporter *) user_data;
g_return_if_fail (ici != NULL);
- gtk_object_unref (GTK_OBJECT (ici->client));
- gtk_object_unref (GTK_OBJECT (ici->tasks_client));
+ g_object_unref (ici->client);
+ g_object_unref (ici->tasks_client);
if (ici->icalcomp != NULL) {
icalcomponent_free (ici->icalcomp);
@@ -424,8 +426,8 @@ ical_importer_new (void)
NULL,
ici);
connect_to_shell (ici);
- gtk_signal_connect (GTK_OBJECT (ici->importer), "destroy",
- GTK_SIGNAL_FUNC (importer_destroy_cb), ici);
+
+ g_object_weak_ref (G_OBJECT (ici->importer), (GWeakNotify) importer_destroy_cb, ici);
return BONOBO_OBJECT (ici->importer);
}
@@ -548,8 +550,8 @@ vcal_importer_new (void)
NULL,
ici);
connect_to_shell (ici);
- gtk_signal_connect (GTK_OBJECT (ici->importer), "destroy",
- GTK_SIGNAL_FUNC (importer_destroy_cb), ici);
+
+ g_object_weak_ref (G_OBJECT (ici->importer), (GWeakNotify) importer_destroy_cb, ici);
return BONOBO_OBJECT (ici->importer);
}
@@ -560,7 +562,7 @@ vcal_importer_new (void)
static void
-gnome_calendar_importer_destroy_cb (GtkObject *object, gpointer user_data)
+gnome_calendar_importer_destroy_cb (gpointer user_data)
{
ICalIntelligentImporter *ici = (ICalIntelligentImporter *) user_data;
@@ -733,8 +735,7 @@ gnome_calendar_importer_new (void)
ici);
- gtk_signal_connect (GTK_OBJECT (importer), "destroy",
- GTK_SIGNAL_FUNC (gnome_calendar_importer_destroy_cb), ici);
+ g_object_weak_ref (G_OBJECT (importer), (GWeakNotify) gnome_calendar_importer_destroy_cb, ici);
control = create_checkboxes_control (ici);
bonobo_object_add_interface (BONOBO_OBJECT (importer),
diff --git a/calendar/importers/main.c b/calendar/importers/main.c
index 79d1e7db4a..ba62d63f8b 100644
--- a/calendar/importers/main.c
+++ b/calendar/importers/main.c
@@ -23,7 +23,8 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include <bonobo/bonobo-generic-factory.h>
+#include <string.h>
+#include <bonobo/bonobo-shlib-factory.h>
#include <bonobo/bonobo-context.h>
#include <bonobo/bonobo-main.h>
#include "evolution-calendar-importer.h"
@@ -52,38 +53,4 @@ importer_factory_fn (BonoboGenericFactory *factory, const char *id, void *closur
return object;
}
-static void
-init_importer (void)
-{
- BonoboGenericFactory *factory;
-
- factory = bonobo_generic_factory_new (IMPORTER_FACTORY_ID,
- importer_factory_fn, NULL);
- if (factory == NULL) {
- g_error ("Unable to create factory");
- exit (0);
- }
-
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
-}
-
-int
-main (int argc, char *argv[])
-{
- CORBA_ORB orb;
-
- bindtextdomain(GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain(GETTEXT_PACKAGE);
-
- g_type_init ();
- bonobo_activation_init (argc, argv);
- if (bonobo_init (&argc, argv) == FALSE) {
- g_error ("Could not initialize Bonobo.");
- exit (0);
- }
-
- init_importer ();
- bonobo_main ();
-
- return 0;
-}
+BONOBO_ACTIVATION_SHLIB_FACTORY (IMPORTER_FACTORY_ID, "Evolution Calendar importer factory", importer_factory_fn, NULL)