--- a/QTfrontend/pages.cpp Sat Jan 22 22:31:05 2011 +0100
+++ b/QTfrontend/pages.cpp Sat Jan 22 22:43:54 2011 +0100
@@ -617,6 +617,7 @@
editNetNick = new QLineEdit(groupMisc);
editNetNick->setMaxLength(20);
editNetNick->setText(QLineEdit::tr("unnamed"));
+ connect(editNetNick, SIGNAL(editingFinished()), this, SLOT(trimNetNick()));
MiscLayout->addWidget(editNetNick, 0, 1);
QLabel *labelLanguage = new QLabel(groupMisc);
@@ -832,6 +833,11 @@
this->CBResolution->setEnabled(!this->CBFullscreen->isChecked());
}
+void PageOptions::trimNetNick()
+{
+ editNetNick->setText(editNetNick->text().trimmed());
+}
+
PageNet::PageNet(QWidget* parent) : AbstractPage(parent)
{
QFont * font14 = new QFont("MS Shell Dlg", 14);