Bring back the panel. It's not perfect, but it gives basic functionality.
You may need to delete ~/.kde4/share/config/plasma-appletrc to get the panel Reloading from the config file is a bit dodgy - waiting on a commit from aseigo which changes background painting of applets depending on their form factor. CCMAIL: aseigo@kde.org svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=719254
This commit is contained in:
parent
9e54e09dc8
commit
42e49a2b06
@ -495,6 +495,9 @@ Applet* Containment::addApplet(const QString& name, const QVariantList& args, ui
|
|||||||
|
|
||||||
applet->updateConstraints();
|
applet->updateConstraints();
|
||||||
|
|
||||||
|
kDebug() << applet->name() << "sizehint:" << applet->sizeHint()
|
||||||
|
<< "geometry:" << applet->geometry();
|
||||||
|
|
||||||
if (!delayInit) {
|
if (!delayInit) {
|
||||||
applet->init();
|
applet->init();
|
||||||
}
|
}
|
||||||
|
27
corona.cpp
27
corona.cpp
@ -153,10 +153,12 @@ void Corona::loadApplets(const QString& config)
|
|||||||
if (c) {
|
if (c) {
|
||||||
containments.insert(c->id(), c);
|
containments.insert(c->id(), c);
|
||||||
c->initConstraints(&appletConfig);
|
c->initConstraints(&appletConfig);
|
||||||
|
c->setGeometry(appletConfig.readEntry("geometry", QRectF()));
|
||||||
|
kDebug() << "Containment" << c->id() << "geometry is" << c->geometry();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// it's an applet, let's grab the containment association
|
// it's an applet, let's grab the containment association
|
||||||
kDebug() << "insert multi " << group;
|
kDebug() << "insert multi" << group;
|
||||||
applets.append(appletConfig);
|
applets.append(appletConfig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -218,6 +220,22 @@ void Corona::loadDefaultSetup()
|
|||||||
c->setScreen(i);
|
c->setScreen(i);
|
||||||
c->setFormFactor(Plasma::Planar);
|
c->setFormFactor(Plasma::Planar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make a panel at the bottom
|
||||||
|
Containment* panel = addContainment("panel", (QVariantList() << (int)Plasma::BottomEdge));
|
||||||
|
|
||||||
|
// some default applets to get a usable UI
|
||||||
|
QList<Plasma::Applet*> applets;
|
||||||
|
Plasma::Applet *tasksApplet = panel->addApplet("tasks");
|
||||||
|
Plasma::Applet *systemTrayApplet = panel->addApplet("systemtray");
|
||||||
|
Plasma::Applet *clockApplet = panel->addApplet("digital-clock");
|
||||||
|
|
||||||
|
applets << tasksApplet << systemTrayApplet << clockApplet;
|
||||||
|
|
||||||
|
foreach (Plasma::Applet* applet , applets) {
|
||||||
|
// If we have a Panel class (is a Container), this should move there
|
||||||
|
applet->setDrawStandardBackground(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Containment* Corona::containmentForScreen(int screen) const
|
Containment* Corona::containmentForScreen(int screen) const
|
||||||
@ -231,6 +249,11 @@ Containment* Corona::containmentForScreen(int screen) const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<Containment*> Corona::containments() const
|
||||||
|
{
|
||||||
|
return d->containments;
|
||||||
|
}
|
||||||
|
|
||||||
void Corona::clearApplets()
|
void Corona::clearApplets()
|
||||||
{
|
{
|
||||||
foreach (Containment* containment, d->containments) {
|
foreach (Containment* containment, d->containments) {
|
||||||
@ -243,6 +266,8 @@ Containment* Corona::addContainment(const QString& name, const QVariantList& arg
|
|||||||
Containment* containment = 0;
|
Containment* containment = 0;
|
||||||
Applet* applet = 0;
|
Applet* applet = 0;
|
||||||
|
|
||||||
|
kDebug() << "Loading" << name << args << id;
|
||||||
|
|
||||||
if (!name.isEmpty()) {
|
if (!name.isEmpty()) {
|
||||||
applet = Applet::loadApplet(name, id, args);
|
applet = Applet::loadApplet(name, id, args);
|
||||||
containment = dynamic_cast<Containment*>(applet);
|
containment = dynamic_cast<Containment*>(applet);
|
||||||
|
5
corona.h
5
corona.h
@ -140,6 +140,11 @@ public Q_SLOTS:
|
|||||||
*/
|
*/
|
||||||
Containment* containmentForScreen(int screen) const;
|
Containment* containmentForScreen(int screen) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns all containments on this Corona
|
||||||
|
*/
|
||||||
|
QList<Containment*> containments() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a SuperKaramba theme to the scene
|
* Adds a SuperKaramba theme to the scene
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user