From e309bf2da3fa81acb9507a8e1bbeaa3b781d85aa Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 2 Apr 2009 06:29:46 +0000 Subject: [PATCH] add a wallpaper package definition svn path=/trunk/KDE/kdelibs/; revision=948063 --- private/packages.cpp | 12 ++++++++++++ private/packages_p.h | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/private/packages.cpp b/private/packages.cpp index d1b2d6a7e..0115390e6 100644 --- a/private/packages.cpp +++ b/private/packages.cpp @@ -154,6 +154,18 @@ ThemePackage::ThemePackage(QObject *parent) setDefaultMimetypes(mimetypes); } +WallpaperPackage::WallpaperPackage(QObject *parent) + : PackageStructure(parent, "Background") +{ + QStringList mimetypes; + mimetypes << "image/svg" << "image/png" << "image/jpeg" << "image/jpg"; + setDefaultMimetypes(mimetypes); + + addDirectoryDefinition("images", "images", i18n("Images")); + addFileDefinition("screenshot", "screenshot.png", i18n("Screenshot")); + setAllowExternalPaths(true); +} + } // namespace Plasma #include "packages_p.moc" diff --git a/private/packages_p.h b/private/packages_p.h index 7a03715e4..bd4da7442 100644 --- a/private/packages_p.h +++ b/private/packages_p.h @@ -44,6 +44,14 @@ public: explicit ThemePackage(QObject *parent = 0); }; +class WallpaperPackage : public PackageStructure +{ + Q_OBJECT + +public: + explicit WallpaperPackage(QObject *parent = 0); +}; + PackageStructure::Ptr defaultPackageStructure(ComponentType type); } // namespace Plasma