[evolution-patches] Some non-small changes for the save-calendar plugin



Hi there, Rodrigo Moya (and the people on the evo-patches mailinglist),

This is the first step of the promised changes for the save-calendar
plugin.

It makes some drastic changes. 

First it moves all the format-specific code into separate files:
ical-format.c and csv-format.c. Second it adds a new file
format-handler.h which contains the definition for a new struct:

struct _FormatHandler
{
  gboolean isdefault;
  const gchar *combo_label;
  GtkWidget *options_widget;
  void (*save) (...);
};

The ical-format.c and csv-format.c will indeed implement this struct.

In the tarball you will also find a patch.diff. If you just replace the
files with the ones you will find in the tarball, you don't have to
apply the patch of course. It just added it in case you prefer to use a
diff-file to patch yours. 

The patch will, of course, remove nearly all important code from
save-calendar.c and will add ical-format.c and csv-format.c to the
SOURCES in the Makefile.am.

Note that I do have a cvs-account on GNOME myself (pvanhoof). If it's t
much of a hassle I can commit this for you. 

If this gets approved, we will continue with support for an XML-format.
Probably the same tag-names as the entity-names in the ical format, but
then XML.

Probably something like ...

<ITEM UID="">
  <DTSTART>xx/xx/xx yy:yy;yy</DTSTART>
  <DTEND>xx/xx/xx yy:yy;yy</DTEND>
  ...
</ITEM>

Supporting new formats is less of a hassle after these drastic changes.
And since it's a c-file per format,I am guessing it's more maintainable.


Thanks for your time

-- 
Philip Van Hoof, Software Developer @ Cronos
home: me at freax dot org
gnome: pvanhoof at gnome dot org
work: philip dot vanhoof at cronos dot be
junk: philip dot vanhoof at gmail dot com
http://www.freax.be, http://www.freax.eu.org

Attachment: save-calendar.tar.gz
Description: application/compressed-tar



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