changeset 202:3d4291d4226c

* Treat command failure on hg heads as a success, so that following actions happen properly (hg heads fails on empty repo) * Hide no-modifications-yet label when widget is first created, show it only if it would actually be true * Set directory name to window title * Various textual fixes
author Chris Cannam
date Tue, 04 Jan 2011 14:31:22 +0000
parents 8c8c04bdf0fa
children c77c4d00a4fe
files filestates.h filestatuswidget.cpp mainwindow.cpp multichoicedialog.cpp
diffstat 4 files changed, 23 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/filestates.h	Tue Jan 04 12:42:28 2011 +0000
+++ b/filestates.h	Tue Jan 04 14:31:22 2011 +0000
@@ -37,8 +37,8 @@
         Removed,
         InConflict,
         Missing,
+        Unknown,
         Clean,
-        Unknown,
         Ignored,
 
         FirstState = Modified,
--- a/filestatuswidget.cpp	Tue Jan 04 12:42:28 2011 +0000
+++ b/filestatuswidget.cpp	Tue Jan 04 14:31:22 2011 +0000
@@ -70,8 +70,17 @@
 
     ++row;
     m_noModificationsLabel = new QLabel
-        (tr("You have no uncommitted changes."));
+        (tr("<qt>This area will list files in your working folder that you have changed.<br>At the moment you have no uncommitted changes.<br><br>To see changes made to the repository previously,<br>switch to the History tab.<br><br>%1</qt>")
+#if defined Q_OS_MAC
+         .arg(tr("To open the working folder in Finder,<br>click on the &ldquo;Local&rdquo; folder path shown above."))
+#elif defined Q_OS_WIN32
+         .arg(tr("To open the working folder in Windows Explorer,<br>click on the &ldquo;Local&rdquo; folder path shown above."))
+#else
+         .arg(tr("To open the working folder in your system file manager,<br>click the &ldquo;Local&rdquo; folder path shown above."))
+#endif
+            );
     layout->addWidget(m_noModificationsLabel, row, 1, 1, 2);
+    m_noModificationsLabel->hide();
 
     m_simpleLabels[FileStates::Clean] = tr("Unmodified:");
     m_simpleLabels[FileStates::Modified] = tr("Modified:");
--- a/mainwindow.cpp	Tue Jan 04 12:42:28 2011 +0000
+++ b/mainwindow.cpp	Tue Jan 04 14:31:22 2011 +0000
@@ -1513,10 +1513,10 @@
         return;
     case ACT_QUERY_HEADS:
         // fails if repo is empty; we don't care (if there's a genuine
-        // problem, something else will fail too).  Need to do this,
-        // otherwise empty repo state will not be reflected properly
-        // (since heads/log procedure never completes for empty repo)
-        enableDisableActions();
+        // problem, something else will fail too).  Pretend it
+        // succeeded, so that any further actions that are contingent
+        // on the success of the heads query get carried out properly.
+        commandCompleted(action, "");
         return;
     case ACT_FOLDERDIFF:
     case ACT_CHGSETDIFF:
@@ -1886,6 +1886,13 @@
 {
     DEBUG << "MainWindow::enableDisableActions" << endl;
 
+    QString dirname = QDir(workFolderPath).dirName();
+    if (dirname != "") {
+        setWindowTitle(tr("EasyMercurial: %1").arg(dirname));
+    } else {
+        setWindowTitle(tr("EasyMercurial"));
+    }
+
     //!!! should also do things like set the status texts for the
     //!!! actions appropriately by context
 
--- a/multichoicedialog.cpp	Tue Jan 04 12:42:28 2011 +0000
+++ b/multichoicedialog.cpp	Tue Jan 04 14:31:22 2011 +0000
@@ -49,7 +49,7 @@
     outer->addWidget(m_descriptionLabel, 2, 0, 1, 3);
 
     QFont f = m_descriptionLabel->font();
-    f.setPointSize(f.pointSize() * 0.9);
+    f.setPointSize(f.pointSize() * 0.95);
     m_descriptionLabel->setFont(f);
 
     m_urlLabel = new QLabel(tr("&URL:"));