summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiesecurity/multiauthmainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiesecurity/multiauthmainwindow.cpp b/libopie2/opiesecurity/multiauthmainwindow.cpp
index 8440b87..17e8705 100644
--- a/libopie2/opiesecurity/multiauthmainwindow.cpp
+++ b/libopie2/opiesecurity/multiauthmainwindow.cpp
@@ -66,80 +66,80 @@ MultiauthMainWindow::MultiauthMainWindow(bool allowBypass)
66 } 66 }
67 else 67 else
68 { 68 {
69 quit->hide(); 69 quit->hide();
70 } 70 }
71 71
72 } 72 }
73 else 73 else
74 { 74 {
75 // we will need this button only if runPlugins() fails in proceed() 75 // we will need this button only if runPlugins() fails in proceed()
76 proceedButton->hide(); 76 proceedButton->hide();
77 // let's proceed now 77 // let's proceed now
78 proceed(); 78 proceed();
79 } 79 }
80} 80}
81 81
82/// nothing to do 82/// nothing to do
83MultiauthMainWindow::~MultiauthMainWindow() { 83MultiauthMainWindow::~MultiauthMainWindow() {
84} 84}
85 85
86/// launch the authentication 86/// launch the authentication
87void MultiauthMainWindow::proceed() { 87void MultiauthMainWindow::proceed() {
88 int result = Internal::runPlugins(); 88 int result = Internal::runPlugins();
89 89
90 90
91 if ( (result == 0) && !explanScreens ) 91 if ( (result == 0) && !explanScreens )
92 { 92 {
93 // the authentication has succeeded, we can exit directly 93 // the authentication has succeeded, we can exit directly
94 // this will work if we haven't been called by the constructor of MultiauthMainWindow 94 // this will work if we haven't been called by the constructor of MultiauthMainWindow
95 close(); 95 close();
96 // and if we've been called by this constructor, we use this variable to tell our 96 // and if we've been called by this constructor, we use this variable to tell our
97 // caller we're already done 97 // caller we're already done
98 alreadyDone = true; 98 alreadyDone = true;
99 return; 99 return;
100 } 100 }
101 else 101 else
102 { 102 {
103 103
104 proceedButton->setText("Another try?"); 104 proceedButton->setText("Another try?");
105 QString resultMessage; 105 QString resultMessage;
106 106
107 if (result == 0) 107 if (result == 0)
108 { 108 {
109 // authentication has succeeded, adapt interface then 109 // authentication has succeeded, adapt interface then
110 message->setText( "<center><h3>" + tr("Congratulations! Your authentication has been successful.") + "</h3></center>" ); 110 message->setText( "<center><h3>" + tr("Congratulations! Your authentication has been successful.") + "</h3></center>" );
111 quit->setText("Enter Opie"); 111 quit->setText("Enter Opie");
112 if ( quit->isHidden() ) 112 if ( quit->isHidden() )
113 { 113 {
114 // that means we don't allow to bypass, but now we can show and connect this button 114 // that means we don't allow to bypass, but now we can show and connect this button
115 QObject::connect(quit, SIGNAL(clicked()), this, SLOT(close())); 115 QObject::connect(quit, SIGNAL(clicked()), this, SLOT(close()));
116 quit->show(); 116 quit->show();
117 } else { 117 } else {
118 if ( message2 != 0 ) message2->hide(); 118 if ( message2 != 0 ) message2->hide();
119 } 119 }
120 } 120 }
121 else 121 else
122 { 122 {
123 // authentication has failed, explain that according to allowBypass 123 // authentication has failed, explain that according to allowBypass
124 message->setText( "<center><h3>" + tr("You have <b>not</b> succeeded enough authentication steps!") + "</h3></center>" ); 124 message->setText( "<center><h3>" + tr("You have <b>not</b> succeeded enough authentication steps!") + "</h3></center>" );
125 proceedButton->show(); 125 proceedButton->show();
126 if ( allowBypass == true ) 126 if ( allowBypass == true )
127 { 127 {
128 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>" ); 128 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>" );
129 message2->show(); 129 message2->show();
130 }
130 } 131 }
131 } 132 }
132} 133}
133}
134 134
135/** When we don't show explanatory screens and we succeed authentication, 135/** When we don't show explanatory screens and we succeed authentication,
136 * as early as during the proceed() call of the constructor, the caller must know 136 * as early as during the proceed() call of the constructor, the caller must know
137 * (through this function) authentication has already been succeeded.. 137 * (through this function) authentication has already been succeeded..
138 * \todo try to avoid this hack? 138 * \todo try to avoid this hack?
139 */ 139 */
140bool MultiauthMainWindow::isAlreadyDone() { 140bool MultiauthMainWindow::isAlreadyDone() {
141 return alreadyDone; 141 return alreadyDone;
142} 142}
143 143
144} 144}
145} 145}