Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
e6379163 by wurstsalat at 2022-01-10T16:34:04+01:00
Chat menu: Remove Ad-Hoc-MUC, improve Add Contact
- - - - -
1 changed file:
- gajim/gtk/menus.py
Changes:
=====================================
gajim/gtk/menus.py
=====================================
@@ -53,6 +53,7 @@ def get_singlechat_menu(control_id: str,
) -> Gio.Menu:
client = app.get_client(account)
is_self_contact = jid.bare == client.get_own_jid().bare
+ contact = client.get_module('Contacts').get_contact(jid)
singlechat_menu: list[tuple[str, Any]] = [
(_('Send File'), [
@@ -61,17 +62,21 @@ def get_singlechat_menu(control_id: str,
])
]
- additional_menu = [
+ additional_menu: list[tuple[str, Any]] = [
('win.send-marker-', _('Send Read Markers')),
(_('Send Chatstate'), ['chatstate']),
- ('win.invite-contacts-', _('Invite Contacts…')),
- ('win.add-to-roster-', _('Add to Contact List…')),
('win.block-contact-', _('Block Contact…')),
('win.start-call-', _('Start Call…')),
('win.information-', _('Information')),
('app.remove-history', _('Remove History'))
]
+ if not contact.is_in_roster:
+ if (type_.is_chat or
+ (type_.is_privatechat and contact.real_jid is not None)):
+ additional_menu.append(
+ ('win.add-to-roster-', _('Add to Contact List…')))
+
if is_self_contact:
singlechat_menu.append(('profile', _('Profile')))
else:
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/e637916305c8023d43b3645aec0390eefdd0333f
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/e637916305c8023d43b3645aec0390eefdd0333f
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