summaryrefslogtreecommitdiffabout
path: root/korganizer/journalentry.cpp
authorzautrix <zautrix>2005-08-05 19:27:34 (UTC)
committer zautrix <zautrix>2005-08-05 19:27:34 (UTC)
commit78ae7e3faed42b510f4f0a60007115756cd06128 (patch) (unidiff)
tree16947ed0eda107673cb6b437e772a6194861548d /korganizer/journalentry.cpp
parent7c639808d3d78e323857e0a110237e6d77bf04c8 (diff)
downloadkdepimpi-78ae7e3faed42b510f4f0a60007115756cd06128.zip
kdepimpi-78ae7e3faed42b510f4f0a60007115756cd06128.tar.gz
kdepimpi-78ae7e3faed42b510f4f0a60007115756cd06128.tar.bz2
fixes
Diffstat (limited to 'korganizer/journalentry.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/journalentry.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 5fc3f2f..7f6f221 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -230,48 +230,50 @@ void JournalEntry::fillCalendar( int setToID )
230 mCalendarBox->clear(); 230 mCalendarBox->clear();
231 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); 231 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
232 int std = 0; 232 int std = 0;
233 int count = 0; 233 int count = 0;
234 while ( kkf ) { 234 while ( kkf ) {
235 if ( (!kkf->mErrorOnLoad &&! kkf->isReadOnly) || setToID == kkf->mCalNumber ) { 235 if ( (!kkf->mErrorOnLoad &&! kkf->isReadOnly) || setToID == kkf->mCalNumber ) {
236 if ( setToID ) { 236 if ( setToID ) {
237 if ( kkf->mCalNumber == setToID ) 237 if ( kkf->mCalNumber == setToID )
238 std = count; 238 std = count;
239 } else { 239 } else {
240 if ( kkf->isStandard ) { 240 if ( kkf->isStandard ) {
241 std = count; 241 std = count;
242 } 242 }
243 } 243 }
244 ++count; 244 ++count;
245 mCalendarBox->insertItem( kkf->mName ); 245 mCalendarBox->insertItem( kkf->mName );
246 } 246 }
247 kkf = KOPrefs::instance()->mCalendars.next(); 247 kkf = KOPrefs::instance()->mCalendars.next();
248 } 248 }
249 mCalendarBox->setCurrentItem( std ); 249 mCalendarBox->setCurrentItem( std );
250} 250}
251 251
252void JournalEntry::toggleShowJournal() 252void JournalEntry::toggleShowJournal()
253{ 253{
254 if ( mEditor->text().isEmpty() && mTitle->currentText ().isEmpty() )
255 return;
254 if (!mEditor->text().isEmpty() || !mTitle->currentText ().isEmpty()) 256 if (!mEditor->text().isEmpty() || !mTitle->currentText ().isEmpty())
255 flushEntry(); 257 flushEntry();
256 if ( showOnlyMode ) 258 if ( showOnlyMode )
257 emit showJournalOnly( 0 ); 259 emit showJournalOnly( 0 );
258 else { 260 else {
259 // we have to protect mJournal from deleting if mJournal has empty text 261 // we have to protect mJournal from deleting if mJournal has empty text
260 visibleMode = false; // set to true via :setShowOnly() 262 visibleMode = false; // set to true via :setShowOnly()
261 emit showJournalOnly( mJournal ); 263 emit showJournalOnly( mJournal );
262 //QTimer::singleShot( 0, this, SLOT( setVisibleOn() ) ); 264 //QTimer::singleShot( 0, this, SLOT( setVisibleOn() ) );
263 } 265 }
264} 266}
265void JournalEntry::setVisibleOn() 267void JournalEntry::setVisibleOn()
266{ 268{
267 visibleMode = true; 269 visibleMode = true;
268} 270}
269void JournalEntry::setShowOnly() 271void JournalEntry::setShowOnly()
270{ 272{
271 showOnlyMode = true; 273 showOnlyMode = true;
272 if ( mTitle->currentText().isEmpty() ) 274 if ( mTitle->currentText().isEmpty() )
273 mTitle->setFocus(); 275 mTitle->setFocus();
274 else 276 else
275 mEditor->setFocus(); 277 mEditor->setFocus();
276} 278}
277void JournalEntry::setJournal(Journal *journal, bool saveJournal ) 279void JournalEntry::setJournal(Journal *journal, bool saveJournal )