more general method to update tags that works for tabbed and not tabbed chat window
This commit is contained in:
parent
cb3d49d732
commit
21f8057fed
|
@ -193,13 +193,11 @@ class preference_Window:
|
|||
self.plugin.config['userfont'] = fontStr
|
||||
#update opened chat windows
|
||||
for a in self.plugin.accounts.keys():
|
||||
for w in self.plugin.windows[a]['chats'].keys():
|
||||
self.plugin.windows[a]['chats'][w].tagIn.\
|
||||
set_property("foreground", self.plugin.config['inmsgcolor'])
|
||||
self.plugin.windows[a]['chats'][w].tagOut.\
|
||||
set_property("foreground", self.plugin.config['outmsgcolor'])
|
||||
self.plugin.windows[a]['chats'][w].tagStatus.\
|
||||
set_property("foreground", self.plugin.config['statusmsgcolor'])
|
||||
if self.plugin.windows[a]['chats'].has_key('tabbed'):
|
||||
self.plugin.windows[a]['chats']['tabbed'].update_tags()
|
||||
else:
|
||||
for jid in self.plugin.windows[a]['chats'].keys():
|
||||
self.plugin.windows[a]['chats'][jid].update_tags()
|
||||
#IconStyle
|
||||
ist = self.combo_iconstyle.entry.get_text()
|
||||
self.plugin.config['iconstyle'] = ist
|
||||
|
|
|
@ -235,6 +235,15 @@ class tabbed_chat_Window:
|
|||
self.print_conversation(_("%s is now %s (%s)") % (user.name, \
|
||||
user.show, user.status), user.jid, 'status')
|
||||
|
||||
def update_tags(self):
|
||||
for jid in self.tagIn:
|
||||
self.tagIn[jid].set_property("foreground", \
|
||||
self.plugin.config['inmsgcolor'])
|
||||
self.tagOut[jid].set_property("foreground", \
|
||||
self.plugin.config['outmsgcolor'])
|
||||
self.tagStatus[jid].set_property("foreground", \
|
||||
self.plugin.config['statusmsgcolor'])
|
||||
|
||||
def show_title(self):
|
||||
unread = 0
|
||||
for jid in self.nb_unread:
|
||||
|
@ -580,6 +589,12 @@ class message_Window:
|
|||
start = "* "
|
||||
self.window.set_title(start + self.user.name + " (" + self.account + ")")
|
||||
|
||||
def update_tags(self):
|
||||
self.tagIn.set_property("foreground", self.plugin.config['inmsgcolor'])
|
||||
self.tagOut.set_property("foreground", self.plugin.config['outmsgcolor'])
|
||||
self.tagStatus.set_property("foreground", \
|
||||
self.plugin.config['statusmsgcolor'])
|
||||
|
||||
def set_image(self, image, jid):
|
||||
if image.get_storage_type() == gtk.IMAGE_ANIMATION:
|
||||
self.img.set_from_animation(image.get_animation())
|
||||
|
|
Loading…
Reference in New Issue