Révision 3772

TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreatePartitionDialog.java (revision 3772)
53 53
import org.eclipse.swt.widgets.Combo;
54 54
import org.eclipse.swt.widgets.Composite;
55 55
import org.eclipse.swt.widgets.Control;
56
import org.eclipse.swt.widgets.Display;
56 57
import org.eclipse.swt.widgets.Event;
57 58
import org.eclipse.swt.widgets.FileDialog;
58 59
import org.eclipse.swt.widgets.Label;
......
184 185
		Font f = nameLabel.getFont();
185 186
		FontData defaultFont = f.getFontData()[0];
186 187
		defaultFont.setStyle(SWT.BOLD);
187
		Font newf = new Font(nameLabel.getDisplay(), defaultFont);
188
		Font newf = new Font(Display.getCurrent(), defaultFont);
188 189
		nameLabel.setText(TXMUIMessages.ampNameColon);
189 190
		nameLabel.setLayoutData(new GridData(GridData.FILL, GridData.CENTER,
190 191
				false, false));
TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/actions/ImportDialog.java (revision 3772)
42 42
import org.eclipse.swt.widgets.Composite;
43 43
import org.eclipse.swt.widgets.Control;
44 44
import org.eclipse.swt.widgets.DirectoryDialog;
45
import org.eclipse.swt.widgets.Display;
45 46
import org.eclipse.swt.widgets.ExpandBar;
46 47
import org.eclipse.swt.widgets.ExpandItem;
47 48
import org.eclipse.swt.widgets.FileDialog;
......
232 233
			 * 
233 234
			 * Font f = oplabel.getFont(); FontData defaultFont =
234 235
			 * f.getFontData()[0]; defaultFont.setStyle(SWT.BOLD); Font newf =
235
			 * new Font(oplabel.getDisplay(),defaultFont);
236
			 * new Font(Display.getCurrent(),defaultFont);
236 237
			 * oplabel.setFont(newf);
237 238
			 * 
238 239
			 * oplabel.setAlignment(SWT.CENTER); oplabel.setLayoutData(new
TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/preferences/RCPPreferences.java (revision 3772)
73 73
	
74 74
	
75 75
	public static final String CGU = "cgu"; //$NON-NLS-1$
76

  
77
	public static String DISABLE_TEST_WARNING = "no_test_warning";
76 78
	
77 79
	
78 80
	@Override
......
100 102
		preferences.putBoolean(SHOW_NOTIFICATIONS, false);
101 103
		
102 104
		preferences.putBoolean(CGU, false);
105
		preferences.putBoolean(DISABLE_TEST_WARNING, false);
103 106
		
104 107
		preferences.putInt(NO_SESSION, 1);
105 108
		preferences.putInt(MAX_NUMBER_OF_COLUMNS, 100);
TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/preferences/DebugPreferencePage.java (revision 3772)
25 25
		addField(new StringFieldEditor(TBXPreferences.UPDATESITE, TXMUIMessages.UpdateSiteAddress, getFieldEditorParent()));
26 26
		// enable some Eclipse features deactivated for TXM
27 27
		addField(new BooleanFieldEditor(TBXPreferences.EXPERT_USER, "Expert mode", getFieldEditorParent()));
28
		
29
		addField(new BooleanFieldEditor(RCPPreferences.DISABLE_TEST_WARNING, "Disable the test warning dialog when testing TXM", getFieldEditorParent()));
28 30
	}
29 31
	
30 32
	
TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/QueryAssistDialog.java (revision 3772)
52 52
import org.eclipse.swt.widgets.Combo;
53 53
import org.eclipse.swt.widgets.Composite;
54 54
import org.eclipse.swt.widgets.Control;
55
import org.eclipse.swt.widgets.Display;
55 56
import org.eclipse.swt.widgets.Label;
56 57
import org.eclipse.swt.widgets.Shell;
57 58
import org.eclipse.swt.widgets.Spinner;
......
195 196
			Button addwordButton = new Button(mainPanel, SWT.PUSH);
196 197
			FontData[] fd = mainPanel.getFont().getFontData();
197 198
			fd[0].setStyle(SWT.BOLD);
198
			Font font = new Font(mainPanel.getFont().getDevice(), fd);
199
			Font font = new Font(Display.getCurrent(), fd);
199 200
			addwordButton.setFont(font);
200 201
			addwordButton.setLayoutData(new GridData(GridData.CENTER, GridData.CENTER, false, false));
201 202
			addwordButton.setText(TXMUIMessages.addAWord+" ⯯");
TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/PartitionComposer.java (revision 3772)
44 44
import org.eclipse.swt.widgets.Button;
45 45
import org.eclipse.swt.widgets.Combo;
46 46
import org.eclipse.swt.widgets.Composite;
47
import org.eclipse.swt.widgets.Display;
47 48
import org.eclipse.swt.widgets.Label;
48 49
import org.eclipse.swt.widgets.Text;
49 50
import org.txm.core.messages.TXMCoreMessages;
......
461 462
			Font f = titleLabel.getFont();
462 463
			FontData defaultFont = f.getFontData()[0];
463 464
			defaultFont.setStyle(SWT.BOLD);
464
			Font newf = new Font(titleLabel.getDisplay(), defaultFont);
465
			Font newf = new Font(Display.getCurrent(), defaultFont);
465 466
			titleLabel.setFont(newf);
466 467
			
467 468
			title = new Text(this, SWT.BORDER);
TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/splashHandlers/TXMSplashHandler.java (revision 3772)
38 38
import org.eclipse.swt.graphics.Image;
39 39
import org.eclipse.swt.graphics.Point;
40 40
import org.eclipse.swt.layout.GridLayout;
41
import org.eclipse.swt.widgets.Display;
41 42
import org.eclipse.swt.widgets.Label;
42 43
import org.eclipse.swt.widgets.Shell;
43 44
import org.eclipse.ui.internal.splash.EclipseSplashHandler;
......
102 103
//		
103 104
//		greenTXM = new Color(splash.getDisplay(), 109,139,0);
104 105
//		redTXM = new Color(splash.getDisplay(), 255,0,0);
105
//		font = new Font(splash.getDisplay(), "Arial", 17, SWT.BOLD); //$NON-NLS-1$
106
//		font = new Font(Display.getCurrent(), "Arial", 17, SWT.BOLD); //$NON-NLS-1$
106 107
//		
107 108
//		if (txm_date.equals(build_date)) {
108 109
//			infos = build_date;
TXM/trunk/bundles/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java (revision 3772)
60 60
import org.txm.Toolbox;
61 61
import org.txm.core.messages.TXMCoreMessages;
62 62
import org.txm.core.preferences.TBXPreferences;
63
import org.txm.core.preferences.TXMPreferences;
63 64
import org.txm.core.results.TXMResult;
64 65
import org.txm.objects.Project;
65 66
import org.txm.rcp.commands.OpenWelcomePage;
......
201 202
						Log.fine("Lock file path: "+lockFile);
202 203
						if (lockFile.exists()) { // the close control file was not deleted //$NON-NLS-1$
203 204
							lockFile.delete(); //$NON-NLS-1$
204
							
205

  
205 206
							File checkupResultFile = new File(rootPath, "startup_diagnostic_"+Toolbox.dateformat.format(new Date())+".txt"); //$NON-NLS-1$ //$NON-NLS-2$
206 207
							checkupResultFile.delete();
207 208
							try {
208 209
								Toolbox.writeStartupCorporaDiagnostics(checkupResultFile);
209 210
							} catch(Exception e) {e.printStackTrace();}
210
							
211

  
211 212
							if (checkupResultFile.exists()) { // ask the user only if errors have been detected 
212 213
								this.syncExec(new Runnable() {
213 214
									@Override
......
230 231
						}
231 232
						lockFile.createNewFile(); //$NON-NLS-1$
232 233

  
233
						Log.info(TXMUIMessages.info_txmIsReady);
234
						String s = getVersionLevel();
235
						if ("stable".equals(RCPPreferences.getInstance().getString(RCPPreferences.UPDATE_LEVEL)) && s.length() == 0) {
236
							Log.info(TXMUIMessages.info_txmIsReady);
237
						} else {
238
							Log.warning("TXM is running in test mode. This mode is not intendend to be used to work.");
239
							if (Application.isHeadLess()) {
240

  
241
							} else if (org.eclipse.core.runtime.Platform.inDevelopmentMode()) {
242

  
243
							} else if (RCPPreferences.getInstance().getBoolean(RCPPreferences.DISABLE_TEST_WARNING)) {
244

  
245
							} else {
246
								Display.getDefault().syncExec( new Runnable() {
247

  
248
									@Override
249
									public void run() {
250
										MessageDialog.openWarning(Display.getDefault().getActiveShell(), "Test mode", "TXM is running in test mode. This mode is not intendend to be used to work.");
251
									}
252
								});
253
							}
254
						}
255

  
234 256
						monitor.done();
235 257
					}
236 258
					catch (Exception e) {
......
513 535
	 */
514 536
	@Override
515 537
	public void postShutdown() {
516
		
538

  
517 539
		callPreStopScript();
518 540

  
519 541
		Toolbox.shutdown();
TXM/trunk/bundles/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TSIndexEditor.java (revision 3772)
580 580
		Font f = go.getFont();
581 581
		FontData defaultFont = f.getFontData()[0];
582 582
		defaultFont.setStyle(SWT.BOLD);
583
		Font newf = new Font(go.getDisplay(), defaultFont);
583
		Font newf = new Font(Display.getCurrent(), defaultFont);
584 584
		go.setFont(newf);
585 585
		
586 586
		GridData layoutData = new GridData(GridData.VERTICAL_ALIGN_CENTER);
TXM/trunk/bundles/org.txm.queryindex.rcp/src/org/txm/queryindex/rcp/editors/QueryIndexEditor.java (revision 3772)
524 524
		Font f = go.getFont();
525 525
		FontData defaultFont = f.getFontData()[0];
526 526
		defaultFont.setStyle(SWT.BOLD);
527
		Font newf = new Font(go.getDisplay(), defaultFont);
527
		Font newf = new Font(Display.getCurrent(), defaultFont);
528 528
		go.setFont(newf);
529 529
		
530 530
		layoutData = new GridData(GridData.VERTICAL_ALIGN_CENTER);

Formats disponibles : Unified diff