summaryrefslogtreecommitdiffabout
path: root/korganizer/kolistview.cpp
authorzautrix <zautrix>2005-04-18 10:41:31 (UTC)
committer zautrix <zautrix>2005-04-18 10:41:31 (UTC)
commit409e329447a7d00a93a56855fcddadbb0f793163 (patch) (side-by-side diff)
tree1c92498d2dfb4c89358c64a6944aca1300a27d11 /korganizer/kolistview.cpp
parent0ff0dca7ccb94ebb1381351e4e4081fe0bac500a (diff)
downloadkdepimpi-409e329447a7d00a93a56855fcddadbb0f793163.zip
kdepimpi-409e329447a7d00a93a56855fcddadbb0f793163.tar.gz
kdepimpi-409e329447a7d00a93a56855fcddadbb0f793163.tar.bz2
morefixes
Diffstat (limited to 'korganizer/kolistview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kolistview.cpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index bbf83d9..fd86095 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -373,4 +373,2 @@ void KOListView::setAlarm()
return;
-
-
QStringList itemList;
@@ -430,7 +428,5 @@ void KOListView::setAlarm()
}
- temp = item;
+ ListItemVisitor v(item, mStartDate );
+ inc->accept(v);
item = sel.next();
- mUidDict.remove( inc->uid() );
- delete temp;;
- addIncidence( inc );
}
@@ -445,2 +441,3 @@ void KOListView::setCategories( bool removeOld )
KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 );
+ csd->setColorEnabled();
if (! csd->exec()) {
@@ -453,3 +450,3 @@ void KOListView::setCategories( bool removeOld )
// return;
- catList.sort();
+ //catList.sort();
QString categoriesStr = catList.join(",");
@@ -467,3 +464,14 @@ void KOListView::setCategories( bool removeOld )
item = sel.first();
- Incidence* inc;
+ if( item ) {
+ Incidence* inc = item->data() ;
+ bool setSub = false;
+ if( inc->type() == "Todo" && sel.count() == 1 && inc->relations().count() > 0 ) {
+ int result = KMessageBox::warningYesNoCancel(this,
+ i18n("The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?").arg( inc->summary().left ( 25 ) ),
+ i18n("Todo has subtodos"),
+ i18n("Yes"),
+ i18n("No"));
+ if (result == KMessageBox::Cancel) item = 0;
+ if (result == KMessageBox::Yes) setSub = true;
+ }
while ( item ) {
@@ -471,17 +479,10 @@ void KOListView::setCategories( bool removeOld )
if ( removeOld ) {
- inc->setCategories( categoriesStr );
+ inc->setCategories( catList, setSub );
} else {
- itemList = QStringList::split (",", inc->categoriesStr() );
- for( i = 0; i< catList.count(); ++i ) {
- if ( !itemList.contains (catList[i]))
- itemList.append( catList[i] );
- }
- itemList.sort();
- inc->setCategories( itemList.join(",") );
+ inc->addCategories( catList, setSub );
}
- temp = item;
+ ListItemVisitor v(item, mStartDate );
+ inc->accept(v);
item = sel.next();
- mUidDict.remove( inc->uid() );
- delete temp;;
- addIncidence( inc );
+ }
}