Commit 1464d905 authored by Thomas Guillem's avatar Thomas Guillem
Browse files

qt: display the default username in login dialog

parent 06b23fcb
......@@ -111,6 +111,8 @@ void DialogHandler::requestLogin (void *value)
grid->addWidget (new QLabel (qfu(data->message)), 0, 0, 1, 2);
QLineEdit *userLine = new QLineEdit;
if (data->default_username != NULL)
userLine->setText(qtr(data->default_username));
grid->addWidget (new QLabel (qtr("Username")), 1, 0);
grid->addWidget (userLine, 1, 1);
......@@ -131,6 +133,10 @@ void DialogHandler::requestLogin (void *value)
panel->setLayout (grid);
layout->addWidget (panel);
/* focus on passLine if the username is already set */
if (data->default_username != NULL)
passLine->setFocus();
/* OK, Cancel buttons */
QDialogButtonBox *buttonBox = new QDialogButtonBox;
QPushButton *okButton = new QPushButton( "&Ok" );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment