summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-06 11:17:00 (UTC)
committer zautrix <zautrix>2005-07-06 11:17:00 (UTC)
commit7e22293b1ec1ee190ca8db6c8ecd079bafdae520 (patch) (side-by-side diff)
treeaed67fbbd844480e3dc0a7b5587edca766b51a5f /korganizer
parent3b77a857e17e04e47d22ba6017dd723ed922e3fc (diff)
downloadkdepimpi-7e22293b1ec1ee190ca8db6c8ecd079bafdae520.zip
kdepimpi-7e22293b1ec1ee190ca8db6c8ecd079bafdae520.tar.gz
kdepimpi-7e22293b1ec1ee190ca8db6c8ecd079bafdae520.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
-rw-r--r--korganizer/koagenda.cpp1
-rw-r--r--korganizer/kotodoview.cpp3
-rw-r--r--korganizer/mainwindow.cpp8
4 files changed, 10 insertions, 6 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 7566c6f..4b3f806 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3988,30 +3988,28 @@ void CalendarView::processMainViewSelection( Incidence *incidence )
}
void CalendarView::processTodoListSelection( Incidence *incidence )
{
if ( incidence && mViewManager->currentView() ) {
mViewManager->currentView()->clearSelection();
}
processIncidenceSelection( incidence );
}
void CalendarView::processIncidenceSelection( Incidence *incidence )
{
+ emit incidenceSelected( incidence );
if ( incidence == mSelectedIncidence ) return;
-
mSelectedIncidence = incidence;
- emit incidenceSelected( mSelectedIncidence );
-
if ( incidence && incidence->typeID() == eventID ) {
Event *event = static_cast<Event *>( incidence );
if ( event->organizer() == KOPrefs::instance()->email() ) {
emit organizerEventsSelected( true );
} else {
emit organizerEventsSelected(false);
}
if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails,
KOPrefs::instance()->email() ) ) {
emit groupEventsSelected( true );
} else {
emit groupEventsSelected(false);
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 92c1cd6..acdf5a0 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -145,25 +145,24 @@ void MarcusBains::updateLocation(bool recalculate)
mTimeBox->setText(KGlobal::locale()->formatTime(tim, KOPrefs::instance()->mMarcusBainsShowSeconds));
mTimeBox->adjustSize();
// the -2 below is there because there is a bug in this program
// somewhere, where the last column of this widget is a few pixels
// narrower than the other columns.
int offs = (today==agenda->columns()-1) ? -4 : 0;
agenda->moveChild(mTimeBox,
x+agenda->gridSpacingX()-mTimeBox->width()+offs-1,
y-mTimeBox->height());
mTimeBox->raise();
//mTimeBox->setAutoMask(true);
int secs = QTime::currentTime().second();
- qDebug("second %d ", secs );
minutes->start( (60 - secs +1)*1000 ,true);
}
////////////////////////////////////////////////////////////////////////////
/*
Create an agenda widget with rows rows and columns columns.
*/
KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent,
const char *name,WFlags f) :
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 86e1bd9..a87e6fc 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -1145,48 +1145,51 @@ void KOTodoView::deleteTodo()
emit deleteTodoSignal(mActiveItem->todo());
}
}
void KOTodoView::setNewPriority(int index)
{
if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
mActiveItem->todo()->setPriority(mPriority[index]);
mActiveItem->construct();
todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED);
mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
}
+ processSelectionChange();
}
void KOTodoView::setNewPercentage(int index)
{
if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
if ( mPercentage[index] == 100 && !mActiveItem->isOn() ) {
mActiveItem->setOn( true );
+ processSelectionChange();
return;
} else if ( mPercentage[index] != 100 && mActiveItem->isOn() ) {
KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent()));
if ( par && par->isOn() )
par->setOn( false );
}
if (mPercentage[index] == 100) {
mActiveItem->todo()->setCompleted(QDateTime::currentDateTime());
} else {
mActiveItem->todo()->setCompleted(false);
}
mActiveItem->todo()->setPercentComplete(mPercentage[index]);
mActiveItem->construct();
todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED);
mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
}
+ processSelectionChange();
}
void KOTodoView::fillCategories ()
{
mCategoryPopupMenu->clear();
if ( ! mActiveItem ) return;
QStringList checkedCategories = mActiveItem->todo()->categories ();
for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin ();
it != KOPrefs::instance()->mCustomCategories.end ();
++it) {
int index = mCategoryPopupMenu->insertItem (*it);
mCategory[index] = *it;
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 88dbd4f..cbf6096 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1673,26 +1673,30 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
if ( incidence->isBirthday() || incidence->isAnniversary() ) {
bool ok;
QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok );
if ( ok ) {
int years = noc.date().year() - incidence->dtStart().date().year();
startString += i18n(" (%1 y.)"). arg( years );
}
}
else
startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
}
}
- else
- startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
+ else {
+ if ( (( KCal::Todo*)incidence)->percentComplete() == 100 )
+ startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+i18n("completed on %1").arg( (( KCal::Todo*)incidence)->completedStr(true) );
+ else
+ startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
+ }
if ( !incidence->location().isEmpty() )
startString += " (" +incidence->location()+")";
setCaption( incidence->summary()+startString);
enableIncidenceActions( true );
if ( incidence->typeID() == eventID ) {
mShowAction->setMenuText( i18n("Show Event") );
mNewSubTodoAction->setEnabled( false );
} else if ( incidence->typeID() == todoID ) {
mShowAction->setMenuText( i18n("Show Todo") );
mNewSubTodoAction->setEnabled( true );
} else {
mShowAction->setMenuText( i18n("Show") );