author | clem <clem> | 2004-09-30 15:11:21 (UTC) |
---|---|---|
committer | clem <clem> | 2004-09-30 15:11:21 (UTC) |
commit | a823eb5b367c32936a9958f69a9981a55e2022bf (patch) (unidiff) | |
tree | 96c61ec870bd72f53047439eb9c610207e510f6a /core | |
parent | 5cb30454d4a974bacfae126a5b8b321bae8ca600 (diff) | |
download | opie-a823eb5b367c32936a9958f69a9981a55e2022bf.zip opie-a823eb5b367c32936a9958f69a9981a55e2022bf.tar.gz opie-a823eb5b367c32936a9958f69a9981a55e2022bf.tar.bz2 |
- As Zecke suggested, we now hide the plugin list and authentication
configuration tabs if no authentication plugin is installed (but we tell the
user a few things about authentication in a third tab).
- Small warning about syncnet removed.
-rw-r--r-- | core/settings/security/multiauthconfig.cpp | 50 | ||||
-rw-r--r-- | core/settings/security/multiauthconfig.h | 1 |
2 files changed, 51 insertions, 0 deletions
diff --git a/core/settings/security/multiauthconfig.cpp b/core/settings/security/multiauthconfig.cpp index ff11e49..3c73d7b 100644 --- a/core/settings/security/multiauthconfig.cpp +++ b/core/settings/security/multiauthconfig.cpp | |||
@@ -1,17 +1,18 @@ | |||
1 | #include "multiauthconfig.h" | 1 | #include "multiauthconfig.h" |
2 | 2 | ||
3 | #include <opie2/odebug.h> | 3 | #include <opie2/odebug.h> |
4 | 4 | ||
5 | #include <qgroupbox.h> | 5 | #include <qgroupbox.h> |
6 | #include <qvgroupbox.h> | ||
6 | #include <qpe/resource.h> | 7 | #include <qpe/resource.h> |
7 | #include <qlayout.h> | 8 | #include <qlayout.h> |
8 | #include <qlabel.h> | 9 | #include <qlabel.h> |
9 | #include <qhbox.h> | 10 | #include <qhbox.h> |
10 | #include <qheader.h> | 11 | #include <qheader.h> |
11 | #include <qvbox.h> | 12 | #include <qvbox.h> |
12 | #include <qwhatsthis.h> | 13 | #include <qwhatsthis.h> |
13 | #include <qtoolbutton.h> | 14 | #include <qtoolbutton.h> |
14 | #include <qstringlist.h> | 15 | #include <qstringlist.h> |
15 | #include <qdir.h> | 16 | #include <qdir.h> |
16 | #include <qpe/qlibrary.h> | 17 | #include <qpe/qlibrary.h> |
17 | #include <qpe/qpeapplication.h> | 18 | #include <qpe/qpeapplication.h> |
@@ -139,28 +140,42 @@ static void test_and_start() { | |||
139 | 140 | ||
140 | 141 | ||
141 | MultiauthConfig::MultiauthConfig(QWidget* par, const char* w, WFlags f) | 142 | MultiauthConfig::MultiauthConfig(QWidget* par, const char* w, WFlags f) |
142 | : QDialog(par, w, TRUE, f), | 143 | : QDialog(par, w, TRUE, f), |
143 | m_mainTW(0), m_pluginListView(0), m_pluginListWidget(0), | 144 | m_mainTW(0), m_pluginListView(0), m_pluginListWidget(0), |
144 | m_generalConfig(0), m_loginWidget(0), m_syncWidget(0), | 145 | m_generalConfig(0), m_loginWidget(0), m_syncWidget(0), |
145 | m_nbSuccessReq(0), m_plugins_changed(false) | 146 | m_nbSuccessReq(0), m_plugins_changed(false) |
146 | { | 147 | { |
147 | /* Initializes the global configuration window | 148 | /* Initializes the global configuration window |
148 | */ | 149 | */ |
149 | test_and_start(); | 150 | test_and_start(); |
150 | 151 | ||
152 | /* Checks (and memorizes) if any authentication plugins are | ||
153 | * installed on the system | ||
154 | */ | ||
155 | QString path = QPEApplication::qpeDir() + "/plugins/security"; | ||
156 | QDir dir( path, "lib*.so" ); | ||
157 | QStringList list = dir.entryList(); | ||
158 | |||
159 | m_pluginsInstalled = ! list.isEmpty(); | ||
160 | if (m_pluginsInstalled == false) | ||
161 | owarn << "no authentication plugins installed! Talking about it in the last tab..." << oendl; | ||
162 | |||
151 | setCaption( tr( "Security configuration" ) ); | 163 | setCaption( tr( "Security configuration" ) ); |
152 | QVBoxLayout *layout = new QVBoxLayout( this ); | 164 | QVBoxLayout *layout = new QVBoxLayout( this ); |
153 | m_mainTW = new Opie::Ui::OTabWidget( this ); | 165 | m_mainTW = new Opie::Ui::OTabWidget( this ); |
154 | layout->addWidget(m_mainTW); | 166 | layout->addWidget(m_mainTW); |
167 | |||
168 | if (m_pluginsInstalled) | ||
169 | { | ||
155 | m_pluginListWidget = new QWidget(m_mainTW, "plugin list widget"); | 170 | m_pluginListWidget = new QWidget(m_mainTW, "plugin list widget"); |
156 | QVBoxLayout * pluginListLayout = new QVBoxLayout(m_pluginListWidget); | 171 | QVBoxLayout * pluginListLayout = new QVBoxLayout(m_pluginListWidget); |
157 | pluginListLayout->setSpacing(6); | 172 | pluginListLayout->setSpacing(6); |
158 | pluginListLayout->setMargin(11); | 173 | pluginListLayout->setMargin(11); |
159 | QLabel * pluginListTitle = new QLabel( tr( "Load which plugins in what order:" ), m_pluginListWidget ); | 174 | QLabel * pluginListTitle = new QLabel( tr( "Load which plugins in what order:" ), m_pluginListWidget ); |
160 | pluginListLayout->addWidget(pluginListTitle); | 175 | pluginListLayout->addWidget(pluginListTitle); |
161 | QHBox * pluginListHB = new QHBox(m_pluginListWidget); | 176 | QHBox * pluginListHB = new QHBox(m_pluginListWidget); |
162 | pluginListLayout->addWidget(pluginListHB); | 177 | pluginListLayout->addWidget(pluginListHB); |
163 | 178 | ||
164 | m_pluginListView = new QListView(pluginListHB); | 179 | m_pluginListView = new QListView(pluginListHB); |
165 | m_pluginListView->addColumn("PluginList"); | 180 | m_pluginListView->addColumn("PluginList"); |
166 | m_pluginListView->header()->hide(); | 181 | m_pluginListView->header()->hide(); |
@@ -169,35 +184,39 @@ MultiauthConfig::MultiauthConfig(QWidget* par, const char* w, WFlags f) | |||
169 | 184 | ||
170 | QVBox * pluginListVB = new QVBox(pluginListHB); | 185 | QVBox * pluginListVB = new QVBox(pluginListHB); |
171 | new ToolButton( pluginListVB, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) ); | 186 | new ToolButton( pluginListVB, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) ); |
172 | new ToolButton( pluginListVB, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) ); | 187 | new ToolButton( pluginListVB, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) ); |
173 | m_mainTW->addTab( m_pluginListWidget, "pass", tr( "plugins" ) ); | 188 | m_mainTW->addTab( m_pluginListWidget, "pass", tr( "plugins" ) ); |
174 | 189 | ||
175 | connect ( m_pluginListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( pluginsChanged ( ) ) ); | 190 | connect ( m_pluginListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( pluginsChanged ( ) ) ); |
176 | 191 | ||
177 | // general Opie multi-authentication configuration tab | 192 | // general Opie multi-authentication configuration tab |
178 | m_generalConfig = new MultiauthGeneralConfig(m_mainTW); | 193 | m_generalConfig = new MultiauthGeneralConfig(m_mainTW); |
179 | m_mainTW->addTab(m_generalConfig, "SettingsIcon", tr( "Authentication") ); | 194 | m_mainTW->addTab(m_generalConfig, "SettingsIcon", tr( "Authentication") ); |
180 | 195 | ||
196 | } | ||
181 | // login settings page | 197 | // login settings page |
182 | m_loginWidget = new LoginBase(m_mainTW, "login config widget"); | 198 | m_loginWidget = new LoginBase(m_mainTW, "login config widget"); |
183 | m_mainTW->addTab(m_loginWidget, "security/users", tr( "Login") ); | 199 | m_mainTW->addTab(m_loginWidget, "security/users", tr( "Login") ); |
184 | 200 | ||
185 | // sync settings page | 201 | // sync settings page |
186 | m_syncWidget = new SyncBase( m_mainTW, "sync config widget" ); | 202 | m_syncWidget = new SyncBase( m_mainTW, "sync config widget" ); |
187 | m_mainTW->addTab(m_syncWidget, "security/sync", tr( "Sync") ); | 203 | m_mainTW->addTab(m_syncWidget, "security/sync", tr( "Sync") ); |
188 | 204 | ||
189 | // read the "Security" Config file and update our UI | 205 | // read the "Security" Config file and update our UI |
190 | readConfig(); | 206 | readConfig(); |
191 | 207 | ||
208 | |||
209 | if (m_pluginsInstalled) | ||
210 | { | ||
192 | /* loads plugins configuration widgets in mainTW tabs and in pluginListView | 211 | /* loads plugins configuration widgets in mainTW tabs and in pluginListView |
193 | */ | 212 | */ |
194 | 213 | ||
195 | loadPlugins(); | 214 | loadPlugins(); |
196 | 215 | ||
197 | for ( int i = pluginList.count() - 1; i >= 0; i-- ) { | 216 | for ( int i = pluginList.count() - 1; i >= 0; i-- ) { |
198 | MultiauthPlugin plugin = pluginList[i]; | 217 | MultiauthPlugin plugin = pluginList[i]; |
199 | 218 | ||
200 | // load the config widgets in the tabs | 219 | // load the config widgets in the tabs |
201 | // (configWidget will return 0l if there is no configuration GUI) | 220 | // (configWidget will return 0l if there is no configuration GUI) |
202 | MultiauthConfigWidget* widget = plugin.pluginObject->configWidget(m_mainTW); | 221 | MultiauthConfigWidget* widget = plugin.pluginObject->configWidget(m_mainTW); |
203 | if ( widget != 0l ) { | 222 | if ( widget != 0l ) { |
@@ -214,24 +233,44 @@ MultiauthConfig::MultiauthConfig(QWidget* par, const char* w, WFlags f) | |||
214 | } | 233 | } |
215 | if ( m_excludePlugins.find( plugin.name ) == m_excludePlugins.end() ) { | 234 | if ( m_excludePlugins.find( plugin.name ) == m_excludePlugins.end() ) { |
216 | item->setOn( TRUE ); | 235 | item->setOn( TRUE ); |
217 | } | 236 | } |
218 | m_plugins[plugin.name] = item; | 237 | m_plugins[plugin.name] = item; |
219 | } | 238 | } |
220 | 239 | ||
221 | // set the first tab as default. | 240 | // set the first tab as default. |
222 | m_mainTW->setCurrentTab(m_pluginListWidget); | 241 | m_mainTW->setCurrentTab(m_pluginListWidget); |
223 | 242 | ||
224 | // put the number of plugins as the max number of req. auth. | 243 | // put the number of plugins as the max number of req. auth. |
225 | m_generalConfig->nbSuccessMin->setMaxValue( pluginList.count() ); | 244 | m_generalConfig->nbSuccessMin->setMaxValue( pluginList.count() ); |
245 | } | ||
246 | else | ||
247 | { | ||
248 | /* we don't have any installed plugin there. Let's tell | ||
249 | * that to the user in a third tab, using the m_pluginListWidget widget | ||
250 | */ | ||
251 | m_pluginListWidget = new QWidget(m_mainTW, "plugin list widget (no plugins warning)"); | ||
252 | QVBoxLayout * pluginListLayout = new QVBoxLayout(m_pluginListWidget); | ||
253 | pluginListLayout->setSpacing(11); | ||
254 | pluginListLayout->setMargin(11); | ||
255 | pluginListLayout->setAlignment( Qt::AlignTop ); | ||
256 | QVGroupBox *warningBox = new QVGroupBox(tr("Important notice"), m_pluginListWidget, "noPlugins warning box"); | ||
257 | pluginListLayout->addWidget(warningBox); | ||
258 | QLabel * warningText = new QLabel( "<p>" + tr("To be able to protect your PDA with one or more authentication plugins (for example, a simple PIN authentication), you must install at least one <em>opie-multiauth-*</em> package! Once you have done that, you will be able to configure your PDA protection here.") + "</p>", warningBox ); | ||
259 | |||
260 | m_mainTW->addTab(m_pluginListWidget, "security/Security", tr( "Locking") ); | ||
261 | |||
262 | // set the first tab as default. | ||
263 | m_mainTW->setCurrentTab(m_loginWidget); | ||
264 | } | ||
226 | 265 | ||
227 | showMaximized(); | 266 | showMaximized(); |
228 | } | 267 | } |
229 | 268 | ||
230 | /// nothing to do | 269 | /// nothing to do |
231 | MultiauthConfig::~MultiauthConfig() | 270 | MultiauthConfig::~MultiauthConfig() |
232 | { | 271 | { |
233 | } | 272 | } |
234 | 273 | ||
235 | void MultiauthConfig::accept() { | 274 | void MultiauthConfig::accept() { |
236 | writeConfig(); | 275 | writeConfig(); |
237 | 276 | ||
@@ -262,35 +301,39 @@ void MultiauthConfig::moveSelectedDown() | |||
262 | { | 301 | { |
263 | QListViewItem *item = m_pluginListView->selectedItem(); | 302 | QListViewItem *item = m_pluginListView->selectedItem(); |
264 | if ( item && item->itemBelow() ) { | 303 | if ( item && item->itemBelow() ) { |
265 | item->moveItem( item->itemBelow() ); | 304 | item->moveItem( item->itemBelow() ); |
266 | } | 305 | } |
267 | } | 306 | } |
268 | 307 | ||
269 | /// reads the <code>Security.conf</code> Config file, and updates parts of the user interface | 308 | /// reads the <code>Security.conf</code> Config file, and updates parts of the user interface |
270 | void MultiauthConfig::readConfig() | 309 | void MultiauthConfig::readConfig() |
271 | { | 310 | { |
272 | // pointer, so we release this Config when we want | 311 | // pointer, so we release this Config when we want |
273 | Config* pcfg = new Config("Security"); | 312 | Config* pcfg = new Config("Security"); |
313 | |||
314 | if (m_pluginsInstalled) | ||
315 | { | ||
274 | pcfg->setGroup( "Misc" ); | 316 | pcfg->setGroup( "Misc" ); |
275 | m_generalConfig->onStart->setChecked( pcfg->readBoolEntry( "onStart", false ) ); | 317 | m_generalConfig->onStart->setChecked( pcfg->readBoolEntry( "onStart", false ) ); |
276 | m_generalConfig->onResume->setChecked( pcfg->readBoolEntry( "onResume", false ) ); | 318 | m_generalConfig->onResume->setChecked( pcfg->readBoolEntry( "onResume", false ) ); |
277 | m_generalConfig->nbSuccessMin->setValue( pcfg->readNumEntry( "nbSuccessMin", 1 ) ); | 319 | m_generalConfig->nbSuccessMin->setValue( pcfg->readNumEntry( "nbSuccessMin", 1 ) ); |
278 | m_generalConfig->noProtectConfig->setChecked( pcfg->readBoolEntry( "noProtectConfig", true) ); | 320 | m_generalConfig->noProtectConfig->setChecked( pcfg->readBoolEntry( "noProtectConfig", true) ); |
279 | m_generalConfig->explanScreens->setChecked( pcfg->readBoolEntry( "explanScreens", true ) ); | 321 | m_generalConfig->explanScreens->setChecked( pcfg->readBoolEntry( "explanScreens", true ) ); |
280 | m_generalConfig->allowBypass->setChecked( pcfg->readBoolEntry( "allowBypass", false ) ); | 322 | m_generalConfig->allowBypass->setChecked( pcfg->readBoolEntry( "allowBypass", false ) ); |
281 | 323 | ||
282 | pcfg->setGroup( "Plugins" ); | 324 | pcfg->setGroup( "Plugins" ); |
283 | m_excludePlugins = pcfg->readListEntry( "ExcludePlugins", ',' ); | 325 | m_excludePlugins = pcfg->readListEntry( "ExcludePlugins", ',' ); |
284 | m_allPlugins = pcfg->readListEntry( "AllPlugins", ',' ); | 326 | m_allPlugins = pcfg->readListEntry( "AllPlugins", ',' ); |
327 | } | ||
285 | 328 | ||
286 | /* Login and Sync stuff */ | 329 | /* Login and Sync stuff */ |
287 | pcfg->setGroup("Sync"); | 330 | pcfg->setGroup("Sync"); |
288 | int auth_peer = pcfg->readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24 | 331 | int auth_peer = pcfg->readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24 |
289 | int auth_peer_bits = pcfg->readNumEntry("auth_peer_bits",24); | 332 | int auth_peer_bits = pcfg->readNumEntry("auth_peer_bits",24); |
290 | 333 | ||
291 | pcfg->setGroup("SyncMode"); | 334 | pcfg->setGroup("SyncMode"); |
292 | int mode = pcfg->readNumEntry("Mode",2); // Default to Sharp | 335 | int mode = pcfg->readNumEntry("Mode",2); // Default to Sharp |
293 | switch( mode ) { | 336 | switch( mode ) { |
294 | case 0x01: | 337 | case 0x01: |
295 | m_syncWidget->syncModeCombo->setCurrentItem( 0 ); | 338 | m_syncWidget->syncModeCombo->setCurrentItem( 0 ); |
296 | break; | 339 | break; |
@@ -342,24 +385,27 @@ void MultiauthConfig::readConfig() | |||
342 | connect(m_loginWidget->userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int))); | 385 | connect(m_loginWidget->userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int))); |
343 | connect(m_syncWidget->restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults())); | 386 | connect(m_syncWidget->restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults())); |
344 | connect(m_syncWidget->deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry())); | 387 | connect(m_syncWidget->deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry())); |
345 | 388 | ||
346 | loadUsers(); | 389 | loadUsers(); |
347 | updateGUI(); | 390 | updateGUI(); |
348 | 391 | ||
349 | } | 392 | } |
350 | 393 | ||
351 | void MultiauthConfig::writeConfig() | 394 | void MultiauthConfig::writeConfig() |
352 | { | 395 | { |
353 | Config* pcfg = new Config("Security"); | 396 | Config* pcfg = new Config("Security"); |
397 | |||
398 | if (m_pluginsInstalled) | ||
399 | { | ||
354 | pcfg->setGroup( "Plugins" ); | 400 | pcfg->setGroup( "Plugins" ); |
355 | QStringList exclude; | 401 | QStringList exclude; |
356 | QStringList include; | 402 | QStringList include; |
357 | QStringList allPlugins; | 403 | QStringList allPlugins; |
358 | 404 | ||
359 | QListViewItemIterator list_it( m_pluginListView ); | 405 | QListViewItemIterator list_it( m_pluginListView ); |
360 | 406 | ||
361 | // this makes sure the names get saved in the order selected | 407 | // this makes sure the names get saved in the order selected |
362 | for ( ; list_it.current(); ++list_it ) { | 408 | for ( ; list_it.current(); ++list_it ) { |
363 | QMap <QString, QCheckListItem *>::Iterator it; | 409 | QMap <QString, QCheckListItem *>::Iterator it; |
364 | for ( it = m_plugins.begin(); it != m_plugins. end (); ++it ) { | 410 | for ( it = m_plugins.begin(); it != m_plugins. end (); ++it ) { |
365 | if ( list_it.current() == (*it) && !(*it)-> isOn () ) { | 411 | if ( list_it.current() == (*it) && !(*it)-> isOn () ) { |
@@ -374,42 +420,46 @@ void MultiauthConfig::writeConfig() | |||
374 | } | 420 | } |
375 | pcfg->writeEntry( "ExcludePlugins", exclude, ',' ); | 421 | pcfg->writeEntry( "ExcludePlugins", exclude, ',' ); |
376 | pcfg->writeEntry( "IncludePlugins", include, ',' ); | 422 | pcfg->writeEntry( "IncludePlugins", include, ',' ); |
377 | pcfg->writeEntry( "AllPlugins", allPlugins, ',' ); | 423 | pcfg->writeEntry( "AllPlugins", allPlugins, ',' ); |
378 | 424 | ||
379 | pcfg->setGroup( "Misc" ); | 425 | pcfg->setGroup( "Misc" ); |
380 | pcfg->writeEntry( "onStart", m_generalConfig->onStart->isChecked() ); | 426 | pcfg->writeEntry( "onStart", m_generalConfig->onStart->isChecked() ); |
381 | pcfg->writeEntry( "onResume", m_generalConfig->onResume->isChecked() ); | 427 | pcfg->writeEntry( "onResume", m_generalConfig->onResume->isChecked() ); |
382 | pcfg->writeEntry( "nbSuccessMin", m_generalConfig->nbSuccessMin->text() ); | 428 | pcfg->writeEntry( "nbSuccessMin", m_generalConfig->nbSuccessMin->text() ); |
383 | pcfg->writeEntry( "noProtectConfig", m_generalConfig->noProtectConfig->isChecked() ); | 429 | pcfg->writeEntry( "noProtectConfig", m_generalConfig->noProtectConfig->isChecked() ); |
384 | pcfg->writeEntry( "explanScreens", m_generalConfig->explanScreens->isChecked() ); | 430 | pcfg->writeEntry( "explanScreens", m_generalConfig->explanScreens->isChecked() ); |
385 | pcfg->writeEntry( "allowBypass", m_generalConfig->allowBypass->isChecked() ); | 431 | pcfg->writeEntry( "allowBypass", m_generalConfig->allowBypass->isChecked() ); |
432 | } | ||
386 | 433 | ||
387 | /* Login and Sync stuff */ | 434 | /* Login and Sync stuff */ |
388 | 435 | ||
389 | pcfg->setGroup("Sync"); | 436 | pcfg->setGroup("Sync"); |
390 | int auth_peer=0; | 437 | int auth_peer=0; |
391 | int auth_peer_bits; | 438 | int auth_peer_bits; |
392 | QString sn = m_syncWidget->syncnet->currentText(); | 439 | QString sn = m_syncWidget->syncnet->currentText(); |
393 | parseNet(sn,auth_peer,auth_peer_bits); | 440 | parseNet(sn,auth_peer,auth_peer_bits); |
394 | 441 | ||
395 | //this is the *selected* (active) net range | 442 | //this is the *selected* (active) net range |
396 | pcfg->writeEntry("auth_peer",auth_peer); | 443 | pcfg->writeEntry("auth_peer",auth_peer); |
397 | pcfg->writeEntry("auth_peer_bits",auth_peer_bits); | 444 | pcfg->writeEntry("auth_peer_bits",auth_peer_bits); |
398 | 445 | ||
399 | //write back all other net ranges in *cleartext* | 446 | //write back all other net ranges in *cleartext* |
400 | for (int i=0; i<10; i++) { | 447 | for (int i=0; i<10; i++) { |
401 | QString target; | 448 | QString target; |
402 | target.sprintf("net%d", i); | 449 | target.sprintf("net%d", i); |
450 | if ( i < m_syncWidget->syncnet->count() ) | ||
403 | pcfg->writeEntry(target,m_syncWidget->syncnet->text(i)); | 451 | pcfg->writeEntry(target,m_syncWidget->syncnet->text(i)); |
452 | else // no more entry in the syncnet list -> we clear the line | ||
453 | pcfg->writeEntry(target, ""); | ||
404 | } | 454 | } |
405 | 455 | ||
406 | #ifdef ODP | 456 | #ifdef ODP |
407 | #error "Use 0,1,2 and use Launcher" | 457 | #error "Use 0,1,2 and use Launcher" |
408 | #endif | 458 | #endif |
409 | /* keep the old code so we don't use currentItem directly */ | 459 | /* keep the old code so we don't use currentItem directly */ |
410 | int value = 0x02; | 460 | int value = 0x02; |
411 | switch( m_syncWidget->syncModeCombo->currentItem() ) { | 461 | switch( m_syncWidget->syncModeCombo->currentItem() ) { |
412 | case 0: | 462 | case 0: |
413 | value = 0x01; | 463 | value = 0x01; |
414 | break; | 464 | break; |
415 | case 1: | 465 | case 1: |
diff --git a/core/settings/security/multiauthconfig.h b/core/settings/security/multiauthconfig.h index 649815d..5287083 100644 --- a/core/settings/security/multiauthconfig.h +++ b/core/settings/security/multiauthconfig.h | |||
@@ -112,24 +112,25 @@ private: | |||
112 | QMap<QString,QCheckListItem*> m_plugins; | 112 | QMap<QString,QCheckListItem*> m_plugins; |
113 | /// plugin list page | 113 | /// plugin list page |
114 | QWidget *m_pluginListWidget; | 114 | QWidget *m_pluginListWidget; |
115 | /// misc config page | 115 | /// misc config page |
116 | MultiauthGeneralConfig *m_generalConfig; | 116 | MultiauthGeneralConfig *m_generalConfig; |
117 | /// login (root / ...) choice page | 117 | /// login (root / ...) choice page |
118 | LoginBase *m_loginWidget; | 118 | LoginBase *m_loginWidget; |
119 | /// synchronization settings page | 119 | /// synchronization settings page |
120 | SyncBase *m_syncWidget; | 120 | SyncBase *m_syncWidget; |
121 | 121 | ||
122 | int m_nbSuccessReq; | 122 | int m_nbSuccessReq; |
123 | bool m_plugins_changed; | 123 | bool m_plugins_changed; |
124 | bool m_pluginsInstalled; | ||
124 | 125 | ||
125 | void readConfig(); | 126 | void readConfig(); |
126 | void loadPlugins(); | 127 | void loadPlugins(); |
127 | 128 | ||
128 | // Login and Sync stuff | 129 | // Login and Sync stuff |
129 | void loadUsers(); | 130 | void loadUsers(); |
130 | bool telnetAvailable() const; | 131 | bool telnetAvailable() const; |
131 | bool sshAvailable() const; | 132 | bool sshAvailable() const; |
132 | void updateGUI(); | 133 | void updateGUI(); |
133 | 134 | ||
134 | static void parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits); | 135 | static void parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits); |
135 | void selectNet(int auth_peer,int auth_peer_bits,bool update); | 136 | void selectNet(int auth_peer,int auth_peer_bits,bool update); |