commit to bug test with alex
This commit is contained in:
parent
3feff20ddd
commit
0affca1760
|
@ -572,7 +572,8 @@ Copyright © 2003-2005 Gajim Team
|
|||
<b>Gajim Team</b>
|
||||
Vincent Hanquez (tab@snarc.org)
|
||||
Yann Le Boulanger (asterix@lagaule.org)
|
||||
Nikos Kouremenos (nkour@jabber.org)</property>
|
||||
Nikos Kouremenos (nkour@jabber.org)
|
||||
Alex Podaras (bigpod@jabber.org)</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
|
@ -4826,7 +4827,7 @@ Custom</property>
|
|||
<child>
|
||||
<widget class="GtkLabel" id="label199">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Browser</property>
|
||||
<property name="label" translatable="yes">Browser:</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
|
@ -4850,7 +4851,7 @@ Custom</property>
|
|||
<child>
|
||||
<widget class="GtkLabel" id="label200">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Mail app</property>
|
||||
<property name="label" translatable="yes">Mail :</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
|
|
|
@ -365,6 +365,9 @@ class tabbed_chat_window:
|
|||
if len(self.xmls) == 1:
|
||||
self.chat_notebook.set_show_tabs(False)
|
||||
self.show_title()
|
||||
|
||||
def hyperlink_handler(self, *args):
|
||||
pass
|
||||
|
||||
def new_user(self, user):
|
||||
self.nb_unread[user.jid] = 0
|
||||
|
@ -374,7 +377,9 @@ class tabbed_chat_window:
|
|||
conversation_textview = \
|
||||
self.xmls[user.jid].get_widget('conversation_textview')
|
||||
conversation_buffer = conversation_textview.get_buffer()
|
||||
self.link_tag = conversation_buffer.create_tag('hyperlink', foreground='blue')
|
||||
end_iter = conversation_buffer.get_end_iter()
|
||||
self.link_tag.connect('event', self.hyperlink_handler)
|
||||
conversation_buffer.create_mark('end', end_iter, 0)
|
||||
self.tagIn[user.jid] = conversation_buffer.create_tag('incoming')
|
||||
color = self.plugin.config['inmsgcolor']
|
||||
|
@ -545,7 +550,25 @@ class tabbed_chat_window:
|
|||
index+=l
|
||||
beg = index
|
||||
index+=1
|
||||
conversation_buffer.insert(end_iter, otext[beg:])
|
||||
#conversation_buffer.insert(end_iter, otext[beg:])
|
||||
|
||||
linksprefix = ['http://', 'https://', 'news://', 'ftp://', 'mailto:', 'ed2k://', 'www.', 'ftp.']
|
||||
start=0
|
||||
otext_lowered = otext.lower() # make them all small letters
|
||||
for word in otext_lowered.split(): # get each word seperately
|
||||
# word must be larger than the linksprefix items which atm the smaller is 4
|
||||
if len(word) > 4:
|
||||
for travelthru in range(len(linksprefix)): # travel tru linksprefix list
|
||||
# linksprefix[travelthru] is http:// then https:// then news:// etc..
|
||||
if word.startswith(linksprefix[travelthru]):
|
||||
start = otext_lowered.index(word)
|
||||
end = start + len(word)
|
||||
print word, 'is a link and is in otext[%s:%s]' % (start, end)
|
||||
conversation_buffer.insert_with_tags_by_name(end_iter, otext[start:end], 'hyperlink')
|
||||
end_iter = conversation_buffer.get_end_iter()
|
||||
break
|
||||
|
||||
conversation_buffer.insert(end_iter, otext[start:])
|
||||
|
||||
#scroll to the end of the textview
|
||||
conversation_textview.scroll_to_mark(conversation_buffer.get_mark('end'),\
|
||||
|
|
Loading…
Reference in New Issue