diff incomingdialog.cpp @ 307:5b4aa1c24407 new-branches-with-status-outside-tabs

Merge branch status_outside_tabs into branch new-branches, and make a new branch
author Chris Cannam
date Mon, 28 Feb 2011 13:09:37 +0000
parents 5e4a10af7945
children
line wrap: on
line diff
--- a/incomingdialog.cpp	Wed Feb 09 12:03:15 2011 +0000
+++ b/incomingdialog.cpp	Mon Feb 28 13:09:37 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);
 }