IMPROVEMENT: when searcing for our hostApplet, always look for the extenders's applet before,
it is slightly faster and -partly- fixes the inability of detecting the host applet when it is an applet-in-applet, like the systray svn path=/trunk/KDE/kdelibs/; revision=1177632
This commit is contained in:
parent
7d00f6c756
commit
6655948ccd
@ -699,10 +699,14 @@ void ExtenderPrivate::loadExtenderItems()
|
||||
if (containment) {
|
||||
Corona *corona = containment->corona();
|
||||
|
||||
foreach (Containment *containment, corona->containments()) {
|
||||
foreach (Applet *applet, containment->applets()) {
|
||||
if (applet->id() == sourceAppletId) {
|
||||
sourceApplet = applet;
|
||||
if (sourceAppletId == q->applet()->id()) {
|
||||
sourceApplet = q->applet();
|
||||
} else {
|
||||
foreach (Containment *containment, corona->containments()) {
|
||||
foreach (Applet *applet, containment->applets()) {
|
||||
if (applet->id() == sourceAppletId) {
|
||||
sourceApplet = applet;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -175,11 +175,15 @@ ExtenderItem::ExtenderItem(Extender *hostExtender, uint extenderItemId)
|
||||
|
||||
//Find the sourceapplet.
|
||||
Corona *corona = hostExtender->d->applet.data()->containment()->corona();
|
||||
foreach (Containment *containment, corona->containments()) {
|
||||
foreach (Applet *applet, containment->applets()) {
|
||||
if (applet->id() == sourceAppletId &&
|
||||
applet->pluginName() == dg.readEntry("sourceAppletPluginName", "")) {
|
||||
d->sourceApplet = applet;
|
||||
if (sourceAppletId == hostExtender->applet()->id()) {
|
||||
d->sourceApplet = hostExtender->applet();
|
||||
} else {
|
||||
foreach (Containment *containment, corona->containments()) {
|
||||
foreach (Applet *applet, containment->applets()) {
|
||||
if (applet->id() == sourceAppletId &&
|
||||
applet->pluginName() == dg.readEntry("sourceAppletPluginName", "")) {
|
||||
d->sourceApplet = applet;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user