diff --git a/nw/__init__.py b/nw/__init__.py index 5a0a31a6..4b2b82a2 100644 --- a/nw/__init__.py +++ b/nw/__init__.py @@ -77,10 +77,11 @@ def main(sysArgs=None): sysArgs = sys.argv[1:] # Valid Input Options - shortOpt = "hdDqtl:v" + shortOpt = "hdiqtl:v" longOpt = [ "help", "debug", + "info", "verbose", "quiet", "time", @@ -99,6 +100,7 @@ def main(sysArgs=None): "Usage:\n" " -h, --help Print this message.\n" " -v, --version Print program version and exit.\n" + " -i, --info Print additional runtime information.\n" " -d, --debug Print debug output.\n" " --verbose Increase verbosity of debug output.\n" " -q, --quiet Disable output to command line. Does not affect log file.\n" @@ -141,6 +143,8 @@ def main(sysArgs=None): elif inOpt in ("-v", "--version"): print("%s %s Version %s" % (__package__,__status__,__version__)) sys.exit() + elif inOpt in ("-i", "--info"): + debugLevel = logging.INFO elif inOpt in ("-d", "--debug"): debugLevel = logging.DEBUG debugStr = "{name:>30}:{lineno:<4d} {levelname:8} {message:}" diff --git a/nw/gui/elements/doceditor.py b/nw/gui/elements/doceditor.py index c5438048..00da2436 100644 --- a/nw/gui/elements/doceditor.py +++ b/nw/gui/elements/doceditor.py @@ -531,7 +531,7 @@ class GuiDocEditor(QTextEdit): def _addWord(self, theCursor): theWord = theCursor.selectedText().strip() - logger.info("Added '%s' to project dictionary" % theWord) + logger.debug("Added '%s' to project dictionary" % theWord) self.theDict.addWord(theWord) self.hLight.setDict(self.theDict) self.hLight.rehighlightBlock(theCursor.block()) diff --git a/nw/guimain.py b/nw/guimain.py index f0919e99..6d79eb2f 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -40,7 +40,7 @@ logger = logging.getLogger(__name__) class GuiMain(QMainWindow): def __init__(self): - QWidget.__init__(self) + QMainWindow.__init__(self) logger.info("Starting %s" % nw.__package__) logger.debug("Initialising GUI ...") diff --git a/nw/project/project.py b/nw/project/project.py index b01f5bc7..9d621977 100644 --- a/nw/project/project.py +++ b/nw/project/project.py @@ -598,7 +598,7 @@ class NWProject(): if not path.isdir(thePath): try: mkdir(thePath) - logger.info("Created folder %s" % thePath) + logger.debug("Created folder %s" % thePath) except Exception as e: self.makeAlert(["Could not create folder.",str(e)], nwAlert.ERROR) return False