Permalink
Browse files

Java 1.5 compatibility

  • Loading branch information...
1 parent 860d722 commit 561743e5e02a6faaf78190fdf462db4ccdb23c64 @zapletnev zapletnev committed Feb 16, 2012
@@ -17,6 +17,8 @@
import org.eclipse.jface.action.StatusLineManager;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.graphics.Image;
@@ -46,7 +48,6 @@
protected Control createText(Composite parent, int style) {
Control textControl = super.createText(parent, style);
textControl.addFocusListener(new FocusListener() {
-
@Override
public void focusLost(FocusEvent e) {
setKeyFilter(true);
@@ -57,6 +58,12 @@ public void focusGained(FocusEvent e) {
setKeyFilter(false);
}
});
+ textControl.addDisposeListener(new DisposeListener() {
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ setKeyFilter(true);
+ }
+ });
return textControl;
}
@@ -264,7 +264,7 @@ protected Control createText(final Composite parent, final int style) {
setBackground(false);
title.addModifyListener(modifyListener);
title.addListener(SWT.KeyDown, new Listener() {
- @Override
+ @Override
public void handleEvent(Event event) {
GlanceEventDispatcher.INSTANCE.dispatchKeyPressed(event);
}

0 comments on commit 561743e

Please sign in to comment.