[gnome-text-editor] savechangesdialog: ensure we always have dialog pointer
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-text-editor] savechangesdialog: ensure we always have dialog pointer
- Date: Sun, 1 Aug 2021 16:50:53 +0000 (UTC)
commit 45e3c3d67d4c010d1fa8cc7afab9284be0dca160
Author: Christian Hergert <chergert redhat com>
Date: Sun Aug 1 09:45:41 2021 -0700
savechangesdialog: ensure we always have dialog pointer
This makes it easier to get the parent window using :transient-for.
src/editor-save-changes-dialog.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/editor-save-changes-dialog.c b/src/editor-save-changes-dialog.c
index 191b91b..929be9d 100644
--- a/src/editor-save-changes-dialog.c
+++ b/src/editor-save-changes-dialog.c
@@ -378,7 +378,8 @@ _editor_save_changes_dialog_run_async (GtkWindow *parent,
g_return_if_fail (!parent || GTK_IS_WINDOW (parent));
g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
- task = g_task_new (NULL, cancellable, callback, user_data);
+ dialog = _editor_save_changes_dialog_new (parent, pages);
+ task = g_task_new (dialog, cancellable, callback, user_data);
g_task_set_source_tag (task, _editor_save_changes_dialog_run_async);
if (pages == NULL || pages->len == 0)
@@ -387,7 +388,6 @@ _editor_save_changes_dialog_run_async (GtkWindow *parent,
return;
}
- dialog = _editor_save_changes_dialog_new (parent, pages);
g_object_set_data_full (G_OBJECT (dialog),
"TASK",
g_steal_pointer (&task),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]