summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-11 17:03:59 (UTC)
committer zautrix <zautrix>2005-06-11 17:03:59 (UTC)
commit81370a5f955c2710b6e9336b6c412c8d630ef72a (patch) (side-by-side diff)
tree6252851fbafcbc3ff777e1af0171990124beb23e
parent0cfaf22fc5d8f511320813171be84ce3436990c6 (diff)
downloadkdepimpi-81370a5f955c2710b6e9336b6c412c8d630ef72a.zip
kdepimpi-81370a5f955c2710b6e9336b6c412c8d630ef72a.tar.gz
kdepimpi-81370a5f955c2710b6e9336b6c412c8d630ef72a.tar.bz2
fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp11
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp2
-rw-r--r--microkde/kfiledialog.cpp11
-rw-r--r--microkde/kfiledialog.h2
-rw-r--r--microkde/kio/kfile/kurlrequester.cpp7
-rw-r--r--microkde/kio/kfile/kurlrequester.h2
6 files changed, 30 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 4b82aa8..8f5de4d 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -641,15 +641,17 @@ void CalendarView::checkAlarms()
{
KConfig *config = KOGlobals::config();
config->setGroup( "AppRun" );
QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
int secto = dt.secsTo( QDateTime::currentDateTime() );
int secs = config->readNumEntry( "LatestProgramStop" , secto) - 30;
+ qDebug("KO: Reading program stop %d ", secs);
//secs -= ( 3600 * 24*3 ); // debug only
QDateTime latest = dt.addSecs ( secs );
qDebug("KO: Last termination on %s ", latest.toString().latin1());
+ qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() );
QPtrList<Incidence> el = mCalendar->rawIncidences();
QPtrList<Incidence> al;
Incidence* inL = el.first();
QDateTime cur = QDateTime::currentDateTime().addSecs(-59);
qDebug("KO: Checking alarm until %s ", cur.toString().latin1());
while ( inL ) {
@@ -2153,14 +2155,19 @@ void CalendarView::writeSettings()
mDialogManager->writeSettings( config );
//KOPrefs::instance()->usrWriteConfig();
KOPrefs::instance()->writeConfig();
writeFilterSettings(config);
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" );
config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() );
QValueList<int> listINT = mLeftFrame->sizes();
config->writeEntry("Left Splitter Frame",listINT);
QValueList<int> listINT2 = mMainFrame->sizes();
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
@@ -132,12 +132,13 @@ void KDEPIMConfigWidget::setupBackupTab()
QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) );
QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame);
sb = addWidBool(i18n("Use standard backup dir"),
&(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame);
bupLayout->addWidget((QWidget*)sb->checkBox());
mBackupUrl = new KURLRequester( bupFrame );
+ mBackupUrl->setPathIsDir();
mBackupUrl->setURL( KGlobalSettings::backupDataDir() );
QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) );
bupLayout->addWidget( mBackupUrl );
mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir );
bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled );
@@ -178,12 +179,13 @@ void KDEPIMConfigWidget::setupStoreTab()
QVBox *storePage = new QVBox( this );
if ( QApplication::desktop()->height() > 240 )
new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage );
new QLabel( i18n("<b>New data storage dir:</b>"), storePage );
mStoreUrl = new KURLRequester( storePage );
+ mStoreUrl->setPathIsDir();
mStoreUrl->setURL( KGlobal::dirs()->localkdedir() );
#ifdef DESKTOP_VERSION
QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ;
QFileInfo fi ( confFile );
if ( fi.exists() ) {
KConfig cfg ( confFile );
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp
index 6be1580..c64f325 100644
--- a/microkde/kfiledialog.cpp
+++ b/microkde/kfiledialog.cpp
@@ -56,13 +56,17 @@ QString KFileDialog::getOpenFileName( const QString & fn,
dia.setCaption( cap );
int res = dia.exec();
if ( res )
retfile = o.selectedName();
return retfile;
}
-
+QString KFileDialog::getExistingDirectory( const QString & fn,
+ const QString & cap, QWidget * par )
+{
+ return KFileDialog::getSaveFileName( fn, cap, pr );
+}
#else
#include <qfiledialog.h>
QString KFileDialog::getSaveFileName( const QString & fn,
const QString & cap , QWidget * par )
@@ -72,8 +76,13 @@ QString KFileDialog::getSaveFileName( const QString & fn,
QString KFileDialog::getOpenFileName( const QString & fn,
const QString & cap, QWidget * par )
{
return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap );
}
+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
@@ -12,9 +12,11 @@ class KFileDialog
const QString &, QWidget * );
static QString getOpenFileName( const QString &,
const QString &, QWidget * );
+ static QString getExistingDirectory( const QString &,
+ const QString &, QWidget * );
};
#endif
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
@@ -208,13 +208,13 @@ KURLRequester::~KURLRequester()
void KURLRequester::init()
{
myFileDialog = 0L;
myShowLocalProt = false;
-
+ mPathIsDir = false;
if (/*US !d->combo && */ !d->edit )
d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" );
myButton = new KURLDragPushButton( this, "kfile button");
QIconSet iconSet = SmallIconSet("fileopen");
QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
@@ -269,13 +269,16 @@ void KURLRequester::slotOpenDialog()
emit openFileDialog( this );
//US use our special KFIleDialog instead
KURL u( url() );
//QString fn = u.url();
QString fn = d->edit->text();
- fn = KFileDialog::getSaveFileName( fn, "", this );
+ if ( mPathIsDir )
+ fn = KFileDialog::getExistingDirectory ( fn, "", this );
+ else
+ fn = KFileDialog::getSaveFileName( fn, "", this );
if ( fn == "" )
return;
setURL( fn );
emit urlSelected( d->url() );
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
@@ -102,12 +102,13 @@ public:
* Sets the mode of the file dialog.
* Note: you can only select one file with the filedialog,
* so KFile::Files doesn't make much sense.
* @see KFileDialog::setMode()
*/
void setMode( unsigned int m );
+ void setPathIsDir( ) {mPathIsDir = true;}
/**
* Sets the filter for the file dialog.
* @see KFileDialog::setFilter()
*/
void setFilter( const QString& filter );
@@ -231,12 +232,13 @@ protected:
private:
KURLDragPushButton * myButton;
bool myShowLocalProt;
mutable KFileDialog * myFileDialog;
+ bool mPathIsDir;
protected slots:
/**
* Called when the button is pressed to open the filedialog.
* Also called when @ref KStdAccel::Open (default is Ctrl-O) is pressed.