Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
d896101a
by Philipp Hörist at 2023-05-22T20:47:54+00:00
4 changed files:
- gajim/gtk/chat_banner.py
- gajim/gtk/chat_list_row.py
- gajim/gtk/groupchat_details.py
- gajim/gtk/groupchat_manage.py
Changes:
| ... | ... | @@ -221,7 +221,6 @@ def _on_muc_disco_update(self, event: MucDiscoUpdate) -> None: |
| 221 | 221 | if event.jid != self._contact.jid:
|
| 222 | 222 | return
|
| 223 | 223 | |
| 224 | - self._update_avatar()
|
|
| 225 | 224 | self._update_name_label()
|
| 226 | 225 | self._update_description_label()
|
| 227 | 226 |
| ... | ... | @@ -30,11 +30,9 @@ |
| 30 | 30 | from nbxmpp import JID
|
| 31 | 31 | |
| 32 | 32 | from gajim.common import app
|
| 33 | -from gajim.common import ged
|
|
| 34 | 33 | from gajim.common.const import AvatarSize
|
| 35 | 34 | from gajim.common.const import KindConstant
|
| 36 | 35 | from gajim.common.const import RowHeaderType
|
| 37 | -from gajim.common.events import MucDiscoUpdate
|
|
| 38 | 36 | from gajim.common.helpers import AdditionalDataDict
|
| 39 | 37 | from gajim.common.helpers import get_group_chat_nick
|
| 40 | 38 | from gajim.common.helpers import get_groupchat_name
|
| ... | ... | @@ -135,8 +133,6 @@ def __init__(self, |
| 135 | 133 | self.connect('drag-data-get', self._on_drag_data_get)
|
| 136 | 134 | |
| 137 | 135 | if self.type == 'groupchat':
|
| 138 | - app.ged.register_event_handler(
|
|
| 139 | - 'muc-disco-update', ged.GUI1, self._on_muc_disco_update)
|
|
| 140 | 136 | self._ui.group_chat_indicator.show()
|
| 141 | 137 | |
| 142 | 138 | self.update_avatar()
|
| ... | ... | @@ -433,21 +429,12 @@ def _on_state_flags_changed(self, |
| 433 | 429 | else:
|
| 434 | 430 | self._ui.revealer.set_reveal_child(False)
|
| 435 | 431 | |
| 436 | - def _on_muc_disco_update(self, event: MucDiscoUpdate) -> None:
|
|
| 437 | - if event.jid != self.contact.jid:
|
|
| 438 | - return
|
|
| 439 | - |
|
| 440 | - self.update_avatar()
|
|
| 441 | - |
|
| 442 | 432 | def _on_destroy(self, _row: ChatListRow) -> None:
|
| 443 | 433 | app.settings.disconnect_signals(self)
|
| 444 | 434 | self.contact.disconnect_all_from_obj(self)
|
| 445 | 435 | if isinstance(self.contact, GroupchatParticipant):
|
| 446 | 436 | self.contact.room.disconnect_all_from_obj(self)
|
| 447 | 437 | |
| 448 | - app.ged.remove_event_handler('muc-disco-update',
|
|
| 449 | - ged.GUI1,
|
|
| 450 | - self._on_muc_disco_update)
|
|
| 451 | 438 | app.check_finalize(self)
|
| 452 | 439 | |
| 453 | 440 | def _on_close_button_clicked(self, _button: Gtk.Button) -> None:
|
| ... | ... | @@ -114,8 +114,6 @@ def _on_client_state_changed(self, |
| 114 | 114 | def _on_muc_disco_update(self, event: MucDiscoUpdate) -> None:
|
| 115 | 115 | if event.jid != self._contact.jid:
|
| 116 | 116 | return
|
| 117 | - |
|
| 118 | - self._load_avatar()
|
|
| 119 | 117 | self._ui.name_entry.set_text(self._contact.name)
|
| 120 | 118 | disco_info = self._contact.get_disco()
|
| 121 | 119 | assert disco_info is not None
|
| ... | ... | @@ -25,9 +25,7 @@ |
| 25 | 25 | from nbxmpp.task import Task
|
| 26 | 26 | |
| 27 | 27 | from gajim.common import app
|
| 28 | -from gajim.common import ged
|
|
| 29 | 28 | from gajim.common.const import AvatarSize
|
| 30 | -from gajim.common.events import MucDiscoUpdate
|
|
| 31 | 29 | from gajim.common.helpers import validate_jid
|
| 32 | 30 | from gajim.common.i18n import _
|
| 33 | 31 | from gajim.common.modules.contacts import GroupchatContact
|
| ... | ... | @@ -51,9 +49,6 @@ def __init__(self, |
| 51 | 49 | self._contact = contact
|
| 52 | 50 | self._contact.connect('room-subject', self._on_room_subject)
|
| 53 | 51 | |
| 54 | - app.ged.register_event_handler(
|
|
| 55 | - 'muc-disco-update', ged.GUI1, self._on_muc_disco_update)
|
|
| 56 | - |
|
| 57 | 52 | self._room_config_form = None
|
| 58 | 53 | |
| 59 | 54 | self._ui = get_builder('groupchat_manage.ui')
|
| ... | ... | @@ -75,21 +70,12 @@ def __init__(self, |
| 75 | 70 | |
| 76 | 71 | def _on_destroy(self, *args: Any) -> None:
|
| 77 | 72 | del self._avatar_selector
|
| 78 | - app.ged.remove_event_handler('muc-disco-update',
|
|
| 79 | - ged.GUI1,
|
|
| 80 | - self._on_muc_disco_update)
|
|
| 81 | 73 | app.check_finalize(self)
|
| 82 | 74 | |
| 83 | 75 | @property
|
| 84 | 76 | def disco_info(self):
|
| 85 | 77 | return app.storage.cache.get_last_disco_info(self._contact.jid)
|
| 86 | 78 | |
| 87 | - def _on_muc_disco_update(self, event: MucDiscoUpdate) -> None:
|
|
| 88 | - if event.jid != self._contact.jid:
|
|
| 89 | - return
|
|
| 90 | - |
|
| 91 | - self.update_avatar()
|
|
| 92 | - |
|
| 93 | 79 | def _prepare_subject(self) -> None:
|
| 94 | 80 | text = ''
|
| 95 | 81 | if self._contact.subject is not None:
|