[gnome-calendar] window: pop up recurrence-dialog only when required



commit 16bce2425e9e0353c0f7b44ae4bbac7063b57617
Author: Yash Singh <yashdev10p gmail com>
Date:   Wed Jul 12 02:15:51 2017 +0530

    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

 src/gcal-window.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index adf8594..7c94e38 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -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:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]