Philipp Hörist pushed to branch master at gajim / gajim
Commits:
5 changed files:
- .chglog/config.yml
- gajim/common/setting_values.py
- gajim/gtk/main.py
- gajim/gtk/preferences.py
- gajim/gtk/status_icon.py
Changes:
| ... | ... | @@ -34,3 +34,6 @@ options: |
| 34 | 34 | refs:
|
| 35 | 35 | actions:
|
| 36 | 36 | - Fixes
|
| 37 | + notes:
|
|
| 38 | + keywords:
|
|
| 39 | + - NOTES |
| ... | ... | @@ -66,7 +66,7 @@ class _ACCOUNT_DEFAULT: |
| 66 | 66 | 'ignore_incoming_attention',
|
| 67 | 67 | 'last_main_window_visible',
|
| 68 | 68 | 'log_contact_status_changes',
|
| 69 | - 'main_window_skip_taskbar',
|
|
| 69 | + 'minimize_to_tray',
|
|
| 70 | 70 | 'muc_prefer_direct_msg',
|
| 71 | 71 | 'notification_preview_message',
|
| 72 | 72 | 'notify_on_all_muc_messages',
|
| ... | ... | @@ -207,7 +207,7 @@ class _ACCOUNT_DEFAULT: |
| 207 | 207 | 'last_main_window_visible': True,
|
| 208 | 208 | 'quit_on_main_window_x_button': False,
|
| 209 | 209 | 'hide_on_main_window_x_button': False,
|
| 210 | - 'main_window_skip_taskbar': False,
|
|
| 210 | + 'minimize_to_tray': False,
|
|
| 211 | 211 | 'latest_disco_addresses': '',
|
| 212 | 212 | 'change_roster_title': True,
|
| 213 | 213 | 'restore_timeout': -1,
|
| ... | ... | @@ -645,7 +645,6 @@ class WorkspaceSettings(TypedDict): |
| 645 | 645 | 'notification_preview_message': _('Preview new messages in notification popup?'),
|
| 646 | 646 | 'muc_highlight_words': _('A list of words (semicolon separated) that will be highlighted in group chats.'),
|
| 647 | 647 | '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.'),
|
| 648 | - 'main_window_skip_taskbar': _('Don’t show main window in the system taskbar.'),
|
|
| 649 | 648 | 'use_urgency_hint': _('If enabled, Gajim makes the window flash (the default behaviour in most Window Managers) when holding pending events.'),
|
| 650 | 649 | 'notification_timeout': '',
|
| 651 | 650 | 'escape_key_closes': _('If enabled, pressing Esc closes a tab/window.'),
|
| ... | ... | @@ -156,8 +156,8 @@ def __init__(self) -> None: |
| 156 | 156 | self._on_client_state_changed)
|
| 157 | 157 | |
| 158 | 158 | def _prepare_window(self) -> None:
|
| 159 | - if app.settings.get('main_window_skip_taskbar'):
|
|
| 160 | - self.set_property('skip-taskbar-hint', True)
|
|
| 159 | + if app.settings.get('minimize_to_tray'):
|
|
| 160 | + self.set_skip_taskbar_hint(True)
|
|
| 161 | 161 | |
| 162 | 162 | restore_main_window_position()
|
| 163 | 163 | window_width = app.settings.get('mainwin_width')
|
| ... | ... | @@ -204,10 +204,21 @@ def __init__(self, *args: Any) -> None: |
| 204 | 204 | SettingType.CONFIG,
|
| 205 | 205 | 'quit_on_main_window_x_button',
|
| 206 | 206 | desc=_('Quit when closing Gajim’s window')),
|
| 207 | + |
|
| 208 | + Setting(SettingKind.SWITCH,
|
|
| 209 | + _('Minimize to Tray'),
|
|
| 210 | + SettingType.CONFIG,
|
|
| 211 | + 'minimize_to_tray',
|
|
| 212 | + desc=_('Hide window to system tray when minimized'),
|
|
| 213 | + callback=self._on__minimize_to_tray),
|
|
| 207 | 214 | ]
|
| 208 | 215 | |
| 209 | 216 | PreferenceBox.__init__(self, settings)
|
| 210 | 217 | |
| 218 | + @staticmethod
|
|
| 219 | + def _on__minimize_to_tray(value: bool, *args: Any) -> None:
|
|
| 220 | + app.window.set_skip_taskbar_hint(value)
|
|
| 221 | + |
|
| 211 | 222 | |
| 212 | 223 | class Plugins(PreferenceBox):
|
| 213 | 224 | def __init__(self, *args: Any) -> None:
|
| ... | ... | @@ -200,8 +200,6 @@ def _on_activate(self, *args: Any) -> None: |
| 200 | 200 | # Window was minimized
|
| 201 | 201 | restore_main_window_position()
|
| 202 | 202 | |
| 203 | - if not app.settings.get('main_window_skip_taskbar'):
|
|
| 204 | - app.window.set_property('skip-taskbar-hint', False)
|
|
| 205 | 203 | app.window.present_with_time(Gtk.get_current_event_time())
|
| 206 | 204 | |
| 207 | 205 | @staticmethod
|