Changeset 10038
- Timestamp:
- 07/27/08 12:21:51 (4 months ago)
- Location:
- trunk/src
- Files:
-
- 4 modified
-
gtkgui_helpers.py (modified) (1 diff)
-
notify.py (modified) (2 diffs)
-
roster_window.py (modified) (1 diff)
-
vcard.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gtkgui_helpers.py
r9986 r10038 616 616 '''Chooses between avatar image and default image. 617 617 Returns full path to the avatar image if it exists, 618 otherwise returns full path to the image.''' 618 otherwise returns full path to the image. 619 generic must be with extension and suffix without''' 619 620 if jid: 621 # we want an avatar 620 622 puny_jid = helpers.sanitize_filename(jid) 621 623 path_to_file = os.path.join(gajim.AVATAR_PATH, puny_jid) + suffix 622 filepath, extension = os.path.splitext(path_to_file) 623 path_to_local_file = filepath + '_local' + extension 624 if os.path.exists(path_to_local_file): 625 return path_to_local_file 626 if os.path.exists(path_to_file): 627 return path_to_file 624 path_to_local_file = path_to_file + '_local' 625 for extension in ('.png', '.jpeg'): 626 path_to_local_file_full = path_to_local_file + extension 627 if os.path.exists(path_to_local_file_full): 628 return path_to_local_file_full 629 for extension in ('.png', '.jpeg'): 630 path_to_file_full = path_to_file + extension 631 if os.path.exists(path_to_file_full): 632 return path_to_file_full 628 633 return os.path.abspath(generic) 629 634 -
trunk/src/notify.py
r9664 r10038 206 206 if event == 'contact_disconnected': 207 207 show_image = 'offline.png' 208 suffix = '_notif_size_bw .png'208 suffix = '_notif_size_bw' 209 209 else: #Status Change or Connected 210 210 # FIXME: for status change, … … 212 212 # first need 48x48 for all status 213 213 show_image = 'online.png' 214 suffix = '_notif_size_colored .png'214 suffix = '_notif_size_colored' 215 215 transport_name = gajim.get_transport_name_from_jid(jid) 216 216 img = None -
trunk/src/roster_window.py
r10036 r10038 4117 4117 4118 4118 ctrl = gajim.interface.msg_win_mgr.get_control(jid, account) 4119 if ctrl and ctrl.type_id != message_control.TYPE_GC:4119 if ctrl: 4120 4120 ctrl.show_avatar() 4121 4121 -
trunk/src/vcard.py
r9905 r10038 121 121 self.progressbar.pulse() 122 122 return True # loop forever 123 124 def update_avatar_in_gui(self):125 jid = self.contact.jid126 # Update roster127 gajim.interface.roster.draw_avatar(jid, self.account)128 # Update chat windows129 ctrl = gajim.interface.msg_win_mgr.get_control(jid, self.account)130 if ctrl and ctrl.type_id != message_control.TYPE_GC:131 ctrl.show_avatar()132 123 133 124 def on_vcard_information_window_destroy(self, widget):
