From 54bd8256682554ec1319218f46d8a18feef63c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Sun, 21 Apr 2013 11:21:41 +0200 Subject: [PATCH] Start of look and feel package structure --- src/shell/CMakeLists.txt | 1 + src/shell/lookandfeelpackage.cpp | 71 ++++++++++++++++++++++++++++++++ src/shell/lookandfeelpackage.h | 37 +++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 src/shell/lookandfeelpackage.cpp create mode 100644 src/shell/lookandfeelpackage.h diff --git a/src/shell/CMakeLists.txt b/src/shell/CMakeLists.txt index afa368738..1ff12f232 100644 --- a/src/shell/CMakeLists.txt +++ b/src/shell/CMakeLists.txt @@ -60,6 +60,7 @@ add_executable(plasma-shell panelview.cpp shellpluginloader.cpp shellpackage.cpp + lookandfeelpackage.cpp view.cpp panelconfigview.cpp ${scripting_SRC} diff --git a/src/shell/lookandfeelpackage.cpp b/src/shell/lookandfeelpackage.cpp new file mode 100644 index 000000000..d8b522bbb --- /dev/null +++ b/src/shell/lookandfeelpackage.cpp @@ -0,0 +1,71 @@ +/****************************************************************************** +* Copyright 2007-2009 by Aaron Seigo * +* Copyright 2013 by Sebastian Kügler * +* * +* This library is free software; you can redistribute it and/or * +* modify it under the terms of the GNU Library General Public * +* License as published by the Free Software Foundation; either * +* version 2 of the License, or (at your option) any later version. * +* * +* This library is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +* Library General Public License for more details. * +* * +* You should have received a copy of the GNU Library General Public License * +* along with this library; see the file COPYING.LIB. If not, write to * +* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * +* Boston, MA 02110-1301, USA. * +*******************************************************************************/ + +#include "lookandfeelpackage.h" + +#include + +#include + + +void LookAndFeelPackageStructure::initPackage(Plasma::Package *package) +{ + // http://community.kde.org/Plasma/lookAndFeelPackage# + /* + * + * metadata.desktop + * * usual stuff + ** URL to video? + * previews/ + ** loginmanager.png + **lockscreen.png + **etc... (generated by tool?) + * loginmanager/ + * lockscreen/ + * logout/ + * userswitcher/ + * desktopswitcher/ + * splash/ + * runcommand/ + * windowdecoration/ + * windowswitcher/ + * + * + * + * + */ + package->setDefaultPackageRoot("plasma/look-and-feel/"); + + //Directories + package->addDirectoryDefinition("previews", "previews", i18n("Preview Images")); + package->addFileDefinition("loginmanagerpreview", "previews/loginmanager.png", i18n("Preview for the Login Manager")); + package->addFileDefinition("lockscreenpreview", "previews/lockscreen.png", i18n("Preview for the Lock Screen")); + package->addFileDefinition("userswitcherpreview", "previews/userswitcher.png", i18n("Preview for the Userswitcher")); + package->addFileDefinition("desktopswitcherpreview", "previews/desktopswitcher.png", i18n("Preview for the Virtual Desktop Switcher")); + package->addFileDefinition("splashpreview", "previews/splash.png", i18n("Preview for Splash Screen")); + package->addFileDefinition("runcommandpreview", "previews/runcommand.png", i18n("Preview for KRunner")); + package->addFileDefinition("windowdecorationpreview", "previews/windowdecoration.png", i18n("Preview for the Window Decorations")); + package->addFileDefinition("windowswitcherpreview", "previews/windowswitcher.png", i18n("Preview for Window Switcher")); + + + +} + + diff --git a/src/shell/lookandfeelpackage.h b/src/shell/lookandfeelpackage.h new file mode 100644 index 000000000..6c62e33b5 --- /dev/null +++ b/src/shell/lookandfeelpackage.h @@ -0,0 +1,37 @@ +/****************************************************************************** +* Copyright 2007 by Aaron Seigo * +* Copyright 2013 by Marco Martin * +* Copyright 2013 by Sebastian Kügler * +* * +* This library is free software; you can redistribute it and/or * +* modify it under the terms of the GNU Library General Public * +* License as published by the Free Software Foundation; either * +* version 2 of the License, or (at your option) any later version. * +* * +* This library is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +* Library General Public License for more details. * +* * +* You should have received a copy of the GNU Library General Public License * +* along with this library; see the file COPYING.LIB. If not, write to * +* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * +* Boston, MA 02110-1301, USA. * +*******************************************************************************/ + +#ifndef SHELLPACKAGE_H +#define SHELLPACKAGE_H + +#include +#include + + + +class LookAndFeelPackageStructure : public Plasma::PackageStructure +{ +public: + void initPackage(Plasma::Package *package); +}; + + +#endif // LOOKANDFEELPACKAGE_H