changeset 429:6a9756700fd1

Compile fix, plural fix
author Chris Cannam
date Fri, 24 Jun 2011 09:28:31 +0100
parents a47eac9c7fea
children e43fc86506d1
files src/mainwindow.cpp
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/mainwindow.cpp	Thu Jun 23 21:04:25 2011 +0100
+++ b/src/mainwindow.cpp	Fri Jun 24 09:28:31 2011 +0100
@@ -637,7 +637,7 @@
     }
 
     QString directory;
-    bool dirCount = 0;
+    int dirCount = 0;
     foreach (QString file, files) {
         QString d = QFileInfo(file).path();
         if (d != directory) {
@@ -1254,10 +1254,16 @@
     //!!! should find available port as well
 
     QTextStream ts(&msg);
-    ts << QString("<qt><h3>%1</h3><p>%2</p><p>%3</p>")
+    ts << QString("<qt><h3>%1</h3><p>%2</p>")
         .arg(tr("Sharing Repository"))
-        .arg(tr("Your local repository is now being made temporarily available via HTTP for workgroup access."))
-        .arg(tr("Users who have network access to your computer can now clone your repository by using the following URL as a remote location:"));
+        .arg(tr("Your local repository is now being made temporarily available via HTTP for workgroup access."));
+    if (addrs.size() > 1) {
+        ts << QString("<p>%3</p>")
+            .arg(tr("Users who have network access to your computer can now clone your repository, by using one of the following URLs as a remote location:"));
+    } else {
+        ts << QString("<p>%3</p>")
+            .arg(tr("Users who have network access to your computer can now clone your repository, by using the following URL as a remote location:"));
+    }
     foreach (QString addr, addrs) {
         ts << QString("<pre>&nbsp;&nbsp;http://%1:8000</pre>").arg(xmlEncode(addr));
     }