Daniel Brötzmann pushed to branch master at gajim / gajim
Commits: a5d1233d by wurstsalat at 2022-06-21T18:27:53+02:00 imprv: Preferences: Add setting for emoji shortcodes - - - - - 3 changed files: - gajim/common/setting_values.py - gajim/gtk/chat_action_processor.py - gajim/gtk/preferences.py Changes: ===================================== gajim/common/setting_values.py ===================================== @@ -107,6 +107,7 @@ class _ACCOUNT_DEFAULT: 'use_stun_server', 'use_urgency_hint', 'video_see_self', + 'enable_emoji_shortcodes', ] IntSettings = Literal[ @@ -294,6 +295,7 @@ class _ACCOUNT_DEFAULT: 'video_see_self': True, 'video_size': '', 'workspace_order': [], + 'enable_emoji_shortcodes': True, } BoolAccountSettings = Literal[ ===================================== gajim/gtk/chat_action_processor.py ===================================== @@ -178,6 +178,9 @@ def _update_commands_menu(self, self.popdown() def _check_for_emoji(self, start_iter: Gtk.TextIter) -> bool: + if not app.settings.get('enable_emoji_shortcodes'): + return False + assert self._current_iter is not None search = self._current_iter.backward_search( ':', ===================================== gajim/gtk/preferences.py ===================================== @@ -293,7 +293,11 @@ def __init__(self, *args: Any) -> None: SettingType.CONFIG, 'show_send_message_button', callback=self._on_show_send_message_button), - + Setting(SettingKind.SWITCH, + _('Emoji Shortcodes'), + SettingType.CONFIG, + 'enable_emoji_shortcodes', + desc=_('Show suggestions for shortcodes, e.g. :+1:')), Setting(SettingKind.SWITCH, _('Show Status Changes'), SettingType.CONFIG, View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/a5d1233d41a671f5ece69a5e52768f95143114d1 -- View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/a5d1233d41a671f5ece69a5e52768f95143114d1 You're receiving this email because of your account on dev.gajim.org.
_______________________________________________ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits