[meld] vcview: Fix display of unicode repo paths



commit ee1c49c057a7ee60e11a3ca416bef073f5f32079
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Mon Jun 9 07:48:47 2014 +1000

    vcview: Fix display of unicode repo paths

 meld/vcview.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/meld/vcview.py b/meld/vcview.py
index 6be3757..609665f 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -408,9 +408,13 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
         return recent.TYPE_VC, [self.location]
 
     def recompute_label(self):
-        self.label_text = os.path.basename(self.location)
+        location = self.location
+        if isinstance(location, str):
+            location = location.decode(
+                sys.getfilesystemencoding(), 'replace')
+        self.label_text = os.path.basename(location)
         # TRANSLATORS: This is the location of the directory the user is diffing
-        self.tooltip_text = _("%s: %s") % (_("Location"), self.location)
+        self.tooltip_text = _("%s: %s") % (_("Location"), location)
         self.label_changed()
 
     def _search_recursively_iter(self, iterstart):


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