mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 22:52:42 +01:00
chore: simplify controller logic
This commit is contained in:
1 parent
7a9f0dc096
commit
eb4ee41742
3 files changed
+23
-22
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user