Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 197989 Details for
Bug 321707
[mac][editor] two-finger scroll 'sticks' in Task Editor text fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Scroll through CCombos
EditorUtil patch.txt (text/plain), 2.95 KB, created by
Leo Dos Santos
on 2011-06-14 19:04:59 EDT
(
hide
)
Description:
Scroll through CCombos
Filename:
MIME Type:
Creator:
Leo Dos Santos
Created:
2011-06-14 19:04:59 EDT
Size:
2.95 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorUtil.java >=================================================================== >RCS file: /cvsroot/mylyn/org.eclipse.mylyn.tasks/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorUtil.java,v >retrieving revision 1.44 >diff -u -r1.44 EditorUtil.java >--- src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorUtil.java 6 Mar 2011 08:22:08 -0000 1.44 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/EditorUtil.java 14 Jun 2011 22:57:20 -0000 >@@ -565,31 +565,52 @@ > } > > public static void addScrollListener(final CCombo combo) { >- combo.addListener(SWT.KeyDown, new Listener() { >- public void handleEvent(Event event) { >- if (event.keyCode == SWT.ARROW_UP) { >- if (combo.isFocusControl()) { >- // could be a legitimate key event, let CCombo handle it >- return; >+ if ("cocoa".equals(SWT.getPlatform())) { >+ combo.addListener(SWT.MouseWheel, new Listener() { >+ public void handleEvent(Event event) { >+ if (event.count > 0) { >+ EditorUtil.handleScrollUp(combo, event); >+ } else if (event.count < 0) { >+ EditorUtil.handleScrollDown(combo, event); > } >- ScrolledComposite form = FormUtil.getScrolledComposite(combo); >- if (form != null) { >- EditorUtil.scroll(form, 0, -form.getVerticalBar().getIncrement()); >- event.doit = false; >- } >- } else if (event.keyCode == SWT.ARROW_DOWN) { >- if (combo.isFocusControl()) { >- // could be a legitimate key event, let CCombo handle it >- return; >- } >- ScrolledComposite form = FormUtil.getScrolledComposite(combo); >- if (form != null) { >- EditorUtil.scroll(form, 0, form.getVerticalBar().getIncrement()); >- event.doit = false; >+ } >+ >+ }); >+ } else { >+ combo.addListener(SWT.KeyDown, new Listener() { >+ public void handleEvent(Event event) { >+ if (event.keyCode == SWT.ARROW_UP) { >+ EditorUtil.handleScrollUp(combo, event); >+ } else if (event.keyCode == SWT.ARROW_DOWN) { >+ EditorUtil.handleScrollDown(combo, event); > } > } >- } >- }); >+ }); >+ } >+ } >+ >+ private static void handleScrollUp(CCombo combo, Event event) { >+ if (combo.isFocusControl()) { >+ // could be a legitimate key event, let CCombo handle it >+ return; >+ } >+ ScrolledComposite form = FormUtil.getScrolledComposite(combo); >+ if (form != null) { >+ EditorUtil.scroll(form, 0, -form.getVerticalBar().getIncrement()); >+ event.doit = false; >+ } >+ } >+ >+ private static void handleScrollDown(CCombo combo, Event event) { >+ if (combo.isFocusControl()) { >+ // could be a legitimate key event, let CCombo handle it >+ return; >+ } >+ ScrolledComposite form = FormUtil.getScrolledComposite(combo); >+ if (form != null) { >+ EditorUtil.scroll(form, 0, form.getVerticalBar().getIncrement()); >+ event.doit = false; >+ } > } > > public static void setTitleBarForeground(ExpandableComposite composite, Color color) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
steffen.pingel
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 321707
: 197989 |
197990