mirror of
https://github.com/aclist/dztui.git
synced 2026-08-29 19:27:13 +02:00
chore: suppress branch switching behavior (WIP)
This commit is contained in:
parent
7139686d9b
commit
676f2ac12f
@ -130,17 +130,17 @@ class Options(Gtk.Box):
|
|||||||
self.dayz_version_label = Gtk.Label(label=strings.null)
|
self.dayz_version_label = Gtk.Label(label=strings.null)
|
||||||
self.dayz_exp_version_label = Gtk.Label(label=strings.null)
|
self.dayz_exp_version_label = Gtk.Label(label=strings.null)
|
||||||
|
|
||||||
self.branch_combo = Gtk.ComboBoxText()
|
#self.branch_combo = Gtk.ComboBoxText()
|
||||||
self.branch_combo.append_text(strings.options.stable)
|
#self.branch_combo.append_text(strings.options.stable)
|
||||||
self.branch_combo.append_text(strings.options.testing)
|
#self.branch_combo.append_text(strings.options.testing)
|
||||||
self.branch_combo.set_active(0)
|
#self.branch_combo.set_active(0)
|
||||||
self.branch_combo.connect("changed", self._on_branch_changed)
|
#self.branch_combo.connect("changed", self._on_branch_changed)
|
||||||
self.branch_eb = InfoEventBox("", controller)
|
#self.branch_eb = InfoEventBox("", controller)
|
||||||
|
|
||||||
version_rows = [
|
version_rows = [
|
||||||
[LeftLabel(APPNAME_DAYZ), self.dayz_version_label],
|
[LeftLabel(APPNAME_DAYZ), self.dayz_version_label],
|
||||||
[LeftLabel(APPNAME_DAYZ_EXP), self.dayz_exp_version_label],
|
[LeftLabel(APPNAME_DAYZ_EXP), self.dayz_exp_version_label],
|
||||||
[LeftLabel(strings.options.branch), self.branch_combo, self.branch_eb],
|
#[LeftLabel(strings.options.branch), self.branch_combo, self.branch_eb],
|
||||||
]
|
]
|
||||||
|
|
||||||
api_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
api_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||||
@ -428,8 +428,6 @@ class Options(Gtk.Box):
|
|||||||
dialog = ExceptionDialog(self.controller, strings.config_not_found)
|
dialog = ExceptionDialog(self.controller, strings.config_not_found)
|
||||||
dialog.run()
|
dialog.run()
|
||||||
raise Exception
|
raise Exception
|
||||||
# FIXME: return to main menu
|
|
||||||
return
|
|
||||||
|
|
||||||
config = query.get_config(prefs.paths.config)
|
config = query.get_config(prefs.paths.config)
|
||||||
name = config["name"]
|
name = config["name"]
|
||||||
@ -489,23 +487,24 @@ class Options(Gtk.Box):
|
|||||||
# TODO: not happy with this
|
# TODO: not happy with this
|
||||||
active_combo = query.get_client_index(config["client"])
|
active_combo = query.get_client_index(config["client"])
|
||||||
self.client_combo.set_active(active_combo)
|
self.client_combo.set_active(active_combo)
|
||||||
|
active_combo = 0
|
||||||
|
|
||||||
active_combo = 1 if config["branch"] == BETA_REPO else 0
|
#active_combo = 1 if config["branch"] == BETA_REPO else 0
|
||||||
|
|
||||||
self.controller.suppress_signal(
|
#self.controller.suppress_signal(
|
||||||
self, self.branch_combo, "_on_branch_changed", True
|
# self, self.branch_combo, "_on_branch_changed", True
|
||||||
)
|
#)
|
||||||
self.branch_combo.set_active(active_combo)
|
#self.branch_combo.set_active(active_combo)
|
||||||
self.branch_combo.set_sensitive(prefs.allow_updates)
|
#self.branch_combo.set_sensitive(prefs.allow_updates)
|
||||||
self.controller.suppress_signal(
|
#self.controller.suppress_signal(
|
||||||
self, self.branch_combo, "_on_branch_changed", False
|
# self, self.branch_combo, "_on_branch_changed", False
|
||||||
)
|
#)
|
||||||
|
|
||||||
if prefs.allow_updates is True:
|
#if prefs.allow_updates is True:
|
||||||
msg = strings.options.self_update
|
# msg = strings.options.self_update
|
||||||
else:
|
#else:
|
||||||
msg = strings.options.no_self_update
|
# msg = strings.options.no_self_update
|
||||||
self.branch_eb.set_text(msg)
|
#self.branch_eb.set_text(msg)
|
||||||
|
|
||||||
def _suppress_toggles(self, state: bool) -> None:
|
def _suppress_toggles(self, state: bool) -> None:
|
||||||
for toggle in [
|
for toggle in [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user