diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2022-10-15 19:06:29 -0300 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2022-10-17 23:37:13 -0300 |
commit | 679a392b71e67cf5769501dcd100dd4042255c24 (patch) | |
tree | ed8eafbe3ff4185a28b3e78e76c08c7cca743b62 | |
parent | 2f1fe2b49bc76e2a77d2cdd974b3b1c9396ddf7a (diff) | |
download | gnome-calendar-679a392b71e67cf5769501dcd100dd4042255c24.tar.gz |
event-editor/dialog: Don't hide dialog on cancelling operation
If the user clicks the "Cancel" button, it obviously means "cancel",
so let's cancel.
-rw-r--r-- | src/gui/event-editor/gcal-event-editor-dialog.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/event-editor/gcal-event-editor-dialog.c b/src/gui/event-editor/gcal-event-editor-dialog.c index 77b01218..3f83e7a1 100644 --- a/src/gui/event-editor/gcal-event-editor-dialog.c +++ b/src/gui/event-editor/gcal-event-editor-dialog.c @@ -275,6 +275,9 @@ on_ask_recurrence_response_delete_cb (GcalEvent *event, { GcalEventEditorDialog *self = GCAL_EVENT_EDITOR_DIALOG (user_data); + if (mod_type == GCAL_RECURRENCE_MOD_NONE) + return; + g_signal_emit (self, signals[REMOVE_EVENT], 0, event, mod_type); clear_and_hide_dialog (self); } @@ -310,14 +313,14 @@ on_ask_recurrence_response_save_cb (GcalEvent *event, gpointer user_data) { GcalEventEditorDialog *self = GCAL_EVENT_EDITOR_DIALOG (user_data); + GcalManager *manager; - if (mod_type != GCAL_RECURRENCE_MOD_NONE) - { - GcalManager *manager = gcal_context_get_manager (self->context); + if (mod_type == GCAL_RECURRENCE_MOD_NONE) + return; - gcal_manager_update_event (manager, self->event, mod_type); - } + manager = gcal_context_get_manager (self->context); + gcal_manager_update_event (manager, self->event, mod_type); clear_and_hide_dialog (self); } |