[kdebase-workspace] add plasma-active patches
Rex Dieter
rdieter at fedoraproject.org
Thu Nov 17 17:25:10 UTC 2011
commit d4760801a2b5a657fb5f441d8a48e298ebacfeeb
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Thu Nov 17 11:25:53 2011 -0600
add plasma-active patches
...space-4.7.3-fix-wetab-power-button-freeze.patch | 140 +++
kde-workspace-4.7.3-wac-html-widgets.patch | 676 ++++++++++++
kdebase-workspace.spec | 21 +-
ksplash-qml.diff | 1101 ++++++++++++++++++++
kwin-check-opengl.diff | 14 +
nepomuksearch-566052f0.diff | 110 ++
6 files changed, 2061 insertions(+), 1 deletions(-)
---
diff --git a/kde-workspace-4.7.3-fix-wetab-power-button-freeze.patch b/kde-workspace-4.7.3-fix-wetab-power-button-freeze.patch
new file mode 100644
index 0000000..41f0c72
--- /dev/null
+++ b/kde-workspace-4.7.3-fix-wetab-power-button-freeze.patch
@@ -0,0 +1,140 @@
+diff -up kde-workspace-4.7.3/ksmserver/shutdown.cpp.fix-wetab-power-button-freeze kde-workspace-4.7.3/ksmserver/shutdown.cpp
+--- kde-workspace-4.7.3/ksmserver/shutdown.cpp.fix-wetab-power-button-freeze 2011-05-20 15:32:07.000000000 -0500
++++ kde-workspace-4.7.3/ksmserver/shutdown.cpp 2011-11-17 11:08:39.785434855 -0600
+@@ -58,15 +58,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE
+ #include <QTimer>
+ #include <QtDBus/QtDBus>
+
+-#include <klocale.h>
+-#include <kglobal.h>
+-#include <kconfig.h>
+-#include <kstandarddirs.h>
+-#include <kapplication.h>
+-#include <ktemporaryfile.h>
+-#include <kconfiggroup.h>
+-#include <knotification.h>
+-#include <kdisplaymanager.h>
++#include <KApplication>
++#include <KConfig>
++#include <KConfigGroup>
++#include <KGlobal>
++#include <KLocale>
++#include <KNotification>
++#include <KStandardDirs>
++#include <KTemporaryFile>
++#include <kworkspace/kdisplaymanager.h>
+ #include "server.h"
+ #include "global.h"
+ #include "client.h"
+@@ -152,9 +152,9 @@ void KSMServer::shutdown( KWorkSpace::Sh
+ dialogActive = true;
+ QString bopt;
+ if ( !logoutConfirmed ) {
++ KApplication::kApplication()->updateUserTimestamp();
+ KSMShutdownFeedback::start(); // make the screen gray
+- logoutConfirmed =
+- KSMShutdownDlg::confirmShutdown( maysd, choose, sdtype, bopt );
++ logoutConfirmed = KSMShutdownDlg::confirmShutdown( maysd, choose, sdtype, bopt );
+ // ###### We can't make the screen remain gray while talking to the apps,
+ // because this prevents interaction ("do you want to save", etc.)
+ // TODO: turn the feedback widget into a list of apps to be closed,
+diff -up kde-workspace-4.7.3/libs/kworkspace/kworkspace.cpp.fix-wetab-power-button-freeze kde-workspace-4.7.3/libs/kworkspace/kworkspace.cpp
+--- kde-workspace-4.7.3/libs/kworkspace/kworkspace.cpp.fix-wetab-power-button-freeze 2011-08-22 08:22:52.000000000 -0500
++++ kde-workspace-4.7.3/libs/kworkspace/kworkspace.cpp 2011-11-17 11:08:39.783434881 -0600
+@@ -174,29 +174,25 @@ static void cleanup_sm()
+ }
+ #endif
+
+-bool requestShutDown(
+- ShutdownConfirm confirm, ShutdownType sdtype, ShutdownMode sdmode )
++void requestShutDown(ShutdownConfirm confirm, ShutdownType sdtype, ShutdownMode sdmode)
+ {
+ #ifdef Q_WS_X11
+- QApplication::syncX();
+- kapp->updateRemoteUserTimestamp( "org.kde.ksmserver" );
+ /* use ksmserver's dcop interface if necessary */
+ if ( confirm == ShutdownConfirmYes ||
+ sdtype != ShutdownTypeDefault ||
+ sdmode != ShutdownModeDefault )
+ {
+ org::kde::KSMServerInterface ksmserver("org.kde.ksmserver", "/KSMServer", QDBusConnection::sessionBus());
+- QDBusReply<void> reply = ksmserver.logout((int)confirm, (int)sdtype, (int)sdmode);
+- return (reply.isValid());
++ ksmserver.logout((int)confirm, (int)sdtype, (int)sdmode);
++ return;
+ }
++
+ if( helper == NULL )
+ {
+ helper = new KRequestShutdownHelper();
+ qAddPostRoutine(cleanup_sm);
+ }
+- return helper->requestShutdown( confirm );
+-#else
+- return false;
++ helper->requestShutdown( confirm );
+ #endif
+ }
+
+diff -up kde-workspace-4.7.3/libs/kworkspace/kworkspace.h.fix-wetab-power-button-freeze kde-workspace-4.7.3/libs/kworkspace/kworkspace.h
+--- kde-workspace-4.7.3/libs/kworkspace/kworkspace.h.fix-wetab-power-button-freeze 2011-08-22 08:22:52.000000000 -0500
++++ kde-workspace-4.7.3/libs/kworkspace/kworkspace.h 2011-11-17 11:08:39.785434855 -0600
+@@ -110,10 +110,8 @@ namespace KWorkSpace
+ * ShutdownConfirm
+ * @param sdtype The action to take after logging out. ShutdownType
+ * @param sdmode If/When the action should be taken. ShutdownMode
+- * @return true on success, false if the session manager could not be
+- * contacted.
+ */
+- KDE_EXPORT bool requestShutDown( ShutdownConfirm confirm = ShutdownConfirmDefault,
++ KDE_EXPORT void requestShutDown( ShutdownConfirm confirm = ShutdownConfirmDefault,
+ ShutdownType sdtype = ShutdownTypeDefault,
+ ShutdownMode sdmode = ShutdownModeDefault );
+
+diff -up kde-workspace-4.7.3/plasma/desktop/applets/kickoff/core/itemhandlers.cpp.fix-wetab-power-button-freeze kde-workspace-4.7.3/plasma/desktop/applets/kickoff/core/itemhandlers.cpp
+--- kde-workspace-4.7.3/plasma/desktop/applets/kickoff/core/itemhandlers.cpp.fix-wetab-power-button-freeze 2011-11-17 11:08:39.000000000 -0600
++++ kde-workspace-4.7.3/plasma/desktop/applets/kickoff/core/itemhandlers.cpp 2011-11-17 11:11:42.109155494 -0600
+@@ -165,10 +165,7 @@ void LeaveItemHandler::logout()
+ type = KWorkSpace::ShutdownTypeDefault;
+ }
+
+-//FIXME: the proper fix is to implement the KWorkSpace methods for Windows
+-#ifndef Q_WS_WIN
+ KWorkSpace::requestShutDown(confirm, type);
+-#endif
+ }
+
+ void LeaveItemHandler::lock()
+diff -up kde-workspace-4.7.3/plasma/generic/applets/lock_logout/lockout.cpp.fix-wetab-power-button-freeze kde-workspace-4.7.3/plasma/generic/applets/lock_logout/lockout.cpp
+--- kde-workspace-4.7.3/plasma/generic/applets/lock_logout/lockout.cpp.fix-wetab-power-button-freeze 2011-05-20 15:32:08.000000000 -0500
++++ kde-workspace-4.7.3/plasma/generic/applets/lock_logout/lockout.cpp 2011-11-17 11:08:39.786434842 -0600
+@@ -274,11 +274,7 @@ void LockOut::clickLogout()
+ }
+
+ kDebug()<<"LockOut:: logout clicked ";
+-#ifndef Q_OS_WIN
+- KWorkSpace::requestShutDown( KWorkSpace::ShutdownConfirmDefault,
+- KWorkSpace::ShutdownTypeDefault,
+- KWorkSpace::ShutdownModeDefault);
+-#endif
++ KWorkSpace::requestShutDown();
+ }
+
+ void LockOut::clickSwitchUser()
+diff -up kde-workspace-4.7.3/plasma/generic/containmentactions/contextmenu/menu.cpp.fix-wetab-power-button-freeze kde-workspace-4.7.3/plasma/generic/containmentactions/contextmenu/menu.cpp
+--- kde-workspace-4.7.3/plasma/generic/containmentactions/contextmenu/menu.cpp.fix-wetab-power-button-freeze 2011-11-17 11:08:39.706435844 -0600
++++ kde-workspace-4.7.3/plasma/generic/containmentactions/contextmenu/menu.cpp 2011-11-17 11:08:39.787434830 -0600
+@@ -255,11 +255,8 @@ void ContextMenu::logout()
+ if (!KAuthorized::authorizeKAction("logout")) {
+ return;
+ }
+-#ifndef Q_WS_WIN
+- KWorkSpace::requestShutDown(KWorkSpace::ShutdownConfirmDefault,
+- KWorkSpace::ShutdownTypeDefault,
+- KWorkSpace::ShutdownModeDefault);
+-#endif
++
++ KWorkSpace::requestShutDown();
+ }
+
+ QWidget* ContextMenu::createConfigurationInterface(QWidget* parent)
diff --git a/kde-workspace-4.7.3-wac-html-widgets.patch b/kde-workspace-4.7.3-wac-html-widgets.patch
new file mode 100644
index 0000000..c11aeae
--- /dev/null
+++ b/kde-workspace-4.7.3-wac-html-widgets.patch
@@ -0,0 +1,676 @@
+diff -up kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/CMakeLists.txt.wac-html-widgets kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/CMakeLists.txt
+--- kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/CMakeLists.txt.wac-html-widgets 2011-05-20 15:32:08.000000000 -0500
++++ kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/CMakeLists.txt 2011-11-17 11:19:35.183241256 -0600
+@@ -26,8 +26,22 @@ kde4_add_plugin(plasma_packagestructure_
+ target_link_libraries(plasma_packagestructure_dashboard ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS} ${QT_QTWEBKIT_LIBRARY} )
+ install(TARGETS plasma_packagestructure_dashboard DESTINATION ${PLUGIN_INSTALL_DIR})
+
++set(wacapplet_SRCS
++ webpage.cpp webapplet.cpp wacapplet.cpp wacpackage.cpp)
++kde4_add_plugin(plasma_appletscriptengine_wac ${wacapplet_SRCS})
++target_link_libraries(plasma_appletscriptengine_wac ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS} ${QT_QTWEBKIT_LIBRARY} )
++install(TARGETS plasma_appletscriptengine_wac DESTINATION ${PLUGIN_INSTALL_DIR})
++
++set(wacpackage_SRCS
++ wacpackage.cpp wac_plugin.cpp)
++kde4_add_plugin(plasma_packagestructure_wac ${wacpackage_SRCS})
++target_link_libraries(plasma_packagestructure_wac ${KDE4_PLASMA_LIBS} ${KDE4_KIO_LIBS} ${QT_QTWEBKIT_LIBRARY} )
++install(TARGETS plasma_packagestructure_wac DESTINATION ${PLUGIN_INSTALL_DIR})
++
+ install(FILES plasma-scriptengine-applet-web.desktop
+ plasma-scriptengine-applet-dashboard.desktop
++ plasma-scriptengine-applet-wac.desktop
+ plasma-packagestructure-dashboard.desktop
+ plasma-packagestructure-web.desktop
++ plasma-packagestructure-wac.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR})
+diff -up kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/plasma-packagestructure-wac.desktop.wac-html-widgets kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/plasma-packagestructure-wac.desktop
+--- kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/plasma-packagestructure-wac.desktop.wac-html-widgets 2011-11-17 11:19:35.183241256 -0600
++++ kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/plasma-packagestructure-wac.desktop 2011-11-17 11:19:35.183241256 -0600
+@@ -0,0 +1,18 @@
++[Desktop Entry]
++Name=Wac web Widgets
++Comment=Wac HTML widget
++Type=Service
++ServiceTypes=Plasma/PackageStructure
++
++X-KDE-Library=plasma_packagestructure_wac
++X-KDE-PluginInfo-Author=Marco Martin
++X-KDE-PluginInfo-Email=mart at kde.org
++X-KDE-PluginInfo-Name=wac
++X-KDE-PluginInfo-Version=pre0.1
++X-KDE-PluginInfo-Website=http://plasma.kde.org/
++X-KDE-PluginInfo-Category=Applet
++X-KDE-PluginInfo-Depends=
++X-KDE-PluginInfo-License=BSD
++X-KDE-PluginInfo-EnabledByDefault=true
++X-Plasma-PackageFileFilter=*
++X-Plasma-PackageFileMimetypes=application/zip
+diff -up kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/plasma-scriptengine-applet-wac.desktop.wac-html-widgets kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/plasma-scriptengine-applet-wac.desktop
+--- kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/plasma-scriptengine-applet-wac.desktop.wac-html-widgets 2011-11-17 11:19:35.183241256 -0600
++++ kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/plasma-scriptengine-applet-wac.desktop 2011-11-17 11:19:35.183241256 -0600
+@@ -0,0 +1,20 @@
++[Desktop Entry]
++Name=Wac web widget
++Comment=Support for the Wac HTML5 widgets
++Type=Service
++ServiceTypes=Plasma/ScriptEngine
++Icon=internet-web-browser
++
++X-KDE-Library=plasma_appletscriptengine_wac
++X-KDE-PluginInfo-Author=Marco Martin
++X-KDE-PluginInfo-Email=mart at kde.org
++X-KDE-PluginInfo-Name=wac
++X-KDE-PluginInfo-Version=pre0.1
++X-KDE-PluginInfo-Website=http://plasma.kde.org/
++X-KDE-PluginInfo-Category=Applet
++X-KDE-PluginInfo-Depends=
++X-KDE-PluginInfo-License=BSD
++X-KDE-PluginInfo-EnabledByDefault=true
++X-Plasma-API=wac
++X-Plasma-ComponentTypes=Applet
++X-Plasma-PackageFormat=wac
+diff -up kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacapplet.cpp.wac-html-widgets kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacapplet.cpp
+--- kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacapplet.cpp.wac-html-widgets 2011-11-17 11:19:35.184241243 -0600
++++ kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacapplet.cpp 2011-11-17 11:19:35.184241243 -0600
+@@ -0,0 +1,72 @@
++/*
++Copyright (c) 2007 Zack Rusin <zack at kde.org>
++Copyright (c) 2008 Beat Wolf <asraniel at fryx.ch>
++Copyright (C) 2011 Marco Martin <mart at kde.org>
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++THE SOFTWARE.
++ */
++#include "wacapplet.h"
++
++#include <QWebFrame>
++#include <QFile>
++#include <QByteArray>
++
++#include <KGlobal>
++#include <KStandardDirs>
++
++#include <Plasma/WebView>
++#include <Plasma/Applet>
++#include <Plasma/Package>
++
++#include "dashboardjs.h"
++
++WacApplet::WacApplet(QObject *parent, const QVariantList &args)
++ : WebApplet(parent, args)
++{
++}
++
++WacApplet::~WacApplet()
++{
++}
++
++bool WacApplet::init()
++{
++ //applet()->setAspectRatioMode(Plasma::FixedSize);
++ return WebApplet::init();
++ applet()->setBackgroundHints(Plasma::Applet::StandardBackground);
++}
++
++void WacApplet::loadFinished(bool success)
++{
++ WebApplet::loadFinished(success);
++ if (success) {
++ view()->resize(view()->mainFrame()->contentsSize());
++ applet()->resize(view()->mainFrame()->contentsSize());
++ }
++}
++
++void WacApplet::constraintsEvent(Plasma::Constraints constraints)
++{
++ if (constraints & Plasma::FormFactorConstraint) {
++ // applet()->setBackgroundHints(Plasma::Applet::NoBackground);
++ }
++}
++
++
++#include "wacapplet.moc"
+diff -up kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacapplet.h.wac-html-widgets kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacapplet.h
+--- kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacapplet.h.wac-html-widgets 2011-11-17 11:19:35.184241243 -0600
++++ kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacapplet.h 2011-11-17 11:19:35.184241243 -0600
+@@ -0,0 +1,51 @@
++/*
++Copyright (c) 2007 Zack Rusin <zack at kde.org>
++Copyright (C) 2011 Marco Martin <mart at kde.org>
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++THE SOFTWARE.
++ */
++#ifndef WACAPPLET_H
++#define WACAPPLET_H
++
++#include "webapplet.h"
++#include "bundle.h"
++
++#include "dashboardjs.h"
++
++#include <Plasma/DataEngine>
++
++#include <QtGui/QWidget>
++
++class WacApplet : public WebApplet
++{
++ Q_OBJECT
++public:
++ WacApplet(QObject *parent, const QVariantList &args);
++ ~WacApplet();
++
++ bool init();
++
++protected Q_SLOTS:
++ virtual void loadFinished(bool success);
++ virtual void constraintsEvent(Plasma::Constraints constraints);
++};
++
++K_EXPORT_PLASMA_APPLETSCRIPTENGINE(wac, WacApplet)
++
++#endif
+diff -up kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacpackage.cpp.wac-html-widgets kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacpackage.cpp
+--- kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacpackage.cpp.wac-html-widgets 2011-11-17 11:19:35.185241230 -0600
++++ kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacpackage.cpp 2011-11-17 11:19:35.184241243 -0600
+@@ -0,0 +1,331 @@
++/*
++Copyright (c) 2007 Zack Rusin <zack at kde.org>
++Copyright (C) 2011 Marco Martin <mart at kde.org>
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++THE SOFTWARE.
++ */
++
++#include "wacpackage.h"
++
++#include <QBuffer>
++#include <QDebug>
++#include <QDir>
++#include <QFile>
++#include <QXmlStreamReader>
++
++#include <KDebug>
++
++#include <KIO/CopyJob>
++#include <KIO/Job>
++
++#include <Plasma/PackageMetadata>
++#include <Plasma/Package>
++
++void recursive_print(const KArchiveDirectory *dir, const QString &path)
++{
++ const QStringList l = dir->entries();
++ QStringList::const_iterator it = l.constBegin();
++ for (; it != l.end(); ++it)
++ {
++ const KArchiveEntry* entry = dir->entry((*it));
++ printf("mode=%07o %s %s size: %lld pos: %lld %s%s isdir=%d%s",
++ entry->permissions(),
++ entry->user().toLatin1().constData(),
++ entry->group().toLatin1().constData(),
++ entry->isDirectory() ? 0 : ((KArchiveFile*)entry)->size(),
++ entry->isDirectory() ? 0 : ((KArchiveFile*)entry)->position(),
++ path.toLatin1().constData(),
++ (*it).toLatin1().constData(), entry->isDirectory(),
++ entry->symLinkTarget().isEmpty() ? "" :
++ QString(" symlink: %1").arg(
++ entry->symLinkTarget()).toLatin1().constData());
++
++ //if (!entry->isDirectory()) printf("%d",
++ // ((KArchiveFile*)entry)->size());
++ printf("\n");
++ if (entry->isDirectory())
++ recursive_print((KArchiveDirectory *)entry, path+(*it)+'/');
++ }
++}
++
++
++WacPackage::WacPackage(const QString &path)
++ : PackageStructure(0, "WacWidget"),
++ m_isValid(false),
++ m_width(0), m_height(0)
++{
++ setContentsPrefix(QString());
++ QFile f(path);
++ f.open(QIODevice::ReadOnly);
++ m_data = f.readAll();
++ f.close();
++ initTempDir();
++ open();
++}
++
++WacPackage::WacPackage(const QByteArray &data)
++ : PackageStructure(0, "WacWidget"),
++ m_isValid(false),
++ m_width(0),
++ m_height(0)
++{
++ setContentsPrefix(QString());
++ m_data = data;
++ initTempDir();
++ open();
++}
++
++WacPackage::WacPackage(QObject *parent, QVariantList args)
++ : PackageStructure(parent, "WacWidget"),
++ m_isValid(false),
++ m_tempDir(0),
++ m_width(0),
++ m_height(0)
++{
++ Q_UNUSED(args)
++ setContentsPrefix(QString());
++}
++
++WacPackage::~WacPackage()
++{
++ close();
++}
++
++void WacPackage::setData(const QByteArray &data)
++{
++ m_data = data;
++ close();
++ open();
++}
++
++QByteArray WacPackage::data() const
++{
++ return m_data;
++}
++
++bool WacPackage::open()
++{
++ if (!m_tempDir) {
++ initTempDir();
++ }
++
++ if (m_data.isEmpty()) {
++ return false;
++ }
++
++ QBuffer buffer(&m_data);
++ KZip zip(&buffer);
++ if (!zip.open(QIODevice::ReadOnly)) {
++ qWarning("Couldn't open the bundle!");
++ return false;
++ }
++
++ const KArchiveDirectory *dir = zip.directory();
++
++ m_isValid = extractArchive(dir, QLatin1String(""));
++ qDebug()<<"Dir = "<<dir->name() << m_isValid;
++
++ if (m_isValid) {
++ setPath(m_tempDir->name());
++ }
++
++ zip.close();
++
++ return m_isValid;
++}
++
++bool WacPackage::close()
++{
++ bool ret = m_tempDir;
++ delete m_tempDir;
++ m_tempDir = 0;
++ return ret;
++}
++
++bool WacPackage::extractArchive(const KArchiveDirectory *dir, const QString &path)
++{
++ const QStringList l = dir->entries();
++
++ QStringList::const_iterator it;
++ for (it = l.constBegin(); it != l.constEnd(); ++it) {
++ const KArchiveEntry* entry = dir->entry((*it));
++ QString fullPath = QString("%1/%2").arg(path).arg(*it);
++ if (entry->isDirectory()) {
++ QString outDir = QString("%1%2").arg(m_tempDir->name()).arg(path);
++ QDir qdir(outDir);
++ qdir.mkdir(*it);
++ extractArchive(static_cast<const KArchiveDirectory*>(entry), fullPath);
++ } else if (entry->isFile()) {
++ QString outName = QString("%1%2").arg(m_tempDir->name()).arg(fullPath.remove(0, 1));
++ //qDebug()<<"-------- "<<outName;
++ QFile f(outName);
++ if (!f.open(QIODevice::WriteOnly)) {
++ qWarning("Couldn't create %s", qPrintable(outName));
++ continue;
++ }
++ const KArchiveFile *archiveFile = static_cast<const KArchiveFile*>(entry);
++ f.write(archiveFile->data());
++ f.close();
++ } else {
++ qWarning("Unidentified entry at %s", qPrintable(fullPath));
++ }
++ }
++ return true;
++}
++
++void WacPackage::pathChanged()
++{
++ //qDebug() << "path changed";
++ m_isValid = extractInfo();
++}
++
++bool WacPackage::extractInfo()
++{
++ QString configXml = QString("%1config.xml").arg(path());
++ if (QFile::exists(configXml)) {
++ return parseConfigXml(configXml);
++ }
++
++ return false;
++}
++
++bool WacPackage::installPackage(const QString &archivePath, const QString &packageRoot)
++{
++ //kDebug() << "??????????????" << archivePath << packageRoot;
++ QFile f(archivePath);
++ f.open(QIODevice::ReadOnly);
++ m_data = f.readAll();
++ f.close();
++ open();
++
++ if (m_isValid) {
++ m_tempDir->setAutoRemove(false);
++ QString pluginName = "wac_" + m_name;
++ //kDebug() << "valid, so going to move it in to" << pluginName;
++ KIO::CopyJob* job = KIO::move(m_tempDir->name(), QString(packageRoot + "/" + pluginName), KIO::HideProgressInfo);
++ m_isValid = job->exec();
++
++ if (m_isValid) {
++ //kDebug() << "still so good ... registering";
++ Plasma::PackageMetadata data;
++ data.setName(m_name);
++ data.setDescription(m_description);
++ data.setPluginName(pluginName);
++ data.setImplementationApi("wac");
++ Plasma::Package::registerPackage(data, m_iconLocation);
++ }
++ }
++
++ if (!m_isValid) {
++ // make sure we clean up after ourselves afterwards on failure
++ m_tempDir->setAutoRemove(true);
++ }
++
++ return m_isValid;
++}
++
++bool WacPackage::parseConfigXml(const QString &loc)
++{
++ QFile f(loc);
++ if (!f.open(QIODevice::ReadOnly)) {
++ qWarning("Couldn't open info file: '%s'", qPrintable(loc));
++ return false;
++ }
++
++ QMap<QString, QString> infoMap;
++ QString str = f.readAll();
++ QXmlStreamReader reader(str);
++ while (!reader.atEnd()) {
++ reader.readNext();
++ // do processing
++ if (reader.isStartElement()) {
++ qDebug() << reader.name().toString();
++ if (reader.name() == "icon") {
++ //infoMap.insert("icon", reader.attributes().value("src");
++ kDebug() << path();
++ m_iconLocation = QString("%1%2").arg(path()).arg(reader.attributes().value("src").toString());
++ } else if (reader.name() == "content") {
++ const QString src = reader.attributes().value("src").toString();
++ m_htmlLocation = QString("%1%2").arg(path()).arg(src);
++ addFileDefinition("mainscript", src, i18n("Main Webpage"));
++ } else if (reader.name() == "name") {
++ m_name = reader.attributes().value("short").toString();
++ m_description = reader.readElementText().trimmed();
++ }
++ }
++ }
++
++
++ addDirectoryDefinition("html", "/", i18n("Root HTML directory"));
++
++ qDebug()<<"name = "<<m_name;
++ qDebug()<<"html = "<<m_htmlLocation;
++ qDebug()<<"icon = "<<m_iconLocation;
++
++ return !m_htmlLocation.isEmpty();
++}
++
++void WacPackage::initTempDir()
++{
++ m_tempDir = new KTempDir();
++ //make it explicit
++ m_tempDir->setAutoRemove(true);
++}
++
++QString WacPackage::name() const
++{
++ return m_name;
++}
++
++QString WacPackage::version() const
++{
++ return m_version;
++}
++
++QString WacPackage::description() const
++{
++ return m_description;
++}
++
++int WacPackage::width() const
++{
++ return m_width;
++}
++
++int WacPackage::height() const
++{
++ return m_height;
++}
++
++QString WacPackage::htmlLocation() const
++{
++ return m_htmlLocation;
++}
++
++QString WacPackage::iconLocation() const
++{
++ return m_iconLocation;
++}
++
++bool WacPackage::isValid() const
++{
++ return m_isValid;
++}
++
++
+diff -up kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacpackage.h.wac-html-widgets kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacpackage.h
+--- kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacpackage.h.wac-html-widgets 2011-11-17 11:19:35.185241230 -0600
++++ kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wacpackage.h 2011-11-17 11:19:35.185241230 -0600
+@@ -0,0 +1,85 @@
++/*
++Copyright (c) 2007 Zack Rusin <zack at kde.org>
++Copyright (C) 2011 Marco Martin <mart at kde.org>
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++THE SOFTWARE.
++ */
++#ifndef WACPACKAGE_H
++#define WACPACKAGE_H
++
++#include <KZip>
++#include <KTempDir>
++
++#include <Plasma/PackageStructure>
++
++class KArchiveDirectory;
++
++class WacPackage : public Plasma::PackageStructure
++{
++ Q_OBJECT
++public:
++ WacPackage(const QString &path);
++ WacPackage(const QByteArray &data);
++ WacPackage(QObject *parent, QVariantList args);
++ ~WacPackage();
++
++ bool isValid() const;
++
++ void setData(const QByteArray &fn);
++ QByteArray data() const;
++
++ QString bundleId() const;
++ QString name() const;
++ QString version() const;
++ QString description() const;
++ int width() const;
++ int height() const;
++ QString htmlLocation() const;
++ QString iconLocation() const;
++
++protected:
++ void pathChanged();
++
++private:
++ bool extractArchive(const KArchiveDirectory *dir, const QString &path);
++ bool extractInfo();
++
++ bool parseConfigXml(const QString &loc);
++
++ void initTempDir();
++
++ bool open();
++ bool close();
++ bool installPackage(const QString &archivePath, const QString &packageRoot);
++
++private:
++ QByteArray m_data;
++ bool m_isValid;
++ KTempDir *m_tempDir;
++
++ QString m_name;
++ QString m_version;
++ QString m_description;
++ int m_width;
++ int m_height;
++ QString m_htmlLocation;
++ QString m_iconLocation;
++};
++
++#endif
+diff -up kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wac_plugin.cpp.wac-html-widgets kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wac_plugin.cpp
+--- kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wac_plugin.cpp.wac-html-widgets 2011-11-17 11:19:35.184241243 -0600
++++ kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/wac_plugin.cpp 2011-11-17 11:19:35.184241243 -0600
+@@ -0,0 +1,25 @@
++/*
++Copyright (c) 2007 Zack Rusin <zack at kde.org>
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
++THE SOFTWARE.
++ */
++#include "wacpackage.h"
++
++K_EXPORT_PLASMA_PACKAGESTRUCTURE(wac, WacPackage)
++
+diff -up kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/webapplet.cpp.wac-html-widgets kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/webapplet.cpp
+--- kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/webapplet.cpp.wac-html-widgets 2011-05-20 15:32:08.000000000 -0500
++++ kde-workspace-4.7.3/plasma/generic/scriptengines/webkit/webapplet.cpp 2011-11-17 11:20:33.292514789 -0600
+@@ -28,6 +28,7 @@ THE SOFTWARE.
+ #include <QWebFrame>
+ #include <QWebPage>
+ #include <QFile>
++#include <QGraphicsLinearLayout>
+
+ #include <KDebug>
+
+@@ -53,6 +54,8 @@ public:
+ applet->setAcceptsHoverEvents(true);
+
+ view = new Plasma::WebView(applet);
++ QGraphicsLinearLayout *lay = new QGraphicsLinearLayout(applet);
++ lay->addItem(view);
+ QObject::connect(view, SIGNAL(loadFinished(bool)),
+ q, SLOT(loadFinished(bool)));
+ QObject::connect(view->page(), SIGNAL(frameCreated(QWebFrame *)),
diff --git a/kdebase-workspace.spec b/kdebase-workspace.spec
index 9cf61a3..e9e1b0b 100644
--- a/kdebase-workspace.spec
+++ b/kdebase-workspace.spec
@@ -9,7 +9,7 @@
Summary: KDE Workspace
Name: kdebase-workspace
Version: 4.7.3
-Release: 12%{?dist}
+Release: 13%{?dist}
License: GPLv2
Group: User Interface/Desktops
@@ -86,6 +86,15 @@ Patch101: kde-workspace-4.7.3-kdebug272495.patch
# Crashes When Adding Weather Widgets (Geolocation) [gps_read, Gpsd::run] (kde#277036)
Patch102: kde-workspace-4.7.3-kdebug277036.patch
+## plasma active patches
+# adapted version of fix-wetab-power-button-freeze.patch
+Patch150: kde-workspace-4.7.3-fix-wetab-power-button-freeze.patch
+Patch151: nepomuksearch-566052f0.diff
+Patch152: ksplash-qml.diff
+# adapted version of wac-html-widgets.patch
+Patch153: kde-workspace-4.7.3-wac-html-widgets.patch
+Patch154: kwin-check-opengl.diff
+
## Fedora specific patches
## HAL-ectomy
Patch200: kdebase-workspace-4.5.85-no_HAL.patch
@@ -384,6 +393,13 @@ Requires: akonadi
%patch101 -p1 -b .kdebug272495
%patch102 -p1 -b .kdebug277036
+# plasma-active
+%patch150 -p1 -b .fix-wetab-power-button-freeze
+%patch151 -p1 -b .nepomuksearch-566052f0
+%patch152 -p1 -b .ksplash-qml
+%patch153 -p1 -b .wac-html-widgets
+%patch154 -p1 -b .kwin-check-opengl
+
# Fedora patches
%patch200 -p0 -b .no_HAL
%patch210 -p1 -b .no_HAL2
@@ -853,6 +869,9 @@ fi
%changelog
+* Thu Nov 17 2011 Rex Dieter <rdieter at fedoraproject.org> 4.7.3-13
+- add plasma-active patches
+
* Thu Nov 17 2011 Rex Dieter <rdieter at fedoraproject.org> 4.7.3-12
- Crash in TaskManager::TaskItem::task (kde#272495)
- Crashes When Adding Weather Widgets (Geolocation) (kde#277036)
diff --git a/ksplash-qml.diff b/ksplash-qml.diff
new file mode 100644
index 0000000..1458de8
--- /dev/null
+++ b/ksplash-qml.diff
@@ -0,0 +1,1101 @@
+diff --git a/ksplash/CMakeLists.txt b/ksplash/CMakeLists.txt
+index 765a90c..0d0934b 100644
+--- a/ksplash/CMakeLists.txt
++++ b/ksplash/CMakeLists.txt
+@@ -2,3 +2,4 @@ add_subdirectory( ksplashx )
+ add_subdirectory( simple )
+ add_subdirectory( none )
+ add_subdirectory( kcm )
++add_subdirectory( ksplashqml )
+diff --git a/ksplash/kcm/installer.cpp b/ksplash/kcm/installer.cpp
+index cada800..db2450b 100644
+--- a/ksplash/kcm/installer.cpp
++++ b/ksplash/kcm/installer.cpp
+@@ -184,7 +184,7 @@ SplashInstaller::~SplashInstaller()
+
+ int SplashInstaller::addTheme(const QString &path, const QString &name)
+ {
+- //kDebug() << "SplashInstaller::addTheme: " << path << " " << name;
++ qDebug() << "SplashInstaller::addTheme: " << path << " " << name;
+ QString tmp(i18n( name.toUtf8() ));
+ int i = mThemesList->count();
+ while((i > 0) && (mThemesList->item(i-1)->text() > tmp))
+@@ -434,7 +434,11 @@ void SplashInstaller::slotSetTheme(int id)
+ infoTxt += "</qt>";
+
+ QString pluginName( cnf.readEntry( "Engine", "KSplashX" ).trimmed() );
+- if( pluginName == "Simple" || pluginName == "None" || pluginName == "KSplashX" )
++ if( pluginName == "Simple"
++ || pluginName == "None"
++ || pluginName == "KSplashX"
++ || pluginName == "KSplashQML"
++ )
+ enabled = true; // these are not plugins
+ else if ((KServiceTypeTrader::self()->query("KSplash/Plugin", QString("[X-KSplash-PluginName] == '%1'").arg(pluginName))).isEmpty())
+ {
+@@ -536,6 +540,7 @@ void SplashInstaller::slotTest()
+ themeName = themeName.mid(r+1);
+
+ // special handling for none and simple splashscreens
++ qDebug() << "the engine is " << mEngineOfSelected << "for" << themeName;
+ if( mEngineOfSelected == "None" )
+ return;
+ else if( mEngineOfSelected == "Simple" )
+@@ -554,6 +559,14 @@ void SplashInstaller::slotTest()
+ KMessageBox::error(this,i18n("Failed to successfully test the splash screen."));
+ return;
+ }
++ else if( mEngineOfSelected == "KSplashQML" )
++ {
++ KProcess proc;
++ proc << "ksplashqml" << themeName << "--test";
++ if (proc.execute())
++ KMessageBox::error(this,i18n("Failed to successfully test the splash screen."));
++ return;
++ }
+ else // KSplashML engines
+ {
+ KProcess proc;
+diff --git a/ksplash/ksplashqml/CMakeLists.txt b/ksplash/ksplashqml/CMakeLists.txt
+new file mode 100644
+index 0000000..a9a3866
+--- /dev/null
++++ b/ksplash/ksplashqml/CMakeLists.txt
+@@ -0,0 +1,17 @@
++project(ksplashqml)
++
++set(ksplashqml_SRCS
++ main.cpp
++ SplashApp.cpp
++ SplashWindow.cpp
++ )
++
++add_executable(ksplashqml ${ksplashqml_SRCS})
++
++target_link_libraries(ksplashqml
++ ${X11_LIBRARIES}
++ ${QT_QTDECLARATIVE_LIBRARY}
++ ${QT_QTUI_LIBRARY}
++ )
++
++install(TARGETS ksplashqml ${INSTALL_TARGETS_DEFAULT_ARGS})
+diff --git a/ksplash/ksplashqml/SplashApp.cpp b/ksplash/ksplashqml/SplashApp.cpp
+new file mode 100644
+index 0000000..84a36ab
+--- /dev/null
++++ b/ksplash/ksplashqml/SplashApp.cpp
+@@ -0,0 +1,116 @@
++/*
++ * Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2,
++ * or (at your option) any later version, as published by the Free
++ * Software Foundation
++ *
++ * This program 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 General Public License for more details
++ *
++ * You should have received a copy of the GNU General Public
++ * License along with this program; if not, write to the
++ * Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#include "SplashWindow.h"
++#include "SplashApp.h"
++
++#define TEST_STEP_INTERVAL 2000
++
++SplashApp::SplashApp(Display * display, int argc, char ** argv)
++ : QApplication(display, argc, argv),
++ m_display(display), m_stage(0), m_window(0),
++ m_testing(false)
++{
++ m_kde_splash_progress = XInternAtom(m_display, "_KDE_SPLASH_PROGRESS", False);
++ m_testing = arguments().contains("--test");
++ m_window = new SplashWindow(m_testing);
++
++ setStage(1);
++
++ int sw = WidthOfScreen(ScreenOfDisplay(display, DefaultScreen(display)));
++ int sh = HeightOfScreen(ScreenOfDisplay(display, DefaultScreen(display)));
++
++ m_window->setGeometry(0, 0, sw, sh);
++ m_window->show();
++
++ XSelectInput(display, DefaultRootWindow(display), SubstructureNotifyMask);
++
++ if (m_testing) {
++ m_timer.start(TEST_STEP_INTERVAL, this);
++ }
++}
++
++SplashApp::~SplashApp() {
++ delete m_window;
++}
++
++Display * SplashApp::display() const
++{
++ return m_display;
++}
++
++void SplashApp::timerEvent(QTimerEvent * event)
++{
++ if (event->timerId() == m_timer.timerId()) {
++ m_timer.stop();
++
++ setStage(m_stage + 1);
++
++ m_timer.start(TEST_STEP_INTERVAL, this);
++ }
++}
++
++bool SplashApp::x11EventFilter(XEvent * xe)
++{
++ char * message;
++ switch (xe->type) {
++ case ClientMessage:
++ if (xe->xclient.message_type == m_kde_splash_progress) {
++ message = xe->xclient.data.b;
++
++ int stage = -1;
++
++ if (strcmp(message, "initial") == 0 && m_stage < 0)
++ stage = 0; // not actually used
++ else if (strcmp(message, "kded") == 0 && m_stage < 1)
++ stage = 1;
++ else if (strcmp(message, "confupdate") == 0 && m_stage < 2)
++ stage = 2;
++ else if (strcmp(message, "kcminit") == 0 && m_stage < 3)
++ stage = 3;
++ else if (strcmp(message, "ksmserver") == 0 && m_stage < 4)
++ stage = 4;
++ else if (strcmp(message, "wm") == 0 && m_stage < 5)
++ stage = 5;
++ else if (strcmp(message, "desktop") == 0 && m_stage < 6)
++ stage = 6;
++
++ setStage(stage);
++ }
++ }
++ return false;
++
++}
++
++int SplashApp::x11ProcessEvent(XEvent * xe)
++{
++ Q_UNUSED(xe)
++ return 0;
++}
++
++void SplashApp::setStage(int stage)
++{
++ if (m_stage == 6) {
++ QApplication::exit(EXIT_SUCCESS);
++ }
++
++ m_stage = stage;
++ m_window->setStage(stage);
++}
++
+diff --git a/ksplash/ksplashqml/SplashApp.h b/ksplash/ksplashqml/SplashApp.h
+new file mode 100644
+index 0000000..bc3fbdf
+--- /dev/null
++++ b/ksplash/ksplashqml/SplashApp.h
+@@ -0,0 +1,55 @@
++/*
++ * Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2,
++ * or (at your option) any later version, as published by the Free
++ * Software Foundation
++ *
++ * This program 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 General Public License for more details
++ *
++ * You should have received a copy of the GNU General Public
++ * License along with this program; if not, write to the
++ * Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#ifndef SPLASH_APP_H_
++#define SPLASH_APP_H_
++
++#include <QObject>
++#include <QApplication>
++#include <QBasicTimer>
++
++#include <X11/Xlib.h>
++
++class SplashWindow;
++
++class SplashApp: public QApplication {
++
++public:
++ SplashApp(Display * display, int argc, char ** argv);
++ ~SplashApp();
++
++ Display * display() const;
++
++ bool x11EventFilter(XEvent * xe);
++ int x11ProcessEvent(XEvent * xe);
++
++protected:
++ void timerEvent(QTimerEvent * event);
++ void setStage(int stage);
++
++private:
++ Display * m_display;
++ int m_stage;
++ Atom m_kde_splash_progress;
++ SplashWindow * m_window;
++ bool m_testing;
++ QBasicTimer m_timer;
++};
++
++#endif // SPLASH_APP_H_
+diff --git a/ksplash/ksplashqml/SplashWindow.cpp b/ksplash/ksplashqml/SplashWindow.cpp
+new file mode 100644
+index 0000000..94e6ded
+--- /dev/null
++++ b/ksplash/ksplashqml/SplashWindow.cpp
+@@ -0,0 +1,83 @@
++/*
++ * Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2,
++ * or (at your option) any later version, as published by the Free
++ * Software Foundation
++ *
++ * This program 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 General Public License for more details
++ *
++ * You should have received a copy of the GNU General Public
++ * License along with this program; if not, write to the
++ * Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#include "SplashWindow.h"
++
++#include <QApplication>
++#include <QDeclarativeContext>
++#include <QGraphicsObject>
++#include <QKeyEvent>
++#include <QMouseEvent>
++#include <QTimer>
++
++#include "SystemInfo.h"
++
++SplashWindow::SplashWindow(bool testing)
++ : QDeclarativeView(),
++ m_stage(0),
++ m_testing(testing)
++{
++ setWindowFlags(
++ Qt::FramelessWindowHint |
++ Qt::WindowStaysOnTopHint
++ );
++
++ if (m_testing) {
++ setWindowState(Qt::WindowFullScreen);
++ } else {
++ setWindowFlags(Qt::X11BypassWindowManagerHint);
++ }
++
++ rootContext()->setContextProperty("screenSize", size());
++ setSource(QUrl(themeDir(QApplication::arguments().at(1)) + "/main.qml"));
++ setStyleSheet("background: #000000; border: none");
++ //be sure it will be eventually closed
++ //FIXME: should never be stuck
++ QTimer::singleShot(120000, this, SLOT(close()));
++}
++
++void SplashWindow::setStage(int stage)
++{
++ m_stage = stage;
++
++ rootObject()->setProperty("stage", stage);
++}
++
++void SplashWindow::resizeEvent(QResizeEvent *event)
++{
++ Q_UNUSED(event)
++ rootContext()->setContextProperty("screenSize", size());
++ centerOn(rootObject());
++}
++
++void SplashWindow::keyPressEvent(QKeyEvent *event)
++{
++ QDeclarativeView::keyPressEvent(event);
++ if (m_testing && !event->isAccepted() && event->key() == Qt::Key_Escape) {
++ close();
++ }
++}
++
++void SplashWindow::mousePressEvent(QMouseEvent *event)
++{
++ QDeclarativeView::mousePressEvent(event);
++ if (m_testing && !event->isAccepted()) {
++ close();
++ }
++}
+diff --git a/ksplash/ksplashqml/SplashWindow.h b/ksplash/ksplashqml/SplashWindow.h
+new file mode 100644
+index 0000000..9680c1e
+--- /dev/null
++++ b/ksplash/ksplashqml/SplashWindow.h
+@@ -0,0 +1,46 @@
++/*
++ * Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2,
++ * or (at your option) any later version, as published by the Free
++ * Software Foundation
++ *
++ * This program 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 General Public License for more details
++ *
++ * You should have received a copy of the GNU General Public
++ * License along with this program; if not, write to the
++ * Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#ifndef SPLASH_WINDOW_H_
++#define SPLASH_WINDOW_H_
++
++#include <QDeclarativeView>
++
++class QResizeEvent;
++class QMouseEvent;
++class QKeyEvent;
++
++class SplashWindow: public QDeclarativeView
++{
++public:
++ SplashWindow(bool testing);
++
++ void setStage(int stage);
++
++protected:
++ virtual void resizeEvent (QResizeEvent *event);
++ virtual void keyPressEvent(QKeyEvent *event);
++ virtual void mousePressEvent(QMouseEvent *event);
++
++private:
++ int m_stage;
++ bool m_testing;
++};
++
++#endif // SPLASH_WINDOW_H_
+diff --git a/ksplash/ksplashqml/SystemInfo.h b/ksplash/ksplashqml/SystemInfo.h
+new file mode 100644
+index 0000000..b2d5fda
+--- /dev/null
++++ b/ksplash/ksplashqml/SystemInfo.h
+@@ -0,0 +1,60 @@
++/*
++ * Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2,
++ * or (at your option) any later version, as published by the Free
++ * Software Foundation
++ *
++ * This program 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 General Public License for more details
++ *
++ * You should have received a copy of the GNU General Public
++ * License along with this program; if not, write to the
++ * Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#ifndef SYSTEM_INFO_H_
++#define SYSTEM_INFO_H_
++
++#include <stdlib.h>
++#include <config-workspace.h>
++
++#include <QDir>
++#include <QString>
++
++QString homeDir()
++{
++ const char * kdehome = getenv("KDEHOME");
++ const char * home = getenv("HOME");
++ if (kdehome && kdehome[0]) {
++ return QString() + home + "/" + KDE_DEFAULT_HOME;
++ }
++
++ return kdehome;
++}
++
++QString systemDir()
++{
++ return KDE_DATADIR;
++}
++
++QString themeDir(QString theme)
++{
++ QString path;
++
++ path = homeDir() + "/share/apps/ksplash/Themes/" + theme;
++
++ if (!QDir(path).exists()) {
++ path = systemDir() + "/ksplash/Themes/" + theme;
++ }
++
++ return path;
++}
++
++#endif // SYSTEM_INFO_H_
++
++
+diff --git a/ksplash/ksplashqml/main.cpp b/ksplash/ksplashqml/main.cpp
+new file mode 100644
+index 0000000..ed409e2
+--- /dev/null
++++ b/ksplash/ksplashqml/main.cpp
+@@ -0,0 +1,66 @@
++/*
++ * Copyright (C) 2011 Ivan Cukic <ivan.cukic(at)kde.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2,
++ * or (at your option) any later version, as published by the Free
++ * Software Foundation
++ *
++ * This program 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 General Public License for more details
++ *
++ * You should have received a copy of the GNU General Public
++ * License along with this program; if not, write to the
++ * Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#include "SplashApp.h"
++
++#include <iostream>
++#include <X11/Xlib.h>
++
++int main(int argc, char **argv)
++{
++ bool test = false;
++ bool printPid = false;
++
++ for (int i = 1; i < argc; i++) {
++ if (strcmp("--test", argv[i]) == 0)
++ test = true;
++ else if (strcmp("--pid", argv[i]) == 0)
++ printPid = true;
++ }
++
++ // lets fork and all that...
++
++ if (!test) {
++ pid_t pid = fork();
++ if (pid < -1) {
++ return -1;
++ }
++
++ if (pid != 0) {
++ // this is the parent process, returning pid of the fork
++ if (printPid) {
++ std::cout << pid << std::endl;
++ }
++
++ return 0;
++ }
++
++ // close stdin,stdout,stderr, otherwise startkde will block
++ close(0);
++ close(1);
++ close(2);
++ }
++
++ Display * display = XOpenDisplay(NULL);
++
++ SplashApp app(display, argc, argv);
++
++ return app.exec();
++}
++
+diff --git a/ksplash/ksplashqml/themes/CMakeLists.txt b/ksplash/ksplashqml/themes/CMakeLists.txt
+new file mode 100644
+index 0000000..818070c
+--- /dev/null
++++ b/ksplash/ksplashqml/themes/CMakeLists.txt
+@@ -0,0 +1,2 @@
++add_subdirectory(qmltest)
++add_subdirectory(qmldefault)
+diff --git a/ksplash/ksplashqml/themes/qmldefault/CMakeLists.txt b/ksplash/ksplashqml/themes/qmldefault/CMakeLists.txt
+new file mode 100644
+index 0000000..6f28f3b
+--- /dev/null
++++ b/ksplash/ksplashqml/themes/qmldefault/CMakeLists.txt
+@@ -0,0 +1,7 @@
++install(FILES Preview.png Theme.rc main.qml DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmldefault)
++
++install(FILES images/kdegear.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmldefault/images)
++install(FILES images/kdeletter.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmldefault/images)
++install(FILES images/kdemask.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmldefault/images)
++install(FILES images/kdelogo.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmldefault/images)
++install(FILES images/kdelogo-contrast.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmldefault/images)
+diff --git a/ksplash/ksplashqml/themes/qmldefault/Preview.png b/ksplash/ksplashqml/themes/qmldefault/Preview.png
+new file mode 100644
+index 0000000..532adf7
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmldefault/Preview.png differ
+diff --git a/ksplash/ksplashqml/themes/qmldefault/Theme.rc b/ksplash/ksplashqml/themes/qmldefault/Theme.rc
+new file mode 100644
+index 0000000..4dc90f8
+--- /dev/null
++++ b/ksplash/ksplashqml/themes/qmldefault/Theme.rc
+@@ -0,0 +1,9 @@
++[KSplash Theme: qmldefault]
++Name = Minimalistic splash screen
++Description = Animated KDE logo on a black background
++Version = 1.0
++Author = Ivan Cukic <ivan.cukic at kde.org>
++Homepage = http://www.kde.org
++
++# Theme behaviour settings.
++Engine = KSplashQML
+diff --git a/ksplash/ksplashqml/themes/qmldefault/images/kdegear.png b/ksplash/ksplashqml/themes/qmldefault/images/kdegear.png
+new file mode 100644
+index 0000000..66a50c2
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmldefault/images/kdegear.png differ
+diff --git a/ksplash/ksplashqml/themes/qmldefault/images/kdeletter.png b/ksplash/ksplashqml/themes/qmldefault/images/kdeletter.png
+new file mode 100644
+index 0000000..cabe17c
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmldefault/images/kdeletter.png differ
+diff --git a/ksplash/ksplashqml/themes/qmldefault/images/kdelogo-contrast.png b/ksplash/ksplashqml/themes/qmldefault/images/kdelogo-contrast.png
+new file mode 100644
+index 0000000..fe60715
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmldefault/images/kdelogo-contrast.png differ
+diff --git a/ksplash/ksplashqml/themes/qmldefault/images/kdelogo.png b/ksplash/ksplashqml/themes/qmldefault/images/kdelogo.png
+new file mode 100644
+index 0000000..d637b37
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmldefault/images/kdelogo.png differ
+diff --git a/ksplash/ksplashqml/themes/qmldefault/images/kdemask.png b/ksplash/ksplashqml/themes/qmldefault/images/kdemask.png
+new file mode 100644
+index 0000000..50319fc
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmldefault/images/kdemask.png differ
+diff --git a/ksplash/ksplashqml/themes/qmldefault/main.qml b/ksplash/ksplashqml/themes/qmldefault/main.qml
+new file mode 100644
+index 0000000..90a5494
+--- /dev/null
++++ b/ksplash/ksplashqml/themes/qmldefault/main.qml
+@@ -0,0 +1,189 @@
++/* vim:set foldenable foldmethod=marker:
++ *
++ * Copyright (C) 2011 Ivan Cukic <ivan.cukic(at)kde.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2,
++ * or (at your option) any later version, as published by the Free
++ * Software Foundation
++ *
++ * This program 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 General Public License for more details
++ *
++ * You should have received a copy of the GNU General Public
++ * License along with this program; if not, write to the
++ * Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++import Qt 4.7
++
++Item {
++ id: main
++
++ width: screenSize.width
++ height: screenSize.height
++ // width: 300
++ // height: 300
++
++ /* property declarations --------------------------{{{ */
++ property int stage
++ property int iconSize: (screenSize.width <= 1024) ? 64 : 128
++ /* }}} */
++
++ /* signal declarations ----------------------------{{{ */
++
++ /* }}} */
++
++ /* JavaScript functions ---------------------------{{{ */
++ onStageChanged: {
++ if (stage == 1) {
++ background.opacity = 1
++ gear.opacity = 0.5
++ }
++ if (stage == 2) {
++ gear.opacity = 1
++ mask.opacity = 1
++ letter.opacity = 1
++ }
++ if (stage == 3) {
++ }
++ if (stage == 4) {
++ }
++ if (stage == 5) {
++ logo.opacity = 1
++ }
++ if (stage == 6) {
++ }
++ }
++ /* }}} */
++
++ /* object properties ------------------------------{{{ */
++
++ /* }}} */
++
++ /* child objects ----------------------------------{{{ */
++
++ Rectangle {
++ color: "black"
++ anchors.fill: parent
++ }
++
++ Rectangle {
++ id: background
++
++ gradient: Gradient {
++ GradientStop { position: 0.0; color: "#55555f" }
++ GradientStop { position: 1.0; color: "#000000" }
++ }
++
++ anchors {
++ top: parent.top
++ left: parent.left
++ right: parent.right
++ }
++
++ height: gear.y - 32
++
++ opacity: 0
++ Behavior on opacity { NumberAnimation { duration: 1000; easing { type: Easing.InOutQuad } } }
++ }
++
++ Image {
++ id: gear
++
++ height: iconSize
++ width: iconSize
++ smooth: true
++
++ x: (parent.width - width) / 2
++ y: (parent.height - height) / 2
++
++ source: "images/kdegear.png"
++
++ opacity: 0
++ Behavior on opacity { NumberAnimation { duration: 1000; easing { type: Easing.InOutQuad } } }
++
++ NumberAnimation {
++ id: animateRotation
++ target: gear
++ properties: "rotation"
++ from: 0
++ to: 360
++ duration: 5000
++
++ loops: Animation.Infinite
++ running: true
++ }
++
++ }
++
++ Image {
++ id: mask
++
++ height: iconSize
++ width: iconSize
++ smooth: true
++
++ x: (parent.width - width) / 2
++ y: (parent.height - height) / 2
++
++ source: "images/kdemask.png"
++
++ opacity: 0
++ Behavior on opacity { NumberAnimation { duration: 1000; easing { type: Easing.InOutQuad } } }
++ }
++
++ Image {
++ id: letter
++
++ height: iconSize
++ width: iconSize
++ smooth: true
++
++ x: (parent.width - width) / 2
++ y: (parent.height - height) / 2
++
++ source: "images/kdeletter.png"
++
++ opacity: 0
++ Behavior on opacity { NumberAnimation { duration: 1000; easing { type: Easing.InOutQuad } } }
++ }
++
++ Image {
++ id: logo
++
++ height: iconSize
++ width: iconSize
++ smooth: true
++
++ x: (parent.width - width) / 2
++ y: (parent.height - height) / 2 - 1
++
++ source: "images/kdelogo-contrast.png"
++
++ opacity: 0
++ Behavior on opacity { NumberAnimation { duration: 1000; easing { type: Easing.InOutQuad } } }
++
++ Text {
++ text: "KDE Workspaces 4.7 'Friday'"
++ color: "white"
++
++ x: logo.width + 8
++ y: (logo.height - height) / 2
++ }
++ }
++
++ /* }}} */
++
++ /* stages -----------------------------------------{{{ */
++
++ /* }}} */
++
++ /* transitions ------------------------------------{{{ */
++
++ /* }}} */
++}
++
+diff --git a/ksplash/ksplashqml/themes/qmltest/CMakeLists.txt b/ksplash/ksplashqml/themes/qmltest/CMakeLists.txt
+new file mode 100644
+index 0000000..9b2e59d
+--- /dev/null
++++ b/ksplash/ksplashqml/themes/qmltest/CMakeLists.txt
+@@ -0,0 +1,9 @@
++install(FILES Preview.png Theme.rc main.qml DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest)
++
++install(FILES images/background.jpg DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
++install(FILES images/configuring.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
++install(FILES images/desktop.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
++install(FILES images/globe.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
++install(FILES images/hardware.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
++install(FILES images/kde.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
++install(FILES images/plasma.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
+diff --git a/ksplash/ksplashqml/themes/qmltest/Preview.png b/ksplash/ksplashqml/themes/qmltest/Preview.png
+new file mode 100644
+index 0000000..398c037
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmltest/Preview.png differ
+diff --git a/ksplash/ksplashqml/themes/qmltest/Theme.rc b/ksplash/ksplashqml/themes/qmltest/Theme.rc
+new file mode 100644
+index 0000000..8088c20
+--- /dev/null
++++ b/ksplash/ksplashqml/themes/qmltest/Theme.rc
+@@ -0,0 +1,9 @@
++[KSplash Theme: QMLtest]
++Name = Default Splash Screen
++Description = Air and Horos Splash Screen
++Version = 1.0
++Author = Nuno Pinheiro <nuno at oxygen-icons.org>, Riccardo Iaconelli <riccardo at kde.org> and Marco Martin <notmart at gmail.com>
++Homepage = http://www.kde.org
++
++# Theme behaviour settings.
++Engine = KSplashQML
+diff --git a/ksplash/ksplashqml/themes/qmltest/images/background.jpg b/ksplash/ksplashqml/themes/qmltest/images/background.jpg
+new file mode 100644
+index 0000000..8d3027c
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmltest/images/background.jpg differ
+diff --git a/ksplash/ksplashqml/themes/qmltest/images/configuring.png b/ksplash/ksplashqml/themes/qmltest/images/configuring.png
+new file mode 100644
+index 0000000..9ea5cec
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmltest/images/configuring.png differ
+diff --git a/ksplash/ksplashqml/themes/qmltest/images/desktop.png b/ksplash/ksplashqml/themes/qmltest/images/desktop.png
+new file mode 100644
+index 0000000..98153f2
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmltest/images/desktop.png differ
+diff --git a/ksplash/ksplashqml/themes/qmltest/images/globe.png b/ksplash/ksplashqml/themes/qmltest/images/globe.png
+new file mode 100644
+index 0000000..193c46f
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmltest/images/globe.png differ
+diff --git a/ksplash/ksplashqml/themes/qmltest/images/hardware.png b/ksplash/ksplashqml/themes/qmltest/images/hardware.png
+new file mode 100644
+index 0000000..68351d1
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmltest/images/hardware.png differ
+diff --git a/ksplash/ksplashqml/themes/qmltest/images/kde.png b/ksplash/ksplashqml/themes/qmltest/images/kde.png
+new file mode 100644
+index 0000000..3efaaf8
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmltest/images/kde.png differ
+diff --git a/ksplash/ksplashqml/themes/qmltest/images/plasma.png b/ksplash/ksplashqml/themes/qmltest/images/plasma.png
+new file mode 100644
+index 0000000..facbd77
+Binary files /dev/null and b/ksplash/ksplashqml/themes/qmltest/images/plasma.png differ
+diff --git a/ksplash/ksplashqml/themes/qmltest/main.qml b/ksplash/ksplashqml/themes/qmltest/main.qml
+new file mode 100644
+index 0000000..e0b8a1b
+--- /dev/null
++++ b/ksplash/ksplashqml/themes/qmltest/main.qml
+@@ -0,0 +1,164 @@
++/* vim:set foldenable foldmethod=marker:
++ *
++ * Copyright (C) 2011 Ivan Cukic <ivan.cukic(at)kde.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2,
++ * or (at your option) any later version, as published by the Free
++ * Software Foundation
++ *
++ * This program 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 General Public License for more details
++ *
++ * You should have received a copy of the GNU General Public
++ * License along with this program; if not, write to the
++ * Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++import Qt 4.7 as QML
++
++QML.Item {
++ id: main
++
++ width: screenSize.width
++ height: screenSize.height
++
++ /* property declarations --------------------------{{{ */
++ property int stage
++ /* }}} */
++
++ /* signal declarations ----------------------------{{{ */
++
++ /* }}} */
++
++ /* JavaScript functions ---------------------------{{{ */
++ onStageChanged: {
++ if (stage == 2) {
++ stage1.x = (main.width - stage1.width) / 2
++ stage1.opacity = 1
++ }
++ if (stage == 3) {
++ stage1.x = - stage1.width
++ stage2.x = (main.width - stage2.width) / 2
++ stage1.opacity = 0
++ stage2.opacity = 1
++ }
++ if (stage == 4) {
++ stage2.x = - stage2.width
++ stage3.x = (main.width - stage3.width) / 2
++ stage2.opacity = 0
++ stage3.opacity = 1
++ }
++ if (stage == 5) {
++ stage3.x = - stage3.width
++ stage4.x = (main.width - stage4.width) / 2
++ stage3.opacity = 0
++ stage4.opacity = 1
++ }
++ if (stage == 6) {
++ stage4.x = - stage4.width
++ stage5.x = (main.width - stage5.width) / 2
++ stage4.opacity = 0
++ stage5.opacity = 1
++ stage5.width = 128
++ stage5.height = 128
++ }
++ }
++ /* }}} */
++
++ /* object properties ------------------------------{{{ */
++
++ /* }}} */
++
++ /* child objects ----------------------------------{{{ */
++ QML.Image {
++ anchors.fill: parent
++
++ source: "images/background.jpg"
++ }
++
++ QML.Rectangle {
++ width: parent.width
++ height: 100
++ x: 0
++ y: (parent.height - height) / 2
++ color: "#ffffff"
++ opacity: 0.2
++ }
++
++ QML.Image {
++ id: stage1
++ x: main.width + width
++ y: (main.height - height) / 2
++ source: "images/hardware.png"
++ QML.Behavior on x { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
++ opacity: 0
++ QML.Behavior on opacity { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
++
++ QML.Image { y: 128; x: parent.x - main.width / 2; height: 128; width: 128; opacity: 0.2 * parent.opacity; source: parent.source }
++ }
++
++ QML.Image {
++ id: stage2
++ x: main.width + width
++ y: (main.height - height) / 2
++ source: "images/configuring.png"
++ QML.Behavior on x { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
++ opacity: 0
++ QML.Behavior on opacity { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
++
++ QML.Image { y: 128; x: parent.x - main.width / 2; height: 128; width: 128; opacity: 0.2 * parent.opacity; source: parent.source }
++ }
++
++ QML.Image {
++ id: stage3
++ x: main.width + width
++ y: (main.height - height) / 2
++ source: "images/globe.png"
++ QML.Behavior on x { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
++ opacity: 0
++ QML.Behavior on opacity { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
++
++ QML.Image { y: 128; x: parent.x - main.width / 2; height: 128; width: 128; opacity: 0.2 * parent.opacity; source: parent.source }
++ }
++
++ QML.Image {
++ id: stage4
++ x: main.width + width
++ y: (main.height - height) / 2
++ source: "images/desktop.png"
++ QML.Behavior on x { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
++ opacity: 0
++ QML.Behavior on opacity { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
++
++ QML.Image { y: 128; x: parent.x - main.width / 2; height: 128; width: 128; opacity: 0.2 * parent.opacity; source: parent.source }
++ }
++
++ QML.Image {
++ id: stage5
++ x: main.width + width
++ y: (main.height - height) / 2
++ source: "images/kde.png"
++ QML.Behavior on x { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
++ QML.Behavior on width { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
++ QML.Behavior on height { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
++ opacity: 0
++ QML.Behavior on opacity { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
++
++ // QML.Image { y: 128; x: parent.x - main.width / 2; height: 128; width: 128; opacity: 0.2 * parent.opacity; source: parent.source }
++ }
++
++ /* }}} */
++
++ /* stages -----------------------------------------{{{ */
++
++ /* }}} */
++
++ /* transitions ------------------------------------{{{ */
++
++ /* }}} */
++}
++
+diff --git a/kwin/composite.cpp b/kwin/composite.cpp
+index a8bb42e..323d589 100644
+--- a/kwin/composite.cpp
++++ b/kwin/composite.cpp
+@@ -836,7 +836,10 @@ bool Unmanaged::shouldUnredirect() const
+ {
+ // the pixmap is needed for the login effect, a nicer solution would be the login effect increasing
+ // refcount for the window pixmap (which would prevent unredirect), avoiding this hack
+- if (resourceClass() == "ksplashx" || resourceClass() == "ksplashsimple")
++ if (resourceClass() == "ksplashx"
++ || resourceClass() == "ksplashsimple"
++ || resourceClass() == "ksplashqml"
++ )
+ return false;
+ // it must cover whole display or one xinerama screen, and be the topmost there
+ if (geometry() == workspace()->clientArea(FullArea, geometry().center(), workspace()->currentDesktop())
+diff --git a/kwin/effects/fade/fade.cpp b/kwin/effects/fade/fade.cpp
+index 17f39a8..1a54eb0 100644
+--- a/kwin/effects/fade/fade.cpp
++++ b/kwin/effects/fade/fade.cpp
+@@ -194,6 +194,7 @@ bool FadeEffect::isFadeWindow(EffectWindow* w)
+ e = w->data(WindowAddedGrabRole).value<void*>();
+ if (w->windowClass() == "ksplashx ksplashx"
+ || w->windowClass() == "ksplashsimple ksplashsimple"
++ || w->windowClass() == "qt-subapplication ksplashqml"
+ || (e && e != this)) {
+ // see login effect
+ return false;
+diff --git a/kwin/effects/login/login.cpp b/kwin/effects/login/login.cpp
+index 63d8479..a9da287 100644
+--- a/kwin/effects/login/login.cpp
++++ b/kwin/effects/login/login.cpp
+@@ -111,7 +111,8 @@ bool LoginEffect::isLoginSplash(EffectWindow* w)
+ // TODO there should be probably a better way (window type?)
+ // see also fade effect and composite.cpp
+ if (w->windowClass() == "ksplashx ksplashx"
+- || w->windowClass() == "ksplashsimple ksplashsimple") {
++ || w->windowClass() == "ksplashsimple ksplashsimple"
++ || w->windowClass() == "qt-subapplication ksplashqml") {
+ return true;
+ }
+ return false;
+diff --git a/startkde.cmake b/startkde.cmake
+index 627dadb..1070785 100644
+--- a/startkde.cmake
++++ b/startkde.cmake
+@@ -151,6 +151,9 @@ if test -z "$dl"; then
+ KSplashX)
+ ksplash_pid=`ksplashx "${ksplashrc_ksplash_theme}" --pid`
+ ;;
++ KSplashQML)
++ ksplash_pid=`ksplashqml "${ksplashrc_ksplash_theme}" --pid`
++ ;;
+ None)
+ ;;
+ Simple)
+@@ -356,11 +359,11 @@ fi
+ # if KDEWM is not set, ksmserver will ensure kwin is started.
+ # kwrapper4 is used to reduce startup time and memory usage
+ # kwrapper4 does not return useful error codes such as the exit code of ksmserver.
+-# We only check for 255 which means that the ksmserver process could not be
+-# started, any problems thereafter, e.g. ksmserver failing to initialize,
++# We only check for 255 which means that the ksmserver process could not be
++# started, any problems thereafter, e.g. ksmserver failing to initialize,
+ # will remain undetected.
+ test -n "$KDEWM" && KDEWM="--windowmanager $KDEWM"
+-kwrapper4 ksmserver $KDEWM
++kwrapper4 ksmserver $KDEWM
+ if test $? -eq 255; then
+ # Startup error
+ echo 'startkde: Could not start ksmserver. Check your installation.' 1>&2
diff --git a/kwin-check-opengl.diff b/kwin-check-opengl.diff
new file mode 100644
index 0000000..edcf23a
--- /dev/null
+++ b/kwin-check-opengl.diff
@@ -0,0 +1,14 @@
+--- a/kwin/effects/logout/logout.h
++++ b/kwin/effects/logout/logout.h
+@@ -66,10 +66,10 @@ private:
+ bool blurSupported, useBlur;
+ GLTexture* blurTexture;
+ GLRenderTarget* blurTarget;
++#endif
+ double windowOpacity;
+ EffectWindowList windows;
+ QHash< EffectWindow*, double > windowsOpacities;
+-#endif
+ };
+
+ } // namespace
diff --git a/nepomuksearch-566052f0.diff b/nepomuksearch-566052f0.diff
new file mode 100644
index 0000000..d0606fe
--- /dev/null
+++ b/nepomuksearch-566052f0.diff
@@ -0,0 +1,110 @@
+diff -u a/plasma/generic/runners/nepomuksearch/nepomuksearchrunner.cpp git-kde-workspace/plasma/generic/runners/nepomuksearch//nepomuksearchrunner.cpp
+--- a/plasma/generic/runners/nepomuksearch/nepomuksearchrunner.cpp 2011-07-26 11:57:58.000000000 +0200
++++ git-kde-workspace/plasma/generic/runners/nepomuksearch//nepomuksearchrunner.cpp 2011-09-08 10:09:28.571582002 +0200
+@@ -20,6 +20,7 @@
+ #include "queryclientwrapper.h"
+
+ #include <QMenu>
++#include <QMimeData>
+
+ #include <KIcon>
+ #include <KRun>
+@@ -147,6 +148,40 @@
+ }
+ }
+
++QList<QAction*> Nepomuk::SearchRunner::actionsFromMenu(QMenu *menu, const QString &prefix, QObject *parent)
++{
++ Q_ASSERT(menu);
++
++ QList<QAction*> ret;
++ foreach (QAction *action, menu->actions()) {
++ if (QMenu *submenu = action->menu()) {
++ //Flatten hierarchy and prefix submenu text to all actions in submenu
++ ret << actionsFromMenu(submenu, action->text(), parent);
++ } else if (!action->isSeparator() && action->isEnabled()) {
++ QString text = action->text();
++ if (action->isCheckable()) {
++ if (action->isChecked()) {
++ text = QString("(%1) %2").arg(QChar(0x2613)).arg(text);
++ } else {
++ text = QString("( ) %1").arg(text);
++ }
++ }
++
++ if (!prefix.isEmpty()) {
++ text = QString("%1: %2").arg(prefix).arg(text);
++ }
++ text = text.replace(QRegExp("&([\\S])"), "\\1");
++
++ QAction *a = new QAction(action->icon(), text, parent);
++
++ QObject::connect(a, SIGNAL(triggered(bool)), action, SIGNAL(triggered(bool)));
++ ret << a;
++ }
++ }
++ return ret;
++}
++
++
+ QList<QAction*> Nepomuk::SearchRunner::actionsForMatch(const Plasma::QueryMatch &match)
+ {
+ //Unlike other runners, the actions generated here are likely to see
+@@ -181,13 +216,31 @@
+ //Add user defined actions
+ m_actions->addServiceActionsTo(&dummy);
+
+- m_konqActions = Plasma::actionsFromMenu(&dummy);
++ m_konqActions = actionsFromMenu(&dummy);
+
+ ret << m_konqActions;
+
+ return ret;
+ }
+
++QMimeData * Nepomuk::SearchRunner::mimeDataForMatch(const Plasma::QueryMatch *match)
++{
++ Nepomuk::Resource res = match->data().value<Nepomuk::Resource>();
++
++ QUrl url = KUrl(res.property(QUrl("http://www.semanticdesktop.org/ontologies/2007/01/19/nie#url")).toString());
++
++ if (!url.isValid()) {
++ return 0;
++ }
++
++ QMimeData *result = new QMimeData();
++ QList<QUrl> urls;
++ urls << url;
++ kDebug() << urls;
++ result->setUrls(urls);
++ return result;
++}
++
+ K_EXPORT_PLASMA_RUNNER(nepomuksearchrunner, Nepomuk::SearchRunner)
+
+ #include "nepomuksearchrunner.moc"
+diff -u a/plasma/generic/runners/nepomuksearch/nepomuksearchrunner.h git-kde-workspace/plasma/generic/runners/nepomuksearch//nepomuksearchrunner.h
+--- a/plasma/generic/runners/nepomuksearch/nepomuksearchrunner.h 2011-07-26 11:57:58.000000000 +0200
++++ git-kde-workspace/plasma/generic/runners/nepomuksearch//nepomuksearchrunner.h 2011-09-08 10:09:28.571582002 +0200
+@@ -49,8 +49,21 @@
+
+ protected Q_SLOTS:
+ void init();
++ QMimeData *mimeDataForMatch(const Plasma::QueryMatch *match);
+
+ private:
++ /**
++ * Returns a list of all actions in the given QMenu
++ * This method flattens the hierarchy of the menu by prefixing the
++ * text of all actions in a submenu with the submenu title.
++ *
++ * @param menu the QMenu storing the actions
++ * @param prefix text to display before the text of all actions in the menu
++ * @param parent QObject to be passed as parent of all the actions in the list
++ *
++ * @since 4.4
++ */
++ QList<QAction*> actionsFromMenu(QMenu *menu, const QString &prefix = QString(), QObject *parent = 0);
+
+ QMutex m_mutex;
+ QWaitCondition m_waiter;
More information about the scm-commits
mailing list