Skip to content

new-calendar-page: don't add local calendar if remote address is given

Michael Catanzaro requested to merge mcatanzaro/one-at-a-time into main

If the user has entered a remote address, then adding a new empty local calendar is definitely not desired. So stop doing it. Create the local_source only if the user has clicked the Add button and no remote sources are available. Rename the relevant widgets accordingly, and update the add button's sensitivity check to account for the fact that self->local_source no longer exists.

See #566, but note this does not fully solve #566 as there is an additional bug somewhere else causing multiple remote calendars to be added at the same time when only a single ical file is used as the data source. This dialog does support adding multiple calendars (ESources) from a single URL, but that shouldn't be happening when the URL points to a single ical file. That bug appears to be in a different level of the code, not GcalNewCalendarPage.

Also note that we require further changes to the strings on this dialog to conform to this new behavior, in a future commit. This commit is designed to not break string freeze.

Edited by Georges Basile Stavracas Neto

Merge request reports