From c944689202a49c670d1f8556cc75750e361754e2 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Sun, 15 Jul 2007 03:03:38 -0500 Subject: [PATCH] Try to find parent window for error dialog --- moo/mooedit/mooeditor.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/moo/mooedit/mooeditor.c b/moo/mooedit/mooeditor.c index e4877387..8f5d6a39 100644 --- a/moo/mooedit/mooeditor.c +++ b/moo/mooedit/mooeditor.c @@ -1216,7 +1216,13 @@ moo_editor_load_file (MooEditor *editor, if (!_moo_edit_load_file (doc, filename, info->encoding, &error)) { if (!silent) + { + if (!parent && !window) + window = moo_editor_get_active_window (editor); + if (!parent && window) + parent = GTK_WIDGET (window); _moo_edit_open_error_dialog (parent, filename, info->encoding, error); + } g_error_free (error); result = FALSE; }