diff --git a/dzgui/views/components/statusbar.py b/dzgui/views/components/statusbar.py index b301d09..7eb75a3 100644 --- a/dzgui/views/components/statusbar.py +++ b/dzgui/views/components/statusbar.py @@ -25,6 +25,8 @@ class Statusbar(Gtk.Grid): self.controller.register_widget("statusbar", self) self.emitter = controller.get_emitter() + self.prior_enum: NotebookPage + self.prior_status: str self.playercount = "" self.statusbar = Gtk.Statusbar() @@ -71,6 +73,7 @@ class Statusbar(Gtk.Grid): NotebookPage.CONNECTION, NotebookPage.OFFLINE, ): + self.prior_enum = enum self.set_by_context(enum, esc_to_return) return @@ -80,8 +83,9 @@ class Statusbar(Gtk.Grid): case NotebookPage.KEYS: bar = question_to_return case _: - return + bar = self.prior_status + self.prior_enum = enum self.set_by_context(enum, bar) def _on_server_row_changed(self, statusbar: Self) -> None: @@ -97,6 +101,10 @@ class Statusbar(Gtk.Grid): context: Union["ServerTab", NotebookPage], ) -> None: self.spinner.stop() + + if type(context) is NotebookPage: + self.prior_enum = context + self.prior_status = "" # FIXME: CalcDist is being called when table is not loaded if dist is None: self.set_by_context(context, "") @@ -122,6 +130,8 @@ class Statusbar(Gtk.Grid): def set_by_context( self, context: Union[NotebookPage, "ServerTab"], string: str ) -> None: + if context != NotebookPage.KEYS: + self.prior_status = string meta = self.statusbar.get_context_id(str(context)) self.statusbar.push(meta, string) self.set_cache(string) diff --git a/dzgui/views/pages/preconnect.py b/dzgui/views/pages/preconnect.py index fdce9a4..aa1dc15 100644 --- a/dzgui/views/pages/preconnect.py +++ b/dzgui/views/pages/preconnect.py @@ -333,10 +333,7 @@ class PreConnectionAssistant(Gtk.Box): self.connect_last.hide() self._process_warnings(prereqs) - if self.tree.is_visible(): - self.tree.grab_focus() - else: - self.grab_focus() + self.tree.grab_focus() def mark_finished(self) -> None: self.mod_count.set_label(preconnect.all_updated) diff --git a/pyproject.toml b/pyproject.toml index 17af853..8e1cddc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ description = "DayZ server browser and mod manager for Linux" authors = [ {name = "aclist"} ] -version = "7.0.0b12" +version = "7.0.0b11" license = "GPL-3.0-or-later" license-files = ["LICENSE"] readme = "README.md"