diff options
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 16 | ||||
-rw-r--r-- | calendar/cal-util/cal-recur.c | 3 | ||||
-rw-r--r-- | calendar/gui/event-editor.c | 36 |
3 files changed, 44 insertions, 11 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index b9e445c2ec..6aa34c3478 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,19 @@ +2000-09-01 JP Rosevear <jpr@helixcode.com> + + * gui/event-editor.c: Make toolbar save and close button. + We should put a similar menu option in sometime. + +2000-08-31 JP Rosevear <jpr@helixcode.com> + + * cal-util/cal-recur.c (array_to_list): Use + ICAL_RECURRENCE_ARRAY_MAX instead of MAX_SHORT + +2000-08-31 JP Rosevear <jpr@helixcode.com> + + * gui/event-editor.c (file_delete_cb): Implement delete option + (dialog_to_comp_object): Set the weekday start value and use + local not UTC time + 2000-08-31 Federico Mena Quintero <federico@helixcode.com> * gui/event-editor.c (file_delete_cb): No need to spit a warning diff --git a/calendar/cal-util/cal-recur.c b/calendar/cal-util/cal-recur.c index 2fad53ca63..9c35e26b92 100644 --- a/calendar/cal-util/cal-recur.c +++ b/calendar/cal-util/cal-recur.c @@ -575,9 +575,8 @@ array_to_list (short *array, int max_elements) l = NULL; - for (i = 0; i < max_elements && array[i] != SHRT_MAX; i++) + for (i = 0; i < max_elements && array[i] != ICAL_RECURRENCE_ARRAY_MAX; i++) l = g_list_prepend (l, GINT_TO_POINTER ((int) (array[i]))); - return g_list_reverse (l); } diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c index b0202493f2..c3c41e5cd5 100644 --- a/calendar/gui/event-editor.c +++ b/calendar/gui/event-editor.c @@ -961,10 +961,9 @@ dialog_to_comp_object (EventEditor *ee) cal_component_set_classification (comp, classification_get (priv->classification_radio)); /* Recurrence information */ - list = NULL; icalrecurrencetype_clear (&recur); recur.freq = recur_options_get (priv->recurrence_rule_none); - + switch (recur.freq) { case ICAL_NO_RECURRENCE: /* nothing */ @@ -1027,16 +1026,24 @@ dialog_to_comp_object (EventEditor *ee) } if (recur.freq != ICAL_NO_RECURRENCE) { + /* recurrence start of week */ + if (week_starts_on_monday) + recur.week_start = ICAL_MONDAY_WEEKDAY; + else + recur.week_start = ICAL_SUNDAY_WEEKDAY; + /* recurrence ending date */ if (e_dialog_toggle_get (priv->recurrence_ending_date_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 + /* Also here, to ensure that the event is used, we add a day + * to get the next day, in accordance to the RFC */ - t = e_dialog_dateedit_get (priv->recurrence_ending_date_end_on_date) + 86400; - recur.until = icaltime_from_timet (t, TRUE, TRUE); + t = e_dialog_dateedit_get (priv->recurrence_ending_date_end_on_date); + t = time_add_day (t, 1); + recur.until = icaltime_from_timet (t, TRUE, FALSE); } else if (e_dialog_toggle_get (priv->recurrence_ending_date_end_after)) { recur.count = e_dialog_spin_get_int (priv->recurrence_ending_date_end_after_count); } + list = NULL; list = g_slist_append (list, &recur); cal_component_set_rrule_list (comp, list); } @@ -1107,6 +1114,17 @@ file_save_cb (GtkWidget *widget, gpointer data) save_event_object (ee); } +/* File/Save and Close callback */ +static void +file_save_and_close_cb (GtkWidget *widget, gpointer data) +{ + EventEditor *ee; + + ee = EVENT_EDITOR (data); + save_event_object (ee); + close_dialog (ee); +} + /* File/Delete callback */ static void file_delete_cb (GtkWidget *widget, gpointer data) @@ -1341,9 +1359,9 @@ create_menu (EventEditor *ee) /* Toolbar */ static GnomeUIInfo toolbar[] = { - GNOMEUIINFO_ITEM_STOCK (N_("Save"), - N_("Save this appointment"), - file_save_cb, + GNOMEUIINFO_ITEM_STOCK (N_("Save and Close"), + N_("Save and close this appointment"), + file_save_and_close_cb, GNOME_STOCK_PIXMAP_SAVE), GNOMEUIINFO_ITEM_STOCK (N_("Delete"), |