summaryrefslogtreecommitdiff
path: root/libopie2
authorchicken <chicken>2004-10-07 11:48:32 (UTC)
committer chicken <chicken>2004-10-07 11:48:32 (UTC)
commit5f3114e98ba6732127a6ac4c8cdcf0af3ff1f259 (patch) (side-by-side diff)
treee5928caaedc54e49cf899f474c902005d208968e /libopie2
parent08bb0269afae5ad4a23fc5677cdda6554342da5c (diff)
downloadopie-5f3114e98ba6732127a6ac4c8cdcf0af3ff1f259.zip
opie-5f3114e98ba6732127a6ac4c8cdcf0af3ff1f259.tar.gz
opie-5f3114e98ba6732127a6ac4c8cdcf0af3ff1f259.tar.bz2
build fix
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiesecurity/multiauthmainwindow.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie2/opiesecurity/multiauthmainwindow.cpp b/libopie2/opiesecurity/multiauthmainwindow.cpp
index e60d245..6404811 100644
--- a/libopie2/opiesecurity/multiauthmainwindow.cpp
+++ b/libopie2/opiesecurity/multiauthmainwindow.cpp
@@ -69,76 +69,77 @@ MultiauthMainWindow::MultiauthMainWindow(bool allowBypass = false)
quit->hide();
}
}
else
{
// we will need this button only if runPlugins() fails in proceed()
proceedButton->hide();
// let's proceed now
proceed();
}
}
/// nothing to do
MultiauthMainWindow::~MultiauthMainWindow() {
}
/// launch the authentication
void MultiauthMainWindow::proceed() {
int result = Internal::runPlugins();
if ( (result == 0) && !explanScreens )
{
// the authentication has succeeded, we can exit directly
// this will work if we haven't been called by the constructor of MultiauthMainWindow
close();
// and if we've been called by this constructor, we use this variable to tell our
// caller we're already done
alreadyDone = true;
return;
}
else
{
proceedButton->setText("Another try?");
QString resultMessage;
if (result == 0)
{
// authentication has succeeded, adapt interface then
message->setText( "<center><h3>" + tr("Congratulations! Your authentication has been successful.") + "</h3></center>" );
quit->setText("Enter Opie");
if ( quit->isHidden() )
{
// that means we don't allow to bypass, but now we can show and connect this button
QObject::connect(quit, SIGNAL(clicked()), this, SLOT(close()));
quit->show();
} else {
if ( message2 != 0 ) message2->hide();
}
}
else
{
// authentication has failed, explain that according to allowBypass
message->setText( "<center><h3>" + tr("You have <b>not</b> succeeded enough authentication steps!") + "</h3></center>" );
proceedButton->show();
if ( allowBypass == true )
{
message2->setText( "<center><p>" + tr("Be careful: if this was not a <b>simulation</b>, you would have to go back through all the steps now.") + "</p></center>" );
message2->show();
}
}
}
+}
/** When we don't show explanatory screens and we succeed authentication,
* as early as during the proceed() call of the constructor, the caller must know
* (through this function) authentication has already been succeeded..
* \todo try to avoid this hack?
*/
bool MultiauthMainWindow::isAlreadyDone() {
return alreadyDone;
}
}
}