moved the activate() signal chaining from applet to containment

svn path=/trunk/KDE/kdelibs/; revision=915940
This commit is contained in:
Marco Martin 2009-01-24 10:47:35 +00:00
parent b743c9fa35
commit bb8c603060
2 changed files with 3 additions and 1 deletions

View File

@ -1173,7 +1173,6 @@ void Applet::setGlobalShortcut(const KShortcut &shortcut)
d->activationAction->setObjectName(QString("activate widget %1").arg(id())); // NO I18N
connect(d->activationAction, SIGNAL(triggered()), this, SIGNAL(activate()));
connect(this, SIGNAL(activate()), this, SLOT(setFocus()));
connect(this, SIGNAL(activate()), containment(), SIGNAL(activate()));
QList<QWidget *> widgets = d->actions.associatedWidgets();
foreach (QWidget *w, widgets) {

View File

@ -725,6 +725,8 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
KConfigGroup c = config().group("Applets").group(QString::number(applet->id()));
oldConfig.reparent(&c);
applet->d->resetConfigurationObject();
disconnect(applet, SIGNAL(activate()), currentContainment, SIGNAL(activate()));
} else {
applet->setParentItem(this);
}
@ -734,6 +736,7 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
connect(applet, SIGNAL(configNeedsSaving()), this, SIGNAL(configNeedsSaving()));
connect(applet, SIGNAL(releaseVisualFocus()), this, SIGNAL(releaseVisualFocus()));
connect(applet, SIGNAL(destroyed(QObject*)), this, SLOT(appletDestroyed(QObject*)));
connect(applet, SIGNAL(activate()), this, SIGNAL(activate()));
if (pos != QPointF(-1, -1)) {
applet->setPos(pos);