show roster when there are no old and new logs

This commit is contained in:
Dimitur Kirov 2006-04-08 01:11:11 +00:00
parent fa764c1379
commit e95cd81587
1 changed files with 21 additions and 23 deletions

View File

@ -1884,31 +1884,29 @@ if __name__ == '__main__':
# Migrate old logs if we have such olds logs
from common import logger
from migrate_logs_to_dot9_db import PATH_TO_LOGS_BASE_DIR
LOG_DB_PATH = logger.LOG_DB_PATH
if not os.path.exists(LOG_DB_PATH):
import migrate_logs_to_dot9_db
if os.path.isdir(migrate_logs_to_dot9_db.PATH_TO_LOGS_BASE_DIR):
import Queue
q = Queue.Queue(100)
dialog = dialogs.ProgressDialog(_('Migrating Logs...'),
_('Please wait while logs are being migrated...'), q)
if os.name == 'nt' and gtk.pygtk_version > (2, 8, 0):
idlequeue = idlequeue.SelectIdleQueue()
else:
idlequeue = GlibIdleQueue()
def on_result(*arg):
dialog.dialog.destroy()
dialog.dialog = None
gobject.source_remove(dialog.update_progressbar_timeout_id)
gajim.logger.init_vars()
check_paths.check_and_possibly_create_paths()
Interface()
m = MigrateCommand(on_result)
m.set_idlequeue(idlequeue)
m.start()
gtk.main()
if not os.path.exists(LOG_DB_PATH) and os.path.isdir(PATH_TO_LOGS_BASE_DIR):
import Queue
q = Queue.Queue(100)
dialog = dialogs.ProgressDialog(_('Migrating Logs...'),
_('Please wait while logs are being migrated...'), q)
if os.name == 'nt' and gtk.pygtk_version > (2, 8, 0):
idlequeue = idlequeue.SelectIdleQueue()
else:
idlequeue = GlibIdleQueue()
def on_result(*arg):
dialog.dialog.destroy()
dialog.dialog = None
gobject.source_remove(dialog.update_progressbar_timeout_id)
gajim.logger.init_vars()
check_paths.check_and_possibly_create_paths()
Interface()
m = MigrateCommand(on_result)
m.set_idlequeue(idlequeue)
m.start()
else:
check_paths.check_and_possibly_create_paths()
Interface()
gtk.main()
gtk.main()