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,6 +699,9 @@ void ExtenderPrivate::loadExtenderItems()
|
||||
if (containment) {
|
||||
Corona *corona = containment->corona();
|
||||
|
||||
if (sourceAppletId == q->applet()->id()) {
|
||||
sourceApplet = q->applet();
|
||||
} else {
|
||||
foreach (Containment *containment, corona->containments()) {
|
||||
foreach (Applet *applet, containment->applets()) {
|
||||
if (applet->id() == sourceAppletId) {
|
||||
@ -708,6 +711,7 @@ void ExtenderPrivate::loadExtenderItems()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//There is no source applet. We just instantiate one just for the sake of creating
|
||||
//detachables.
|
||||
|
@ -175,6 +175,9 @@ ExtenderItem::ExtenderItem(Extender *hostExtender, uint extenderItemId)
|
||||
|
||||
//Find the sourceapplet.
|
||||
Corona *corona = hostExtender->d->applet.data()->containment()->corona();
|
||||
if (sourceAppletId == hostExtender->applet()->id()) {
|
||||
d->sourceApplet = hostExtender->applet();
|
||||
} else {
|
||||
foreach (Containment *containment, corona->containments()) {
|
||||
foreach (Applet *applet, containment->applets()) {
|
||||
if (applet->id() == sourceAppletId &&
|
||||
@ -184,6 +187,7 @@ ExtenderItem::ExtenderItem(Extender *hostExtender, uint extenderItemId)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//make sure we keep monitoring if the source applet still exists, so the return to source icon
|
||||
//can be hidden if it is removed.
|
||||
|
Loading…
x
Reference in New Issue
Block a user