Bug 590517 - Add 'Open in New Tab' menu item to Awesome Screen [r=mfinkle]

This commit is contained in:
Vivien Nicolas 2010-09-09 11:16:09 +02:00
parent a023975012
commit 54ce20fd73
3 changed files with 35 additions and 11 deletions

View File

@ -53,6 +53,27 @@
</binding>
<binding id="popup_autocomplete_result">
<handlers>
<handler event="contextmenu" phase="capturing">
<![CDATA[
let url = this.getAttribute("url");
if (!url)
return;
let value = this.getAttribute("value");
let data = {
target: this,
json: {
types: ["link-saveable", "link-shareable"],
label: value,
linkTitle: value,
linkURL: url
}
};
ContextHelper.showPopup(data);
]]>
</handler>
</handlers>
<content orient="vertical">
<xul:hbox class="autocomplete-item-label" align="top" xbl:inherits="tags, favorite" mousethrough="always">
<xul:image xbl:inherits="src"/>
@ -364,13 +385,15 @@
let data = {
target: this,
json: {
types: ["edit-bookmark"],
label: this.uri.spec
}};
ContextHelper.showPopup(data);
]]>
</handler>
</handlers>
types: ["edit-bookmark", "link-saveable", "link-shareable"],
label: this.name,
linkTitle: this.name,
linkURL: this.spec
}};
ContextHelper.showPopup(data);
]]>
</handler>
</handlers>
<implementation>
<field name="_uri">null</field>

View File

@ -639,6 +639,7 @@ var BrowserUI = {
},
selectTab: function selectTab(aTab) {
BrowserUI.activePanel = null;
Browser.selectedTab = aTab;
},

View File

@ -354,10 +354,6 @@
</hbox>
</vbox>
<vbox id="newtab-popup" hidden="true" class="dialog-dark" onclick="NewTabPopup.selectTab()" align="center" left="21">
<label/>
</vbox>
<vbox id="bookmark-popup" hidden="true" class="dialog-dark" align="center">
<label value="&bookmarkPopup.label;"/>
<separator class="thin"/>
@ -520,6 +516,10 @@
<remotetabslist id="remotetabs-items" onopen="RemoteTabsList.openLink(event)" flex="1" hidden="true"/>
</vbox>
<vbox id="newtab-popup" hidden="true" class="dialog-dark" onclick="NewTabPopup.selectTab()" align="center" left="21">
<label/>
</vbox>
<!-- options dialog for select form field -->
<vbox id="select-container" hidden="true" pack="center">
<spacer id="select-spacer" flex="1000"/>