author | zecke <zecke> | 2004-07-19 21:48:29 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-07-19 21:48:29 (UTC) |
commit | 595d3211a7982471f68bb116fb47cf4c6218d7c1 (patch) (unidiff) | |
tree | 1ed2caebe113c43979f0361c172b6232a46fd823 /core/settings/security/multiauthconfig.cpp | |
parent | d2dfe297f99684ad361240ab4f63dfb1ff8850dd (diff) | |
download | opie-595d3211a7982471f68bb116fb47cf4c6218d7c1.zip opie-595d3211a7982471f68bb116fb47cf4c6218d7c1.tar.gz opie-595d3211a7982471f68bb116fb47cf4c6218d7c1.tar.bz2 |
Make it quicklaunchable again
-Do the check if allowed to run in the c'tor of MultiauthConfig
and exit(-1) on failure
-Adopt the .pro to contain CONFIG quick-app again
-main only contains the call to the factory
Diffstat (limited to 'core/settings/security/multiauthconfig.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/settings/security/multiauthconfig.cpp | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/core/settings/security/multiauthconfig.cpp b/core/settings/security/multiauthconfig.cpp index 93e73c3..535352a 100644 --- a/core/settings/security/multiauthconfig.cpp +++ b/core/settings/security/multiauthconfig.cpp | |||
@@ -114,14 +114,40 @@ void MultiauthGeneralConfig::checkBypass() | |||
114 | allowBypass->setChecked(false); | 114 | allowBypass->setChecked(false); |
115 | } | 115 | } |
116 | 116 | ||
117 | |||
118 | |||
119 | |||
120 | |||
121 | |||
122 | |||
123 | |||
124 | |||
125 | |||
126 | |||
117 | /// Builds and displays the Opie multi-authentication configuration dialog | 127 | /// Builds and displays the Opie multi-authentication configuration dialog |
118 | MultiauthConfig::MultiauthConfig() : QDialog(0, 0, TRUE), | 128 | static void test_and_start() { |
129 | Config pcfg("Security"); | ||
130 | pcfg.setGroup( "Misc" ); | ||
131 | bool protectConfigDialog = ! pcfg.readBoolEntry("noProtectConfig", true); | ||
132 | |||
133 | if (protectConfigDialog && Opie::Security::Internal::runPlugins() != 0) { | ||
134 | owarn << "authentication failed, not showing opie-security" << oendl; | ||
135 | exit( -1 ); | ||
136 | } | ||
137 | } | ||
138 | |||
139 | |||
140 | |||
141 | MultiauthConfig::MultiauthConfig(QWidget* par, const char* w, WFlags f) | ||
142 | : QDialog(par, w, TRUE, f), | ||
119 | m_mainTW(0), m_pluginListView(0), m_pluginListWidget(0), | 143 | m_mainTW(0), m_pluginListView(0), m_pluginListWidget(0), |
120 | m_generalConfig(0), m_loginWidget(0), m_syncWidget(0), | 144 | m_generalConfig(0), m_loginWidget(0), m_syncWidget(0), |
121 | m_nbSuccessReq(0), m_plugins_changed(false) | 145 | m_nbSuccessReq(0), m_plugins_changed(false) |
122 | { | 146 | { |
123 | /* Initializes the global configuration window | 147 | /* Initializes the global configuration window |
124 | */ | 148 | */ |
149 | test_and_start(); | ||
150 | |||
125 | setCaption( tr( "Security configuration" ) ); | 151 | setCaption( tr( "Security configuration" ) ); |
126 | QVBoxLayout *layout = new QVBoxLayout( this ); | 152 | QVBoxLayout *layout = new QVBoxLayout( this ); |
127 | m_mainTW = new Opie::Ui::OTabWidget( this ); | 153 | m_mainTW = new Opie::Ui::OTabWidget( this ); |
@@ -206,6 +232,22 @@ MultiauthConfig::~MultiauthConfig() | |||
206 | { | 232 | { |
207 | } | 233 | } |
208 | 234 | ||
235 | void MultiauthConfig::accept() { | ||
236 | writeConfig(); | ||
237 | |||
238 | MultiauthConfigWidget* confWidget = 0; | ||
239 | for ( confWidget = configWidgetList.first(); confWidget != 0; | ||
240 | confWidget = configWidgetList.next() ) | ||
241 | confWidget->writeConfig(); | ||
242 | |||
243 | QDialog::accept(); | ||
244 | } | ||
245 | |||
246 | void MultiauthConfig::done( int r ) { | ||
247 | QDialog::done( r ); | ||
248 | close(); | ||
249 | } | ||
250 | |||
209 | /// moves up the selected plugin | 251 | /// moves up the selected plugin |
210 | void MultiauthConfig::moveSelectedUp() | 252 | void MultiauthConfig::moveSelectedUp() |
211 | { | 253 | { |