Re: [evolution-patches] weather calendars



OK, here's the updated version.

Source group creation and categories are now handled from the plugin.
This depends on the component.migration event, which hasn't been
committed so I've included it in this patch. This means that until the
plugin is enabled, the user won't get any of the "Weather: X" categories
or the weather source group. At the moment there is no facility for
removing these if the plugin gets disabled.

-David

On Fri, 2005-01-07 at 11:56 +0100, Rodrigo Moya wrote:
> On Thu, 2005-01-06 at 17:03 -0700, David Trowbridge wrote:
> > 
> > > why PRIVATE? I guess they should be marked as PUBLIC.
> > Well, I was guessing that private/public were related to freebusy publishing (and
> > similar things). It seemed silly that other people should see your weather events.
> > 
> for F/B, the transparency is used, not the classification.
> 
> > > I guess here you should really return some capabilities, which tell clients what the
> > > backend does and does not support. See the list in libecal/e-cal-util.h
> > I'm really not sure what those capability flags mean. Is there some
> > documentation somewhere?
> > 
> not that I know of, but they are mostly self-descriptive:
> 
> * CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT -> does not allow repetitive
> alarms
> * CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS -> does not allow audio alarms
> * CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS -> does not allow display
> alarms
> * CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS -> does not allow email alarms
> * CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS -> does not allow procedure
> alarms
> * CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT -> does not allow assignment
> of tasks
> * CAL_STATIC_CAPABILITY_NO_THISANDFUTURE and
> CAL_STATIC_CAPABILITY_NO_THISANDPRIOR -> does not allow modification of
> THISAND* instances
> * CAL_STATIC_CAPABILITY_NO_TRANSPARENCY -> transparency field not
> supported
> * CAL_STATIC_CAPABILITY_ONE_ALARM_ONLY -> only allows one alarm
> * CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ATTEND -> for meetings, the
> organizer must be an attendee also
> * CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS -> not really sure
> what this is about, anyone?
> * CAL_STATIC_CAPABILITY_REMOVE_ALARMS -> alarms can be removed after
> displayed to the user (discard_alarm method is called)
> * CAL_STATIC_CAPABILITY_SAVE_SCHEDULES -> not sure neither about these
> ones
> * CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK 
> * CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR
> * CAL_STATIC_CAPABILITY_NO_GEN_OPTIONS
> * CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS

Attachment: e-d-s-new-files.tar.gz
Description: application/compressed-tar

? .swp
? iconv-detect.h
? calendar/backends/weather
? camel/camel-mime-tables.c
? libedataserverui/test-contact-store
? libedataserverui/test-name-selector
? src/GNOME_Evolution_DataServer_1.2.server
Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution-data-server/configure.in,v
retrieving revision 1.83
diff -u -r1.83 configure.in
--- configure.in	4 Jan 2005 18:47:47 -0000	1.83
+++ configure.in	7 Jan 2005 00:10:00 -0000
@@ -1137,6 +1137,9 @@
 gladedir="$privdatadir/glade"
 AC_SUBST(gladedir)
 
+weatherdatadir="$privdatadir/weather"
+AC_SUBST(weatherdatadir)
+
 dnl separate camel from e-d-s?  or should it be under the same spot?  same for now.
 camel_providerdir="${privlibdir}/camel-providers"
 AC_SUBST(camel_providerdir)
@@ -1204,6 +1207,7 @@
 calendar/backends/groupwise/Makefile
 calendar/backends/http/Makefile
 calendar/backends/contacts/Makefile
+calendar/backends/weather/Makefile
 calendar/tests/Makefile
 calendar/tests/ecal/Makefile
 camel/Makefile
Index: evolution-data-server.pc.in
===================================================================
RCS file: /cvs/gnome/evolution-data-server/evolution-data-server.pc.in,v
retrieving revision 1.2
diff -u -r1.2 evolution-data-server.pc.in
--- evolution-data-server.pc.in	30 Sep 2004 16:53:54 -0000	1.2
+++ evolution-data-server.pc.in	7 Jan 2005 00:10:00 -0000
@@ -4,6 +4,8 @@
 includedir= includedir@
 privlibdir= privlibdir@
 extensiondir= extensiondir@
+datadir= datadir@
+privdatadir= privdatadir@
 
 idldir= idldir@
 IDL_INCLUDES=-I ${idldir} @IDL_INCLUDES@
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.368
diff -u -r1.368 ChangeLog
--- calendar/ChangeLog	6 Jan 2005 07:33:54 -0000	1.368
+++ calendar/ChangeLog	7 Jan 2005 00:10:00 -0000
@@ -1,3 +1,7 @@
+2005-01-06  David Trowbridge <trowbrds cs colorado edu>
+
+	* backends/weather/*: Import weather calendar backend
+
 2005-01-06 Chenthill Palanisamy <pchenthill novell com>
 	
 	* backends/groupwise/e-cal-backends-groupwise-utils.[ch]:
Index: calendar/backends/Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/Makefile.am,v
retrieving revision 1.3
diff -u -r1.3 Makefile.am
--- calendar/backends/Makefile.am	9 Jan 2004 20:05:27 -0000	1.3
+++ calendar/backends/Makefile.am	7 Jan 2005 00:10:00 -0000
@@ -1 +1 @@
-SUBDIRS = file groupwise http contacts
+SUBDIRS = file groupwise http contacts weather

Attachment: evolution-new-files.tar.gz
Description: application/compressed-tar

? .swp
? calendar/gui/.svn
? calendar/gui/e-cal-event.c
? calendar/gui/e-cal-event.h
? calendar/gui/files
? help/C/evolution-2.2-C.omf
? help/C/evolution-2.2.xml
? mail/default/zh_CN/Makefile
? mail/default/zh_CN/Makefile.in
? plugins/calendar-weather
? plugins/mail-notification
? plugins/publish-calendar
? plugins/groupwise-account-setup/Makefile
? plugins/groupwise-account-setup/Makefile.in
? plugins/groupwise-account-setup/org-gnome-gw-account-setup.eplug
? widgets/misc/test-title-bar
Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution/configure.in,v
retrieving revision 1.756
diff -u -r1.756 configure.in
--- configure.in	3 Jan 2005 18:43:25 -0000	1.756
+++ configure.in	7 Jan 2005 00:21:29 -0000
@@ -1232,6 +1232,11 @@
 	AC_MSG_ERROR(no)
 fi
 
+dnl -- e-d-s weather datadir
+dataserver_datadir=`pkg-config --variable=privdatadir evolution-data-server-1.2`
+weatherdatadir="$dataserver_datadir/weather"
+AC_SUBST(weatherdatadir)
+
 dnl --- evolution-test flags
 
 EVO_SET_COMPILE_FLAGS(EVOLUTION_TEST, libgnome-2.0 libgnomeui-2.0 libbonobo-2.0 libbonoboui-2.0 >= $BONOBOUI_REQUIRED)
@@ -1333,7 +1338,7 @@
 AC_ARG_ENABLE(plugins, [  --enable-plugins=[no/all/list]      Enable plugins.],enable_plugins="$enableval",enable_plugins=base)
 
 dnl Add any new plugins here
-plugins_base="calendar-http groupwise-account-setup plugin-manager backup-restore" 
+plugins_base="calendar-http calendar-weather groupwise-account-setup plugin-manager backup-restore" 
 plugins_all="bbdb subject-thread save-attachments prefer-plain save-calendar select-one-source copy-tool mail-to-meeting mail-to-task folder-unsubscribe mark-calendar-offline audio-inline mailing-list-actions groupwise-account-setup itip-formatter backup-restore itip-formatter"
 
 case x"$enable_plugins" in
@@ -1535,6 +1540,7 @@
 mail/importers/Makefile
 plugins/Makefile
 plugins/calendar-http/Makefile
+plugins/calendar-weather/Makefile
 plugins/plugin-manager/Makefile
 plugins/bbdb/Makefile
 plugins/audio-inline/Makefile
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2606
diff -u -r1.2606 ChangeLog
--- calendar/ChangeLog	6 Jan 2005 09:25:21 -0000	1.2606
+++ calendar/ChangeLog	7 Jan 2005 00:21:30 -0000
@@ -1,3 +1,9 @@
+2005-01-06  David Trowbridge  <trowbrds cs colorado edu>
+
+	* gui/e-cal-event[hc]: initial import of ECalEvent targets
+
+	* gui/migration.c (migrate_calendars): add component.migration event
+
 2005-01-06  Chenthill Palanisamy <pchenthill novell com>
 	
 	merging send options
Index: calendar/gui/Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/Makefile.am,v
retrieving revision 1.301
diff -u -r1.301 Makefile.am
--- calendar/gui/Makefile.am	23 Dec 2004 02:42:11 -0000	1.301
+++ calendar/gui/Makefile.am	7 Jan 2005 00:21:30 -0000
@@ -105,6 +105,8 @@
 	e-cal-component-preview.h		\
 	e-cal-config.c				\
 	e-cal-config.h				\
+	e-cal-event.c				\
+	e-cal-event.h				\
 	e-cal-menu.c				\
 	e-cal-menu.h				\
 	e-cal-model-calendar.h			\
Index: calendar/gui/main.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/main.c,v
retrieving revision 1.171
diff -u -r1.171 main.c
--- calendar/gui/main.c	31 Dec 2004 16:59:18 -0000	1.171
+++ calendar/gui/main.c	7 Jan 2005 00:21:30 -0000
@@ -49,6 +49,7 @@
 #include "e-cal-config.h"
 #include "e-cal-popup.h"
 #include "e-cal-menu.h"
+#include "e-cal-event.h"
 
 #define FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_Factory:" BASE_VERSION
 
@@ -146,6 +147,7 @@
 	e_plugin_hook_register_type (e_cal_popup_hook_get_type());
 	e_plugin_hook_register_type (e_cal_menu_hook_get_type());
 	e_plugin_hook_register_type (e_cal_config_hook_get_type ());
+	e_plugin_hook_register_type (e_cal_event_hook_get_type ());
 }
 
 
Index: calendar/gui/migration.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/migration.c,v
retrieving revision 1.32
diff -u -r1.32 migration.c
--- calendar/gui/migration.c	7 Oct 2004 21:03:36 -0000	1.32
+++ calendar/gui/migration.c	7 Jan 2005 00:21:30 -0000
@@ -47,6 +47,7 @@
 #include <libedataserver/e-xml-hash-utils.h>
 #include "calendar-config.h"
 #include "calendar-config-keys.h"
+#include "e-cal-event.h"
 #include "migration.h"
 
 static e_gconf_map_t calendar_display_map[] = {
@@ -700,6 +701,8 @@
 {
 	ESourceGroup *on_this_computer = NULL, *on_the_web = NULL, *contacts = NULL;
 	ESource *personal_source = NULL;
+	ECalEvent *ece;
+	ECalEventTargetComponent *target;
 	gboolean retval = FALSE;
 
 	/* we call this unconditionally now - create_groups either
@@ -833,6 +836,21 @@
 	}
 
 	e_source_list_sync (calendar_component_peek_source_list (component), NULL);
+
+	/** @Event: component.migration
+	 * @Title: Migration step in component initialization
+	 * @Target: ECalEventTargetComponent
+	 * 
+	 * component.migration is emitted during the calendar component
+	 * initialization process. This allows new calendar backend types
+	 * to be distributed as an e-d-s backend and a plugin without
+	 * reaching their grubby little fingers into migration.c
+	 */
+	/* Fire off migration event */
+	ece = e_cal_event_peek ();
+	target = e_cal_event_target_new_component (ece, calendar_component_peek (), 0);
+	e_event_emit ((EEvent *) ece, "component.migration", (EEventTarget *) target);
+
 	retval = TRUE;
 fail:
 	if (on_this_computer)
Index: doc/devel/build-eplugin-manual.pl
===================================================================
RCS file: /cvs/gnome/evolution/doc/devel/build-eplugin-manual.pl,v
retrieving revision 1.3
diff -u -r1.3 build-eplugin-manual.pl
--- doc/devel/build-eplugin-manual.pl	28 Oct 2004 09:30:28 -0000	1.3
+++ doc/devel/build-eplugin-manual.pl	7 Jan 2005 00:21:31 -0000
@@ -240,6 +240,10 @@
 	    { 'type' => 'HookPoint-EMPopup',
 	      'files' => [ 'em-folder-tree.c', 'em-folder-view.c', 'em-format-html-display.c', '../composer/e-msg-composer-attachment-bar.c' ],
 	      'module' => 'mail' },
+	   'ecal-events.xml' =>
+	    { 'type' => 'Event',
+	      'files' => [ 'gui/migration.c' ],
+	      'module' => 'calendar' },
 	   'ecal-popups.xml' =>
 	    { 'type' => 'HookPoint-ECalPopup',
 	      'files' => [ 'gui/e-calendar-view.c', 'gui/calendar-component.c', 'gui/e-calendar-view.c', 'gui/tasks-component.c' ],


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]