diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index 9b1d81bb1..5beeacfd6 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -708,15 +708,15 @@ class tabbed_chat_window: conversation_textview = self.xmls[jid].get_widget('conversation_textview') conversation_buffer = conversation_textview.get_buffer() - # make it CAPS (emoticons keys are are CAPS) + # make it CAPS (emoticons keys are all CAPS) possible_emot_ascii_caps = text.upper() if possible_emot_ascii_caps in self.plugin.emoticons.keys(): #it's an emoticon - text = possible_emot_ascii_caps - print 'emoticon:', text + emot_ascii = possible_emot_ascii_caps + print 'emoticon:', emot_ascii end_iter = conversation_buffer.get_end_iter() conversation_buffer.insert_pixbuf(end_iter, \ - self.plugin.emoticons[text]) + self.plugin.emoticons[emot_ascii]) return elif text.startswith('mailto:'): #it's a mail @@ -3544,7 +3544,7 @@ class plugin: return False return True - def make_pattern_with_formatting_on(self, formatting_on=True): + def make_pattern(self): # regexp meta characters are: . ^ $ * + ? { } [ ] \ | ( ) # one escapes the metachars with \ # \S matches anything but ' ' '\t' '\n' '\r' '\f' and '\v' @@ -3561,29 +3561,27 @@ class plugin: # | means or # [^*] anything but '*' (inside [] you don't have to escape metachars) # [^\s*] anything but whitespaces and '*' - # (?<=\s) is a one char lookbehind assertion and asks for any leading whitespace - # and combined with ^ (beginning of lines) we have correct formatting detection + # (?