mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-01 10:39:34 +12:00
Fixes: Manuskript crashes when a wrong locale is set. See #188.
This commit is contained in:
parent
628ed42785
commit
0a0649a0db
|
@ -17,7 +17,12 @@ from lxml import etree as ET
|
|||
from manuskript.enums import Outline
|
||||
from manuskript.functions import mainWindow, toInt, wordCount, HTML2PlainText
|
||||
|
||||
try:
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
except:
|
||||
# Invalid locale, but not really a big deal because it's used only for
|
||||
# number formating
|
||||
pass
|
||||
import time, os
|
||||
|
||||
|
||||
|
|
|
@ -15,8 +15,10 @@ from manuskript.ui.editors.editorWidget import editorWidget
|
|||
from manuskript.ui.editors.fullScreenEditor import fullScreenEditor
|
||||
from manuskript.ui.editors.mainEditor_ui import Ui_mainEditor
|
||||
|
||||
try:
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
class mainEditor(QWidget, Ui_mainEditor):
|
||||
"""
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
# Form implementation generated from reading ui file 'manuskript/ui/editors/mainEditor_ui.ui'
|
||||
#
|
||||
# Created: Sat Oct 14 21:30:36 2017
|
||||
# by: PyQt5 UI code generator 5.2.1
|
||||
# Created by: PyQt5 UI code generator 5.9
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
|
@ -14,8 +13,8 @@ class Ui_mainEditor(object):
|
|||
mainEditor.setObjectName("mainEditor")
|
||||
mainEditor.resize(791, 319)
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(mainEditor)
|
||||
self.verticalLayout.setSpacing(0)
|
||||
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout.setSpacing(0)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.tabSplitter = tabSplitter(mainEditor)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding)
|
||||
|
|
|
@ -21,8 +21,10 @@ from manuskript.models.plotModel import plotModel
|
|||
from manuskript.models.worldModel import worldModel
|
||||
from manuskript.ui.welcome_ui import Ui_welcome
|
||||
|
||||
try:
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
class welcome(QWidget, Ui_welcome):
|
||||
def __init__(self, parent=None):
|
||||
|
|
Loading…
Reference in a new issue