author | zautrix <zautrix> | 2005-08-05 19:27:34 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-05 19:27:34 (UTC) |
commit | 78ae7e3faed42b510f4f0a60007115756cd06128 (patch) (unidiff) | |
tree | 16947ed0eda107673cb6b437e772a6194861548d /korganizer | |
parent | 7c639808d3d78e323857e0a110237e6d77bf04c8 (diff) | |
download | kdepimpi-78ae7e3faed42b510f4f0a60007115756cd06128.zip kdepimpi-78ae7e3faed42b510f4f0a60007115756cd06128.tar.gz kdepimpi-78ae7e3faed42b510f4f0a60007115756cd06128.tar.bz2 |
fixes
-rw-r--r-- | korganizer/journalentry.cpp | 4 | ||||
-rw-r--r-- | korganizer/koagenda.cpp | 6 | ||||
-rw-r--r-- | korganizer/koagenda.h | 2 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 4 |
4 files changed, 11 insertions, 5 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index 5fc3f2f..7f6f221 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp | |||
@@ -241,25 +241,27 @@ void JournalEntry::fillCalendar( int setToID ) | |||
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 | ||
252 | void JournalEntry::toggleShowJournal() | 252 | void 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 | } |
265 | void JournalEntry::setVisibleOn() | 267 | void JournalEntry::setVisibleOn() |
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index c738f7e..7e9fa71 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -78,25 +78,28 @@ MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) | |||
78 | mTimeBox->setPalette(pal); | 78 | mTimeBox->setPalette(pal); |
79 | //mTimeBox->setAutoMask(true); | 79 | //mTimeBox->setAutoMask(true); |
80 | 80 | ||
81 | agenda->addChild(mTimeBox); | 81 | agenda->addChild(mTimeBox); |
82 | 82 | ||
83 | oldToday = -1; | 83 | oldToday = -1; |
84 | } | 84 | } |
85 | 85 | ||
86 | MarcusBains::~MarcusBains() | 86 | MarcusBains::~MarcusBains() |
87 | { | 87 | { |
88 | //delete minutes; | 88 | //delete minutes; |
89 | } | 89 | } |
90 | 90 | void MarcusBains::hideMe() | |
91 | { | ||
92 | hide(); mTimeBox->hide(); | ||
93 | } | ||
91 | int MarcusBains::todayColumn() | 94 | int MarcusBains::todayColumn() |
92 | { | 95 | { |
93 | QDate currentDate = QDate::currentDate(); | 96 | QDate currentDate = QDate::currentDate(); |
94 | 97 | ||
95 | DateList dateList = agenda->dateList(); | 98 | DateList dateList = agenda->dateList(); |
96 | DateList::ConstIterator it; | 99 | DateList::ConstIterator it; |
97 | int col = 0; | 100 | int col = 0; |
98 | for(it = dateList.begin(); it != dateList.end(); ++it) { | 101 | for(it = dateList.begin(); it != dateList.end(); ++it) { |
99 | if((*it) == currentDate) | 102 | if((*it) == currentDate) |
100 | return KOGlobals::self()->reverseLayout() ? | 103 | return KOGlobals::self()->reverseLayout() ? |
101 | agenda->columns() - 1 - col : col; | 104 | agenda->columns() - 1 - col : col; |
102 | ++col; | 105 | ++col; |
@@ -363,24 +366,25 @@ void KOAgenda::marcus_bains() | |||
363 | } | 366 | } |
364 | 367 | ||
365 | 368 | ||
366 | void KOAgenda::changeColumns(int columns) | 369 | void KOAgenda::changeColumns(int columns) |
367 | { | 370 | { |
368 | if (columns == 0) { | 371 | if (columns == 0) { |
369 | qDebug("KOAgenda::changeColumns() called with argument 0 "); | 372 | qDebug("KOAgenda::changeColumns() called with argument 0 "); |
370 | return; | 373 | return; |
371 | } | 374 | } |
372 | clear(); | 375 | clear(); |
373 | mColumns = columns; | 376 | mColumns = columns; |
374 | computeSizes(); | 377 | computeSizes(); |
378 | if(mMarcusBains) mMarcusBains->hideMe(); | ||
375 | } | 379 | } |
376 | 380 | ||
377 | /* | 381 | /* |
378 | This is the eventFilter function, which gets all events from the KOAgendaItems | 382 | This is the eventFilter function, which gets all events from the KOAgendaItems |
379 | contained in the agenda. It has to handle moving and resizing for all items. | 383 | contained in the agenda. It has to handle moving and resizing for all items. |
380 | */ | 384 | */ |
381 | bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) | 385 | bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) |
382 | { | 386 | { |
383 | // kdDebug() << "KOAgenda::eventFilter" << endl; | 387 | // kdDebug() << "KOAgenda::eventFilter" << endl; |
384 | switch(event->type()) { | 388 | switch(event->type()) { |
385 | case QEvent::MouseButtonPress: | 389 | case QEvent::MouseButtonPress: |
386 | case QEvent::MouseButtonDblClick: | 390 | case QEvent::MouseButtonDblClick: |
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 86cf2f4..59e7472 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h | |||
@@ -39,25 +39,25 @@ class KConfig; | |||
39 | class QFrame; | 39 | class QFrame; |
40 | class KOAgenda; | 40 | class KOAgenda; |
41 | class KCal::Event; | 41 | class KCal::Event; |
42 | class KCal::Todo; | 42 | class KCal::Todo; |
43 | 43 | ||
44 | using namespace KCal; | 44 | using namespace KCal; |
45 | 45 | ||
46 | class MarcusBains : public QFrame { | 46 | class MarcusBains : public QFrame { |
47 | Q_OBJECT | 47 | Q_OBJECT |
48 | public: | 48 | public: |
49 | MarcusBains(KOAgenda *agenda=0,const char *name=0); | 49 | MarcusBains(KOAgenda *agenda=0,const char *name=0); |
50 | virtual ~MarcusBains(); | 50 | virtual ~MarcusBains(); |
51 | 51 | void hideMe(); | |
52 | public slots: | 52 | public slots: |
53 | void updateLocation(bool recalculate=false); | 53 | void updateLocation(bool recalculate=false); |
54 | void updateLoc(); | 54 | void updateLoc(); |
55 | 55 | ||
56 | private: | 56 | private: |
57 | int todayColumn(); | 57 | int todayColumn(); |
58 | QTimer *minutes; | 58 | QTimer *minutes; |
59 | QLabel *mTimeBox; | 59 | QLabel *mTimeBox; |
60 | KOAgenda *agenda; | 60 | KOAgenda *agenda; |
61 | QTime oldTime; | 61 | QTime oldTime; |
62 | int oldToday; | 62 | int oldToday; |
63 | }; | 63 | }; |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index f46a103..82c0f4c 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -1348,42 +1348,42 @@ void KOTodoView::toggleRunningItem() | |||
1348 | return; | 1348 | return; |
1349 | Todo * t = mActiveItem->todo(); | 1349 | Todo * t = mActiveItem->todo(); |
1350 | if ( t->isRunning() ) { | 1350 | if ( t->isRunning() ) { |
1351 | KOStopTodoPrefs tp ( t, this ); | 1351 | KOStopTodoPrefs tp ( t, this ); |
1352 | if (QApplication::desktop()->width() <= 800 ){ | 1352 | if (QApplication::desktop()->width() <= 800 ){ |
1353 | int wid = tp.width(); | 1353 | int wid = tp.width(); |
1354 | int hei = tp.height(); | 1354 | int hei = tp.height(); |
1355 | int xx = (QApplication::desktop()->width()-wid)/2; | 1355 | int xx = (QApplication::desktop()->width()-wid)/2; |
1356 | int yy = (QApplication::desktop()->height()-hei)/2; | 1356 | int yy = (QApplication::desktop()->height()-hei)/2; |
1357 | tp.setGeometry( xx,yy,wid,hei ); | 1357 | tp.setGeometry( xx,yy,wid,hei ); |
1358 | } | 1358 | } |
1359 | tp.exec(); | 1359 | tp.exec(); |
1360 | mActiveItem->construct(); | 1360 | updateTodo ( t, 0 ); |
1361 | } else { | 1361 | } else { |
1362 | KOStartTodoPrefs tp ( t->summary(), this ); | 1362 | KOStartTodoPrefs tp ( t->summary(), this ); |
1363 | if (QApplication::desktop()->width() <= 800 ){ | 1363 | if (QApplication::desktop()->width() <= 800 ){ |
1364 | int wid = tp.width(); | 1364 | int wid = tp.width(); |
1365 | int hei = tp.height(); | 1365 | int hei = tp.height(); |
1366 | int xx = (QApplication::desktop()->width()-wid)/2; | 1366 | int xx = (QApplication::desktop()->width()-wid)/2; |
1367 | int yy = (QApplication::desktop()->height()-hei)/2; | 1367 | int yy = (QApplication::desktop()->height()-hei)/2; |
1368 | tp.setGeometry( xx,yy,wid,hei ); | 1368 | tp.setGeometry( xx,yy,wid,hei ); |
1369 | } | 1369 | } |
1370 | if ( !tp.exec() ) return; | 1370 | if ( !tp.exec() ) return; |
1371 | if ( tp.stopAll() ) { | 1371 | if ( tp.stopAll() ) { |
1372 | mCalendar->stopAllTodos(); | 1372 | mCalendar->stopAllTodos(); |
1373 | t->setRunning( true ); | 1373 | t->setRunning( true ); |
1374 | updateView(); | 1374 | updateView(); |
1375 | } else { | 1375 | } else { |
1376 | t->setRunning( true ); | 1376 | t->setRunning( true ); |
1377 | mActiveItem->construct(); | 1377 | updateTodo ( t, 0 ); |
1378 | } | 1378 | } |
1379 | } | 1379 | } |
1380 | } | 1380 | } |
1381 | 1381 | ||
1382 | void KOTodoView::itemClicked(QListViewItem *item) | 1382 | void KOTodoView::itemClicked(QListViewItem *item) |
1383 | { | 1383 | { |
1384 | //qDebug("KOTodoView::itemClicked %d", item); | 1384 | //qDebug("KOTodoView::itemClicked %d", item); |
1385 | if (!item) { | 1385 | if (!item) { |
1386 | if ( pendingSubtodo != 0 ) { | 1386 | if ( pendingSubtodo != 0 ) { |
1387 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1387 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1388 | } | 1388 | } |
1389 | pendingSubtodo = 0; | 1389 | pendingSubtodo = 0; |