Added context menu items
for remove read only attribute (I think its cross plattfrom, but only
tested on win 7 x64)
> could be improved the be active only on read only files
for open containing folder ( only working on win32, , but only tested
on win 7 x64)
@@ -271,6 +271,17 @@ class _DataController(_BaseController, WithUndoRedoStacks, WithNamespace):
if old_file != self.filename:
self.remove_from_filesystem(old_file)
+ def open_filemanager(self, path=None):
+ # tested on Win7 x64
+ path = path or self.filename
+ if os.path.exists(path):
+ if sys.platform=='win32':
+ os.startfile('"{}"'.format(os.path.dirname(path)), 'explore')
+
+ def remove_readonly(self, path=None):
+ path = path or self.filename
+ os.chmod(path, stat.S_IWRITE)
+
def open_filemanager(self, path=None):
# tested on Win7 x64
path = path or self.filename
