[ghex] appwin: fix function order when opening invalid file
- From: Logan Rathbone <larathbone src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ghex] appwin: fix function order when opening invalid file
- Date: Tue, 4 Jan 2022 00:58:30 +0000 (UTC)
commit d9ab8e2ff0d9021bc5a56244b1561316732d9747
Author: Logan Rathbone <poprocks gmail com>
Date: Mon Jan 3 19:56:35 2022 -0500
appwin: fix function order when opening invalid file
This fixes a few bugs that can arise when opening an invalid file when
other tabs are already open.
src/ghex-application-window.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/ghex-application-window.c b/src/ghex-application-window.c
index c948dbe..5efa7a0 100644
--- a/src/ghex-application-window.c
+++ b/src/ghex-application-window.c
@@ -2035,20 +2035,20 @@ doc_read_ready_cb (GObject *source_object,
result = hex_document_read_finish (doc, res, &local_error);
+ ghex_application_window_activate_tab (self, gh);
+
if (result)
{
refresh_dialogs (self);
- ghex_application_window_activate_tab (self, gh);
- /* FIXME - RENAME / CLEANUP */
file_loaded (doc, self);
}
else
{
+ ghex_application_window_remove_tab (self,
+ ghex_application_window_get_current_tab (self));
+
if (local_error)
{
- ghex_application_window_remove_tab (self,
- ghex_application_window_get_current_tab (self));
- show_no_file_loaded_label (self);
display_error_dialog (GTK_WINDOW(self), local_error->message);
g_error_free (local_error);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]