Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
* Portions created by Marc Boullet are Copyright (C) 2003,
* Marc Boullet. All Rights Reserved.
*
* Some icons are by Yusuke Kamiyamane (http://p.yusukekamiyamane.com).
* Available under a Creative Commons Attribution 3.0 Unported License.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
Expand Down
4 changes: 4 additions & 0 deletions chrome/content/firegestures/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ var FireGestures = {
case "wheel-down":
case "rocker-left":
case "rocker-right":
case "rocker-middle-left":
case "rocker-middle-right":
case "rocker-left-middle":
case "rocker-right-middle":
case "keypress-ctrl":
case "keypress-shift":
this.onMouseGesture(event, aGesture);
Expand Down
80 changes: 64 additions & 16 deletions chrome/content/firegestures/prefs-generic.xul
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@
<prefpane id="advancedPane" label="&advancedPane;" flex="1">
<!-- dummy -->
<preferences>
<preference id="pref:triggerbutton" name="extensions.firegestures.trigger_button" type="int" />
<preference id="pref:wheelgesture" name="extensions.firegestures.wheelgesture" type="bool" />
<preference id="pref:rockergesture" name="extensions.firegestures.rockergesture" type="bool" />
<preference id="pref:triggerbutton" name="extensions.firegestures.trigger_button" type="int" />
<preference id="pref:wheelgesture" name="extensions.firegestures.wheelgesture" type="bool" />
<preference id="pref:rockergesture" name="extensions.firegestures.rockergesture" type="bool" />
<preference id="pref:rockergesture.middle" name="extensions.firegestures.rockergesture.middle" type="bool" />
</preferences>
<groupbox uigroup="wheelgesture">
<!-- dummy -->
Expand All @@ -66,19 +67,21 @@
</columns>
<rows>
<row align="center">
<label id="wheelUpLabel"
value0="&wheelGesture.up.left;:"
value1="&wheelGesture.up.middle;:"
value2="&wheelGesture.up.right;:" />
<label id="wheelUpLabel" control="wheelGestureU"
tooltiptext0="&wheelGesture.up.left;"
tooltiptext1="&wheelGesture.up.middle;"
tooltiptext2="&wheelGesture.up.right;">
<image id="wheelGestureUImage" />
</label>
<menulist id="wheelGestureU" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
</row>
<row align="center">
<label id="wheelDownLabel"
value0="&wheelGesture.down.left;:"
value1="&wheelGesture.down.middle;:"
value2="&wheelGesture.down.right;:" />
<label id="wheelDownLabel" control="wheelGestureD"
tooltiptext0="&wheelGesture.down.left;"
tooltiptext1="&wheelGesture.down.middle;"
tooltiptext2="&wheelGesture.down.right;">
<image id="wheelGestureDImage" />
</label>
<menulist id="wheelGestureD" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
Expand All @@ -99,14 +102,59 @@
</columns>
<rows>
<row align="center">
<label value="&rockerGesture.left;:" />
<label control="rockerGestureL" tooltiptext="&rockerGesture.left;">
<image id="rockerGestureLImage" />
</label>
<menulist id="rockerGestureL" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
<label control="rockerGestureR" tooltiptext="&rockerGesture.right;">
<image id="rockerGestureRImage" />
</label>
<menulist id="rockerGestureR" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
</row>
</rows>
</grid>
</groupbox>
<groupbox uigroup="rockergesturemiddle">
<!-- dummy -->
<checkbox id="rockergesturemiddle" hidden="true"
preference="pref:rockergesture.middle"
onsyncfrompreference="PrefsUI.updateUIGroup('rockergesturemiddle');" />
<caption label="&rockerGesture.middle;" />
<grid>
<columns>
<column />
<column />
</columns>
<rows>
<row align="center">
<label control="rockerGestureML" tooltiptext="&rockerGesture.middle.left;">
<image id="rockerGestureMLImage" />
</label>
<menulist id="rockerGestureML" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
<label control="rockerGestureMR" tooltiptext="&rockerGesture.middle.right;">
<image id="rockerGestureMRImage" />
</label>
<menulist id="rockerGestureMR" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
</row>
<row align="center">
<label value="&rockerGesture.right;:" />
<menulist id="rockerGestureR" sizetopopup="none" oncommand="gShouldCommit = true;">
<label control="rockerGestureLM" tooltiptext="&rockerGesture.left.middle;">
<image id="rockerGestureLMImage" />
</label>
<menulist id="rockerGestureLM" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
<label control="rockerGestureRM" tooltiptext="&rockerGesture.right.middle;">
<image id="rockerGestureRMImage" />
</label>
<menulist id="rockerGestureRM" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
</row>
Expand Down
18 changes: 13 additions & 5 deletions chrome/content/firegestures/prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ const kDirectionCol = 3;
const kFlagsCol = 4;

const kExtraArray1 = [
["wheelGestureU", "wheel-up" ],
["wheelGestureD", "wheel-down" ],
["rockerGestureL", "rocker-left" ],
["rockerGestureR", "rocker-right"],
["wheelGestureU", "wheel-up" ],
["wheelGestureD", "wheel-down" ],
["rockerGestureL", "rocker-left" ],
["rockerGestureR", "rocker-right" ],
["rockerGestureML", "rocker-middle-left" ],
["rockerGestureMR", "rocker-middle-right"],
["rockerGestureLM", "rocker-left-middle" ],
["rockerGestureRM", "rocker-right-middle"],
];

const kExtraArray2 = [
Expand Down Expand Up @@ -226,6 +230,9 @@ var PrefsUI = {
// this fixes the problem: colorpicker looks active even if setting disabled to true
if (elt.localName == "colorpicker" || elt.id == "trailSample")
elt.style.opacity = enable ? 1 : 0.5;
// similar for images (styling with css does not work)
if (elt.localName == "image")
elt.style.opacity = enable ? 1 : 0.5;
});
if (aGroupName == "trail")
this.updateTrail();
Expand All @@ -235,7 +242,8 @@ var PrefsUI = {
var button = getElement("pref:triggerbutton").value;
["wheelUpLabel", "wheelDownLabel"].forEach(function(id) {
var label = getElement(id);
label.value = label.getAttribute("value" + button);
label.setAttribute("tooltiptext", label.getAttribute("tooltiptext" + button));
label.className = "button" + button;
});
window.sizeToContent();
},
Expand Down
83 changes: 66 additions & 17 deletions chrome/content/firegestures/prefs.xul
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,11 @@

<prefpane id="advancedPane" label="&advancedPane;" flex="1">
<preferences>
<preference id="pref:wheelgesture" name="extensions.firegestures.wheelgesture" type="bool" />
<preference id="pref:rockergesture" name="extensions.firegestures.rockergesture" type="bool" />
<preference id="pref:keypressgesture" name="extensions.firegestures.keypressgesture" type="bool" />
<preference id="pref:tabwheelgesture" name="extensions.firegestures.tabwheelgesture" type="bool" />
<preference id="pref:wheelgesture" name="extensions.firegestures.wheelgesture" type="bool" />
<preference id="pref:rockergesture" name="extensions.firegestures.rockergesture" type="bool" />
<preference id="pref:rockergesture.middle" name="extensions.firegestures.rockergesture.middle" type="bool" />
<preference id="pref:keypressgesture" name="extensions.firegestures.keypressgesture" type="bool" />
<preference id="pref:tabwheelgesture" name="extensions.firegestures.tabwheelgesture" type="bool" />
</preferences>
<groupbox uigroup="wheelgesture">
<caption>
Expand All @@ -174,19 +175,21 @@
</columns>
<rows>
<row align="center">
<label id="wheelUpLabel"
value0="&wheelGesture.up.left;:"
value1="&wheelGesture.up.middle;:"
value2="&wheelGesture.up.right;:" />
<label id="wheelUpLabel" control="wheelGestureU"
tooltiptext0="&wheelGesture.up.left;"
tooltiptext1="&wheelGesture.up.middle;"
tooltiptext2="&wheelGesture.up.right;">
<image id="wheelGestureUImage" />
</label>
<menulist id="wheelGestureU" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
</row>
<row align="center">
<label id="wheelDownLabel"
value0="&wheelGesture.down.left;:"
value1="&wheelGesture.down.middle;:"
value2="&wheelGesture.down.right;:" />
<label id="wheelDownLabel" control="wheelGestureD"
tooltiptext0="&wheelGesture.down.left;"
tooltiptext1="&wheelGesture.down.middle;"
tooltiptext2="&wheelGesture.down.right;">
<image id="wheelGestureDImage" />
</label>
<menulist id="wheelGestureD" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
Expand All @@ -207,14 +210,60 @@
</columns>
<rows>
<row align="center">
<label value="&rockerGesture.left;:" />
<label control="rockerGestureL" tooltiptext="&rockerGesture.left;">
<image id="rockerGestureLImage" />
</label>
<menulist id="rockerGestureL" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
<label control="rockerGestureR" tooltiptext="&rockerGesture.right;">
<image id="rockerGestureRImage" />
</label>
<menulist id="rockerGestureR" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
</row>
</rows>
</grid>
</groupbox>
<groupbox uigroup="rockergesturemiddle">
<caption>
<checkbox id="rockergesturemiddle" label="&rockerGesture.middle;"
preference="pref:rockergesture.middle"
onsyncfrompreference="PrefsUI.updateUIGroup('rockergesturemiddle');" />
</caption>
<label style="font-style: italic">&rockerGesture.middle.description;</label>
<grid>
<columns>
<column />
<column />
</columns>
<rows>
<row align="center">
<label value="&rockerGesture.right;:" />
<menulist id="rockerGestureR" sizetopopup="none" oncommand="gShouldCommit = true;">
<label control="rockerGestureML" tooltiptext="&rockerGesture.middle.left;">
<image id="rockerGestureMLImage" />
</label>
<menulist id="rockerGestureML" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
<label control="rockerGestureMR" tooltiptext="&rockerGesture.middle.right;">
<image id="rockerGestureMRImage" />
</label>
<menulist id="rockerGestureMR" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
</row>
<row align="center">
<label control="rockerGestureLM" tooltiptext="&rockerGesture.left.middle;">
<image id="rockerGestureLMImage" />
</label>
<menulist id="rockerGestureLM" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
<label control="rockerGestureRM" tooltiptext="&rockerGesture.right.middle;">
<image id="rockerGestureRMImage" />
</label>
<menulist id="rockerGestureRM" sizetopopup="none" oncommand="gShouldCommit = true;">
<menupopup />
</menulist>
</row>
Expand Down
6 changes: 6 additions & 0 deletions chrome/locale/de/firegestures/prefs.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
<!ENTITY rockerGesture "Klickgesten">
<!ENTITY rockerGesture.left "Linksklick mit gedrückter rechter Maustaste">
<!ENTITY rockerGesture.right "Rechtsklick mit gedrückter linker Maustaste">
<!ENTITY rockerGesture.middle "Klickgesten mit mittlerer Maustaste">
<!ENTITY rockerGesture.middle.description "Diese Gesten sind nicht mit dem automatischen Bildlauf kompatibel, dieser wird daher beim Neustart deaktiviert.">
<!ENTITY rockerGesture.middle.left "Linksklick mit gedrückter mittlerer Maustaste">
<!ENTITY rockerGesture.middle.right "Rechtsklick mit gedrückter mittlerer Maustaste">
<!ENTITY rockerGesture.left.middle "Mittelklick mit gedrückter linker Maustaste">
<!ENTITY rockerGesture.right.middle "Mittelklick mit gedrückter rechter Maustaste">
<!ENTITY keypressGesture "Tastengesten">
<!ENTITY keypressGesture.ctrl "Mausgeste mit gedrückter STRG-Taste">
<!ENTITY keypressGesture.shift "Mausgeste mit gedrückter UMSCH-Taste">
Expand Down
6 changes: 6 additions & 0 deletions chrome/locale/en-US/firegestures/prefs.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
<!ENTITY rockerGesture "Rocker Gestures">
<!ENTITY rockerGesture.left "Left-click with holding right-button">
<!ENTITY rockerGesture.right "Right-click with holding left-button">
<!ENTITY rockerGesture.middle "Rocker Gestures with middle-button">
<!ENTITY rockerGesture.middle.description "These gestures are not compatible with autoscroll, which gets disabled on restart.">
<!ENTITY rockerGesture.middle.left "Left-click with holding middle-button">
<!ENTITY rockerGesture.middle.right "Right-click with holding middle-button">
<!ENTITY rockerGesture.left.middle "Middle-click with holding left-button">
<!ENTITY rockerGesture.right.middle "Middle-click with holding right-button">
<!ENTITY keypressGesture "Keypress Gestures">
<!ENTITY keypressGesture.ctrl "Mouse gesture with holding Ctrl key">
<!ENTITY keypressGesture.shift "Mouse gesture with holding Shift key">
Expand Down
39 changes: 39 additions & 0 deletions chrome/skin/classic/firegestures/prefs.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,45 @@ radio[pane][selected="true"] .paneButtonIcon {
opacity: 1.0;
}

image[id^="rocker"] {
list-style-image: url("chrome://firegestures/skin/rocker-gestures.png");
}

image[id^="wheel"] {
list-style-image: url("chrome://firegestures/skin/wheel-gestures.png");
}

label.button0 #wheelGestureUImage,
#rockerGestureLImage {
-moz-image-region: rect(0px, 32px, 16px, 0px);
}

label.button0 #wheelGestureDImage,
#rockerGestureRImage {
-moz-image-region: rect(16px, 32px, 32px, 0px);
}

label.button1 #wheelGestureUImage,
#rockerGestureMLImage {
-moz-image-region: rect(32px, 32px, 48px, 0px);
}

label.button1 #wheelGestureDImage,
#rockerGestureMRImage {
-moz-image-region: rect(48px, 32px, 64px, 0px);
}

label.button2 #wheelGestureUImage,
#rockerGestureLMImage {
-moz-image-region: rect(64px, 32px, 80px, 0px);
}

label.button2 #wheelGestureDImage,
#rockerGestureRMImage {
-moz-image-region: rect(80px, 32px, 96px, 0px);
}


#trailSampleOuter {
background-color: white;
min-height: 1.5em;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading