[meld/Python3] vcview: Remove display_path(); we always handling unicode filenames now
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/Python3] vcview: Remove display_path(); we always handling unicode filenames now
- Date: Sun, 24 Jul 2016 01:48:32 +0000 (UTC)
commit 0b864c309589a5d4d71d6970ef4009f395505e4f
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Jul 24 11:25:54 2016 +1000
vcview: Remove display_path(); we always handling unicode filenames now
meld/vcview.py | 18 +++++-------------
1 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/meld/vcview.py b/meld/vcview.py
index 497dc2d..9ee2257 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -153,13 +153,6 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
"ignored": ("VcShowIgnored", Entry.is_ignored),
}
- file_encoding = sys.getfilesystemencoding()
-
- @classmethod
- def display_path(cls, bytes):
- encodings = (cls.file_encoding,)
- return misc.fallback_decode(bytes, encodings, lossy=True)
-
def __init__(self):
melddoc.MeldDoc.__init__(self)
gnomeglade.Component.__init__(self, "vcview.ui", "vcview",
@@ -329,15 +322,14 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
return recent.TYPE_VC, [self.location]
def recompute_label(self):
- location = self.display_path(self.location)
- self.label_text = os.path.basename(location)
+ self.label_text = os.path.basename(self.location)
# TRANSLATORS: This is the location of the directory being viewed
- self.tooltip_text = _("%s: %s") % (_("Location"), location)
+ self.tooltip_text = _("%s: %s") % (_("Location"), self.location)
self.label_changed()
def _search_recursively_iter(self, iterstart):
rootname = self.model.get_file_path(iterstart)
- display_prefix = len(self.display_path(rootname)) + 1
+ display_prefix = len(rootname) + 1
symlinks_followed = set()
todo = [(self.model.get_path(iterstart), rootname)]
@@ -352,7 +344,7 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
todo.sort()
treepath, path = todo.pop(0)
it = self.model.get_iter(treepath)
- yield _("Scanning %s") % self.display_path(path)[display_prefix:]
+ yield _("Scanning %s") % path[display_prefix:]
entries = self.vc.get_entries(path)
entries = [e for e in entries if any(f(e) for f in filters)]
@@ -425,7 +417,7 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
self.emit("create-diff", [path], {})
return
- basename = self.display_path(os.path.basename(path))
+ basename = os.path.basename(path)
meta = {
'parent': self,
'prompt_resolve': False,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]