[vlc-commits] qt: display the default username in login dialog
Thomas Guillem
git at videolan.org
Thu Jan 14 17:15:22 CET 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan 14 17:14:46 2016 +0100| [1464d905e769c25a890d4a281407dd642eeb532e] | committer: Thomas Guillem
qt: display the default username in login dialog
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1464d905e769c25a890d4a281407dd642eeb532e
---
modules/gui/qt4/dialogs/external.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/gui/qt4/dialogs/external.cpp b/modules/gui/qt4/dialogs/external.cpp
index 7da64b8..9c7ebfd 100644
--- a/modules/gui/qt4/dialogs/external.cpp
+++ b/modules/gui/qt4/dialogs/external.cpp
@@ -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" );
More information about the vlc-commits
mailing list