summaryrefslogtreecommitdiffabout
path: root/korganizer/kolistview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kolistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kolistview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index d0dbb47..acd9265 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -475,97 +475,97 @@ void KOListView::beamSelected()
++icount;
}
item = item->nextSibling();
}
if ( icount ) {
emit beamIncidenceList( delSel );
return;
QString fn ;
fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs";
QString mes;
bool createbup = true;
if ( createbup ) {
QString description = "\n";
CalendarLocal* cal = new CalendarLocal();
cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
Incidence *incidence = delSel.first();
while ( incidence ) {
Incidence *in = incidence->clone();
description += in->summary() + "\n";
cal->addIncidence( in );
incidence = delSel.next();
}
FileStorage storage( cal, fn, new VCalFormat );
storage.save();
delete cal;
mes = i18n("KO/Pi: Ready for beaming");
topLevelWidget()->setCaption(mes);
#ifndef DESKTOP_VERSION
Ir *ir = new Ir( this );
connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
ir->send( fn, description, "text/x-vCalendar" );
#endif
}
}
}
void KOListView::beamDone( Ir *ir )
{
#ifndef DESKTOP_VERSION
delete ir;
#endif
topLevelWidget()->setCaption(i18n("KO/Pi:Beaming done"));
}
void KOListView::saveDescriptionToFile()
{
- int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
+ int result = QMessageBox::warning( this, i18n("KO/Pi: Information!"),
i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."),
i18n("Continue"), i18n("Cancel"), 0,
0, 1 );
if ( result != 0 ) {
return;
}
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 ) {
QString fn = KOPrefs::instance()->mLastSaveFile;
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 ) {
QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") +
KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false);
Incidence *incidence = delSel.first();
icount = 0;
while ( incidence ) {
if ( incidence->type() == "Journal" ) {
text += "\n************************************\n";
text += i18n("Journal from: ") +incidence->dtStartDateStr( false );
text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false);
text +="\n" + i18n("Description: ") + "\n"+ incidence->description();
++icount;