summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwminit.cpp
Side-by-side diff
Diffstat (limited to 'pwmanager/pwmanager/pwminit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwminit.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp
index 2f1aa4e..8946443 100644
--- a/pwmanager/pwmanager/pwminit.cpp
+++ b/pwmanager/pwmanager/pwminit.cpp
@@ -9,29 +9,31 @@
* *
***************************************************************************/
/***************************************************************************
* copyright (C) 2004 by Ulf Schenk
* This file is originaly based on version 1.0.1 of pwmanager
* and was modified to run on embedded devices that run microkde
*
* $Id$
**************************************************************************/
#include "pwminit.h"
-#include "configuration.h"
#include "randomizer.h"
#ifndef PWM_EMBEDDED
#include "selftest.h"
+#include "configuration.h"
+#else
+#include "pwmprefs.h"
#endif
#include "pwm.h"
#include "pwmexception.h"
#include "pwmtray.h"
#include "pwmdoc.h"
#ifdef CONFIG_KWALLETIF
# include "kwalletemu.h"
#endif // CONFIG_KWALLETIF
#ifdef CONFIG_KEYCARD
# include "pwmkeycard.h"
@@ -110,51 +112,66 @@ PwMInit::~PwMInit()
++i2;
}
#ifdef CONFIG_KWALLETIF
delete_ifnot_null(_kwalletEmu);
#endif // CONFIG_KWALLETIF
#ifdef CONFIG_KEYCARD
delete_ifnot_null(_keycard);
#endif // CONFIG_KEYCARD
delete_ifnot_null(_tray);
Randomizer::cleanup();
+#ifndef PWM_EMBEDDED
Configuration::cleanup();
+#endif
}
void PwMInit::initializeApp()
{
PWM_ASSERT(runStatus == unknown);
runStatus = init;
initPosixSignalHandler();
Randomizer::init();
+#ifndef PWM_EMBEDDED
Configuration::init();
+#endif
initDCOP();
initKWalletEmu();
initKeycard();
initTray();
handleCmdLineArgs();
bool openDeeplocked = false;
if (conf()->confGlobAutostartDeepLocked() ||
savedCmd.open_deeplocked)
openDeeplocked = true;
if (conf()->confWndAutoMinimizeOnStart() ||
savedCmd.minToTray) {
PwMDoc *newDoc = createDoc();
if (!newDoc->openDocUi(newDoc,
conf()->confGlobAutoStart(),
openDeeplocked)) {
delete newDoc;
+
+ //US ENH for embedded devices: in the case of failure, open a document the default way
+ createMainWnd(conf()->confGlobAutoStart(),
+ openDeeplocked,
+ true,
+ 0,
+ savedCmd.minimized);
+
+
+
+
}
} else {
createMainWnd(conf()->confGlobAutoStart(),
openDeeplocked,
true,
0,
savedCmd.minimized);
}
runStatus = running;
}