zz_setContentsDialog.cpp

changeset 61
109b07334fa0
parent 39
110669124caf
child 82
e61c50fdb8cc
--- a/zz_setContentsDialog.cpp	Thu Mar 21 16:25:03 2013 +0200
+++ b/zz_setContentsDialog.cpp	Thu Mar 21 18:26:57 2013 +0200
@@ -39,12 +39,25 @@
 		"standard</a> for further information.");
 	qContents->setMinimumWidth (384);
 	
+	if (obj->getType() == OBJ_Gibberish) {
+		qErrorLabel = new QLabel;
+		qErrorLabel->setText (str::mkfmt ("<span style=\"color: #900\">%s</span>",
+			static_cast<LDGibberish*> (obj)->zReason.chars()));
+	}
+	
 	IMPLEMENT_DIALOG_BUTTONS
 	
 	QVBoxLayout* layout = new QVBoxLayout;
 	layout->addWidget (qContentsLabel);
 	layout->addWidget (qContents);
-	layout->addWidget (qButtons);
+	
+	QHBoxLayout* layout2 = new QHBoxLayout;
+	
+	if (obj->getType() == OBJ_Gibberish)
+		layout2->addWidget (qErrorLabel);
+	
+	layout2->addWidget (qButtons);
+	layout->addLayout (layout2);
 	setLayout (layout);
 	
 	setWindowTitle (APPNAME_DISPLAY " - setting contents");

mercurial