diff --git a/xpfe/global/resources/content/globalOverlay.js b/xpfe/global/resources/content/globalOverlay.js index ae23ded9106d..8d91b153f02b 100644 --- a/xpfe/global/resources/content/globalOverlay.js +++ b/xpfe/global/resources/content/globalOverlay.js @@ -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; diff --git a/xpfe/global/resources/content/globalOverlay.xul b/xpfe/global/resources/content/globalOverlay.xul index 4c86c6033a65..2191cb3f94eb 100644 --- a/xpfe/global/resources/content/globalOverlay.xul +++ b/xpfe/global/resources/content/globalOverlay.xul @@ -99,6 +99,9 @@ accesskey="&preferencesCmd.accesskey;" observes="cmd_preferences"/> + + +
@@ -114,18 +117,18 @@ - + diff --git a/xpfe/global/resources/content/tasksOverlay.xul b/xpfe/global/resources/content/tasksOverlay.xul index b746e06f0d90..61495bc78212 100644 --- a/xpfe/global/resources/content/tasksOverlay.xul +++ b/xpfe/global/resources/content/tasksOverlay.xul @@ -60,7 +60,7 @@