[gnome-calendar/gnome-3-22] window: properly unref edit dialog's event
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/gnome-3-22] window: properly unref edit dialog's event
- Date: Fri, 28 Apr 2017 21:31:58 +0000 (UTC)
commit ba768c7c101792ad429b0ab45d1e5cb0cf31c510
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Apr 28 18:22:46 2017 -0300
window: properly unref edit dialog's event
We were appearently unreferencing the same event
twice when responding to Edit dialog's signal.
Fix that by only cleaning the event after using
it.
https://bugzilla.gnome.org/show_bug.cgi?id=781071
src/gcal-edit-dialog.c | 2 --
src/gcal-window.c | 3 ++-
2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index 34dd1e7..f3eb2f9 100644
--- a/src/gcal-edit-dialog.c
+++ b/src/gcal-edit-dialog.c
@@ -691,8 +691,6 @@ gcal_edit_dialog_action_button_clicked (GtkWidget *widget,
gtk_dialog_response (GTK_DIALOG (dialog),
dialog->event_is_new ? GCAL_RESPONSE_CREATE_EVENT : GCAL_RESPONSE_SAVE_EVENT);
}
-
- gcal_edit_dialog_set_event (dialog, NULL);
}
static void
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 85c799f..1418569 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -1102,7 +1102,6 @@ edit_dialog_closed (GtkDialog *dialog,
event = gcal_edit_dialog_get_event (edit_dialog);
view = GCAL_VIEW (window->views[window->active_view]);
- gcal_edit_dialog_set_event (edit_dialog, NULL);
gtk_widget_hide (GTK_WIDGET (dialog));
switch (response)
@@ -1149,6 +1148,8 @@ edit_dialog_closed (GtkDialog *dialog,
break;
}
+
+ gcal_edit_dialog_set_event (edit_dialog, NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]