branch : pmacs2
This commit is contained in:
moculus 2007-07-19 18:52:22 +00:00
parent 0b4cd8dc7b
commit c2b6775ed0
1 changed files with 12 additions and 0 deletions

View File

@ -183,6 +183,18 @@ class OpenAesFile(Method):
b = w.application.open_path(vargs['filename'], 'aes', vargs['password'])
SwitchBuffer().execute(w, buffername=b.name())
return
class ViewBufferParent(Method):
def _execute(self, w, **vargs):
b = w.buffer
if not hasattr(b, 'path'):
w.set_error('Buffer has not path')
elif b.path == '/':
w.set_error("Root directory has no parent")
else:
path = os.path.dirname(b.path)
w.application.methods['open-file'].execute(w, filename=path)
class SwitchBuffer(Method):
'''Switch to a different'''
args = [Argument('buffername', datatype="buffer", prompt="Switch To Buffer: ",