зеркало из https://github.com/mozilla/pjs.git
Fix for bug 192014. Bookmarks menu shows no bookmarks when no unminimized windows are open.
r=pch, sr=jag, a=sspitzer
This commit is contained in:
Родитель
4035e867e8
Коммит
04dbca1afb
|
@ -1434,14 +1434,30 @@ function hiddenWindowStartup()
|
|||
window.focus();
|
||||
|
||||
// Disable menus which are not appropriate
|
||||
var disabledItems = ['cmd_close', 'Browser:SendPage', 'Browser:EditPage', 'cmd_printSetup', /*'Browser:PrintPreview',*/
|
||||
'Browser:Print', 'canGoBack', 'canGoForward', 'Browser:Home', 'Browser:AddBookmark', 'cmd_undo',
|
||||
'cmd_redo', 'cmd_cut', 'cmd_copy','cmd_paste', 'cmd_delete', 'cmd_selectAll', 'menu_textZoom'];
|
||||
var disabledItems = ['cmd_close', 'Browser:SendPage', 'Browser:EditPage',
|
||||
'cmd_printSetup', /*'Browser:PrintPreview',*/
|
||||
'Browser:Print', 'canGoBack', 'canGoForward',
|
||||
'Browser:Home', 'Browser:AddBookmark',
|
||||
'Browser:AddBookmarkAs', 'Browser:AddGroupmarkAs',
|
||||
'cmd_undo', 'cmd_redo', 'cmd_cut', 'cmd_copy',
|
||||
'cmd_paste', 'cmd_delete', 'cmd_selectAll',
|
||||
'menu_textZoom'];
|
||||
for (var id in disabledItems) {
|
||||
var broadcaster = document.getElementById(disabledItems[id]);
|
||||
if (broadcaster)
|
||||
broadcaster.setAttribute("disabled", "true");
|
||||
}
|
||||
|
||||
// now load bookmarks after a delay
|
||||
setTimeout(hiddenWindowLoadBookmarksCallback, 0);
|
||||
}
|
||||
|
||||
function hiddenWindowLoadBookmarksCallback()
|
||||
{
|
||||
// loads the services
|
||||
initServices();
|
||||
initBMService();
|
||||
BMSVC.readBookmarks();
|
||||
}
|
||||
|
||||
// Initialize the LeakDetector class.
|
||||
|
|
|
@ -56,6 +56,10 @@ Contributor(s): ______________________________________. -->
|
|||
<script type="application/x-javascript" src="chrome://navigator/content/browser.js"/>
|
||||
<script type="application/x-javascript" src="chrome://navigator/content/navigator.js"/>
|
||||
|
||||
<!-- Shared Bookmarks Utility Library -->
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarks.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarksMenu.js"/>
|
||||
|
||||
<stringbundleset id="stringbundleset"/>
|
||||
|
||||
<!-- keys are appended from the overlay -->
|
||||
|
@ -76,6 +80,8 @@ Contributor(s): ______________________________________. -->
|
|||
|
||||
<broadcasterset id="navBroadcasters"/>
|
||||
|
||||
<template id="bookmarksMenuTemplate"/>
|
||||
|
||||
<!-- it's the whole navigator.xul menubar! hidden windows need to
|
||||
have a menubar for situations where they're the only window remaining
|
||||
on a platform that wants to leave the app running, like the Mac.
|
||||
|
|
Загрузка…
Ссылка в новой задаче