1 |
polynomial-c 11/09/05 06:23:18 |
2 |
|
3 |
Added: |
4 |
seamonkey-2.3.1-scrollbar-mouse-interaction-improvement.patch |
5 |
Log: |
6 |
Security bump |
7 |
|
8 |
(Portage version: 2.2.0_alpha51/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 www-client/seamonkey/files/seamonkey-2.3.1-scrollbar-mouse-interaction-improvement.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/seamonkey/files/seamonkey-2.3.1-scrollbar-mouse-interaction-improvement.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/seamonkey/files/seamonkey-2.3.1-scrollbar-mouse-interaction-improvement.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: seamonkey-2.3.1-scrollbar-mouse-interaction-improvement.patch |
17 |
=================================================================== |
18 |
# HG changeset patch |
19 |
# User Philip Chee <philip.chee@×××××.com> |
20 |
# Date 1314371784 -28800 |
21 |
# Node ID bce6138fb07449887e0e791965f90af87c28ca98 |
22 |
# Parent a11ec626d4ab7088f8d9753e8fec90197e6b899b |
23 |
Bug 673878 Use SHIFT+DOMMouseScroll to advance the selected tab. |
24 |
This will allow plain DOMMouseScroll to scroll the tabbar without changing the selected tab. |
25 |
|
26 |
diff --git a/suite/browser/browser-prefs.js b/suite/browser/browser-prefs.js |
27 |
--- a/suite/browser/browser-prefs.js |
28 |
+++ b/suite/browser/browser-prefs.js |
29 |
@@ -279,16 +279,21 @@ pref("browser.tabs.tabClipWidth", 140); |
30 |
|
31 |
// Where to show tab close buttons: |
32 |
// 0 on active tab only |
33 |
// 1 on all tabs until tabClipWidth is reached, then active tab only |
34 |
// 2 no close buttons at all |
35 |
// 3 at the end of the tabstrip |
36 |
pref("browser.tabs.closeButtons", 3); |
37 |
|
38 |
+// Mouse wheel action when over the tab bar: |
39 |
+// false The mouse wheel scrolls the whole tab bar like Firefox (default). |
40 |
+// true The mouse wheel advances the selected tab. |
41 |
+pref("browser.tabs.mouseScrollAdvance", false); |
42 |
+ |
43 |
// lets new tab/window load something different than first window |
44 |
// -1 - use navigator startup preference |
45 |
// 0 - loads blank page |
46 |
// 1 - loads home page |
47 |
// 2 - loads last page visited |
48 |
pref("browser.tabs.loadOnNewTab", 0); |
49 |
pref("browser.windows.loadOnNewWindow", 1); |
50 |
|
51 |
diff --git a/suite/browser/tabbrowser.xml b/suite/browser/tabbrowser.xml |
52 |
--- a/suite/browser/tabbrowser.xml |
53 |
+++ b/suite/browser/tabbrowser.xml |
54 |
@@ -2999,16 +2999,17 @@ |
55 |
<constructor> |
56 |
<![CDATA[ |
57 |
var tab = this.firstChild; |
58 |
// set the tabstrip's minWidth too, otherwise it immediately overflows |
59 |
this.mTabstrip.style.minWidth = |
60 |
tab.style.minWidth = this.mPrefs.getIntPref("browser.tabs.tabMinWidth") + "px"; |
61 |
tab.style.maxWidth = this.mPrefs.getIntPref("browser.tabs.tabMaxWidth") + "px"; |
62 |
window.addEventListener("resize", this, false); |
63 |
+ this.mScrollSelectedTab = this.mPrefs.getBoolPref("browser.tabs.mouseScrollAdvance"); |
64 |
]]> |
65 |
</constructor> |
66 |
|
67 |
<destructor> |
68 |
<![CDATA[ |
69 |
window.removeEventListener("resize", this, false); |
70 |
]]> |
71 |
</destructor> |
72 |
@@ -3116,32 +3117,48 @@ |
73 |
* if a tab was inserted to the overflow area or removed from it |
74 |
* without any scrolling and when the tabbar has already |
75 |
* overflowed. |
76 |
*/ |
77 |
this.mTabstrip._updateScrollButtonsDisabledState(); |
78 |
]]> |
79 |
</body> |
80 |
</method> |
81 |
+ |
82 |
+ <field name="mScrollSelectedTab"> |
83 |
+ false |
84 |
+ </field> |
85 |
+ |
86 |
+ <method name="_handleMouseScroll"> |
87 |
+ <parameter name="aEvent"/> |
88 |
+ <body> |
89 |
+ <![CDATA[ |
90 |
+ // Javascript does not have a logical XOR operator. |
91 |
+ if (aEvent.shiftKey != this.mScrollSelectedTab) { |
92 |
+ this.advanceSelectedTab(aEvent.detail < 0 ? -1 : 1); |
93 |
+ aEvent.stopPropagation(); |
94 |
+ } |
95 |
+ ]]> |
96 |
+ </body> |
97 |
+ </method> |
98 |
</implementation> |
99 |
|
100 |
<handlers> |
101 |
<handler event="TabSelect" action="this._handleTabSelect();"/> |
102 |
|
103 |
<handler event="transitionend"> |
104 |
<![CDATA[ |
105 |
if (event.propertyName == "max-width") |
106 |
this._handleNewTab(event.target); |
107 |
]]> |
108 |
</handler> |
109 |
|
110 |
<handler event="DOMMouseScroll" phase="capturing"> |
111 |
<![CDATA[ |
112 |
- this.advanceSelectedTab(event.detail < 0 ? -1 : 1); |
113 |
- event.stopPropagation(); |
114 |
+ this._handleMouseScroll(event); |
115 |
]]> |
116 |
</handler> |
117 |
</handlers> |
118 |
</binding> |
119 |
|
120 |
<binding id="tabbrowser-alltabs-popup" |
121 |
extends="chrome://global/content/bindings/popup.xml#popup"> |
122 |
<implementation implements="nsIDOMEventListener"> |