mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-09 20:45:45 +01:00
Add *basic* context menu to the MOW.
--HG-- extra : rebase_source : c1ce793f6242b8046b3a15cdcc7cdd0d16b43af5
This commit is contained in:
@@ -149,6 +149,8 @@ const CommandWidgets = Class("CommandWidgets", {
|
|||||||
multilineOutput: Class.memoize(function () {
|
multilineOutput: Class.memoize(function () {
|
||||||
let elem = document.getElementById("dactyl-multiline-output");
|
let elem = document.getElementById("dactyl-multiline-output");
|
||||||
elem.contentDocument.body.id = "dactyl-multiline-output-content";
|
elem.contentDocument.body.id = "dactyl-multiline-output-content";
|
||||||
|
document.getElementById("dactyl-context-copylink").style.listStyleImage =
|
||||||
|
util.computedStyle(document.getElementById("context-copylink")).listStyleImage;
|
||||||
return elem;
|
return elem;
|
||||||
}),
|
}),
|
||||||
multilineInput: Class.memoize(function () document.getElementById("dactyl-multiline-input")),
|
multilineInput: Class.memoize(function () document.getElementById("dactyl-multiline-input")),
|
||||||
@@ -883,23 +885,22 @@ const CommandLine = Module("commandline", {
|
|||||||
return dactyl.commands[command](event);
|
return dactyl.commands[command](event);
|
||||||
else
|
else
|
||||||
openLink(dactyl.CURRENT_TAB);
|
openLink(dactyl.CURRENT_TAB);
|
||||||
break;
|
return false;
|
||||||
case "<MiddleMouse>":
|
case "<MiddleMouse>":
|
||||||
case "<C-LeftMouse>":
|
case "<C-LeftMouse>":
|
||||||
case "<C-M-LeftMouse>":
|
case "<C-M-LeftMouse>":
|
||||||
openLink({ where: dactyl.NEW_TAB, background: true });
|
openLink({ where: dactyl.NEW_TAB, background: true });
|
||||||
break;
|
return false;
|
||||||
case "<S-MiddleMouse>":
|
case "<S-MiddleMouse>":
|
||||||
case "<C-S-LeftMouse>":
|
case "<C-S-LeftMouse>":
|
||||||
case "<C-M-S-LeftMouse>":
|
case "<C-M-S-LeftMouse>":
|
||||||
openLink({ where: dactyl.NEW_TAB, background: false });
|
openLink({ where: dactyl.NEW_TAB, background: false });
|
||||||
break;
|
return false;
|
||||||
case "<S-LeftMouse>":
|
case "<S-LeftMouse>":
|
||||||
openLink(dactyl.NEW_WINDOW);
|
openLink(dactyl.NEW_WINDOW);
|
||||||
break;
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._startHints) {
|
if (this._startHints) {
|
||||||
|
|||||||
@@ -35,15 +35,22 @@
|
|||||||
<popupset>
|
<popupset>
|
||||||
<panel id="dactyl-visualbell" dactyl:highlight="Bell"
|
<panel id="dactyl-visualbell" dactyl:highlight="Bell"
|
||||||
noautohide="true" noautofocus="true"/>
|
noautohide="true" noautofocus="true"/>
|
||||||
|
|
||||||
|
<menupopup id="dactyl-contextmenu"
|
||||||
|
onpopupshowing="return event.target != this || document.popupNode instanceof HTMLAnchorElement;">
|
||||||
|
<menuitem id="dactyl-context-copylink"
|
||||||
|
label="Copy Link Location"
|
||||||
|
oncommand="goDoCommand('cmd_copyLink');"/>
|
||||||
|
</menupopup>
|
||||||
</popupset>
|
</popupset>
|
||||||
|
|
||||||
<!--this notifies us also of focus events in the XUL
|
<!--this notifies us also of focus events in the XUL
|
||||||
from: http://developer.mozilla.org/en/docs/XUL_Tutorial:Updating_Commands !-->
|
from: http://developer.mozilla.org/en/docs/XUL_Tutorial:Updating_Commands !-->
|
||||||
<!-- I don't think we really need this. ––Kris -->
|
<!-- I don't think we really need this. ––Kris -->
|
||||||
<commandset id="onPentadactylFocus" commandupdater="true" events="focus"
|
<commandset id="onPentadactylFocus" commandupdater="true" events="focus"
|
||||||
oncommandupdate="&events;.onFocusChange(event);"/>
|
oncommandupdate="&events;.onFocusChange(event);"/>
|
||||||
<commandset id="onPentadactylSelect" commandupdater="true" events="select"
|
<commandset id="onPentadactylSelect" commandupdater="true" events="select"
|
||||||
oncommandupdate="&events;.onSelectionChange(event);"/>
|
oncommandupdate="&events;.onSelectionChange(event);"/>
|
||||||
</window>
|
</window>
|
||||||
|
|
||||||
<vbox id="browser-bottombox">
|
<vbox id="browser-bottombox">
|
||||||
@@ -51,20 +58,21 @@
|
|||||||
therefore we need to put them into a <vbox> for which that works just fine -->
|
therefore we need to put them into a <vbox> for which that works just fine -->
|
||||||
<vbox class="dactyl-container" hidden="false" collapsed="true">
|
<vbox class="dactyl-container" hidden="false" collapsed="true">
|
||||||
<iframe id="dactyl-multiline-output" src="chrome://dactyl/content/buffer.xhtml"
|
<iframe id="dactyl-multiline-output" src="chrome://dactyl/content/buffer.xhtml"
|
||||||
flex="1" hidden="false" collapsed="false"
|
flex="1" hidden="false" collapsed="false"
|
||||||
onclick="&commandline;.onMultilineOutputEvent(event)"/>
|
contextmenu="dactyl-contextmenu"
|
||||||
|
onclick="&commandline;.onMultilineOutputEvent(event)"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
|
||||||
<vbox class="dactyl-container" hidden="false" collapsed="true">
|
<vbox class="dactyl-container" hidden="false" collapsed="true">
|
||||||
<iframe class="dactyl-completions" id="dactyl-completions-dactyl-commandline" src="chrome://dactyl/content/buffer.xhtml"
|
<iframe class="dactyl-completions" id="dactyl-completions-dactyl-commandline" src="chrome://dactyl/content/buffer.xhtml"
|
||||||
flex="1" hidden="false" collapsed="false"
|
flex="1" hidden="false" collapsed="false"
|
||||||
onclick="&commandline;.onMultilineOutputEvent(event)"/>
|
onclick="&commandline;.onMultilineOutputEvent(event)"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
|
||||||
<vbox id="dactyl-completions-&status;commandline-container" class="dactyl-container" hidden="false" collapsed="true" insertbefore="addon-bar,status-bar">
|
<vbox id="dactyl-completions-&status;commandline-container" class="dactyl-container" hidden="false" collapsed="true" insertbefore="addon-bar,status-bar">
|
||||||
<iframe class="dactyl-completions" id="dactyl-completions-&status;commandline" src="chrome://dactyl/content/buffer.xhtml"
|
<iframe class="dactyl-completions" id="dactyl-completions-&status;commandline" src="chrome://dactyl/content/buffer.xhtml"
|
||||||
flex="1" hidden="false" collapsed="false"
|
flex="1" hidden="false" collapsed="false"
|
||||||
onclick="&commandline;.onMultilineOutputEvent(event)"/>
|
onclick="&commandline;.onMultilineOutputEvent(event)"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
|
||||||
<stack orient="horizontal" align="stretch" class="dactyl-container" id="dactyl-container" dactyl:highlight="CmdLine CmdCmdLine">
|
<stack orient="horizontal" align="stretch" class="dactyl-container" id="dactyl-container" dactyl:highlight="CmdLine CmdCmdLine">
|
||||||
@@ -74,8 +82,8 @@
|
|||||||
<hbox id="dactyl-commandline" hidden="false" class="dactyl-container" dactyl:highlight="Normal CmdNormal" collapsed="true">
|
<hbox id="dactyl-commandline" hidden="false" class="dactyl-container" dactyl:highlight="Normal CmdNormal" collapsed="true">
|
||||||
<label id="dactyl-commandline-prompt" class="dactyl-commandline-prompt plain" flex="0" crop="end" value="" collapsed="true"/>
|
<label id="dactyl-commandline-prompt" class="dactyl-commandline-prompt plain" flex="0" crop="end" value="" collapsed="true"/>
|
||||||
<textbox id="dactyl-commandline-command" class="dactyl-commandline-command plain" flex="1" type="input" timeout="100"
|
<textbox id="dactyl-commandline-command" class="dactyl-commandline-command plain" flex="1" type="input" timeout="100"
|
||||||
oninput="&commandline;.onEvent(event);" onkeyup="&commandline;.onEvent(event);"
|
oninput="&commandline;.onEvent(event);" onkeyup="&commandline;.onEvent(event);"
|
||||||
onfocus="&commandline;.onEvent(event);" onblur="&commandline;.onEvent(event);"/>
|
onfocus="&commandline;.onEvent(event);" onblur="&commandline;.onEvent(event);"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</stack>
|
</stack>
|
||||||
|
|
||||||
@@ -98,8 +106,8 @@
|
|||||||
<hbox id="&status;commandline" hidden="false" class="dactyl-container" dactyl:highlight="Normal StatusNormal" collapsed="true">
|
<hbox id="&status;commandline" hidden="false" class="dactyl-container" dactyl:highlight="Normal StatusNormal" collapsed="true">
|
||||||
<label id="&status;commandline-prompt" class="dactyl-commandline-prompt plain" flex="0" crop="end" value="" collapsed="true"/>
|
<label id="&status;commandline-prompt" class="dactyl-commandline-prompt plain" flex="0" crop="end" value="" collapsed="true"/>
|
||||||
<textbox id="&status;commandline-command" class="dactyl-commandline-command plain" flex="1" type="text" timeout="100"
|
<textbox id="&status;commandline-command" class="dactyl-commandline-command plain" flex="1" type="text" timeout="100"
|
||||||
oninput="&commandline;.onEvent(event);" onkeyup="&commandline;.onEvent(event);"
|
oninput="&commandline;.onEvent(event);" onkeyup="&commandline;.onEvent(event);"
|
||||||
onfocus="&commandline;.onEvent(event);" onblur="&commandline;.onEvent(event);"/>
|
onfocus="&commandline;.onEvent(event);" onblur="&commandline;.onEvent(event);"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</stack>
|
</stack>
|
||||||
<label class="plain" id="&status;inputbuffer" flex="0"/>
|
<label class="plain" id="&status;inputbuffer" flex="0"/>
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ FEATURES:
|
|||||||
8 adaptive timeout for auto-completions, :set completions can be updated more often than
|
8 adaptive timeout for auto-completions, :set completions can be updated more often than
|
||||||
:open foo
|
:open foo
|
||||||
8 use the storage module for autocommands
|
8 use the storage module for autocommands
|
||||||
8 support 'activate' in buffer.followLink?
|
|
||||||
8 add support for filename special characters such as %
|
8 add support for filename special characters such as %
|
||||||
8 :redir and 'verbosefile'
|
8 :redir and 'verbosefile'
|
||||||
8 middleclick in content == p, and if command line is open, paste there the clipboard buffer
|
8 middleclick in content == p, and if command line is open, paste there the clipboard buffer
|
||||||
|
|||||||
Reference in New Issue
Block a user