mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
plasma: fixup and cleanup
the default layout is done via the scripting support, that's just a no go. plasma-default-layoutrc is possible simpler solution with for the madness that the default plasma settings are done on initial setup but it most likely some features will have to be extended, especially the containment size option. hardcoding panel and default view to always be available by setting virtual desktops and other misc settings accordingly seems better but that will probably break more code thus avoiding it for now
This commit is contained in:
parent
d417cef110
commit
0564b83ddb
7 changed files with 8 additions and 10 deletions
|
@ -74,6 +74,11 @@ ScriptEngine::~ScriptEngine()
|
|||
{
|
||||
}
|
||||
|
||||
QScriptValue ScriptEngine::newActivity(QScriptContext *context, QScriptEngine *engine)
|
||||
{
|
||||
return createContainment("desktop", "desktop", context, engine);
|
||||
}
|
||||
|
||||
QScriptValue ScriptEngine::newPanel(QScriptContext *context, QScriptEngine *engine)
|
||||
{
|
||||
return createContainment("panel", "panel", context, engine);
|
||||
|
@ -564,6 +569,7 @@ void ScriptEngine::setupEngine()
|
|||
}
|
||||
|
||||
m_scriptSelf.setProperty("QRectF", constructQRectFClass(this));
|
||||
m_scriptSelf.setProperty("Activity", newFunction(ScriptEngine::newActivity));
|
||||
m_scriptSelf.setProperty("Panel", newFunction(ScriptEngine::newPanel));
|
||||
m_scriptSelf.setProperty("panelById", newFunction(ScriptEngine::panelById));
|
||||
m_scriptSelf.setProperty("panels", newFunction(ScriptEngine::panels));
|
||||
|
|
|
@ -69,6 +69,7 @@ private:
|
|||
|
||||
// containment accessors
|
||||
static QStringList availableContainments(const QString &type);
|
||||
static QScriptValue newActivity(QScriptContext *context, QScriptEngine *engine);
|
||||
static QScriptValue newPanel(QScriptContext *context, QScriptEngine *engine);
|
||||
static QScriptValue panelById(QScriptContext *context, QScriptEngine *engine);
|
||||
static QScriptValue panels(QScriptContext *context, QScriptEngine *engine);
|
||||
|
|
|
@ -4,8 +4,6 @@ include_directories(${KDEBASE_WORKSPACE_SOURCE_DIR}/libs
|
|||
${KDEBASE_WORKSPACE_SOURCE_DIR}/libs/kephal
|
||||
)
|
||||
|
||||
add_subdirectory(configupdates)
|
||||
|
||||
set(plasma_SRCS
|
||||
accessibility/accessiblefactory.cpp
|
||||
accessibility/accessibleplasmaview.cpp
|
||||
|
|
|
@ -2,7 +2,6 @@ loadTemplate("org.kde.plasma-desktop.defaultPanel")
|
|||
|
||||
for (var i = 0; i < screenCount; ++i) {
|
||||
var desktop = new Activity
|
||||
desktop.name = i18n("Desktop")
|
||||
desktop.screen = i
|
||||
desktop.wallpaperPlugin = 'image'
|
||||
desktop.wallpaperMode = 'SingleImage'
|
||||
|
|
|
@ -123,7 +123,7 @@ KDE_EXPORT int kdemain(int argc, char **argv)
|
|||
QAccessible::installFactory(Plasma::accessibleInterfaceFactory);
|
||||
#endif
|
||||
|
||||
int rc = app->exec();
|
||||
int rc = app->exec();
|
||||
delete app;
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -269,12 +269,6 @@ void SimpleJavaScriptApplet::constraintsEvent(Plasma::Constraints constraints)
|
|||
}
|
||||
}
|
||||
|
||||
if (constraints & Plasma::ContextConstraint) {
|
||||
if (!env->callEventListeners("currentActivityChanged")) {
|
||||
callPlasmoidFunction("currentActivityChanged", QScriptValueList(), env);
|
||||
}
|
||||
}
|
||||
|
||||
if (constraints & Plasma::SizeConstraint) {
|
||||
if (!env || !env->callEventListeners("sizeChanged")) {
|
||||
callPlasmoidFunction("sizeChanged", QScriptValueList(), env);
|
||||
|
|
Loading…
Add table
Reference in a new issue