Changeset 9898 for trunk/src/conversation_textview.py
- Timestamp:
- 07/08/08 20:49:51 (5 months ago)
- Files:
-
- 1 modified
-
trunk/src/conversation_textview.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/conversation_textview.py
r9827 r9898 908 908 # add with possible animation 909 909 self.tv.add_child_at_anchor(img, anchor) 910 #FIXME: one day, somehow sync with regexp in gajim.py 911 elif special_text.startswith('http://') or \ 912 special_text.startswith('www.') or \ 913 special_text.startswith('ftp://') or \ 914 special_text.startswith('ftp.') or \ 915 special_text.startswith('https://') or \ 916 special_text.startswith('gopher://') or \ 917 special_text.startswith('news://') or \ 918 special_text.startswith('ed2k://') or \ 919 special_text.startswith('irc://') or \ 920 special_text.startswith('sip:') or \ 921 special_text.startswith('magnet:'): 922 # it's a url 910 elif special_text.startswith('www.') or \ 911 special_text.startswith('ftp.'): 923 912 tags.append('url') 924 913 use_other_tags = False … … 992 981 use_other_tags = False 993 982 else: 994 #it's a url 995 tags.append('url') 996 use_other_tags = False 983 # Check if we accept this as an uri 984 schemes = gajim.config.get('uri_schemes').split() 985 for scheme in schemes: 986 if special_text.startswith(scheme + ':'): 987 tags.append('url') 988 use_other_tags = False 989 # It's not a accepted uri 990 if use_other_tags: 991 end_iter = buffer.get_end_iter() 992 buffer.insert_with_tags_by_name(end_iter, special_text, *other_tags) 997 993 998 994 if len(tags) > 0: … … 1172 1168 if name and (text.startswith('/me ') or text.startswith('/me\n')): 1173 1169 text = '* ' + name + text[3:] 1170 text_tags.append('italic') 1174 1171 # detect urls formatting and if the user has it on emoticons 1175 1172 index = self.detect_and_print_special_text(text, text_tags)
