Skip to content
This repository has been archived by the owner on Mar 14, 2020. It is now read-only.

Commit

Permalink
final tweaks before updating to v0.30;
Browse files Browse the repository at this point in the history
  • Loading branch information
twiddli committed May 20, 2016
1 parent ec964db commit ddafd61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 30 deletions.
32 changes: 3 additions & 29 deletions version/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#"""
#"""
#This file is part of Happypanda.
#Happypanda is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -163,16 +163,7 @@ def done(status=True):
app_constants.DOWNLOAD_MANAGER = self.download_manager
self.download_manager.start_manager(4)

if app_constants.FIRST_TIME_LEVEL < 4:
log_i('Invoking first time level {}'.format(4))
app_constants.INTERNAL_LEVEL = 4
settings.set([], 'Application', 'monitor paths')
settings.set([], 'Application', 'ignore paths')
app_constants.MONITOR_PATHS = []
app_constants.IGNORE_PATHS = []
settings.save()
done()
elif app_constants.FIRST_TIME_LEVEL < 5:
if app_constants.FIRST_TIME_LEVEL < 5:
log_i('Invoking first time level {}'.format(5))
app_constants.INTERNAL_LEVEL = 5
app_widget = misc.AppDialog(self)
Expand All @@ -197,24 +188,7 @@ def done(status=True):
app_constants.EXTERNAL_VIEWER_ARGS = '{$file}'
settings.set('{$file}','Advanced', 'external viewer args')
settings.save()
elif app_constants.FIRST_TIME_LEVEL < 8:
log_i('Invoking first time level {}'.format(8))
app_constants.INTERNAL_LEVEL = 8
app_widget = misc.AppDialog(self)
app_widget.note_info.setText("<font color='red'>IMPORTANT:</font> Application restart is required when done")
app_widget.restart_info.hide()
self.admin_db = gallerydb.AdminDB()
self.admin_db.moveToThread(app_constants.GENERAL_THREAD)
self.admin_db.DONE.connect(done)
self.admin_db.DONE.connect(lambda: app_constants.NOTIF_BAR.add_text("Application requires a restart"))
self.admin_db.DONE.connect(self.admin_db.deleteLater)
self.admin_db.DATA_COUNT.connect(app_widget.prog.setMaximum)
self.admin_db.PROGRESS.connect(app_widget.prog.setValue)
self.admin_db_method_invoker.connect(self.admin_db.rebuild_database)
self.admin_db_method_invoker.connect(app_widget.show)
app_widget.adjustSize()
self.admin_db_method_invoker.emit(True)

done()
else:
done()

Expand Down
2 changes: 1 addition & 1 deletion version/app_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
default_stylesheet_path = os.path.join(static_dir,"style.css")
user_stylesheet_path = ""

INTERNAL_LEVEL = 8
INTERNAL_LEVEL = 7
FIRST_TIME_LEVEL = get(7, 'Application', 'first time level', int)
UPDATE_VERSION = get('0.25', 'Application', 'version', str)
FORCE_HIGH_DPI_SUPPORT = get(False, 'Advanced', 'force high dpi support', bool)
Expand Down

0 comments on commit ddafd61

Please sign in to comment.