Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
dd257eb9 by wurstsalat at 2023-04-16T17:34:13+02:00
imprv: GroupchatDetails: Hide OMEMO page in public MUCs
- - - - -
1 changed file:
- gajim/gtk/groupchat_details.py
Changes:
=====================================
gajim/gtk/groupchat_details.py
=====================================
@@ -176,6 +176,12 @@ def _add_groupchat_settings(self) -> None:
self._ui.settings_box.add(scrolled_window)
def _add_groupchat_encryption(self) -> None:
+ if (self._contact.is_groupchat and
+ self._contact.muc_context == 'public'):
+ # OMEMO is not available for public group chats
+ self._switcher.set_row_visible('encryption-omemo', False)
+ return
+
self._ui.encryption_box.add(
OMEMOTrustManager(self._contact.account, self._contact))
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/dd257eb9db85e49f113151915415b66c…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/dd257eb9db85e49f113151915415b66c…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
77f2b223 by wurstsalat at 2023-04-16T16:45:34+02:00
fix: GroupChatInviter: Don't filter by account name
Fixes #11474
- - - - -
1 changed file:
- gajim/gtk/groupchat_inviter.py
Changes:
=====================================
gajim/gtk/groupchat_inviter.py
=====================================
@@ -119,8 +119,6 @@ def update_jid(self, jid: str) -> None:
def get_search_text(self):
if self._contact is None:
return str(self.jid)
- if self._show_account:
- return f'{self._name} {self.jid} {self._account_label}'
return f'{self._name} {self.jid}'
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/77f2b223482b3af5e91125424134beae…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/77f2b223482b3af5e91125424134beae…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
6e3dec33 by wurstsalat at 2023-04-16T16:33:59+02:00
cfix: ChatBanner: Use jid_to_iri for QR code
- - - - -
1 changed file:
- gajim/gtk/chat_banner.py
Changes:
=====================================
gajim/gtk/chat_banner.py
=====================================
@@ -37,6 +37,7 @@
from gajim.common.modules.contacts import BareContact
from gajim.common.modules.contacts import GroupchatContact
from gajim.common.modules.contacts import GroupchatParticipant
+from gajim.common.util.text import jid_to_iri
from gajim.gtk.builder import get_builder
from gajim.gtk.groupchat_voice_requests_button import VoiceRequestsButton
@@ -334,7 +335,7 @@ def _update_share_box(self) -> None:
def _on_share_clicked(self, _button: Gtk.Button) -> None:
# Generate QR code on demand (i.e. not when switching chats)
assert self._contact is not None
- text = f'xmpp:{self._contact.jid}'
+ text = jid_to_iri(str(self._contact.jid))
if self._contact.is_groupchat:
text = f'{text}?join'
self._ui.qr_code_image.set_from_pixbuf(generate_qr_code(text))
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/6e3dec332d3ac7b73a69190d1f5b88c9…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/6e3dec332d3ac7b73a69190d1f5b88c9…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
5e2011fe by Philipp Hörist at 2023-04-16T13:05:47+02:00
fix: Preview: Display webp and avif images on Windows correctly
- Gio.content_type_guess() returns a file extension,
use Gio.content_type_get_mime_type() to get the mime type
- - - - -
1 changed file:
- gajim/common/preview_helpers.py
Changes:
=====================================
gajim/common/preview_helpers.py
=====================================
@@ -450,12 +450,24 @@ def guess_mime_type(file_path: Union[Path, str],
data: Optional[bytes] = None
) -> str:
file_path = str(file_path)
+
+ if not mimetypes.inited:
+ # On Windows both mime types are only available
+ # with python 3.11, so this can be removed once
+ # the Windows build uses python 3.11
+ mimetypes.add_type('image/webp', '.webp')
+ mimetypes.add_type('image/avif', '.avif')
+
+ # The mimetypes module maps extensions to mime types
+ # it does no guessing based on file content
mime_type, _ = mimetypes.guess_type(file_path)
if mime_type is None:
- # Try to guess MIME type by file name
- mime_type, _ = Gio.content_type_guess(file_path, data)
+ # Gio does also guess based on file content
+ extension, _ = Gio.content_type_guess(file_path, data)
+ mime_type = Gio.content_type_get_mime_type(extension)
+
log.debug('Guessed MIME type: %s', mime_type)
- return mime_type
+ return mime_type or ''
def guess_simple_file_type(file_path: str,
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/5e2011fee11237264b643e338da1b34b…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/5e2011fee11237264b643e338da1b34b…
You're receiving this email because of your account on dev.gajim.org.