[Containmentinterface] Don't offer to set a wallpaper for a panel

It makes no sense and did nothing. This removes this option.

CHANGELOG: Dropping image files onto a panel will no longer offer to set them as wallpaper for the panel

REVIEW: 126159
This commit is contained in:
Kai Uwe Broulik 2015-11-24 21:11:59 +01:00
parent 2608e0d5df
commit c7bfe07b1c

View File

@ -602,12 +602,17 @@ void ContainmentInterface::mimeTypeRetrieved(KIO::Job *job, const QString &mimet
qDebug() << "Creating menu for:" << mimetype << posi;
appletList << Plasma::PluginLoader::self()->listAppletInfoForMimeType(mimetype);
KPluginInfo::List wallpaperList;
if (m_wallpaperInterface && m_wallpaperInterface->supportsMimetype(mimetype)) {
wallpaperList << m_wallpaperInterface->package().metadata();
} else {
wallpaperList = WallpaperInterface::listWallpaperInfoForMimetype(mimetype);
if (m_containment->containmentType() != Plasma::Types::PanelContainment
&& m_containment->containmentType() != Plasma::Types::CustomPanelContainment) {
if (m_wallpaperInterface && m_wallpaperInterface->supportsMimetype(mimetype)) {
wallpaperList << m_wallpaperInterface->package().metadata();
} else {
wallpaperList = WallpaperInterface::listWallpaperInfoForMimetype(mimetype);
}
}
const bool isPlasmaPackage = (mimetype == QLatin1String("application/x-plasma"));