-rw-r--r-- | pwmanager/pwmanager/configwnd.cpp | 11 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 35 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmanagerE.pro | 27 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmdoc.cpp | 2 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmdoc.h | 2 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmdocui.cpp | 1 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwminit.cpp | 19 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmtray.cpp | 4 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmview.cpp | 4 | ||||
-rw-r--r-- | pwmanager/pwmanager/serializer.cpp | 1 |
10 files changed, 83 insertions, 23 deletions
diff --git a/pwmanager/pwmanager/configwnd.cpp b/pwmanager/pwmanager/configwnd.cpp index 230ca1b..108c40f 100644 --- a/pwmanager/pwmanager/configwnd.cpp +++ b/pwmanager/pwmanager/configwnd.cpp @@ -44,6 +44,7 @@ configWnd::configWnd( QWidget* parent, const char* name, bool modal, WFlags fl ) tabWidget2 = new QTabWidget( this, "tabWidget2" ); tabWidget2->setGeometry( QRect( 10, 10, 470, 260 ) ); + ////////////////////////////// tab = new QWidget( tabWidget2, "tab" ); windowStyleComboBox = new QComboBox( FALSE, tab, "windowStyleComboBox" ); @@ -62,7 +63,7 @@ configWnd::configWnd( QWidget* parent, const char* name, bool modal, WFlags fl ) currEntrFont = new QLabel( tab, "currEntrFont" ); currEntrFont->setGeometry( QRect( 30, 70, 230, 20 ) ); tabWidget2->insertTab( tab, QString("") ); - + ////////////////////////////////////// TabPage = new QWidget( tabWidget2, "TabPage" ); compressionComboBox = new QComboBox( FALSE, TabPage, "compressionComboBox" ); @@ -83,7 +84,7 @@ configWnd::configWnd( QWidget* parent, const char* name, bool modal, WFlags fl ) fileBackupCheckBox = new QCheckBox( TabPage, "fileBackupCheckBox" ); fileBackupCheckBox->setGeometry( QRect( 80, 140, 360, 23 ) ); tabWidget2->insertTab( TabPage, QString("") ); - + ////////////////////////////////////// tab_2 = new QWidget( tabWidget2, "tab_2" ); pwTimeoutSpinBox = new QSpinBox( tab_2, "pwTimeoutSpinBox" ); @@ -103,7 +104,7 @@ configWnd::configWnd( QWidget* parent, const char* name, bool modal, WFlags fl ) autoDeepLockCheckBox = new QCheckBox( tab_2, "autoDeepLockCheckBox" ); autoDeepLockCheckBox->setGeometry( QRect( 60, 180, 380, 25 ) ); tabWidget2->insertTab( tab_2, QString("") ); - + /////////////////////////////////////////// tab_3 = new QWidget( tabWidget2, "tab_3" ); textLabel1_3 = new QLabel( tab_3, "textLabel1_3" ); @@ -118,7 +119,7 @@ configWnd::configWnd( QWidget* parent, const char* name, bool modal, WFlags fl ) autostartDeeplockedCheckBox = new QCheckBox( tab_3, "autostartDeeplockedCheckBox" ); autostartDeeplockedCheckBox->setGeometry( QRect( 40, 80, 390, 25 ) ); tabWidget2->insertTab( tab_3, QString("") ); - + //////////////////////////////////////////// tab_4 = new QWidget( tabWidget2, "tab_4" ); textLabel2 = new QLabel( tab_4, "textLabel2" ); @@ -135,7 +136,7 @@ configWnd::configWnd( QWidget* parent, const char* name, bool modal, WFlags fl ) textLabel3->setGeometry( QRect( 20, 100, 280, 20 ) ); textLabel3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); tabWidget2->insertTab( tab_4, QString("") ); - + /////////////////////////////////////////////// tab_5 = new QWidget( tabWidget2, "tab_5" ); trayCheckBox = new QCheckBox( tab_5, "trayCheckBox" ); diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index e5579f8..08fcb25 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp @@ -28,9 +28,16 @@ #include <kmenubar.h> #include <kstatusbar.h> #include <dcopclient.h> +#include "configwndimpl.h" +#include "configuration.h" #else #include <qmenubar.h> #include <qmessagebox.h> +#include <pwmprefs.h> +#include <kpimglobalprefs.h> +#include <kcmconfigs/kcmpwmconfig.h> +#include <kcmconfigs/kcmkdepimconfig.h> +#include <kcmultidialog.h> #endif #include <qpixmap.h> @@ -45,12 +52,10 @@ #include "pwm.h" #include "pwminit.h" -#include "configwndimpl.h" #include "pwmprint.h" #include "addentrywndimpl.h" #include "globalstuff.h" #include "findwndimpl.h" -#include "configuration.h" #ifdef CONFIG_KWALLETIF # include "kwalletif.h" @@ -751,14 +756,30 @@ void PwM::unlockWnd_slot() void PwM::config_slot() { - Configuration *conf = Configuration::obj(); - int oldStyle = conf->confWndMainViewStyle(); + int oldStyle = conf()->confWndMainViewStyle(); +#ifdef PWM_EMBEDDED + KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"pwmconfigdialog", true ); + + KCMPwmConfig* pwmcfg = new KCMPwmConfig( ConfigureDialog->getNewVBoxPage(i18n( "PwManager")) , "KCMPwmConfig" ); + ConfigureDialog->addModule(pwmcfg ); + KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" ); + ConfigureDialog->addModule(kdelibcfg ); + +#ifndef DESKTOP_VERSION + ConfigureDialog->showMaximized(); +#endif + if ( ConfigureDialog->exec() ) + KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); + delete ConfigureDialog; + +#else //PWM_EMBEDDED // display the configuration window (modal mode) - if (!conf->showConfWnd(this)) + if (!conf()->showConfWnd(this)) return; +#endif - int newStyle = conf->confWndMainViewStyle(); + int newStyle = conf()->confWndMainViewStyle(); // reinitialize tray init->initTray(); // reinitialize KWallet emulation @@ -793,7 +814,7 @@ void PwM::config_slot() if (oldStyle != newStyle) pwm->curView()->initStyle(newStyle); // set the new font - pwm->curView()->setFont(conf->confGlobEntryFont()); + pwm->curView()->setFont(conf()->confGlobEntryFont()); ++i2; } } diff --git a/pwmanager/pwmanager/pwmanagerE.pro b/pwmanager/pwmanager/pwmanagerE.pro index 2cd69a5..5c29ea4 100644 --- a/pwmanager/pwmanager/pwmanagerE.pro +++ b/pwmanager/pwmanager/pwmanagerE.pro @@ -7,10 +7,11 @@ OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR=$(QPEDIR)/bin -INCLUDEPATH += . ../../qtcompat ../../qtcompat/xml ../../microkde ../../microkde/kdecore ../../microkde/kdeui $(QPEDIR)/include +INCLUDEPATH += . ../../qtcompat ../../qtcompat/xml ../../libkdepim ../../microkde ../../microkde/kdecore ../../microkde/kdeui ../../microkde/kutils $(QPEDIR)/include DEFINES += PWM_EMBEDDED PWM_DEBUG LIBS += -lmicrokde LIBS += -lmicroqtcompat +LIBS += -lmicrokdepim LIBS += -L$(QPEDIR)/lib LIBS += -lqpe LIBS += -lbz2 @@ -31,6 +32,10 @@ LIBS += $(QTOPIALIB) #HEADERS = \ +#configuration_31compat.h \ +#configuration.h \ +#configwnd.h \ +#configwndimpl.h \ #selftest.h HEADERS = \ @@ -43,10 +48,6 @@ commentbox.h \ compiler.h \ compressbzip2.h \ compressgzip.h \ -configuration_31compat.h \ -configuration.h \ -configwnd.h \ -configwndimpl.h \ findwnd.h \ findwndimpl.h \ genpasswd.h \ @@ -68,6 +69,7 @@ pwmdocui.h \ pwmexception.h \ pwm.h \ pwminit.h \ +pwmprefs.h \ pwmprint.h \ pwmtray.h \ pwmview.h \ @@ -83,10 +85,16 @@ setmasterpwwndimpl.h \ sha1.h \ subtbledit.h \ subtbleditimpl.h \ -waitwnd.h +waitwnd.h \ +kcmconfigs/kcmpwmconfig.h \ +kcmconfigs/pwmconfigwidget.h \ +#sources that need not be build #SOURCES = \ #advcommeditimpl.cpp \ +#configuration.cpp \ +#configwnd.cpp \ +#configwndimpl.cpp \ #configuration_31compat.cpp \ #htmlparse.cpp \ #printtext.cpp \ @@ -103,9 +111,6 @@ blowfish.cpp \ commentbox.cpp \ compressbzip2.cpp \ compressgzip.cpp \ -configuration.cpp \ -configwnd.cpp \ -configwndimpl.cpp \ findwnd.cpp \ findwndimpl.cpp \ genpasswd.cpp \ @@ -126,6 +131,7 @@ pwmdoc.cpp \ pwmdocui.cpp \ pwmexception.cpp \ pwminit.cpp \ +pwmprefs.cpp \ pwmtray.cpp \ pwmview.cpp \ pwmviewstyle_0.cpp \ @@ -141,4 +147,7 @@ sha1.cpp \ subtbledit.cpp \ subtbleditimpl.cpp \ waitwnd.cpp \ +kcmconfigs/kcmpwmconfig.cpp \ +kcmconfigs/pwmconfigwidget.cpp \ + diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp index 04af360..9fe4809 100644 --- a/pwmanager/pwmanager/pwmdoc.cpp +++ b/pwmanager/pwmanager/pwmdoc.cpp @@ -31,6 +31,8 @@ #ifndef PWM_EMBEDDED //US #include "libgryptif.h" #else +#include "pwmprefs.h" +#include "kglobal.h" #endif #ifdef CONFIG_KWALLETIF diff --git a/pwmanager/pwmanager/pwmdoc.h b/pwmanager/pwmanager/pwmdoc.h index 9650d55..193247e 100644 --- a/pwmanager/pwmanager/pwmdoc.h +++ b/pwmanager/pwmanager/pwmdoc.h @@ -48,7 +48,6 @@ #include "pwmexception.h" #include "pwmdocui.h" -#include "configuration.h" #include <qobject.h> #include <qtimer.h> @@ -57,6 +56,7 @@ #include <kprocess.h> #ifndef PWM_EMBEDDED +#include "configuration.h" #else #include <kapplication.h> #endif diff --git a/pwmanager/pwmanager/pwmdocui.cpp b/pwmanager/pwmanager/pwmdocui.cpp index b308b40..3993fa8 100644 --- a/pwmanager/pwmanager/pwmdocui.cpp +++ b/pwmanager/pwmanager/pwmdocui.cpp @@ -36,6 +36,7 @@ #include <kwin.h> #else #include <qdir.h> +#include "pwmprefs.h" #endif 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 @@ -18,11 +18,13 @@ **************************************************************************/ #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" @@ -119,7 +121,9 @@ PwMInit::~PwMInit() delete_ifnot_null(_tray); Randomizer::cleanup(); +#ifndef PWM_EMBEDDED Configuration::cleanup(); +#endif } void PwMInit::initializeApp() @@ -128,7 +132,9 @@ void PwMInit::initializeApp() runStatus = init; initPosixSignalHandler(); Randomizer::init(); +#ifndef PWM_EMBEDDED Configuration::init(); +#endif initDCOP(); initKWalletEmu(); initKeycard(); @@ -146,6 +152,17 @@ void PwMInit::initializeApp() 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(), diff --git a/pwmanager/pwmanager/pwmtray.cpp b/pwmanager/pwmanager/pwmtray.cpp index 0f286c1..fe074ca 100644 --- a/pwmanager/pwmanager/pwmtray.cpp +++ b/pwmanager/pwmanager/pwmtray.cpp @@ -25,7 +25,11 @@ #include "pwm.h" #include "pwmdoc.h" #include "pwminit.h" +#ifndef PWM_EMBEDDED #include "configuration.h" +#else +#include "pwmprefs.h" +#endif #include <klocale.h> diff --git a/pwmanager/pwmanager/pwmview.cpp b/pwmanager/pwmanager/pwmview.cpp index c09fbf5..58c2fca 100644 --- a/pwmanager/pwmanager/pwmview.cpp +++ b/pwmanager/pwmanager/pwmview.cpp @@ -22,7 +22,11 @@ #include "globalstuff.h" #include "pwm.h" #include "rencatwnd.h" +#ifndef PWM_EMBEDDED #include "configuration.h" +#else +#include "pwmprefs.h" +#endif #include "commentbox.h" #include <kmessagebox.h> diff --git a/pwmanager/pwmanager/serializer.cpp b/pwmanager/pwmanager/serializer.cpp index 65e442d..f29ef6c 100644 --- a/pwmanager/pwmanager/serializer.cpp +++ b/pwmanager/pwmanager/serializer.cpp @@ -22,6 +22,7 @@ #include "pwmexception.h" #ifdef PWM_EMBEDDED +#include <kglobal.h> #include <klocale.h> #endif |