From: Enar Väikene Date: Wed, 27 Jul 2011 07:54:30 +0000 (+0300) Subject: Changed the position of master password and name fields. X-Git-Url: https://vaikene.ee/gitweb/overview.html?a=commitdiff_plain;h=95547de3c87b4f0dc46b2fc53f18e7cbd1782de4;p=evaf Changed the position of master password and name fields. With the new auto-completer support, it makes more sense to enter the master password first and then name of the application or web site. --- diff --git a/src/apps/PswGen/GUI/gui.cpp b/src/apps/PswGen/GUI/gui.cpp index 5ebbf10..965d70e 100644 --- a/src/apps/PswGen/GUI/gui.cpp +++ b/src/apps/PswGen/GUI/gui.cpp @@ -82,10 +82,20 @@ bool Module::init(QString const & args) v->addLayout(g); g->setColumnStretch(2, 2); - QLabel * l = new QLabel(tr("Web site or application &name:", VER_MODULE_NAME_STR)); + QLabel * l = new QLabel(tr("Master &password:", VER_MODULE_NAME_STR)); l->setAlignment(Qt::AlignRight); g->addWidget(l, 0, 0); + wMasterPassword = new QLineEdit; + l->setBuddy(wMasterPassword); + connect(wMasterPassword, SIGNAL(textChanged(QString)), this, SLOT(textChanged(QString))); + wMasterPassword->setEchoMode(QLineEdit::Password); + g->addWidget(wMasterPassword, 0, 1, 1, 2); + + l = new QLabel(tr("Web site or application &name:", VER_MODULE_NAME_STR)); + l->setAlignment(Qt::AlignRight); + g->addWidget(l, 1, 0); + wName = new QLineEdit; l->setBuddy(wName); if (mStorage) { @@ -95,19 +105,9 @@ bool Module::init(QString const & args) wName->setCompleter(completer); } connect(wName, SIGNAL(textChanged(QString)), this, SLOT(textChanged(QString))); - g->addWidget(wName, 0, 1, 1, 2); + g->addWidget(wName, 1, 1, 1, 2); win->widget()->setFocusProxy(wName); - l = new QLabel(tr("Master &password:", VER_MODULE_NAME_STR)); - l->setAlignment(Qt::AlignRight); - g->addWidget(l, 1, 0); - - wMasterPassword = new QLineEdit; - l->setBuddy(wMasterPassword); - connect(wMasterPassword, SIGNAL(textChanged(QString)), this, SLOT(textChanged(QString))); - wMasterPassword->setEchoMode(QLineEdit::Password); - g->addWidget(wMasterPassword, 1, 1, 1, 2); - l = new QLabel(tr("&Length of the password:", VER_MODULE_NAME_STR)); l->setAlignment(Qt::AlignRight); g->addWidget(l, 2, 0);