mirror of
https://github.com/aclist/dztui.git
synced 2026-08-27 18:27:07 +02:00
Merge branch 'dzgui7' into feat/launch-offline
Some checks failed
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled
Some checks failed
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled
This commit is contained in:
commit
d305f47bb9
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user