summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolyn MacLeod <Carolyn_MacLeod@ca.ibm.com>2012-11-28 15:10:10 -0500
committerCarolyn MacLeod <Carolyn_MacLeod@ca.ibm.com>2012-11-28 15:11:13 -0500
commit2eb0d57b46ef2fa0c4a9cfafa527354a559190cd (patch)
tree22922e2ad3949582411588569986d13980be69ef
parent4f39524476b3bb384185bf121444794fe6c9e687 (diff)
downloadeclipse.platform.swt-2eb0d57b46ef2fa0c4a9cfafa527354a559190cd.tar.gz
eclipse.platform.swt-2eb0d57b46ef2fa0c4a9cfafa527354a559190cd.tar.xz
eclipse.platform.swt-2eb0d57b46ef2fa0c4a9cfafa527354a559190cd.zip
Bug 394016 - Ctrl+PageDown doesn't work multiple times in Classic theme
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java2
3 files changed, 12 insertions, 10 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
index 7d91d1ddaa..e039d09a63 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
@@ -701,7 +701,7 @@ void destroyItem (CTabItem item) {
firstIndex = -1;
selectedIndex = -1;
- Control control = item.getControl();
+ Control control = item.control;
if (control != null && !control.isDisposed()) {
control.setVisible(false);
}
@@ -1353,7 +1353,7 @@ void initAccessible() {
location = getBounds();
pt = getParent().toDisplay(location.x, location.y);
} else {
- if (childID >= 0 && childID < items.length && items[childID].isShowing()) {
+ if (childID >= 0 && childID < items.length && items[childID].showing) {
location = items[childID].getBounds();
}
if (location != null) {
@@ -1485,6 +1485,7 @@ void initAccessibleChevronTb() {
});
}
void onKeyDown (Event event) {
+ runUpdate();
switch (event.keyCode) {
case SWT.ARROW_LEFT:
case SWT.ARROW_RIGHT:
@@ -2058,6 +2059,7 @@ void onSelection(Event event) {
}
void onTraverse (Event event) {
if (ignoreTraverse) return;
+ runUpdate();
switch (event.detail) {
case SWT.TRAVERSE_ESCAPE:
case SWT.TRAVERSE_RETURN:
@@ -3513,7 +3515,7 @@ public void showItem (CTabItem item) {
newPriority[0] = index;
priority = newPriority;
}
- if (item.isShowing()) return;
+ if (item.showing) return;
updateFolder(REDRAW_TABS);
}
void showList (Rectangle rect) {
@@ -3682,7 +3684,7 @@ void updateFolder (int flags) {
runUpdate();
}
};
- this.getDisplay().asyncExec(updateRun);
+ getDisplay().asyncExec(updateRun);
}
void runUpdate() {
@@ -3690,8 +3692,8 @@ void runUpdate() {
int flags = updateFlags;
updateFlags = 0;
Rectangle rectBefore = getClientArea();
- this.updateTabHeight(false);
- this.updateItems(selectedIndex);
+ updateTabHeight(false);
+ updateItems(selectedIndex);
if ((flags & REDRAW) != 0) {
redraw();
} else if ((flags & REDRAW_TABS) != 0) {
@@ -3700,7 +3702,7 @@ void runUpdate() {
Rectangle rectAfter = getClientArea();
if (!rectBefore.equals(rectAfter)) {
notifyListeners(SWT.Resize, new Event());
- this.layout();
+ layout();
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java
index f7a14117cb..592bf96dfe 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java
@@ -83,7 +83,7 @@ protected Point computeSize(Composite composite, int wHint, int hHint, boolean f
int controlH = 0;
// preferred size of controls in tab items
for (int i = 0; i < items.length; i++) {
- Control control = items[i].getControl();
+ Control control = items[i].control;
if (control != null && !control.isDisposed()){
Point size = control.computeSize (wHint, hHint, flushCache);
controlW = Math.max (controlW, size.x);
@@ -108,7 +108,7 @@ protected void layout(Composite composite, boolean flushCache) {
CTabFolder folder = (CTabFolder)composite;
// resize content
if (folder.selectedIndex != -1) {
- Control control = folder.items[folder.selectedIndex].getControl();
+ Control control = folder.items[folder.selectedIndex].control;
if (control != null && !control.isDisposed()) {
control.setBounds(folder.getClientArea());
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
index f8e2405714..ca176a630c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
@@ -297,7 +297,7 @@ public void setControl (Control control) {
int selectedIndex = parent.getSelectionIndex();
Control selectedControl = null;
if (selectedIndex != -1) {
- selectedControl = parent.getItem(selectedIndex).getControl();
+ selectedControl = parent.getItem(selectedIndex).control;
}
if (this.control != selectedControl) {
this.control.setVisible(false);