Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits: 028a15ab by wurstsalat at 2021-09-05T17:48:24+02:00 Settings: Remove Tab related settings
- - - - - 2d61f617 by wurstsalat at 2021-09-05T18:00:30+02:00 Preferences: Improve status settings (and naming)
- - - - - 601bcc58 by wurstsalat at 2021-09-05T18:01:26+02:00 Disable Metacontacts by default
- - - - -
2 changed files:
- gajim/common/setting_values.py - gajim/gtk/preferences.py
Changes:
===================================== gajim/common/setting_values.py ===================================== @@ -80,9 +80,6 @@ class _ACCOUNT_DEFAULT: 'last_save_dir': '', 'last_send_dir': '', 'last_sounds_dir': '', - 'tabs_always_visible': False, - 'tabs_border': False, - 'tabs_close_button': True, 'notification_preview_message': True, 'notification_position_x': -1, 'notification_position_y': -1, @@ -105,7 +102,7 @@ class _ACCOUNT_DEFAULT: 'hide_groupchat_occupants_list': False, 'chat_merge_consecutive_nickname': False, 'ctrl_tab_go_to_next_composing': True, - 'metacontacts_enabled': True, + 'metacontacts_enabled': False, 'confirm_metacontacts': '', 'confirm_block': '', 'enable_negative_priority': False, @@ -385,9 +382,6 @@ class _ACCOUNT_DEFAULT: 'use_kib_mib': _('IEC standard says KiB = 1024 bytes, KB = 1000 bytes.'), 'notify_on_all_muc_messages': '', 'trayicon_notification_on_events': _('Notify of events in the notification area.'), - 'tabs_always_visible': _('Show tab when only one conversation?'), - 'tabs_border': _('Show tabbed notebook border in chat windows?'), - 'tabs_close_button': _('Show close button in tab?'), 'notification_preview_message': _('Preview new messages in notification popup?'), 'muc_highlight_words': _('A list of words (semicolon separated) that will be highlighted in group chats.'), 'hide_on_main_window_x_button': _('If enabled, Gajim hides the main window when pressing the X button instead of minimizing into the notification area.'),
===================================== gajim/gtk/preferences.py ===================================== @@ -195,23 +195,12 @@ def __init__(self, *args): # TODO: Evaluate settings (and connect them)
settings = [ - Setting(SettingKind.SWITCH, - _('Enable Metacontacts'), - SettingType.CONFIG, - 'metacontacts_enabled'), - Setting(SettingKind.SWITCH, _('Show Avatars'), SettingType.CONFIG, 'show_avatars_in_roster', callback=self._on_show_avatar_in_roster_changed),
- Setting(SettingKind.SWITCH, - _('Show Status Message'), - SettingType.CONFIG, - 'show_status_msgs_in_roster', - callback=self._on_show_status_in_roster), - Setting(SettingKind.SWITCH, _('Sort Contacts by Status'), SettingType.CONFIG, @@ -245,14 +234,6 @@ def __init__(self, *args): def _on_show_avatar_in_roster_changed(*args): app.interface.roster.setup_and_draw_roster()
- @staticmethod - def _on_show_status_in_roster(*args): - app.interface.roster.setup_and_draw_roster() - - for ctrl in app.window.get_controls(): - if ctrl.is_groupchat: - ctrl.roster.draw_contacts() - @staticmethod def _on_sort_by_show_in_roster(*args): app.interface.roster.setup_and_draw_roster() @@ -293,9 +274,10 @@ def __init__(self, *args): 'show_send_message_button'),
Setting(SettingKind.SWITCH, - _('Show Status Message'), + _('Show Status Changes'), SettingType.CONFIG, - 'print_status_in_chats'), + 'print_status_in_chats', + desc=_('For example: "Julia is now online"')),
Setting(SettingKind.SWITCH, _('Show Chat State In Tabs'), @@ -336,30 +318,35 @@ class GroupChats(PreferenceBox): def __init__(self, *args):
settings = [ + Setting(SettingKind.POPOVER, + _('Default Sync Threshold'), + SettingType.CONFIG, + 'gc_sync_threshold_public_default', + desc=_('Default for new public group chats'), + props={'entries': THRESHOLD_OPTIONS}),
Setting(SettingKind.SWITCH, - _('Show Subject'), + _('Direct Messages'), SettingType.CONFIG, - 'show_subject_on_join'), + 'muc_prefer_direct_msg', + desc=_('Prefer direct messages in private group chats ')),
Setting(SettingKind.SWITCH, - _('Sort Contacts by Status'), + _('Sort Participant List by Status'), SettingType.CONFIG, 'sort_by_show_in_muc', callback=self._on_sort_by_show_in_muc),
- Setting(SettingKind.POPOVER, - _('Default Sync Threshold'), + Setting(SettingKind.SWITCH, + _('Status Messages in Participants List'), SettingType.CONFIG, - 'gc_sync_threshold_public_default', - desc=_('Default for new public group chats'), - props={'entries': THRESHOLD_OPTIONS}), + 'show_status_msgs_in_roster', + callback=self._on_show_status_in_roster),
Setting(SettingKind.SWITCH, - _('Direct Messages'), + _('Show Subject'), SettingType.CONFIG, - 'muc_prefer_direct_msg', - desc=_('Prefer direct messages in private group chats ')), + 'show_subject_on_join'),
Setting(SettingKind.SWITCH, _('Show Joined / Left'), @@ -382,7 +369,6 @@ def __init__(self, *args): 'current default value'), 'button-style': 'destructive-action', 'button-callback': self._reset_print_status}), - ]
PreferenceBox.__init__(self, settings) @@ -393,6 +379,12 @@ def _on_sort_by_show_in_muc(*args): if ctrl.is_groupchat: ctrl.roster.invalidate_sort()
+ @staticmethod + def _on_show_status_in_roster(*args): + for ctrl in app.window.get_controls(): + if ctrl.is_groupchat: + ctrl.roster.draw_contacts() + @staticmethod def _reset_join_left(button): button.set_sensitive(False)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/21ad28cca70fbb18a06215f7a22d1cb1...