1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-26 08:41:25 +02:00

Add *basic* context menu to the MOW.

--HG--
extra : rebase_source : c1ce793f6242b8046b3a15cdcc7cdd0d16b43af5
This commit is contained in:
Kris Maglione
2010-09-28 12:02:47 -04:00
parent 066e8c0b1a
commit a11246711a
3 changed files with 27 additions and 19 deletions
+7 -6
View File
@@ -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) {
+8
View File
@@ -35,6 +35,13 @@
<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
@@ -52,6 +59,7 @@
<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"
contextmenu="dactyl-contextmenu"
onclick="&commandline;.onMultilineOutputEvent(event)"/> onclick="&commandline;.onMultilineOutputEvent(event)"/>
</vbox> </vbox>
-1
View File
@@ -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