summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2016-12-21 16:05:46 +0100
committerSimon Rettberg2016-12-21 16:05:46 +0100
commit05059384ee02b728f996848ffdf4ce3c8e3ae57e (patch)
tree04acf01964efbd5933d503c9bdf6f516100d71bd
parent[maingui] Support SecuredPrint (Canon) (diff)
downloadprintergui-05059384ee02b728f996848ffdf4ce3c8e3ae57e.tar.gz
printergui-05059384ee02b728f996848ffdf4ce3c8e3ae57e.tar.xz
printergui-05059384ee02b728f996848ffdf4ce3c8e3ae57e.zip
[pwgui] Focus password field by default, react to return key in text boxes
-rw-r--r--src/pwgui/pwgui.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pwgui/pwgui.cpp b/src/pwgui/pwgui.cpp
index b6130f0..b92bab4 100644
--- a/src/pwgui/pwgui.cpp
+++ b/src/pwgui/pwgui.cpp
@@ -17,6 +17,8 @@ PwGui::PwGui(int pfd, char *user, QWidget *parent) :
initializeUI(user);
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(on_accept()));
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(on_reject()));
+ connect(ui->lineEditUser, SIGNAL(returnPressed()), ui->lineEditPass, SLOT(setFocus()));
+ connect(ui->lineEditPass, SIGNAL(returnPressed()), this, SLOT(on_accept()));
}
// ____________________________________________________________________________
@@ -52,6 +54,7 @@ void PwGui::initializeUI(char *user)
this->showNormal();
this->raise();
this->activateWindow();
+ ui->lineEditPass->setFocus();
}
// ____________________________________________________________________________