From 1fbb63f354b9713baa16d241ffc2613a2ccb8336 Mon Sep 17 00:00:00 2001 From: zkk <1007518571@qq.com> Date: Sat, 29 Jun 2024 11:30:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BE=A7=E8=BE=B9=E6=A0=8F?= =?UTF-8?q?=E7=9A=84=E5=AE=8F=E6=8C=87=E4=BB=A4=E8=8F=9C=E5=8D=95=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- panels/base_panel.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/panels/base_panel.py b/panels/base_panel.py index 75fa4e74..9546d80e 100644 --- a/panels/base_panel.py +++ b/panels/base_panel.py @@ -54,9 +54,6 @@ class BasePanel(ScreenPanel): "panel": "gcode_macros", "icon": "custom-script", } - self.control['shortcut'] = self._gtk.Button(self.shorcut['icon'], scale=abscale) - self.control['shortcut'].connect("clicked", self.menu_item_clicked, self.shorcut) - self.control['shortcut'].set_no_show_all(True) # Any action bar button should close the keyboard for item in self.control: @@ -76,7 +73,6 @@ class BasePanel(ScreenPanel): self.action_bar.add(self.control['home']) self.action_bar.add(self.control['move']) self.action_bar.add(self.control['printer_select']) - self.action_bar.add(self.control['shortcut']) self.action_bar.add(self.control['estop']) self.action_bar.add(self.control['shutdown']) self.show_printer_select(len(self._config.get_printers()) > 1) @@ -295,7 +291,7 @@ class BasePanel(ScreenPanel): def remove(self, widget): self.content.remove(widget) - def set_control_sensitive(self, value=True, control='shortcut'): + def set_control_sensitive(self, value=True, control='shutdown'): self.control[control].set_sensitive(value) def show_shortcut(self, show=True): @@ -305,7 +301,6 @@ class BasePanel(ScreenPanel): and self._printer.get_printer_status_data()["printer"]["gcode_macros"]["count"] > 0 and self._screen._cur_panels[-1] != 'printer_select' ) - self.control['shortcut'].set_visible(show) self.set_control_sensitive(self._screen._cur_panels[-1] != self.shorcut['panel']) self.set_control_sensitive(self._screen._cur_panels[-1] != self.shutdown['panel'], control='shutdown') self.set_control_sensitive(self._screen._cur_panels[-1] != self.move['panel'], control='move')