Changeset 10025
- Timestamp:
- 07/25/08 03:10:14 (5 weeks ago)
- Location:
- trunk/src
- Files:
-
- 2 modified
-
common/pep.py (modified) (1 diff)
-
roster_window.py (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common/pep.py
r10023 r10025 63 63 del contact.mood['text'] 64 64 65 gajim.interface.roster.draw_mood(user, name) 66 ctrl = gajim.interface.msg_win_mgr.get_control(user, name) 67 if ctrl: 68 ctrl.update_mood() 65 if jid == gajim.get_jid_from_account(name): 66 gajim.interface.roster.draw_account(name) 67 else: 68 gajim.interface.roster.draw_mood(user, name) 69 ctrl = gajim.interface.msg_win_mgr.get_control(user, name) 70 if ctrl: 71 ctrl.update_mood() 69 72 70 73 def user_tune(items, name, jid): -
trunk/src/roster_window.py
r10023 r10025 232 232 parent_iter) 233 233 else: 234 # we tested all 234 # we tested all 235 235 # contacts in this group 236 236 contact_iter = None … … 617 617 618 618 Nearby family is the part of the family that is grouped with the metacontact. 619 A metacontact may be over different accounts. If regroup is s False the 619 A metacontact may be over different accounts. If regroup is s False the 620 620 given family is split account wise. 621 621 … … 788 788 if gajim.account_is_connected(account): 789 789 show = 'online' 790 else: 790 else: 791 791 show = 'offline' 792 792 status = '' … … 974 974 975 975 self.model[child_iter][C_NAME] = account_name 976 977 if gajim.connections[account].mood.has_key('mood') \ 978 and gajim.connections[account].mood['mood'] in MOODS: 979 self.model[child_iter][C_MOOD_PIXBUF] = \ 980 gtkgui_helpers.load_mood_icon( 981 gajim.connections[account].mood['mood']). \ 982 get_pixbuf() 983 elif gajim.connections[account].mood.has_key('mood'): 984 self.model[child_iter][C_MOOD_PIXBUF] = \ 985 gtkgui_helpers.load_mood_icon('unknown'). \ 986 get_pixbuf() 987 else: 988 self.model[child_iter][C_MOOD_PIXBUF] = None 989 976 990 return False 977 991 … … 1275 1289 '''create new empty model and draw roster''' 1276 1290 self.modelfilter = None 1277 # (icon, name, type, jid, account, editable, mood_pixbuf, 1291 # (icon, name, type, jid, account, editable, mood_pixbuf, 1278 1292 # avatar_pixbuf, padlock_pixbuf) 1279 1293 self.model = gtk.TreeStore(gtk.Image, str, str, str, str, … … 1415 1429 for _acc in accounts: 1416 1430 for contact in gajim.contacts.iter_contacts(_acc): 1417 # Is this contact in this group ? (last part of if check if it's 1418 # self contact) 1431 # Is this contact in this group ? (last part of if check if it's 1432 # self contact) 1419 1433 if group in contact.get_shown_groups(): 1420 1434 if self.contact_is_visible(contact, _acc): … … 1438 1452 if contact and self.contact_is_visible(contact, account): 1439 1453 return True 1440 return False 1454 return False 1441 1455 else: 1442 1456 contact = gajim.contacts.get_first_contact_from_jid(account, jid) … … 3044 3058 contact.sub = 'from' 3045 3059 # we can't see him, but have to set it manually in contact 3046 contact.show = 'offline' 3060 contact.show = 'offline' 3047 3061 gajim.contacts.add_contact(account, contact) 3048 3062 self.add_contact(contact.jid, account) … … 4193 4207 theme = gajim.config.get('roster_theme') 4194 4208 type_ = model[titer][C_TYPE] 4195 if type_ in ('group', 'account'):4209 if type_ == 'group': 4196 4210 renderer.set_property('visible', False) 4197 4211 return … … 4202 4216 else: 4203 4217 renderer.set_property('visible', False) 4204 if type_: # prevent type_ = None, see http://trac.gajim.org/ticket/2534 4205 if not model[titer][C_JID] or not model[titer][C_ACCOUNT]: 4218 if type_ == 'account': 4219 color = gajim.config.get_per('themes', theme, 4220 'accountbgcolor') 4221 if color: 4222 renderer.set_property('cell-background', color) 4223 else: 4224 self.set_renderer_color(renderer, 4225 gtk.STATE_ACTIVE 4226 # align pixbuf to the right) 4227 renderer.set_property('xalign', 1) 4228 # prevent type_ = None, see http://trac.gajim.org/ticket/2534 4229 elif type_: 4230 if not model[titer][C_JID] \ 4231 or not model[titer][C_ACCOUNT]: 4206 4232 # This can append at the moment we add the row 4207 4233 return … … 4209 4235 account = model[titer][C_ACCOUNT].decode('utf-8') 4210 4236 if jid in gajim.newly_added[account]: 4211 renderer.set_property('cell-background', gajim.config.get( 4237 renderer.set_property('cell-background', 4238 gajim.config.get( 4212 4239 'just_connected_bg_color')) 4213 4240 elif jid in gajim.to_be_removed[account]: 4214 renderer.set_property('cell-background', gajim.config.get( 4241 renderer.set_property('cell-background', 4242 gajim.config.get( 4215 4243 'just_disconnected_bg_color')) 4216 4244 else: 4217 color = gajim.config.get_per('themes', theme, 'contactbgcolor') 4245 color = gajim.config.get_per('themes', 4246 theme, 'contactbgcolor') 4218 4247 if color: 4219 renderer.set_property('cell-background', color) 4248 renderer.set_property( 4249 'cell-background', color) 4220 4250 else: 4221 renderer.set_property('cell-background', None) 4222 renderer.set_property('xalign', 1) # align pixbuf to the right 4251 renderer.set_property( 4252 'cell-background', None) 4253 # align pixbuf to the right 4254 renderer.set_property('xalign', 1) 4223 4255 4224 4256
