Index: scribus/ui/propertiespalette_utils.cpp
===================================================================
--- scribus/ui/propertiespalette_utils.cpp	(Revision 22369)
+++ scribus/ui/propertiespalette_utils.cpp	(Arbeitskopie)
@@ -98,7 +98,7 @@
 NameWidget::NameWidget(QWidget* parent) : QLineEdit(parent)
 {
 	setObjectName("namewidget");
-	QRegExp rx( "[\\w()]+" );
+	QRegExp rx( "[\\w()-]+" );
 	QValidator* validator = new QRegExpValidator( rx, this );
 	setValidator( validator );
 }
Index: scribus/ui/propertiespalette_xyz.cpp
===================================================================
--- scribus/ui/propertiespalette_xyz.cpp	(Revision 22369)
+++ scribus/ui/propertiespalette_xyz.cpp	(Arbeitskopie)
@@ -291,7 +291,9 @@
 
 	m_haveItem = false;
 	m_item = i;
-
+	
+	nameEdit->setPalette(QPalette()); // Default colors.
+	
 	nameEdit->setText(m_item->itemName());
 	levelLabel->setText( QString::number(m_item->level()) );
 
@@ -1199,6 +1201,9 @@
 		nameEdit->setText(NameOld);
 		return;
 	}
+	if (m_item->itemName() == nameEdit->text())
+		return;
+	
 	bool found = false;
 	QList<PageItem*> allItems;
 	for (int a = 0; a < m_doc->Items->count(); ++a)
@@ -1219,20 +1224,32 @@
 		}
 		allItems.clear();
 	}
+	
+	QPalette qpl = QPalette(); // Default colors.
+	
 	if (found)
 	{
 		ScMessageBox::warning(this, CommonStrings::trWarning, "<qt>"+ tr("Name \"%1\" isn't unique.<br/>Please choose another.").arg(NameNew)+"</qt>");
-		nameEdit->setText(NameOld);
 		nameEdit->setFocus();
+		
+		//qpl.setColor(QPalette::Base, QColor(50, 255, 255));
+		qpl.setColor(QPalette::Active, QPalette::Base, QColor(255, 160, 160));
+		qpl.setColor(QPalette::Inactive, QPalette::Base, QColor(255, 50, 50));
+		qpl.setColor(QPalette::Disabled, QPalette::Base, QColor(255, 255, 255));
+		qpl.setColor(QPalette::Disabled, QPalette::Text, QColor(255, 150, 150));
+		nameEdit->setPalette(qpl);
+		return;
 	}
-	else
-	{
-		if (m_item->itemName() != nameEdit->text())
-		{
-			m_item->setItemName(nameEdit->text());
-			m_doc->changed();
-		}
-	}
+	
+	// As we checked that the name is not duplicate, setItemName will
+	// not modify our new name proposal.
+	m_item->setItemName(nameEdit->text());
+	m_doc->changed();
+	
+	//nameEdit->setForegroundRole(qpl); //?
+	nameEdit->setPalette(qpl);
+	
+	// TODO: maybe test whether the change was successful?
 }
 
 void PropertiesPalette_XYZ::installSniffer(ScrSpinBox *spinBox)
