1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-07 08:25:46 +01:00

revert to using the text box for echoing commands

This commit is contained in:
Doug Kearns
2007-10-09 04:40:28 +00:00
parent 90ce247e46
commit 8ce3760795
2 changed files with 8 additions and 14 deletions

View File

@@ -133,17 +133,14 @@ function CommandLine() //{{{
}
// sets the prompt - for example, : or /
function setPrompt(prompt)
function setPrompt(pmt)
{
prompt_widget.value = prompt;
prompt_widget.value = pmt;
if (prompt)
if (pmt)
{
// initially (in the xul) the prompt is 'collapsed', this makes
// sure it's visible, then we toggle the display which works better
prompt_widget.style.visibility = 'visible';
prompt_widget.style.display = 'inline';
prompt_widget.size = prompt.length;
prompt_widget.size = pmt.length;
prompt_widget.collapsed = false;
}
else
{
@@ -154,17 +151,14 @@ function CommandLine() //{{{
// sets the command - e.g. 'tabopen', 'open http://example.com/'
function setCommand(cmd)
{
command_widget.hidden = false;
command_widget.value = cmd;
}
// NOTE: we use the prompt label now rather than the command textbox since
// updating a label is noticeably faster
function setLine(str, highlight_group)
{
command_widget.hidden = true;
setHighlightGroup(highlight_group);
setPrompt(str);
setPrompt("");
setCommand(str);
}
// TODO: extract CSS

View File

@@ -122,7 +122,7 @@ the terms of any one of the MPL, the GPL or the LGPL.
<hbox id="vimperator-commandline" hidden="false" class="hl-Normal">
<label class="plain" id="vimperator-commandline-prompt" flex="0" crop="end" value="" collapsed="true"/>
<textbox class="plain" id="vimperator-commandline-command" flex="1" hidden="false" type="timed" timeout="100"
<textbox class="plain" id="vimperator-commandline-command" flex="1" type="timed" timeout="100"
onkeypress="vimperator.commandline.onEvent(event);"
oninput="vimperator.commandline.onEvent(event);"
onfocus="vimperator.commandline.onEvent(event);"