mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 06:32:53 +01:00
feat: write settings to config file
This commit is contained in:
1 parent
a77697eec0
commit
ea2d1d7e9f
5 files changed
+128
-51
No files matched your search
@@ -0,0 +1,35 @@
|
||||
from dzgui.strings import options
|
||||
from dzgui.const.constants import FLATPAK_RUN_CMD, FLATPAK_SANDBOX, STEAM_CMD
|
||||
|
||||
import gi
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gtk # noqa
|
||||
|
||||
|
||||
class ClientCombo(Gtk.ComboBox):
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
|
||||
self.client_store = Gtk.ListStore(str, str)
|
||||
clients = (
|
||||
(
|
||||
options.steam_combo,
|
||||
STEAM_CMD,
|
||||
),
|
||||
(
|
||||
options.flatpak_combo,
|
||||
FLATPAK_RUN_CMD,
|
||||
),
|
||||
(
|
||||
options.flatpak_container_combo,
|
||||
FLATPAK_SANDBOX,
|
||||
),
|
||||
)
|
||||
for client in clients:
|
||||
self.client_store.append(client)
|
||||
self.set_model(self.client_store) # Text()
|
||||
renderer_text = Gtk.CellRendererText()
|
||||
self.pack_start(renderer_text, True)
|
||||
self.add_attribute(renderer_text, "text", 0)
|
||||
self.set_active(0)
|
||||
Reference in new issue
Block a user