Re: New patches



On Wed, 29 Dec 1999, Miguel de Icaza wrote:

> Can you apply the patch to both the stable branch and HEAD?

Happy new years eve dudes (somebody is blowing up cars out on the street
methinks...)

I've committed the patch, guess that would be the HEAD branch. What is the
tag for stable ? (as in: not comitted to stable)

Or in case you'd do it for me, heres the cvs diff -u result :

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/ChangeLog,v
retrieving revision 1.253
diff -u -r1.253 ChangeLog
--- ChangeLog	1999/12/10 17:58:43	1.253
+++ ChangeLog	1999/12/31 15:51:34
@@ -1,3 +1,28 @@
+1999-12-31  Eskil Heyn Olsen  <deity@eskil.dk>
+
+	* eventedit.c (ee_store_recur_end_to_ical): Adds 86400 secs (1
+	day) to the date chooses by the user. This ensures the recurrence
+	also occurs on that date.
+	(ee_rp_init_ending_date): And subtracts 86400 secs when about to
+	redisplay the box.
+
+	* calendar.h: Added an argument to calendar_new, to enable certain 
+	features, such as initing alarms or nor.
+
+	* calendar.c (calendar_new): Implemented support for the
+	CALENDAR_INIT_ALARMS option to calendar_new.
+
+	* corba-cal.c (cal_repo_get_updated_objects): Added
+ 	CALENDAR_INIT_ALARMS to calendar_new calls.
+
+	* main.c: Added CALENDAR_INIT_ALARMS to calendar_new calls. This
+ 	should probably be CALENDAR_INIT_NIL, but I'm not sure, guess
+ 	steintr should check it.
+
+	* gnome-cal.c: Added CALENDAR_INIT_ALARMS to calendar_new calls.
+
+	* calendar-pilot-sync.c: Added CALENDAR_INIT_NIL to calendar_new calls.
+
 1999-12-10  Russell Steinthal  <rms39@columbia.edu>
 
 	* eventedit.c (ee_create_ae): Fix sensitivity bug when used to
Index: calendar-pilot-sync.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/calendar-pilot-sync.c,v
retrieving revision 1.9
diff -u -r1.9 calendar-pilot-sync.c
--- calendar-pilot-sync.c	1999/11/04 14:20:13	1.9
+++ calendar-pilot-sync.c	1999/12/31 15:51:35
@@ -605,7 +605,7 @@
 	 */
 	if (!only_pilot_to_desktop){
 		vcalendar_string = GNOME_Calendar_Repository_get_updated_objects (repo, &ev);
-		dirty_cal = calendar_new ("Temporal");
+		dirty_cal = calendar_new ("Temporal",CALENDAR_INIT_NIL);
 		error = calendar_load_from_memory (dirty_cal, vcalendar_string);
 		if (!error)
 			sync_cal_to_pilot (repo, dirty_cal, pilot_fd);
Index: calendar.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/calendar.c,v
retrieving revision 1.50
diff -u -r1.50 calendar.c
--- calendar.c	1999/11/11 06:09:32	1.50
+++ calendar.c	1999/12/31 15:51:36
@@ -33,7 +33,7 @@
 static void calendar_set_day (void);
 
 Calendar *
-calendar_new (char *title)
+calendar_new (char *title,CalendarNewOptions options)
 {
 	Calendar *cal;
 
@@ -46,7 +46,9 @@
 
 	cal->event_hash = g_hash_table_new (g_str_hash, g_str_equal);
 	
-	calendar_init_alarms (cal);
+	if (options & CALENDAR_INIT_ALARMS) {
+		calendar_init_alarms (cal);
+	}
 	
 	return cal;
 }
@@ -633,7 +635,7 @@
 
 	g_return_val_if_fail (object != NULL, NULL);
 	
-	cal = calendar_new ("Temporal");
+	cal = calendar_new ("Temporal",CALENDAR_INIT_NIL);
 	calendar_add_object (cal, object);
 	str = calendar_get_as_vcal_string (cal);
 	calendar_remove_object (cal, object);
Index: calendar.h
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/calendar.h,v
retrieving revision 1.23
diff -u -r1.23 calendar.h
--- calendar.h	1999/07/29 04:25:08	1.23
+++ calendar.h	1999/12/31 15:51:36
@@ -41,7 +41,12 @@
 	iCalObject *ico;
 } CalendarObject;
 
-Calendar *calendar_new                  (char *title);
+typedef enum {
+	CALENDAR_INIT_NIL    = 0,
+	CALENDAR_INIT_ALARMS = 1 << 0
+} CalendarNewOptions;
+
+Calendar *calendar_new                  (char *title,CalendarNewOptions options);
 char     *calendar_get_as_vcal_string   (Calendar *cal);
 char     *calendar_string_from_object   (iCalObject *object);
 
Index: corba-cal.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/corba-cal.c,v
retrieving revision 1.11
diff -u -r1.11 corba-cal.c
--- corba-cal.c	1999/12/07 03:43:51	1.11
+++ corba-cal.c	1999/12/31 15:51:36
@@ -251,7 +251,7 @@
 	CORBA_char *res;
 	char *str;
 
-	dirty_cal = calendar_new ("Temporal");
+	dirty_cal = calendar_new ("Temporal",CALENDAR_INIT_NIL);
 	
 	for (l = gcal->cal->events; l; l = l->next){
 		iCalObject *obj = l->data;
Index: eventedit.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/eventedit.c,v
retrieving revision 1.60
diff -u -r1.60 eventedit.c
--- eventedit.c	1999/12/10 17:58:43	1.60
+++ eventedit.c	1999/12/31 15:51:38
@@ -650,7 +650,9 @@
 
 	case 1:
 		/* end date */
-		ical->recur->_enddate = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->recur_ed_end_on));
+		/* Also here, to ensure that the event is used, we add 86400 secs to get 
+		   get next day, in accordance to the RFC */
+		ical->recur->_enddate = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->recur_ed_end_on)) + 86400;
 		ical->recur->enddate = ical->recur->_enddate;
 		ical->recur->duration = 0;
 		break;
@@ -1247,9 +1249,10 @@
 	gtk_widget_set_sensitive (ihbox, FALSE);
 	gtk_box_pack_start (GTK_BOX (hbox), ihbox, FALSE, FALSE, 0);
 
-	if (ee->ical->recur)
-		enddate = ee->ical->recur->enddate;
-	else
+	if (ee->ical->recur) {
+		/* Shorten by one day, as we store end-on date a day ahead */
+		enddate = ee->ical->recur->enddate - 86400;
+	} else
 		enddate = ee->ical->dtend;
 
 	ee->recur_ed_end_on = widget = date_edit_new (enddate, FALSE);
Index: gnome-cal.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/gnome-cal.c,v
retrieving revision 1.66
diff -u -r1.66 gnome-cal.c
--- gnome-cal.c	1999/12/03 00:55:01	1.66
+++ gnome-cal.c	1999/12/31 15:51:39
@@ -227,7 +227,7 @@
 	gtk_window_set_title(GTK_WINDOW(retval), title);
 
 	gcal->current_display = time_day_begin (time (NULL));
-	gcal->cal = calendar_new (title);
+	gcal->cal = calendar_new (title,CALENDAR_INIT_ALARMS);
 	setup_widgets (gcal);
 	gnome_calendar_create_corba_server (gcal);
 
Index: main.c
===================================================================
RCS file: /cvs/gnome/gnome-pim/gncal/main.c,v
retrieving revision 1.91
diff -u -r1.91 main.c
--- main.c	1999/12/03 00:55:01	1.91
+++ main.c	1999/12/31 15:51:41
@@ -788,7 +788,7 @@
 	process_dates ();
 	init_calendar ();
 
-	cal = calendar_new (full_name);
+	cal = calendar_new (full_name, CALENDAR_INIT_ALARMS);
 	s = calendar_load (cal, load_file ? load_file : user_calendar_file);
 	if (s){
 		printf ("error: %s\n", s);
@@ -832,7 +832,7 @@
 	process_dates ();
 	init_calendar ();
 
-	cal = calendar_new (full_name);
+	cal = calendar_new (full_name, CALENDAR_INIT_ALARMS);
 	s = calendar_load (cal, load_file ? load_file : user_calendar_file);
 	if (s){
 		printf ("error: %s\n", s);

/dev/eskil
---



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