globals() not locals()
This commit is contained in:
parent
6273d33c34
commit
14b8d03a56
2 changed files with 6 additions and 3 deletions
|
@ -230,7 +230,7 @@ class Chat:
|
||||||
self.nb_unread[jid] = 0
|
self.nb_unread[jid] = 0
|
||||||
self.last_message_time[jid] = 0
|
self.last_message_time[jid] = 0
|
||||||
|
|
||||||
if gajim.config.get('use_speller') and 'gtkspell' in locals():
|
if gajim.config.get('use_speller') and 'gtkspell' in globals():
|
||||||
message_textview = self.xmls[jid].get_widget('message_textview')
|
message_textview = self.xmls[jid].get_widget('message_textview')
|
||||||
gtkspell.Spell(message_textview)
|
gtkspell.Spell(message_textview)
|
||||||
|
|
||||||
|
|
|
@ -179,7 +179,7 @@ class Preferences_window:
|
||||||
self.xml.get_widget('use_tabbed_chat_window_checkbutton').set_active(st)
|
self.xml.get_widget('use_tabbed_chat_window_checkbutton').set_active(st)
|
||||||
|
|
||||||
#use speller
|
#use speller
|
||||||
if 'gtkspell' in locals():
|
if 'gtkspell' in globals():
|
||||||
st = gajim.config.get('use_speller')
|
st = gajim.config.get('use_speller')
|
||||||
self.xml.get_widget('speller_checkbutton').set_active(st)
|
self.xml.get_widget('speller_checkbutton').set_active(st)
|
||||||
else:
|
else:
|
||||||
|
@ -609,7 +609,8 @@ class Preferences_window:
|
||||||
windows = self.plugin.windows[acct][kind]
|
windows = self.plugin.windows[acct][kind]
|
||||||
jids = windows.keys()
|
jids = windows.keys()
|
||||||
for jid in jids:
|
for jid in jids:
|
||||||
print jid
|
if jid == 'tabbed':
|
||||||
|
continue
|
||||||
window = windows[jid]
|
window = windows[jid]
|
||||||
textview = window.xmls[jid].get_widget('message_textview')
|
textview = window.xmls[jid].get_widget('message_textview')
|
||||||
gtkspell.Spell(textview)
|
gtkspell.Spell(textview)
|
||||||
|
@ -619,6 +620,8 @@ class Preferences_window:
|
||||||
windows = self.plugin.windows[acct][kind]
|
windows = self.plugin.windows[acct][kind]
|
||||||
jids = windows.keys()
|
jids = windows.keys()
|
||||||
for jid in jids:
|
for jid in jids:
|
||||||
|
if jid == 'tabbed':
|
||||||
|
continue
|
||||||
window = windows[jid]
|
window = windows[jid]
|
||||||
textview = window.xmls[jid].get_widget('message_textview')
|
textview = window.xmls[jid].get_widget('message_textview')
|
||||||
spell_obj = gtkspell.get_from_text_view(textview)
|
spell_obj = gtkspell.get_from_text_view(textview)
|
||||||
|
|
Loading…
Add table
Reference in a new issue