chore: abstract statusbar strings

This commit is contained in:
aclist committed 2026-11-22 14:43:14 +09:00
1 parent ee18b9c513
commit 23637dafc9
2 files changed
+5 -3

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
esc_to_return = "Press ESC to return"
question_to_return = "Press ? to return"
+3 -3
View File
@@ -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