Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
-
26b53576
by wurstsalat at 2022-02-03T14:02:52+01:00
-
e9a56ab2
by wurstsalat at 2022-02-03T14:15:28+01:00
2 changed files:
Changes:
| ... | ... | @@ -174,4 +174,7 @@ def _on_key_press(self, |
| 174 | 174 |
self.destroy()
|
| 175 | 175 |
|
| 176 | 176 |
def _on_destroy(self, _widget: GroupchatDetails) -> None:
|
| 177 |
+ app.ged.remove_event_handler('muc-disco-update',
|
|
| 178 |
+ ged.GUI1,
|
|
| 179 |
+ self._on_muc_disco_update)
|
|
| 177 | 180 |
app.check_finalize(self)
|
| ... | ... | @@ -99,6 +99,7 @@ def __init__(self) -> None: |
| 99 | 99 |
self.show_all()
|
| 100 | 100 |
|
| 101 | 101 |
self.connect('key_press_event', self._on_key_press)
|
| 102 |
+ self.connect('destroy', self._on_destroy)
|
|
| 102 | 103 |
self._ui.connect_signals(self)
|
| 103 | 104 |
|
| 104 | 105 |
self.register_events([
|
| ... | ... | @@ -107,6 +108,10 @@ def __init__(self) -> None: |
| 107 | 108 |
('style-changed', ged.GUI1, self._on_style_changed)
|
| 108 | 109 |
])
|
| 109 | 110 |
|
| 111 |
+ def _on_destroy(self, *args: Any) -> None:
|
|
| 112 |
+ self._ui.popover.destroy()
|
|
| 113 |
+ app.check_finalize(self)
|
|
| 114 |
+ |
|
| 110 | 115 |
def _get_style_scheme(self) -> Optional[GtkSource.StyleScheme]:
|
| 111 | 116 |
if app.css_config.prefer_dark:
|
| 112 | 117 |
style_scheme = self._style_scheme_manager.get_scheme(
|
| ... | ... | @@ -227,7 +232,8 @@ def _on_send(self, *args: Any) -> None: |
| 227 | 232 |
# stream management
|
| 228 | 233 |
node = nbxmpp.Protocol(node=stanza,
|
| 229 | 234 |
attrs={'xmlns': 'jabber:client'})
|
| 230 |
- app.connections[self._selected_send_account].connection.send(node)
|
|
| 235 |
+ client = app.get_client(self._selected_send_account)
|
|
| 236 |
+ client.connection.send(node)
|
|
| 231 | 237 |
self.last_stanza = stanza
|
| 232 | 238 |
buffer_.set_text('')
|
| 233 | 239 |
|