Commit f77490d3 authored by Volker Krause's avatar Volker Krause

Remove vCalendar export

Leaving aside the fact that vCalendar is the 20+ year old obsolete
predecessor of iCal, the main reason for this is that a QTimeZone
based KCalCore wont be able to serialize vCalendar "timezones" anymore.
Import of legacy files is not affected.
parent a5db618d
......@@ -529,9 +529,8 @@ store.kde.org KOrganizer Calendars-->
<sect2 id="managing-export">
<title>Exporting Calendars</title>
<para>You can export your data as an iCalendar or
vCalendar file, which are supported by most scheduling applications.
Either way, &korganizer; will export all calendar
<para>You can export your data as an iCalendar file, which is supported by
most scheduling applications. &korganizer; will export all calendar
items from the enabled (checked) resources which are
<link linkend="filters-view">not filtered out</link> (let's call these items
<quote>active</quote> items). In other words, if you cannot see a calendar
......@@ -547,10 +546,8 @@ sidebar.</para>
<para>To export all your <quote>active</quote> events, to-dos and journal entries
(independent of to what resource they belong) as a new iCalendar
file, choose the <menuchoice><guimenu>File</guimenu><guisubmenu>Export</guisubmenu>
<guimenuitem>Export as iCalendar...</guimenuitem></menuchoice> menu item. To export the same
data as a new vCalendar file choose the <menuchoice><guimenu>File</guimenu>
<guisubmenu>Export</guisubmenu> <guimenuitem>Export as vCalendar...</guimenuitem>
</menuchoice> menu item. The <guilabel>Save As</guilabel> dialog will pop up.
<guimenuitem>Export as iCalendar...</guimenuitem></menuchoice> menu item.
The <guilabel>Save As</guilabel> dialog will pop up.
Enter the file name and location for the new file to complete the export
action.</para>
......@@ -1219,7 +1216,7 @@ information depends on the client and/or groupware server implementation.</para>
<warning><para>Currently, &korganizer; <emphasis>will</emphasis> display
items owned by other people and marked as confidential. Other
clients may treat them differently, but be careful when publishing private or
confidential events: vCalendar and iCalendar are text files, and can be read
confidential events: iCalendar is a text file format, and can be read
with any text editor (if someone has read access to them). So if you want to
keep items really confidential, make sure you use a resource that
only you can access.</para></warning></listitem>
......@@ -2897,20 +2894,6 @@ file.</para>
</listitem>
</varlistentry>
<varlistentry id="menu-file-export-vcalendar">
<term><menuchoice>
<guimenu>File</guimenu>
<guisubmenu>Export</guisubmenu>
<guimenuitem>Export as vCalendar</guimenuitem>
</menuchoice></term>
<listitem><para>This action will export all your active events, to-dos and
journal entries (independent of to which resource they belong) as a new vCalendar
file.</para>
<para>For more information about this action, please refer to
<xref linkend="managing-export" />.</para>
</listitem>
</varlistentry>
<!--not in 4.6.0
varlistentry id="menu-file-export-ghns">
<term><menuchoice>
......
......@@ -286,10 +286,6 @@ void ActionManager::initActions()
mACollection->addAction(QStringLiteral("export_icalendar"), action);
connect(action, &QAction::triggered, mCalendarView, &CalendarView::exportICalendar);
action = new QAction(i18n("Export as &vCalendar..."), this);
mACollection->addAction(QStringLiteral("export_vcalendar"), action);
connect(action, &QAction::triggered, mCalendarView, &CalendarView::exportVCalendar);
//Laurent: 2009-03-24 comment it until upload will implement
//action = new QAction( i18n( "Upload &Hot New Stuff..." ), this );
//mACollection->addAction( "uploadnewstuff", action );
......@@ -923,28 +919,6 @@ bool ActionManager::saveURL()
ext = mURL.fileName().right(4);
}
if (ext == QLatin1String(".vcs")) {
int result = KMessageBox::warningContinueCancel(
dialogParent(),
i18n("Your calendar will be saved in iCalendar format. Use "
"'Export vCalendar' to save in vCalendar format."),
i18n("Format Conversion"), KGuiItem(i18n("Proceed")),
KStandardGuiItem::cancel(),
QStringLiteral("dontaskFormatConversion"), KMessageBox::Notify);
if (result != KMessageBox::Continue) {
return false;
}
QString filename = mURL.fileName();
filename.replace(filename.length() - 4, 4, QStringLiteral(".ics"));
mURL = mURL.adjusted(QUrl::RemoveFilename);
mURL.setPath(mURL.path() + filename);
if (mURL.isLocalFile()) {
mFile = mURL.toLocalFile();
}
setTitle();
}
if (!mCalendarView->saveCalendar(mFile)) {
qCDebug(KORGANIZER_LOG) << "calendar view save failed.";
return false;
......
......@@ -84,7 +84,6 @@
#include <KCalCore/CalFilter>
#include <KCalCore/FileStorage>
#include <KCalCore/ICalFormat>
#include <KCalCore/VCalFormat>
#include <KCalUtils/ICalDrag>
#include <KCalUtils/Stringify>
......@@ -1823,55 +1822,6 @@ void CalendarView::exportICalendar()
}
}
void CalendarView::exportVCalendar()
{
if (!mCalendar->journals().isEmpty()) {
int result = KMessageBox::warningContinueCancel(
this,
i18n("The journal entries cannot be exported to a vCalendar file."),
i18n("Data Loss Warning"),
KGuiItem(i18n("Proceed")),
KStandardGuiItem::cancel(),
QStringLiteral("dontaskVCalExport"),
KMessageBox::Notify);
if (result != KMessageBox::Continue) {
return;
}
}
QString filename = QFileDialog::getSaveFileName(this, QString(), QStringLiteral("vcalout.vcs"),
QStringLiteral("%1 (*.vcs)").arg(i18n("vCalendars files")), nullptr, QFileDialog::DontConfirmOverwrite);
if (!filename.isEmpty()) {
// Force correct extension
if (filename.right(4) != QLatin1String(".vcs")) {
filename += QLatin1String(".vcs");
}
if (QFileInfo::exists(filename)) {
if (KMessageBox::No == KMessageBox::warningYesNo(
this,
i18n("Do you want to overwrite %1?", filename))) {
return;
}
}
KCalCore::VCalFormat *format = new KCalCore::VCalFormat;
KCalCore::FileStorage storage(mCalendar, filename, format);
if (!storage.save()) {
QString errmess;
if (format->exception()) {
errmess = KCalUtils::Stringify::errorMessage(*format->exception());
} else {
errmess = i18nc("save failure cause unknown", "Reason unknown");
}
KMessageBox::error(
this,
i18nc("@info",
"Cannot write vCalendar file %1. %2",
filename, errmess));
}
}
}
void CalendarView::eventUpdated(const Akonadi::Item &)
{
// Don't call updateView here. The code, which has caused the update of the
......
......@@ -488,9 +488,6 @@ public Q_SLOTS:
/** Export as iCalendar file */
void exportICalendar();
/** Export as vCalendar file */
void exportVCalendar();
/** pop up a dialog to show an existing appointment. */
void appointment_show();
/**
......
<!DOCTYPE gui>
<gui name="korganizer" version="429" translationDomain="korganizer">
<gui name="korganizer" version="430" translationDomain="korganizer">
<MenuBar>
<Menu name="file"><text>&amp;File</text>
<Merge/>
......@@ -17,7 +17,6 @@
</Menu>
<Menu name="export"><text>&amp;Export</text>
<Action name="export_icalendar"/>
<Action name="export_vcalendar"/>
<Merge/>
<Separator/>
<Action name="uploadnewstuff"/>
......
<!DOCTYPE gui>
<gui name="korganizer" version="431" translationDomain="korganizer">
<gui name="korganizer" version="432" translationDomain="korganizer">
<MenuBar>
<Menu name="file"><text>&amp;File</text>
<Menu name="import"><text>&amp;Import</text>
......@@ -11,7 +11,6 @@
</Menu>
<Menu name="export"><text>&amp;Export</text>
<Action name="export_icalendar"/>
<Action name="export_vcalendar"/>
<Merge/>
<Separator/>
<Action name="uploadnewstuff"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment