Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
bbc6c55d by wurstsalat at 2023-05-29T00:37:27+02:00
fix: GroupchatManage: Improve checks for joined state
Fixes #11231
- - - - -
1 changed file:
- gajim/gtk/groupchat_manage.py
Changes:
=====================================
gajim/gtk/groupchat_manage.py
=====================================
@@ -82,17 +82,18 @@ def _prepare_subject(self) -> None:
text = self._contact.subject.text
self._ui.subject_textview.get_buffer().set_text(text)
-
- joined = self._contact.is_joined
- change_allowed = self._is_subject_change_allowed()
- self._ui.subject_textview.set_sensitive(joined and change_allowed)
+ self._ui.subject_textview.set_sensitive(
+ self._is_subject_change_allowed())
def _is_subject_change_allowed(self) -> bool:
- contact = self._contact.get_self()
- if contact is None:
+ if not self._contact.is_joined:
return False
- if contact.affiliation in (Affiliation.OWNER, Affiliation.ADMIN):
+ self_contact = self._contact.get_self()
+ if self_contact is None:
+ return False
+
+ if self_contact.affiliation in (Affiliation.OWNER, Affiliation.ADMIN):
return True
if self.disco_info is None:
@@ -131,8 +132,6 @@ def _on_room_subject(self,
def _prepare_manage(self) -> None:
joined = self._contact.is_joined
vcard_support = False
- self_contact = self._contact.get_self()
- assert self_contact
if self.disco_info is not None:
vcard_support = self.disco_info.supports(Namespace.VCARD)
@@ -141,12 +140,15 @@ def _prepare_manage(self) -> None:
self._ui.muc_description_entry.set_text(
self.disco_info.muc_description or '')
- if (joined and vcard_support and
- self_contact.affiliation.is_owner):
- self._ui.avatar_select_button.show()
-
self.update_avatar()
+ self_contact = self._contact.get_self()
+ if not joined or self_contact is None:
+ return
+
+ if vcard_support and self_contact.affiliation.is_owner:
+ self._ui.avatar_select_button.show()
+
if self_contact.affiliation.is_owner:
self._client.get_module('MUC').request_config(
self._contact.jid, callback=self._on_manage_form_received)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/bbc6c55d85362de5cbc2aab65680e952…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/bbc6c55d85362de5cbc2aab65680e952…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
9b44d769 by wurstsalat at 2023-05-28T22:39:27+02:00
cfix: Search: Restore group chat participants list to previous state when closing search via Escape
Fixes #11536
- - - - -
1 changed file:
- gajim/gtk/chat_page.py
Changes:
=====================================
gajim/gtk/chat_page.py
=====================================
@@ -171,7 +171,8 @@ def _on_search_history(self,
self._chat_control.contact.jid)
if not app.settings.get('hide_groupchat_occupants_list'):
- # Hide group chat roster in order to make some space horizontally
+ # Hide group chat roster in order to make some space horizontally.
+ # Store state to be able to restore it when hiding search.
self._restore_occupants_list = True
app.settings.set('hide_groupchat_occupants_list', True)
@@ -179,11 +180,7 @@ def _on_search_history(self,
self._search_view.set_focus()
def _on_search_hide(self, *args: Any) -> None:
- if self._restore_occupants_list:
- app.settings.set('hide_groupchat_occupants_list', False)
- self._restore_occupants_list = False
-
- self._search_revealer.set_reveal_child(False)
+ self.hide_search()
def _on_chat_list_changed(self,
chat_list_stack: ChatListStack,
@@ -344,6 +341,11 @@ def get_control(self) -> ChatControl:
def hide_search(self) -> bool:
if self._search_revealer.get_reveal_child():
self._search_revealer.set_reveal_child(False)
+
+ if self._restore_occupants_list:
+ app.settings.set('hide_groupchat_occupants_list', False)
+ self._restore_occupants_list = False
+
return True
return False
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/9b44d7693f3b478b6ed5bffd680f588f…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/9b44d7693f3b478b6ed5bffd680f588f…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
a4cacbfa by Philipp Hörist at 2023-05-28T21:19:39+02:00
cq: Avoid extraneous parentheses
- - - - -
6e9eab11 by Philipp Hörist at 2023-05-28T21:21:11+02:00
cq: Import from collections.abc instead from typing
- - - - -
5a9362fd by Philipp Hörist at 2023-05-28T21:23:36+02:00
cq: Use union operator in ininstance() calls
- - - - -
af4223a9 by Philipp Hörist at 2023-05-28T21:30:32+02:00
cq: Use f-string instead of `format` call
- - - - -
30 changed files:
- gajim/common/commands.py
- gajim/common/configpaths.py
- gajim/common/dbus/remote_control.py
- gajim/common/dbus/system_style.py
- gajim/common/events.py
- gajim/common/file_props.py
- gajim/common/ged.py
- gajim/common/helpers.py
- gajim/common/jingle_content.py
- gajim/common/jingle_rtp.py
- gajim/common/jingle_session.py
- gajim/common/logging_helpers.py
- gajim/common/modules/blocking.py
- gajim/common/modules/caps.py
- gajim/common/modules/contacts.py
- gajim/common/modules/delimiter.py
- gajim/common/modules/httpupload.py
- gajim/common/modules/omemo.py
- gajim/common/modules/ping.py
- gajim/common/modules/pubsub.py
- gajim/common/modules/roster.py
- gajim/common/modules/security_labels.py
- gajim/common/modules/user_avatar.py
- gajim/common/modules/vcard_avatars.py
- gajim/common/preview.py
- gajim/common/preview_helpers.py
- gajim/common/settings.py
- gajim/common/storage/archive.py
- gajim/common/storage/base.py
- gajim/common/styling.py
The diff was not included because it is too large.
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/173d6f78e903bda15daed08d40c535b…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/173d6f78e903bda15daed08d40c535b…
You're receiving this email because of your account on dev.gajim.org.