修改一些默认设置

This commit is contained in:
张开科 2024-09-29 13:38:20 +08:00
parent 92646555e3
commit 595e244a7f
2 changed files with 6 additions and 25 deletions

View File

@ -263,14 +263,14 @@ class KlipperScreenConfig:
{"screen_blanking": {
"section": "main", "name": _("Screen Power Off Time"), "type": "dropdown",
"tooltip": _("Timeout for screen black-out or power-off"),
"value": "3600", "callback": screen.set_screenblanking_timeout, "options": [
"value": "off", "callback": screen.set_screenblanking_timeout, "options": [
{"name": _("Never"), "value": "off"}]
}},
{"screen_blanking_printing": {
"section": "main", "name": _("Screen Power Off Time") + " (" + _("Printing") + ")",
"type": "dropdown",
"tooltip": _("Timeout for screen black-out or power-off during printing"),
"value": "3600", "callback": screen.set_screenblanking_printing_timeout, "options": [
"value": "off", "callback": screen.set_screenblanking_printing_timeout, "options": [
{"name": _("Never"), "value": "off"}]
}},
{"24htime": {"section": "main", "name": _("24 Hour Time"), "type": "binary",
@ -279,15 +279,15 @@ class KlipperScreenConfig:
{"font_size": {
"section": "main", "name": _("Font Size"), "type": "dropdown",
"tooltip": _("Inversely affects the icon size"),
"value": "medium", "callback": screen.restart_ks, "options": [
{"name": _("Small"), "value": "small"},
{"name": _("Medium") + " " + _("(default)"), "value": "medium"},
"value": "small", "callback": screen.restart_ks, "options": [
{"name": _("Small") + " " + _("(default)"),"value": "small"},
{"name": _("Medium"), "value": "medium"},
{"name": _("Large"), "value": "large"},
{"name": _("Extra Large"), "value": "extralarge"},
{"name": _("Maximum"), "value": "max"}]}},
{"confirm_estop": {"section": "main", "name": _("Confirm Emergency Stop"), "type": "binary",
"tooltip": _("Asks for confirmation before stopping"),
"value": "False"}},
"value": "True"}},
{"only_heaters": {"section": "main", "name": _("Hide sensors in Temp."), "type": "binary",
"tooltip": _("Show only devices that are able to be set"),
"value": "False", "callback": screen.reload_panels}},

View File

@ -12,11 +12,6 @@ class Panel(ScreenPanel):
self.printers = self.settings = self.langs = {}
self.menu = ['settings_menu']
options = self._config.get_configurable_options().copy()
options.append({"printers": {
"name": _("Printer Connections"),
"type": "menu",
"menu": "printers"
}})
options.append({"lang": {
"name": _("Language"),
"type": "menu",
@ -40,18 +35,4 @@ class Panel(ScreenPanel):
}
self.add_option("lang", self.langs, lang, self.langs[lang])
self.labels['printers_menu'] = self._gtk.ScrolledWindow()
self.labels['printers'] = Gtk.Grid()
self.labels['printers_menu'].add(self.labels['printers'])
for printer in self._config.get_printers():
pname = list(printer)[0]
self.printers[pname] = {
"name": pname,
"section": f"printer {pname}",
"type": "printer",
"moonraker_host": printer[pname]['moonraker_host'],
"moonraker_port": printer[pname]['moonraker_port'],
}
self.add_option("printers", self.printers, pname, self.printers[pname])
self.content.add(self.labels['settings_menu'])