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
This commit is contained in:
Miguel de Icaza
1999-07-16 19:15:34 +00:00
committed by Arturo Espinosa
parent 4a765990e5
commit e1c1c85819
5 changed files with 110 additions and 14 deletions
+18
View File
@@ -1,3 +1,21 @@
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.
1999-07-14 Jean-Noel Guiheneuf <jean-noel.guiheneuf@wanadoo.fr>
* timeutil.c (time_add_month): Fixed the problem with next month
going from a 31-day to a 30-day by adjusting the date to the
closest day at the end of the month.
1999-06-07 Mike McEwan <mike@lotusland.demon.co.uk>
* timeutil.c (time_add_month): Tell ktime' that we don't know
+27 -3
View File
@@ -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 */
+27 -3
View File
@@ -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 */
+27 -3
View File
@@ -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 */
+11 -5
View File
@@ -141,11 +141,10 @@ time_add_month (time_t time, int months)
{
struct tm *tm = localtime (&time);
time_t new_time;
int mday;
/* FIXME: this will not work correctly when switching, say, from a 31-day month to a 30-day
* month. Figure out the number of days in the month and go to the nearest "limit" day.
*/
mday = tm->tm_mday;
tm->tm_mon += months;
tm->tm_isdst = -1;
if ((new_time = mktime (tm)) == -1){
@@ -153,7 +152,14 @@ time_add_month (time_t time, int months)
print_time_t (time);
return time;
}
return new_time;
tm = localtime (&new_time);
if (tm->tm_mday < mday){
tm->tm_mon--;
tm->tm_mday = time_days_in_month (tm->tm_year+1900, tm->tm_mon);
return new_time = mktime (tm);
}
else
return new_time;
}
time_t