зеркало из https://github.com/mozilla/pjs.git
bug 71881
adding sidebar directory to popup menu sr=hyatt r=mcafee
This commit is contained in:
Родитель
ac96da18f4
Коммит
d46ab0272e
|
@ -32,3 +32,4 @@
|
|||
<!ENTITY sidebar.no-panels.state "My Sidebar is currently empty.">
|
||||
<!ENTITY sidebar.no-panels.add 'You may add tabs by clicking on the "Tabs" button above.'>
|
||||
<!ENTITY sidebar.no-panels.hide 'If you would like to completely hide My Sidebar, click on the "View" menu above and select "My Sidebar."'>
|
||||
<!ENTITY sidebar.sbDirectory.label "Sidebar Directory...">
|
||||
|
|
|
@ -789,6 +789,34 @@ function SidebarCustomize() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function BrowseMorePanels()
|
||||
{
|
||||
var url = '';
|
||||
var browser_url = "chrome://navigator/content/navigator.xul";
|
||||
var prefs = Components.classes['@mozilla.org/preferences;1'];
|
||||
if (prefs) {
|
||||
prefs = prefs.getService();
|
||||
}
|
||||
if (prefs) {
|
||||
prefs = prefs.QueryInterface(Components.interfaces.nsIPref);
|
||||
}
|
||||
if (prefs) {
|
||||
var locale;
|
||||
try {
|
||||
url = prefs.CopyCharPref("sidebar.customize.more_panels.url");
|
||||
var temp = prefs.CopyCharPref("browser.chromeURL");
|
||||
if (temp) browser_url = temp;
|
||||
} catch(ex) {
|
||||
debug("Unable to get prefs: "+ex);
|
||||
}
|
||||
}
|
||||
window.openDialog(browser_url, "_blank", "chrome,all,dialog=no", url);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sidebar_is_collapsed() {
|
||||
var sidebar_splitter = document.getElementById('sidebar-splitter');
|
||||
return (sidebar_splitter &&
|
||||
|
|
|
@ -80,6 +80,8 @@
|
|||
</template>
|
||||
<menuitem value="&sidebar.customize.label;"
|
||||
oncommand="SidebarCustomize();" />
|
||||
<menuitem value="&sidebar.sbDirectory.label;"
|
||||
oncommand="BrowseMorePanels();" />
|
||||
<menuseparator />
|
||||
</menupopup>
|
||||
</menubutton>
|
||||
|
|
Загрузка…
Ссылка в новой задаче