mirror of
https://github.com/aclist/dztui.git
synced 2026-11-22 09:29:31 +01:00
chore: abstract statusbar strings
This commit is contained in:
1 parent
ee18b9c513
commit
23637dafc9
2 files changed
+5
-3
No files matched your search
@@ -0,0 +1,2 @@
|
||||
esc_to_return = "Press ESC to return"
|
||||
question_to_return = "Press ? to return"
|
||||
@@ -1,7 +1,7 @@
|
||||
from typing import Self, Union, TYPE_CHECKING
|
||||
|
||||
from dzgui.const.enum import NotebookPage, ServerTab
|
||||
from dzgui.util.strings import esc_to_return, question_to_return
|
||||
from dzgui.strings import statusbar
|
||||
|
||||
import gi
|
||||
|
||||
@@ -70,14 +70,14 @@ class Statusbar(Gtk.Grid):
|
||||
NotebookPage.OFFLINE,
|
||||
):
|
||||
self.prior_enum = enum
|
||||
self.set_by_context(enum, esc_to_return)
|
||||
self.set_by_context(enum, statusbar.esc_to_return)
|
||||
return
|
||||
|
||||
match enum:
|
||||
case NotebookPage.HELP:
|
||||
bar = self.controller.get_help_row()
|
||||
case NotebookPage.KEYS:
|
||||
bar = question_to_return
|
||||
bar = statusbar.question_to_return
|
||||
case _:
|
||||
bar = self.prior_status
|
||||
|
||||
|
||||
Reference in new issue
Block a user