diff options
33 files changed, 110 insertions, 308 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 7013db0400..6178e0e15e 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,31 @@ +2000-04-16 Federico Mena Quintero <federico@helixcode.com> + + * cal-util/Makefile.am: Renamed library from libcalutil to + libcal-util, to be consistent with libcal-client. Install header + files in $(includedir)/evolution/cal-util. + (INCLUDES): Add "cal-util" log domain for glib. + (libcal_clientincludedir): The header files are now installed in + $(includedir)/evolution/cal-client. + + * cal-util/cal-util.h: Fix includes. + + * cal-client/client-test.c: Fix includes. + + * pcs/Makefile.am: Create libpcs.a, not a shared library, because + it is for internal use by Wombat only. The header files should + not be installed, either. Removed all the old Tlacuache stuff. + + * gui/Makefile.am (EXTRA_DIST): We no longer distribute + gncal.desktop. + (evolution_calendar_INCLUDES): Add "calendar-gui" for the glib log + domain. + + * gui/*.[ch]: Fix cal-util and cal-client includes. + + * pcs/Makefile.am (INCLUDES): Added "pcs" log domain for glib. + + * pcs/*.[ch]: Fix cal-util includes. + 2000-04-11 Chris Toshok <toshok@helixcode.com> * pcs/icalendar.c (icaltime_to_timet): use HAVE_TIMEZONE to switch @@ -911,7 +939,6 @@ * Makefile.am (Conduits_second_DATA): Also install .desktop files for conduit capplets in the gnome/apps menu dir. ->>>>>>> 1.252 1999-12-04 Eskil Heyn Olsen <deity@eskil.dk> * Makefile.am (EXTRA_DIST): Added .desktop files to EXTRA_DIST. diff --git a/calendar/TODO b/calendar/TODO index 2dbd29cdbb..4a5dd6c6ff 100644 --- a/calendar/TODO +++ b/calendar/TODO @@ -1,3 +1,23 @@ +Cal-util: + +- calobj.h depends on libversit/vcc.h, because it uses a VObject for + ical_object_create_from_vobject(). This should be an internal + function in the PCS and nothing else (we do not install libversit, + so our public libraries should not depend on it). + +- Or maybe we *should* install libversit, since the addressbook code + uses it as well. + +- timeutil has a lot of crap and some namespace pollution. Clean it + up. + +PCS: + +- When loading a calendar, substitute duplicated UIDs by new ones, and + possibly print out a warning message. + +----- Old Gnomecal TODO starts here ----- + Pilot: * Better support for untimed events (we have none now). diff --git a/calendar/cal-client/Makefile.am b/calendar/cal-client/Makefile.am index a114d589bd..1457ca9e7a 100644 --- a/calendar/cal-client/Makefile.am +++ b/calendar/cal-client/Makefile.am @@ -29,7 +29,7 @@ INCLUDES = \ lib_LTLIBRARIES = libcal-client.la -libcal_clientincludedir = $(includedir)/cal-client +libcal_clientincludedir = $(includedir)/evolution/cal-client libcal_client_la_SOURCES = \ $(CORBA_GENERATED) \ @@ -54,9 +54,9 @@ client_test_INCLUDES = \ $(INCLUDES) \ -DG_LOG_DOMAIN=\"client-test\" -client_test_LDADD = \ - $(BONOBO_VFS_GNOME_LIBS) \ - $(top_builddir)/calendar/cal-util/libcalutil.la \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/libical/src/libical/libical.la \ +client_test_LDADD = \ + $(BONOBO_VFS_GNOME_LIBS) \ + $(top_builddir)/calendar/cal-util/libcal-util.la \ + $(top_builddir)/libversit/libversit.la \ + $(top_builddir)/libical/src/libical/libical.la \ libcal-client.la diff --git a/calendar/cal-client/client-test.c b/calendar/cal-client/client-test.c index d2374db275..28acee4802 100644 --- a/calendar/cal-client/client-test.c +++ b/calendar/cal-client/client-test.c @@ -1,7 +1,7 @@ #include <config.h> #include <libgnorba/gnorba.h> #include <bonobo.h> -#include "cal-client.h" +#include <cal-client/cal-client.h> static CalClient *client1; static CalClient *client2; diff --git a/calendar/cal-util/.cvsignore b/calendar/cal-util/.cvsignore index cd15c2b075..db4c89d448 100644 --- a/calendar/cal-util/.cvsignore +++ b/calendar/cal-util/.cvsignore @@ -2,5 +2,5 @@ Makefile.in Makefile .deps -libcalutil.la -*.lo
\ No newline at end of file +libcal-util.la +*.lo diff --git a/calendar/cal-util/Makefile.am b/calendar/cal-util/Makefile.am index 8a866efd49..248e5373e5 100644 --- a/calendar/cal-util/Makefile.am +++ b/calendar/cal-util/Makefile.am @@ -1,21 +1,24 @@ - INCLUDES = \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - -DG_LOG_DOMAIN=\"cal-client\" \ + -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ + -DG_LOG_DOMAIN=\"cal-util\" \ -I$(srcdir) -I$(top_srcdir) \ + -I$(srcdir)/calendar \ -I. \ -I.. \ -I$(top_builddir) \ -I$(includedir) \ $(GNOME_INCLUDEDIR) -lib_LTLIBRARIES = libcalutil.la +lib_LTLIBRARIES = libcal-util.la -libcalutil_la_SOURCES = \ +libcal_util_la_SOURCES = \ cal-util.c \ - cal-util.h \ calobj.c \ - calobj.h \ - timeutil.c \ - timeutil.h + timeutil.c +libcal_utilincludedir = $(includedir)/evolution/cal-util + +libcal_utilinclude_HEADERS = \ + cal-util.h \ + calobj.h \ + timeutil.h diff --git a/calendar/cal-util/alarm-enums.h b/calendar/cal-util/alarm-enums.h deleted file mode 100644 index e35b471a09..0000000000 --- a/calendar/cal-util/alarm-enums.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef ALARM_ENUMS_H_INCLUDED -#define ALARM_ENUMS_H_INCLUDED - - -enum AlarmType { - ALARM_MAIL, - ALARM_PROGRAM, - ALARM_DISPLAY, - ALARM_AUDIO -}; - -enum AlarmUnit { - ALARM_MINUTES, - ALARM_HOURS, - ALARM_DAYS -}; - -#endif /* ALARM_ENUMS_H_INCLUDED */ diff --git a/calendar/cal-util/cal-util.h b/calendar/cal-util/cal-util.h index 6adb7104a5..7821ce8ca4 100644 --- a/calendar/cal-util/cal-util.h +++ b/calendar/cal-util/cal-util.h @@ -25,7 +25,7 @@ #include <libgnome/gnome-defs.h> #include <time.h> #include <glib.h> -#include "calobj.h" +#include <cal-util/calobj.h> BEGIN_GNOME_DECLS diff --git a/calendar/cal-util/icalendar.h b/calendar/cal-util/icalendar.h index 09bfa06fad..2a22fbab71 100644 --- a/calendar/cal-util/icalendar.h +++ b/calendar/cal-util/icalendar.h @@ -2,7 +2,7 @@ #define ICALENDAR_H #include <ical.h> -#include "calobj.h" +#include <cal-util/calobj.h> diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am index d51e5a5986..2f0dab260a 100644 --- a/calendar/gui/Makefile.am +++ b/calendar/gui/Makefile.am @@ -6,8 +6,8 @@ help_base = $(datadir)/gnome/help/cal # calendar-pilot-sync #endif - INCLUDES = \ + -DG_LOG_DOMAIN=\"calendar-gui\" \ -I$(top_srcdir) \ -I$(top_srcdir)/calendar \ -I$(top_srcdir)/libical/src/libical \ @@ -17,18 +17,18 @@ INCLUDES = \ $(PISOCK_INCLUDEDIR) \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" - -LINK_FLAGS = \ - $(BONOBO_VFS_GNOME_LIBS) \ - $(INTLLIBS) \ - $(top_builddir)/calendar/cal-util/libcalutil.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/widgets/e-text/libetext.a \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/libical/src/libical/libical.la \ - $(top_builddir)/calendar/cal-client/libcal-client.la +LINK_FLAGS = \ + $(BONOBO_VFS_GNOME_LIBS) \ + $(INTLLIBS) \ + $(top_builddir)/calendar/cal-client/libcal-client.la \ + $(top_builddir)/calendar/cal-util/libcal-util.la \ + $(top_builddir)/e-util/libeutil.la \ + $(top_builddir)/widgets/e-text/libetext.a \ + $(top_builddir)/libversit/libversit.la \ + $(top_builddir)/libical/src/libical/libical.la bin_PROGRAMS = evolution-calendar + evolution_calendar_SOURCES = \ alarm.c \ alarm.h \ @@ -182,8 +182,7 @@ gnorba_DATA = calendar-control.gnorba #Conduits_second_DATA = $(Conduits_DATA) #endif -EXTRA_DIST = \ - gncal.desktop \ +EXTRA_DIST = \ bell.xpm \ recur.xpm @@ -196,10 +195,6 @@ EXTRA_DIST = \ #appicondir = $(datadir)/pixmaps #appicon_DATA = gnome-calendar-conduit.png -Productivitydir = $(datadir)/gnome/apps/Applications - -Productivity_DATA = gncal.desktop - install-data-local: $(mkinstalldirs) $(DESTDIR)$(help_base)/C # $(mkinstalldirs) $(Conduitsdir) diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c index 88bf5a6848..ae76a0ce73 100644 --- a/calendar/gui/alarm-notify/alarm.c +++ b/calendar/gui/alarm-notify/alarm.c @@ -11,7 +11,7 @@ #include <fcntl.h> #include <signal.h> #include <sys/time.h> -#include "cal-util/calobj.h" +#include <cal-util/calobj.h> #include "alarm.h" /* The pipes used to notify about an alarm */ diff --git a/calendar/gui/alarm-notify/alarm.h b/calendar/gui/alarm-notify/alarm.h index c1dbd9cb61..efdfda997d 100644 --- a/calendar/gui/alarm-notify/alarm.h +++ b/calendar/gui/alarm-notify/alarm.h @@ -2,7 +2,7 @@ #define ALARM_H #include <time.h> -#include "cal-util/calobj.h" +#include <cal-util/calobj.h> typedef void (*AlarmFunction)(time_t time, CalendarAlarm *which, void *closuse); diff --git a/calendar/gui/alarm.c b/calendar/gui/alarm.c index 88bf5a6848..ae76a0ce73 100644 --- a/calendar/gui/alarm.c +++ b/calendar/gui/alarm.c @@ -11,7 +11,7 @@ #include <fcntl.h> #include <signal.h> #include <sys/time.h> -#include "cal-util/calobj.h" +#include <cal-util/calobj.h> #include "alarm.h" /* The pipes used to notify about an alarm */ diff --git a/calendar/gui/alarm.h b/calendar/gui/alarm.h index c1dbd9cb61..efdfda997d 100644 --- a/calendar/gui/alarm.h +++ b/calendar/gui/alarm.h @@ -2,7 +2,7 @@ #define ALARM_H #include <time.h> -#include "cal-util/calobj.h" +#include <cal-util/calobj.h> typedef void (*AlarmFunction)(time_t time, CalendarAlarm *which, void *closuse); diff --git a/calendar/gui/corba-cal-factory.c b/calendar/gui/corba-cal-factory.c index 591c486f62..07a7008db0 100644 --- a/calendar/gui/corba-cal-factory.c +++ b/calendar/gui/corba-cal-factory.c @@ -11,7 +11,7 @@ #include <sys/stat.h> #include "gnome-cal.h" #include "calendar-commands.h" -#include "cal-util/timeutil.h" +#include <cal-util/timeutil.h> #include "libversit/vcc.h" #include <libgnorba/gnorba.h> #include <bonobo.h> diff --git a/calendar/gui/corba-cal.c b/calendar/gui/corba-cal.c index a547c2dc2b..4b203a4478 100644 --- a/calendar/gui/corba-cal.c +++ b/calendar/gui/corba-cal.c @@ -12,7 +12,7 @@ /*#include "calendar.h" DELETE */ #include "gnome-cal.h" #include "alarm.h" -#include "cal-util/timeutil.h" +#include <cal-util/timeutil.h> #include "libversit/vcc.h" #include <libgnorba/gnome-factory.h> #include "GnomeCal.h" diff --git a/calendar/gui/eventedit.c b/calendar/gui/eventedit.c index b4696a8dd6..0c79bb5d92 100644 --- a/calendar/gui/eventedit.c +++ b/calendar/gui/eventedit.c @@ -8,9 +8,9 @@ #include <config.h> #include <gnome.h> #include <string.h> +#include <cal-util/timeutil.h> #include "eventedit.h" #include "calendar-commands.h" -#include "cal-util/timeutil.h" static void event_editor_class_init (EventEditorClass *class); diff --git a/calendar/gui/gncal-day-panel.c b/calendar/gui/gncal-day-panel.c index 1b3b5360f8..d0556f5d94 100644 --- a/calendar/gui/gncal-day-panel.c +++ b/calendar/gui/gncal-day-panel.c @@ -8,9 +8,9 @@ #include <config.h> #include <gnome.h> #include <gtk/gtkhseparator.h> +#include <cal-util/timeutil.h> #include "gncal-day-panel.h" #include "calendar-commands.h" -#include "cal-util/timeutil.h" guint diff --git a/calendar/gui/gncal-day-view.c b/calendar/gui/gncal-day-view.c index 2daa13009e..54347c52b8 100644 --- a/calendar/gui/gncal-day-view.c +++ b/calendar/gui/gncal-day-view.c @@ -8,7 +8,7 @@ #include <gnome.h> #include "gncal-day-view.h" -#include "cal-util/timeutil.h" +#include <cal-util/timeutil.h> #include "view-utils.h" #include "calendar-commands.h" #include "eventedit.h" diff --git a/calendar/gui/gncal-week-view.c b/calendar/gui/gncal-week-view.c index 55e956d49e..bd3091a54a 100644 --- a/calendar/gui/gncal-week-view.c +++ b/calendar/gui/gncal-week-view.c @@ -10,9 +10,9 @@ #include <gnome.h> #include <string.h> #include <gtk/gtk.h> +#include <cal-util/timeutil.h> #include "gncal-week-view.h" #include "calendar-commands.h" -#include "cal-util/timeutil.h" static void gncal_week_view_init (GncalWeekView *wview); diff --git a/calendar/gui/gncal.desktop b/calendar/gui/gncal.desktop deleted file mode 100644 index 9ee2a2db9b..0000000000 --- a/calendar/gui/gncal.desktop +++ /dev/null @@ -1,37 +0,0 @@ -[Desktop Entry] -Name=Calendar -Name[da]=Kalender -Name[de]=Kalender -Name[el]=Çìåñïëüãéï -Name[es]=Calendario -Name[et]=Kalender -Name[fi]=Kalenteri -Name[fr]=Calendrier -Name[gl]=Axenda -Name[ja]=¥«¥ì¥ó¥À¡¼ -Name[ko]=´Þ·Â -Name[no]=Kalender -Name[pt]=Agenda -Name[pt_BR]=Calendário -Name[ru]=ëÁÌÅÎÄÁÒØ -Name[sv]=Kalender -Comment=Calendar application -Comment[da]=Gnome Kalender -Comment[de]=Gnome Kalender -Comment[el]=Çìåñïëüãéï ôïõ Gnome -Comment[es]=Calendario de Gnome -Comment[et]=GNOME kalender -Comment[fi]=GNOME-kalenteri -Comment[fr]=Calendrier GNOME -Comment[gl]=Axenda de GNOME -Comment[ja]=GNOME¥«¥ì¥ó¥À¡¼ -Comment[ko]=±×³ð ´Þ·Â -Comment[no]=Gnome Kalender -Comment[pt]=Agenda Gnome -Comment[pt_BR]=Calendário GNOME -Comment[ru]=ëÁÌÅÎÄÁÒØ Gnome -Comment[sv]=Gnome-kalender -Exec=gnomecal -Icon=gnome-calendar.png -Terminal=0 -Type=Application diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c index c6399aabb3..1e7bc474ba 100644 --- a/calendar/gui/goto.c +++ b/calendar/gui/goto.c @@ -7,11 +7,11 @@ #include <config.h> #include <gnome.h> +#include <cal-util/timeutil.h> #include "gnome-cal.h" #include "gnome-month-item.h" #include "calendar-commands.h" #include "mark.h" -#include "cal-util/timeutil.h" static GtkWidget *goto_win; /* The goto dialog window */ diff --git a/calendar/gui/mark.c b/calendar/gui/mark.c index a868123545..02b3af17e1 100644 --- a/calendar/gui/mark.c +++ b/calendar/gui/mark.c @@ -6,10 +6,10 @@ */ #include <config.h> +#include <cal-util/timeutil.h> #include "gnome-cal.h" #include "calendar-commands.h" #include "mark.h" -#include "cal-util/timeutil.h" /* Frees the specified data when an object is destroyed */ diff --git a/calendar/gui/month-view.c b/calendar/gui/month-view.c index 449892fb17..6ac8c035bc 100644 --- a/calendar/gui/month-view.c +++ b/calendar/gui/month-view.c @@ -8,13 +8,13 @@ #include <config.h> #include <gnome.h> #include <libgnomeui/gnome-canvas-text.h> +#include <cal-util/timeutil.h> #include "eventedit.h" #include "layout.h" #include "month-view.h" #include "calendar-commands.h" #include "mark.h" #include "quick-view.h" -#include "cal-util/timeutil.h" /* Spacing between title and calendar */ diff --git a/calendar/gui/view-utils.h b/calendar/gui/view-utils.h index 4d850375fb..af9f52fec1 100644 --- a/calendar/gui/view-utils.h +++ b/calendar/gui/view-utils.h @@ -10,8 +10,7 @@ #include <gtk/gtk.h> -/*#include "calendar.h"*/ -#include "cal-util/calobj.h" +#include <cal-util/calobj.h> enum { diff --git a/calendar/gui/year-view.c b/calendar/gui/year-view.c index d5c56c5633..766ad965b6 100644 --- a/calendar/gui/year-view.c +++ b/calendar/gui/year-view.c @@ -9,12 +9,12 @@ #include <config.h> #include <gtk/gtkmain.h> #include <gnome.h> +#include <cal-util/timeutil.h> #include "eventedit.h" #include "year-view.h" #include "calendar-commands.h" #include "mark.h" #include "quick-view.h" -#include "cal-util/timeutil.h" #define HEAD_SPACING 4 /* Spacing between year heading and months */ diff --git a/calendar/pcs/.cvsignore b/calendar/pcs/.cvsignore index 7178965a3a..f4bf65a918 100644 --- a/calendar/pcs/.cvsignore +++ b/calendar/pcs/.cvsignore @@ -5,7 +5,3 @@ evolution-calendar-stubs.c evolution-calendar-skels.c evolution-calendar-common.c evolution-calendar.h -tlacuache -.libs -*.la -*.lo
\ No newline at end of file diff --git a/calendar/pcs/Makefile.am b/calendar/pcs/Makefile.am index a567597975..a13df5b990 100644 --- a/calendar/pcs/Makefile.am +++ b/calendar/pcs/Makefile.am @@ -1,26 +1,9 @@ -# -# Tlacuache personal calendar server -# - -bin_PROGRAMS = tlacuache -lib_LTLIBRARIES = libpcs.la - -#INCLUDES = \ -# -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ -# -I$(top_srcdir)/libical/src/libical \ -# -I$(top_srcdir)/libversit \ -# -I$(top_srcdir)/calendar \ -# -I. \ -# -I$(top_srcdir)/calendar/cal-client \ -# $(GNOME_INCLUDEDIR) - -INCLUDES = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/calendar/cal-client \ - -I$(top_srcdir)/calendar/cal-util \ - -I$(top_srcdir)/calendar \ - -I$(top_srcdir)/libical/src/libical \ - $(GNOME_INCLUDEDIR) \ +INCLUDES = \ + -DG_LOG_DOMAIN=\"pcs\" \ + -I$(top_srcdir) \ + -I$(top_srcdir)/calendar \ + -I$(top_srcdir)/libical/src/libical \ + $(GNOME_INCLUDEDIR) \ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" CORBA_GENERATED = \ @@ -37,16 +20,9 @@ idl_flags = `$(GNOME_CONFIG) --cflags idl` $(CORBA_GENERATED): $(idls) $(ORBIT_IDL) $(idl_flags) $(srcdir)/../idl/evolution-calendar.idl -#tlacuache_INCLUDES = \ -# -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ -# -I$(srcdir) -I$(top_srcdir) \ -# -I. \ -# -I.. \ -# -I$(top_builddir) \ -# -I$(includedir) \ -# $(GNOME_INCLUDEDIR) +noinst_LIBRARIES = libpcs.a -tlacuache_SOURCES = \ +libpcs_a_SOURCES = \ $(CORBA_GENERATED) \ cal.c \ cal.h \ @@ -58,44 +34,4 @@ tlacuache_SOURCES = \ icalendar.c \ icalendar.h \ job.c \ - job.h \ - tlacuache.c - -# alarm.c \ -# alarm.h \ -# cal-util.c \ -# cal-util.h \ - -libpcs_la_SOURCES = \ - $(CORBA_GENERATED) \ - cal.c \ - cal-backend.c \ - cal-factory.c \ - icalendar.c \ - job.c - -libpcsincludedir = $(includedir)/calendar/pcs - -libpcsinclude_HEADERS = \ - cal.h \ - cal-backend.h \ - cal-common.h \ - cal-factory.h \ - icalendar.h \ - job.h - -ICAL_LINK_FLAGS = $(top_builddir)/libical/src/libical/libical.la - -tlacuache_LDADD = \ - $(BONOBO_VFS_GNOME_LIBS) \ - $(top_builddir)/calendar/cal-util/libcalutil.la \ - $(top_builddir)/libversit/libversit.la \ - $(ICAL_LINK_FLAGS) - -gnorbadir = $(sysconfdir)/CORBA/servers - -gnorba_DATA = \ - tlacuache.gnorba - -EXTRA_DIST = \ - $(gnorba_DATA) + job.h diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c index 89d7532e50..ddbf23c438 100644 --- a/calendar/pcs/cal-backend.c +++ b/calendar/pcs/cal-backend.c @@ -22,8 +22,8 @@ #include <config.h> #include <gtk/gtksignal.h> +#include <cal-util/calobj.h> #include "cal-backend.h" -#include "calobj.h" #include "libversit/vcc.h" #include "icalendar.h" diff --git a/calendar/pcs/cal-backend.h b/calendar/pcs/cal-backend.h index 21c516126d..af487f7551 100644 --- a/calendar/pcs/cal-backend.h +++ b/calendar/pcs/cal-backend.h @@ -24,10 +24,10 @@ #include <libgnome/gnome-defs.h> #include <libgnomevfs/gnome-vfs.h> +#include <cal-util/cal-util.h> #include "evolution-calendar.h" #include "cal-common.h" #include "cal.h" -#include "cal-util.h" BEGIN_GNOME_DECLS diff --git a/calendar/pcs/icalendar.h b/calendar/pcs/icalendar.h index 09bfa06fad..2a22fbab71 100644 --- a/calendar/pcs/icalendar.h +++ b/calendar/pcs/icalendar.h @@ -2,7 +2,7 @@ #define ICALENDAR_H #include <ical.h> -#include "calobj.h" +#include <cal-util/calobj.h> diff --git a/calendar/pcs/tlacuache.c b/calendar/pcs/tlacuache.c deleted file mode 100644 index f5dd3d233c..0000000000 --- a/calendar/pcs/tlacuache.c +++ /dev/null @@ -1,114 +0,0 @@ -/* Tlacuache - personal calendar server main module - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero <federico@helixcode.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include <config.h> -#include <libgnorba/gnorba.h> -#include <bonobo.h> -#include <libgnomevfs/gnome-vfs.h> -#include "cal-factory.h" -#include "calobj.h" - - - -/* Callback used when the calendar factory is destroyed */ -static void -factory_destroy_cb (GtkObject *object, gpointer data) -{ - gtk_main_quit (); -} - -/* Creates and registers the calendar factory */ -static gboolean -create_cal_factory (void) -{ - CalFactory *factory; - CORBA_Object object; - CORBA_Environment ev; - int result; - - factory = cal_factory_new (); - if (!factory) { - g_message ("create_cal_factory(): could not create the calendar factory!"); - return FALSE; - } - - object = bonobo_object_corba_objref (BONOBO_OBJECT (factory)); - - CORBA_exception_init (&ev); - result = goad_server_register (CORBA_OBJECT_NIL, - object, - "evolution:calendar-factory", - "object", - &ev); - - if (ev._major != CORBA_NO_EXCEPTION || result == -1) { - g_message ("create_cal_factory(): could not register the calendar factory"); - bonobo_object_unref (BONOBO_OBJECT (factory)); - CORBA_exception_free (&ev); - return FALSE; - } else if (result == -2) { - g_message ("create_cal_factory(): a calendar factory is already registered"); - bonobo_object_unref (BONOBO_OBJECT (factory)); - CORBA_exception_free (&ev); - return FALSE; - } - - gtk_signal_connect (GTK_OBJECT (factory), "destroy", - GTK_SIGNAL_FUNC (factory_destroy_cb), - NULL); - - CORBA_exception_free (&ev); - return TRUE; -} - -int -main (int argc, char **argv) -{ - CORBA_Environment ev; - - bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE); - - CORBA_exception_init (&ev); - gnome_CORBA_init ("tlacuache", VERSION, &argc, argv, GNORBA_INIT_SERVER_FUNC, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("main(): could not initialize the ORB"); - CORBA_exception_free (&ev); - exit (1); - } - CORBA_exception_free (&ev); - - if (!bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) { - g_message ("main(): could not initialize Bonobo"); - exit (1); - } - - if (!gnome_vfs_init ()) { - g_message ("main(): could not initialize GNOME-VFS"); - exit (1); - } - - if (!create_cal_factory ()) - exit (1); - - bonobo_main (); - return 0; -} diff --git a/calendar/pcs/tlacuache.gnorba b/calendar/pcs/tlacuache.gnorba deleted file mode 100644 index 8f600305d7..0000000000 --- a/calendar/pcs/tlacuache.gnorba +++ /dev/null @@ -1,5 +0,0 @@ -[evolution:calendar-factory] -type=exe -repo_id=IDL:Evolution/Calendar/CalFactory:1.0 IDL:Bonobo/Unknown:1.0 -description=Calendar factory for the Personal Calendar Server -location_info=tlacuache |