schedule-section: Skip updating recurrence limit if no repeat
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/634>
This commit is contained in:
@@ -433,16 +433,6 @@ get_recurence_limit_type (GcalScheduleSection *self)
|
||||
return (GcalRecurrenceLimitType) item;
|
||||
}
|
||||
|
||||
static void
|
||||
on_repeat_duration_changed_cb (GtkWidget *widget,
|
||||
GParamSpec *pspec,
|
||||
GcalScheduleSection *self)
|
||||
{
|
||||
GcalRecurrenceLimitType limit_type = get_recurence_limit_type (self);
|
||||
GcalEventSchedule *updated = gcal_event_schedule_set_recur_limit_type (self->values, limit_type);
|
||||
update_from_event_schedule (self, updated);
|
||||
}
|
||||
|
||||
static GcalRecurrenceFrequency
|
||||
get_recurrence_frequency (GcalScheduleSection *self)
|
||||
{
|
||||
@@ -453,6 +443,19 @@ get_recurrence_frequency (GcalScheduleSection *self)
|
||||
return (GcalRecurrenceFrequency) item;
|
||||
}
|
||||
|
||||
static void
|
||||
on_repeat_duration_changed_cb (GtkWidget *widget,
|
||||
GParamSpec *pspec,
|
||||
GcalScheduleSection *self)
|
||||
{
|
||||
if (get_recurrence_frequency (self) != GCAL_RECURRENCE_NO_REPEAT)
|
||||
{
|
||||
GcalRecurrenceLimitType limit_type = get_recurence_limit_type (self);
|
||||
GcalEventSchedule *updated = gcal_event_schedule_set_recur_limit_type (self->values, limit_type);
|
||||
update_from_event_schedule (self, updated);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_repeat_type_changed_cb (GtkWidget *widget,
|
||||
GParamSpec *pspec,
|
||||
|
||||
Reference in New Issue
Block a user