Merge pull request #418 from aclist/fix/deprecation-warnings

fix: clear deprecation warnings
This commit is contained in:
aclist committed 2026-07-27 20:14:30 +09:00
commit 7b57f95f5f
5 files changed
+6 -7

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ class BootDialog(Gtk.Dialog):
def __init__(self, parent: "BootWindow", xdg: "Xdg", version: str) -> None: def __init__(self, parent: "BootWindow", xdg: "Xdg", version: str) -> None:
super().__init__( super().__init__(
title=dialog_header, title=dialog_header,
parent=parent, transient_for=parent,
modal=True, modal=True,
) )
+1 -1
View File
@@ -13,7 +13,7 @@ class FilePicker(Gtk.FileChooserDialog):
super().__init__( super().__init__(
title=picker.title, title=picker.title,
action=Gtk.FileChooserAction.SAVE, action=Gtk.FileChooserAction.SAVE,
parent=parent, transient_for=parent,
resizable=True, resizable=True,
) )
self.add_buttons("_Cancel", Gtk.ResponseType.CANCEL) self.add_buttons("_Cancel", Gtk.ResponseType.CANCEL)
+2 -3
View File
@@ -1,7 +1,6 @@
import logging import logging
from typing import Any, Optional, TYPE_CHECKING from typing import Any, Optional, TYPE_CHECKING
from warnings import deprecated
from dzgui.const.constants import APP_NAME, SEPARATOR from dzgui.const.constants import APP_NAME, SEPARATOR
from dzgui.util.keys import is_ctrl_mask, is_navkey from dzgui.util.keys import is_ctrl_mask, is_navkey
@@ -173,7 +172,7 @@ class TreeView(CursorMixin, Gtk.TreeView): # type: ignore
(model, pathlist) = sels (model, pathlist) = sels
return (model, pathlist) return (model, pathlist)
@deprecated("Currently unused") # @deprecated("Currently unused")
# def get_mpath(self) -> Optional[Gtk.TreePath]: # def get_mpath(self) -> Optional[Gtk.TreePath]:
# (model, pathlist) = self.get_model_and_pathlist() # (model, pathlist) = self.get_model_and_pathlist()
# if len(pathlist) < 1: # if len(pathlist) < 1:
@@ -195,7 +194,7 @@ class TreeView(CursorMixin, Gtk.TreeView): # type: ignore
return True return True
return False return False
@deprecated("unused") # @deprecated("unused")
# def get_selected_row(self) -> Optional[Gtk.TreeModelRow]: # def get_selected_row(self) -> Optional[Gtk.TreeModelRow]:
# ind = self.get_selected_row_index() # ind = self.get_selected_row_index()
# model = self.get_model() # model = self.get_model()
+1 -1
View File
@@ -53,7 +53,7 @@ class LogTreeView(ContextMixin, TreeView): # type: ignore
model = ModelFactory().new_model_from_logfile(filepath) model = ModelFactory().new_model_from_logfile(filepath)
_filter = model.filter_new() _filter = model.filter_new()
_filter.set_visible_func(self._filter_rows) _filter.set_visible_func(self._filter_rows)
sortable = Gtk.TreeModelSort(_filter) sortable = Gtk.TreeModelSort.new_with_model(_filter)
self.set_model(sortable) self.set_model(sortable)
_filter.refilter() _filter.refilter()
path = Gtk.TreePath.new_from_indices([0]) path = Gtk.TreePath.new_from_indices([0])
+1 -1
View File
@@ -4,7 +4,7 @@ description = "DayZ server browser and mod manager for Linux"
authors = [ authors = [
{name = "aclist"} {name = "aclist"}
] ]
version = "7.0.0b19" version = "7.0.0b20"
license = "GPL-3.0-or-later" license = "GPL-3.0-or-later"
license-files = ["LICENSE"] license-files = ["LICENSE"]
readme = "README.md" readme = "README.md"