diff --git a/panels/system.py b/panels/system.py index da631a9e..b52d3d4d 100644 --- a/panels/system.py +++ b/panels/system.py @@ -400,6 +400,3 @@ class SystemPanel(ScreenPanel): self._screen._ws.klippy.restart_firmware() else: self._screen._ws.klippy.restart() - - def restart_ks(self, widget): - os.system("sudo systemctl restart %s" % self._config.get_main_config_option('service')) diff --git a/screen.py b/screen.py index d0012f19..b2b84d7c 100644 --- a/screen.py +++ b/screen.py @@ -344,7 +344,7 @@ class KlipperScreen(Gtk.Window): self._cur_panels.append(panel_name) logging.debug("Current panel hierarchy: %s", str(self._cur_panels)) - def show_popup_message(self, message, level=2): + def show_popup_message(self, message, level=3): if self.popup_message is not None: self.close_popup_message() @@ -353,6 +353,8 @@ class KlipperScreen(Gtk.Window): if level == 1: box.get_style_context().add_class("message_popup_echo") + elif level == 2: + box.get_style_context().add_class("message_popup_warning") else: box.get_style_context().add_class("message_popup_error") @@ -839,7 +841,7 @@ class KlipperScreen(Gtk.Window): if data.startswith("echo: "): self.show_popup_message(data[6:], 1) if data.startswith("!! "): - self.show_popup_message(data[3:], 2) + self.show_popup_message(data[3:], 3) logging.debug(json.dumps([action, data], indent=2)) self.base_panel.process_update(action, data) diff --git a/styles/base.css b/styles/base.css index 060d3389..1dfb3fcd 100644 --- a/styles/base.css +++ b/styles/base.css @@ -286,6 +286,10 @@ trough { background-color: #367554; } +.message_popup_warning, .message_popup_warning button { + background-color: #f9a825; +} + .message_popup_error, .message_popup_error button { background-color: #9e2f3a; } diff --git a/styles/colorized/style.css b/styles/colorized/style.css index 4613e19f..91da1e12 100644 --- a/styles/colorized/style.css +++ b/styles/colorized/style.css @@ -189,6 +189,10 @@ textview .time { background-color: #859900; /*solarized-green*/ } +.message_popup_warning, .message_popup_warning button { + background-color: #b58900; /*solarazed-yellow*/ +} + .message_popup_error, .message_popup_error button { background-color: #dc322f; /*solarazed-red*/ } diff --git a/styles/material-dark/style.css b/styles/material-dark/style.css index 480d39c2..d8aa0b69 100644 --- a/styles/material-dark/style.css +++ b/styles/material-dark/style.css @@ -184,6 +184,10 @@ textview .time { background-color: #006412; } +.message_popup_warning, .message_popup_warning button { + background-color: #EF6C00; +} + .message_popup_error, .message_popup_error button { background-color: #B71C1C; } diff --git a/styles/material-darker/style.css b/styles/material-darker/style.css index bcd14aa5..209ea31a 100644 --- a/styles/material-darker/style.css +++ b/styles/material-darker/style.css @@ -151,6 +151,10 @@ textview .time { background-color: #006412; } +.message_popup_warning, .message_popup_warning button { + background-color: #EF6C00; +} + .message_popup_error, .message_popup_error button { background-color: #B71C1C; } diff --git a/styles/material-light/style.css b/styles/material-light/style.css index a6ad8d72..6cb8f383 100644 --- a/styles/material-light/style.css +++ b/styles/material-light/style.css @@ -211,6 +211,10 @@ textview .time { background-color: #a1ef9a; } +.message_popup_warning, .message_popup_warning button { + background-color: #FFE082; +} + .message_popup_error, .message_popup_error button { background-color: #EF9A9A; }