mirror of
https://github.com/aclist/dztui.git
synced 2026-08-27 02:07:18 +02:00
chore: consolidate legacy methods
This commit is contained in:
parent
61735d20cf
commit
48f69d79e0
@ -215,22 +215,6 @@ class ProxyModelManager:
|
||||
) -> None:
|
||||
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")
|
||||
def convert_model_to_list(self, model: "FastInsertListStore") -> list:
|
||||
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
|
||||
|
||||
import gi
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gtk # noqa E402
|
||||
|
||||
|
||||
class BoldLabel(Gtk.Label):
|
||||
def __init__(self, text: str):
|
||||
super().__init__()
|
||||
|
||||
label = embolden(text)
|
||||
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.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.buttons import WebButton
|
||||
from dzgui.views.dialogs.generic import ExceptionDialog
|
||||
|
||||
Loading…
Reference in New Issue
Block a user