mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-14 09:52:27 +12:00
Some PEP8 work
This commit is contained in:
parent
eeff279deb
commit
ed3756baac
25
src/main.py
25
src/main.py
|
@ -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
Loading…
Reference in a new issue