[gnome-calendar] edit-dialog: check if event is new the right way
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] edit-dialog: check if event is new the right way
- Date: Tue, 22 Nov 2016 11:54:52 +0000 (UTC)
commit 6cf5c0317d7f11298e5b30e3b7f4c01747b78834
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Tue Nov 22 12:53:51 2016 +0530
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 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index 749034e..34dd1e7 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]