diff --git a/nw/gui/dialogs/export.py b/nw/gui/dialogs/export.py index 57bc06ee..56e99369 100644 --- a/nw/gui/dialogs/export.py +++ b/nw/gui/dialogs/export.py @@ -411,11 +411,13 @@ class GuiExportMain(QWidget): self.guiChapters.setLayout(self.guiChaptersForm) self.chapterFormat = QLineEdit() + self.chapterFormat.setMaxLength(200) self.chapterFormat.setText(self.optState.getSetting("chFormat")) self.chapterFormat.setToolTip("Available formats: %num%, %numword%, %title%") self.chapterFormat.setMinimumWidth(250) self.unnumFormat = QLineEdit() + self.unnumFormat.setMaxLength(200) self.unnumFormat.setText(self.optState.getSetting("unFormat")) self.unnumFormat.setToolTip("Available formats: %title%") self.unnumFormat.setMinimumWidth(250) @@ -431,11 +433,13 @@ class GuiExportMain(QWidget): self.guiScenes.setLayout(self.guiScenesForm) self.sceneFormat = QLineEdit() + self.sceneFormat.setMaxLength(200) self.sceneFormat.setText(self.optState.getSetting("scFormat")) self.sceneFormat.setToolTip("Available formats: %title%") self.sceneFormat.setMinimumWidth(100) self.sectionFormat = QLineEdit() + self.sectionFormat.setMaxLength(200) self.sectionFormat.setText(self.optState.getSetting("seFormat")) self.sectionFormat.setToolTip("Available formats: %title%") self.sectionFormat.setMinimumWidth(100) diff --git a/nw/gui/dialogs/projecteditor.py b/nw/gui/dialogs/projecteditor.py index 21aa7e9c..d848bc9a 100644 --- a/nw/gui/dialogs/projecteditor.py +++ b/nw/gui/dialogs/projecteditor.py @@ -126,6 +126,9 @@ class GuiProjectEditMain(QWidget): self.editAuthors = QPlainTextEdit() self.doBackup = QCheckBox(self) + self.editName.setMaxLength(200) + self.editTitle.setMaxLength(200) + self.mainForm.addRow("Working Title", self.editName) self.mainForm.addRow("Book Title", self.editTitle) self.mainForm.addRow("Book Authors", self.editAuthors) @@ -176,6 +179,7 @@ class GuiProjectEditStatus(QWidget): self._addItem(iName, iCol, iName, nUse) self.editName = QLineEdit() + self.editName.setMaxLength(40) self.editName.setEnabled(False) self.newButton = QPushButton("New") self.delButton = QPushButton("Delete") @@ -351,7 +355,9 @@ class GuiProjectEditReplace(QWidget): self.delButton = QPushButton(self.theTheme.getIcon("remove"),"") self.editKey.setEnabled(False) + self.editKey.setMaxLength(40) self.editValue.setEnabled(False) + self.editValue.setMaxLength(80) self.saveButton.clicked.connect(self._saveEntry) self.addButton.clicked.connect(self._addEntry)