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:
@@ -1122,12 +1122,6 @@ gcal_edit_dialog_get_event (GcalEditDialog *dialog)
|
|||||||
void
|
void
|
||||||
gcal_edit_dialog_set_event (GcalEditDialog *dialog,
|
gcal_edit_dialog_set_event (GcalEditDialog *dialog,
|
||||||
GcalEvent *event)
|
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_start;
|
||||||
GDateTime *date_end;
|
GDateTime *date_end;
|
||||||
@@ -1136,6 +1130,12 @@ gcal_edit_dialog_set_event (GcalEditDialog *dialog,
|
|||||||
const gchar *summary;
|
const gchar *summary;
|
||||||
gboolean all_day;
|
gboolean all_day;
|
||||||
|
|
||||||
|
GCAL_ENTRY;
|
||||||
|
|
||||||
|
g_return_if_fail (GCAL_IS_EDIT_DIALOG (dialog));
|
||||||
|
|
||||||
|
g_set_object (&dialog->event, event);
|
||||||
|
|
||||||
dialog->setting_event = TRUE;
|
dialog->setting_event = TRUE;
|
||||||
|
|
||||||
/* If we just set the event to NULL, simply send a property notify */
|
/* 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");
|
g_object_notify (G_OBJECT (dialog), "event");
|
||||||
|
|
||||||
dialog->setting_event = FALSE;
|
dialog->setting_event = FALSE;
|
||||||
}
|
|
||||||
|
|
||||||
GCAL_EXIT;
|
GCAL_EXIT;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user