[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9759 - gnuradio/trunk/grc/src/gui
From: |
jblum |
Subject: |
[Commit-gnuradio] r9759 - gnuradio/trunk/grc/src/gui |
Date: |
Wed, 8 Oct 2008 18:03:48 -0600 (MDT) |
Author: jblum
Date: 2008-10-08 18:03:45 -0600 (Wed, 08 Oct 2008)
New Revision: 9759
Modified:
gnuradio/trunk/grc/src/gui/ActionHandler.py
gnuradio/trunk/grc/src/gui/NotebookPage.py
Log:
must check for exists, then ro
Modified: gnuradio/trunk/grc/src/gui/ActionHandler.py
===================================================================
--- gnuradio/trunk/grc/src/gui/ActionHandler.py 2008-10-08 23:49:21 UTC (rev
9758)
+++ gnuradio/trunk/grc/src/gui/ActionHandler.py 2008-10-09 00:03:45 UTC (rev
9759)
@@ -328,7 +328,7 @@
elif state == Actions.FLOW_GRAPH_CLOSE:
self.main_window.close_page()
elif state == Actions.FLOW_GRAPH_SAVE:
- #read-only or undefines file path, do save-as
+ #read-only or undefined file path, do save-as
if self.get_page().get_read_only() or not
self.get_page().get_file_path():
self.handle_states(Actions.FLOW_GRAPH_SAVE_AS)
#otherwise try to save
Modified: gnuradio/trunk/grc/src/gui/NotebookPage.py
===================================================================
--- gnuradio/trunk/grc/src/gui/NotebookPage.py 2008-10-08 23:49:21 UTC (rev
9758)
+++ gnuradio/trunk/grc/src/gui/NotebookPage.py 2008-10-09 00:03:45 UTC (rev
9759)
@@ -142,7 +142,8 @@
@return true for read-only
"""
if not self.get_file_path(): return False
- return not os.access(self.get_file_path(), os.W_OK)
+ return os.path.exists(self.get_file_path()) and \
+ not os.access(self.get_file_path(), os.W_OK)
def get_file_path(self):
"""
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9759 - gnuradio/trunk/grc/src/gui,
jblum <=