1from gajim.common.i18n import _
2
3class _DEFAULT:
4    pass
5
6class _ACCOUNT_DEFAULT:
7    pass
8
9HAS_APP_DEFAULT = _DEFAULT()
10HAS_ACCOUNT_DEFAULT = _ACCOUNT_DEFAULT()
11
12# pylint: disable=line-too-long
13
14APP_SETTINGS = {
15    'autopopup': False,
16    'show_notifications': True,
17    'autopopupaway': False,
18    'sounddnd': False,
19    'showoffline': True,
20    'show_only_chat_and_online': False,
21    'show_transports_group': True,
22    'autoaway': True,
23    'autoawaytime': 5,
24    'autoaway_message': '',
25    'autoxa': True,
26    'autoxatime': 15,
27    'autoxa_message': '',
28    'ask_online_status': False,
29    'ask_offline_status': False,
30    'trayicon': 'always',
31    'allow_hide_roster': False,
32    'iconset': 'dcraven',
33    'use_transports_iconsets': True,
34    'collapsed_rows': '',
35    'roster_theme': 'default',
36    'mergeaccounts': False,
37    'sort_by_show_in_roster': True,
38    'sort_by_show_in_muc': False,
39    'use_speller': False,
40    'show_xhtml': True,
41    'speller_language': '',
42    'print_time': 'always',
43    'emoticons_theme': 'noto-emoticons',
44    'ascii_formatting': True,
45    'show_ascii_formatting_chars': True,
46    'sounds_on': True,
47    'gc_refer_to_nick_char': ',',
48    'msgwin-max-state': False,
49    'msgwin-x-position': -1,
50    'msgwin-y-position': -1,
51    'msgwin-width': 500,
52    'msgwin-height': 440,
53    'chat-msgwin-x-position': -1,
54    'chat-msgwin-y-position': -1,
55    'chat-msgwin-width': 480,
56    'chat-msgwin-height': 440,
57    'gc-msgwin-x-position': -1,
58    'gc-msgwin-y-position': -1,
59    'gc-msgwin-width': 600,
60    'gc-msgwin-height': 440,
61    'pm-msgwin-x-position': -1,
62    'pm-msgwin-y-position': -1,
63    'pm-msgwin-width': 480,
64    'pm-msgwin-height': 440,
65    'single-msg-x-position': 0,
66    'single-msg-y-position': 0,
67    'single-msg-width': 400,
68    'single-msg-height': 280,
69    'save-roster-position': True,
70    'roster_x-position': 0,
71    'roster_y-position': 0,
72    'roster_width': 200,
73    'roster_height': 400,
74    'roster_hpaned_position': 200,
75    'roster_on_the_right': False,
76    'history_window_width': -1,
77    'history_window_height': 450,
78    'history_window_x-position': 0,
79    'history_window_y-position': 0,
80    'latest_disco_addresses': '',
81    'time_stamp': '%x | %X  ',
82    'before_nickname': '',
83    'after_nickname': ':',
84    'change_roster_title': True,
85    'restore_lines': 10,
86    'restore_timeout': -1,
87    'send_on_ctrl_enter': False,
88    'last_roster_visible': True,
89    'key_up_lines': 25,
90    'search_engine': 'https://duckduckgo.com/?q=%s',
91    'dictionary_url': 'WIKTIONARY',
92    'always_english_wikipedia': False,
93    'always_english_wiktionary': True,
94    'remote_control': False,
95    'print_ichat_every_foo_minutes': 5,
96    'confirm_paste_image': True,
97    'confirm_close_muc': True,
98    'confirm_close_multiple_tabs': True,
99    'notify_on_file_complete': True,
100    'file_transfers_port': 28011,
101    'ft_add_hosts_to_send': '',
102    'use_kib_mib': False,
103    'notify_on_all_muc_messages': False,
104    'trayicon_notification_on_events': True,
105    'last_save_dir': '',
106    'last_send_dir': '',
107    'last_sounds_dir': '',
108    'tabs_position': 'left',
109    'tabs_always_visible': False,
110    'tabs_border': False,
111    'tabs_close_button': True,
112    'notification_preview_message': True,
113    'notification_position_x': -1,
114    'notification_position_y': -1,
115    'muc_highlight_words': '',
116    'muc_prefer_direct_msg': True,
117    'quit_on_roster_x_button': False,
118    'hide_on_roster_x_button': False,
119    'show_status_msgs_in_roster': True,
120    'show_avatars_in_roster': True,
121    'show_mood_in_roster': True,
122    'show_activity_in_roster': True,
123    'show_tunes_in_roster': True,
124    'show_location_in_roster': True,
125    'avatar_position_in_roster': 'right',
126    'print_status_in_chats': False,
127    'log_contact_status_changes': False,
128    'roster_window_skip_taskbar': False,
129    'use_urgency_hint': True,
130    'notification_timeout': 5,
131    'one_message_window': 'always',
132    'show_roster_on_startup': 'always',
133    'escape_key_closes': False,
134    'hide_groupchat_banner': False,
135    'hide_chat_banner': False,
136    'hide_groupchat_occupants_list': False,
137    'chat_merge_consecutive_nickname': False,
138    'chat_merge_consecutive_nickname_indent': '  ',
139    'ctrl_tab_go_to_next_composing': True,
140    'metacontacts_enabled': True,
141    'confirm_metacontacts': '',
142    'confirm_block': '',
143    'enable_negative_priority': False,
144    'show_contacts_number': True,
145    'scroll_roster_to_last_message': True,
146    'change_status_window_timeout': 15,
147    'max_conversation_lines': 500,
148    'shell_like_completion': False,
149    'audio_input_device': 'autoaudiosrc ! volume name=gajim_vol',
150    'audio_output_device': 'autoaudiosink',
151    'video_input_device': 'autovideosrc',
152    'video_framerate': '',
153    'video_size': '',
154    'video_see_self': True,
155    'audio_input_volume': 50,
156    'audio_output_volume': 50,
157    'use_stun_server': False,
158    'stun_server': '',
159    'global_proxy': '',
160    'ignore_incoming_attention': False,
161    'remember_opened_chat_controls': True,
162    'positive_184_ack': False,
163    'use_keyring': True,
164    'remote_commands': False,
165    'dark_theme': 2,
166    'gc_sync_threshold_public_default': 1,
167    'gc_sync_threshold_private_default': 0,
168    'show_subject_on_join': True,
169    'show_chatstate_in_roster': True,
170    'show_chatstate_in_tabs': True,
171    'show_chatstate_in_banner': True,
172    'muclumbus_api_jid': 'api@search.jabber.network',
173    'muclumbus_api_http_uri': 'https://search.jabber.network/api/1.0/search',
174    'muclumbus_api_pref': 'http',
175    'command_system_execute': False,
176    'groupchat_roster_width': 210,
177    'dev_force_bookmark_2': False,
178    'show_help_start_chat': True,
179    'gc_notify_on_all_messages_private_default': True,
180    'gc_notify_on_all_messages_public_default': False,
181    'gc_print_status_default': False,
182    'gc_print_join_left_default': False,
183    'check_for_update': True,
184    'last_update_check': '',
185    'always_ask_for_status_message': False,
186    'show_send_message_button': False,
187}
188
189ACCOUNT_SETTINGS = {
190    'account': {
191        'name': '',
192        'account_label': '',
193        'account_color': 'rgb(85, 85, 85)',
194        'hostname': '',
195        'anonymous_auth': False,
196        'avatar_sha': '',
197        'client_cert': '',
198        'client_cert_encrypted': False,
199        'savepass': False,
200        'password': '',
201        'resource': 'gajim.$rand',
202        'priority': 0,
203        'adjust_priority_with_status': False,
204        'autopriority_online': 50,
205        'autopriority_chat': 50,
206        'autopriority_away': 40,
207        'autopriority_xa': 30,
208        'autopriority_dnd': 20,
209        'autoconnect': False,
210        'restore_last_status': False,
211        'autoauth': False,
212        'active': True,
213        'proxy': '',
214        'keyid': '',
215        'keyname': '',
216        'use_plain_connection': False,
217        'confirm_unencrypted_connection': True,
218        'use_custom_host': False,
219        'custom_port': 5222,
220        'custom_host': '',
221        'custom_type': 'START TLS',
222        'sync_with_global_status': False,
223        'no_log_for': '',
224        'attached_gpg_keys': '',
225        'http_auth': 'ask',
226        'file_transfer_proxies': '',
227        'use_ft_proxies': False,
228        'test_ft_proxies_on_startup': False,
229        'msgwin-x-position': -1,
230        'msgwin-y-position': -1,
231        'msgwin-width': 480,
232        'msgwin-height': 440,
233        'is_zeroconf': False,
234        'last_status': 'online',
235        'last_status_msg': '',
236        'zeroconf_first_name': '',
237        'zeroconf_last_name': '',
238        'zeroconf_jabber_id': '',
239        'zeroconf_email': '',
240        'answer_receipts': True,
241        'publish_tune': False,
242        'publish_location': False,
243        'request_user_data': True,
244        'ignore_unknown_contacts': False,
245        'send_os_info': True,
246        'send_time_info': True,
247        'send_idle_time': True,
248        'roster_version': '',
249        'subscription_request_msg': '',
250        'ft_send_local_ips': True,
251        'opened_chat_controls': '',
252        'recent_groupchats': '',
253        'filetransfer_preference': 'httpupload',
254        'send_chatstate_default': 'composing_only',
255        'gc_send_chatstate_default': 'composing_only',
256        'send_marker_default': True,
257        'gc_send_marker_private_default': True,
258        'gc_send_marker_public_default': False,
259        'chat_history_max_age': -1,
260        'enable_gssapi': False,
261    },
262
263    'contact': {
264        'speller_language': '',
265        'send_chatstate': HAS_ACCOUNT_DEFAULT,
266        'send_marker': HAS_ACCOUNT_DEFAULT,
267        'encryption': '',
268    },
269
270    'group_chat': {
271        'speller_language': '',
272        'notify_on_all_messages': HAS_APP_DEFAULT,
273        'print_status': HAS_APP_DEFAULT,
274        'print_join_left': HAS_APP_DEFAULT,
275        'minimize_on_autojoin': True,
276        'minimize_on_close': True,
277        'send_chatstate': HAS_ACCOUNT_DEFAULT,
278        'send_marker': HAS_ACCOUNT_DEFAULT,
279        'encryption': '',
280        'sync_threshold': HAS_APP_DEFAULT,
281    },
282}
283
284
285PLUGIN_SETTINGS = {
286    'active': False
287}
288
289
290STATUS_PRESET_SETTINGS = {
291    'message': '',
292    'activity': '',
293    'subactivity': '',
294    'mood': '',
295}
296
297
298STATUS_PRESET_EXAMPLES = {
299    _('Sleeping'): {
300        'message': _('ZZZZzzzzzZZZZZ'),
301        'activity': 'inactive',
302        'subactivity': 'sleeping',
303        'mood': 'sleepy'
304    },
305    _('Back soon'): {
306        'message': _('Back in some minutes.')
307    },
308    _('Eating'): {
309        'message': _('I’m eating.'),
310        'activity': 'eating',
311        'subactivity': 'other'
312    },
313    _('Movie'): {
314        'message': _('I’m watching a movie.'),
315        'activity': 'relaxing',
316        'subactivity': 'watching_a_movie'
317    },
318    _('Working'): {
319        'message': _('I’m working.'),
320        'activity': 'working',
321        'subactivity': 'other'
322    },
323    _('Out'): {
324        'message': _('I’m out enjoying life.'),
325        'activity': 'relaxing',
326        'subactivity': 'going_out'
327    }
328}
329
330
331PROXY_SETTINGS = {
332    'type': 'socks5',
333    'host': '',
334    'port': 0,
335    'useauth': False,
336    'user': '',
337    'pass': '',
338}
339
340
341PROXY_EXAMPLES = {
342    'Tor': {
343        'type': 'socks5',
344        'host': 'localhost',
345        'port': 9050
346    },
347}
348
349
350DEFAULT_SOUNDEVENT_SETTINGS = {
351    'attention_received': {
352        'enabled': True,
353        'path': 'attention.wav'
354    },
355    'first_message_received': {
356        'enabled': True,
357        'path': 'message1.wav'
358    },
359    'next_message_received_focused': {
360        'enabled': True,
361        'path': 'message2.wav'
362    },
363    'next_message_received_unfocused': {
364        'enabled': True,
365        'path': 'message2.wav'
366    },
367    'contact_connected': {
368        'enabled': False,
369        'path': 'connected.wav'
370    },
371    'contact_disconnected': {
372        'enabled': False,
373        'path': 'disconnected.wav'
374    },
375    'message_sent': {
376        'enabled': False,
377        'path': 'sent.wav'
378    },
379    'muc_message_highlight': {
380        'enabled': True,
381        'path': 'gc_message1.wav'
382    },
383    'muc_message_received': {
384        'enabled': True,
385        'path': 'message2.wav'
386    }
387}
388
389
390ADVANCED_SETTINGS = {
391    'app': {
392        'allow_hide_roster': _('Allow to hide the contact list window even if the notification area icon is not shown.'),
393        'print_time': _('\'always\' - print time for every message.\n\'sometimes\' - print time every print_ichat_every_foo_minutes minute.\n\'never\' - never print time.'),
394        'ascii_formatting': _('Treat * / _ pairs as possible formatting characters.'),
395        'show_ascii_formatting_chars': _('If enabled, do not remove */_ . So *abc* will be bold but with * * not removed.'),
396        'gc_refer_to_nick_char': _('Character to add after nickname when using nickname completion (tab) in group chat.'),
397        'save-roster-position': _('If enabled, Gajim will save the contact list window position when hiding it, and restore it when showing the contact list window again.'),
398        'roster_on_the_right': _('Place the contact list on the right in single window mode'),
399        'time_stamp': _('This option lets you customize the timestamp that is printed in conversation. For example \'[%H:%M] \' will show \'[hour:minute] \'. See python doc on strftime for full documentation (https://docs.python.org/3/library/time.html#time.strftime).'),
400        'before_nickname': _('Characters that are printed before the nickname in conversations.'),
401        'after_nickname': _('Characters that are printed after the nickname in conversations.'),
402        'change_roster_title': _('If enabled, Gajim will add * and [n] in contact list window title.'),
403        'restore_lines': _('Number of messages from chat history to be restored when a chat tab/window is reopened.'),
404        'restore_timeout': _('How far back in time (minutes) chat history is restored. -1 means no limit.'),
405        'send_on_ctrl_enter': _('Send message on Ctrl+Enter and make a new line with Enter.'),
406        'key_up_lines': _('How many lines to store for Ctrl+KeyUP (previously sent messages).'),
407        'search_engine': '',
408        'dictionary_url': _('Either a custom URL with %%s in it (where %%s is the word/phrase) or \'WIKTIONARY\' (which means use Wikitionary).'),
409        'always_english_wikipedia': '',
410        'always_english_wiktionary': '',
411        'remote_control': _('If checked, Gajim can be controlled remotely using gajim-remote.'),
412        'print_ichat_every_foo_minutes': _('When not printing time for every message (\'print_time\'==sometimes, print it every x minutes.'),
413        'confirm_paste_image': _('Ask before pasting an image.'),
414        'confirm_close_muc': _('Ask before closing a group chat tab/window.'),
415        'confirm_close_multiple_tabs': _('Ask before closing tabbed chat window if there are chats that can lose data (chat, private chat, group chat that will not be minimized).'),
416        'file_transfers_port': '',
417        'ft_add_hosts_to_send': _('List of send hosts (comma separated) in addition to local interfaces for file transfers (in case of address translation/port forwarding).'),
418        'use_kib_mib': _('IEC standard says KiB = 1024 bytes, KB = 1000 bytes.'),
419        'notify_on_all_muc_messages': '',
420        'trayicon_notification_on_events': _('Notify of events in the notification area.'),
421        'tabs_always_visible': _('Show tab when only one conversation?'),
422        'tabs_border': _('Show tabbed notebook border in chat windows?'),
423        'tabs_close_button': _('Show close button in tab?'),
424        'notification_preview_message': _('Preview new messages in notification popup?'),
425        'muc_highlight_words': _('A list of words (semicolon separated) that will be highlighted in group chats.'),
426        'hide_on_roster_x_button': _('If enabled, Gajim hides the contact list window when pressing the X button instead of minimizing into the notification area.'),
427        'show_mood_in_roster': '',
428        'show_activity_in_roster': '',
429        'show_tunes_in_roster': '',
430        'show_location_in_roster': '',
431        'avatar_position_in_roster': _('Define the position of avatars in the contact list. Can be \'left\' or \'right\'.'),
432        'roster_window_skip_taskbar': _('Don\'t show contact list window in the system taskbar.'),
433        'use_urgency_hint': _('If enabled, Gajim makes the window flash (the default behaviour in most Window Managers) when holding pending events.'),
434        'notification_timeout': '',
435        'escape_key_closes': _('If enabled, pressing Esc closes a tab/window.'),
436        'hide_groupchat_banner': _('Hides the banner in a group chat window.'),
437        'hide_chat_banner': _('Hides the banner in a 1:1 chat window.'),
438        'hide_groupchat_occupants_list': _('Hides the group chat participants list in a group chat window.'),
439        'chat_merge_consecutive_nickname': _('In a chat, show the nickname at the beginning of a line only when it\'s not the same person talking as in the previous message.'),
440        'chat_merge_consecutive_nickname_indent': _('Indentation when using merge consecutive nickname.'),
441        'ctrl_tab_go_to_next_composing': _('Ctrl+Tab switches to the next composing tab when there are no tabs with messages pending.'),
442        'confirm_metacontacts': _('Show a confirmation dialog to create metacontacts? Empty string means never show the dialog.'),
443        'confirm_block': _('Show a confirmation dialog to block a contact? Empty string means never show the dialog.'),
444        'enable_negative_priority': _('If enabled, you will be able to set a negative priority to your account in the Accounts window. BE CAREFUL, when you are logged in with a negative priority, you will NOT receive any message from your server.'),
445        'show_contacts_number': _('If enabled, Gajim will show both the number of online and total contacts in account rows as well as in group rows.'),
446        'scroll_roster_to_last_message': _('If enabled, Gajim will scroll and select the contact who sent you the last message, if the chat window is not already opened.'),
447        'change_status_window_timeout': _('Time of inactivity needed before the change status window closes down.'),
448        'max_conversation_lines': _('Maximum number of lines that are printed in conversations. Oldest lines are cleared.'),
449        'shell_like_completion': _('If enabled, completion in group chats will be like a shell auto-completion.'),
450        'use_stun_server': _('If enabled, Gajim will try to use a STUN server when using Jingle. The one in \'stun_server\' option, or the one given by the XMPP server.'),
451        'stun_server': _('STUN server to use when using Jingle'),
452        'ignore_incoming_attention': _('If enabled, Gajim will ignore incoming attention requests (\'wizz\').'),
453        'remember_opened_chat_controls': _('If enabled, Gajim will reopen chat windows that were opened last time Gajim was closed.'),
454        'remote_commands': _('If enabled, Gajim will execute XEP-0146 Commands.'),
455        'muclumbus_api_jid': '',
456        'muclumbus_api_http_uri': '',
457        'muclumbus_api_pref': _('API Preferences. Possible values: \'http\', \'iq\''),
458        'command_system_execute': _('If enabled, Gajim will execute commands (/show, /sh, /execute, /exec).'),
459        'groupchat_roster_width': _('Width of group chat roster in pixel'),
460        'dev_force_bookmark_2': _('Force Bookmark 2 usage'),
461        'gc_notify_on_all_messages_private_default': '',
462        'gc_notify_on_all_messages_public_default': '',
463        'metacontacts_enabled': '',
464    },
465}
466
467# pylint: enable=line-too-long
468