Merge branch 'release' into release_1.1rc1

This commit is contained in:
Veronica K. B. Olsen
2021-01-28 21:41:35 +01:00
27 changed files with 353 additions and 171 deletions
+16 -17
View File
@@ -157,13 +157,13 @@ def main(sysArgs=None):
)
# Defaults
debugLevel = logging.WARN
logFormat = "{levelname:8} {message:}"
confPath = None
dataPath = None
testMode = False
qtStyle = "Fusion"
cmdOpen = None
logLevel = logging.WARN
logFormat = "{levelname:8} {message:}"
confPath = None
dataPath = None
testMode = False
qtStyle = "Fusion"
cmdOpen = None
# Parse Options
try:
@@ -186,12 +186,12 @@ def main(sysArgs=None):
)
sys.exit(0)
elif inOpt == "--info":
debugLevel = logging.INFO
logLevel = logging.INFO
elif inOpt == "--debug":
debugLevel = logging.DEBUG
logLevel = logging.DEBUG
logFormat = "[{asctime:}] {name:>22}:{lineno:<4d} {levelname:8} {message:}"
elif inOpt == "--verbose":
debugLevel = VERBOSE
logLevel = VERBOSE
logFormat = "[{asctime:}] {name:>22}:{lineno:<4d} {levelname:8} {message:}"
elif inOpt == "--style":
qtStyle = inArg
@@ -203,17 +203,16 @@ def main(sysArgs=None):
testMode = True
# Set Config Options
CONFIG.debugInfo = debugLevel < logging.INFO
CONFIG.cmdOpen = cmdOpen
CONFIG.cmdOpen = cmdOpen
# Set Logging
logFmt = logging.Formatter(fmt=logFormat, style="{")
cHandle = logging.StreamHandler()
cHandle.setLevel(debugLevel)
cHandle.setFormatter(logFmt)
logger.addHandler(cHandle)
cHandle.setFormatter(logging.Formatter(fmt=logFormat, style="{"))
pkgLogger = logging.getLogger(__package__)
pkgLogger.addHandler(cHandle)
pkgLogger.setLevel(logLevel)
logger.setLevel(debugLevel)
logger.info("Starting novelWriter %s (%s) %s" % (
__version__, __hexversion__, __date__
))
-3
View File
@@ -55,9 +55,6 @@ class Config:
self.appName = "novelWriter"
self.appHandle = self.appName.lower()
# Debug Settings
self.debugInfo = False # True if log level is DEBUG or VERBOSE
# Config Error Handling
self.hasError = False # True if the config class encountered an error
self.errData = [] # List of error messages
+26 -2
View File
@@ -268,10 +268,14 @@ class nwUnicode:
U_RECQUO = "\u300f" # Right white corner bracket
## Punctuation
U_FGDASH = "\u2012" # Figure dash
U_ENDASH = "\u2013" # Short dash
U_EMDASH = "\u2014" # Long dash
U_HBAR = "\u2015" # Horizontal bar
U_HELLIP = "\u2026" # Ellipsis
U_MAPOSS = "\u02bc" # Modifier letter single apostrophe
U_PRIME = "\u2032" # Prime
U_DPRIME = "\u2033" # Double prime
## Spaces and Lines
U_NBSP = "\u00a0" # Non-breaking space
@@ -284,8 +288,16 @@ class nwUnicode:
## Symbols
U_CHECK = "\u2714" # Heavy check mark
U_MULT = "\u2715" # Multiplication x
U_CROSS = "\u2715" # Heavy cross mark
U_BULL = "\u2022" # List bullet
U_TRBULL = "\u2023" # Triangle bullet
U_HYBULL = "\u2043" # Hyphen bullet
U_FLOWER = "\u2055" # Flower punctuation mark
U_PERMIL = "\u2030" # Per mille sign
U_DEGREE = "\u00b0" # Degree symbol
U_MINUS = "\u2212" # Minus sign
U_TIMES = "\u00d7" # Multiplaction sign
U_DIVIDE = "\u00f7" # Division sign
## Arrows
U_UTRI = "\u25b2" # Up-pointing triangle
@@ -322,10 +334,14 @@ class nwUnicode:
H_LWCQUO = "&#12302;"
## Punctuation
H_FGDASH = "&#8210;"
H_ENDASH = "&ndash;"
H_EMDASH = "&mdash;"
H_HBAR = "&#8213;"
H_HELLIP = "&hellip;"
H_MAPOSS = "&#700;"
H_PRIME = "&prime;"
H_DPRIME = "&#8243;"
## Spaces
H_NBSP = "&nbsp;"
@@ -336,8 +352,16 @@ class nwUnicode:
## Symbols
H_CHECK = "&#10004;"
H_MULT = "&#10005;"
H_CROSS = "&#10005;"
H_BULL = "&bull;"
H_TRBULL = "&#8227;"
H_HYBULL = "&hybull;"
H_FLOWER = "&#8277;"
H_PERMIL = "&#8240;"
H_DEGREE = "&deg;"
H_MINUS = "&minus;"
H_TIMES = "&times;"
H_DIVIDE = "&divide;"
## Arrows
H_UTRI = "&#9650;"
+6 -13
View File
@@ -99,19 +99,12 @@ class nwDocAction(Enum):
class nwDocInsert(Enum):
NO_INSERT = 0
HARD_BREAK = 1
NB_SPACE = 2
THIN_SPACE = 3
THIN_NB_SPACE = 4
SHORT_DASH = 5
LONG_DASH = 6
ELLIPSIS = 7
QUOTE_LS = 8
QUOTE_RS = 9
QUOTE_LD = 10
QUOTE_RD = 11
MODAPOS_S = 12
NO_INSERT = 0
HARD_BREAK = 1
QUOTE_LS = 2
QUOTE_RS = 3
QUOTE_LD = 4
QUOTE_RD = 5
# END Enum nwDocInsert
+3 -3
View File
@@ -295,9 +295,9 @@ class ToHtml(Tokenizer):
"""Apply HTML formatting to synopsis.
"""
if self.genMode == self.M_PREVIEW:
return "<p class='comment'><span class='synopsis'>Synopsis: </span>%s</p>\n" % tText
return "<p class='comment'><span class='synopsis'>Synopsis:</span> %s</p>\n" % tText
else:
return "<p class='synopsis'><strong>Synopsis: </strong>%s</p>\n" % tText
return "<p class='synopsis'><strong>Synopsis:</strong> %s</p>\n" % tText
def _formatComments(self, tText):
"""Apply HTML formatting to comments.
@@ -305,7 +305,7 @@ class ToHtml(Tokenizer):
if self.genMode == self.M_PREVIEW:
return "<p class='comment'>%s</p>\n" % tText
else:
return "<p class='comment'><strong>Comment: </strong>%s</p>\n" % tText
return "<p class='comment'><strong>Comment:</strong> %s</p>\n" % tText
def _formatKeywords(self, tText):
"""Apply HTML formatting to keywords.
+3 -7
View File
@@ -571,8 +571,9 @@ class GuiBuildNovel(QDialog):
makeHtml.setJustify(justifyText)
makeHtml.setStyles(not noStyling)
# Make sure the tree order is correct
# Make sure the project and document is up to date
self.theParent.treeView.flushTreeOrder()
self.theParent.saveDocument()
self.buildProgress.setMaximum(len(self.theProject.projTree))
self.buildProgress.setValue(0)
@@ -968,11 +969,6 @@ class GuiBuildNovel(QDialog):
"""
buildCache = os.path.join(self.theProject.projCache, nwFiles.BUILD_CACHE)
if self.mainConf.debugInfo:
nIndent = 2
else:
nIndent = None
logger.debug("Saving build cache")
try:
with open(buildCache, mode="w+", encoding="utf8") as outFile:
@@ -981,7 +977,7 @@ class GuiBuildNovel(QDialog):
"htmlStyle" : self.htmlStyle,
"nwdText" : self.nwdText,
"buildTime" : self.buildTime,
}, indent=nIndent))
}, indent=2))
except Exception as e:
logger.error("Failed to save build cache")
logger.error(str(e))
+1 -1
View File
@@ -303,7 +303,7 @@ class QSwitch(QAbstractButton):
trackBrush = qPalette.dark()
thumbBrush = qPalette.light()
textColor = qPalette.dark().color()
thumbText = nwUnicode.U_MULT
thumbText = nwUnicode.U_CROSS
if self.isEnabled():
trackOpacity = 1.0
-14
View File
@@ -734,20 +734,6 @@ class GuiDocEditor(QTextEdit):
elif isinstance(theInsert, nwDocInsert):
if theInsert == nwDocInsert.HARD_BREAK:
theText = " \n"
elif theInsert == nwDocInsert.NB_SPACE:
theText = nwUnicode.U_NBSP
elif theInsert == nwDocInsert.THIN_SPACE:
theText = nwUnicode.U_THSP
elif theInsert == nwDocInsert.THIN_NB_SPACE:
theText = nwUnicode.U_THNBSP
elif theInsert == nwDocInsert.SHORT_DASH:
theText = nwUnicode.U_ENDASH
elif theInsert == nwDocInsert.LONG_DASH:
theText = nwUnicode.U_EMDASH
elif theInsert == nwDocInsert.ELLIPSIS:
theText = nwUnicode.U_HELLIP
elif theInsert == nwDocInsert.MODAPOS_S:
theText = nwUnicode.U_MAPOSS
elif theInsert == nwDocInsert.QUOTE_LS:
theText = self.typSQOpen
elif theInsert == nwDocInsert.QUOTE_RS:
+119 -21
View File
@@ -32,7 +32,8 @@ from PyQt5.QtGui import QDesktopServices
from PyQt5.QtWidgets import QMenuBar, QAction
from nw.constants import (
nwItemType, nwItemClass, nwDocAction, nwDocInsert, nwKeyWords, nwLabels
nwItemType, nwItemClass, nwDocAction, nwDocInsert, nwKeyWords, nwLabels,
nwUnicode
)
logger = logging.getLogger(__name__)
@@ -467,6 +468,13 @@ class GuiMainMenu(QMenuBar):
self.aFocusView.triggered.connect(lambda: self.theParent.setFocus(3))
self.viewMenu.addAction(self.aFocusView)
# View > Outline
self.aFocusOutline = QAction("Focus Outline", self)
self.aFocusOutline.setStatusTip("Move focus to outline")
self.aFocusOutline.setShortcut("Alt+4")
self.aFocusOutline.triggered.connect(lambda: self.theParent.setFocus(4))
self.viewMenu.addAction(self.aFocusOutline)
# View > Separator
self.viewMenu.addSeparator()
@@ -511,29 +519,36 @@ class GuiMainMenu(QMenuBar):
# Insert
self.insertMenu = self.addMenu("&Insert")
# Insert > Dashes and Dots
self.mInsDashes = self.insertMenu.addMenu("Dashes and Dots")
# Insert > Dashes
self.mInsDashes = self.insertMenu.addMenu("Dashes")
# Insert > Short Dash
self.aInsENDash = QAction("Short Dash", self)
self.aInsENDash.setStatusTip("Insert short dash")
self.aInsENDash.setStatusTip("Insert short dash (en dash)")
self.aInsENDash.setShortcut("Ctrl+K, -")
self.aInsENDash.triggered.connect(lambda: self._docInsert(nwDocInsert.SHORT_DASH))
self.aInsENDash.triggered.connect(lambda: self._docInsert(nwUnicode.U_ENDASH))
self.mInsDashes.addAction(self.aInsENDash)
# Insert > Long Dash
self.aInsEMDash = QAction("Long Dash", self)
self.aInsEMDash.setStatusTip("Insert long dash")
self.aInsEMDash.setStatusTip("Insert long dash (em dash)")
self.aInsEMDash.setShortcut("Ctrl+K, _")
self.aInsEMDash.triggered.connect(lambda: self._docInsert(nwDocInsert.LONG_DASH))
self.aInsEMDash.triggered.connect(lambda: self._docInsert(nwUnicode.U_EMDASH))
self.mInsDashes.addAction(self.aInsEMDash)
# Insert > Ellipsis
self.aInsEllipsis = QAction("Ellipsis", self)
self.aInsEllipsis.setStatusTip("Insert ellipsis")
self.aInsEllipsis.setShortcut("Ctrl+K, .")
self.aInsEllipsis.triggered.connect(lambda: self._docInsert(nwDocInsert.ELLIPSIS))
self.mInsDashes.addAction(self.aInsEllipsis)
# Insert > Long Dash
self.aInsHorBar = QAction("Horizontal Bar", self)
self.aInsHorBar.setStatusTip("Insert a horizontal bar (quotation dash)")
self.aInsHorBar.setShortcut("Ctrl+K, Ctrl+_")
self.aInsHorBar.triggered.connect(lambda: self._docInsert(nwUnicode.U_HBAR))
self.mInsDashes.addAction(self.aInsHorBar)
# Insert > Figure Dash
self.aInsFigDash = QAction("Figure Dash", self)
self.aInsFigDash.setStatusTip("Insert figure dash (same width as a number character)")
self.aInsFigDash.setShortcut("Ctrl+K, ~")
self.aInsFigDash.triggered.connect(lambda: self._docInsert(nwUnicode.U_FGDASH))
self.mInsDashes.addAction(self.aInsFigDash)
# Insert > Quote Marks
self.mInsQuotes = self.insertMenu.addMenu("Quote Marks")
@@ -568,11 +583,35 @@ class GuiMainMenu(QMenuBar):
# Insert > Alternative Apostrophe
self.aInsMSApos = QAction("Alternative Apostrophe", self)
self.aInsMSApos.setStatusTip("Insert unicode modifier letter single apostrophe")
self.aInsMSApos.setStatusTip("Insert modifier letter single apostrophe")
self.aInsMSApos.setShortcut("Ctrl+K, '")
self.aInsMSApos.triggered.connect(lambda: self._docInsert(nwDocInsert.MODAPOS_S))
self.aInsMSApos.triggered.connect(lambda: self._docInsert(nwUnicode.U_MAPOSS))
self.mInsQuotes.addAction(self.aInsMSApos)
# Insert > Symbols
self.mInsPunct = self.insertMenu.addMenu("General Punctuation")
# Insert > Ellipsis
self.aInsEllipsis = QAction("Ellipsis", self)
self.aInsEllipsis.setStatusTip("Insert ellipsis")
self.aInsEllipsis.setShortcut("Ctrl+K, .")
self.aInsEllipsis.triggered.connect(lambda: self._docInsert(nwUnicode.U_HELLIP))
self.mInsPunct.addAction(self.aInsEllipsis)
# Insert > Prime
self.aInsPrime = QAction("Prime", self)
self.aInsPrime.setStatusTip("Insert a prime symbol")
self.aInsPrime.setShortcut("Ctrl+K, Ctrl+'")
self.aInsPrime.triggered.connect(lambda: self._docInsert(nwUnicode.U_PRIME))
self.mInsPunct.addAction(self.aInsPrime)
# Insert > Double Prime
self.aInsDPrime = QAction("Double Prime", self)
self.aInsDPrime.setStatusTip("Insert a double prime symbol")
self.aInsDPrime.setShortcut("Ctrl+K, Ctrl+\"")
self.aInsDPrime.triggered.connect(lambda: self._docInsert(nwUnicode.U_DPRIME))
self.mInsPunct.addAction(self.aInsDPrime)
# Insert > Breaks and Spaces
self.mInsBreaks = self.insertMenu.addMenu("Breaks and Spaces")
@@ -587,23 +626,82 @@ class GuiMainMenu(QMenuBar):
self.aInsNBSpace = QAction("Non-Breaking Space", self)
self.aInsNBSpace.setStatusTip("Insert a non-breaking space")
self.aInsNBSpace.setShortcut("Ctrl+K, Space")
self.aInsNBSpace.triggered.connect(lambda: self._docInsert(nwDocInsert.NB_SPACE))
self.aInsNBSpace.triggered.connect(lambda: self._docInsert(nwUnicode.U_NBSP))
self.mInsBreaks.addAction(self.aInsNBSpace)
# Insert > Thin Space
self.aInsThinSpace = QAction("Thin Space", self)
self.aInsThinSpace.setStatusTip("Insert a thin space")
self.aInsThinSpace.setShortcut("Ctrl+K, Shift+Space")
self.aInsThinSpace.triggered.connect(lambda: self._docInsert(nwDocInsert.THIN_SPACE))
self.aInsThinSpace.triggered.connect(lambda: self._docInsert(nwUnicode.U_THSP))
self.mInsBreaks.addAction(self.aInsThinSpace)
# Insert > Thin Non-Breaking Space
self.aInsThinNBSpace = QAction("Thin Non-Breaking Space", self)
self.aInsThinNBSpace.setStatusTip("Insert a thin non-breaking space")
self.aInsThinNBSpace.setShortcut("Ctrl+K, Ctrl+Space")
self.aInsThinNBSpace.triggered.connect(lambda: self._docInsert(nwDocInsert.THIN_NB_SPACE))
self.aInsThinNBSpace.triggered.connect(lambda: self._docInsert(nwUnicode.U_THNBSP))
self.mInsBreaks.addAction(self.aInsThinNBSpace)
# Insert > Symbols
self.mInsSymbol = self.insertMenu.addMenu("Other Symbols")
# Insert > List Bullet
self.aInsBullet = QAction("List Bullet", self)
self.aInsBullet.setStatusTip("Insert a list bullet")
self.aInsBullet.setShortcut("Ctrl+K, *")
self.aInsBullet.triggered.connect(lambda: self._docInsert(nwUnicode.U_BULL))
self.mInsSymbol.addAction(self.aInsBullet)
# Insert > Hyphen Bullet
self.aInsHyBull = QAction("Hyphen Bullet", self)
self.aInsHyBull.setStatusTip("Insert a hyphen bullet (alternative bullet)")
self.aInsHyBull.setShortcut("Ctrl+K, Ctrl+-")
self.aInsHyBull.triggered.connect(lambda: self._docInsert(nwUnicode.U_HYBULL))
self.mInsSymbol.addAction(self.aInsHyBull)
# Insert > Flower Mark
self.aInsFlower = QAction("Flower Mark", self)
self.aInsFlower.setStatusTip("Insert a flower mark (alternative bullet)")
self.aInsFlower.setShortcut("Ctrl+K, Ctrl+*")
self.aInsFlower.triggered.connect(lambda: self._docInsert(nwUnicode.U_FLOWER))
self.mInsSymbol.addAction(self.aInsFlower)
# Insert > Per Mille
self.aInsPerMille = QAction("Per Mille", self)
self.aInsPerMille.setStatusTip("Insert a per mille symbol")
self.aInsPerMille.setShortcut("Ctrl+K, %")
self.aInsPerMille.triggered.connect(lambda: self._docInsert(nwUnicode.U_PERMIL))
self.mInsSymbol.addAction(self.aInsPerMille)
# Insert > Degree Symbol
self.aInsDegree = QAction("Degree Symbol", self)
self.aInsDegree.setStatusTip("Insert a degree symbol")
self.aInsDegree.setShortcut("Ctrl+K, Ctrl+O")
self.aInsDegree.triggered.connect(lambda: self._docInsert(nwUnicode.U_DEGREE))
self.mInsSymbol.addAction(self.aInsDegree)
# Insert > Minus Sign
self.aInsMinus = QAction("Minus Sign", self)
self.aInsMinus.setStatusTip("Insert a minus sign (not a hypen or dash)")
self.aInsMinus.setShortcut("Ctrl+K, Ctrl+M")
self.aInsMinus.triggered.connect(lambda: self._docInsert(nwUnicode.U_MINUS))
self.mInsSymbol.addAction(self.aInsMinus)
# Insert > Times Sign
self.aInsTimes = QAction("Times Sign", self)
self.aInsTimes.setStatusTip("Insert a times sign (multiplication cross)")
self.aInsTimes.setShortcut("Ctrl+K, Ctrl+X")
self.aInsTimes.triggered.connect(lambda: self._docInsert(nwUnicode.U_TIMES))
self.mInsSymbol.addAction(self.aInsTimes)
# Insert > Division
self.aInsDivide = QAction("Division Sign", self)
self.aInsDivide.setStatusTip("Insert a division sign")
self.aInsDivide.setShortcut("Ctrl+K, Ctrl+D")
self.aInsDivide.triggered.connect(lambda: self._docInsert(nwUnicode.U_DIVIDE))
self.mInsSymbol.addAction(self.aInsDivide)
# Insert > Separator
self.insertMenu.addSeparator()
@@ -704,7 +802,7 @@ class GuiMainMenu(QMenuBar):
# Format > Strikethrough
self.aFmtStrike = QAction("Strikethrough", self)
self.aFmtStrike.setStatusTip("Add strikethrough to selected text")
self.aFmtStrike.setShortcut("Ctrl+-")
self.aFmtStrike.setShortcut("Ctrl+D")
self.aFmtStrike.triggered.connect(lambda: self._docAction(nwDocAction.STRIKE))
self.fmtMenu.addAction(self.aFmtStrike)
@@ -714,14 +812,14 @@ class GuiMainMenu(QMenuBar):
# Format > Double Quotes
self.aFmtDQuote = QAction("Wrap Double Quotes", self)
self.aFmtDQuote.setStatusTip("Wrap selected text in double quotes")
self.aFmtDQuote.setShortcut("Ctrl+D")
self.aFmtDQuote.setShortcut("Ctrl+\"")
self.aFmtDQuote.triggered.connect(lambda: self._docAction(nwDocAction.D_QUOTE))
self.fmtMenu.addAction(self.aFmtDQuote)
# Format > Single Quotes
self.aFmtSQuote = QAction("Wrap Single Quotes", self)
self.aFmtSQuote.setStatusTip("Wrap selected text in single quotes")
self.aFmtSQuote.setShortcut("Ctrl+Shift+D")
self.aFmtSQuote.setShortcut("Ctrl+'")
self.aFmtSQuote.triggered.connect(lambda: self._docAction(nwDocAction.S_QUOTE))
self.fmtMenu.addAction(self.aFmtSQuote)
+20 -20
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*-
"""novelWriter GUI Project Details
"""
novelWriter GUI Project Details
=================================
Class holding the project details dialog
novelWriter GUI Project Details
===================================
Class holding the project details dialog
File History:
Created: 2021-01-03 [1.1a0]
File History:
Created: 2021-01-03 [1.0a0]
This file is a part of novelWriter
Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter
Copyright 20182021, Veronica Berglyd Olsen
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
import nw
@@ -33,7 +32,7 @@ from PyQt5.QtCore import Qt, QSize
from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import (
QWidget, QDialogButtonBox, QVBoxLayout, QTreeWidget, QTreeWidgetItem,
QLabel, QSpinBox, QGridLayout, QHBoxLayout, QLineEdit
QLabel, QSpinBox, QGridLayout, QHBoxLayout, QLineEdit, QAbstractItemView
)
from nw.gui.custom import PagedDialog, QSwitch
@@ -271,6 +270,7 @@ class GuiProjectDetailsContents(QWidget):
self.tocTree.setIconSize(QSize(iPx, iPx))
self.tocTree.setIndentation(0)
self.tocTree.setColumnCount(6)
self.tocTree.setSelectionMode(QAbstractItemView.NoSelection)
self.tocTree.setHeaderLabels(["Title", "Words", "Pages", "Page", "Progress", ""])
treeHeadItem = self.tocTree.headerItem()
+19 -2
View File
@@ -1128,14 +1128,19 @@ class GuiMain(QMainWindow):
return True
def setFocus(self, paneNo):
"""Switch focus to one of the three main GUI panes.
"""Switch focus between main GUI views.
"""
if paneNo == 1:
self.treeView.setFocus()
elif paneNo == 2:
self.mainTabs.setCurrentWidget(self.splitDocs)
self.docEditor.setFocus()
elif paneNo == 3:
self.mainTabs.setCurrentWidget(self.splitDocs)
self.docViewer.setFocus()
elif paneNo == 4:
self.mainTabs.setCurrentWidget(self.splitOutline)
self.projView.setFocus()
return
def closeDocEditor(self):
@@ -1240,16 +1245,28 @@ class GuiMain(QMainWindow):
# Insert
self.addAction(self.mainMenu.aInsENDash)
self.addAction(self.mainMenu.aInsEMDash)
self.addAction(self.mainMenu.aInsEllipsis)
self.addAction(self.mainMenu.aInsHorBar)
self.addAction(self.mainMenu.aInsFigDash)
self.addAction(self.mainMenu.aInsQuoteLS)
self.addAction(self.mainMenu.aInsQuoteRS)
self.addAction(self.mainMenu.aInsQuoteLD)
self.addAction(self.mainMenu.aInsQuoteRD)
self.addAction(self.mainMenu.aInsMSApos)
self.addAction(self.mainMenu.aInsEllipsis)
self.addAction(self.mainMenu.aInsPrime)
self.addAction(self.mainMenu.aInsDPrime)
self.addAction(self.mainMenu.aInsHardBreak)
self.addAction(self.mainMenu.aInsNBSpace)
self.addAction(self.mainMenu.aInsThinSpace)
self.addAction(self.mainMenu.aInsThinNBSpace)
self.addAction(self.mainMenu.aInsBullet)
self.addAction(self.mainMenu.aInsHyBull)
self.addAction(self.mainMenu.aInsFlower)
self.addAction(self.mainMenu.aInsPerMille)
self.addAction(self.mainMenu.aInsDegree)
self.addAction(self.mainMenu.aInsMinus)
self.addAction(self.mainMenu.aInsTimes)
self.addAction(self.mainMenu.aInsDivide)
for mAction, _ in self.mainMenu.mInsKWItems.values():
self.addAction(mAction)