mirror of
https://github.com/aclist/dztui.git
synced 2026-10-31 15:12:48 +01:00
chore: consolidate legacy methods
This commit is contained in:
1 parent
61735d20cf
commit
48f69d79e0
4 files changed
+12
-29
No files matched your search
@@ -215,22 +215,6 @@ class ProxyModelManager:
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.filter_cache[filters] = (model, rows)
|
self.filter_cache[filters] = (model, rows)
|
||||||
|
|
||||||
@deprecated("legacy logic")
|
|
||||||
def resync_model(self, addr: str, qport: int) -> None:
|
|
||||||
"""
|
|
||||||
Handle in-situ updates to model during
|
|
||||||
row deletion/insertion actions. Skipped for ephemeral
|
|
||||||
actions like player count/ping updates
|
|
||||||
"""
|
|
||||||
for row in self.control_model:
|
|
||||||
if row[7] == addr and row[8] == qport:
|
|
||||||
self.control_model.remove(row)
|
|
||||||
|
|
||||||
self.wipe_cache()
|
|
||||||
filters = self.get_filters()
|
|
||||||
refiltered = self.filter_toggle_on(filters)
|
|
||||||
self.set_filtered(refiltered)
|
|
||||||
|
|
||||||
@deprecated("Currently unused")
|
@deprecated("Currently unused")
|
||||||
def convert_model_to_list(self, model: "FastInsertListStore") -> list:
|
def convert_model_to_list(self, model: "FastInsertListStore") -> list:
|
||||||
return [[el for el in row] for row in model]
|
return [[el for el in row] for row in model]
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
import gi
|
|
||||||
gi.require_version("Gtk", "3.0")
|
|
||||||
from gi.repository import Gtk # noqa E402
|
|
||||||
|
|
||||||
class LeftLabel(Gtk.Label):
|
|
||||||
def __init__(self, text: str, tooltip: str = ""):
|
|
||||||
super().__init__(
|
|
||||||
label=text,
|
|
||||||
halign=Gtk.Align.START,
|
|
||||||
)
|
|
||||||
self.set_tooltip_text(tooltip)
|
|
||||||
pass
|
|
||||||
@@ -1,12 +1,23 @@
|
|||||||
from dzgui.util.format import embolden
|
from dzgui.util.format import embolden
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
|
|
||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "3.0")
|
||||||
from gi.repository import Gtk # noqa E402
|
from gi.repository import Gtk # noqa E402
|
||||||
|
|
||||||
|
|
||||||
class BoldLabel(Gtk.Label):
|
class BoldLabel(Gtk.Label):
|
||||||
def __init__(self, text: str):
|
def __init__(self, text: str):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
label = embolden(text)
|
label = embolden(text)
|
||||||
self.set_markup(label)
|
self.set_markup(label)
|
||||||
|
|
||||||
|
|
||||||
|
class LeftLabel(Gtk.Label):
|
||||||
|
def __init__(self, text: str, tooltip: str = ""):
|
||||||
|
super().__init__(
|
||||||
|
label=text,
|
||||||
|
halign=Gtk.Align.START,
|
||||||
|
)
|
||||||
|
self.set_tooltip_text(tooltip)
|
||||||
@@ -6,7 +6,7 @@ from dzgui.api.steam import find_user_id
|
|||||||
from dzgui.config import query
|
from dzgui.config import query
|
||||||
from dzgui.util import strings, css, open_links
|
from dzgui.util import strings, css, open_links
|
||||||
|
|
||||||
from dzgui.views.components.label import LeftLabel
|
from dzgui.views.components.labels import LeftLabel
|
||||||
from dzgui.views.components.eventbox import InfoEventBox
|
from dzgui.views.components.eventbox import InfoEventBox
|
||||||
from dzgui.views.components.buttons import WebButton
|
from dzgui.views.components.buttons import WebButton
|
||||||
from dzgui.views.dialogs.generic import ExceptionDialog
|
from dzgui.views.dialogs.generic import ExceptionDialog
|
||||||
|
|||||||
Reference in new issue
Block a user