Some PEP8 work

This commit is contained in:
Olivier Keshavjee 2015-06-22 21:34:11 +02:00
parent eeff279deb
commit ed3756baac
2 changed files with 290 additions and 243 deletions

View file

@ -8,15 +8,16 @@ _version = "0.1"
import faulthandler
#faulthandler.enable()
def run():
app = QApplication(sys.argv)
app.setOrganizationName("manuskript")
app.setOrganizationDomain("www.theologeek.ch")
app.setApplicationName("manuskript")
app.setApplicationVersion("0.1")
app.setStyle("Fusion")
### Translation process
locale = QLocale.system().name()
locale = "fr_CH"
@ -29,26 +30,28 @@ def run():
print(app.tr("Loaded transation: {}.").format(locale))
else:
print(app.tr("Failed to load translator for {}...").format(locale))
# Load style from QSettings
settings = QSettings(app.organizationName(), app.applicationName())
if settings.contains("applicationStyle"):
style = settings.value("applicationStyle")
app.setStyle(style)
launch() # Seperating launch to avoid segfault, so it seem.
# Cf. http://stackoverflow.com/questions/12433491/is-this-pyqt-4-python-bug-or-wrongly-behaving-code
# Seperating launch to avoid segfault, so it seem.
# Cf. http://stackoverflow.com/questions/12433491/is-this-pyqt-4-python-bug-or-wrongly-behaving-code
launch()
def launch():
from mainWindow import MainWindow
main = MainWindow()
main.show()
qApp.exec_()
qApp.deleteLater()
if __name__ == "__main__":
run()

File diff suppressed because it is too large Load diff