Files
federated-calendar/src/gui/calendar-management/gcal-calendar-management-dialog.h
T
Enzo MAROS 0e09efc43c 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.
2024-10-22 12:35:45 +00:00

43 lines
1.3 KiB
C

/* gcal-source-manager.h
*
* Copyright (C) 2015 Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "gcal-application.h"
#include "gcal-manager.h"
#include <libecal/libecal.h>
#include <adwaita.h>
G_BEGIN_DECLS
#define GCAL_RESPONSE_REMOVE_SOURCE 2
#define GCAL_TYPE_CALENDAR_MANAGEMENT_DIALOG (gcal_calendar_management_dialog_get_type())
G_DECLARE_FINAL_TYPE (GcalCalendarManagementDialog,
gcal_calendar_management_dialog,
GCAL, CALENDAR_MANAGEMENT_DIALOG,
AdwDialog)
GcalCalendarManagementDialog* gcal_calendar_management_dialog_new (GcalContext *context);
G_END_DECLS