diff incomingdialog.cpp @ 301:3bb6b63420ad status_outside_tabs

Merge from the default branch
author Chris Cannam
date Tue, 22 Feb 2011 15:52:22 +0000
parents 5e4a10af7945
children
line wrap: on
line diff
--- a/incomingdialog.cpp	Tue Feb 22 13:12:16 2011 +0000
+++ b/incomingdialog.cpp	Tue Feb 22 15:52:22 2011 +0000
@@ -40,7 +40,9 @@
 	    body = QString("<p>%1</p><code>%2</code>")
 		.arg(tr("The command output was:"))
 		.arg(xmlEncode(text).replace("\n", "<br>"));
-	}
+	} else {
+            body = tr("<qt>Your local repository already contains all changes found in the remote repository.</qt>");
+        }
 	scroll = false;
     } else {
         head = tr("There are %n change(s) ready to pull", "", csets.size());
@@ -59,12 +61,13 @@
     int iconSize = style->pixelMetric(QStyle::PM_MessageBoxIconSize, 0, this);
     info->setPixmap(style->standardIcon(QStyle::SP_MessageBoxInformation, 0, this)
 		    .pixmap(iconSize, iconSize));
-    layout->addWidget(info, 0, 0);
+    layout->addWidget(info, 0, 0, 2, 1);
 
     QLabel *headLabel = new QLabel(QString("<qt><h3>%1</h3></qt>").arg(head));
     layout->addWidget(headLabel, 0, 1);
 
     QLabel *textLabel = new QLabel(body);
+    if (csets.empty()) textLabel->setWordWrap(true);
 
     if (scroll) {
 	QScrollArea *sa = new QScrollArea;
@@ -78,6 +81,9 @@
     QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Ok);
     connect(bb, SIGNAL(accepted()), this, SLOT(accept()));
     layout->addWidget(bb, 2, 0, 1, 2);
+
+    layout->setColumnStretch(1, 20);
+    setMinimumWidth(400);
 }