Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
b0b20026 by wurstsalat at 2022-03-02T21:53:34+01:00
ContactInfo: Add explanation for hiding Notes page
- - - - -
8bb86ec4 by wurstsalat at 2022-03-02T22:02:02+01:00
Commands: Fix deprecation warning
- - - - -
4b6a2433 by wurstsalat at 2022-03-02T22:25:49+01:00
Command System: Fix /leave command
Fixes #10762
- - - - -
3 changed files:
- gajim/command_system/framework.py
- gajim/command_system/implementation/standard.py
- gajim/gtk/contact_info.py
Changes:
=====================================
gajim/command_system/framework.py
=====================================
@@ -20,7 +20,8 @@
"""
from types import FunctionType
-from inspect import getargspec, getdoc
+from inspect import getfullargspec
+from inspect import getdoc
from gajim.command_system.dispatcher import Host
from gajim.command_system.dispatcher import Container
@@ -221,7 +222,8 @@ def extract_specification(self):
Extract handler's arguments specification, as it was defined
preserving their order.
"""
- names, var_args, var_kwargs, defaults = getargspec(self.handler) #
pylint: disable=W1505
+ names, var_args, var_kwargs, defaults, _, _, _ = getfullargspec(
+ self.handler)
# Behavior of this code need to be checked. Might yield
# incorrect results on some rare occasions.
=====================================
gajim/command_system/implementation/standard.py
=====================================
@@ -334,11 +334,12 @@ def join(self, jid):
'groupchat-join',
GLib.Variant('as', [self.account, jid]))
- @command('part', 'close', raw=True, empty=True)
- @doc(_("Leave the group chat, optionally giving a reason, and close tab or
"
- "window"))
- def leave(self, reason):
- self.leave(reason=reason)
+ @command('part', 'close')
+ @doc(_("Leave the group chat"))
+ def leave(self):
+ # Use idle_add to let command system finish printing
+ variant = GLib.Variant('as', [self.account, str(self.room_jid)])
+ GLib.idle_add(app.window.activate_action, 'remove-chat', variant)
@command(raw=True, empty=True)
@doc(_("""
=====================================
gajim/gtk/contact_info.py
=====================================
@@ -186,6 +186,10 @@ def _fill_note_page(self, contact: BareContact) -> None:
self._ui.textview_annotation.get_buffer().set_text(note.data)
if app.account_supports_private_storage(self.account):
+ # Hide the Notes page if private storage is not available, because
+ # roster notes cannot be stored without.
+ # Since there is no disco mechanism for private storage, we rely on
+ # Delimiter as a "proxy" for the availability of private storage.
self._switcher.set_row_visible('notes', True)
def _fill_settings_page(self, contact: BareContact) -> None:
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/e551b33ee207321fccc91693fd86806ba6c30703...4b6a2433d616ae1a7a2c4f52b73da865744b6f02
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/e551b33ee207321fccc91693fd86806ba6c30703...4b6a2433d616ae1a7a2c4f52b73da865744b6f02
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits