mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
imported patch bug-453470.diff
This commit is contained in:
parent
3c2c20ce2a
commit
4e1a40f52f
@ -33,9 +33,57 @@
|
||||
oncommand="document.getBindingParent(this).close();"/>
|
||||
</xul:hbox>
|
||||
</content>
|
||||
|
||||
<implementation implements="nsIDOMEventListener">
|
||||
<constructor>
|
||||
<![CDATA[
|
||||
this._chromeTab = Browser.selectedTab.chromeTab;
|
||||
document.addEventListener("TabSelect", this, true);
|
||||
document.addEventListener("TabClose", this, true);
|
||||
]]>
|
||||
</constructor>
|
||||
|
||||
// We need to override the close method here, otherwise the destructor
|
||||
// is not called on removeChild (see bug 230086)
|
||||
<method name="close">
|
||||
<body>
|
||||
<![CDATA[
|
||||
var control = this.control;
|
||||
if (control) {
|
||||
document.removeEventListener("TabClose", this, true);
|
||||
document.removeEventListener("TabSelect", this, true);
|
||||
control.removeNotification(this);
|
||||
}
|
||||
else
|
||||
this.hidden = true;
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="handleEvent">
|
||||
<parameter name="aEvent"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
switch(aEvent.type) {
|
||||
case "TabSelect":
|
||||
if (this._chromeTab == aEvent.target)
|
||||
this.hidden = false;
|
||||
else
|
||||
this.hidden = true;
|
||||
break;
|
||||
|
||||
case "TabClose":
|
||||
if (this._chromeTab == aEvent.target)
|
||||
this.close();
|
||||
break;
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<binding id="geo-notification" extends="chrome://global/content/bindings/notification.xml#notification">
|
||||
<binding id="geo-notification" extends="chrome://browser/content/notification.xml#notification">
|
||||
|
||||
<resources>
|
||||
<stylesheet src="chrome://browser/skin/notification.css"/>
|
||||
|
Loading…
Reference in New Issue
Block a user