remove initializeLayout()
This commit is contained in:
parent
759780ce3f
commit
e49b58c95d
@ -157,34 +157,6 @@ void Corona::requireConfigSync()
|
||||
d->syncConfig();
|
||||
}
|
||||
|
||||
void Corona::initializeLayout(const QString &configName)
|
||||
{
|
||||
{
|
||||
QList<Containment *> containments = d->containments;
|
||||
d->containments.clear();
|
||||
foreach (Containment *containment, containments) {
|
||||
disconnect(containment, 0, this, 0);
|
||||
containment->destroy();
|
||||
}
|
||||
}
|
||||
|
||||
loadLayout(configName);
|
||||
|
||||
if (d->containments.isEmpty()) {
|
||||
loadDefaultLayout();
|
||||
if (!d->containments.isEmpty()) {
|
||||
requestConfigSync();
|
||||
}
|
||||
}
|
||||
|
||||
if (config()->isImmutable()) {
|
||||
setImmutability(SystemImmutable);
|
||||
} else {
|
||||
KConfigGroup coronaConfig(config(), "General");
|
||||
setImmutability((ImmutabilityType)coronaConfig.readEntry("immutability", (int)Mutable));
|
||||
}
|
||||
}
|
||||
|
||||
void Corona::loadLayout(const QString &configName)
|
||||
{
|
||||
if (!configName.isEmpty() && configName != d->configName) {
|
||||
|
@ -180,16 +180,6 @@ public:
|
||||
void exportLayout(KConfigGroup &config, QList<Containment*> containments);
|
||||
|
||||
public Q_SLOTS:
|
||||
/**
|
||||
* Initializes the layout from a config file. This will first clear any existing
|
||||
* Containments, load a layout from the requested configuration file, request the
|
||||
* default layout if needed and update immutability.
|
||||
*
|
||||
* @param config the name of the config file to load from,
|
||||
* or the default config file if QString()
|
||||
*/
|
||||
void initializeLayout(const QString &config = QString());
|
||||
|
||||
/**
|
||||
* Load applet layout from a config file. The results will be added to the
|
||||
* current set of Containments.
|
||||
|
@ -48,7 +48,10 @@ int main(int argc, char** argv)
|
||||
|
||||
|
||||
DesktopCorona *corona = new DesktopCorona();
|
||||
corona->initializeLayout();
|
||||
corona->loadLayout();
|
||||
if (corona->containments().isEmpty()) {
|
||||
corona->loadDefaultLayout();
|
||||
}
|
||||
corona->checkScreens();
|
||||
|
||||
return app.exec();
|
||||
|
Loading…
x
Reference in New Issue
Block a user