mirror of
https://github.com/aclist/dztui.git
synced 2026-08-27 10:17:31 +02:00
change: enable empty/full filters on first run of LAN page
This commit is contained in:
parent
3dc58c1a69
commit
302a43e65e
@ -47,7 +47,13 @@ class ServerNotebook(Gtk.ScrolledWindow):
|
||||
self.recent = ServerTreeView(
|
||||
controller, ServerTab.RECENT, ContextMenuGroup.RECENT
|
||||
)
|
||||
self.lan = ServerTreeView(controller, ServerTab.LAN, ContextMenuGroup.SCAN_LAN)
|
||||
self.lan = ServerTreeView(
|
||||
controller,
|
||||
ServerTab.LAN,
|
||||
ContextMenuGroup.SCAN_LAN,
|
||||
show_empty=True,
|
||||
show_full=True,
|
||||
)
|
||||
|
||||
tabs = [
|
||||
(self.browser, server_labels.browser),
|
||||
|
||||
@ -38,7 +38,12 @@ QUEUE_CHECK_DELAY = 200
|
||||
|
||||
class ServerTreeView(ContextMixin, TreeView): # type: ignore
|
||||
def __init__(
|
||||
self, controller: "Controller", enum: ServerTab, menu: ContextMenuGroup
|
||||
self,
|
||||
controller: "Controller",
|
||||
enum: ServerTab,
|
||||
menu: ContextMenuGroup,
|
||||
show_empty: bool = False,
|
||||
show_full: bool = False,
|
||||
) -> None:
|
||||
super().__init__(controller, menu=menu)
|
||||
|
||||
@ -48,7 +53,7 @@ class ServerTreeView(ContextMixin, TreeView): # type: ignore
|
||||
|
||||
self.loaded = False
|
||||
|
||||
self.filter_man = FilterManager()
|
||||
self.filter_man = FilterManager(show_empty, show_full)
|
||||
self.proxy_man = ProxyModelManager(self.filter_man)
|
||||
model = self.proxy_man.get_proxy_model()
|
||||
self.set_model(model)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user