Try to find parent window for error dialog

This commit is contained in:
Yevgen Muntyan 2007-07-15 03:03:38 -05:00
parent 84513fbc9d
commit c944689202

View File

@ -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;
}