revert the phonon check, it appears HAVE_PHONON isn't defined and phonon
is required anyways svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=924894
This commit is contained in:
parent
398c844dac
commit
0589a221e2
@ -12,6 +12,9 @@ set(simple_javascript_engine_SRCS
|
|||||||
qtgui/timer.cpp
|
qtgui/timer.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
include_directories(${PHONON_INCLUDES})
|
||||||
|
|
||||||
|
|
||||||
kde4_add_plugin(plasma_appletscript_simple_javascript
|
kde4_add_plugin(plasma_appletscript_simple_javascript
|
||||||
${simple_javascript_engine_SRCS})
|
${simple_javascript_engine_SRCS})
|
||||||
|
|
||||||
|
@ -636,13 +636,7 @@ void SimpleJavaScriptApplet::installWidgets(QScriptEngine *engine)
|
|||||||
|
|
||||||
globalObject.setProperty(widget, fun);
|
globalObject.setProperty(widget, fun);
|
||||||
}
|
}
|
||||||
#ifndef HAVE_PHONON
|
|
||||||
QScriptValue fun = engine->newFunction(notSupported);
|
|
||||||
fun.setProperty( QString("message"),
|
|
||||||
QScriptValue(engine, i18n("Phonon support was not available")),
|
|
||||||
QScriptValue::ReadOnly | QScriptValue::Undeletable | QScriptValue::SkipInEnumeration );
|
|
||||||
globalObject.setProperty(QString("VideoWidget"), fun);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QScriptValue SimpleJavaScriptApplet::createWidget(QScriptContext *context, QScriptEngine *engine)
|
QScriptValue SimpleJavaScriptApplet::createWidget(QScriptContext *context, QScriptEngine *engine)
|
||||||
@ -680,7 +674,7 @@ QScriptValue SimpleJavaScriptApplet::createWidget(QScriptContext *context, QScri
|
|||||||
QScriptValue SimpleJavaScriptApplet::notSupported(QScriptContext *context, QScriptEngine *engine)
|
QScriptValue SimpleJavaScriptApplet::notSupported(QScriptContext *context, QScriptEngine *engine)
|
||||||
{
|
{
|
||||||
QString message = context->callee().property("message").toString();
|
QString message = context->callee().property("message").toString();
|
||||||
return context->throwError(i18n("This operation was not supported, %1").arg(message) );
|
return context->throwError(i18n("This operation was not supported, %1", message) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,6 +76,7 @@ private:
|
|||||||
static KSharedPtr<UiLoader> s_widgetLoader;
|
static KSharedPtr<UiLoader> s_widgetLoader;
|
||||||
QScriptEngine *m_engine;
|
QScriptEngine *m_engine;
|
||||||
QScriptValue m_self;
|
QScriptValue m_self;
|
||||||
|
QVariantList m_args;
|
||||||
AppletInterface *m_interface;
|
AppletInterface *m_interface;
|
||||||
friend class AppletInterface;
|
friend class AppletInterface;
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
layout = new LinearLayout(plasmoid);
|
layout = new LinearLayout(plasmoid);
|
||||||
video = new VideoWidget();
|
video = new VideoWidget();
|
||||||
layout.addItem(video);
|
layout.addItem(video);
|
||||||
video.file = startupArguments[0];
|
video.url = startupArguments[0];
|
||||||
video.play();
|
video.play();
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,9 +45,8 @@
|
|||||||
#include <Plasma/ToolButton>
|
#include <Plasma/ToolButton>
|
||||||
#include <Plasma/TreeView>
|
#include <Plasma/TreeView>
|
||||||
#include <Plasma/WebView>
|
#include <Plasma/WebView>
|
||||||
#ifdef HAVE_PHONON
|
|
||||||
#include <Plasma/VideoWidget>
|
#include <Plasma/VideoWidget>
|
||||||
#endif
|
|
||||||
|
|
||||||
QGraphicsWidget *createBusyWidget(QGraphicsWidget *parent) { return new Plasma::BusyWidget(parent); }
|
QGraphicsWidget *createBusyWidget(QGraphicsWidget *parent) { return new Plasma::BusyWidget(parent); }
|
||||||
QGraphicsWidget *createCheckBox(QGraphicsWidget *parent) { return new Plasma::CheckBox(parent); }
|
QGraphicsWidget *createCheckBox(QGraphicsWidget *parent) { return new Plasma::CheckBox(parent); }
|
||||||
@ -70,9 +69,7 @@ QGraphicsWidget *createTabBar(QGraphicsWidget *parent) { return new Plasma::TabB
|
|||||||
QGraphicsWidget *createTextEdit(QGraphicsWidget *parent) { return new Plasma::TextEdit(parent); }
|
QGraphicsWidget *createTextEdit(QGraphicsWidget *parent) { return new Plasma::TextEdit(parent); }
|
||||||
QGraphicsWidget *createToolButton(QGraphicsWidget *parent) { return new Plasma::ToolButton(parent); }
|
QGraphicsWidget *createToolButton(QGraphicsWidget *parent) { return new Plasma::ToolButton(parent); }
|
||||||
QGraphicsWidget *createTreeView(QGraphicsWidget *parent) { return new Plasma::TreeView(parent); }
|
QGraphicsWidget *createTreeView(QGraphicsWidget *parent) { return new Plasma::TreeView(parent); }
|
||||||
#ifdef HAVE_PHONON
|
|
||||||
QGraphicsWidget *createVideoWidget(QGraphicsWidget *parent) { return new Plasma::VideoWidget(parent); }
|
QGraphicsWidget *createVideoWidget(QGraphicsWidget *parent) { return new Plasma::VideoWidget(parent); }
|
||||||
#endif
|
|
||||||
|
|
||||||
UiLoader::UiLoader()
|
UiLoader::UiLoader()
|
||||||
{
|
{
|
||||||
@ -97,9 +94,7 @@ UiLoader::UiLoader()
|
|||||||
m_widgetCtors.insert("TextEdit", createTextEdit);
|
m_widgetCtors.insert("TextEdit", createTextEdit);
|
||||||
m_widgetCtors.insert("ToolButton", createToolButton);
|
m_widgetCtors.insert("ToolButton", createToolButton);
|
||||||
m_widgetCtors.insert("TreeView", createTreeView);
|
m_widgetCtors.insert("TreeView", createTreeView);
|
||||||
#ifdef HAVE_PHONON
|
|
||||||
m_widgetCtors.insert("VideoWidget", createVideoWidget);
|
m_widgetCtors.insert("VideoWidget", createVideoWidget);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UiLoader::~UiLoader()
|
UiLoader::~UiLoader()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user