Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2015-03-25 14:05:12 +0000
committerAlexander Kurtakov2015-03-25 14:05:12 +0000
commit943f51a97105ac775602b2d85dab479fde6bc88f (patch)
treee99d2a298a840a680e4129b8784655b548add8f4
parent1e518c01e875b59a6620cc36921365e0f813d739 (diff)
downloadeclipse.platform.swt-943f51a97105ac775602b2d85dab479fde6bc88f.tar.gz
eclipse.platform.swt-943f51a97105ac775602b2d85dab479fde6bc88f.tar.xz
eclipse.platform.swt-943f51a97105ac775602b2d85dab479fde6bc88f.zip
Bug 462665 - Remove references to Carbon in SWT code and comments
Drop Carbon specific code in Synchronizer and examples. Change-Id: Ic7aed6f7ab44dd9f6e38829d6694decb7543c66d Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Synchronizer.java5
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/text.txt31
2 files changed, 13 insertions, 23 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Synchronizer.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Synchronizer.java
index 6941ae0c1a..2a2d028a9a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Synchronizer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Synchronizer.java
@@ -13,7 +13,7 @@ package org.eclipse.swt.widgets;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.internal.Compatibility;
+import org.eclipse.swt.internal.*;
/**
* Instances of this class provide synchronization support
@@ -43,7 +43,6 @@ public class Synchronizer {
static final int MESSAGE_LIMIT = 64;
//TEMPORARY CODE
- static final boolean IS_CARBON = "carbon".equals (SWT.getPlatform ());
static final boolean IS_COCOA = "cocoa".equals (SWT.getPlatform ());
static final boolean IS_GTK = "gtk".equals (SWT.getPlatform ());
@@ -85,7 +84,7 @@ void addLast (RunnableLock lock) {
protected void asyncExec (Runnable runnable) {
if (runnable == null) {
//TEMPORARY CODE
- if (!(IS_CARBON || IS_GTK || IS_COCOA)) {
+ if (!(IS_GTK || IS_COCOA)) {
display.wake ();
return;
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/text.txt b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/text.txt
index 38b5644813..ce595a2190 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/text.txt
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/text.txt
@@ -156,12 +156,12 @@ public class StyledText extends Canvas {
Caret defaultCaret = null;
boolean updateCaretDirection = true;
- final static boolean IS_CARBON, IS_GTK;
+ final static boolean IS_GTK;
final static boolean DOUBLE_BUFFER;
static {
String platform = SWT.getPlatform();
IS_GTK = "gtk".equals(platform);
- DOUBLE_BUFFER = !IS_CARBON;
+ DOUBLE_BUFFER = true;
}
/**
@@ -5053,23 +5053,14 @@ void handleKey(Event event) {
if (action == SWT.NULL) {
boolean ignore = false;
- if (IS_CARBON) {
- // Ignore accelerator key combinations (we do not want to
- // insert a character in the text in this instance). Do not
- // ignore COMMAND+ALT combinations since that key sequence
- // produces characters on the mac.
- ignore = (event.stateMask ^ SWT.COMMAND) == 0 ||
- (event.stateMask ^ (SWT.COMMAND | SWT.SHIFT)) == 0;
- } else {
- // Ignore accelerator key combinations (we do not want to
- // insert a character in the text in this instance). Don't
- // ignore CTRL+ALT combinations since that is the Alt Gr
- // key on some keyboards. See bug 20953.
- ignore = (event.stateMask ^ SWT.ALT) == 0 ||
- (event.stateMask ^ SWT.CTRL) == 0 ||
- (event.stateMask ^ (SWT.ALT | SWT.SHIFT)) == 0 ||
- (event.stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0;
- }
+ // Ignore accelerator key combinations (we do not want to
+ // insert a character in the text in this instance). Don't
+ // ignore CTRL+ALT combinations since that is the Alt Gr
+ // key on some keyboards. See bug 20953.
+ ignore = (event.stateMask ^ SWT.ALT) == 0 ||
+ (event.stateMask ^ SWT.CTRL) == 0 ||
+ (event.stateMask ^ (SWT.ALT | SWT.SHIFT)) == 0 ||
+ (event.stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0;
// -ignore anything below SPACE except for line delimiter keys and tab.
// -ignore DEL
if (!ignore && event.character > 31 && event.character != SWT.DEL ||
@@ -5170,7 +5161,7 @@ void handleMouseDown(Event event) {
sendKeyEvent(e);
}
}
- if ((event.button != 1) || (IS_CARBON && (event.stateMask & SWT.MOD4) != 0)) {
+ if (event.button != 1) {
return;
}
boolean select = (event.stateMask & SWT.MOD2) != 0;

Back to the top