[meld] Use better labels for recent VC comparisons (bgo#699063)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Use better labels for recent VC comparisons (bgo#699063)
- Date: Sat, 27 Apr 2013 22:27:03 +0000 (UTC)
commit fb551b68fa2d726b82e4f7eb8466b88f41539b0f
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Apr 28 08:23:29 2013 +1000
Use better labels for recent VC comparisons (bgo#699063)
This commit also changes the behaviour to show home-relative paths
for VC comparisons where appropriate, which make things neater.
meld/recent.py | 10 +++++++++-
po/POTFILES.in | 1 +
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/meld/recent.py b/meld/recent.py
index 7cc18e9..5581127 100644
--- a/meld/recent.py
+++ b/meld/recent.py
@@ -30,6 +30,8 @@ import ConfigParser
import os
import tempfile
+from gettext import gettext as _
+
import gio
import glib
import gtk
@@ -94,7 +96,13 @@ class RecentFiles(object):
if len(paths) > 1:
display_name = " vs. ".join(misc.shorten_names(*paths))
else:
- display_name = "Comparison " + paths[0]
+ display_path = paths[0]
+ userhome = os.path.expanduser("~")
+ if display_path.startswith(userhome):
+ # FIXME: What should we show on Windows?
+ display_path = "~" + display_path[len(userhome):]
+ display_name = _("Version control:") + " " + display_path
+ # FIXME: Should this be translatable? It's not actually used anywhere.
description = "%s comparison\n%s" % (comp_type, ", ".join(paths))
recent_metadata = {
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1ee6871..9cfacb6 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -20,6 +20,7 @@ meld/meldwindow.py
meld/misc.py
meld/patchdialog.py
meld/preferences.py
+meld/recent.py
meld/vcview.py
meld/ui/findbar.py
meld/ui/historyentry.py
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]