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
|
self.plugin.config['userfont'] = fontStr
|
||||||
#update opened chat windows
|
#update opened chat windows
|
||||||
for a in self.plugin.accounts.keys():
|
for a in self.plugin.accounts.keys():
|
||||||
for w in self.plugin.windows[a]['chats'].keys():
|
if self.plugin.windows[a]['chats'].has_key('tabbed'):
|
||||||
self.plugin.windows[a]['chats'][w].tagIn.\
|
self.plugin.windows[a]['chats']['tabbed'].update_tags()
|
||||||
set_property("foreground", self.plugin.config['inmsgcolor'])
|
else:
|
||||||
self.plugin.windows[a]['chats'][w].tagOut.\
|
for jid in self.plugin.windows[a]['chats'].keys():
|
||||||
set_property("foreground", self.plugin.config['outmsgcolor'])
|
self.plugin.windows[a]['chats'][jid].update_tags()
|
||||||
self.plugin.windows[a]['chats'][w].tagStatus.\
|
|
||||||
set_property("foreground", self.plugin.config['statusmsgcolor'])
|
|
||||||
#IconStyle
|
#IconStyle
|
||||||
ist = self.combo_iconstyle.entry.get_text()
|
ist = self.combo_iconstyle.entry.get_text()
|
||||||
self.plugin.config['iconstyle'] = ist
|
self.plugin.config['iconstyle'] = ist
|
||||||
|
|
|
@ -235,6 +235,15 @@ class tabbed_chat_Window:
|
||||||
self.print_conversation(_("%s is now %s (%s)") % (user.name, \
|
self.print_conversation(_("%s is now %s (%s)") % (user.name, \
|
||||||
user.show, user.status), user.jid, 'status')
|
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):
|
def show_title(self):
|
||||||
unread = 0
|
unread = 0
|
||||||
for jid in self.nb_unread:
|
for jid in self.nb_unread:
|
||||||
|
@ -580,6 +589,12 @@ class message_Window:
|
||||||
start = "* "
|
start = "* "
|
||||||
self.window.set_title(start + self.user.name + " (" + self.account + ")")
|
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):
|
def set_image(self, image, jid):
|
||||||
if image.get_storage_type() == gtk.IMAGE_ANIMATION:
|
if image.get_storage_type() == gtk.IMAGE_ANIMATION:
|
||||||
self.img.set_from_animation(image.get_animation())
|
self.img.set_from_animation(image.get_animation())
|
||||||
|
|
Loading…
Reference in New Issue