[kupfer] Read Application IDs with the filesystem encoding



commit 43d59a2898559249894a2c14b1875ee878395ecd
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Fri Mar 12 03:58:29 2010 +0100

    Read Application IDs with the filesystem encoding
    
    Application IDs are bytestrings that come from the filesystem (from
    the name of the desktop file and from possible vendor folder).
    
    We must be careful to decode this to unicode properly when we use the
    application id as program alias.
    
    Proposed to fix bug:
    https://bugs.launchpad.net/kupfer/+bug/537730

 kupfer/obj/objects.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/obj/objects.py b/kupfer/obj/objects.py
index b7f5a37..36d5ee5 100644
--- a/kupfer/obj/objects.py
+++ b/kupfer/obj/objects.py
@@ -216,7 +216,7 @@ class AppLeaf (Leaf):
 		return self.get_id()
 
 	def _get_package_name(self):
-		return os.path.basename(self.get_id())
+		return gobject.filename_display_basename(self.get_id())
 
 	def get_id(self):
 		"""Return the unique ID for this app.



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