1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-21 16:55:46 +01:00

Preparation for a future commit and fix ;F in the MOW.

This commit is contained in:
Kris Maglione
2010-09-26 10:36:46 -04:00
parent a1aa473440
commit c8faebba0a
8 changed files with 205 additions and 148 deletions

View File

@@ -9,8 +9,11 @@
<?xml-stylesheet href="chrome://dactyl/skin/dactyl.css" type="text/css"?>
<!DOCTYPE overlay SYSTEM "dactyl.dtd" [
<!ENTITY dactyl.content "chrome://dactyl/content/">
<!ENTITY and "&amp;&amp;">
<!ENTITY dactyl.content "chrome://dactyl/content/">
<!ENTITY commandline "window.dactyl &and; dactyl.modules.commandline">
<!ENTITY events "if (window.dactyl &and; dactyl.modules.loaded.events) dactyl.modules.events">
<!ENTITY status "dactyl-statusline-field-">
]>
<overlay id="dactyl"
@@ -24,8 +27,8 @@
<window id="&dactyl.mainWindow;">
<keyset id="mainKeyset">
<key id="key_open_vimbar" key=":" oncommand="window.dactyl &and; dactyl.modules.commandline.open(':', '', dactyl.modules.modes.EX);" modifiers=""/>
<key id="key_stop" keycode="VK_ESCAPE" oncommand="window.dactyl &and; dactyl.modules.events.onEscape();"/>
<!-- Why do we need this? Kris -->
<key id="key_stop" keycode="VK_ESCAPE" oncommand="&events;.onEscape();"/>
<!-- other keys are handled inside the event loop in events.js -->
</keyset>
@@ -35,61 +38,68 @@
<!--this notifies us also of focus events in the XUL
from: http://developer.mozilla.org/en/docs/XUL_Tutorial:Updating_Commands !-->
<commandset id="onPentadactylFocus"
commandupdater="true"
events="focus"
oncommandupdate="if (window.dactyl &and; dactyl.modules.loaded.events) dactyl.modules.events.onFocusChange(event);"/>
<commandset id="onPentadactylSelect"
commandupdater="true"
events="select"
oncommandupdate="if (window.dactyl &and; dactyl.modules.loaded.events) dactyl.modules.events.onSelectionChange(event);"/>
<!-- I don't think we really need this. Kris -->
<commandset id="onPentadactylFocus" commandupdater="true" events="focus"
oncommandupdate="&events;.onFocusChange(event);"/>
<commandset id="onPentadactylSelect" commandupdater="true" events="select"
oncommandupdate="&events;.onSelectionChange(event);"/>
<!-- As of Firefox 3.1pre, iframe.height changes do not seem to have immediate effect,
therefore we need to put them into a <vbox> for which that works just fine -->
<vbox class="dactyl-container" hidden="false" collapsed="true">
<iframe id="dactyl-multiline-output" src="chrome://dactyl/content/buffer.xhtml"
flex="1" hidden="false" collapsed="false"
onclick="window.dactyl &and; dactyl.modules.commandline.onMultilineOutputEvent(event)"/>
onclick="&commandline;.onMultilineOutputEvent(event)"/>
</vbox>
<vbox class="dactyl-container" hidden="false" collapsed="true">
<iframe id="dactyl-completions" src="chrome://dactyl/content/buffer.xhtml"
flex="1" hidden="false" collapsed="false"
onclick="window.dactyl &and; dactyl.modules.commandline.onMultilineOutputEvent(event)"/>
onclick="&commandline;.onMultilineOutputEvent(event)"/>
</vbox>
<stack orient="horizontal" align="stretch" class="dactyl-container" dactyl:highlight="CmdLine">
<textbox class="plain" id="dactyl-mode" flex="1" readonly="true" dactyl:highlight="Normal"/>
<textbox class="plain" id="dactyl-message" flex="1" readonly="true" dactyl:highlight="Normal"/>
<hbox id="dactyl-commandline" hidden="false" collapsed="true" class="dactyl-container" dactyl:highlight="Normal">
<label class="plain" id="dactyl-commandline-prompt" flex="0" crop="end" value="" collapsed="true"/>
<hbox id="dactyl-commandline" hidden="false" class="dactyl-container" dactyl:highlight="Normal" collapsed="true">
<label class="plain" id="dactyl-commandline-prompt" flex="0" crop="end" value="" collapsed="true"/>
<textbox class="plain" id="dactyl-commandline-command" flex="1" type="search" timeout="100"
oninput="window.dactyl &and; dactyl.modules.commandline.onEvent(event);"
onkeyup="window.dactyl &and; dactyl.modules.commandline.onEvent(event);"
onfocus="window.dactyl &and; dactyl.modules.commandline.onEvent(event);"
onblur="window.dactyl &and; dactyl.modules.commandline.onEvent(event);"/>
oninput="&commandline;.onEvent(event);" onkeyup="&commandline;.onEvent(event);"
onfocus="&commandline;.onEvent(event);" onblur="&commandline;.onEvent(event);"/>
</hbox>
</stack>
<vbox class="dactyl-container" hidden="false" collapsed="false" dactyl:highlight="CmdLine">
<textbox id="dactyl-multiline-input" class="plain" flex="1" rows="1" hidden="false" collapsed="true" multiline="true" dactyl:highlight="Normal"
onkeypress="window.dactyl &and; dactyl.modules.commandline.onMultilineInputEvent(event);"
oninput="window.dactyl &and; dactyl.modules.commandline.onMultilineInputEvent(event);"
onblur="window.dactyl &and; dactyl.modules.commandline.onMultilineInputEvent(event);"/>
onkeypress="&commandline;.onMultilineInputEvent(event);" oninput="&commandline;.onMultilineInputEvent(event);"
onblur="&commandline;.onMultilineInputEvent(event);"/>
</vbox>
</window>
<statusbar id="status-bar" dactyl:highlight="StatusLine">
<hbox insertbefore="&dactyl.statusBefore;" insertafter="&dactyl.statusAfter;"
id="dactyl-statusline-field-status" flex="1" hidden="false" align="center">
<textbox class="plain" id="dactyl-statusline-field-url" readonly="false" flex="1" crop="end"/>
<label class="plain" id="dactyl-statusline-field-inputbuffer" flex="0"/>
<label class="plain" id="dactyl-statusline-field-progress" flex="0"/>
<label class="plain" id="dactyl-statusline-field-tabcount" flex="0"/>
<label class="plain" id="dactyl-statusline-field-bufferposition" flex="0"/>
<label class="plain" id="dactyl-statusline-field-zoomlevel" flex="0"/>
id="&status;status" flex="1" hidden="false" align="center">
<stack orient="horizontal" align="stretch" flex="1" class="dactyl-container" dactyl:highlight="CmdLine">
<textbox class="plain" id="&status;url" flex="1" readonly="false" crop="end"/>
<textbox class="plain" id="&status;mode" flex="1" readonly="true" collapsed="true" dactyl:highlight="Normal"/>
<textbox class="plain" id="&status;message" flex="1" readonly="true" collapsed="true" dactyl:highlight="Normal"/>
<hbox id="&status;commandline" hidden="false" class="dactyl-container" dactyl:highlight="Normal" collapsed="true">
<label class="plain" id="&status;commandline-prompt" flex="0" crop="end" value="" collapsed="true"/>
<textbox class="plain" id="&status;commandline-command" flex="1" type="search" timeout="100"
oninput="&commandline;.onEvent(event);" onkeyup="&commandline;.onEvent(event);"
onfocus="&commandline;.onEvent(event);" onblur="&commandline;.onEvent(event);"/>
</hbox>
</stack>
<label class="plain" id="&status;inputbuffer" flex="0"/>
<label class="plain" id="&status;progress" flex="0"/>
<label class="plain" id="&status;tabcount" flex="0"/>
<label class="plain" id="&status;bufferposition" flex="0"/>
<label class="plain" id="&status;zoomlevel" flex="0"/>
</hbox>
<!-- just hide them since other elements expect them -->
<statusbarpanel id="statusbar-display" hidden="true"/>
<statusbarpanel id="statusbar-display" hidden="true"/>
<statusbarpanel id="statusbar-progresspanel" hidden="true"/>
</statusbar>
</overlay>