change: use ServerRow classmethod
Mirror to Codeberg / mirror-to-codeberg (push) Canceled after 0s

This commit is contained in:
aclist committed 2026-11-12 06:06:27 +09:00
1 parent b9cb7ec973
commit 35623b6456
1 file changed
+2 -1
+2 -1
View File
@@ -38,6 +38,7 @@ IND_QPORT = ServerRow.get_index("qport")
IND_PING = ServerRow.get_index("ping") IND_PING = ServerRow.get_index("ping")
IND_MODDED = ServerRow.get_index("modded") IND_MODDED = ServerRow.get_index("modded")
class ServerTreeView(ContextMixin, TreeView): # type: ignore class ServerTreeView(ContextMixin, TreeView): # type: ignore
def __init__( def __init__(
self, self,
@@ -107,7 +108,7 @@ class ServerTreeView(ContextMixin, TreeView): # type: ignore
if column_title in width_map: if column_title in width_map:
w = width_map[column_title] w = width_map[column_title]
column.set_fixed_width(w) column.set_fixed_width(w)
if column_title == "Ping": if i == IND_PING:
column.set_cell_data_func(renderer, self._get_ping) column.set_cell_data_func(renderer, self._get_ping)
column.connect("notify::fixed-width", self._on_col_width_changed) column.connect("notify::fixed-width", self._on_col_width_changed)