diff --git a/nw/__init__.py b/nw/__init__.py index 683855f0..2c78b458 100644 --- a/nw/__init__.py +++ b/nw/__init__.py @@ -21,14 +21,17 @@ from nw.config import Config __package__ = "novelWriter" __author__ = "Veronica Berglyd Olsen" __copyright__ = "Copyright 2018–2019, Veronica Berglyd Olsen" -__credits__ = ["Veronica Berglyd Olsen"] __license__ = "GPLv3" __version__ = "0.1.5" __date__ = "2019.06.08" __maintainer__ = "Veronica Berglyd Olsen" __email__ = "code@vkbo.net" -__status__ = "Pre-Release" +__status__ = "Development" __url__ = "https://github.com/vkbo/novelWriter" +__credits__ = [ + "Veronica Berglyd Olsen (developer)", + "Marian Lückhof (contributor, tester)" +] # # Logging @@ -82,7 +85,7 @@ def main(sysArgs): ] helpMsg = ( - "novelWriter {version} ({status})\n" + "{appname} {version} ({status})\n" "{copyright}\n" "\n" "Usage:\n" @@ -97,6 +100,7 @@ def main(sysArgs): " --config Alternative config file.\n" " --headless Do not display GUI. Useful for testing scripts.\n" ).format( + appname = __package__, version = __version__, status = __status__, copyright = __copyright__ diff --git a/nw/gui/docviewer.py b/nw/gui/docviewer.py index 966d213a..a45718ea 100644 --- a/nw/gui/docviewer.py +++ b/nw/gui/docviewer.py @@ -48,6 +48,11 @@ class GuiDocViewer(QTextBrowser): self.setMinimumWidth(300) self.initEditor() + theOpt = QTextOption() + if self.mainConf.doJustify: + theOpt.setAlignment(Qt.AlignJustify) + self.theQDoc.setDefaultTextOption(theOpt) + logger.debug("DocViewer initialisation complete") return diff --git a/nw/gui/mainmenu.py b/nw/gui/mainmenu.py index 716c6b50..9360f4d6 100644 --- a/nw/gui/mainmenu.py +++ b/nw/gui/mainmenu.py @@ -108,10 +108,11 @@ class GuiMainMenu(QMenuBar): msgBox.about(self.theParent, "About %s" % nw.__package__, ( "

About {name:s}

" "

Version: {version:s}
Release Date: {date:s}

" - "

{name:s} is a text editor designed for writing novels. " + "

{name:s} is a markdown-like text editor designed for organising and writing novels. " "It is written in Python 3 with a Qt5 GUI. The Python and Qt layers are connected with PyQt5

" "

{name:s} is is licensed under GPL v3.0

" "

{copyright:s}

" + "

Website: {website:s}

" "

Credits

" "

{credits:s}

" ).format( @@ -119,7 +120,8 @@ class GuiMainMenu(QMenuBar): version = nw.__version__, date = nw.__date__, copyright = nw.__copyright__, - credits = "
".join(nw.__credits__), + website = nw.__url__, + credits = "".join(["  •  %s
" % x for x in nw.__credits__]), )) return True diff --git a/nw/gui/winmain.py b/nw/gui/winmain.py index ee3e870e..012a328b 100644 --- a/nw/gui/winmain.py +++ b/nw/gui/winmain.py @@ -314,7 +314,13 @@ class GuiMain(QMainWindow): if tHandle is None: tHandle = self.treeView.getSelectedHandle() if tHandle is None: - logger.warning("No document selected") + logger.debug("No document selected, trying last viewed") + tHandle = self.theProject.lastViewed + if tHandle is None: + logger.debug("No document selected, trying editor document") + tHandle = self.theDocument.docHandle + if tHandle is None: + logger.debug("No document selected, giving up") return False if self.docViewer.loadText(tHandle):