diff --git a/desktopcorona.cpp b/desktopcorona.cpp index da305020b..8882c4945 100644 --- a/desktopcorona.cpp +++ b/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/desktopcorona.h b/desktopcorona.h index 627493ce4..983a63a9f 100644 --- a/desktopcorona.h +++ b/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/main.cpp b/main.cpp index 2e9032568..d99fb4fe2 100644 --- a/main.cpp +++ b/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/panelview.cpp b/panelview.cpp index 720dd09fc..296414093 100644 --- a/panelview.cpp +++ b/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/qmlpackages/desktop/CMakeLists.txt b/qmlpackages/desktop/CMakeLists.txt index 3f48fb212..9dcfc1565 100644 --- a/qmlpackages/desktop/CMakeLists.txt +++ b/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/qmlpackages/desktop/contents/ui/AppletError.qml b/qmlpackages/desktop/contents/components/AppletError.qml similarity index 100% rename from qmlpackages/desktop/contents/ui/AppletError.qml rename to qmlpackages/desktop/contents/components/AppletError.qml diff --git a/qmlpackages/desktop/contents/ui/CompactApplet.qml b/qmlpackages/desktop/contents/components/CompactApplet.qml similarity index 100% rename from qmlpackages/desktop/contents/ui/CompactApplet.qml rename to qmlpackages/desktop/contents/components/CompactApplet.qml diff --git a/qmlpackages/desktop/contents/ui/ConfigCategoryDelegate.qml b/qmlpackages/desktop/contents/components/ConfigCategoryDelegate.qml similarity index 100% rename from qmlpackages/desktop/contents/ui/ConfigCategoryDelegate.qml rename to qmlpackages/desktop/contents/components/ConfigCategoryDelegate.qml diff --git a/qmlpackages/desktop/contents/ui/Configuration.qml b/qmlpackages/desktop/contents/components/Configuration.qml similarity index 100% rename from qmlpackages/desktop/contents/ui/Configuration.qml rename to qmlpackages/desktop/contents/components/Configuration.qml diff --git a/qmlpackages/desktop/contents/ui/ConfigurationContainmentActions.qml b/qmlpackages/desktop/contents/components/ConfigurationContainmentActions.qml similarity index 100% rename from qmlpackages/desktop/contents/ui/ConfigurationContainmentActions.qml rename to qmlpackages/desktop/contents/components/ConfigurationContainmentActions.qml diff --git a/qmlpackages/desktop/contents/ui/ConfigurationContainmentAppearance.qml b/qmlpackages/desktop/contents/components/ConfigurationContainmentAppearance.qml similarity index 100% rename from qmlpackages/desktop/contents/ui/ConfigurationContainmentAppearance.qml rename to qmlpackages/desktop/contents/components/ConfigurationContainmentAppearance.qml diff --git a/qmlpackages/desktop/contents/ui/ConfigurationShortcuts.qml b/qmlpackages/desktop/contents/components/ConfigurationShortcuts.qml similarity index 100% rename from qmlpackages/desktop/contents/ui/ConfigurationShortcuts.qml rename to qmlpackages/desktop/contents/components/ConfigurationShortcuts.qml diff --git a/qmlpackages/desktop/contents/ui/DefaultCompactRepresentation.qml b/qmlpackages/desktop/contents/components/DefaultCompactRepresentation.qml similarity index 100% rename from qmlpackages/desktop/contents/ui/DefaultCompactRepresentation.qml rename to qmlpackages/desktop/contents/components/DefaultCompactRepresentation.qml diff --git a/qmlpackages/desktop/contents/ui/main.qml b/qmlpackages/desktop/contents/views/Desktop.qml similarity index 100% rename from qmlpackages/desktop/contents/ui/main.qml rename to qmlpackages/desktop/contents/views/Desktop.qml diff --git a/qmlpackages/desktop/contents/ui/PanelView.qml b/qmlpackages/desktop/contents/views/Panel.qml similarity index 100% rename from qmlpackages/desktop/contents/ui/PanelView.qml rename to qmlpackages/desktop/contents/views/Panel.qml diff --git a/qmlpackages/desktop/metadata.desktop b/qmlpackages/desktop/metadata.desktop index 9aec579a3..dd8f26c3a 100644 --- a/qmlpackages/desktop/metadata.desktop +++ b/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/shellpackage.cpp b/shellpackage.cpp index 103798d11..b370027c6 100644 --- a/shellpackage.cpp +++ b/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/view.cpp b/view.cpp index 515fe2c21..fdfe2e965 100644 --- a/view.cpp +++ b/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)