window: pop up recurrence-dialog only when required

Earlier, the recurrence-dialog would pop up even when user only
wanted to change the recurrence-property of an already recurring
event. This is incorrect behavior.

This patch fixes this issue by making sure that recurrence-dialog
doesn't pop up when the new recurrence-property chosen by the
user is different from what the event already has. In this case,
the user only wants to change the recurence-property of the event
and there's no use of the recurrence-dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=782755
This commit is contained in:
Yash Singh
2017-07-13 13:32:55 -03:00
committed by Georges Basile Stavracas Neto
parent 067e8ae765
commit 16bce2425e
+7 -4
View File
@@ -1098,15 +1098,18 @@ edit_dialog_closed (GtkDialog *dialog,
mod = E_CAL_OBJ_MOD_THIS;
source = gcal_event_get_source (event);
if (response != GCAL_RESPONSE_CREATE_EVENT &&
response != GTK_RESPONSE_CANCEL &&
response != GTK_RESPONSE_DELETE_EVENT &&
if (!gcal_edit_dialog_get_recurrence_changed (edit_dialog) &&
gcal_event_has_recurrence (event) &&
!ask_recurrence_modification_type (GTK_WIDGET (dialog), &mod, source))
(response != GCAL_RESPONSE_CREATE_EVENT &&
response != GTK_RESPONSE_CANCEL &&
response != GTK_RESPONSE_DELETE_EVENT &&
gcal_event_has_recurrence (event) &&
!ask_recurrence_modification_type (GTK_WIDGET (dialog), &mod, source)))
{
return;
}
switch (response)
{
case GCAL_RESPONSE_CREATE_EVENT: