fix: clear deprecation warnings

This commit is contained in:
aclist 2026-07-27 17:41:12 +09:00
parent 64c8b905c4
commit 1527239567
4 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ class BootDialog(Gtk.Dialog):
def __init__(self, parent: "BootWindow", xdg: "Xdg", version: str) -> None:
super().__init__(
title=dialog_header,
parent=parent,
transient_for=parent,
modal=True,
)

View File

@ -13,7 +13,7 @@ class FilePicker(Gtk.FileChooserDialog):
super().__init__(
title=picker.title,
action=Gtk.FileChooserAction.SAVE,
parent=parent,
transient_for=parent,
resizable=True,
)
self.add_buttons("_Cancel", Gtk.ResponseType.CANCEL)

View File

@ -173,7 +173,7 @@ class TreeView(CursorMixin, Gtk.TreeView): # type: ignore
(model, pathlist) = sels
return (model, pathlist)
@deprecated("Currently unused")
#@deprecated("Currently unused")
# def get_mpath(self) -> Optional[Gtk.TreePath]:
# (model, pathlist) = self.get_model_and_pathlist()
# if len(pathlist) < 1:

View File

@ -53,7 +53,7 @@ class LogTreeView(ContextMixin, TreeView): # type: ignore
model = ModelFactory().new_model_from_logfile(filepath)
_filter = model.filter_new()
_filter.set_visible_func(self._filter_rows)
sortable = Gtk.TreeModelSort(_filter)
sortable = Gtk.TreeModelSort.new_with_model(_filter)
self.set_model(sortable)
_filter.refilter()
path = Gtk.TreePath.new_from_indices([0])