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 | |||
@@ -245,17 +245,19 @@ void JournalEntry::fillCalendar( int setToID ) | |||
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 ); |
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index c738f7e..7e9fa71 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -82,17 +82,20 @@ MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) | |||
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) { |
@@ -367,16 +370,17 @@ 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 | { |
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 86cf2f4..59e7472 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h | |||
@@ -43,17 +43,17 @@ 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; |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index f46a103..82c0f4c 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -1352,34 +1352,34 @@ void KOTodoView::toggleRunningItem() | |||
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) { |