-rw-r--r-- | core/settings/security/main.cpp | 4 | ||||
-rw-r--r-- | core/settings/security/multiauthconfig.cpp | 6 | ||||
-rw-r--r-- | noncore/securityplugins/blueping/bluepingplugin.cpp | 3 | ||||
-rw-r--r-- | noncore/securityplugins/notice/noticeConfigWidget.cpp | 4 | ||||
-rw-r--r-- | noncore/securityplugins/notice/noticeConfigWidget.h | 4 | ||||
-rw-r--r-- | noncore/securityplugins/notice/noticeplugin.cpp | 2 |
6 files changed, 7 insertions, 16 deletions
diff --git a/core/settings/security/main.cpp b/core/settings/security/main.cpp index f161109..7f24490 100644 --- a/core/settings/security/main.cpp +++ b/core/settings/security/main.cpp | |||
@@ -17,15 +17,13 @@ int main(int argc, char **argv) { | |||
17 | if (Opie::Security::Internal::runPlugins() != 0) | 17 | if (Opie::Security::Internal::runPlugins() != 0) |
18 | { | 18 | { |
19 | // authentication failed | 19 | // authentication failed |
20 | show = false; | 20 | show = false; |
21 | } | 21 | } |
22 | } | 22 | } |
23 | if ( show == true ) | 23 | if ( show == true ){ |
24 | { | ||
25 | printf("building dialog\n"); | ||
26 | MultiauthConfig dialog; | 24 | MultiauthConfig dialog; |
27 | app.setMainWidget(&dialog); | 25 | app.setMainWidget(&dialog); |
28 | 26 | ||
29 | if ( dialog.exec() == QDialog::Accepted ) { | 27 | if ( dialog.exec() == QDialog::Accepted ) { |
30 | // write the general, login and sync config | 28 | // write the general, login and sync config |
31 | dialog.writeConfig(); | 29 | dialog.writeConfig(); |
diff --git a/core/settings/security/multiauthconfig.cpp b/core/settings/security/multiauthconfig.cpp index 0ce4542..93e73c3 100644 --- a/core/settings/security/multiauthconfig.cpp +++ b/core/settings/security/multiauthconfig.cpp | |||
@@ -409,13 +409,12 @@ void MultiauthConfig::pluginsChanged() { | |||
409 | m_plugins_changed = true; | 409 | m_plugins_changed = true; |
410 | } | 410 | } |
411 | 411 | ||
412 | /// loads each multiauth plugin | 412 | /// loads each multiauth plugin |
413 | void MultiauthConfig::loadPlugins() { | 413 | void MultiauthConfig::loadPlugins() { |
414 | 414 | ||
415 | odebug << "loading plugins..." << oendl; | ||
416 | QString path = QPEApplication::qpeDir() + "/plugins/security"; | 415 | QString path = QPEApplication::qpeDir() + "/plugins/security"; |
417 | QDir dir( path, "lib*.so" ); | 416 | QDir dir( path, "lib*.so" ); |
418 | 417 | ||
419 | QStringList list = dir.entryList(); | 418 | QStringList list = dir.entryList(); |
420 | QStringList::Iterator it; | 419 | QStringList::Iterator it; |
421 | 420 | ||
@@ -423,18 +422,14 @@ void MultiauthConfig::loadPlugins() { | |||
423 | QMap<QString, MultiauthPlugin> sortList; | 422 | QMap<QString, MultiauthPlugin> sortList; |
424 | 423 | ||
425 | for ( it = list.begin(); it != list.end(); ++it ) { | 424 | for ( it = list.begin(); it != list.end(); ++it ) { |
426 | QInterfacePtr<MultiauthPluginInterface> iface; | 425 | QInterfacePtr<MultiauthPluginInterface> iface; |
427 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 426 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
428 | QString libPath(path + "/" + *it); | 427 | QString libPath(path + "/" + *it); |
429 | odebug << "library path: " << libPath << oendl; | ||
430 | 428 | ||
431 | odebug << "querying: " << QString( path + "/" + *it ) << oendl; | ||
432 | if ( lib->queryInterface( IID_MultiauthPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { | 429 | if ( lib->queryInterface( IID_MultiauthPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { |
433 | odebug << "accepted: " << QString( path + "/" + *it ) << oendl; | ||
434 | |||
435 | MultiauthPlugin plugin; | 430 | MultiauthPlugin plugin; |
436 | plugin.library = lib; | 431 | plugin.library = lib; |
437 | plugin.iface = iface; | 432 | plugin.iface = iface; |
438 | plugin.name = QString(*it); | 433 | plugin.name = QString(*it); |
439 | 434 | ||
440 | // find out if plugins should be launched | 435 | // find out if plugins should be launched |
@@ -456,13 +451,12 @@ void MultiauthConfig::loadPlugins() { | |||
456 | // if plugin is not yet in the list, add it to the layout too | 451 | // if plugin is not yet in the list, add it to the layout too |
457 | else if ( !m_allPlugins.contains( plugin.name ) ) { | 452 | else if ( !m_allPlugins.contains( plugin.name ) ) { |
458 | pluginList.append( plugin ); | 453 | pluginList.append( plugin ); |
459 | } | 454 | } |
460 | 455 | ||
461 | } else { | 456 | } else { |
462 | odebug << "could not recognize " << QString( path + "/" + *it ) << oendl; | ||
463 | delete lib; | 457 | delete lib; |
464 | } | 458 | } |
465 | 459 | ||
466 | } // end for | 460 | } // end for |
467 | 461 | ||
468 | // put m_allPlugins tempPlugin objects into pluginList | 462 | // put m_allPlugins tempPlugin objects into pluginList |
diff --git a/noncore/securityplugins/blueping/bluepingplugin.cpp b/noncore/securityplugins/blueping/bluepingplugin.cpp index f4c5e95..05fd3c2 100644 --- a/noncore/securityplugins/blueping/bluepingplugin.cpp +++ b/noncore/securityplugins/blueping/bluepingplugin.cpp | |||
@@ -23,14 +23,13 @@ BluepingPlugin::BluepingPlugin() : MultiauthPluginObject(), m_ping(0) { | |||
23 | bluetoothAlreadyRestarted = false; | 23 | bluetoothAlreadyRestarted = false; |
24 | } | 24 | } |
25 | 25 | ||
26 | /// deletes the m_config Config object and noticeW if necessary | 26 | /// deletes the m_config Config object and noticeW if necessary |
27 | BluepingPlugin::~BluepingPlugin() { | 27 | BluepingPlugin::~BluepingPlugin() { |
28 | delete m_config; | 28 | delete m_config; |
29 | if (m_ping != 0) | 29 | delete m_ping; |
30 | delete m_ping; | ||
31 | } | 30 | } |
32 | 31 | ||
33 | /// Simply return its name (Blueping plugin) | 32 | /// Simply return its name (Blueping plugin) |
34 | QString BluepingPlugin::pluginName() const { | 33 | QString BluepingPlugin::pluginName() const { |
35 | return "Blueping plugin"; | 34 | return "Blueping plugin"; |
36 | } | 35 | } |
diff --git a/noncore/securityplugins/notice/noticeConfigWidget.cpp b/noncore/securityplugins/notice/noticeConfigWidget.cpp index e532232..e0468a7 100644 --- a/noncore/securityplugins/notice/noticeConfigWidget.cpp +++ b/noncore/securityplugins/notice/noticeConfigWidget.cpp | |||
@@ -54,24 +54,24 @@ void NoticeConfigWidget::writeConfig() | |||
54 | } | 54 | } |
55 | } | 55 | } |
56 | 56 | ||
57 | /// reset the notice text to the hard-coded example defaultNoticeText | 57 | /// reset the notice text to the hard-coded example defaultNoticeText |
58 | void NoticeConfigWidget::resetNotice() | 58 | void NoticeConfigWidget::resetNotice() |
59 | { | 59 | { |
60 | noticeMLE->setText(defaultNoticeText); | 60 | noticeMLE->setText(QObject::tr(defaultNoticeText)); |
61 | } | 61 | } |
62 | 62 | ||
63 | /// get the notice text from the config file (with true new lines) | 63 | /// get the notice text from the config file (with true new lines) |
64 | /** | 64 | /** |
65 | * if no text has been defined yet returns defaultNoticeText | 65 | * if no text has been defined yet returns defaultNoticeText |
66 | */ | 66 | */ |
67 | QString NoticeConfigWidget::getNoticeText() { | 67 | QString NoticeConfigWidget::getNoticeText() { |
68 | m_config = new Config("Security"); | 68 | m_config = new Config("Security"); |
69 | m_config->setGroup("NoticePlugin"); | 69 | m_config->setGroup("NoticePlugin"); |
70 | // Note: C++ processes '\' character, so we have to type \\\\ to mean \\ to QRegExp | 70 | // Note: C++ processes '\' character, so we have to type \\\\ to mean \\ to QRegExp |
71 | QString noticeText = m_config->readEntry("noticeText", defaultNoticeText).replace( QRegExp("\\\\n"), "\n" ); | 71 | QString noticeText = m_config->readEntry("noticeText", QObject::tr(defaultNoticeText) ).replace( QRegExp("\\\\n"), "\n" ); |
72 | delete m_config; | 72 | delete m_config; |
73 | return noticeText; | 73 | return noticeText; |
74 | } | 74 | } |
75 | 75 | ||
76 | /// set the notice text in our m_config config file (escaping new lines) | 76 | /// set the notice text in our m_config config file (escaping new lines) |
77 | void NoticeConfigWidget::setNoticeText(QString noticeText) { | 77 | void NoticeConfigWidget::setNoticeText(QString noticeText) { |
diff --git a/noncore/securityplugins/notice/noticeConfigWidget.h b/noncore/securityplugins/notice/noticeConfigWidget.h index c90484c..f8847e4 100644 --- a/noncore/securityplugins/notice/noticeConfigWidget.h +++ b/noncore/securityplugins/notice/noticeConfigWidget.h | |||
@@ -37,20 +37,20 @@ | |||
37 | #include <qpushbutton.h> | 37 | #include <qpushbutton.h> |
38 | #include <qmultilineedit.h> | 38 | #include <qmultilineedit.h> |
39 | #include <qpe/config.h> | 39 | #include <qpe/config.h> |
40 | 40 | ||
41 | #include <opie2/multiauthconfigwidget.h> | 41 | #include <opie2/multiauthconfigwidget.h> |
42 | 42 | ||
43 | static char defaultNoticeText [] = "<h2>NOTICE TO USERS</h2>\n" | 43 | static char defaultNoticeText [] = QT_TRANSLATE_NOOP( "QObject", "<h2>NOTICE TO USERS</h2>\n" |
44 | "<p>This is a private computer system and is the property of " | 44 | "<p>This is a private computer system and is the property of " |
45 | "the company XXX / Mr or Ms X. It is for authorized " | 45 | "the company XXX / Mr or Ms X. It is for authorized " |
46 | "use only. Users have no expectation of privacy.</p>\n" | 46 | "use only. Users have no expectation of privacy.</p>\n" |
47 | "<p><strong>Unauthorized or improper use of this system may result in " | 47 | "<p><strong>Unauthorized or improper use of this system may result in " |
48 | "disciplinary action and civil and criminal penalties. <em>By continuing to use " | 48 | "disciplinary action and civil and criminal penalties. <em>By continuing to use " |
49 | "this system you indicate your awareness of and consent to these " | 49 | "this system you indicate your awareness of and consent to these " |
50 | "terms. LOG OFF IMMEDIATELY if you do not agree to them.</em></strong></p>"; | 50 | "terms. LOG OFF IMMEDIATELY if you do not agree to them.</em></strong></p>"); |
51 | 51 | ||
52 | class NoticeConfigWidget : public Opie::Security::MultiauthConfigWidget { | 52 | class NoticeConfigWidget : public Opie::Security::MultiauthConfigWidget { |
53 | 53 | ||
54 | Q_OBJECT | 54 | Q_OBJECT |
55 | 55 | ||
56 | public: | 56 | public: |
diff --git a/noncore/securityplugins/notice/noticeplugin.cpp b/noncore/securityplugins/notice/noticeplugin.cpp index 25a452a..1da260a 100644 --- a/noncore/securityplugins/notice/noticeplugin.cpp +++ b/noncore/securityplugins/notice/noticeplugin.cpp | |||
@@ -78,9 +78,9 @@ int NoticePlugin::authenticate() { | |||
78 | /// get the notice text from our m_config config file (with true new lines) | 78 | /// get the notice text from our m_config config file (with true new lines) |
79 | /** | 79 | /** |
80 | * if no text has been defined yet returns defaultNoticeText | 80 | * if no text has been defined yet returns defaultNoticeText |
81 | */ | 81 | */ |
82 | QString NoticePlugin::getNoticeText() { | 82 | QString NoticePlugin::getNoticeText() { |
83 | // Note: C++ processes '\' character, so we have to type \\\\ to mean \\ to QRegExp | 83 | // Note: C++ processes '\' character, so we have to type \\\\ to mean \\ to QRegExp |
84 | return m_config->readEntry("noticeText", defaultNoticeText).replace( QRegExp("\\\\n"), "\n" ); | 84 | return m_config->readEntry("noticeText", QObject::tr(defaultNoticeText)).replace( QRegExp("\\\\n"), "\n" ); |
85 | } | 85 | } |
86 | 86 | ||