diff options
author | Miguel de Icaza <miguel@gnu.org> | 1999-07-17 03:15:34 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1999-07-17 03:15:34 +0800 |
commit | e1c1c85819bbfb3f0fc6cfaf52e88d1dae6441ee (patch) | |
tree | 16a13fb1faf0ca28b2b97967668bd6e43c209ff6 /calendar/cal-util | |
parent | 4a765990e54c4caeb9880ffac8994cf64f23baae (diff) | |
download | gsoc2013-evolution-e1c1c85819bbfb3f0fc6cfaf52e88d1dae6441ee.tar.gz gsoc2013-evolution-e1c1c85819bbfb3f0fc6cfaf52e88d1dae6441ee.tar.zst gsoc2013-evolution-e1c1c85819bbfb3f0fc6cfaf52e88d1dae6441ee.zip |
Changed gnome-pim.keys to use the --file flag
Changed gnome-pim.keys to use the --file flag
1999-07-14 Miguel de Icaza <miguel@gnu.org>
* calobj.c (ical_gen_uid): Returns a UID.
(ical_object_new): Use a UID when creating an event. Should get
syncing done easier.
1999-07-14 Nicholas J Kreucher <nick@poetic.com>
* calobj.c (skip_numbers): Actually skip over the numbers.
(ical_object_to_vobject): Test the proper variable for storing the
proper information.
svn path=/trunk/; revision=1027
Diffstat (limited to 'calendar/cal-util')
-rw-r--r-- | calendar/cal-util/calobj.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c index 7b85fdc54c..0ab8c1c004 100644 --- a/calendar/cal-util/calobj.c +++ b/calendar/cal-util/calobj.c @@ -10,10 +10,33 @@ #include <string.h> #include <glib.h> #include <ctype.h> +#include <unistd.h> #include "calobj.h" #include "timeutil.h" #include "../libversit/vcc.h" +static char * +ical_gen_uid (void) +{ + static char *domain; + time_t t = time (NULL); + + if (!domain){ + char buffer [128]; + + getdomainname (buffer, sizeof (buffer)-1); + domain = g_strdup (domain); + } + + return g_strdup_printf ( + "%s-%d-%d-%d@%s", + isodate_from_time_t (t), + getpid (), + getgid (), + getppid (), + domain); +} + iCalObject * ical_object_new (void) { @@ -23,7 +46,8 @@ ical_object_new (void) ico->seq = -1; ico->dtstamp = time (NULL); - + ico->uid = ical_gen_uid (); + return ico; } @@ -165,7 +189,7 @@ skip_numbers (char **str) if (!isdigit (**str)) return; while (**str && isdigit (**str)) - ; + (*str)++; } } @@ -939,7 +963,7 @@ ical_object_to_vobject (iCalObject *ical) store_list (o, VCCategoriesProp, ical->categories); /* resources */ - if (ical->categories) + if (ical->resources) store_list (o, VCCategoriesProp, ical->resources); /* priority */ |