Added open and save status messages to the status bar.

This commit is contained in:
Veronica K. B. Olsen
2019-05-04 10:24:40 +02:00
parent e82eadea3e
commit faa1fe6efb
6 changed files with 28 additions and 10 deletions
+6 -2
View File
@@ -46,12 +46,14 @@ class NWDoc():
if path.isfile(docPath):
with open(docPath,mode="r") as inFile:
return inFile.read()
theDoc = inFile.read()
else:
logger.debug("The requested document does not exist.")
return ""
return None
self.theParent.statusBar.setStatus("Opened Document: %s" % self.theItem.itemName)
return theDoc
def saveDocument(self, docText):
@@ -78,6 +80,8 @@ class NWDoc():
if path.isfile(docTemp): unlink(docTemp)
self.theParent.statusBar.setStatus("Saved Document: %s" % self.theItem.itemName)
return True
##
+4 -1
View File
@@ -28,10 +28,11 @@ logger = logging.getLogger(__name__)
class NWProject():
def __init__(self):
def __init__(self, theParent):
# Internal
self.mainConf = nw.CONFIG
self.theParent = theParent
# Project Settings
self.projTree = None
@@ -182,6 +183,7 @@ class NWProject():
self._makeStatusIcons()
self.mainConf.setRecent(self.projPath)
self.theParent.statusBar.setStatus("Opened Project: %s" % self.projName)
self._scanProjectFolder()
@@ -242,6 +244,7 @@ class NWProject():
return False
self.mainConf.setRecent(self.projPath)
self.theParent.statusBar.setStatus("Saved Project: %s" % self.projName)
return True