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 94944 Details for
Bug 158910
[GTK/Linux] Support switching tabs by mousewheel scrolling w/ Gtk
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch to add a MouseWheelListener to the presentation's CTabFolder.
bug158910-patch.txt (text/plain), 2.73 KB, created by
Remy Suen
on 2008-04-04 20:44:22 EDT
(
hide
)
Description:
Patch to add a MouseWheelListener to the presentation's CTabFolder.
Filename:
MIME Type:
Creator:
Remy Suen
Created:
2008-04-04 20:44:22 EDT
Size:
2.73 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabFolder.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabFolder.java,v >retrieving revision 1.22 >diff -u -r1.22 DefaultTabFolder.java >--- Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabFolder.java 20 Dec 2006 20:52:07 -0000 1.22 >+++ Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabFolder.java 5 Apr 2008 00:42:38 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2004, 2006 IBM Corporation and others. >+ * Copyright (c) 2004, 2008 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -86,6 +86,34 @@ > } > }; > >+ private Listener mouseWheelListener = new Listener() { >+ public void handleEvent(Event e) { >+ int index = paneFolder.getSelectionIndex(); >+ // make sure that the tab folder has an item selected >+ if (index != -1) { >+ // positive e.count value implies up >+ if (e.count > 0) { >+ index++; >+ if (index == paneFolder.getItems().length) { >+ // since we're on the last tab, rotate forward to the first tab >+ paneFolder.setSelection(0); >+ } else { >+ paneFolder.setSelection(index); >+ } >+ } else { >+ if (index == 0) { >+ // on the first tab, rotate backwards to the last tab >+ paneFolder.setSelection(paneFolder.getItems().length - 1); >+ } else { >+ paneFolder.setSelection(index - 1); >+ } >+ } >+ // fire a selection event so that the contents are actually swapped >+ fireEvent(TabFolderEvent.EVENT_TAB_SELECTED, getSelection(), getPaneMenuLocation()); >+ } >+ } >+ }; >+ > private static DefaultTabFolderColors defaultColors = new DefaultTabFolderColors(); > > private DefaultTabFolderColors[] activeShellColors = {defaultColors, defaultColors, defaultColors}; >@@ -105,6 +133,7 @@ > paneFolder.addButtonListener(buttonListener); > paneFolder.setMinimizeVisible(allowMin); > paneFolder.setMaximizeVisible(allowMax); >+ paneFolder.getControl().addListener(SWT.MouseWheel, mouseWheelListener); > paneFolder.getControl().addListener(SWT.Selection, selectionListener); > paneFolder.setTopRight(null); >
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
Actions:
View
|
Diff
Attachments on
bug 158910
:
94944
|
95572
|
95573