author | zautrix <zautrix> | 2004-10-19 23:51:51 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-19 23:51:51 (UTC) |
commit | a9119c4edc272815121ddc863963b5289bb95b13 (patch) (side-by-side diff) | |
tree | f515514cda0e212da6722ef8baf5d378e08d34eb | |
parent | f013ff3c0108100c6dbf037a05502ed493361fbf (diff) | |
download | kdepimpi-a9119c4edc272815121ddc863963b5289bb95b13.zip kdepimpi-a9119c4edc272815121ddc863963b5289bb95b13.tar.gz kdepimpi-a9119c4edc272815121ddc863963b5289bb95b13.tar.bz2 |
more fixes
-rw-r--r-- | pwmanager/pwmanager/getmasterpwwnd_emb.cpp | 11 | ||||
-rw-r--r-- | pwmanager/pwmanager/main.cpp | 1 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwminit.cpp | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp index 7f4ccef..8b6dfbc 100644 --- a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp +++ b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp @@ -43,84 +43,89 @@ $Id$ #include <qlineedit.h> #include <qpushbutton.h> /* * Constructs a getMasterPwWnd as a child of 'parent', with the * name 'name' */ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) : KDialogBase( KDialogBase::Plain, i18n( "Master-password" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent, name, true ) { QWidget *page = plainPage(); QVBoxLayout *pageLayout = new QVBoxLayout( page ); pwLineEdit = new QLineEdit( page, "pwLineEdit" ); pwLineEdit->setEchoMode( QLineEdit::Password ); QLabel* textLabel1 = new QLabel( pwLineEdit, i18n("Please enter the master-password:"), page, "textLabel1" ); textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); pageLayout->addWidget(textLabel1); pageLayout->addWidget(pwLineEdit); QWidget* numberBox = new QWidget( page ); - numberBox->setFixedHeight(100); - numberBox->setFixedWidth(100); +#ifndef DESKTOP_VERSION + numberBox->setFixedHeight(150); + numberBox->setFixedWidth(150); +#endif QGridLayout* numberLayout = new QGridLayout( numberBox, 4, 3 ); numberLayout->setMargin( 0 ); numberLayout->setSpacing( 0 ); QPushButton* p1 = new QPushButton( i18n("1"), numberBox ); numberLayout->addWidget( p1, 0, 0 ); QPushButton* p2 = new QPushButton( i18n("2"), numberBox ); numberLayout->addWidget( p2, 0, 1 ); QPushButton* p3 = new QPushButton( i18n("3"), numberBox ); numberLayout->addWidget( p3, 0, 2 ); QPushButton* p4 = new QPushButton( i18n("4"), numberBox ); numberLayout->addWidget( p4, 1, 0 ); QPushButton* p5 = new QPushButton( i18n("5"), numberBox ); numberLayout->addWidget( p5, 1, 1 ); QPushButton* p6 = new QPushButton( i18n("6"), numberBox ); numberLayout->addWidget( p6, 1, 2 ); QPushButton* p7 = new QPushButton( i18n("7"), numberBox ); numberLayout->addWidget( p7, 2, 0 ); QPushButton* p8 = new QPushButton( i18n("8"), numberBox ); numberLayout->addWidget( p8, 2, 1 ); QPushButton* p9 = new QPushButton( i18n("9"), numberBox ); numberLayout->addWidget( p9, 2, 2 ); QPushButton* clear = new QPushButton( i18n("x"), numberBox ); numberLayout->addWidget( clear, 3, 0 ); QPushButton* p0 = new QPushButton( i18n("0"), numberBox ); numberLayout->addWidget( p0, 3, 1 ); QPushButton* backspace = new QPushButton( i18n("-"), numberBox ); numberLayout->addWidget( backspace, 3, 2 ); pageLayout->addWidget(numberBox); - +#ifdef DESKTOP_VERSION + resize( sizeHint() ); +#else resize( 200,sizeHint().height() ); +#endif connect( p0, SIGNAL( clicked() ), this, SLOT( add0() ) ); connect( p1, SIGNAL( clicked() ), this, SLOT( add1() ) ); connect( p2, SIGNAL( clicked() ), this, SLOT( add2() ) ); connect( p3, SIGNAL( clicked() ), this, SLOT( add3() ) ); connect( p4, SIGNAL( clicked() ), this, SLOT( add4() ) ); connect( p5, SIGNAL( clicked() ), this, SLOT( add5() ) ); connect( p6, SIGNAL( clicked() ), this, SLOT( add6() ) ); connect( p7, SIGNAL( clicked() ), this, SLOT( add7() ) ); connect( p8, SIGNAL( clicked() ), this, SLOT( add8() ) ); connect( p9, SIGNAL( clicked() ), this, SLOT( add9() ) ); connect( backspace, SIGNAL( clicked() ), this, SLOT( backspace() ) ); connect( clear, SIGNAL( clicked() ), this, SLOT( clear() ) ); } /* * Destroys the object and frees any allocated resources */ getMasterPwWnd::~getMasterPwWnd() { // no need to delete child widgets, Qt does it all for us diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp index 9d1d863..3f2d055 100644 --- a/pwmanager/pwmanager/main.cpp +++ b/pwmanager/pwmanager/main.cpp @@ -182,33 +182,32 @@ int main(int argc, char *argv[]) #else QString fileName ; fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/"; KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); QApplication::addLibraryPath ( qApp->applicationDirPath () ); #endif KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager"))); KPimGlobalPrefs::instance()->setGlobalConfig(); a.newInstance(); //US KAddressBookMain m ; //US QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); /*US #ifndef DESKTOP_VERSION a.showMainWidget( &m ); #else a.setMainWidget( &m ); m.resize (640, 480 ); m.show(); #endif */ - qDebug("exec "); a.exec(); } qDebug("PWMPI: Bye! "); #endif } diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp index ea9e330..9238c8c 100644 --- a/pwmanager/pwmanager/pwminit.cpp +++ b/pwmanager/pwmanager/pwminit.cpp @@ -108,62 +108,61 @@ PwMInit::~PwMInit() vector<PwMDocList::listItem> dl = *(_dl->getList()); vector<PwMDocList::listItem>::iterator i2 = dl.begin(), end2 = dl.end(); while (i2 != end2) { delete (*i2).doc; ++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() { - qDebug("PwMInit::initializeApp() "); + //qDebug("PwMInit::initializeApp() "); PWM_ASSERT(runStatus == unknown); runStatus = init; initPosixSignalHandler(); Randomizer::init(); #ifndef PWM_EMBEDDED Configuration::init(); #endif initDCOP(); initKWalletEmu(); initKeycard(); initTray(); handleCmdLineArgs(); - qDebug("handle "); bool openDeeplocked = false; if (conf()->confGlobAutostartDeepLocked() || savedCmd.open_deeplocked) openDeeplocked = true; if ( false ){ // LR is not working //if (conf()->confWndAutoMinimizeOnStart() || // savedCmd.minToTray) { PwMDoc *newDoc = createDoc(); qDebug(" 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); @@ -271,49 +270,48 @@ void PwMInit::initTray() _tray->show(); // connect the signals of all open documents. const vector<PwMDocList::listItem> *dl = PwMDoc::getOpenDocList()->getList(); vector<PwMDocList::listItem>::const_iterator i = dl->begin(), end = dl->end(); while (i != end) { _tray->connectDocToTray((*i).doc); ++i; } } void PwMInit::removeTrayAndQuit() { PWM_ASSERT(_tray); // _tray is deleted in ~PwMInit shutdownApp(0); } PwM * PwMInit::createMainWnd(const QString &loadFile, bool loadFileDeepLocked, bool virginity, PwMDoc *doc, bool minimized) { - qDebug("PwMInit::createMainWnd "); PwM *newWnd; if (!doc) doc = createDoc(); newWnd = new PwM(this, doc, virginity); #ifndef PWM_EMBEDDED _mainWndList.push_back(newWnd); #else _mainWndList.append(newWnd); #endif connect(newWnd, SIGNAL(closed(PwM *)), this, SLOT(mainWndClosed(PwM *))); connect(newWnd, SIGNAL(gotFocus(PwM *)), this, SLOT(setCurWidget(PwM *))); connect(newWnd, SIGNAL(lostFocus(PwM *)), this, SLOT(resetCurWidget())); //US ENH #ifndef PWM_EMBEDDED if (minimized) newWnd->showMinimized(); else newWnd->show(); #else //PWM_EMBEDDED |