mirror of
https://github.com/aclist/dztui.git
synced 2026-10-31 07:02:50 +01:00
fix: use Gtk.TreePath
This commit is contained in:
1 parent
e51b4270e2
commit
d29f4a91b2
1 file changed
+8
-8
@@ -6,6 +6,7 @@ from gi.repository import Gtk
|
|||||||
|
|
||||||
from dataclasses import fields
|
from dataclasses import fields
|
||||||
from typing import Union, TYPE_CHECKING
|
from typing import Union, TYPE_CHECKING
|
||||||
|
|
||||||
from dzgui.const.enum import NotebookPage
|
from dzgui.const.enum import NotebookPage
|
||||||
from dzgui.util.strings import developers
|
from dzgui.util.strings import developers
|
||||||
from dzgui.util.css import add_class
|
from dzgui.util.css import add_class
|
||||||
@@ -15,13 +16,11 @@ if TYPE_CHECKING:
|
|||||||
from dzgui.config.userprefs import UserPrefs
|
from dzgui.config.userprefs import UserPrefs
|
||||||
from dzgui.config.xdg import Xdg
|
from dzgui.config.xdg import Xdg
|
||||||
|
|
||||||
"""
|
|
||||||
Shows TreeViews displaying contents of parsed XDG paths and user preferences
|
|
||||||
"""
|
|
||||||
|
|
||||||
# TODO: make scrollable, test long values/wrapping
|
|
||||||
|
|
||||||
class Developers(Gtk.Box):
|
class Developers(Gtk.Box):
|
||||||
|
"""
|
||||||
|
Shows TreeViews displaying contents of parsed XDG paths
|
||||||
|
and user preferences
|
||||||
|
"""
|
||||||
def __init__(self, controller: "Controller") -> None:
|
def __init__(self, controller: "Controller") -> None:
|
||||||
super().__init__(
|
super().__init__(
|
||||||
orientation=Gtk.Orientation.VERTICAL,
|
orientation=Gtk.Orientation.VERTICAL,
|
||||||
@@ -47,8 +46,9 @@ class Developers(Gtk.Box):
|
|||||||
prefs_tree = self._make_tree(self.controller.prefs)
|
prefs_tree = self._make_tree(self.controller.prefs)
|
||||||
trees_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=10)
|
trees_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=10)
|
||||||
|
|
||||||
paths_tree.set_cursor(0)
|
path = Gtk.TreePath.new_from_indices([0])
|
||||||
prefs_tree.set_cursor(0)
|
paths_tree.set_cursor(path)
|
||||||
|
prefs_tree.set_cursor(path)
|
||||||
|
|
||||||
for el in [
|
for el in [
|
||||||
paths_label,
|
paths_label,
|
||||||
|
|||||||
Reference in new issue
Block a user