changeset 5b72071ed7de in /home/hg/repos/gajim details:http://hg.gajim.org/gajim?cmd=changeset;node=5b72071ed7de description: handle URI in a better way. some require ://, some only :. Fixes #5841
diffstat: configure.ac | 2 +- src/common/config.py | 2 +- src/common/defs.py | 2 +- src/common/optparser.py | 7 +++++++ src/conversation_textview.py | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diffs (68 lines): diff -r 818f96979ba6 -r 5b72071ed7de configure.ac --- a/configure.ac Sat Aug 14 22:42:47 2010 +0200 +++ b/configure.ac Sun Aug 15 21:51:40 2010 +0200 @@ -1,5 +1,5 @@ AC_INIT([Gajim - A Jabber Instant Messager], - [0.13.90],[http://trac.gajim.org/],[gajim]) + [0.13.90.1],[http://trac.gajim.org/],[gajim]) AC_PREREQ([2.59]) AC_CONFIG_HEADER(config.h) diff -r 818f96979ba6 -r 5b72071ed7de src/common/config.py --- a/src/common/config.py Sat Aug 14 22:42:47 2010 +0200 +++ b/src/common/config.py Sun Aug 15 21:51:40 2010 +0200 @@ -270,7 +270,7 @@ 'attach_notifications_to_systray': [opt_bool, False, _('If True, notification windows from notification-daemon will be attached to systray icon.')], 'check_idle_every_foo_seconds': [opt_int, 2, _('Choose interval between 2 checks of idleness.')], 'latex_png_dpi': [opt_str, '108', _('Change the value to change the size of latex formulas displayed. The higher is larger.') ], - 'uri_schemes': [opt_str, 'aaa aaas acap cap cid crid data dav dict dns fax file ftp go gopher h323 http https 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 rtsp service shttp sip sips snmp soap.beep soap.beeps tag tel telnet tftp thismessage tip tv urn vemmi xmlrpc.beep xmlrpc.beeps z39.50r z39.50s about cvs daap ed2k feed fish git iax2 irc ircs ldaps magnet mms rsync ssh svn sftp smb webcal', _('Valid uri schemes. Only schemes in this list will be accepted as "real" uri. (mailto and xmpp are handled separately)'), True], + 'uri_schemes': [opt_str, '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: shttp:// 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://', _('Valid uri schemes. Only schemes in this list will be accepted as "real" uri. (mailto and xmpp are handled separately)'), True], 'ask_offline_status_on_connection': [ opt_bool, False, _('Ask offline status message to all offline contacts when connection to an accoutn is established. WARNING: This causes a lot of requests to be sent!') ], 'shell_like_completion': [ opt_bool, False, _('If True, completion in groupchats will be like a shell auto-completion')], 'show_self_contact': [opt_str, 'when_other_resource', _('When is self contact row displayed. Can be "always", "when_other_resource" or "never"'), True], diff -r 818f96979ba6 -r 5b72071ed7de src/common/defs.py --- a/src/common/defs.py Sat Aug 14 22:42:47 2010 +0200 +++ b/src/common/defs.py Sun Aug 15 21:51:40 2010 +0200 @@ -27,7 +27,7 @@ basedir = '../' localedir = '../po' -version = '0.13.90' +version = '0.13.90.1' import sys, os.path for base in ('.', 'common'): diff -r 818f96979ba6 -r 5b72071ed7de src/common/optparser.py --- a/src/common/optparser.py Sat Aug 14 22:42:47 2010 +0200 +++ b/src/common/optparser.py Sun Aug 15 21:51:40 2010 +0200 @@ -220,6 +220,8 @@ self.update_config_to_013100() if old < [0, 13, 10, 1] and new >= [0, 13, 10, 1]: self.update_config_to_013101() + if old < [0, 13, 90, 1] and new >= [0, 13, 90, 1]: + self.update_config_to_013901() gajim.logger.init_vars() gajim.logger.attach_cache_database() @@ -886,3 +888,8 @@ pass con.close() gajim.config.set('version', '0.13.10.1') + + def update_config_to_013901(self): + 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: shttp:// 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://' + gajim.config.set('uri_schemes', schemes) + gajim.config.set('version', '0.13.90.1') \ No newline at end of file diff -r 818f96979ba6 -r 5b72071ed7de src/conversation_textview.py --- a/src/conversation_textview.py Sat Aug 14 22:42:47 2010 +0200 +++ b/src/conversation_textview.py Sun Aug 15 21:51:40 2010 +0200 @@ -1042,7 +1042,7 @@ # Check if we accept this as an uri schemes = gajim.config.get('uri_schemes').split() for scheme in schemes: - if special_text.startswith(scheme + ':'): + if special_text.startswith(scheme): text_is_valid_uri = True possible_emot_ascii_caps = special_text.upper() # emoticons keys are CAPS _______________________________________________ Commits mailing list [email protected] http://lists.gajim.org/cgi-bin/listinfo/commits
