MCPcopy Create free account
hub / github.com/BuddySirJava/SSH-Studio / __init__

Method __init__

src/ui/main_window.py:29–65  ·  view source on GitHub ↗
(self, app)

Source from the content-addressed store, hash-verified

27 welcome_view = Gtk.Template.Child()
28
29 def __init__(self, app):
30 super().__init__(
31 application=app,
32 )
33
34 self.app = app
35 self.parser = app.parser
36 self.is_dirty = False
37 self._raw_wrap_lines = False
38 self._original_width = -1
39 self._original_height = -1
40 self._last_reorder_previous = None
41
42 try:
43 if hasattr(self, "host_editor") and self.host_editor is not None:
44 self.host_editor.set_app(self)
45 except Exception:
46 pass
47
48 self._connect_signals()
49 self._load_preferences()
50 try:
51 if hasattr(self.app, "_parse_config_async"):
52 self.app._parse_config_async()
53 except Exception:
54 pass
55
56 self.connect("notify::has-focus", self._on_window_focus_changed)
57 self.connect("close-request", self._on_close_request)
58 self._show_welcome_view()
59
60 try:
61 key_controller = Gtk.EventControllerKey.new()
62 key_controller.connect("key-pressed", self._on_key_pressed)
63 self.add_controller(key_controller)
64 except Exception:
65 pass
66
67 def _set_host_editor_visible(self, visible):
68 if visible:

Callers

nothing calls this directly

Calls 5

_connect_signalsMethod · 0.95
_load_preferencesMethod · 0.95
_show_welcome_viewMethod · 0.95
set_appMethod · 0.80
_parse_config_asyncMethod · 0.80

Tested by

no test coverage detected