changeset 165:97faf861618b

* Experiment with removing revision numbers from display (hashes only)
author Chris Cannam
date Fri, 03 Dec 2010 22:42:24 +0000
parents de39da2f9f4d
children 0dfd6567ec0c
files changeset.cpp changesetitem.cpp uncommitteditem.cpp
diffstat 3 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/changeset.cpp	Fri Dec 03 20:37:40 2010 +0000
+++ b/changeset.cpp	Fri Dec 03 22:42:24 2010 +0000
@@ -69,17 +69,19 @@
 	      << "tags"
 	      << "comment";
 
-    propTexts << QObject::tr("Identifier")
-	      << QObject::tr("Author")
-	      << QObject::tr("Date")
-	      << QObject::tr("Branch")
-	      << QObject::tr("Tag")
-	      << QObject::tr("Comment");
+    propTexts << QObject::tr("Identifier:")
+	      << QObject::tr("Author:")
+	      << QObject::tr("Date:")
+	      << QObject::tr("Branch:")
+	      << QObject::tr("Tag:")
+	      << QObject::tr("Comment:");
 
     for (int i = 0; i < propNames.size(); ++i) {
 	QString prop = propNames[i];
 	QString value;
-	if (prop == "comment") {
+        if (prop == "id") {
+            value = hashOf(id());
+        } else if (prop == "comment") {
             value = c;
         } else if (prop == "tags") {
             value = tags().join(" ");
--- a/changesetitem.cpp	Fri Dec 03 20:37:40 2010 +0000
+++ b/changesetitem.cpp	Fri Dec 03 22:42:24 2010 +0000
@@ -108,8 +108,8 @@
     m_parentDiffActions.clear();
 
     QMenu *menu = new QMenu;
-    QLabel *label = new QLabel(tr("<qt>&nbsp;<b>Revision: </b>%1</qt>")
-                               .arg(m_changeset->id()));
+    QLabel *label = new QLabel(tr("<qt><b>&nbsp;Revision: </b>%1</qt>")
+                               .arg(Changeset::hashOf(m_changeset->id())));
     QWidgetAction *wa = new QWidgetAction(menu);
     wa->setDefaultWidget(label);
     menu->addAction(wa);
@@ -124,7 +124,8 @@
 
         foreach (QString parentId, m_changeset->parents()) {
             QAction *diffParent =
-                menu->addAction(tr("Diff to parent %1").arg(parentId));
+                menu->addAction(tr("Diff to parent %1")
+                                .arg(Changeset::hashOf(parentId)));
             connect(diffParent, SIGNAL(triggered()),
                     this, SLOT(diffToParentActivated()));
             m_parentDiffActions[diffParent] = parentId;
--- a/uncommitteditem.cpp	Fri Dec 03 20:37:40 2010 +0000
+++ b/uncommitteditem.cpp	Fri Dec 03 22:42:24 2010 +0000
@@ -68,7 +68,7 @@
 UncommittedItem::activateMenu()
 {
     QMenu *menu = new QMenu;
-    QLabel *label = new QLabel(tr("<qt>&nbsp;<b>Uncommitted changes</b></qt>"));
+    QLabel *label = new QLabel(tr("<qt><b>&nbsp;Uncommitted changes</b></qt>"));
     QWidgetAction *wa = new QWidgetAction(menu);
     wa->setDefaultWidget(label);
     menu->addAction(wa);