mirror of
https://github.com/aclist/dztui.git
synced 2026-10-31 07:02:50 +01:00
fix: indentation level
This commit is contained in:
1 parent
07c98594e1
commit
c4878ad97c
2 files changed
+14
-14
No files matched your search
+13
-13
@@ -304,19 +304,19 @@ class App(Gtk.Application):
|
|||||||
self._setup_signals()
|
self._setup_signals()
|
||||||
Gtk.main()
|
Gtk.main()
|
||||||
|
|
||||||
def _setup_signals(self) -> None:
|
def _setup_signals(self) -> None:
|
||||||
SIGNAL_ADD = "signal_add"
|
SIGNAL_ADD = "signal_add"
|
||||||
SIGNAL_ADD_FULL = "signal_add_full"
|
SIGNAL_ADD_FULL = "signal_add_full"
|
||||||
try:
|
try:
|
||||||
if SIGNAL_ADD in dir(GLibUnix):
|
if SIGNAL_ADD in dir(GLibUnix):
|
||||||
func = GLibUnix.signal_add
|
func = GLibUnix.signal_add
|
||||||
elif SIGNAL_ADD_FULL in dir(GLibUnix):
|
elif SIGNAL_ADD_FULL in dir(GLibUnix):
|
||||||
func = GLibUnix.signal_add_full
|
func = GLibUnix.signal_add_full
|
||||||
else:
|
else:
|
||||||
func = GLib.unix_signal_add
|
func = GLib.unix_signal_add
|
||||||
func(GLib.PRIORITY_DEFAULT, signal.SIGINT, self._catch_sigint)
|
func(GLib.PRIORITY_DEFAULT, signal.SIGINT, self._catch_sigint)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.critical(e)
|
logger.critical(e)
|
||||||
|
|
||||||
def _catch_sigint(self) -> Literal[True]:
|
def _catch_sigint(self) -> Literal[True]:
|
||||||
self.win.halt_proc_and_quit()
|
self.win.halt_proc_and_quit()
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class RightPanel(Gtk.Box):
|
|||||||
def _on_servers_loaded(self, emitter: "Emitter", context: "ServerTab") -> None:
|
def _on_servers_loaded(self, emitter: "Emitter", context: "ServerTab") -> None:
|
||||||
# TODO: similar logic on notebook page change
|
# TODO: similar logic on notebook page change
|
||||||
state = self.controller.has_server_model()
|
state = self.controller.has_server_model()
|
||||||
for widget in (self.refresh_button, self.filters_vbox):
|
for widget in self.filters_vbox:
|
||||||
widget.set_sensitive(state)
|
widget.set_sensitive(state)
|
||||||
|
|
||||||
def _on_version_clicked(self, widget: Gtk.EventBox, event: Gdk.EventButton) -> None:
|
def _on_version_clicked(self, widget: Gtk.EventBox, event: Gdk.EventButton) -> None:
|
||||||
|
|||||||
Reference in new issue
Block a user