show roster when there are no old and new logs
This commit is contained in:
parent
fa764c1379
commit
e95cd81587
44
src/gajim.py
44
src/gajim.py
|
@ -1884,31 +1884,29 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# Migrate old logs if we have such olds logs
|
# Migrate old logs if we have such olds logs
|
||||||
from common import logger
|
from common import logger
|
||||||
|
from migrate_logs_to_dot9_db import PATH_TO_LOGS_BASE_DIR
|
||||||
LOG_DB_PATH = logger.LOG_DB_PATH
|
LOG_DB_PATH = logger.LOG_DB_PATH
|
||||||
if not os.path.exists(LOG_DB_PATH):
|
if not os.path.exists(LOG_DB_PATH) and os.path.isdir(PATH_TO_LOGS_BASE_DIR):
|
||||||
import migrate_logs_to_dot9_db
|
import Queue
|
||||||
if os.path.isdir(migrate_logs_to_dot9_db.PATH_TO_LOGS_BASE_DIR):
|
q = Queue.Queue(100)
|
||||||
import Queue
|
dialog = dialogs.ProgressDialog(_('Migrating Logs...'),
|
||||||
q = Queue.Queue(100)
|
_('Please wait while logs are being migrated...'), q)
|
||||||
dialog = dialogs.ProgressDialog(_('Migrating Logs...'),
|
if os.name == 'nt' and gtk.pygtk_version > (2, 8, 0):
|
||||||
_('Please wait while logs are being migrated...'), q)
|
idlequeue = idlequeue.SelectIdleQueue()
|
||||||
if os.name == 'nt' and gtk.pygtk_version > (2, 8, 0):
|
else:
|
||||||
idlequeue = idlequeue.SelectIdleQueue()
|
idlequeue = GlibIdleQueue()
|
||||||
else:
|
def on_result(*arg):
|
||||||
idlequeue = GlibIdleQueue()
|
dialog.dialog.destroy()
|
||||||
def on_result(*arg):
|
dialog.dialog = None
|
||||||
dialog.dialog.destroy()
|
gobject.source_remove(dialog.update_progressbar_timeout_id)
|
||||||
dialog.dialog = None
|
gajim.logger.init_vars()
|
||||||
gobject.source_remove(dialog.update_progressbar_timeout_id)
|
check_paths.check_and_possibly_create_paths()
|
||||||
gajim.logger.init_vars()
|
Interface()
|
||||||
check_paths.check_and_possibly_create_paths()
|
m = MigrateCommand(on_result)
|
||||||
Interface()
|
m.set_idlequeue(idlequeue)
|
||||||
m = MigrateCommand(on_result)
|
m.start()
|
||||||
m.set_idlequeue(idlequeue)
|
|
||||||
m.start()
|
|
||||||
gtk.main()
|
|
||||||
else:
|
else:
|
||||||
check_paths.check_and_possibly_create_paths()
|
check_paths.check_and_possibly_create_paths()
|
||||||
Interface()
|
Interface()
|
||||||
gtk.main()
|
gtk.main()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue