aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog13
-rw-r--r--calendar/gui/event-editor.c14
2 files changed, 21 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index c8b2859dad..d791ff1eef 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,16 @@
+2000-10-31 Federico Mena Quintero <federico@helixcode.com>
+
+ * gui/event-editor.c (count_by_xxx): Hmmm. SHRT_MAX changed to
+ ICAL_RECURRENCE_ARRAY_MAX in libical. Deal with it.
+ (fill_recurrence_widgets): Likewise.
+ (simple_recur_to_comp_object): Fixed incorrect assertion. The
+ weekday picker is not the immediate child of the recurrence
+ special container.
+ (fill_recurrence_widgets): Call make_recurrence_special() after
+ setting the recurrence period type.
+ (fill_ending_date): Call make_recurrence_ending_special(). This
+ would be so much nicer if GTK+ were model/view all over.
+
2000-10-31 JP Rosevear <jpr@helixcode.com>
* conduits/todo/todo-conduit.h: Remove add/del/mod hashes and
diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c
index 0ff3a10185..fec654d98f 100644
--- a/calendar/gui/event-editor.c
+++ b/calendar/gui/event-editor.c
@@ -1023,6 +1023,8 @@ fill_ending_date (EventEditor *ee, struct icalrecurrencetype *r)
ENDING_FOR,
ending_types_map);
}
+
+ make_recurrence_ending_special (ee);
}
/* Counts the number of elements in the by_xxx fields of an icalrecurrencetype */
@@ -1032,7 +1034,7 @@ count_by_xxx (short *field, int max_elements)
int i;
for (i = 0; i < max_elements; i++)
- if (field[i] == SHRT_MAX)
+ if (field[i] == ICAL_RECURRENCE_ARRAY_MAX)
break;
return i;
@@ -1140,7 +1142,7 @@ fill_recurrence_widgets (EventEditor *ee)
day_mask = 0;
- for (i = 0; i < 8 && r->by_day[i] != SHRT_MAX; i++) {
+ for (i = 0; i < 8 && r->by_day[i] != ICAL_RECURRENCE_ARRAY_MAX; i++) {
enum icalrecurrencetype_weekday weekday;
int pos;
@@ -1202,6 +1204,7 @@ fill_recurrence_widgets (EventEditor *ee)
e_dialog_radio_set (priv->recurrence_simple, RECUR_SIMPLE, recur_type_map);
sensitize_recur_widgets (ee);
+ make_recurrence_special (ee);
e_dialog_spin_set (priv->recurrence_interval_value, r->interval);
fill_ending_date (ee, r);
@@ -1335,11 +1338,11 @@ fill_widgets (EventEditor *ee)
e_dialog_radio_set (priv->recurrence_rule_monthly, ICAL_MONTHLY_RECURRENCE,
recur_options_map);
- if (r->by_month_day[0] != SHRT_MAX) {
+ if (r->by_month_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
e_dialog_toggle_set (priv->recurrence_rule_monthly_on_day, TRUE);
e_dialog_spin_set (priv->recurrence_rule_monthly_day_nth,
r->by_month_day[0]);
- } else if (r->by_day[0] != SHRT_MAX) {
+ } else if (r->by_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
e_dialog_toggle_set (priv->recurrence_rule_monthly_weekday, TRUE);
/* libical does not handle ints in by day */
/* e_dialog_option_menu_set (priv->recurrence_rule_monthly_week, */
@@ -1438,8 +1441,7 @@ simple_recur_to_comp_object (EventEditor *ee)
case ICAL_WEEKLY_RECURRENCE:
g_assert (GTK_BIN (priv->recurrence_special)->child != NULL);
- g_assert (GTK_BIN (priv->recurrence_special)->child
- == priv->recurrence_weekday_picker);
+ g_assert (priv->recurrence_weekday_picker != NULL);
g_assert (IS_WEEKDAY_PICKER (priv->recurrence_weekday_picker));
day_mask = weekday_picker_get_days (WEEKDAY_PICKER (priv->recurrence_weekday_picker));