calendars-page: Remove previously deleted calendar if any

It is possible to delete a calendar, and immediately delete another.
When that happens, both should be deleted.
parent 39ebc545
......@@ -374,6 +374,14 @@ gcal_calendars_page_activate (GcalCalendarManagementPage *page,
GCAL_RETURN ();
self = GCAL_CALENDARS_PAGE (page);
/* Remove the previously deleted calendar, if any */
if (self->removed_calendar)
{
delete_calendar (self, self->removed_calendar);
g_clear_object (&self->removed_calendar);
}
calendar = GCAL_CALENDAR (page_data);
self->removed_calendar = g_object_ref (calendar);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment