Fixed bug 16118, part of fix for 14342. Reduced size of ender input widget. r=hyatt,hangas

This commit is contained in:
cmanske%netscape.com 1999-10-14 00:13:21 +00:00
Родитель 08a06e4376
Коммит 074c63daae
15 изменённых файлов: 147 добавлений и 136 удалений

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

@ -684,12 +684,8 @@ function OpenSearch(tabName, searchStr)
{
window.openDialog( "chrome://editor/content", "_blank", "chrome,all,dialog=no", url );
}
function BrowserNewEditorWindow()
{
// Open editor window to default page.
BrowserEditPage( "resource:/res/html/empty_doc.html" );
}
//Note: BrowserNewEditorWindow() was moved to globalOverlay.xul and renamed to NewEditorWindow()
function BrowserOpenWindow()
{

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

@ -36,11 +36,10 @@ Contributor(s): ______________________________________. -->
<!-- File Menu -->
<key id="key_newNavigator"/>
<key id="key_newMessage"/>
<key id="newBlankPageKB" disabled="false" command="true" shift="true" key="&newBlankPageCmd.commandkey;" observes="Browser:NewEditor"/>
<key id="openBrowserKb" disabled="false" command="true" key="&openCmd.commandkey;" observes="Browser:OpenUrl" />
<key id="openFileKb" disabled="false" command="true" key="&openFileCmd.commandkey;" observes="Browser:OpenFile" />
<key id="printKb" disabled="false" command="true" key="&printCmd.commandkey;" observes="Browser:Print" />
<key id="key_newBlankPage"/>
<key id="openBrowserKb" disabled="false" command="true" key="&openCmd.commandkey;" observes="Browser:OpenUrl" />
<key id="openFileKb" disabled="false" command="true" key="&openFileCmd.commandkey;" observes="Browser:OpenFile" />
<key id="printKb" disabled="false" command="true" key="&printCmd.commandkey;" observes="Browser:Print" />
<key id="key_close"/>
<key id="key_quit"/>
@ -69,6 +68,10 @@ Contributor(s): ______________________________________. -->
<!-- File Menu -->
<broadcaster id="cmd_newNavigator"/>
<broadcaster id="cmd_newMessage"/>
<broadcaster id="cmd_newCard"/>
<broadcaster id="cmd_newEditor"/>
<broadcaster id="cmd_newEditorTemplate"/>
<broadcaster id="cmd_newEditorDraft"/>
<broadcaster id="cmd_quit"/>
<!-- Edit Menu -->
@ -85,10 +88,6 @@ Contributor(s): ______________________________________. -->
<broadcaster id="cmd_viewpersonaltoolbar" oncommand="goToggleToolbar('PersonalToolbar','cmd_viewpersonaltoolbar');" checked="true"/>
<broadcaster id="cmd_viewtaskbar" oncommand="goToggleToolbar('taskbar','cmd_viewtaskbar');" checked="true"/>
<broadcaster id="Browser:NewEditor" value="&newBlankPageCmd.label;" oncommand="BrowserNewEditorWindow();"/>
<broadcaster id="Browser:NewEditorTemplate" value="&newPageFromTemplateCmd.label;" disabled="true" oncommand="BrowserNewWindow();"/>
<broadcaster id="Browser:NewEditorDraft" value="&newPageFromDraftCmd.label;" disabled="true" oncommand="BrowserNewWindow();"/>
<broadcaster id="Browser:Open" value="&openCmd.label;" oncommand="BrowserOpenWindow();"/>
<broadcaster id="Browser:OpenFile" value="&openFileCmd.label;" oncommand="BrowserOpenFileWindow();"/>
@ -122,13 +121,14 @@ Contributor(s): ______________________________________. -->
<menuitem value="&browserCmd.label;" accesskey="&browserCmd.accesskey;" key="key_newNavigator" observes="cmd_newNavigator"/>
<menu id="menu_New">
<menupopup>
<menuitem accessKey="&newBlankPageCmd.accesskey;" key="newBlankPageKB" observes="Browser:NewEditor"/>
<menuitem accessKey="&newPageFromTemplateCmd.accesskey;" observes="Browser:NewEditorTemplate"/>
<menuitem accessKey="&newPageFromDraftCmd.accesskey;" observes="Browser:NewEditorDraft"/>
<!-- From globalOverlay.xul -->
<menuitem id="menu_newEditor" observes="cmd_newEditor"/>
<menuitem id="menu_newEditorTemplate" observes="cmd_newEditorTemplate"/>
<menuitem id="menu_newEditorDraft" observes="cmd_newEditorDraft"/>
<menuseparator/>
<menuitem id="menu_newNavigator"/>
<menuitem id="menu_newMessage"/>
<menuitem id="cmd_newCard"/>
<menuitem id="menu_newNavigator" observes="cmd_newNavigator"/>
<menuitem id="menu_newMessage" observes="cmd_newMessage"/>
<menuitem id="menu_newCard" observes="cmd_newCard"/>
</menupopup>
</menu>
<menuitem accesskey="&openCmd.accesskey;" key="openBrowserKb" observes="Browser:Open"/>

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

@ -13,13 +13,6 @@
<!-- LOCALIZATION NOTE fileMenu.label: Localize all the menu labels with accesskeys but not commandkeys. e.g. "File" -> "XXXX(F)" in Japanese -->
<!ENTITY browserCmd.label "New Navigator Window">
<!ENTITY browserCmd.accesskey "n">
<!ENTITY newBlankPageCmd.label "Blank Window">
<!ENTITY newBlankPageCmd.accesskey "b" >
<!ENTITY newBlankPageCmd.commandkey "n" >
<!ENTITY newPageFromTemplateCmd.label "Page Using Template">
<!ENTITY newPageFromTemplateCmd.accesskey "t">
<!ENTITY newPageFromDraftCmd.label "Page using Draft">
<!ENTITY newPageFromDraftCmd.accesskey "d">
<!ENTITY openCmd.label "Open Web Location...">
<!ENTITY openCmd.accesskey "o">
<!ENTITY openCmd.commandkey "o">

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

@ -12,9 +12,9 @@
<!ENTITY newMenu.label "New">
<!ENTITY newMailCmd.label "Mail Message">
<!ENTITY newChatCmd.label "Chat Window">
<!ENTITY newBlankPageCmd.label "Blank Window">
<!ENTITY newBlankPageCmd.label "Blank Page">
<!ENTITY newPageFromTemplateCmd.label "Page Using Template">
<!ENTITY newPageFromDraftCmd.label "Page using Draft">
<!ENTITY newPageFromDraftCmd.label "Page Using Draft">
<!ENTITY openCmd.label "Open">
<!ENTITY sendPageCmd.label "Send Page">
<!ENTITY offlineMenu.label "Offline">

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

@ -684,12 +684,8 @@ function OpenSearch(tabName, searchStr)
{
window.openDialog( "chrome://editor/content", "_blank", "chrome,all,dialog=no", url );
}
function BrowserNewEditorWindow()
{
// Open editor window to default page.
BrowserEditPage( "resource:/res/html/empty_doc.html" );
}
//Note: BrowserNewEditorWindow() was moved to globalOverlay.xul and renamed to NewEditorWindow()
function BrowserOpenWindow()
{

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

@ -36,11 +36,10 @@ Contributor(s): ______________________________________. -->
<!-- File Menu -->
<key id="key_newNavigator"/>
<key id="key_newMessage"/>
<key id="newBlankPageKB" disabled="false" command="true" shift="true" key="&newBlankPageCmd.commandkey;" observes="Browser:NewEditor"/>
<key id="openBrowserKb" disabled="false" command="true" key="&openCmd.commandkey;" observes="Browser:OpenUrl" />
<key id="openFileKb" disabled="false" command="true" key="&openFileCmd.commandkey;" observes="Browser:OpenFile" />
<key id="printKb" disabled="false" command="true" key="&printCmd.commandkey;" observes="Browser:Print" />
<key id="key_newBlankPage"/>
<key id="openBrowserKb" disabled="false" command="true" key="&openCmd.commandkey;" observes="Browser:OpenUrl" />
<key id="openFileKb" disabled="false" command="true" key="&openFileCmd.commandkey;" observes="Browser:OpenFile" />
<key id="printKb" disabled="false" command="true" key="&printCmd.commandkey;" observes="Browser:Print" />
<key id="key_close"/>
<key id="key_quit"/>
@ -69,6 +68,10 @@ Contributor(s): ______________________________________. -->
<!-- File Menu -->
<broadcaster id="cmd_newNavigator"/>
<broadcaster id="cmd_newMessage"/>
<broadcaster id="cmd_newCard"/>
<broadcaster id="cmd_newEditor"/>
<broadcaster id="cmd_newEditorTemplate"/>
<broadcaster id="cmd_newEditorDraft"/>
<broadcaster id="cmd_quit"/>
<!-- Edit Menu -->
@ -85,10 +88,6 @@ Contributor(s): ______________________________________. -->
<broadcaster id="cmd_viewpersonaltoolbar" oncommand="goToggleToolbar('PersonalToolbar','cmd_viewpersonaltoolbar');" checked="true"/>
<broadcaster id="cmd_viewtaskbar" oncommand="goToggleToolbar('taskbar','cmd_viewtaskbar');" checked="true"/>
<broadcaster id="Browser:NewEditor" value="&newBlankPageCmd.label;" oncommand="BrowserNewEditorWindow();"/>
<broadcaster id="Browser:NewEditorTemplate" value="&newPageFromTemplateCmd.label;" disabled="true" oncommand="BrowserNewWindow();"/>
<broadcaster id="Browser:NewEditorDraft" value="&newPageFromDraftCmd.label;" disabled="true" oncommand="BrowserNewWindow();"/>
<broadcaster id="Browser:Open" value="&openCmd.label;" oncommand="BrowserOpenWindow();"/>
<broadcaster id="Browser:OpenFile" value="&openFileCmd.label;" oncommand="BrowserOpenFileWindow();"/>
@ -122,13 +121,14 @@ Contributor(s): ______________________________________. -->
<menuitem value="&browserCmd.label;" accesskey="&browserCmd.accesskey;" key="key_newNavigator" observes="cmd_newNavigator"/>
<menu id="menu_New">
<menupopup>
<menuitem accessKey="&newBlankPageCmd.accesskey;" key="newBlankPageKB" observes="Browser:NewEditor"/>
<menuitem accessKey="&newPageFromTemplateCmd.accesskey;" observes="Browser:NewEditorTemplate"/>
<menuitem accessKey="&newPageFromDraftCmd.accesskey;" observes="Browser:NewEditorDraft"/>
<!-- From globalOverlay.xul -->
<menuitem id="menu_newEditor" observes="cmd_newEditor"/>
<menuitem id="menu_newEditorTemplate" observes="cmd_newEditorTemplate"/>
<menuitem id="menu_newEditorDraft" observes="cmd_newEditorDraft"/>
<menuseparator/>
<menuitem id="menu_newNavigator"/>
<menuitem id="menu_newMessage"/>
<menuitem id="cmd_newCard"/>
<menuitem id="menu_newNavigator" observes="cmd_newNavigator"/>
<menuitem id="menu_newMessage" observes="cmd_newMessage"/>
<menuitem id="menu_newCard" observes="cmd_newCard"/>
</menupopup>
</menu>
<menuitem accesskey="&openCmd.accesskey;" key="openBrowserKb" observes="Browser:Open"/>

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

@ -13,13 +13,6 @@
<!-- LOCALIZATION NOTE fileMenu.label: Localize all the menu labels with accesskeys but not commandkeys. e.g. "File" -> "XXXX(F)" in Japanese -->
<!ENTITY browserCmd.label "New Navigator Window">
<!ENTITY browserCmd.accesskey "n">
<!ENTITY newBlankPageCmd.label "Blank Window">
<!ENTITY newBlankPageCmd.accesskey "b" >
<!ENTITY newBlankPageCmd.commandkey "n" >
<!ENTITY newPageFromTemplateCmd.label "Page Using Template">
<!ENTITY newPageFromTemplateCmd.accesskey "t">
<!ENTITY newPageFromDraftCmd.label "Page using Draft">
<!ENTITY newPageFromDraftCmd.accesskey "d">
<!ENTITY openCmd.label "Open Web Location...">
<!ENTITY openCmd.accesskey "o">
<!ENTITY openCmd.commandkey "o">

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

@ -12,9 +12,9 @@
<!ENTITY newMenu.label "New">
<!ENTITY newMailCmd.label "Mail Message">
<!ENTITY newChatCmd.label "Chat Window">
<!ENTITY newBlankPageCmd.label "Blank Window">
<!ENTITY newBlankPageCmd.label "Blank Page">
<!ENTITY newPageFromTemplateCmd.label "Page Using Template">
<!ENTITY newPageFromDraftCmd.label "Page using Draft">
<!ENTITY newPageFromDraftCmd.label "Page Using Draft">
<!ENTITY openCmd.label "Open">
<!ENTITY sendPageCmd.label "Send Page">
<!ENTITY offlineMenu.label "Offline">

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

@ -182,3 +182,22 @@ function goUpdateGlobalEditMenuItems()
goUpdateCommand('cmd_delete');
}
// This used to be BrowserNewEditorWindow in navigator.js
function NewEditorWindow()
{
dump("In NewEditorWindow()...\n");
// Open editor window with blank page
// Kludge to leverage openDialog non-modal!
window.openDialog( "chrome://editor/content", "_blank", "chrome,all,dialog=no", "resource:/res/html/empty_doc.html");
}
function NewEditorFromTemplate()
{
dump("NOT IMPLEMENTED: Write NewEditorFromTemplate()!\n")
}
function NewEditorFromDraft()
{
dump("NOT IMPLEMENTED: Write NewEditorFromDraft()!\n")
}

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

@ -14,18 +14,26 @@
<menu id="menu_File" value="&fileMenu.label;" accesskey="&fileMenu.accesskey;"/>
<!-- New SubMenu (Under File Menu) -->
<broadcaster id="cmd_newNavigator" oncommand="OpenBrowserWindow()"/>
<broadcaster id="cmd_newMessage" oncommand="goOpenNewMessage()"/>
<broadcaster id="cmd_newCard" oncommand="goNewCardDialog(0)"/>
<broadcaster id="cmd_newEditor" oncommand="NewEditorWindow();"/>
<!-- NOT IMPLEMENTED, so temporarily disabled -->
<broadcaster id="cmd_newEditorTemplate" disabled="true" oncommand="NewEditorFromTemplate();"/>
<broadcaster id="cmd_newEditorDraft" disabled="true" oncommand="NewEditorFromDraft();"/>
<menuitem id="menu_newEditor" value="&newBlankPageCmd.label;" accesskey="&newBlankPageCmd.accesskey;" key="key_newBlankPage" observes="cmd_newEditor"/>
<menuitem id="menu_newEditorTemplate" value="&newPageFromTemplateCmd.label;" accesskey="&newPageFromTemplateCmd.accesskey;" observes="cmd_newEditorTemplate"/>
<menuitem id="menu_newEditorDraft" value="&newPageFromDraftCmd.label;" accesskey="&newPageFromDraftCmd.accesskey;" observes="cmd_newEditorDraft"/>
<menu id="menu_New" value="&newMenu.label;" accesskey="&newMenu.accesskey;"/>
<menuitem id="menu_newNavigator" value="&newNavigatorCmd.label;" accessKey="&newNavigatorCmd.accesskey;" key="key_newNavigator" observes="cmd_newNavigator"/>
<menuitem id="menu_newMessage" value="&newMessageCmd.label;" accessKey="&newMessageCmd.accesskey;" key="key_newMessage" observes="cmd_newMessage"/>
<menuitem id="cmd_newCard" value="&newCardCmd.label;" accessKey="&newCardCmd.accesskey;" key="key_newCard" oncommand="goNewCardDialog(0)"/>
<menuitem id="menu_newNavigator" value="&newNavigatorCmd.label;" accesskey="&newNavigatorCmd.accesskey;" key="key_newNavigator" observes="cmd_newNavigator"/>
<menuitem id="menu_newMessage" value="&newMessageCmd.label;" accesskey="&newMessageCmd.accesskey;" key="key_newMessage" observes="cmd_newMessage"/>
<menuitem id="menu_newCard" value="&newCardCmd.label;" accesskey="&newCardCmd.accesskey;" key="key_newCard" observes="cmd_newCard"/>
<broadcaster id="cmd_newNavigator"
oncommand="OpenBrowserWindow()"/>
<broadcaster id="cmd_newMessage"
oncommand="goOpenNewMessage()"/>
<key id="key_newNavigator" command="true" key="&newNavigatorCmd.key;" observes="cmd_newNavigator"/>
<key id="key_newMessage" command="true" key="&newMessageCmd.key;" observes="cmd_newMessage"/>
<key id="key_newBlankPage" command="true" shift="true" key="&newBlankPageCmd.key;" observes="cmd_newEditor"/>
<key id="key_newNavigator" command="true" key="&newNavigatorCmd.key;" observes="cmd_newNavigator"/>
<key id="key_newMessage" command="true" key="&newMessageCmd.key;" observes="cmd_newMessage"/>
<!-- Page Setup menu item -->
<menuitem id="menu_pageSetup" value="&pageSetupCmd.label;" oncommand="goPageSetup()"/>

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

@ -31,8 +31,6 @@ function toJavaConsole()
} catch(e) {
}
}
function toOpenWindowByType( inType, uri )
@ -50,65 +48,65 @@ function toOpenWindowByType( inType, uri )
}
function OpenBrowserWindow()
{
pref = Components.classes['component://netscape/preferences'];
// if all else fails, use trusty "about:blank" as the start page
var startpage = "about:blank";
if (pref) {
pref = pref.getService();
pref = pref.QueryInterface(Components.interfaces.nsIPref);
}
if (pref) {
// from mozilla/modules/libpref/src/init/all.js
// 0 = blank
// 1 = home (browser.startup.homepage)
// 2 = last
choice = 1;
try {
choice = pref.GetIntPref("browser.startup.page");
}
catch (ex) {
dump("failed to get the browser.startup.page pref\n");
}
switch (choice) {
case 0:
startpage = "about:blank";
break;
case 1:
try {
startpage = pref.CopyCharPref("browser.startup.homepage");
}
catch (ex) {
dump("failed to get the browser.startup.homepage pref\n");
startpage = "about:blank";
}
break;
case 2:
try {
var history = Components.classes["component://netscape/browser/global-history"].getService();
history = history.QueryInterface(Components.interfaces.nsIGlobalHistory);
startpage = history.GetLastPageVisted();
}
catch (ex) {
dump(ex +"\n");
}
break;
default:
startpage = "about:blank";
}
}
// window.open(startpage); // This doesn't size the window properly.
window.openDialog( "chrome://navigator/content/navigator.xul", "_blank", "chrome,all,dialog=no", startpage );
function OpenBrowserWindow()
{
dump("In OpenBrowserWindw()...\n");
pref = Components.classes['component://netscape/preferences'];
// if all else fails, use trusty "about:blank" as the start page
var startpage = "about:blank";
if (pref) {
pref = pref.getService();
pref = pref.QueryInterface(Components.interfaces.nsIPref);
}
if (pref) {
// from mozilla/modules/libpref/src/init/all.js
// 0 = blank
// 1 = home (browser.startup.homepage)
// 2 = last
choice = 1;
try {
choice = pref.GetIntPref("browser.startup.page");
}
catch (ex) {
dump("failed to get the browser.startup.page pref\n");
}
switch (choice) {
case 0:
startpage = "about:blank";
break;
case 1:
try {
startpage = pref.CopyCharPref("browser.startup.homepage");
}
catch (ex) {
dump("failed to get the browser.startup.homepage pref\n");
startpage = "about:blank";
}
break;
case 2:
try {
var history = Components.classes["component://netscape/browser/global-history"].getService();
history = history.QueryInterface(Components.interfaces.nsIGlobalHistory);
startpage = history.GetLastPageVisted();
}
catch (ex) {
dump(ex +"\n");
}
break;
default:
startpage = "about:blank";
}
}
// window.open(startpage); // This doesn't size the window properly.
window.openDialog( "chrome://navigator/content/navigator.xul", "_blank", "chrome,all,dialog=no", startpage );
}
function CycleWindow( inType, inChromeURL )
{
var windowManager = Components.classes['component://netscape/rdf/datasource?name=window-mediator'].getService();
@ -168,16 +166,18 @@ function CycleWindow( inType, inChromeURL )
else
{
dump("open window \n");
window.OpenBrowserWindow( );
window.OpenBrowserWindow();
}
}
function toEditor()
{
//TODO: Find and existing editor window using CycleWindow()
// For now, this opens a new blank window
window.openDialog( "chrome://editor/content/EditorAppShell.xul",
"_blank",
"chrome,dialog=no,all",
"chrome://editor/content/EditorInitPage.html" );
"resource:/res/html/empty_doc.html" );
}
function toNewTextEditorWindow()
@ -185,7 +185,7 @@ function toNewTextEditorWindow()
window.openDialog( "chrome://editor/content/TextEditorAppShell.xul",
"_blank",
"chrome,dialog=no,all",
"chrome://editor/content/EditorInitPagePlain.html" );
"resource:/res/html/empty_doc.html");
}
function ShowWindowFromResource( node )

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

@ -24,8 +24,8 @@
<menupopup id="taskPopup">
<menuitem value="&navigatorCmd.label;" oncommand="toNavigator()"/>
<menuitem value="&messengerCmd.label;" oncommand="toMessengerWindow()"/>
<menuitem value="&editorCmd.label;" oncommand="toEditor();" />
<menuitem value="&textEditorCmd.label;" oncommand="toNewTextEditorWindow();" />
<menuitem value="&editorCmd.label;" oncommand="toEditor();" />
<menuitem value="&textEditorCmd.label;" oncommand="toNewTextEditorWindow();" />
<menuseparator/>
<menuitem value="&addressBookCmd.label;" oncommand="toAddressBook()"/>
<menuitem value="&newsgroupsCmd.label;" oncommand="toNewsgroups()"/>

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

@ -16,11 +16,11 @@
<spring style="width:20px"/>
<titledbutton id="ok" value="&okButton.label;" default="true" align="right" onclick="doOKButton()"/>
<spring style="width:10px"/>
<titledbutton id="cancel" value="&cancelButton.label;" onclick="doCancelButton()"/>
<spring style="width:10px"/>
<titledbutton id="Button2" value="&cancelButton.label;" style = "display:none;" onclick="doButton2()"/>
<spring style="width:10px"/>
<titledbutton id="Button3" value="&cancelButton.label;" style = "display:none;" onclick="doButton3()"/>
<spring style="width:10px"/>
<titledbutton id="cancel" value="&cancelButton.label;" onclick="doCancelButton()"/>
<spring flex="100%"/>
</box>

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

@ -6,6 +6,13 @@
<!ENTITY fileMenu.accesskey "f">
<!ENTITY newMenu.label "New">
<!ENTITY newMenu.accesskey "e">
<!ENTITY newBlankPageCmd.label "Edit Blank Page">
<!ENTITY newBlankPageCmd.accesskey "b" >
<!ENTITY newBlankPageCmd.key "n" >
<!ENTITY newPageFromTemplateCmd.label "Page Using Template">
<!ENTITY newPageFromTemplateCmd.accesskey "t">
<!ENTITY newPageFromDraftCmd.label "Page Using Draft">
<!ENTITY newPageFromDraftCmd.accesskey "d">
<!ENTITY newNavigatorCmd.label "Navigator Window">
<!ENTITY newNavigatorCmd.key "N">
<!ENTITY newNavigatorCmd.accesskey "n">

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

@ -1026,7 +1026,7 @@ window html|input[type=text] {
margin-right: 3px;
background-color: white;
color: black;
min-height: 1.75em;
min-height: 1.6em;
}
window html|input[type=password] {
@ -1067,4 +1067,3 @@ window html|input[type=checkbox] {
border: 1px inset rgb(192, 192, 192);
color:black;
}