system: remove unused function

This commit is contained in:
alfrix authored and Alfredo Monclus committed 2022-07-03 12:03:50 -03:00
1 parent 6051e51f0e
commit 431eb0058c
7 files changed
+24 -5

No files matched your search

-3
View File
@@ -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'))
+4 -2
View File
@@ -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)
+4
View File
@@ -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;
}
+4
View File
@@ -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*/
}
+4
View File
@@ -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;
}
+4
View File
@@ -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;
}
+4
View File
@@ -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;
}