[kupfer: 21/24] plugin.truecrypt: Use utils.get_display_path_for_bytestring
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer: 21/24] plugin.truecrypt: Use utils.get_display_path_for_bytestring
- Date: Fri, 27 Nov 2009 13:40:17 +0000 (UTC)
commit ffa7241af4bdc4473e42fc9fddcd09d54976b6ec
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Tue Nov 24 14:14:40 2009 +0100
plugin.truecrypt: Use utils.get_display_path_for_bytestring
Use utils.get_display_path_for_bytestring to get a string for
displaying the volume's path. On POSIX, a filesystem path may be of
any encoding, and the only correct way for us to handle it is to ask
GLib for the appropriate reprensentation.
kupfer/plugin/truecrypt.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/plugin/truecrypt.py b/kupfer/plugin/truecrypt.py
index 8272265..3e8273c 100644
--- a/kupfer/plugin/truecrypt.py
+++ b/kupfer/plugin/truecrypt.py
@@ -27,7 +27,8 @@ class Volume(Leaf):
return "truecrypt"
def get_description(self):
- return _("TrueCrypt volume: %(file)s") % dict(file=unicode(self.object))
+ dispname = utils.get_display_path_for_bytestring(self.object)
+ return _("TrueCrypt volume: %(file)s") % dict(file=dispname)
def get_actions(self):
yield MountVolume()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]