From cb0b669b45154f2298bdedac516bf1d87d2bf15b Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 15 Jan 2006 13:55:19 +0000 Subject: [PATCH] detect URL before email. Fixes #1261 --- src/conversation_textview.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/conversation_textview.py b/src/conversation_textview.py index bb2d7627b..262dce3f7 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -458,7 +458,20 @@ class ConversationTextview(gtk.TextView): img.set_from_file(gajim.interface.emoticons[emot_ascii]) img.show() #add with possible animation - self.add_child_at_anchor(img, anchor) + self.add_child_at_anchor(img, anchor) + elif special_text.startswith('http://') or \ + special_text.startswith('www.') or \ + special_text.startswith('ftp://') or \ + special_text.startswith('ftp.') or \ + special_text.startswith('https://') or \ + special_text.startswith('gopher://') or \ + special_text.startswith('news://') or \ + special_text.startswith('ed2k://') or \ + special_text.startswith('irc://') or \ + special_text.startswith('magnet:'): + #it's a url + tags.append('url') + use_other_tags = False elif special_text.startswith('mailto:'): #it's a mail tags.append('mail')