Philipp Hörist pushed to branch master at gajim / gajim
Commits: 0a48fac5 by lovetox at 2020-09-09T10:44:02+02:00 Move uri_schemes to const module
- - - - - d8aa6c93 by lovetox at 2020-09-09T10:45:22+02:00 Remove send_chatstate from advanced config
We have a setting in the Accounts Window now
- - - - -
3 changed files:
- gajim/common/const.py - gajim/common/setting_values.py - gajim/conversation_textview.py
Changes:
===================================== gajim/common/const.py ===================================== @@ -994,3 +994,93 @@ SHOW_LIST = [ 'dnd', 'error' ] + + +URI_SCHEMES = { + 'aaa://', + 'aaas://', + 'acap://', + 'cap://', + 'cid:', + 'crid://', + 'data:', + 'dav:', + 'dict://', + 'dns:', + 'fax:', + 'file:/', + 'ftp://', + 'geo:', + 'go:', + 'gopher://', + 'h323:', + 'http://', + 'https://', + 'iax:', + 'icap://', + 'im:', + 'imap://', + 'info:', + 'ipp://', + 'iris:', + 'iris.beep:', + 'iris.xpc:', + 'iris.xpcs:', + 'iris.lwz:', + 'ldap://', + 'mid:', + 'modem:', + 'msrp://', + 'msrps://', + 'mtqp://', + 'mupdate://', + 'news:', + 'nfs://', + 'nntp://', + 'opaquelocktoken:', + 'pop://', + 'pres:', + 'prospero://', + 'rtsp://', + 'service:', + 'sip:', + 'sips:', + 'sms:', + 'snmp://', + 'soap.beep://', + 'soap.beeps://', + 'tag:', + 'tel:', + 'telnet://', + 'tftp://', + 'thismessage:/', + 'tip://', + 'tv:', + 'urn://', + 'vemmi://', + 'xmlrpc.beep://', + 'xmlrpc.beeps://', + 'z39.50r://', + 'z39.50s://', + 'about:', + 'apt:', + 'cvs://', + 'daap://', + 'ed2k://', + 'feed:', + 'fish://', + 'git://', + 'iax2:', + 'irc://', + 'ircs://', + 'ldaps://', + 'magnet:', + 'mms://', + 'rsync://', + 'ssh://', + 'svn://', + 'sftp://', + 'smb://', + 'webcal://', + 'aesgcm://', +}
===================================== gajim/common/setting_values.py ===================================== @@ -149,7 +149,6 @@ APP_SETTINGS = { 'scroll_roster_to_last_message': True, 'change_status_window_timeout': 15, 'max_conversation_lines': 500, - 'uri_schemes': 'aaa:// aaas:// acap:// cap:// cid: crid:// data: dav: dict:// dns: fax: file:/ ftp:// geo: go: gopher:// h323: http:// https:// iax: icap:// im: imap:// info: ipp:// iris: iris.beep: iris.xpc: iris.xpcs: iris.lwz: ldap:// mid: modem: msrp:// msrps:// mtqp:// mupdate:// news: nfs:// nntp:// opaquelocktoken: pop:// pres: prospero:// rtsp:// service: sip: sips: sms: snmp:// soap.beep:// soap.beeps:// tag: tel: telnet:// tftp:// thismessage:/ tip:// tv: urn:// vemmi:// xmlrpc.beep:// xmlrpc.beeps:// z39.50r:// z39.50s:// about: apt: cvs:// daap:// ed2k:// feed: fish:// git:// iax2: irc:// ircs:// ldaps:// magnet: mms:// rsync:// ssh:// svn:// sftp:// smb:// webcal:// aesgcm://', 'shell_like_completion': False, 'audio_input_device': 'autoaudiosrc ! volume name=gajim_vol', 'audio_output_device': 'autoaudiosink', @@ -444,7 +443,6 @@ ADVANCED_SETTINGS = { '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.'), 'change_status_window_timeout': _('Time of inactivity needed before the change status window closes down.'), 'max_conversation_lines': _('Maximum number of lines that are printed in conversations. Oldest lines are cleared.'), - 'uri_schemes': _('Valid URI schemes. Only schemes in this list will be accepted as 'real' URI (mailto and xmpp are handled separately).'), 'shell_like_completion': _('If enabled, completion in group chats will be like a shell auto-completion.'), '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.'), 'stun_server': _('STUN server to use when using Jingle'), @@ -453,7 +451,6 @@ ADVANCED_SETTINGS = { 'remote_commands': _('If enabled, Gajim will execute XEP-0146 Commands.'), 'threshold_options': _('Options in days which can be chosen in the sync threshold menu'), 'private_room_sync_threshold': _('Maximum history in days we request from a private group chat archive. 0: As much as possible.'), - 'send_chatstate_default': _('Chat state notifications that are sent to contacts. Possible values: all, composing_only, disabled'), 'muclumbus_api_jid': '', 'muclumbus_api_http_uri': '', 'muclumbus_api_pref': _('API Preferences. Possible values: 'http', 'iq''), @@ -462,7 +459,6 @@ ADVANCED_SETTINGS = { 'dev_force_bookmark_2': _('Force Bookmark 2 usage'), 'gc_notify_on_all_messages_private_default': '', 'gc_notify_on_all_messages_public_default': '', - 'gc_send_chatstate_default': '', }, }
===================================== gajim/conversation_textview.py ===================================== @@ -41,6 +41,7 @@ from gajim.common.i18n import _ from gajim.common.helpers import AdditionalDataDict from gajim.common.const import StyleAttr from gajim.common.const import Trust +from gajim.common.const import URI_SCHEMES from gajim.common.helpers import to_user_string
from gajim.gtk import util @@ -642,8 +643,7 @@ class ConversationTextview(GObject.GObject): break
# Check if we accept this as an uri - schemes = app.settings.get('uri_schemes').split() - for scheme in schemes: + for scheme in URI_SCHEMES: if special_text.startswith(scheme): text_is_valid_uri = True
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/b4c10c7111a76cca76baac02a51b5c16...