Commit 9f3bc40c authored by Allen Winter's avatar Allen Winter
Browse files

akonadicollectionview.cpp - limit default calendar types

In collectionView, don't allow collections that don't support
the event content type to be set as the default calendar.

virtual calendars are not allowed either (although virtual
calendars should always be read-only.. but, just in case)

Differential Revision: https://phabricator.kde.org/D27919
parent 9f6ea313
......@@ -750,9 +750,11 @@ void AkonadiCollectionView::updateMenu()
}
mDisableColor->setEnabled(enableAction);
mDefaultCalendar->setEnabled(!KOHelper::isStandardCalendar(collection.id())
&& collection.rights()
& Akonadi::Collection::CanCreateItem);
mDefaultCalendar->setEnabled(
!KOHelper::isStandardCalendar(collection.id()) &&
(collection.rights() & Akonadi::Collection::CanCreateItem) &&
!collection.isVirtual() &&
collection.contentMimeTypes().contains(KCalendarCore::Event::eventMimeType()));
disableStuff = false;
}
bool isOnline;
......
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