From 6cf5c0317d7f11298e5b30e3b7f4c01747b78834 Mon Sep 17 00:00:00 2001 From: Mohammed Sadiq Date: Tue, 22 Nov 2016 12:53:51 +0530 Subject: [PATCH] edit-dialog: check if event is new the right way Checking if a new event is already having a source succeeds for some reason (which should actually fail). But thankfully we already have an event_is_new gboolean flag. Check the status of that flag and add or update the event. https://bugzilla.gnome.org/show_bug.cgi?id=771566 --- src/gcal-edit-dialog.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c index 749034e6..34dd1e78 100644 --- a/src/gcal-edit-dialog.c +++ b/src/gcal-edit-dialog.c @@ -673,12 +673,7 @@ gcal_edit_dialog_action_button_clicked (GtkWidget *widget, if (dialog->selected_source && gcal_event_get_source (dialog->event) != dialog->selected_source) { - /* - * When we're creating the event, it has no source set, so we simply - * set the source. When editing the event, however, we're actually - * moving it from one source to another. - */ - if (!gcal_event_get_source (dialog->event)) + if (dialog->event_is_new) { gcal_event_set_source (dialog->event, dialog->selected_source); }