[kupfer: 4/7] plugin.truecrypt: mount file action valid only for files.



commit a7bad1d3405720cdb8eebbd3ce41a917139eda16
Author: Karol BÄ?dkowski <karol bedkowsk+gh gmail com>
Date:   Fri Dec 11 08:18:36 2009 +0100

    plugin.truecrypt: mount file action valid only for files.

 kupfer/plugin/truecrypt.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/plugin/truecrypt.py b/kupfer/plugin/truecrypt.py
index 7f5b273..7dbacfe 100644
--- a/kupfer/plugin/truecrypt.py
+++ b/kupfer/plugin/truecrypt.py
@@ -65,6 +65,9 @@ class MountFile(Action):
 	def get_description(self):
 		return _("Try to mount file as Truecrypt volume")
 
+	def valid_for_item(self, item):
+		return os.path.isfile(item.object)
+
 
 class DismountAll(Action):
 	def __init__(self):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]