-rw-r--r-- | korganizer/kolistview.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 7022e02..be51694 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -397,14 +397,14 @@ void KOListView::setAlarm() | |||
397 | QStringList itemList; | 397 | QStringList itemList; |
398 | QPtrList<KOListViewItem> sel ; | 398 | QPtrList<KOListViewItem> sel ; |
399 | QListViewItem *qitem = mListView->firstChild (); | 399 | QListViewItem *qitem = mListView->firstChild (); |
400 | while ( qitem ) { | 400 | while ( qitem ) { |
401 | if ( qitem->isSelected() ) { | 401 | if ( qitem->isSelected() ) { |
402 | Incidence* inc = ((KOListViewItem *) qitem)->data(); | 402 | Incidence* inc = ((KOListViewItem *) qitem)->data(); |
403 | if ( inc->type() != "Journal" ) { | 403 | if ( inc->typeID() != journalID ) { |
404 | if ( inc->type() == "Todo" ) { | 404 | if ( inc->typeID() == todoID ) { |
405 | if ( ((Todo*)inc)->hasDueDate() ) | 405 | if ( ((Todo*)inc)->hasDueDate() ) |
406 | sel.append(((KOListViewItem *)qitem)); | 406 | sel.append(((KOListViewItem *)qitem)); |
407 | } else | 407 | } else |
408 | sel.append(((KOListViewItem *)qitem)); | 408 | sel.append(((KOListViewItem *)qitem)); |
409 | } | 409 | } |
410 | } | 410 | } |
@@ -485,13 +485,13 @@ void KOListView::setCategories( bool removeOld ) | |||
485 | } | 485 | } |
486 | KOListViewItem * item, *temp; | 486 | KOListViewItem * item, *temp; |
487 | item = sel.first(); | 487 | item = sel.first(); |
488 | if( item ) { | 488 | if( item ) { |
489 | Incidence* inc = item->data() ; | 489 | Incidence* inc = item->data() ; |
490 | bool setSub = false; | 490 | bool setSub = false; |
491 | if( inc->type() == "Todo" && sel.count() == 1 && inc->relations().count() > 0 ) { | 491 | if( inc->typeID() == todoID && sel.count() == 1 && inc->relations().count() > 0 ) { |
492 | int result = KMessageBox::warningYesNoCancel(this, | 492 | int result = KMessageBox::warningYesNoCancel(this, |
493 | i18n("The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?").arg( inc->summary().left ( 25 ) ), | 493 | i18n("The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?").arg( inc->summary().left ( 25 ) ), |
494 | i18n("Todo has subtodos"), | 494 | i18n("Todo has subtodos"), |
495 | i18n("Yes"), | 495 | i18n("Yes"), |
496 | i18n("No")); | 496 | i18n("No")); |
497 | if (result == KMessageBox::Cancel) item = 0; | 497 | if (result == KMessageBox::Cancel) item = 0; |
@@ -608,23 +608,23 @@ void KOListView::saveDescriptionToFile() | |||
608 | if ( createbup ) { | 608 | if ( createbup ) { |
609 | QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + | 609 | QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + |
610 | KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); | 610 | KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); |
611 | Incidence *incidence = delSel.first(); | 611 | Incidence *incidence = delSel.first(); |
612 | icount = 0; | 612 | icount = 0; |
613 | while ( incidence ) { | 613 | while ( incidence ) { |
614 | if ( incidence->type() == "Journal" ) { | 614 | if ( incidence->typeID() == journalID ) { |
615 | text += "\n************************************\n"; | 615 | text += "\n************************************\n"; |
616 | text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); | 616 | text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); |
617 | text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); | 617 | text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); |
618 | text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); | 618 | text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); |
619 | ++icount; | 619 | ++icount; |
620 | 620 | ||
621 | } else { | 621 | } else { |
622 | if ( !incidence->description().isEmpty() ) { | 622 | if ( !incidence->description().isEmpty() ) { |
623 | text += "\n************************************\n"; | 623 | text += "\n************************************\n"; |
624 | if ( incidence->type() == "Todo" ) | 624 | if ( incidence->typeID() == todoID ) |
625 | text += i18n("To-Do: "); | 625 | text += i18n("To-Do: "); |
626 | text += incidence->summary(); | 626 | text += incidence->summary(); |
627 | if ( incidence->hasStartDate() ) | 627 | if ( incidence->hasStartDate() ) |
628 | text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); | 628 | text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); |
629 | text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); | 629 | text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); |
630 | if ( !incidence->location().isEmpty() ) | 630 | if ( !incidence->location().isEmpty() ) |
@@ -666,13 +666,13 @@ void KOListView::writeToFile( bool iCal ) | |||
666 | QPtrList<Incidence> delSel ; | 666 | QPtrList<Incidence> delSel ; |
667 | QListViewItem *item = mListView->firstChild (); | 667 | QListViewItem *item = mListView->firstChild (); |
668 | bool journal = iCal; // warn only for vCal | 668 | bool journal = iCal; // warn only for vCal |
669 | while ( item ) { | 669 | while ( item ) { |
670 | if ( item->isSelected() ) { | 670 | if ( item->isSelected() ) { |
671 | if ( !journal ) | 671 | if ( !journal ) |
672 | if ( ((KOListViewItem *)item)->data()->type() == "Journal") | 672 | if ( ((KOListViewItem *)item)->data()->typeID() == journalID ) |
673 | journal = true; | 673 | journal = true; |
674 | delSel.append(((KOListViewItem *)item)->data()); | 674 | delSel.append(((KOListViewItem *)item)->data()); |
675 | ++icount; | 675 | ++icount; |
676 | } | 676 | } |
677 | 677 | ||
678 | item = item->nextSibling(); | 678 | item = item->nextSibling(); |