chore: simplify controller logic

This commit is contained in:
aclist committed 2026-05-01 21:01:28 +09:00
1 parent 7a9f0dc096
commit eb4ee41742
3 files changed
+23 -22

No files matched your search

+6
View File
@@ -30,6 +30,7 @@ logger = logging.getLogger(APP_NAME)
if TYPE_CHECKING:
from dzgui.controllers.mc import Controller
from dzgui.controllers.emitter import Emitter
from dzgui.model.model_factory import FastInsertListStore
QUEUE_CHECK_DELAY = 200
@@ -316,6 +317,11 @@ class ServerTreeView(ContextMixin, TreeView):
def set_loaded(self, status: bool) -> None:
self.loaded = status
def get_model_and_control_model(self) -> tuple["FastInsertListStore", list[Any]]:
model = self.get_model()
control = self.proxy_man.get_control()
return model, control
@staticmethod
def ping_server(
model, _iter: Gtk.TreeIter, ip: str, qport: int, ping_column: int