From efa425789895481dd918a55af27895a7917d2a20 Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 11 Mar 2005 19:38:46 +0000 Subject: better kopi export --- (limited to 'korganizer') diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index f235705..3519985 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -622,14 +622,25 @@ void KOListView::writeToFile( bool iCal ) int icount = 0; QPtrList delSel ; QListViewItem *item = mListView->firstChild (); + bool journal = iCal; // warn only for vCal while ( item ) { if ( item->isSelected() ) { + if ( !journal ) + if ( ((KOListViewItem *)item)->data()->type() == "Journal") + journal = true; delSel.append(((KOListViewItem *)item)->data()); ++icount; } item = item->nextSibling(); } + if ( !iCal && journal ) { + int result = KMessageBox::warningContinueCancel(this, + i18n("The journal entries can not be\nexported to a vCalendar file."), + i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), + true); + if (result != KMessageBox::Continue) return; + } if ( icount ) { QString fn = KOPrefs::instance()->mLastSaveFile; QString extension; @@ -671,6 +682,7 @@ void KOListView::writeToFile( bool iCal ) ICalFormat format; format.save( &cal, fn ); } else { + VCalFormat format; format.save( &cal, fn ); } -- cgit v0.9.0.2