Message info
 
To:kde-commits@kde.org From:Shantanu Tushar Subject:[plasma-mediacenter/plain-containment-shantanu] /: First step towards using QML components instead of Plasma Applets Date:Sun, 18 Mar 2012 16:47:52 +0100 (CET)
 

Git commit 5304a2e0a147ae0b784efec0e1ec78a913327f56 by Shantanu Tushar.
Committed on 10/03/2012 at 05:30.
Pushed by shantanu into branch 'plain-containment-shantanu'.

First step towards using QML components instead of Plasma Applets

M +1 -0 CMakeLists.txt
A +6 -0 components/CMakeLists.txt
A +5 -0 components/mediabrowser/MediaBrowser.qml [License: UNKNOWN] *
A +5 -0 components/mediacontroller/MediaController.qml [License: UNKNOWN] *
A +5 -0 components/mediainfobar/MediaInfoBar.qml [License: UNKNOWN] *
A +5 -0 components/mediaplayer/MediaPlayer.qml [License: UNKNOWN] *
A +5 -0 components/mediawelcome/MediaWelcome.qml [License: UNKNOWN] *
A +5 -0 components/qmldir
M +2 -1 shells/CMakeLists.txt
M +12 -4 shells/newshell/CMakeLists.txt
D +0 -81 shells/newshell/backgrounddialog.ui
M +0 -12 shells/newshell/main.cpp
M +15 -239 shells/newshell/mainwindow.cpp
M +4 -55 shells/newshell/mainwindow.h
A +32 -0 shells/newshell/package/contents/ui/mediacenter.qml [License: UNKNOWN] *
A +17 -0 shells/newshell/package/metadata.desktop
A +9 -0 shells/newshell/plasma-mediacenter.desktop
D +0 -42 shells/newshell/theme.ui

The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


http://commits.kde.org/plasma-mediacenter/5304a2e0a147ae0b784efec0e1ec78a913327f56

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 87ba5e6..0e3aa7a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,7 @@ include_directories(

add_subdirectory(browsingbackends)
add_subdirectory(artwork)
+add_subdirectory(components)
add_subdirectory(dataengines)
add_subdirectory(applets)
add_subdirectory(containments)
diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt
new file mode 100644
index 0000000..05b4808
--- /dev/null
+++ b/components/CMakeLists.txt
@@ -0,0 +1,6 @@
+install(FILES qmldir DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/mediacentercomponents)
+install(DIRECTORY mediabrowser DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/mediacentercomponents)
+install(DIRECTORY mediacontroller DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/mediacentercomponents)
+install(DIRECTORY mediainfobar DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/mediacentercomponents)
+install(DIRECTORY mediaplayer DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/mediacentercomponents)
+install(DIRECTORY mediawelcome DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/mediacentercomponents)
\ No newline at end of file
diff --git a/components/mediabrowser/MediaBrowser.qml b/components/mediabrowser/MediaBrowser.qml
new file mode 100644
index 0000000..5af28e9
--- /dev/null
+++ b/components/mediabrowser/MediaBrowser.qml
@@ -0,0 +1,5 @@
+import QtQuick 1.1
+
+Text {
+ text: "hello world"
+}
diff --git a/components/mediacontroller/MediaController.qml b/components/mediacontroller/MediaController.qml
new file mode 100644
index 0000000..5af28e9
--- /dev/null
+++ b/components/mediacontroller/MediaController.qml
@@ -0,0 +1,5 @@
+import QtQuick 1.1
+
+Text {
+ text: "hello world"
+}
diff --git a/components/mediainfobar/MediaInfoBar.qml b/components/mediainfobar/MediaInfoBar.qml
new file mode 100644
index 0000000..5af28e9
--- /dev/null
+++ b/components/mediainfobar/MediaInfoBar.qml
@@ -0,0 +1,5 @@
+import QtQuick 1.1
+
+Text {
+ text: "hello world"
+}
diff --git a/components/mediaplayer/MediaPlayer.qml b/components/mediaplayer/MediaPlayer.qml
new file mode 100644
index 0000000..5af28e9
--- /dev/null
+++ b/components/mediaplayer/MediaPlayer.qml
@@ -0,0 +1,5 @@
+import QtQuick 1.1
+
+Text {
+ text: "hello world"
+}
diff --git a/components/mediawelcome/MediaWelcome.qml b/components/mediawelcome/MediaWelcome.qml
new file mode 100644
index 0000000..5af28e9
--- /dev/null
+++ b/components/mediawelcome/MediaWelcome.qml
@@ -0,0 +1,5 @@
+import QtQuick 1.1
+
+Text {
+ text: "hello world"
+}
diff --git a/components/qmldir b/components/qmldir
new file mode 100644
index 0000000..0fc7c5b
--- /dev/null
+++ b/components/qmldir
@@ -0,0 +1,5 @@
+MediaBrowser 0.1 mediabrowser/MediaBrowser.qml
+MediaController 0.1 mediacontroller/MediaController.qml
+MediaInfoBar 0.1 mediainfobar/MediaInfoBar.qml
+MediaPlayer 0.1 mediaplayer/MediaPlayer.qml
+MediaWelcome 0.1 mediawelcome/MediaWelcome.qml
diff --git a/shells/CMakeLists.txt b/shells/CMakeLists.txt
index a09e890..9f2a35b 100644
--- a/shells/CMakeLists.txt
+++ b/shells/CMakeLists.txt
@@ -1 +1,2 @@
-add_subdirectory(plasmediacenter)
+add_subdirectory(newshell)
+add_subdirectory(plasmediacenter)
diff --git a/shells/newshell/CMakeLists.txt b/shells/newshell/CMakeLists.txt
index d38efcb..fde8e0a 100644
--- a/shells/newshell/CMakeLists.txt
+++ b/shells/newshell/CMakeLists.txt
@@ -11,8 +11,16 @@ set(plasma-mediacenter_SRCS
mainwindow.cpp
)

-kde4_add_ui_files(plasma-mediacenter_SRCS theme.ui backgrounddialog.ui)
-kde4_add_executable(plasma-mediacenter ${plasma-mediacenter_SRCS})
-target_link_libraries(plasma-mediacenter mediacenterlibs ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS} ${QT_LIBRARIES} )
+kde4_add_executable(plasma-mediacenter-new ${plasma-mediacenter_SRCS})
+target_link_libraries(plasma-mediacenter-new mediacenterlibs
+ ${KDE4_KDEUI_LIBS}
+ ${KDE4_PLASMA_LIBS}
+ ${KDE4_KIO_LIBS}
+ ${QT_LIBRARIES}
+ ${QT_QTDECLARATIVE_LIBRARIES}
+ kdeclarative
+)

-install(TARGETS plasma-mediacenter ${INSTALL_TARGETS_DEFAULT_ARGS})
+install(TARGETS plasma-mediacenter-new ${INSTALL_TARGETS_DEFAULT_ARGS})
+install(DIRECTORY package/ DESTINATION ${DATA_INSTALL_DIR}/plasma/packages/org.kde.plasma.mediacenter)
+install(FILES plasma-mediacenter.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
diff --git a/shells/newshell/backgrounddialog.ui b/shells/newshell/backgrounddialog.ui
deleted file mode 100644
index b71ba60..0000000
--- a/shells/newshell/backgrounddialog.ui
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>BackgroundDialog</class>
- <widget class="QWidget" name="BackgroundDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>352</width>
- <height>324</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <property name="spacing">
- <number>0</number>
- </property>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Minimum</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>25</width>
- <height>18</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="KUrlRequester" name="fileRequester">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="clickMessage">
- <string>Type a path or a URL here</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Minimum</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>KUrlRequester</class>
- <extends>QFrame</extends>
- <header>kurlrequester.h</header>
- <container>1</container>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/shells/newshell/main.cpp b/shells/newshell/main.cpp
index 37ad8fd..04b181b 100644
--- a/shells/newshell/main.cpp
+++ b/shells/newshell/main.cpp
@@ -49,21 +49,9 @@ int main(int argc, char *argv[])

KCmdLineArgs::init(argc, argv, &aboutData);

- KCmdLineOptions options;
- options.add("f");
- options.add("nofullscreen", ki18n("Starts Plasma Media Center in fullscreen mode (the default)"));
- KCmdLineArgs::addCmdLineOptions(options);
-
KApplication app;

- KConfigGroup cg(KSharedConfig::openConfig("plasmarc"), "Theme-plasma-mediacenter");
- const QString themeName = cg.readEntry("name", "oxygen-mediacenter");
- Plasma::Theme::defaultTheme()->setUseGlobalSettings(false);
- Plasma::Theme::defaultTheme()->setThemeName(themeName);
-
MainWindow *mw = new MainWindow;
mw->show();
- mw->loadMediaCenter();
return app.exec();
-
}
diff --git a/shells/newshell/mainwindow.cpp b/shells/newshell/mainwindow.cpp
index a60c69f..a25144f 100644
--- a/shells/newshell/mainwindow.cpp
+++ b/shells/newshell/mainwindow.cpp
@@ -19,252 +19,28 @@

#include "mainwindow.h"

-#include <mediacenter/gesturerecognizer.h>
-#include <mediacenter/browser.h>
+#include <Plasma/Package>

-#include <QGraphicsView>
-#include <QKeyEvent>
-#include <QWheelEvent>
-#include <QGLWidget>
+#include <QtDeclarative/QDeclarativeView>
+#include <QDebug>

-#include <KAction>
-#include <KCmdLineArgs>
-#include <KConfigDialog>
-#include <KConfigSkeleton>
-#include <KDebug>
-#include <KIcon>
-#include <KLocale>
-#include <KMenu>
-#include <KMenuBar>
-#include <KPluginInfo>
-#include <KSharedConfig>
-#include <KSharedPtr>
-#include <KStandardAction>
-
-#include <Plasma/Corona>
-#include <Plasma/Containment>
-#include <Plasma/Theme>
-#include <Plasma/Applet>
-#include <Plasma/Wallpaper>
-
-MainWindow::MainWindow(QWidget *parent) : KMainWindow(parent),
-m_view(new QGraphicsView(this)),
-m_containment(0),
-m_cfskeleton(new KConfigSkeleton),
-m_browser(0),
-// m_controller(0),
-m_playlist(0),
-m_player(0),
-m_infobar(0),
-m_welcome(0),
-m_recognizer(0)
+MainWindow::MainWindow(QWidget *parent) : KMainWindow(parent)
{
- setCentralWidget(m_view);
-
- QGLWidget *glWidget = new QGLWidget;
- glWidget->setAutoFillBackground(false);
- m_view->setViewport(glWidget);
- m_view->setAlignment(Qt::AlignLeft | Qt::AlignTop);
-
- m_corona = new Plasma::Corona(this);
- m_view->setScene(m_corona);
-
- m_view->installEventFilter(this);
- installEventFilter(this);
-
- m_view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- m_view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- m_view->setFrameShadow(QFrame::Plain);
- m_view->setFrameShape(QFrame::NoFrame);
-
- KAction *fullScreen = new KAction(i18n("Go fullscreen"), this);
- fullScreen->setShortcut(Qt::CTRL + Qt::Key_F);
- fullScreen->setIcon(KIcon("view-fullscreen"));
- connect (fullScreen, SIGNAL(triggered()), this, SLOT(toggleFullScreen()));
+ resize(1024, 768);
+ QDeclarativeView *view = new QDeclarativeView(this);
+ view->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ setCentralWidget(view);

- KAction *preferences = KStandardAction::preferences(this, SLOT(createConfigurationInterface()), this);
+ m_kdeclarative.setDeclarativeEngine(view->engine());
+ m_kdeclarative.initialize();
+ m_kdeclarative.setupBindings();

- QMenu *menu = menuBar()->addMenu(i18n("Settings"));
- menu->addAction(fullScreen);
- menu->addSeparator();
- menu->addAction(preferences);
-
- menuBar()->addMenu(helpMenu());
-
- resize(1024, 600); //netbook size
- //showFullScreen();
-
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- if (args->isSet("fullscreen")) {
- toggleFullScreen();
- }
- args->clear();
-
- m_recognizer = new MediaCenter::GestureRecognizer;
+ m_structure = Plasma::PackageStructure::load("Plasma/Generic");
+ Plasma::Package *package = new Plasma::Package(QString(), "org.kde.plasma.mediacenter", m_structure);
+ view->setSource(QUrl(package->filePath("mainscript")));
}

MainWindow::~MainWindow()
{
- QGestureRecognizer::unregisterRecognizer(m_gestureType);
-}
-
-void MainWindow::loadMediaCenter()
-{
-
- m_gestureType = QGestureRecognizer::registerRecognizer(m_recognizer);
-
- m_containment = m_corona->addContainment("org.kde.mediacontainment");
- if (!m_containment) {
- kDebug() << "unable to load mediacontaiment";
- return;
- }
-
- m_containment->resize(m_view->size());
-
- m_view->setSceneRect(m_containment->geometry());
-
- m_browser = m_containment->addApplet("org.kde.mediabrowser");
- //m_playlist = m_containment->addApplet("playlist");
- m_player = m_containment->addApplet("org.kde.mediaplayer");
- m_infobar = m_containment->addApplet("org.kde.mediainfobar");
- m_welcome = m_containment->addApplet("org.kde.mediawelcome");
- //m_controller = m_containment->addApplet("org.kde.mediacontroller"); //Keep the controller last
-
- if (m_browser) {
- MediaCenter::Browser *browser = qobject_cast<MediaCenter::Browser *>(m_browser);
- if (browser) {
- browser->setGestureType(m_gestureType);
- } else {
- kWarning() << "expecting MedicaCenter::Browser for the browser, but didn't get one!";
- }
-
- m_browser->grabGesture(m_gestureType);
- }
-}
-
-bool MainWindow::eventFilter(QObject *o, QEvent *e)
-{
- Q_UNUSED(o);
-
- if (e->type() == QEvent::KeyPress) {
- QKeyEvent *key = static_cast<QKeyEvent*>(e);
- if (key->key() == Qt::Key_Escape && windowState() & Qt::WindowFullScreen) {
- toggleFullScreen();
- }
- }
-
- return false;
-}
-
-void MainWindow::toggleFullScreen()
-{
- if (windowState() & Qt::WindowFullScreen) {
- setWindowState(windowState() & ~Qt::WindowFullScreen);
- menuBar()->show();
- } else {
- setWindowState(windowState() | Qt::WindowFullScreen);
- menuBar()->hide();
- }
-}
-
-void MainWindow::createConfigurationInterface()
-{
- KConfigDialog *dialog = new KConfigDialog(this, "Settings", m_cfskeleton);
- dialog->setAttribute(Qt::WA_DeleteOnClose);
- dialog->setCaption(i18n("Preferences"));
-
- //The settings
- QWidget *theme = new QWidget;
- m_theme.setupUi(theme);
- KPluginInfo::List themes = Plasma::Theme::listThemeInfo();
- foreach (const KPluginInfo &info, themes) {
- m_theme.themeComboBox->addItem(info.name(), info.pluginName());
- }
-
- kDebug() << Plasma::Theme::defaultTheme()->themeName();
- for (int i = 0; i < m_theme.themeComboBox->count(); i++) {
- if (m_theme.themeComboBox->itemData(i).toString() == Plasma::Theme::defaultTheme()->themeName()) {
- m_theme.themeComboBox->setCurrentIndex(i);
- break;
- }
- }
- //Background Settings
- QWidget *background = new QWidget;
- m_background.setupUi(background);
-
-
-
- KPageWidgetItem *themeItem = dialog->addPage(theme, i18n("Theme settings"));
- themeItem->setIcon(KIcon("preferences-desktop-theme"));
- KPageWidgetItem *backgroundItem = dialog->addPage(background, i18n("Background settings"));
- backgroundItem->setIcon(KIcon("preferences-desktop-theme"));
-
- if (m_browser) {
- m_browser->createConfigurationInterface(dialog);
- }
-// if (m_controller) {
-// m_controller->createConfigurationInterface(dialog);
-// }
- if (m_playlist) {
- m_playlist->createConfigurationInterface(dialog);
- }
- if (m_player) {
- m_player->createConfigurationInterface(dialog);
- }
- if (m_infobar) {
- m_infobar->createConfigurationInterface(dialog);
- }
- if (m_welcome) {
- m_welcome->createConfigurationInterface(dialog);
- }
-
- connect (dialog, SIGNAL(accepted()), this, SLOT(applyConfig()));
- dialog->exec();
-}
-
-void MainWindow::applyConfig()
-{
- kDebug() << m_theme.themeComboBox->itemData(m_theme.themeComboBox->currentIndex()).toString();
- Plasma::Theme::defaultTheme()->setThemeName(m_theme.themeComboBox->itemData(m_theme.themeComboBox->currentIndex()).toString());
- kWarning() << m_background.fileRequester->url();
- m_wallpaper = m_background.fileRequester->url().toLocalFile();
-
- Plasma::Wallpaper *currentWallpaper = m_containment->wallpaper();
- if (currentWallpaper) {
- KConfigGroup cfg = wallpaperConfig(m_containment, currentWallpaper->pluginName());
- currentWallpaper->save(cfg);
- }
- KConfigGroup cfg = wallpaperConfig(m_containment, "image");
- cfg.writeEntry("wallpaper", m_wallpaper);
- //cfg.writeEntry("wallpapercolor", (color.isEmpty() ? "0,0,0" : color));
- //cfg.writeEntry("wallpaperposition", position);
- cfg.sync();
- m_containment->setWallpaper("image", "SingleImage");
-}
-
-void MainWindow::resizeEvent(QResizeEvent *event)
-{
- Q_UNUSED(event);
-
- if (!m_containment) {
- return;
- }
- m_containment->resize(m_view->size());
- m_view->setSceneRect(m_containment->geometry());
-}
-
-void MainWindow::moveEvent(QMoveEvent *event)
-{
- KMainWindow::moveEvent(event);
-}
-
-KConfigGroup MainWindow::wallpaperConfig(Plasma::Containment * containment, const QString &plugin)
-{
- Q_ASSERT(containment);
-
- //FIXME: we have details about the structure of the containment config duplicated here!
-
- KConfigGroup cfg = containment->config();
- cfg = KConfigGroup(&cfg, "Wallpaper");
- return KConfigGroup(&cfg, plugin);
+
}
diff --git a/shells/newshell/mainwindow.h b/shells/newshell/mainwindow.h
index 36d1b89..dd25d76 100644
--- a/shells/newshell/mainwindow.h
+++ b/shells/newshell/mainwindow.h
@@ -21,26 +21,8 @@

#include <KMainWindow>

-#include "ui_theme.h"
-#include "ui_backgrounddialog.h"
-
-
-class QGraphicsView;
-namespace Plasma {
- class Corona;
- class Containment;
- class Applet;
-}
-
-namespace Phonon {
- class VideoWidget;
-}
-
-namespace MediaCenter {
- class GestureRecognizer;
-}
-
-class KConfigSkeleton;
+#include <Plasma/PackageStructure>
+#include <kdeclarative.h>

class MainWindow : public KMainWindow
{
@@ -49,42 +31,9 @@ public:
MainWindow(QWidget *parent = 0);
~MainWindow();

- bool eventFilter(QObject *o, QEvent *e);
-
- void loadMediaCenter();
-
-public slots:
- void createConfigurationInterface();
-
-protected:
- void resizeEvent(QResizeEvent *event);
- void moveEvent(QMoveEvent *);
-
-protected slots:
- void toggleFullScreen();
- void applyConfig();
-
private:
- KConfigGroup wallpaperConfig(Plasma::Containment * containment, const QString &plugin);
- QGraphicsView *m_view;
- Plasma::Corona *m_corona;
- Plasma::Containment *m_containment;
- KConfigSkeleton *m_cfskeleton;
-
- Plasma::Applet *m_browser;
- Plasma::Applet *m_controller;
- Plasma::Applet *m_playlist;
- Plasma::Applet *m_player;
- Plasma::Applet *m_infobar;
- Plasma::Applet *m_welcome;
-
- MediaCenter::GestureRecognizer *m_recognizer;
- Qt::GestureType m_gestureType;
-
- KUrl m_wallpaper;
-
- Ui::Theme m_theme;
- Ui::BackgroundDialog m_background;
+ Plasma::PackageStructure::Ptr m_structure;
+ KDeclarative m_kdeclarative;
};

#endif // MAINWINDOW_H
diff --git a/shells/newshell/package/contents/ui/mediacenter.qml b/shells/newshell/package/contents/ui/mediacenter.qml
new file mode 100644
index 0000000..0331360
--- /dev/null
+++ b/shells/newshell/package/contents/ui/mediacenter.qml
@@ -0,0 +1,32 @@
+import QtQuick 1.1
+import org.kde.plasma.mediacentercomponents 0.1 as MediaCenterComponents
+
+Rectangle {
+ id: mediaCenterRootItem
+
+ MediaCenterComponents.MediaPlayer {
+ anchors.fill: parent
+ }
+
+ Column {
+ anchors.fill: parent
+
+ MediaCenterComponents.MediaController {
+ id: mediaController
+ height: parent.height*0.1
+ width: parent.width
+ }
+
+ MediaCenterComponents.MediaBrowser {
+ height: parent.height - mediaController.height - mediaInfoBar.height
+ }
+
+ MediaCenterComponents.MediaInfoBar {
+ id: mediaInfoBar
+ height: parent.height * 0.1
+ width: parent.width
+ }
+
+ z: 1
+ }
+}
diff --git a/shells/newshell/package/metadata.desktop b/shells/newshell/package/metadata.desktop
new file mode 100644
index 0000000..0ba8c32
--- /dev/null
+++ b/shells/newshell/package/metadata.desktop
@@ -0,0 +1,17 @@
+[Desktop Entry]
+Name=Plasma Media Center
+Comment=Plasma Media Center
+Encoding=UTF-8
+Type=Service
+Icon=plasma
+X-KDE-ParentApp=
+X-KDE-PluginInfo-Author=Shantanu Tushar
+X-KDE-PluginInfo-Email=shaan7in@gmail.com
+X-KDE-PluginInfo-Name=org.kde.plasma.mediacenter
+X-KDE-PluginInfo-Version=1.0
+X-KDE-PluginInfo-Website=http://plasma.kde.org
+X-KDE-PluginInfo-Category=Multimedia
+X-KDE-PluginInfo-Depends=
+X-KDE-PluginInfo-License=GPL
+X-KDE-PluginInfo-EnabledByDefault=true
+X-Plasma-MainScript=ui/mediacenter.qml
diff --git a/shells/newshell/plasma-mediacenter.desktop b/shells/newshell/plasma-mediacenter.desktop
new file mode 100755
index 0000000..8b8c400
--- /dev/null
+++ b/shells/newshell/plasma-mediacenter.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Plasma Media Center
+GenericName=Plasma Media Center
+Comment=Plasma Media Center
+Exec=plasma-mediacenter -graphicssystem raster %u
+Terminal=false
+Icon=plasma
+Type=Application
+Categories=Multimedia
diff --git a/shells/newshell/theme.ui b/shells/newshell/theme.ui
deleted file mode 100644
index 6fbc78f..0000000
--- a/shells/newshell/theme.ui
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Theme</class>
- <widget class="QWidget" name="Theme">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QFormLayout" name="formLayout">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::ExpandingFieldsGrow</enum>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Theme:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QComboBox" name="themeComboBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>