expose interface to the initAtStartup setting
This commit is contained in:
rginda%netscape.com 2001-10-31 23:33:41 +00:00
Родитель f947caa567
Коммит da857da996
4 изменённых файлов: 92 добавлений и 83 удалений

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

@ -137,6 +137,36 @@ function con_ondc ()
console.sourceView.outliner.invalidate();
}
console.onDebugMenuShowing =
function con_showdebug ()
{
console.ui["menu_initAtStartup"].setAttribute ("checked",
console.jsds.initAtStartup);
var check;
switch (getThrowMode())
{
case TMODE_IGNORE:
check = "menu_TModeIgnore";
break;
case TMODE_TRACE:
check = "menu_TModeTrace";
break;
case TMODE_BREAK:
check = "menu_TModeBreak";
break;
}
var menu = console.ui["menu_TModeIgnore"];
console.ui["menu_TModeIgnore"].setAttribute("checked",
"menu_TModeIgnore" == check);
console.ui["menu_TModeTrace"].setAttribute("checked",
"menu_TModeTrace" == check);
console.ui["menu_TModeBreak"].setAttribute("checked",
"menu_TModeBreak" == check);
}
console.onLoad =
function con_load (e)
{
@ -444,7 +474,7 @@ function cli_ihelp (e)
for (var i in ary)
{
display (getMsg(MSN_FMT_USAGE, [ary[i].name, ary[i].usage], MT_USAGE));
display (getMsg(MSN_FMT_USAGE, [ary[i].name, ary[i].usage]), MT_USAGE);
display (ary[i].help, MT_HELP);
}
@ -928,34 +958,6 @@ function con_tabcomplete (e)
}
console.onTModeMenuCreate =
function con_tmodecreate()
{
var check;
switch (getThrowMode())
{
case TMODE_IGNORE:
check = "menu_TModeIgnore";
break;
case TMODE_TRACE:
check = "menu_TModeTrace";
break;
case TMODE_BREAK:
check = "menu_TModeBreak";
break;
}
var menu = document.getElementById("menu_TModeIgnore");
menu.setAttribute("checked", "menu_TModeIgnore" == check);
menu = document.getElementById("menu_TModeTrace");
menu.setAttribute("checked", "menu_TModeTrace" == check);
menu = document.getElementById("menu_TModeBreak");
menu.setAttribute("checked", "menu_TModeBreak" == check);
}
console.onUnload =
function con_unload (e)
{

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

@ -74,6 +74,8 @@
<command id="cmd_tmode_break" oncommand="setThrowMode(TMODE_BREAK);"/>
<command id="cmd_stop" oncommand="console.doCommandToggleStop();"/>
<command id="cmd_reload" oncommand="console.doCommandReload();"/>
<command id="cmd_init_at_startup"
oncommand="console.jsds.initAtStartup = !console.jsds.initAtStartup"/>
<!-- Tasks commands, from overlay -->
<commandset id="tasksCommands"/>
@ -167,7 +169,8 @@
<!-- Debug menu -->
<menu id="menu_Debug" label="&Debug.label;" accesskey="&Debug.aKey;">
<menupopup id="menu_DebugPopup">
<menupopup id="menu_DebugPopup"
onpopupshowing="console.onDebugMenuShowing(event);">
<menuitem id="menu_Stop" key="key_stop"
observes="cmd_stop"
label="&Stop.label;" accesskey="&Stop.aKey;"/>
@ -184,27 +187,24 @@
observes="cmd_step_out"
label="&StepOut.label;" accesskey="&StepOut.aKey;"/>
<menuseparator/>
<menu id="menu_ThrowMode" label="&TModeMenu.label;"
accesskey="&TModeMenu.aKey;">
<menupopup onpopupshowing="console.onTModeMenuCreate();">
<menuitem id="menu_TModeIgnore"
observes="cmd_tmode_ignore" type="radio"
label="&TModeIgnore.label;"
accesskey="&TModeIgnore.aKey;"/>
<menuitem id="menu_TModeTrace"
observes="cmd_tmode_trace" type="radio"
label="&TModeTrace.label;"
accesskey="&TModeTrace.aKey;"/>
<menuitem id="menu_TModeBreak"
observes="cmd_tmode_break" type="radio"
label="&TModeBreak.label;"
accesskey="&TModeBreak.aKey;"/>
<menuseparator/>
<menuitem id="menu_TModeCycle" label = "&TModeCycle.label;"
observes="cmd_tmode_cycle" key="key_tmode_cycle"
accesskey="&TModeCycle.aKey;"/>
</menupopup>
</menu>
<menuitem id="menu_TModeIgnore"
observes="cmd_tmode_ignore" type="radio"
label="&TModeIgnore.label;"
accesskey="&TModeIgnore.aKey;"/>
<menuitem id="menu_TModeTrace"
observes="cmd_tmode_trace" type="radio"
label="&TModeTrace.label;"
accesskey="&TModeTrace.aKey;"/>
<menuitem id="menu_TModeBreak"
observes="cmd_tmode_break" type="radio"
label="&TModeBreak.label;"
accesskey="&TModeBreak.aKey;"/>
<menuseparator/>
<menuitem id="menu_initAtStartup" observes="cmd_init_at_startup"
type="checkbox"
label="&InitAtStartup.label;" accesskey="&InitAtStartup.aKey;"/>
</menupopup>
</menu>

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

@ -403,8 +403,16 @@ function init()
display(getMsg(MSN_VERSION, console.version), MT_HELLO);
displayCommands();
console._statusElement = document.getElementById ("status-text");
console.ui = new Object();
console.ui["menu_initAtStartup"] =
document.getElementById ("menu_initAtStartup");
console.ui["menu_TModeIgnore"] = document.getElementById("menu_TModeIgnore");
console.ui["menu_TModeTrace"] = document.getElementById("menu_TModeTrace");
console.ui["menu_TModeBreak"] = document.getElementById("menu_TModeBreak");
console.ui["status-text"] = document.getElementById ("status-text");
console._statusStack = new Array();
startupTests();
}
@ -570,7 +578,7 @@ console.load = load;
console.__defineGetter__ ("status", con_getstatus);
function con_getstatus ()
{
return console._statusElement.getAttribute ("label");
return console.ui["status-text"].getAttribute ("label");
}
console.__defineSetter__ ("status", con_setstatus);
@ -579,7 +587,7 @@ function con_setstatus (msg)
if (!msg)
msg = console._statusStack[console._statusStack.length - 1];
console._statusElement.setAttribute ("label", msg);
console.ui["status-text"].setAttribute ("label", msg);
}
console.pushStatus =

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

@ -34,37 +34,35 @@
-
-->
<!ENTITY app.name.short "venkman">
<!ENTITY app.name.long "JavaScript Debugger">
<!ENTITY app.version "prototype_a">
<!ENTITY app.author "mozilla.org">
<!ENTITY MainWindow.title "JavaScript Debugger">
<!ENTITY Reload.label "Reload">
<!ENTITY Reload.aKey "R">
<!ENTITY Debug.label "Debug">
<!ENTITY Debug.aKey "D">
<!ENTITY Cont.label "Continue">
<!ENTITY Cont.aKey "C">
<!ENTITY StepIn.label "Step Into">
<!ENTITY StepIn.aKey "I">
<!ENTITY StepOver.label "Step Over">
<!ENTITY StepOver.aKey "O">
<!ENTITY StepOut.label "Step Out">
<!ENTITY StepOut.aKey "T">
<!ENTITY Stop.label "Stop">
<!ENTITY Stop.aKey "p">
<!ENTITY TModeMenu.label "Exceptions">
<!ENTITY TModeMenu.aKey "E">
<!ENTITY TModeIgnore.label "Ignore">
<!ENTITY TModeIgnore.aKey "I">
<!ENTITY TModeTrace.label "Trace">
<!ENTITY TModeTrace.aKey "T">
<!ENTITY TModeBreak.label "Break">
<!ENTITY TModeBreak.aKey "B">
<!ENTITY TModeCycle.label "Cycle">
<!ENTITY TModeCycle.aKey "C">
<!-- view menu -->
<!ENTITY Reload.label "Reload">
<!ENTITY Reload.aKey "R">
<!-- debug menu -->
<!ENTITY Debug.label "Debug">
<!ENTITY Debug.aKey "D">
<!ENTITY Cont.label "Continue">
<!ENTITY Cont.aKey "C">
<!ENTITY StepIn.label "Step Into">
<!ENTITY StepIn.aKey "I">
<!ENTITY StepOver.label "Step Over">
<!ENTITY StepOver.aKey "O">
<!ENTITY StepOut.label "Step Out">
<!ENTITY StepOut.aKey "t">
<!ENTITY Stop.label "Stop">
<!ENTITY Stop.aKey "p">
<!ENTITY TModeIgnore.label "Ignore Exceptions">
<!ENTITY TModeIgnore.aKey "g">
<!ENTITY TModeTrace.label "Trace Exceptions">
<!ENTITY TModeTrace.aKey "r">
<!ENTITY TModeBreak.label "Stop for Exceptions">
<!ENTITY TModeBreak.aKey "E">
<!ENTITY InitAtStartup.label "Initialize at Startup">
<!ENTITY InitAtStartup.aKey "n">
<!-- toolips -->
<!ENTITY Cont.tooltip "Continue debugging">
<!ENTITY Stop.tooltip "Stop the current operation">
<!ENTITY StepOver.tooltip "Step over statement">
@ -73,6 +71,7 @@
<!ENTITY DebugBar.tooltip "Debugging Toolbar">
<!ENTITY MenuBar.tooltip "Menu Bar">
<!-- status bar -->
<!ENTITY StatusText.label "Welcome to the JavaScript Debugger">
<!-- source outliner -->