Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits:
-
028a15ab
by wurstsalat at 2021-09-05T17:48:24+02:00
-
2d61f617
by wurstsalat at 2021-09-05T18:00:30+02:00
-
601bcc58
by wurstsalat at 2021-09-05T18:01:26+02:00
2 changed files:
Changes:
| ... | ... | @@ -80,9 +80,6 @@ class _ACCOUNT_DEFAULT: |
| 80 | 80 |
'last_save_dir': '',
|
| 81 | 81 |
'last_send_dir': '',
|
| 82 | 82 |
'last_sounds_dir': '',
|
| 83 |
- 'tabs_always_visible': False,
|
|
| 84 |
- 'tabs_border': False,
|
|
| 85 |
- 'tabs_close_button': True,
|
|
| 86 | 83 |
'notification_preview_message': True,
|
| 87 | 84 |
'notification_position_x': -1,
|
| 88 | 85 |
'notification_position_y': -1,
|
| ... | ... | @@ -105,7 +102,7 @@ class _ACCOUNT_DEFAULT: |
| 105 | 102 |
'hide_groupchat_occupants_list': False,
|
| 106 | 103 |
'chat_merge_consecutive_nickname': False,
|
| 107 | 104 |
'ctrl_tab_go_to_next_composing': True,
|
| 108 |
- 'metacontacts_enabled': True,
|
|
| 105 |
+ 'metacontacts_enabled': False,
|
|
| 109 | 106 |
'confirm_metacontacts': '',
|
| 110 | 107 |
'confirm_block': '',
|
| 111 | 108 |
'enable_negative_priority': False,
|
| ... | ... | @@ -385,9 +382,6 @@ class _ACCOUNT_DEFAULT: |
| 385 | 382 |
'use_kib_mib': _('IEC standard says KiB = 1024 bytes, KB = 1000 bytes.'),
|
| 386 | 383 |
'notify_on_all_muc_messages': '',
|
| 387 | 384 |
'trayicon_notification_on_events': _('Notify of events in the notification area.'),
|
| 388 |
- 'tabs_always_visible': _('Show tab when only one conversation?'),
|
|
| 389 |
- 'tabs_border': _('Show tabbed notebook border in chat windows?'),
|
|
| 390 |
- 'tabs_close_button': _('Show close button in tab?'),
|
|
| 391 | 385 |
'notification_preview_message': _('Preview new messages in notification popup?'),
|
| 392 | 386 |
'muc_highlight_words': _('A list of words (semicolon separated) that will be highlighted in group chats.'),
|
| 393 | 387 |
'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.'),
|
| ... | ... | @@ -195,23 +195,12 @@ def __init__(self, *args): |
| 195 | 195 |
# TODO: Evaluate settings (and connect them)
|
| 196 | 196 |
|
| 197 | 197 |
settings = [
|
| 198 |
- Setting(SettingKind.SWITCH,
|
|
| 199 |
- _('Enable Metacontacts'),
|
|
| 200 |
- SettingType.CONFIG,
|
|
| 201 |
- 'metacontacts_enabled'),
|
|
| 202 |
- |
|
| 203 | 198 |
Setting(SettingKind.SWITCH,
|
| 204 | 199 |
_('Show Avatars'),
|
| 205 | 200 |
SettingType.CONFIG,
|
| 206 | 201 |
'show_avatars_in_roster',
|
| 207 | 202 |
callback=self._on_show_avatar_in_roster_changed),
|
| 208 | 203 |
|
| 209 |
- Setting(SettingKind.SWITCH,
|
|
| 210 |
- _('Show Status Message'),
|
|
| 211 |
- SettingType.CONFIG,
|
|
| 212 |
- 'show_status_msgs_in_roster',
|
|
| 213 |
- callback=self._on_show_status_in_roster),
|
|
| 214 |
- |
|
| 215 | 204 |
Setting(SettingKind.SWITCH,
|
| 216 | 205 |
_('Sort Contacts by Status'),
|
| 217 | 206 |
SettingType.CONFIG,
|
| ... | ... | @@ -245,14 +234,6 @@ def __init__(self, *args): |
| 245 | 234 |
def _on_show_avatar_in_roster_changed(*args):
|
| 246 | 235 |
app.interface.roster.setup_and_draw_roster()
|
| 247 | 236 |
|
| 248 |
- @staticmethod
|
|
| 249 |
- def _on_show_status_in_roster(*args):
|
|
| 250 |
- app.interface.roster.setup_and_draw_roster()
|
|
| 251 |
- |
|
| 252 |
- for ctrl in app.window.get_controls():
|
|
| 253 |
- if ctrl.is_groupchat:
|
|
| 254 |
- ctrl.roster.draw_contacts()
|
|
| 255 |
- |
|
| 256 | 237 |
@staticmethod
|
| 257 | 238 |
def _on_sort_by_show_in_roster(*args):
|
| 258 | 239 |
app.interface.roster.setup_and_draw_roster()
|
| ... | ... | @@ -293,9 +274,10 @@ def __init__(self, *args): |
| 293 | 274 |
'show_send_message_button'),
|
| 294 | 275 |
|
| 295 | 276 |
Setting(SettingKind.SWITCH,
|
| 296 |
- _('Show Status Message'),
|
|
| 277 |
+ _('Show Status Changes'),
|
|
| 297 | 278 |
SettingType.CONFIG,
|
| 298 |
- 'print_status_in_chats'),
|
|
| 279 |
+ 'print_status_in_chats',
|
|
| 280 |
+ desc=_('For example: "Julia is now online"')),
|
|
| 299 | 281 |
|
| 300 | 282 |
Setting(SettingKind.SWITCH,
|
| 301 | 283 |
_('Show Chat State In Tabs'),
|
| ... | ... | @@ -336,30 +318,35 @@ class GroupChats(PreferenceBox): |
| 336 | 318 |
def __init__(self, *args):
|
| 337 | 319 |
|
| 338 | 320 |
settings = [
|
| 321 |
+ Setting(SettingKind.POPOVER,
|
|
| 322 |
+ _('Default Sync Threshold'),
|
|
| 323 |
+ SettingType.CONFIG,
|
|
| 324 |
+ 'gc_sync_threshold_public_default',
|
|
| 325 |
+ desc=_('Default for new public group chats'),
|
|
| 326 |
+ props={'entries': THRESHOLD_OPTIONS}),
|
|
| 339 | 327 |
|
| 340 | 328 |
Setting(SettingKind.SWITCH,
|
| 341 |
- _('Show Subject'),
|
|
| 329 |
+ _('Direct Messages'),
|
|
| 342 | 330 |
SettingType.CONFIG,
|
| 343 |
- 'show_subject_on_join'),
|
|
| 331 |
+ 'muc_prefer_direct_msg',
|
|
| 332 |
+ desc=_('Prefer direct messages in private group chats ')),
|
|
| 344 | 333 |
|
| 345 | 334 |
Setting(SettingKind.SWITCH,
|
| 346 |
- _('Sort Contacts by Status'),
|
|
| 335 |
+ _('Sort Participant List by Status'),
|
|
| 347 | 336 |
SettingType.CONFIG,
|
| 348 | 337 |
'sort_by_show_in_muc',
|
| 349 | 338 |
callback=self._on_sort_by_show_in_muc),
|
| 350 | 339 |
|
| 351 |
- Setting(SettingKind.POPOVER,
|
|
| 352 |
- _('Default Sync Threshold'),
|
|
| 340 |
+ Setting(SettingKind.SWITCH,
|
|
| 341 |
+ _('Status Messages in Participants List'),
|
|
| 353 | 342 |
SettingType.CONFIG,
|
| 354 |
- 'gc_sync_threshold_public_default',
|
|
| 355 |
- desc=_('Default for new public group chats'),
|
|
| 356 |
- props={'entries': THRESHOLD_OPTIONS}),
|
|
| 343 |
+ 'show_status_msgs_in_roster',
|
|
| 344 |
+ callback=self._on_show_status_in_roster),
|
|
| 357 | 345 |
|
| 358 | 346 |
Setting(SettingKind.SWITCH,
|
| 359 |
- _('Direct Messages'),
|
|
| 347 |
+ _('Show Subject'),
|
|
| 360 | 348 |
SettingType.CONFIG,
|
| 361 |
- 'muc_prefer_direct_msg',
|
|
| 362 |
- desc=_('Prefer direct messages in private group chats ')),
|
|
| 349 |
+ 'show_subject_on_join'),
|
|
| 363 | 350 |
|
| 364 | 351 |
Setting(SettingKind.SWITCH,
|
| 365 | 352 |
_('Show Joined / Left'),
|
| ... | ... | @@ -382,7 +369,6 @@ def __init__(self, *args): |
| 382 | 369 |
'current default value'),
|
| 383 | 370 |
'button-style': 'destructive-action',
|
| 384 | 371 |
'button-callback': self._reset_print_status}),
|
| 385 |
- |
|
| 386 | 372 |
]
|
| 387 | 373 |
|
| 388 | 374 |
PreferenceBox.__init__(self, settings)
|
| ... | ... | @@ -393,6 +379,12 @@ def _on_sort_by_show_in_muc(*args): |
| 393 | 379 |
if ctrl.is_groupchat:
|
| 394 | 380 |
ctrl.roster.invalidate_sort()
|
| 395 | 381 |
|
| 382 |
+ @staticmethod
|
|
| 383 |
+ def _on_show_status_in_roster(*args):
|
|
| 384 |
+ for ctrl in app.window.get_controls():
|
|
| 385 |
+ if ctrl.is_groupchat:
|
|
| 386 |
+ ctrl.roster.draw_contacts()
|
|
| 387 |
+ |
|
| 396 | 388 |
@staticmethod
|
| 397 | 389 |
def _reset_join_left(button):
|
| 398 | 390 |
button.set_sensitive(False)
|