(self, app)
| 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: |
nothing calls this directly
no test coverage detected