Properly append to list
2000-08-24 JP Rosevear <jpr@helixcode.com> * gui/gncal-todo.c (ok_button): Properly append to list * gui/event-editor.c (dialog_to_comp_object): ditto * gui/e-day-view.c (e_day_view_on_new_appointment): The base times are not UTC * gui/e-week-view.c (e_week_view_on_new_appointment): ditto svn path=/trunk/; revision=5031
This commit is contained in:
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* ECalendarTable - displays the iCalendar objects in a table (an ETable).
|
||||
* ECalendarTable - displays the CalComponent objects in a table (an ETable).
|
||||
* Used for calendar events and tasks.
|
||||
*/
|
||||
|
||||
|
||||
@ -2415,10 +2415,10 @@ e_day_view_on_new_appointment (GtkWidget *widget, gpointer data)
|
||||
date.value = &itt;
|
||||
date.tzid = NULL;
|
||||
|
||||
*date.value = icaltime_from_timet (dtstart, FALSE, TRUE);
|
||||
*date.value = icaltime_from_timet (dtstart, FALSE, FALSE);
|
||||
cal_component_set_dtstart (comp, &date);
|
||||
|
||||
*date.value = icaltime_from_timet (dtend, FALSE, TRUE);
|
||||
*date.value = icaltime_from_timet (dtend, FALSE, FALSE);
|
||||
cal_component_set_dtend (comp, &date);
|
||||
|
||||
cal_component_commit_sequence (comp);
|
||||
|
||||
@ -2746,7 +2746,8 @@ e_week_view_on_new_appointment (GtkWidget *widget, gpointer data)
|
||||
CalComponent *comp;
|
||||
CalComponentDateTime date;
|
||||
struct icaltimetype itt;
|
||||
|
||||
time_t dt;
|
||||
|
||||
week_view = E_WEEK_VIEW (data);
|
||||
|
||||
comp = cal_component_new ();
|
||||
@ -2755,14 +2756,12 @@ e_week_view_on_new_appointment (GtkWidget *widget, gpointer data)
|
||||
date.value = &itt;
|
||||
date.tzid = NULL;
|
||||
|
||||
*date.value =
|
||||
icaltime_from_timet (week_view->day_starts[week_view->selection_start_day],
|
||||
FALSE, TRUE);
|
||||
dt = week_view->day_starts[week_view->selection_start_day];
|
||||
*date.value = icaltime_from_timet (dt, FALSE, FALSE);
|
||||
cal_component_set_dtstart (comp, &date);
|
||||
|
||||
*date.value =
|
||||
icaltime_from_timet (week_view->day_starts[week_view->selection_end_day + 1],
|
||||
FALSE, TRUE);
|
||||
dt = week_view->day_starts[week_view->selection_end_day + 1];
|
||||
*date.value = icaltime_from_timet (dt, FALSE, FALSE);
|
||||
cal_component_set_dtend (comp, &date);
|
||||
|
||||
gnome_calendar_edit_object (week_view->calendar, comp);
|
||||
|
||||
@ -929,12 +929,12 @@ dialog_to_comp_object (EventEditor *ee)
|
||||
CalComponent *comp;
|
||||
CalComponentText *text;
|
||||
CalComponentDateTime date;
|
||||
time_t t;
|
||||
struct icalrecurrencetype *recur;
|
||||
time_t t;
|
||||
gboolean all_day_event;
|
||||
int i, pos = 0;
|
||||
GtkCList *exception_list;
|
||||
GSList *list = NULL;
|
||||
GSList *list;
|
||||
int i, pos = 0;
|
||||
|
||||
priv = ee->priv;
|
||||
comp = priv->comp;
|
||||
@ -943,11 +943,11 @@ dialog_to_comp_object (EventEditor *ee)
|
||||
text->value = e_dialog_editable_get (priv->general_summary);
|
||||
cal_component_set_summary (comp, text);
|
||||
|
||||
list = NULL;
|
||||
text->value = e_dialog_editable_get (priv->description);
|
||||
g_slist_prepend (list, text);
|
||||
list = g_slist_prepend (list, text);
|
||||
cal_component_set_description_list (comp, list);
|
||||
cal_component_free_text_list (list);
|
||||
list = NULL;
|
||||
|
||||
date.value = g_new (struct icaltimetype, 1);
|
||||
t = e_dialog_dateedit_get (priv->start_time);
|
||||
@ -994,6 +994,7 @@ dialog_to_comp_object (EventEditor *ee)
|
||||
cal_component_set_classification (comp, classification_get (priv->classification_radio));
|
||||
|
||||
/* Recurrence information */
|
||||
list = NULL;
|
||||
recur = g_new (struct icalrecurrencetype, 1);
|
||||
icalrecurrencetype_clear (recur);
|
||||
recur->freq = recur_options_get (priv->recurrence_rule_none);
|
||||
@ -1070,11 +1071,11 @@ dialog_to_comp_object (EventEditor *ee)
|
||||
} 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);
|
||||
}
|
||||
g_slist_append (list, recur);
|
||||
list = g_slist_append (list, recur);
|
||||
cal_component_set_rrule_list (comp, list);
|
||||
list = NULL;
|
||||
|
||||
/* Get exceptions from clist into ico->exdate */
|
||||
list = NULL;
|
||||
exception_list = GTK_CLIST (priv->recurrence_exceptions_list);
|
||||
for (i = 0; i < exception_list->rows; i++) {
|
||||
struct icaltimetype *tt = g_new (struct icaltimetype, 1);
|
||||
|
||||
@ -101,7 +101,7 @@ ok_button (GtkWidget *widget, GnomeDialog *dialog)
|
||||
comment = GTK_TEXT(gtk_object_get_data (GTK_OBJECT(dialog), "comment"));
|
||||
t = gtk_editable_get_chars (entry, 0, -1);
|
||||
text->value = t;
|
||||
g_slist_append (l, text);
|
||||
l = g_slist_append (l, text);
|
||||
cal_component_set_comment_list (comp, l);
|
||||
cal_component_free_text_list (l);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user