Fix bug 375389 - Allow mouse wheel scrolling in rotated view. r=mickey

This commit is contained in:
mozilla%kewis.ch 2007-08-02 13:38:21 +00:00
Родитель 469d573e27
Коммит 43e4c900dc
6 изменённых файлов: 64 добавлений и 6 удалений

Просмотреть файл

@ -301,7 +301,7 @@
this.moveView(event.detail);
]]>
</handler>
<handler event="keypress"><![CDATA[
<handler event="keypress"><![CDATA[
const kKE = Components.interfaces.nsIDOMKeyEvent;
switch (event.keyCode) {
case kKE.DOM_VK_PAGE_UP:
@ -311,8 +311,15 @@
this.moveView(1);
break;
}
]]>
</handler>
]]></handler>
<handler event="DOMMouseScroll"><![CDATA[
if (event.shiftKey) {
this.moveView(event.detail < 0 ? -1 : 1);
}
// Prevent default scroll handling
event.preventDefault();
]]></handler>
</handlers>
</binding>
</bindings>

Просмотреть файл

@ -21,6 +21,7 @@
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Philipp Kewisch <mozilla@kewis.ch>
-
- 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
@ -220,5 +221,19 @@
]]></body>
</method>
</implementation>
<handlers>
<handler event="DOMMouseScroll"><![CDATA[
if (!event.ctrlKey &&
!event.shiftKey &&
!event.altKey &&
!event.metaKey) {
// In the month view, the only thing that can be scrolled
// is the month the user is in. decorated-base takes care
// of the shift key, so only move the view when no modifier
// is pressed.
this.moveView(event.detail < 0 ? -1 : 1);
}
]]></handler>
</handlers>
</binding>
</bindings>

Просмотреть файл

@ -21,6 +21,7 @@
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Philipp Kewisch <mozilla@kewis.ch>
-
- 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
@ -270,5 +271,19 @@
]]></body>
</method>
</implementation>
<handlers>
<handler event="DOMMouseScroll"><![CDATA[
if (!event.ctrlKey &&
!event.shiftKey &&
!event.altKey &&
!event.metaKey) {
// In multiweek views, the only thing that can be scrolled
// is the week the user is in. decorated-base takes care
// of the shift key, so only move the view when no modifier
// is pressed.
this.moveView(event.detail < 0 ? -1 : 1);
}
]]></handler>
</handlers>
</binding>
</bindings>

Просмотреть файл

@ -3119,6 +3119,20 @@
</implementation>
<handlers>
<handler event="DOMMouseScroll"><![CDATA[
if (!event.ctrlKey &&
!event.shiftKey &&
!event.altKey &&
!event.metaKey) {
// Only shift hours if no modifier is pressed.
this.scrollToMinute(this.mFirstVisibleMinute +
(event.detail < 0 ? -60 : 60));
}
// We are taking care of scrolling, so prevent the default
// action in any case.
event.preventDefault();
]]></handler>
<handler event="keypress"><![CDATA[
const kKE = Ci.nsIDOMKeyEvent;
if (event.keyCode == kKE.DOM_VK_BACK_SPACE ||

Просмотреть файл

@ -20,6 +20,7 @@
*
* Contributor(s):
* Stefan Sitter <ssitter@googlemail.com>
* Philipp Kewisch <mozilla@kewis.ch>
*
* 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
@ -92,3 +93,7 @@ pref("calendar.view.visiblehours", 9);
// XXX One day we might want to move this to a locale specific file
// and include a list of locale specific default categories
pref("calendar.categories.names", "");
// Make sure mouse wheel shift and no key actions to scroll lines.
pref("mousewheel.withnokey.action", 0);
pref("mousewheel.withshiftkey.action", 0);

Просмотреть файл

@ -20,6 +20,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Philipp Kewisch <mozilla@kewis.ch>
*
* 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
@ -198,9 +199,10 @@ pref("intl.menuitems.alwaysappendaccesskeys","chrome://global/locale/intl.proper
pref("intl.menuitems.insertseparatorbeforeaccesskeys","chrome://global/locale/intl.properties");
// 0=lines, 1=pages, 2=history , 3=text size
pref("mousewheel.withcontrolkey.action",3);
pref("mousewheel.withshiftkey.action",2);
pref("mousewheel.withaltkey.action",0);
pref("mousewheel.withcontrolkey.action", 3);
pref("mousewheel.withshiftkey.action", 0);
pref("mousewheel.withaltkey.action", 0);
pref("mousewheel.withnokey.action", 0);
pref("profile.allow_automigration", false); // setting to false bypasses automigration in the profile code