From 6ba042db73b7f9020c66ae1353f4aaf755c2f49b Mon Sep 17 00:00:00 2001 From: Script Kiddy Date: Wed, 13 Jul 2011 09:29:04 +0200 Subject: [PATCH 1/2] SVN_SILENT made messages (.desktop file) --- data/services/plasma.protocol | 1 + 1 file changed, 1 insertion(+) diff --git a/data/services/plasma.protocol b/data/services/plasma.protocol index fb94a84d2..86b0a7ae2 100644 --- a/data/services/plasma.protocol +++ b/data/services/plasma.protocol @@ -7,6 +7,7 @@ output=none Icon=plasma Description=A protocol for Plasma services +Description[bg]=Протокол за услуги Plasma Description[bs]=Protokol Plazma usluga Description[ca]=Un protocol pels serveis del Plasma Description[ca@valencia]=Un protocol pels serveis del Plasma From a4d079975b597edb3da9cb596c0d581a43f2d7c9 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 13 Jul 2011 20:32:25 +0200 Subject: [PATCH 2/2] a new PackageStructure type: GenericComponent this component will be used for loading generic repositories of files, usually will be repositories of QML files --- package.cpp | 6 +++++- packagestructure.cpp | 4 ++++ plasma.h | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/package.cpp b/package.cpp index 1ff0380ce..34735710b 100644 --- a/package.cpp +++ b/package.cpp @@ -757,7 +757,11 @@ PackagePrivate::PackagePrivate(const PackageStructure::Ptr st, const QString &p) service(0) { if (structure) { - structure->setPath(p); + if (p.isEmpty()) { + structure->setPath(structure->defaultPackageRoot()); + } else { + structure->setPath(p); + } } valid = structure && !structure->path().isEmpty(); diff --git a/packagestructure.cpp b/packagestructure.cpp index 4fb78c33a..8bfb12482 100644 --- a/packagestructure.cpp +++ b/packagestructure.cpp @@ -145,6 +145,10 @@ PackageStructure::Ptr PackageStructure::load(const QString &packageFormat) } else if (packageFormat == "Plasma/Theme") { structure = Theme::packageStructure(); structure->d->type = "Plasma/Theme"; + } else if (packageFormat == "Plasma/Generic") { + structure = defaultPackageStructure(GenericComponent); + structure->d->type = "Plasma/Generic"; + structure->setDefaultPackageRoot(KStandardDirs::locate("data", "plasmapackages")); } if (structure) { diff --git a/plasma.h b/plasma.h index d6b9f8bd3..e4a1c7b1f 100644 --- a/plasma.h +++ b/plasma.h @@ -234,7 +234,8 @@ enum ComponentType { RunnerComponent = 4, /**< Plasma::AbstractRunner based plugsin **/ AnimatorComponent = 8, /**< Plasma::Animator based plugins **/ ContainmentComponent = 16,/**< Plasma::Containment based plugins **/ - WallpaperComponent = 32 /**< Plasma::Wallpaper based plugins **/ + WallpaperComponent = 32, /**< Plasma::Wallpaper based plugins **/ + GenericComponent = 64 /** Generic repositories of files, usually they keep QML files and their assets **/ }; Q_DECLARE_FLAGS(ComponentTypes, ComponentType)