diff --git a/src/plasma/corona.cpp b/src/plasma/corona.cpp index afb198b2b..08062bd54 100644 --- a/src/plasma/corona.cpp +++ b/src/plasma/corona.cpp @@ -319,8 +319,8 @@ CoronaPrivate::CoronaPrivate(Corona *corona) actions(corona) { //TODO: make Package path configurable - package = Plasma::PluginLoader::self()->loadPackage("Plasma/Generic"); - package.setPath("org.kde.homescreen.desktop"); + package = Plasma::PluginLoader::self()->loadPackage("Plasma/Shell"); + package.setPath("org.kde.desktop"); if (QCoreApplication::instance()) { configName = QCoreApplication::instance()->applicationName() + "-appletsrc"; diff --git a/src/scriptengines/qml/plasmoid/appletinterface.cpp b/src/scriptengines/qml/plasmoid/appletinterface.cpp index 57ebe97e1..268cb76c4 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.cpp +++ b/src/scriptengines/qml/plasmoid/appletinterface.cpp @@ -114,7 +114,7 @@ void AppletInterface::init() } reason = i18n("Error loading QML file: %1", reason); - m_qmlObject->setSource(QUrl::fromLocalFile(applet()->containment()->corona()->package().filePath("ui", "AppletError.qml"))); + m_qmlObject->setSource(QUrl::fromLocalFile(applet()->containment()->corona()->package().filePath("appleterror"))); m_qmlObject->completeInitialization(); @@ -515,7 +515,7 @@ void AppletInterface::geometryChanged(const QRectF &newGeometry, const QRectF &o return; } - m_compactUiObject = m_qmlObject->createObjectFromSource(QUrl::fromLocalFile(applet()->containment()->corona()->package().filePath("ui", "CompactApplet.qml"))); + m_compactUiObject = m_qmlObject->createObjectFromSource(QUrl::fromLocalFile(applet()->containment()->corona()->package().filePath("compactapplet"))); QObject *compactRepresentation = 0; @@ -526,7 +526,7 @@ void AppletInterface::geometryChanged(const QRectF &newGeometry, const QRectF &o if (compactComponent) { compactRepresentation = compactComponent->create(m_qmlObject->engine()->rootContext()); } else { - compactRepresentation = m_qmlObject->createObjectFromSource(QUrl::fromLocalFile(applet()->containment()->corona()->package().filePath("ui", "DefaultCompactRepresentation.qml"))); + compactRepresentation = m_qmlObject->createObjectFromSource(QUrl::fromLocalFile(applet()->containment()->corona()->package().filePath("defaultcompactrepresentation"))); } if (compactRepresentation && compactComponent) { diff --git a/src/scriptengines/qml/plasmoid/configview.cpp b/src/scriptengines/qml/plasmoid/configview.cpp index bbd4453f2..b0d626caf 100644 --- a/src/scriptengines/qml/plasmoid/configview.cpp +++ b/src/scriptengines/qml/plasmoid/configview.cpp @@ -127,7 +127,7 @@ QVariant ConfigModel::data(const QModelIndex& index, int role) const return m_categories.at(index.row())->icon(); case SourceRole: if (m_appletInterface) { - return QUrl::fromLocalFile(m_appletInterface.data()->applet()->package().filePath("ui", m_categories.at(index.row())->source())); + return QUrl::fromLocalFile(m_appletInterface.data()->applet()->package().filePath("components", m_categories.at(index.row())->source())); } else { return m_categories.at(index.row())->source(); } @@ -146,7 +146,7 @@ QVariant ConfigModel::get(int row) const value["name"] = m_categories.at(row)->name(); value["icon"] = m_categories.at(row)->icon(); if (m_appletInterface) { - value["source"] = QUrl::fromLocalFile(m_appletInterface.data()->applet()->package().filePath("ui", m_categories.at(row)->source())); + value["source"] = QUrl::fromLocalFile(m_appletInterface.data()->applet()->package().filePath("components", m_categories.at(row)->source())); } else { value["source"] = m_categories.at(row)->source(); } @@ -272,7 +272,7 @@ ConfigView::ConfigView(AppletInterface *interface, QWindow *parent) engine()->rootContext()->setContextProperty("plasmoid", interface); engine()->rootContext()->setContextProperty("configDialog", this); - setSource(QUrl::fromLocalFile(m_appletInterface->applet()->containment()->corona()->package().filePath("ui", "Configuration.qml"))); + setSource(QUrl::fromLocalFile(m_appletInterface->applet()->containment()->corona()->package().filePath("configurationui"))); } ConfigView::~ConfigView() diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index 4421dada6..7f332b1e4 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -136,7 +136,7 @@ void ContainmentInterface::appletAddedForward(Plasma::Applet *applet) //if an appletGraphicObject is not set, we have to display some error message } else if (applet && contGraphicObject) { - QObject *errorUi = qmlObject()->createObjectFromSource(QUrl::fromLocalFile(containment()->corona()->package().filePath("ui", "AppletError.qml"))); + QObject *errorUi = qmlObject()->createObjectFromSource(QUrl::fromLocalFile(containment()->corona()->package().filePath("appleterror"))); if (errorUi) { errorUi->setProperty("visible", false); diff --git a/src/shell/desktopcorona.cpp b/src/shell/desktopcorona.cpp index da305020b..8882c4945 100644 --- a/src/shell/desktopcorona.cpp +++ b/src/shell/desktopcorona.cpp @@ -24,7 +24,6 @@ #include #include "panelview.h" -#include "shellpluginloader.h" #include "view.h" @@ -34,9 +33,6 @@ DesktopCorona::DesktopCorona(QObject *parent) : Plasma::Corona(parent), m_desktopWidget(QApplication::desktop()) { - m_pluginLoader = new ShellPluginLoader(); - Plasma::PluginLoader::setPluginLoader(m_pluginLoader); - connect(m_desktopWidget, SIGNAL(resized(int)), this, SLOT(screenResized(int))); connect(m_desktopWidget, SIGNAL(screenCountChanged(int)), diff --git a/src/shell/desktopcorona.h b/src/shell/desktopcorona.h index 627493ce4..983a63a9f 100644 --- a/src/shell/desktopcorona.h +++ b/src/shell/desktopcorona.h @@ -30,7 +30,6 @@ class View; namespace Plasma { class Applet; - class PluginLoader; } // namespace Plasma @@ -77,7 +76,6 @@ private: QDesktopWidget *m_desktopWidget; QList m_views; QHash m_panelViews; - Plasma::PluginLoader *m_pluginLoader; }; #endif diff --git a/src/shell/main.cpp b/src/shell/main.cpp index 2e9032568..d99fb4fe2 100644 --- a/src/shell/main.cpp +++ b/src/shell/main.cpp @@ -25,10 +25,11 @@ #include #include - +#include #include "desktopcorona.h" -#include +#include "shellpluginloader.h" + static const char description[] = "Plasma2 library tests"; static const char version[] = "1.0"; @@ -46,7 +47,7 @@ int main(int argc, char** argv) QApplication app(argc, argv); - + Plasma::PluginLoader::setPluginLoader(new ShellPluginLoader); DesktopCorona *corona = new DesktopCorona(); corona->loadLayout(); if (corona->containments().isEmpty()) { diff --git a/src/shell/panelview.cpp b/src/shell/panelview.cpp index 720dd09fc..296414093 100644 --- a/src/shell/panelview.cpp +++ b/src/shell/panelview.cpp @@ -89,7 +89,7 @@ void PanelView::init() } setResizeMode(View::SizeRootObjectToView); - setSource(QUrl::fromLocalFile(corona()->package().filePath("ui", "PanelView.qml"))); + setSource(QUrl::fromLocalFile(corona()->package().filePath("views", "Panel.qml"))); } void PanelView::positionPanel() diff --git a/src/shell/qmlpackages/desktop/CMakeLists.txt b/src/shell/qmlpackages/desktop/CMakeLists.txt index 3f48fb212..9dcfc1565 100644 --- a/src/shell/qmlpackages/desktop/CMakeLists.txt +++ b/src/shell/qmlpackages/desktop/CMakeLists.txt @@ -1,5 +1,5 @@ project(desktop_homescreen) -install(DIRECTORY . DESTINATION ${DATA_INSTALL_DIR}/plasma/packages/org.kde.homescreen.desktop PATTERN .svn EXCLUDE PATTERN CMakeLists.txt EXCLUDE PATTERN Messages.sh EXCLUDE) +install(DIRECTORY . DESTINATION ${DATA_INSTALL_DIR}/plasma/shells/org.kde.desktop PATTERN .svn EXCLUDE PATTERN CMakeLists.txt EXCLUDE PATTERN Messages.sh EXCLUDE) diff --git a/src/shell/qmlpackages/desktop/contents/ui/AppletError.qml b/src/shell/qmlpackages/desktop/contents/components/AppletError.qml similarity index 100% rename from src/shell/qmlpackages/desktop/contents/ui/AppletError.qml rename to src/shell/qmlpackages/desktop/contents/components/AppletError.qml diff --git a/src/shell/qmlpackages/desktop/contents/ui/CompactApplet.qml b/src/shell/qmlpackages/desktop/contents/components/CompactApplet.qml similarity index 100% rename from src/shell/qmlpackages/desktop/contents/ui/CompactApplet.qml rename to src/shell/qmlpackages/desktop/contents/components/CompactApplet.qml diff --git a/src/shell/qmlpackages/desktop/contents/ui/ConfigCategoryDelegate.qml b/src/shell/qmlpackages/desktop/contents/components/ConfigCategoryDelegate.qml similarity index 100% rename from src/shell/qmlpackages/desktop/contents/ui/ConfigCategoryDelegate.qml rename to src/shell/qmlpackages/desktop/contents/components/ConfigCategoryDelegate.qml diff --git a/src/shell/qmlpackages/desktop/contents/ui/Configuration.qml b/src/shell/qmlpackages/desktop/contents/components/Configuration.qml similarity index 100% rename from src/shell/qmlpackages/desktop/contents/ui/Configuration.qml rename to src/shell/qmlpackages/desktop/contents/components/Configuration.qml diff --git a/src/shell/qmlpackages/desktop/contents/ui/ConfigurationContainmentActions.qml b/src/shell/qmlpackages/desktop/contents/components/ConfigurationContainmentActions.qml similarity index 100% rename from src/shell/qmlpackages/desktop/contents/ui/ConfigurationContainmentActions.qml rename to src/shell/qmlpackages/desktop/contents/components/ConfigurationContainmentActions.qml diff --git a/src/shell/qmlpackages/desktop/contents/ui/ConfigurationContainmentAppearance.qml b/src/shell/qmlpackages/desktop/contents/components/ConfigurationContainmentAppearance.qml similarity index 100% rename from src/shell/qmlpackages/desktop/contents/ui/ConfigurationContainmentAppearance.qml rename to src/shell/qmlpackages/desktop/contents/components/ConfigurationContainmentAppearance.qml diff --git a/src/shell/qmlpackages/desktop/contents/ui/ConfigurationShortcuts.qml b/src/shell/qmlpackages/desktop/contents/components/ConfigurationShortcuts.qml similarity index 100% rename from src/shell/qmlpackages/desktop/contents/ui/ConfigurationShortcuts.qml rename to src/shell/qmlpackages/desktop/contents/components/ConfigurationShortcuts.qml diff --git a/src/shell/qmlpackages/desktop/contents/ui/DefaultCompactRepresentation.qml b/src/shell/qmlpackages/desktop/contents/components/DefaultCompactRepresentation.qml similarity index 100% rename from src/shell/qmlpackages/desktop/contents/ui/DefaultCompactRepresentation.qml rename to src/shell/qmlpackages/desktop/contents/components/DefaultCompactRepresentation.qml diff --git a/src/shell/qmlpackages/desktop/contents/ui/main.qml b/src/shell/qmlpackages/desktop/contents/views/Desktop.qml similarity index 100% rename from src/shell/qmlpackages/desktop/contents/ui/main.qml rename to src/shell/qmlpackages/desktop/contents/views/Desktop.qml diff --git a/src/shell/qmlpackages/desktop/contents/ui/PanelView.qml b/src/shell/qmlpackages/desktop/contents/views/Panel.qml similarity index 100% rename from src/shell/qmlpackages/desktop/contents/ui/PanelView.qml rename to src/shell/qmlpackages/desktop/contents/views/Panel.qml diff --git a/src/shell/qmlpackages/desktop/metadata.desktop b/src/shell/qmlpackages/desktop/metadata.desktop index 9aec579a3..dd8f26c3a 100644 --- a/src/shell/qmlpackages/desktop/metadata.desktop +++ b/src/shell/qmlpackages/desktop/metadata.desktop @@ -21,13 +21,12 @@ Name[uk]=Стільниця Name[x-test]=xxDesktopxx Type=Service -X-KDE-ServiceTypes=Plasma/GenericPackage +X-KDE-ServiceTypes=Plasma/Shell X-KDE-ParentApp= X-KDE-PluginInfo-Author=Marco Martin X-KDE-PluginInfo-Category= X-KDE-PluginInfo-Email=mart@kde.org X-KDE-PluginInfo-License=GPLv2+ -X-KDE-PluginInfo-Name=org.kde.homescreen.desktop +X-KDE-PluginInfo-Name=org.kde.desktop X-KDE-PluginInfo-Version= X-KDE-PluginInfo-Website= -X-Plasma-MainScript=ui/main.qml diff --git a/src/shell/shellpackage.cpp b/src/shell/shellpackage.cpp index 103798d11..b370027c6 100644 --- a/src/shell/shellpackage.cpp +++ b/src/shell/shellpackage.cpp @@ -44,8 +44,9 @@ void ShellPackageStructure::initPackage(Plasma::Package *package) package->addFileDefinition("appleterror", "components/AppletError.qml", i18n("Error message shown when an applet fails loading")); package->addFileDefinition("compactapplet", "components/CompactApplet.qml", i18n("QML component that shows an applet in a popup")); + package->addFileDefinition("configurationui", "components/Configuration.qml", i18n("QML component for the configuratuion dialog")); package->addFileDefinition("defaultcompactrepresentation", "components/DefaultCompactRepresentation.qml", i18n("Compact representation of an applet when collapsed in a popup, for instance as an icon. applets can override this component.")); - package->addFileDefinition("widgetexplorer", "components/WidgetExplorer.qml", i18n("Widgets explorer ui")); + package->addFileDefinition("widgetexplorer", "components/WidgetExplorer.qml", i18n("Widgets explorer UI")); //package->setRequired("mainscript", true); } diff --git a/src/shell/view.cpp b/src/shell/view.cpp index 515fe2c21..fdfe2e965 100644 --- a/src/shell/view.cpp +++ b/src/shell/view.cpp @@ -63,7 +63,7 @@ void View::init() } setResizeMode(View::SizeRootObjectToView); - setSource(QUrl::fromLocalFile(m_corona->package().filePath("mainscript"))); + setSource(QUrl::fromLocalFile(m_corona->package().filePath("views", "Desktop.qml"))); } void View::setContainment(Plasma::Containment *cont)