edit-dialog: unconditionally update event dialog
When setting an event, we might modify the event in such a way that the edit dialog can be broken if it doesn't update. Fix that by unconditionally updating the event dialog when setting an event.
This commit is contained in:
@@ -1123,12 +1123,6 @@ void
|
||||
gcal_edit_dialog_set_event (GcalEditDialog *dialog,
|
||||
GcalEvent *event)
|
||||
{
|
||||
GCAL_ENTRY;
|
||||
|
||||
g_return_if_fail (GCAL_IS_EDIT_DIALOG (dialog));
|
||||
|
||||
if (g_set_object (&dialog->event, event))
|
||||
{
|
||||
GDateTime *date_start;
|
||||
GDateTime *date_end;
|
||||
cairo_surface_t *surface;
|
||||
@@ -1136,6 +1130,12 @@ gcal_edit_dialog_set_event (GcalEditDialog *dialog,
|
||||
const gchar *summary;
|
||||
gboolean all_day;
|
||||
|
||||
GCAL_ENTRY;
|
||||
|
||||
g_return_if_fail (GCAL_IS_EDIT_DIALOG (dialog));
|
||||
|
||||
g_set_object (&dialog->event, event);
|
||||
|
||||
dialog->setting_event = TRUE;
|
||||
|
||||
/* If we just set the event to NULL, simply send a property notify */
|
||||
@@ -1224,7 +1224,6 @@ out:
|
||||
g_object_notify (G_OBJECT (dialog), "event");
|
||||
|
||||
dialog->setting_event = FALSE;
|
||||
}
|
||||
|
||||
GCAL_EXIT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user