author | zautrix <zautrix> | 2004-10-25 22:23:56 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-25 22:23:56 (UTC) |
commit | dbfa4de9416c28c5424eeee0f36f50de4cfae0ec (patch) (side-by-side diff) | |
tree | 31fa0522ff7821f5b7e98123e16f12455eeb01c9 /pwmanager | |
parent | 03ca6830a9e6742b8873aee04d77b3e094b65d30 (diff) | |
download | kdepimpi-dbfa4de9416c28c5424eeee0f36f50de4cfae0ec.zip kdepimpi-dbfa4de9416c28c5424eeee0f36f50de4cfae0ec.tar.gz kdepimpi-dbfa4de9416c28c5424eeee0f36f50de4cfae0ec.tar.bz2 |
pwmpi windows management fixes
-rw-r--r-- | pwmanager/pwmanager/getmasterpwwnd_emb.cpp | 2 | ||||
-rw-r--r-- | pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp | 4 | ||||
-rw-r--r-- | pwmanager/pwmanager/libgcryptif.cpp | 5 | ||||
-rw-r--r-- | pwmanager/pwmanager/main.cpp | 1 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 10 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmdoc.cpp | 1 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwmdocui.cpp | 15 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwminit.cpp | 17 |
8 files changed, 40 insertions, 15 deletions
diff --git a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp index 8404c3e..678f05f 100644 --- a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp +++ b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp @@ -127,5 +127,5 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) connect( clear, SIGNAL( clicked() ), this, SLOT( clear() ) ); - + pwLineEdit->setFocus(); } diff --git a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp index 26b9708..a8696ea 100644 --- a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp +++ b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp @@ -149,5 +149,5 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n i = 0; - pwTimeoutSpinBox = new QSpinBox( timeoutPage, "pwTimeoutSpinBox" ); + pwTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "pwTimeoutSpinBox" ); QLabel* timeoutLabel = new QLabel(pwTimeoutSpinBox, i18n("Password timeout\n(timeout to hold password in\nmemory,so you don't have to\nre-enter it,if you\nalready have entered it)\n[set to 0 to disable]:"), timeoutPage); timeoutLayout->addMultiCellWidget(timeoutLabel,i, i, 0 ,0); @@ -155,5 +155,5 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n ++i; - lockTimeoutSpinBox = new QSpinBox( timeoutPage, "lockTimeoutSpinBox" ); + lockTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "lockTimeoutSpinBox" ); QLabel* lockTimeoutLabel = new QLabel(lockTimeoutSpinBox, i18n("Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:"), timeoutPage); timeoutLayout->addMultiCellWidget(lockTimeoutLabel,i, i, 0 ,0); diff --git a/pwmanager/pwmanager/libgcryptif.cpp b/pwmanager/pwmanager/libgcryptif.cpp index eafd318..ff94bf6 100644 --- a/pwmanager/pwmanager/libgcryptif.cpp +++ b/pwmanager/pwmanager/libgcryptif.cpp @@ -440,8 +440,13 @@ void LibGCryptIf::unpadData(const unsigned char *buf, pos = *bufLen - 1; while (buf[pos] != static_cast<char>(0x01)) { + qDebug("pos %d %d %d", pos, buf[pos], static_cast<char>(0x01) ); BUG_ON(!pos); + //LR BUG we should terminte the loop if p == 0 + if ( pos == 0 ) + break; --pos; } *bufLen = pos; + qDebug("ente "); } diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp index 1ca7ba8..70df15d 100644 --- a/pwmanager/pwmanager/main.cpp +++ b/pwmanager/pwmanager/main.cpp @@ -210,4 +210,5 @@ int main(int argc, char *argv[]) #endif */ + QObject::connect( &a, SIGNAL( lastWindowClosed()), &a, SLOT (quit())); a.exec(); KPimGlobalPrefs::instance()->writeConfig(); diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index 1ab2b71..2b8f2fa 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp @@ -194,9 +194,11 @@ PwM::PwM(PwMInit *_init, PwMDoc *doc, PwM::~PwM() { - //qDebug("PwM::~PwM()"); + qDebug("PwM::~PwM() %x", this); disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)), this, SLOT(docClosed(PwMDoc *))); conf()->confWndMainWndSize(size()); - emit closed(this); + //LR closing of windows changed + //needed for fastload option on PDA + //emit closed(this); //qDebug("PwM::~PwM() emited closed(this)"); delete view; @@ -888,4 +890,7 @@ void PwM::activateMpButton(bool activate) void PwM::closeEvent(QCloseEvent *e) { + qDebug("PwM::closeEvent "); + emit closed( this ); + return; e->accept(); } @@ -893,4 +898,5 @@ void PwM::closeEvent(QCloseEvent *e) void PwM::docClosed(PwMDoc *doc) { + qDebug("PwM::docClosed "); PARAM_UNUSED(doc); PWM_ASSERT(doc == curDoc()); diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp index 129bf7b..cf8690f 100644 --- a/pwmanager/pwmanager/pwmdoc.cpp +++ b/pwmanager/pwmanager/pwmdoc.cpp @@ -2978,4 +2978,5 @@ QString PwMDoc::getTitle() bool PwMDoc::tryDelete() { + if (deleted) return true; diff --git a/pwmanager/pwmanager/pwmdocui.cpp b/pwmanager/pwmanager/pwmdocui.cpp index 71b4a8d..a9916c2 100644 --- a/pwmanager/pwmanager/pwmdocui.cpp +++ b/pwmanager/pwmanager/pwmdocui.cpp @@ -205,5 +205,5 @@ void PwMDocUi::gpmPwLenErrMsgBox() "shorter than 4 characters! Please try\n" "again with a longer password."), - i18n("password too short")); + i18n("Password too short")); } @@ -213,10 +213,10 @@ int PwMDocUi::dirtyAskSave(const QString &docTitle) #ifndef PWM_EMBEDDED ret = KMessageBox::questionYesNoCancel(currentView, - i18n("The list \"") + + i18n("The list\n\"") + docTitle + i18n ("\" has been modified.\n" "Do you want to save it?"), - i18n("save?")); + i18n("Save?")); if (ret == KMessageBox::Yes) { return 0; @@ -225,11 +225,14 @@ int PwMDocUi::dirtyAskSave(const QString &docTitle) } #else + QString doc = docTitle; + if ( doc.length() > 33 ) + doc = "..." + doc.right(30); ret = KMessageBox::warningYesNoCancel(currentView, - i18n("The list \"") + - docTitle + + i18n("The list\n \"") + + doc + i18n ("\"\nhas been modified.\n" "Do you want to save it?"), - i18n("save?")); + i18n("Save?")); if (ret == KMessageBox::Yes) { return 0; diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp index d775aa9..fbd17a7 100644 --- a/pwmanager/pwmanager/pwminit.cpp +++ b/pwmanager/pwmanager/pwminit.cpp @@ -89,4 +89,5 @@ PwMInit::PwMInit(PwMApplication *_app) PwMInit::~PwMInit() { + qDebug("PwMInit::~PwMInit() "); #ifndef PWM_EMBEDDED SelfTest::cancel(); @@ -180,5 +181,4 @@ void PwMInit::initializeApp() savedCmd.minimized); } - runStatus = running; } @@ -323,8 +323,6 @@ PwM * PwMInit::createMainWnd(const QString &loadFile, app->showMainWidget( newWnd ); #else //DESKTOP_VERSION - app->setMainWidget( newWnd ); newWnd->resize (640, 480 ); newWnd->show(); - qDebug("show "); #endif //DESKTOP_VERSION @@ -392,5 +390,5 @@ again: if (doMinimizeToTray) { - + qDebug("doMinimizeToTray "); PWM_ASSERT(_tray); int mmlock = conf()->confGlobMinimizeLock(); @@ -408,4 +406,5 @@ again: } } else if (doDeleteDoc) { + qDebug("doDeleteDoc "); if (!wnd->curDoc()->tryDelete()) { /* We failed deleting the doc, @@ -432,4 +431,14 @@ again: _mainWndList.remove(i); #endif + + if ( app->mainWidget() == wnd ) { + if ( _mainWndList.count() ) { +#ifndef DESKTOP_VERSION + app->showMainWidget(_mainWndList.first() ); +#endif //DESKTOP_VERSION + + } + } + delete wnd; goto out_success; } |