fix syntax
This commit is contained in:
parent
5951ea5d86
commit
8bb9df92d4
|
@ -352,9 +352,8 @@ class ConversationTextview:
|
||||||
adjustment.set_value(0)
|
adjustment.set_value(0)
|
||||||
return False # when called in an idle_add, just do it once
|
return False # when called in an idle_add, just do it once
|
||||||
|
|
||||||
def bring_scroll_to_end(self, diff_y = 0,\
|
def bring_scroll_to_end(self, diff_y = 0,
|
||||||
use_smooth =\
|
use_smooth=gajim.config.get('use_smooth_scrolling')):
|
||||||
gajim.config.get('use_smooth_scrolling')):
|
|
||||||
''' scrolls to the end of textview if end is not visible '''
|
''' scrolls to the end of textview if end is not visible '''
|
||||||
buffer = self.tv.get_buffer()
|
buffer = self.tv.get_buffer()
|
||||||
end_iter = buffer.get_end_iter()
|
end_iter = buffer.get_end_iter()
|
||||||
|
@ -904,12 +903,12 @@ class ConversationTextview:
|
||||||
use_other_tags = False
|
use_other_tags = False
|
||||||
elif special_text.startswith('*'): # it's a bold text
|
elif special_text.startswith('*'): # it's a bold text
|
||||||
tags.append('bold')
|
tags.append('bold')
|
||||||
if special_text[1] == '/' and special_text[-2] == '/' and
|
if special_text[1] == '/' and special_text[-2] == '/' and\
|
||||||
len(special_text) > 4: # it's also italic
|
len(special_text) > 4: # it's also italic
|
||||||
tags.append('italic')
|
tags.append('italic')
|
||||||
if not show_ascii_formatting_chars:
|
if not show_ascii_formatting_chars:
|
||||||
special_text = special_text[2:-2] # remove */ /*
|
special_text = special_text[2:-2] # remove */ /*
|
||||||
elif special_text[1] == '_' and special_text[-2] == '_' and
|
elif special_text[1] == '_' and special_text[-2] == '_' and \
|
||||||
len(special_text) > 4: # it's also underlined
|
len(special_text) > 4: # it's also underlined
|
||||||
tags.append('underline')
|
tags.append('underline')
|
||||||
if not show_ascii_formatting_chars:
|
if not show_ascii_formatting_chars:
|
||||||
|
@ -919,12 +918,12 @@ class ConversationTextview:
|
||||||
special_text = special_text[1:-1] # remove * *
|
special_text = special_text[1:-1] # remove * *
|
||||||
elif special_text.startswith('/'): # it's an italic text
|
elif special_text.startswith('/'): # it's an italic text
|
||||||
tags.append('italic')
|
tags.append('italic')
|
||||||
if special_text[1] == '*' and special_text[-2] == '*' and
|
if special_text[1] == '*' and special_text[-2] == '*' and \
|
||||||
len(special_text) > 4: # it's also bold
|
len(special_text) > 4: # it's also bold
|
||||||
tags.append('bold')
|
tags.append('bold')
|
||||||
if not show_ascii_formatting_chars:
|
if not show_ascii_formatting_chars:
|
||||||
special_text = special_text[2:-2] # remove /* */
|
special_text = special_text[2:-2] # remove /* */
|
||||||
elif special_text[1] == '_' and special_text[-2] == '_' and
|
elif special_text[1] == '_' and special_text[-2] == '_' and \
|
||||||
len(special_text) > 4: # it's also underlined
|
len(special_text) > 4: # it's also underlined
|
||||||
tags.append('underline')
|
tags.append('underline')
|
||||||
if not show_ascii_formatting_chars:
|
if not show_ascii_formatting_chars:
|
||||||
|
@ -934,12 +933,12 @@ class ConversationTextview:
|
||||||
special_text = special_text[1:-1] # remove / /
|
special_text = special_text[1:-1] # remove / /
|
||||||
elif special_text.startswith('_'): # it's an underlined text
|
elif special_text.startswith('_'): # it's an underlined text
|
||||||
tags.append('underline')
|
tags.append('underline')
|
||||||
if special_text[1] == '*' and special_text[-2] == '*' and
|
if special_text[1] == '*' and special_text[-2] == '*' and \
|
||||||
len(special_text) > 4: # it's also bold
|
len(special_text) > 4: # it's also bold
|
||||||
tags.append('bold')
|
tags.append('bold')
|
||||||
if not show_ascii_formatting_chars:
|
if not show_ascii_formatting_chars:
|
||||||
special_text = special_text[2:-2] # remove _* *_
|
special_text = special_text[2:-2] # remove _* *_
|
||||||
elif special_text[1] == '/' and special_text[-2] == '/' and
|
elif special_text[1] == '/' and special_text[-2] == '/' and \
|
||||||
len(special_text) > 4: # it's also italic
|
len(special_text) > 4: # it's also italic
|
||||||
tags.append('italic')
|
tags.append('italic')
|
||||||
if not show_ascii_formatting_chars:
|
if not show_ascii_formatting_chars:
|
||||||
|
|
Loading…
Reference in New Issue