author | zautrix <zautrix> | 2005-03-11 19:38:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-11 19:38:46 (UTC) |
commit | efa425789895481dd918a55af27895a7917d2a20 (patch) (side-by-side diff) | |
tree | cb6b6d495c17dd649fcc6387a41b2db2eef1d39d | |
parent | 1166a4797a91cedd5002a3513d5028c5e86016f0 (diff) | |
download | kdepimpi-efa425789895481dd918a55af27895a7917d2a20.zip kdepimpi-efa425789895481dd918a55af27895a7917d2a20.tar.gz kdepimpi-efa425789895481dd918a55af27895a7917d2a20.tar.bz2 |
better kopi export
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 4 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index e769bd8..ef53ad9 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -1,29 +1,33 @@ Info about the changes in new versions of KDE-Pim/Pi ********** VERSION 2.0.16 ************ OM/Pi: Fixed the SMTP account setting the option. +Fixed something in mail sending. + +KO/Pi: +Added possibility to export selected events/todos as vcal file. ********** VERSION 2.0.15 ************ PwM/Pi: Added keyboard shorcuts for - toggling summary view (space bar) - delete item (delete + backspace key) - add new item ( i + n key) Fixed length of info in the title. KO/Pi-KA/Pi: Changed "ME" menu bar entry to an icon. KO/Pi: Fixed two minor bugs in displaying todos. If in month view a cell is selected, the key shortcut "d" shows now that date. Added complete info for a todo in month view as an icon left of the text. Fixed problems of displaying data when "<" or ">" are used in summary/location/description. Fixed problem of search dialog size when switching displays. Cancel key now closes date picker. Rearranged KO/Pi file menu structure. OM/Pi: Added to the SMTP account setting the option diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index f235705..3519985 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -601,97 +601,109 @@ void KOListView::saveDescriptionToFile() QTextStream ts( &file ); ts << text; file.close(); //qDebug("%s ", text.latin1()); mes = i18n("KO/Pi:Saved %1 descriptions/journals").arg(icount ); KOPrefs::instance()->mLastSaveFile = fn; topLevelWidget()->setCaption(mes); } } } void KOListView::saveToFileVCS() { writeToFile( false ); } void KOListView::saveToFile() { writeToFile( true ); } void KOListView::writeToFile( bool iCal ) { int icount = 0; QPtrList<Incidence> 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; if ( iCal ) { if ( fn.right( 4 ).lower() == ".vcs" ) { fn = fn.left( fn.length() -3) + "ics"; } } else { if ( fn.right( 4 ).lower() == ".ics" ) { fn = fn.left( fn.length() -3) + "vcs"; } } fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); if ( fn == "" ) return; QFileInfo info; info.setFile( fn ); QString mes; bool createbup = true; if ( info. exists() ) { mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, i18n("Overwrite!"), i18n("Cancel"), 0, 0, 1 ); if ( result != 0 ) { createbup = false; } } if ( createbup ) { CalendarLocal cal; cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); Incidence *incidence = delSel.first(); while ( incidence ) { cal.addIncidence( incidence->clone() ); incidence = delSel.next(); } if ( iCal ) { ICalFormat format; format.save( &cal, fn ); } else { + VCalFormat format; format.save( &cal, fn ); } mes = i18n("KO/Pi:Saved %1").arg(fn ); KOPrefs::instance()->mLastSaveFile = fn; topLevelWidget()->setCaption(mes); } } } void KOListView::deleteAll() { int icount = 0; QPtrList<Incidence> delSel ; QListViewItem *item = mListView->firstChild (); while ( item ) { if ( item->isSelected() ) { delSel.append(((KOListViewItem *)item)->data()); ++icount; } item = item->nextSibling(); } if ( icount ) { Incidence *incidence = delSel.first(); |