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 213191 Details for
Bug 375353
[FontDialog] FontDialog crashes with SimpleLifeCycle when selecting a color
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]
Draft fix
clipboard.txt (text/plain), 3.04 KB, created by
Ralf Sternberg
on 2012-03-26 14:56:38 EDT
(
hide
)
Description:
Draft fix
Filename:
MIME Type:
Creator:
Ralf Sternberg
Created:
2012-03-26 14:56:38 EDT
Size:
3.04 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt >Index: src/org/eclipse/swt/widgets/FontDialog.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt/src/org/eclipse/swt/widgets/FontDialog.java,v >retrieving revision 1.9 >diff -u -r1.9 FontDialog.java >--- src/org/eclipse/swt/widgets/FontDialog.java 14 Jul 2011 13:42:38 -0000 1.9 >+++ src/org/eclipse/swt/widgets/FontDialog.java 26 Mar 2012 18:43:21 -0000 >@@ -14,6 +14,8 @@ > > import org.eclipse.rwt.graphics.Graphics; > import org.eclipse.rwt.internal.RWTMessages; >+import org.eclipse.rwt.widgets.DialogCallback; >+import org.eclipse.rwt.widgets.DialogUtil; > import org.eclipse.swt.SWT; > import org.eclipse.swt.SWTException; > import org.eclipse.swt.events.*; >@@ -170,6 +172,7 @@ > return fontData; > } > >+ @Override > protected void prepareOpen() { > initializeDefaults(); > createShell(); >@@ -216,6 +219,7 @@ > shell = new Shell( parent, SWT.TITLE | SWT.BORDER | SWT.APPLICATION_MODAL ); > shell.setText( getText() ); > shell.addShellListener( new ShellAdapter() { >+ @Override > public void shellClosed( ShellEvent event ) { > handleShellClose(); > } >@@ -281,6 +285,7 @@ > GridData listData = new GridData( SWT.FILL, SWT.FILL, true, true ); > lstFontFamily.setLayoutData( listData ); > lstFontFamily.addSelectionListener( new SelectionAdapter() { >+ @Override > public void widgetSelected( SelectionEvent event ) { > int selectionIndex = lstFontFamily.getSelectionIndex(); > if( selectionIndex != -1 ) { >@@ -332,6 +337,7 @@ > Button changeColorButton = new Button( result, SWT.PUSH ); > changeColorButton.setText( RWTMessages.getMessage( "RWT_FontDialogFontColorSelect" ) ); > changeColorButton.addSelectionListener( new SelectionAdapter() { >+ @Override > public void widgetSelected( SelectionEvent event ) { > openColorDialog(); > } >@@ -339,17 +345,22 @@ > } > > private void openColorDialog() { >- ColorDialog dialog = new ColorDialog( shell ); >+ final ColorDialog dialog = new ColorDialog( shell ); > dialog.setRGB( rgb ); >- RGB selected = dialog.open(); >- if( selected != null ) { >- rgb = selected; >- updateControls(); >- } >+ DialogUtil.open( dialog, new DialogCallback() { >+ public void dialogClosed( int returnCode ) { >+ RGB selected = dialog.getRGB(); >+ if( selected != null ) { >+ rgb = selected; >+ updateControls(); >+ } >+ } >+ } ); > } > > private void addChangeListeners() { > SelectionListener selectionListener = new SelectionAdapter() { >+ @Override > public void widgetSelected( SelectionEvent event ) { > updateFontData(); > } >@@ -405,6 +416,7 @@ > data.widthHint = Math.max( widthHint, minSize.x ); > result.setLayoutData( data ); > result.addSelectionListener( new SelectionAdapter() { >+ @Override > public void widgetSelected( SelectionEvent event ) { > FontDialog.this.returnCode = returnCode; > shell.close();
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 375353
: 213191