Fixed TB when transport_name was None

This commit is contained in:
Travis Shirk 2006-02-08 02:27:14 +00:00
parent 9f1032c6e1
commit 37c2441a38
1 changed files with 10 additions and 6 deletions

View File

@ -436,12 +436,15 @@ class Interface:
show_notification = True show_notification = True
if show_notification: if show_notification:
transport_name = gajim.get_transport_name_from_jid(jid) transport_name = gajim.get_transport_name_from_jid(jid)
img = os.path.join(gajim.DATA_DIR, 'iconsets', img = None
'transports', transport_name, '48x48', 'offline.png') if transport_name:
if not os.path.isfile(img): img = os.path.join(gajim.DATA_DIR, 'iconsets',
'transports', transport_name, '48x48',
'offline.png')
if not img or not os.path.isfile(img):
iconset = gajim.config.get('iconset') iconset = gajim.config.get('iconset')
img = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, img = os.path.join(gajim.DATA_DIR, 'iconsets',
'48x48', 'offline.png') iconset, '48x48', 'offline.png')
path = gtkgui_helpers.get_path_to_generic_or_avatar(img, path = gtkgui_helpers.get_path_to_generic_or_avatar(img,
jid = jid, suffix = '_notif_size_bw.png') jid = jid, suffix = '_notif_size_bw.png')
notify.notify(_('Contact Signed Out'), jid, account, notify.notify(_('Contact Signed Out'), jid, account,
@ -1693,7 +1696,8 @@ if __name__ == '__main__':
import Queue import Queue
q = Queue.Queue(100) q = Queue.Queue(100)
m = migrate_logs_to_dot9_db.Migration() m = migrate_logs_to_dot9_db.Migration()
dialog = dialogs.ProgressDialog(_('Migrating Logs...'), _('Please wait while logs are being migrated...'), q) dialog = dialogs.ProgressDialog(_('Migrating Logs...'),
_('Please wait while logs are being migrated...'), q)
t = threading.Thread(target = m.migrate, args = (q,)) t = threading.Thread(target = m.migrate, args = (q,))
t.start() t.start()
id = gobject.timeout_add(500, wait_migration, m) id = gobject.timeout_add(500, wait_migration, m)