summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-08-05 19:27:34 (UTC)
committer zautrix <zautrix>2005-08-05 19:27:34 (UTC)
commit78ae7e3faed42b510f4f0a60007115756cd06128 (patch) (side-by-side diff)
tree16947ed0eda107673cb6b437e772a6194861548d /korganizer
parent7c639808d3d78e323857e0a110237e6d77bf04c8 (diff)
downloadkdepimpi-78ae7e3faed42b510f4f0a60007115756cd06128.zip
kdepimpi-78ae7e3faed42b510f4f0a60007115756cd06128.tar.gz
kdepimpi-78ae7e3faed42b510f4f0a60007115756cd06128.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/journalentry.cpp4
-rw-r--r--korganizer/koagenda.cpp6
-rw-r--r--korganizer/koagenda.h2
-rw-r--r--korganizer/kotodoview.cpp4
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 )
std = count;
}
}
++count;
mCalendarBox->insertItem( kkf->mName );
}
kkf = KOPrefs::instance()->mCalendars.next();
}
mCalendarBox->setCurrentItem( std );
}
void JournalEntry::toggleShowJournal()
-{
+{
+ if ( mEditor->text().isEmpty() && mTitle->currentText ().isEmpty() )
+ return;
if (!mEditor->text().isEmpty() || !mTitle->currentText ().isEmpty())
flushEntry();
if ( showOnlyMode )
emit showJournalOnly( 0 );
else {
// we have to protect mJournal from deleting if mJournal has empty text
visibleMode = false; // set to true via :setShowOnly()
emit showJournalOnly( mJournal );
//QTimer::singleShot( 0, this, SLOT( setVisibleOn() ) );
}
}
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)
mTimeBox->setPalette(pal);
//mTimeBox->setAutoMask(true);
agenda->addChild(mTimeBox);
oldToday = -1;
}
MarcusBains::~MarcusBains()
{
//delete minutes;
}
-
+void MarcusBains::hideMe()
+{
+ hide(); mTimeBox->hide();
+}
int MarcusBains::todayColumn()
{
QDate currentDate = QDate::currentDate();
DateList dateList = agenda->dateList();
DateList::ConstIterator it;
int col = 0;
for(it = dateList.begin(); it != dateList.end(); ++it) {
if((*it) == currentDate)
return KOGlobals::self()->reverseLayout() ?
agenda->columns() - 1 - col : col;
++col;
@@ -363,24 +366,25 @@ void KOAgenda::marcus_bains()
}
void KOAgenda::changeColumns(int columns)
{
if (columns == 0) {
qDebug("KOAgenda::changeColumns() called with argument 0 ");
return;
}
clear();
mColumns = columns;
computeSizes();
+ if(mMarcusBains) mMarcusBains->hideMe();
}
/*
This is the eventFilter function, which gets all events from the KOAgendaItems
contained in the agenda. It has to handle moving and resizing for all items.
*/
bool KOAgenda::eventFilter ( QObject *object, QEvent *event )
{
// kdDebug() << "KOAgenda::eventFilter" << endl;
switch(event->type()) {
case QEvent::MouseButtonPress:
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;
class QFrame;
class KOAgenda;
class KCal::Event;
class KCal::Todo;
using namespace KCal;
class MarcusBains : public QFrame {
Q_OBJECT
public:
MarcusBains(KOAgenda *agenda=0,const char *name=0);
virtual ~MarcusBains();
-
+ void hideMe();
public slots:
void updateLocation(bool recalculate=false);
void updateLoc();
private:
int todayColumn();
QTimer *minutes;
QLabel *mTimeBox;
KOAgenda *agenda;
QTime oldTime;
int oldToday;
};
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()
return;
Todo * t = mActiveItem->todo();
if ( t->isRunning() ) {
KOStopTodoPrefs tp ( t, this );
if (QApplication::desktop()->width() <= 800 ){
int wid = tp.width();
int hei = tp.height();
int xx = (QApplication::desktop()->width()-wid)/2;
int yy = (QApplication::desktop()->height()-hei)/2;
tp.setGeometry( xx,yy,wid,hei );
}
tp.exec();
- mActiveItem->construct();
+ updateTodo ( t, 0 );
} else {
KOStartTodoPrefs tp ( t->summary(), this );
if (QApplication::desktop()->width() <= 800 ){
int wid = tp.width();
int hei = tp.height();
int xx = (QApplication::desktop()->width()-wid)/2;
int yy = (QApplication::desktop()->height()-hei)/2;
tp.setGeometry( xx,yy,wid,hei );
}
if ( !tp.exec() ) return;
if ( tp.stopAll() ) {
mCalendar->stopAllTodos();
t->setRunning( true );
updateView();
} else {
t->setRunning( true );
- mActiveItem->construct();
+ updateTodo ( t, 0 );
}
}
}
void KOTodoView::itemClicked(QListViewItem *item)
{
//qDebug("KOTodoView::itemClicked %d", item);
if (!item) {
if ( pendingSubtodo != 0 ) {
topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
}
pendingSubtodo = 0;