-rw-r--r-- | korganizer/calendarview.cpp | 11 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 2 | ||||
-rw-r--r-- | microkde/kfiledialog.cpp | 11 | ||||
-rw-r--r-- | microkde/kfiledialog.h | 2 | ||||
-rw-r--r-- | microkde/kio/kfile/kurlrequester.cpp | 5 | ||||
-rw-r--r-- | microkde/kio/kfile/kurlrequester.h | 2 |
6 files changed, 29 insertions, 4 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 4b82aa8..8f5de4d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -646,2 +646,3 @@ void CalendarView::checkAlarms() int secs = config->readNumEntry( "LatestProgramStop" , secto) - 30; + qDebug("KO: Reading program stop %d ", secs); //secs -= ( 3600 * 24*3 ); // debug only @@ -649,2 +650,3 @@ void CalendarView::checkAlarms() qDebug("KO: Last termination on %s ", latest.toString().latin1()); + qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); QPtrList<Incidence> el = mCalendar->rawIncidences(); @@ -2158,4 +2160,9 @@ void CalendarView::writeSettings() config->setGroup( "AppRun" ); - QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); - config->writeEntry( "LatestProgramStop", dt.secsTo( QDateTime::currentDateTime() ) ); + QDateTime dt ( QDate (2005,3,1), QTime( 0,0,0 ) ); + int secs = dt.secsTo( QDateTime::currentDateTime() ); + config->writeEntry( "LatestProgramStop", secs ); + qDebug("KO: Writing stop time: %d ", secs); + qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); + QDateTime latest = dt.addSecs ( secs ); + qDebug("KO: Test termination on %s ", latest.toString().latin1()); config->setGroup( "Views" ); diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index d3797ae..a0f9d2e 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp @@ -137,2 +137,3 @@ void KDEPIMConfigWidget::setupBackupTab() mBackupUrl = new KURLRequester( bupFrame ); + mBackupUrl->setPathIsDir(); mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); @@ -183,2 +184,3 @@ void KDEPIMConfigWidget::setupStoreTab() mStoreUrl = new KURLRequester( storePage ); + mStoreUrl->setPathIsDir(); mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp index 6be1580..c64f325 100644 --- a/microkde/kfiledialog.cpp +++ b/microkde/kfiledialog.cpp @@ -61,3 +61,7 @@ QString KFileDialog::getOpenFileName( const QString & fn, } - +QString KFileDialog::getExistingDirectory( const QString & fn, + const QString & cap, QWidget * par ) +{ + return KFileDialog::getSaveFileName( fn, cap, pr ); +} #else @@ -77,2 +81,7 @@ QString KFileDialog::getOpenFileName( const QString & fn, } +QString KFileDialog::getExistingDirectory( const QString & fn, + const QString & cap, QWidget * par ) +{ + return QFileDialog::getExistingDirectory( fn, par, "exidtingdir", cap ); +} #endif diff --git a/microkde/kfiledialog.h b/microkde/kfiledialog.h index 0825872..90709cd 100644 --- a/microkde/kfiledialog.h +++ b/microkde/kfiledialog.h @@ -17,2 +17,4 @@ class KFileDialog + static QString getExistingDirectory( const QString &, + const QString &, QWidget * ); }; diff --git a/microkde/kio/kfile/kurlrequester.cpp b/microkde/kio/kfile/kurlrequester.cpp index 991c8be..ca94570 100644 --- a/microkde/kio/kfile/kurlrequester.cpp +++ b/microkde/kio/kfile/kurlrequester.cpp @@ -213,3 +213,3 @@ void KURLRequester::init() myShowLocalProt = false; - + mPathIsDir = false; if (/*US !d->combo && */ !d->edit ) @@ -274,2 +274,5 @@ void KURLRequester::slotOpenDialog() QString fn = d->edit->text(); + if ( mPathIsDir ) + fn = KFileDialog::getExistingDirectory ( fn, "", this ); + else fn = KFileDialog::getSaveFileName( fn, "", this ); diff --git a/microkde/kio/kfile/kurlrequester.h b/microkde/kio/kfile/kurlrequester.h index 3253dd5..faa3326 100644 --- a/microkde/kio/kfile/kurlrequester.h +++ b/microkde/kio/kfile/kurlrequester.h @@ -107,2 +107,3 @@ public: void setMode( unsigned int m ); + void setPathIsDir( ) {mPathIsDir = true;} @@ -236,2 +237,3 @@ private: mutable KFileDialog * myFileDialog; + bool mPathIsDir; |