Skip to content

Commit

Permalink
Revert to 1.2 due to regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
kewisch committed Mar 12, 2018
1 parent d3aa61a commit c1474fc
Show file tree
Hide file tree
Showing 10 changed files with 589 additions and 140 deletions.
3 changes: 3 additions & 0 deletions chrome.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ resource quickmove .

overlay chrome://messenger/content/messenger.xul chrome://quickmove/content/quickmove-overlay.xul
overlay chrome://messenger/content/messageWindow.xul chrome://quickmove/content/quickmove-overlay.xul

overlay chrome://messenger/content/messenger.xul chrome://quickmove/content/quickmove-postbox.xul [email protected]
overlay chrome://messenger/content/messageWindow.xul chrome://quickmove/content/quickmove-postbox.xul [email protected]
57 changes: 15 additions & 42 deletions chrome/content/quickmove-overlay.xul
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
insertbefore="mailContext-fileHereMenu"
onpopupshowing="quickmove.popupshowing(event)"
onpopupshown="quickmove.popupshown(event)"
oncommand="quickmove.command(event, quickmove.executeMove)">
<textbox class="quickmove-textbox"
oncommand="quickmove.executeMove(event.target._folder); event.stopPropagation()">
<textbox id="quickmove-textbox"
type="search"
timeout="500"
onfocus="quickmove.focus(event)"
onkeypress="quickmove.keypress(event, quickmove.executeMove)"
oncommand="quickmove.search(event.target); event.stopPropagation();"/>
<menuseparator class="quickmove-separator"/>
<menuseparator id="quickmove-separator" class="quickmove-separator"/>
</menupopup>
</menu>

Expand All @@ -35,14 +35,14 @@
insertbefore="mailContext-copyHereMenu"
onpopupshowing="quickmove.popupshowing(event)"
onpopupshown="quickmove.popupshown(event)"
oncommand="quickmove.command(event, quickmove.executeCopy)">
oncommand="quickmove.executeCopy(event.target._folder); event.stopPropagation()">
<textbox id="quickmove-copy-textbox"
type="search"
timeout="500"
onfocus="quickmove.focus(event)"
onkeypress="quickmove.keypress(event, quickmove.executeCopy)"
oncommand="quickmove.search(event.target); event.stopPropagation();"/>
<menuseparator class="quickmove-separator"/>
<menuseparator id="quickmove-separator" class="quickmove-separator"/>
</menupopup>
</menu>

Expand All @@ -68,69 +68,43 @@
ignorekeys="true"
onpopupshowing="quickmove.popupshowing(event)"
onpopupshown="quickmove.popupshown(event)"
oncommand="quickmove.command(event, quickmove.executeMove)">
<textbox class="quickmove-textbox"
oncommand="quickmove.executeMove(event.target._folder)">
<textbox id="quickmove-textbox"
type="search"
timeout="500"
onfocus="quickmove.focus(event)"
onkeypress="quickmove.keypress(event, quickmove.executeMove)"
oncommand="quickmove.search(event.target); event.stopPropagation();"/>
<menuseparator class="quickmove-separator"/>
<menuseparator id="quickmove-separator" class="quickmove-separator"/>
</menupopup>
<menupopup id="quickmove-goto-menupopup"
ignorekeys="true"
onpopupshowing="quickmove.popupshowing(event)"
onpopupshown="quickmove.popupshown(event)"
oncommand="quickmove.command(event, quickmove.executeGoto)">
<textbox class="quickmove-textbox"
oncommand="quickmove.executeGoto(event.target._folder)">
<textbox id="quickmove-textbox"
type="search"
timeout="500"
onfocus="quickmove.focus(event)"
onkeypress="quickmove.keypress(event, quickmove.executeGoto)"
oncommand="quickmove.search(event.target); event.stopPropagation();"/>
<menuseparator id="quickmove-goto-separator" class="quickmove-separator"/>
</menupopup>
<menupopup id="quickmove-copy-menupopup"
ignorekeys="true"
onpopupshowing="quickmove.popupshowing(event)"
onpopupshown="quickmove.popupshown(event)"
oncommand="quickmove.command(event, quickmove.executeCopy)">
<textbox class="quickmove-textbox"
type="search"
timeout="500"
onfocus="quickmove.focus(event)"
onkeypress="quickmove.keypress(event, quickmove.executeCopy)"
oncommand="quickmove.search(event.target); event.stopPropagation();"/>
<menuseparator id="quickmove-copy-separator" class="quickmove-separator"/>
</menupopup>
</popupset>

<window id="messengerWindow">
<menupopup id="quickmove-compose-menupopup"
ignorekeys="true"
onpopupshowing="quickmove.popupshowing(event)"
onpopupshown="quickmove.popupshown(event)"
oncommand="quickmove.command(event, quickmove.executeMove)">
<textbox class="quickmove-textbox"
oncommand="quickmove.executeMove(event.target._folder)">
<textbox id="quickmove-textbox"
type="search"
timeout="500"
onfocus="quickmove.focus(event)"
onkeypress="quickmove.keypress(event, quickmove.executeMove)"
oncommand="quickmove.search(event.target); event.stopPropagation();"/>
<menuseparator class="quickmove-separator"/>
</menupopup>
<menupopup id="quickmove-compose-copy-menupopup"
ignorekeys="true"
onpopupshowing="quickmove.popupshowing(event)"
onpopupshown="quickmove.popupshown(event)"
oncommand="quickmove.command(event, quickmove.executeCopy)">
<textbox class="quickmove-textbox"
type="search"
timeout="500"
onfocus="quickmove.focus(event)"
onkeypress="quickmove.keypress(event, quickmove.executeCopy)"
oncommand="quickmove.search(event.target); event.stopPropagation();"/>
<menuseparator class="quickmove-separator"/>
<menuseparator id="quickmove-separator" class="quickmove-separator"/>
</menupopup>
</window>

Expand All @@ -141,8 +115,8 @@
ignorekeys="true"
onpopupshowing="quickmove.popupshowing(event)"
onpopupshown="quickmove.popupshown(event)"
oncommand="quickmove.command(event, quickmove.executeGoto)">
<textbox class="quickmove-textbox"
oncommand="quickmove.executeGoto(event.target._folder)">
<textbox id="quickmove-textbox"
type="search"
timeout="500"
onfocus="quickmove.focus(event)"
Expand All @@ -159,6 +133,5 @@
<keyset id="mailKeys">
<key id="quickmove-file" key="&quickmove.keyboard.file.key;" modifiers="&quickmove.keyboard.file.modifiers;" oncommand="quickmove.openFile()"/>
<key id="quickmove-goto" key="&quickmove.keyboard.goto.key;" modifiers="&quickmove.keyboard.goto.modifiers;" oncommand="quickmove.openGoto()"/>
<key id="quickmove-copy" key="&quickmove.keyboard.copy.key;" modifiers="&quickmove.keyboard.copy.modifiers;" oncommand="quickmove.openCopy()"/>
</keyset>
</overlay>
98 changes: 98 additions & 0 deletions chrome/content/quickmove-postbox.xul
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
- Portions Copyright (C) Philipp Kewisch, 2012 -->

<overlay id="quickmove-postbox-overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<script type="application/javascript"><![CDATA[
window.addEventListener("DOMContentLoaded", function() {
let moveMenu = document.getElementById("messagePaneContext-moveMenu");
if (moveMenu) {
let children = moveMenu.getElementsByTagName("menupopup");
for each (let c in Array.slice(children)) {
if (c.id != "quickmove-msgpane-context-menupopup") {
moveMenu.removeChild(c);
}
}
}
let copyMenu = document.getElementById("messagePaneContext-copyMenu");
if (copyMenu) {
let children = copyMenu.getElementsByTagName("menupopup");
for each (let c in Array.slice(children)) {
if (c.id != "quickmove-msgpane-context-copy-menupopup") {
copyMenu.removeChild(c);
}
}
}
}, false);
]]></script>

<!-- Postbox doesn't have a popupset, need to duplicate the menu here -->
<window id="messengerWindow">
<menupopup id="quickmove-menupopup"
ignorekeys="true"
onpopupshowing="quickmove.popupshowing(event)"
onpopupshown="quickmove.popupshown(event)"
oncommand="quickmove.executeMove(event.target._folder)">
<textbox id="quickmove-textbox"
type="search"
timeout="500"
onfocus="quickmove.focus(event)"
onkeypress="quickmove.keypress(event, quickmove.executeMove)"
oncommand="quickmove.search(event.target); event.stopPropagation();"/>
<menuseparator id="quickmove-separator" class="quickmove-separator"/>
</menupopup>
<menupopup id="quickmove-goto-menupopup"
ignorekeys="true"
onpopupshowing="quickmove.popupshowing(event)"
onpopupshown="quickmove.popupshown(event)"
oncommand="quickmove.executeGoto(event.target._folder)">
<textbox id="quickmove-textbox"
type="search"
timeout="500"
onfocus="quickmove.focus(event)"
onkeypress="quickmove.keypress(event, quickmove.executeGoto)"
oncommand="quickmove.search(event.target); event.stopPropagation();"/>
<menuseparator id="quickmove-goto-separator" class="quickmove-separator"/>
</menupopup>
</window>

<!-- Postbox uses shift+m for "toggle pending". Remove this key for now for
consistency between Thunderbird and Postbox -->
<key id="key_togglePending" removeelement="true"/>

<menu id="messagePaneContext-moveMenu">
<menupopup id="quickmove-msgpane-context-menupopup"
ignorekeys="true"
onpopupshowing="quickmove.popupshowing(event)"
onpopupshown="quickmove.popupshown(event)"
oncommand="quickmove.executeMove(event.target._folder); event.stopPropagation()">
<textbox id="quickmove-textbox"
type="search"
timeout="500"
onkeypress="quickmove.keypress(event, quickmove.executeMove)"
oncommand="quickmove.search(event.target); event.stopPropagation();"/>
<menuseparator id="quickmove-separator" class="quickmove-separator"/>
</menupopup>
</menu>
<menu id="messagePaneContext-copyMenu">
<menupopup id="quickmove-msgpane-context-copy-menupopup"
ignorekeys="true"
onpopupshowing="quickmove.popupshowing(event)"
onpopupshown="quickmove.popupshown(event)"
oncommand="quickmove.executeCopy(event.target._folder); event.stopPropagation()">
<textbox id="quickmove-copy-textbox"
type="search"
timeout="500"
onkeypress="quickmove.keypress(event, quickmove.executeCopy)"
oncommand="quickmove.search(event.target); event.stopPropagation();"/>
<menuseparator id="quickmove-separator" class="quickmove-separator"/>
</menupopup>
</menu>
</overlay>
Loading

0 comments on commit c1474fc

Please sign in to comment.