summaryrefslogtreecommitdiff
path: root/grc/src/gui/NotebookPage.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/src/gui/NotebookPage.py')
-rw-r--r--grc/src/gui/NotebookPage.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/grc/src/gui/NotebookPage.py b/grc/src/gui/NotebookPage.py
index a25243b18..e2e627a2d 100644
--- a/grc/src/gui/NotebookPage.py
+++ b/grc/src/gui/NotebookPage.py
@@ -135,6 +135,15 @@ class NotebookPage(gtk.HBox):
"""
return self._flow_graph
+ def get_read_only(self):
+ """
+ Get the read-only state of the file.
+ Always false for empty path.
+ @return true for read-only
+ """
+ if not self.get_file_path(): return False
+ return not os.access(self.get_file_path(), os.W_OK)
+
def get_file_path(self):
"""
Get the file path for the flow graph.