adding function for calling top lever window for help

menu fix 22011 r=danm
This commit is contained in:
matt%netscape.com 2000-02-16 05:14:02 +00:00
Родитель 4539431ae8
Коммит 2bdf87df99
3 изменённых файлов: 38 добавлений и 9 удалений

Просмотреть файл

@ -102,6 +102,7 @@ function goToggleToolbar( id, elementID )
}
}
//No longer needed. Rip this out since we are using openTopWin
function goHelpMenu( url )
{
/* note that this chrome url should probably change to not have all of the navigator controls */
@ -109,6 +110,31 @@ function goHelpMenu( url )
window.openDialog( "chrome://navigator/content/navigator.xul", "_blank", "chrome,all,dialog=no", url );
}
function openTopWin( url )
{
/* note that this chrome url should probably change to not have all of the navigator controls */
/* also, do we want to limit the number of help windows that can be spawned? */
dump("SetPrefToCurrentPage("+ url +") \n ");
if ((url == null) || (url == "")) return;
var windowManager = Components.classes['component://netscape/rdf/datasource?name=window-mediator'].getService();
var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator);
var topWindowOfType = windowManagerInterface.getMostRecentWindow( "navigator:browser" );
if ( topWindowOfType )
{
dump("setting page: " + topWindowOfType.content.location.href + "\n");
topWindowOfType.content.location.href = url;
}
else
{
dump(" No browser window. Should be disabling this button \n");
window.openDialog( "chrome://navigator/content/navigator.xul", "_blank", "chrome,all,dialog=no", url );
}
}
function goAboutDialog()
{
var defaultAboutState = false;

Просмотреть файл

@ -99,6 +99,9 @@
accesskey="&preferencesCmd.accesskey;"
observes="cmd_preferences"/>
<!-- Search Menu -->
<!-- View Menu -->
<menu id="menu_View" value="&viewMenu.label;"/>
<menu id="menu_Toolbars" value="&viewToolbarsMenu.label;" accesskey="&viewToolbarsMenu.accesskey;"/>
@ -114,18 +117,18 @@
<!-- Help Menu disabled
<menu value="&helpContentCmd.label;">
<menupopup>
<menuitem value="&webBrowsingCmd.label;" oncommand="goHelpMenu('http://www.mozilla.org/projects/user-docs/local/browserhelp/navtop.html');"/>
<menuitem value="&emailCmd.label;" oncommand="goHelpMenu('http://www.mozilla.org/projects/user-docs/local/mailhelp/mailtop.html');"/>
<menuitem value="&internetShopCmd.label;" oncommand="goHelpMenu('http://www.mozilla.org/projects/user-docs/served/shophelp/shoptop.html');"/>
<menuitem value="&customCmd.label;" oncommand="goHelpMenu('http://www.mozilla.org/projects/user-docs/served/custhelp/custtop.html');"/>
<menuitem value="&webBrowsingCmd.label;" oncommand="openTopWin('http://www.mozilla.org/projects/user-docs/local/browserhelp/navtop.html');"/>
<menuitem value="&emailCmd.label;" oncommand="openTopWin('http://www.mozilla.org/projects/user-docs/local/mailhelp/mailtop.html');"/>
<menuitem value="&internetShopCmd.label;" oncommand="openTopWin('http://www.mozilla.org/projects/user-docs/served/shophelp/shoptop.html');"/>
<menuitem value="&customCmd.label;" oncommand="openTopWin('http://www.mozilla.org/projects/user-docs/served/custhelp/custtop.html');"/>
<menuseparator/>
<menuitem value="&softUpdatesCmd.label;" oncommand="goHelpMenu('http://www.mozilla.org/projects/user-docs/served/updatehelp/updatetop.html');"/>
<menuitem value="&connProbCmd.label;" oncommand="goHelpMenu('http://www.mozilla.org/projects/user-docs/local/troubleshoot/troubletop.html');"/>
<menuitem value="&secPrivCmd.label;" oncommand="goHelpMenu('http://home.netscape.com/security/basics/index.html');"/>
<menuitem value="&softUpdatesCmd.label;" oncommand="openTopWin('http://www.mozilla.org/projects/user-docs/served/updatehelp/updatetop.html');"/>
<menuitem value="&connProbCmd.label;" oncommand="openTopWin('http://www.mozilla.org/projects/user-docs/local/troubleshoot/troubletop.html');"/>
<menuitem value="&secPrivCmd.label;" oncommand="openTopWin('http://home.netscape.com/security/basics/index.html');"/>
</menupopup>
</menu>
-->
<menuitem value="&releaseCommCmd.label;" oncommand="goHelpMenu('http://www.mozilla.org/projects/seamonkey/release-notes/')"/>
<menuitem value="&releaseCommCmd.label;" oncommand="openTopWin('http://www.mozilla.org/projects/seamonkey/release-notes/')"/>
<menuitem value="&aboutCommCmd.label;" oncommand="goAboutDialog();"/>
</menupopup>
</menu>

Просмотреть файл

@ -60,7 +60,7 @@
<menuseparator/>
<menu value="&toolsMenu.label;">
<menupopup>
<menupopup id="toolsPopup">
<menuitem value="&historyCmd.label;" oncommand="toHistory()"/>
<menuitem value="&messageCenterCmd.label;" oncommand="toMessengerCenter()"/>
<menuitem value="&importUtilCmd.label;" oncommand="toImport()"/>