Start of look and feel package structure

This commit is contained in:
Sebastian Kügler 2013-04-21 11:21:41 +02:00
parent 79d5724ef1
commit 54bd825668
3 changed files with 109 additions and 0 deletions

View File

@ -60,6 +60,7 @@ add_executable(plasma-shell
panelview.cpp
shellpluginloader.cpp
shellpackage.cpp
lookandfeelpackage.cpp
view.cpp
panelconfigview.cpp
${scripting_SRC}

View File

@ -0,0 +1,71 @@
/******************************************************************************
* Copyright 2007-2009 by Aaron Seigo <aseigo@kde.org> *
* Copyright 2013 by Sebastian Kügler <sebas@kde.org> *
* *
* 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 <KLocalizedString>
#include <Plasma/Package>
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"));
}

View File

@ -0,0 +1,37 @@
/******************************************************************************
* Copyright 2007 by Aaron Seigo <aseigo@kde.org> *
* Copyright 2013 by Marco Martin <mart@kde.org> *
* Copyright 2013 by Sebastian Kügler <sebas@kde.org> *
* *
* 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 <Plasma/PackageStructure>
#include <Plasma/Plasma>
class LookAndFeelPackageStructure : public Plasma::PackageStructure
{
public:
void initPackage(Plasma::Package *package);
};
#endif // LOOKANDFEELPACKAGE_H