Fix for 100706, r/sr=jag,brendan

This commit is contained in:
hyatt%netscape.com 2006-09-14 05:59:38 +00:00
parent 24bfd15ffe
commit 9ca2e22fcd
4 changed files with 21 additions and 6 deletions

View File

@ -317,9 +317,7 @@ function Startup()
.createInstance(Components.interfaces.nsISHistory);
// hook up UI through progress listener
var interfaceRequestor = getBrowser().docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
var webProgress = interfaceRequestor.getInterface(Components.interfaces.nsIWebProgress);
webProgress.addProgressListener(window.XULBrowserWindow);
getBrowser().addProgressListener(window.XULBrowserWindow);
// XXXjag see bug 68662 (needed to hook up web progress listener)
getBrowser().boxObject.setPropertyAsSupports("listenerkungfu", window.XULBrowserWindow);
@ -742,6 +740,15 @@ function BrowserOpenWindow()
openDialog("chrome://communicator/content/openLocation.xul", "_blank", "chrome,modal,titlebar", window);
}
function BrowserOpenTab()
{
var handler = Components.classes['@mozilla.org/commandlinehandler/general-startup;1?type=browser'];
handler = handler.getService();
handler = handler.QueryInterface(Components.interfaces.nsICmdLineHandler);
var startpage = handler.defaultArgs;
gBrowser.selectedTab = gBrowser.addTab(startpage);
}
/* Called from the openLocation dialog. This allows that dialog to instruct
its opener to open a new window and then step completely out of the way.
Anything less byzantine is causing horrible crashes, rather believably,

View File

@ -352,9 +352,9 @@ Contributor(s): ______________________________________. -->
<!-- this box is temporary, pending XBLified <browser> -->
<hbox id="browser" flex="1">
<browser id="content" type="content-primary" src="about:blank"
flex="1" tooltip="aHTMLTooltip"
context="contentAreaContextMenu"
<tabbrowser id="content"
flex="1" contenttooltip="aHTMLTooltip"
contentcontextmenu="contentAreaContextMenu"
onclick="return contentAreaClick(event);"
ondraggesture="nsDragAndDrop.startDrag(event, contentAreaDNDObserver);"/>
</hbox>

View File

@ -51,6 +51,7 @@
<keyset id="navKeys">
<!-- File Menu -->
<key id="key_newNavigator"/>
<key id="key_newNavigatorTab" key="&tabCmd.commandkey;" modifiers="control" command="cmd_newNavigatorTab"/>
<key id="key_newBlankPage"/>
<key id="focusURLBar" key="&openCmd.commandkey;" oncommand="ShowAndSelectContentsOfURLBar();"
modifiers="accel"/>
@ -99,6 +100,8 @@
<commandset id="commands">
<command id="cmd_newNavigator"/>
<command id="cmd_newNavigatorTab" oncommand="BrowserOpenTab();"/>
<command id="cmd_newEditor"/>
<!-- NOT IMPLEMENTED
<command id="cmd_newEditorTemplate"/>
@ -170,6 +173,8 @@
<menupopup id="menu_NewPopup">
<!-- From globalOverlay.xul -->
<menuitem id="menu_newNavigator" command="cmd_newNavigator"/>
<!-- <menuitem id="menu_newNavigatorTab" position="1" command="cmd_newNavigatorTab" key="key_newNavigatorTab"
label="&tabCmd.label;" accesskey="&tabCmd.accesskey;"/> -->
<menuitem id="menu_newEditor" command="cmd_newEditor"/>
</menupopup>
</menu>

View File

@ -15,6 +15,9 @@
<!ENTITY browserCmd.label "New Navigator Window">
<!ENTITY browserCmd.accesskey "n">
<!ENTITY tabCmd.label "Navigator Tab">
<!ENTITY tabCmd.accesskey "t">
<!ENTITY tabCmd.commandkey "t">
<!ENTITY openCmd.label "Open Address...">
<!ENTITY openCmd.accesskey "r">
<!ENTITY openCmd.commandkey "l">