window: Create calendar-management-dialog on demand
When the user deletes a calendar in the calendar management dialog, a popover allows them to undo the deletion. The calendar is fully deleted only when the toast is dismissed or when the toast reaches its timeout. When the user closes the calendar management dialog without dismissing the toast and before the end of the timeout, the calendar can still be manipulated for a short period of time.
To fix this, I removed the calendar-management-dialog from the UI of the window, and made the window create and destroy the dialog on demand. This forces the toast overlay to dismiss all toasts.
Fixes #1270 (closed). Updates the public API of calendar_management_dialog.
Edited by Enzo MAROS