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
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
2c0cd4a91c
commit
6cf5c0317d
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user