Philipp Hörist pushed to branch master at gajim / gajim
Commits:
ced3738c by lovetox at 2022-02-03T20:20:41+01:00
Add Setting to switch PlainWidget implementation
- - - - -
3 changed files:
- gajim/common/setting_values.py
- gajim/common/settings.py
- gajim/gtk/conversation/plain_widget.py
Changes:
=====================================
gajim/common/setting_values.py
=====================================
@@ -39,6 +39,7 @@ class _ACCOUNT_DEFAULT:
'confirm_paste_image',
'dev_force_bookmark_2',
'developer_modus',
+ 'dev_use_message_label',
'enable_negative_priority',
'escape_key_closes',
'gc_notify_on_all_messages_private_default',
@@ -260,6 +261,7 @@ class _ACCOUNT_DEFAULT:
'groupchat_roster_width': 210,
'dev_force_bookmark_2': False,
'developer_modus': False,
+ 'dev_use_message_label': False,
'use_libappindicator': True,
'show_help_start_chat': True,
'gc_notify_on_all_messages_private_default': True,
@@ -644,10 +646,11 @@ class WorkspaceSettings(TypedDict):
'muclumbus_api_pref': _('API Preferences. Possible values: \'http\',
\'iq\''),
'command_system_execute': _('If enabled, Gajim will execute commands
(/show, /sh, /execute, /exec).'),
'groupchat_roster_width': _('Width of group chat roster in pixel'),
- 'dev_force_bookmark_2': _('Force Bookmark 2 usage'),
'gc_notify_on_all_messages_private_default': '',
'gc_notify_on_all_messages_public_default': '',
'developer_modus': '',
+ 'dev_force_bookmark_2': _('Force Bookmark 2 usage'),
+ 'dev_use_message_label': '',
'use_libappindicator': _('Enables libappindicator, an alternative tray
icon provider'),
'log_contact_status_changes': '',
},
=====================================
gajim/common/settings.py
=====================================
@@ -212,6 +212,9 @@ def _setup_installation_defaults() -> None:
if IS_PORTABLE:
APP_SETTINGS['use_keyring'] = False
+ if sys.platform == 'win32':
+ APP_SETTINGS['dev_use_message_label'] = False
+
@staticmethod
def _namedtuple_factory(cursor: sqlite3.Cursor,
row: tuple[Any, ...]) -> NamedTuple:
=====================================
gajim/gtk/conversation/plain_widget.py
=====================================
@@ -55,10 +55,10 @@ def __init__(self, account: str, selectable: bool) -> None:
# We use a Gtk.Textview on Windows, since there is no support for
# rendering color fonts (Emojis) on Windows yet, see:
# https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/244
- if os.name == 'nt':
- self._text_widget = MessageTextview(self._account)
- else:
+ if app.settings.get('dev_use_message_label'):
self._text_widget = MessageLabel(self._account, selectable)
+ else:
+ self._text_widget = MessageTextview(self._account)
self.add(self._text_widget)
def add_content(self, block: PlainBlock) -> None:
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/ced3738c2729c01b1b031df255fb877028a9104f
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/ced3738c2729c01b1b031df255fb877028a9104f
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