author | zautrix <zautrix> | 2005-06-11 17:03:59 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-11 17:03:59 (UTC) |
commit | 81370a5f955c2710b6e9336b6c412c8d630ef72a (patch) (unidiff) | |
tree | 6252851fbafcbc3ff777e1af0171990124beb23e | |
parent | 0cfaf22fc5d8f511320813171be84ce3436990c6 (diff) | |
download | kdepimpi-81370a5f955c2710b6e9336b6c412c8d630ef72a.zip kdepimpi-81370a5f955c2710b6e9336b6c412c8d630ef72a.tar.gz kdepimpi-81370a5f955c2710b6e9336b6c412c8d630ef72a.tar.bz2 |
fixes
-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 | 7 | ||||
-rw-r--r-- | microkde/kio/kfile/kurlrequester.h | 2 |
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() | |||
641 | { | 641 | { |
642 | KConfig *config = KOGlobals::config(); | 642 | KConfig *config = KOGlobals::config(); |
643 | config->setGroup( "AppRun" ); | 643 | config->setGroup( "AppRun" ); |
644 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); | 644 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); |
645 | int secto = dt.secsTo( QDateTime::currentDateTime() ); | 645 | int secto = dt.secsTo( QDateTime::currentDateTime() ); |
646 | int secs = config->readNumEntry( "LatestProgramStop" , secto) - 30; | 646 | int secs = config->readNumEntry( "LatestProgramStop" , secto) - 30; |
647 | qDebug("KO: Reading program stop %d ", secs); | ||
647 | //secs -= ( 3600 * 24*3 ); // debug only | 648 | //secs -= ( 3600 * 24*3 ); // debug only |
648 | QDateTime latest = dt.addSecs ( secs ); | 649 | QDateTime latest = dt.addSecs ( secs ); |
649 | qDebug("KO: Last termination on %s ", latest.toString().latin1()); | 650 | qDebug("KO: Last termination on %s ", latest.toString().latin1()); |
651 | qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); | ||
650 | QPtrList<Incidence> el = mCalendar->rawIncidences(); | 652 | QPtrList<Incidence> el = mCalendar->rawIncidences(); |
651 | QPtrList<Incidence> al; | 653 | QPtrList<Incidence> al; |
652 | Incidence* inL = el.first(); | 654 | Incidence* inL = el.first(); |
653 | QDateTime cur = QDateTime::currentDateTime().addSecs(-59); | 655 | QDateTime cur = QDateTime::currentDateTime().addSecs(-59); |
654 | qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); | 656 | qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); |
655 | while ( inL ) { | 657 | while ( inL ) { |
@@ -2153,14 +2155,19 @@ void CalendarView::writeSettings() | |||
2153 | mDialogManager->writeSettings( config ); | 2155 | mDialogManager->writeSettings( config ); |
2154 | //KOPrefs::instance()->usrWriteConfig(); | 2156 | //KOPrefs::instance()->usrWriteConfig(); |
2155 | KOPrefs::instance()->writeConfig(); | 2157 | KOPrefs::instance()->writeConfig(); |
2156 | 2158 | ||
2157 | writeFilterSettings(config); | 2159 | writeFilterSettings(config); |
2158 | config->setGroup( "AppRun" ); | 2160 | config->setGroup( "AppRun" ); |
2159 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); | 2161 | QDateTime dt ( QDate (2005,3,1), QTime( 0,0,0 ) ); |
2160 | config->writeEntry( "LatestProgramStop", dt.secsTo( QDateTime::currentDateTime() ) ); | 2162 | int secs = dt.secsTo( QDateTime::currentDateTime() ); |
2163 | config->writeEntry( "LatestProgramStop", secs ); | ||
2164 | qDebug("KO: Writing stop time: %d ", secs); | ||
2165 | qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); | ||
2166 | QDateTime latest = dt.addSecs ( secs ); | ||
2167 | qDebug("KO: Test termination on %s ", latest.toString().latin1()); | ||
2161 | config->setGroup( "Views" ); | 2168 | config->setGroup( "Views" ); |
2162 | config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); | 2169 | config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); |
2163 | 2170 | ||
2164 | QValueList<int> listINT = mLeftFrame->sizes(); | 2171 | QValueList<int> listINT = mLeftFrame->sizes(); |
2165 | config->writeEntry("Left Splitter Frame",listINT); | 2172 | config->writeEntry("Left Splitter Frame",listINT); |
2166 | QValueList<int> listINT2 = mMainFrame->sizes(); | 2173 | 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() | |||
132 | QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) ); | 132 | QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) ); |
133 | QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame); | 133 | QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame); |
134 | sb = addWidBool(i18n("Use standard backup dir"), | 134 | sb = addWidBool(i18n("Use standard backup dir"), |
135 | &(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame); | 135 | &(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame); |
136 | bupLayout->addWidget((QWidget*)sb->checkBox()); | 136 | bupLayout->addWidget((QWidget*)sb->checkBox()); |
137 | mBackupUrl = new KURLRequester( bupFrame ); | 137 | mBackupUrl = new KURLRequester( bupFrame ); |
138 | mBackupUrl->setPathIsDir(); | ||
138 | mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); | 139 | mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); |
139 | QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) ); | 140 | QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) ); |
140 | bupLayout->addWidget( mBackupUrl ); | 141 | bupLayout->addWidget( mBackupUrl ); |
141 | 142 | ||
142 | mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir ); | 143 | mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir ); |
143 | bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled ); | 144 | bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled ); |
@@ -178,12 +179,13 @@ void KDEPIMConfigWidget::setupStoreTab() | |||
178 | 179 | ||
179 | QVBox *storePage = new QVBox( this ); | 180 | QVBox *storePage = new QVBox( this ); |
180 | if ( QApplication::desktop()->height() > 240 ) | 181 | if ( QApplication::desktop()->height() > 240 ) |
181 | 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 ); | 182 | 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 ); |
182 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); | 183 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); |
183 | mStoreUrl = new KURLRequester( storePage ); | 184 | mStoreUrl = new KURLRequester( storePage ); |
185 | mStoreUrl->setPathIsDir(); | ||
184 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); | 186 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); |
185 | #ifdef DESKTOP_VERSION | 187 | #ifdef DESKTOP_VERSION |
186 | QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; | 188 | QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; |
187 | QFileInfo fi ( confFile ); | 189 | QFileInfo fi ( confFile ); |
188 | if ( fi.exists() ) { | 190 | if ( fi.exists() ) { |
189 | KConfig cfg ( confFile ); | 191 | 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, | |||
56 | dia.setCaption( cap ); | 56 | dia.setCaption( cap ); |
57 | int res = dia.exec(); | 57 | int res = dia.exec(); |
58 | if ( res ) | 58 | if ( res ) |
59 | retfile = o.selectedName(); | 59 | retfile = o.selectedName(); |
60 | return retfile; | 60 | return retfile; |
61 | } | 61 | } |
62 | 62 | QString KFileDialog::getExistingDirectory( const QString & fn, | |
63 | const QString & cap, QWidget * par ) | ||
64 | { | ||
65 | return KFileDialog::getSaveFileName( fn, cap, pr ); | ||
66 | } | ||
63 | #else | 67 | #else |
64 | 68 | ||
65 | #include <qfiledialog.h> | 69 | #include <qfiledialog.h> |
66 | 70 | ||
67 | QString KFileDialog::getSaveFileName( const QString & fn, | 71 | QString KFileDialog::getSaveFileName( const QString & fn, |
68 | const QString & cap , QWidget * par ) | 72 | const QString & cap , QWidget * par ) |
@@ -72,8 +76,13 @@ QString KFileDialog::getSaveFileName( const QString & fn, | |||
72 | QString KFileDialog::getOpenFileName( const QString & fn, | 76 | QString KFileDialog::getOpenFileName( const QString & fn, |
73 | const QString & cap, QWidget * par ) | 77 | const QString & cap, QWidget * par ) |
74 | { | 78 | { |
75 | 79 | ||
76 | return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap ); | 80 | return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap ); |
77 | } | 81 | } |
82 | QString KFileDialog::getExistingDirectory( const QString & fn, | ||
83 | const QString & cap, QWidget * par ) | ||
84 | { | ||
85 | return QFileDialog::getExistingDirectory( fn, par, "exidtingdir", cap ); | ||
86 | } | ||
78 | #endif | 87 | #endif |
79 | 88 | ||
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 | |||
12 | const QString &, QWidget * ); | 12 | const QString &, QWidget * ); |
13 | 13 | ||
14 | 14 | ||
15 | static QString getOpenFileName( const QString &, | 15 | static QString getOpenFileName( const QString &, |
16 | const QString &, QWidget * ); | 16 | const QString &, QWidget * ); |
17 | 17 | ||
18 | static QString getExistingDirectory( const QString &, | ||
19 | const QString &, QWidget * ); | ||
18 | }; | 20 | }; |
19 | 21 | ||
20 | #endif | 22 | #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() | |||
208 | 208 | ||
209 | 209 | ||
210 | void KURLRequester::init() | 210 | void KURLRequester::init() |
211 | { | 211 | { |
212 | myFileDialog = 0L; | 212 | myFileDialog = 0L; |
213 | myShowLocalProt = false; | 213 | myShowLocalProt = false; |
214 | 214 | mPathIsDir = false; | |
215 | if (/*US !d->combo && */ !d->edit ) | 215 | if (/*US !d->combo && */ !d->edit ) |
216 | d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" ); | 216 | d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" ); |
217 | 217 | ||
218 | myButton = new KURLDragPushButton( this, "kfile button"); | 218 | myButton = new KURLDragPushButton( this, "kfile button"); |
219 | QIconSet iconSet = SmallIconSet("fileopen"); | 219 | QIconSet iconSet = SmallIconSet("fileopen"); |
220 | QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); | 220 | QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); |
@@ -269,13 +269,16 @@ void KURLRequester::slotOpenDialog() | |||
269 | emit openFileDialog( this ); | 269 | emit openFileDialog( this ); |
270 | 270 | ||
271 | //US use our special KFIleDialog instead | 271 | //US use our special KFIleDialog instead |
272 | KURL u( url() ); | 272 | KURL u( url() ); |
273 | //QString fn = u.url(); | 273 | //QString fn = u.url(); |
274 | QString fn = d->edit->text(); | 274 | QString fn = d->edit->text(); |
275 | fn = KFileDialog::getSaveFileName( fn, "", this ); | 275 | if ( mPathIsDir ) |
276 | fn = KFileDialog::getExistingDirectory ( fn, "", this ); | ||
277 | else | ||
278 | fn = KFileDialog::getSaveFileName( fn, "", this ); | ||
276 | 279 | ||
277 | if ( fn == "" ) | 280 | if ( fn == "" ) |
278 | return; | 281 | return; |
279 | 282 | ||
280 | setURL( fn ); | 283 | setURL( fn ); |
281 | emit urlSelected( d->url() ); | 284 | 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: | |||
102 | * Sets the mode of the file dialog. | 102 | * Sets the mode of the file dialog. |
103 | * Note: you can only select one file with the filedialog, | 103 | * Note: you can only select one file with the filedialog, |
104 | * so KFile::Files doesn't make much sense. | 104 | * so KFile::Files doesn't make much sense. |
105 | * @see KFileDialog::setMode() | 105 | * @see KFileDialog::setMode() |
106 | */ | 106 | */ |
107 | void setMode( unsigned int m ); | 107 | void setMode( unsigned int m ); |
108 | void setPathIsDir( ) {mPathIsDir = true;} | ||
108 | 109 | ||
109 | /** | 110 | /** |
110 | * Sets the filter for the file dialog. | 111 | * Sets the filter for the file dialog. |
111 | * @see KFileDialog::setFilter() | 112 | * @see KFileDialog::setFilter() |
112 | */ | 113 | */ |
113 | void setFilter( const QString& filter ); | 114 | void setFilter( const QString& filter ); |
@@ -231,12 +232,13 @@ protected: | |||
231 | 232 | ||
232 | 233 | ||
233 | private: | 234 | private: |
234 | KURLDragPushButton * myButton; | 235 | KURLDragPushButton * myButton; |
235 | bool myShowLocalProt; | 236 | bool myShowLocalProt; |
236 | mutable KFileDialog * myFileDialog; | 237 | mutable KFileDialog * myFileDialog; |
238 | bool mPathIsDir; | ||
237 | 239 | ||
238 | 240 | ||
239 | protected slots: | 241 | protected slots: |
240 | /** | 242 | /** |
241 | * Called when the button is pressed to open the filedialog. | 243 | * Called when the button is pressed to open the filedialog. |
242 | * Also called when @ref KStdAccel::Open (default is Ctrl-O) is pressed. | 244 | * Also called when @ref KStdAccel::Open (default is Ctrl-O) is pressed. |