From 960610bab26a1e6873400c48fad9a71671a1e13c Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Tue, 6 Nov 2018 12:28:45 +0100 Subject: [PATCH] Fixed about dialog handling --- com.minres.scviewer.e4.application/Application.e4xmi | 4 +--- .../scviewer/e4/application/handlers/AboutHandler.java | 7 ++++--- .../com/minres/scviewer/e4/application/messages.properties | 2 +- .../minres/scviewer/e4/application/parts/AboutDialog.java | 6 +++--- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/com.minres.scviewer.e4.application/Application.e4xmi b/com.minres.scviewer.e4.application/Application.e4xmi index 8b7c1e3..a222d56 100644 --- a/com.minres.scviewer.e4.application/Application.e4xmi +++ b/com.minres.scviewer.e4.application/Application.e4xmi @@ -32,6 +32,7 @@ + @@ -142,9 +143,6 @@ - - - diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java index 6d5db35..b53ec5c 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java @@ -12,6 +12,7 @@ package com.minres.scviewer.e4.application.handlers; import org.eclipse.e4.core.di.annotations.Execute; import org.eclipse.e4.ui.model.application.MApplication; +import org.eclipse.e4.ui.model.application.ui.basic.MPart; import org.eclipse.e4.ui.model.application.ui.basic.MWindow; import org.eclipse.e4.ui.workbench.modeling.EModelService; import org.eclipse.swt.widgets.Shell; @@ -22,9 +23,9 @@ public class AboutHandler { @Execute public void execute(Shell shell, MApplication app, MWindow window, EModelService ms /*@Named("mdialog01.dialog.0") MDialog dialog*/) { - MWindow dialog = (MWindow) ms.find(DIALOG_ID, app); //$NON-NLS-1$ - dialog.setToBeRendered(true); - dialog.setToBeRendered(false); + MPart mel = (MPart) ms.find(DIALOG_ID, app); //$NON-NLS-1$ + mel.setToBeRendered(true); + mel.setToBeRendered(false); } } diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties index ae08425..5485315 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties @@ -1,5 +1,5 @@ AboutDialog_0=\nSCViewer - a SystemC waveform viewer\n\nVersion: 2.0\n -AboutDialog_1=\nCopyright (c) 2015, 2018 MINRES Technologies GmbH and others.\n\nAll rights reserved. MINRES and the MINRES logo are trademarks of MINRES Technologies GmbH, http://www.minres.com/. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html\n\nParts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. These are namely org.mapdb and org.sqlite JDBC driver\n\nSources code is hosted at https://git.minres.com/VP/SCViewer and the master branch is mirrored to GitHub: https://git.com/minres/SCViewer\n +AboutDialog_1=\nCopyright (c) 2015, 2018 MINRES Technologies GmbH and others.\n\nAll rights reserved. MINRES and the MINRES logo are trademarks of MINRES Technologies GmbH, http://www.minres.com/. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html\n\nParts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. These are namely org.mapdb and org.sqlite JDBC driver\n\nSource code is hosted at https://git.minres.com/VP/SCViewer and the master branch is mirrored to GitHub: https://git.com/minres/SCViewer\n DesignBrowser_12=Append all after DesignBrowser_16=Insert all before DesignBrowser_2=Enter text to filter waveforms diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java index 8b0745c..691e378 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java @@ -75,7 +75,7 @@ public class AboutDialog extends Dialog { Composite composite = new Composite(parent, SWT.NONE); GridData gd_composite = new GridData(SWT.LEFT, SWT.FILL, true, true); gd_composite.widthHint = 600; - gd_composite.heightHint =250; + gd_composite.heightHint =300; composite.setLayoutData(gd_composite); composite.setLayout(new GridLayout(2, false)); @@ -86,7 +86,7 @@ public class AboutDialog extends Dialog { Canvas canvas = new Canvas(composite,SWT.NO_REDRAW_RESIZE); GridData gd_canvas = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1); gd_canvas.widthHint = 200; - gd_canvas.heightHint =250; + gd_canvas.heightHint =300; canvas.setLayoutData(gd_canvas); canvas.addPaintListener(new PaintListener() { public void paintControl(PaintEvent e) { @@ -97,7 +97,7 @@ public class AboutDialog extends Dialog { } }); - StyledText styledText = new StyledText(composite, SWT.BORDER); + StyledText styledText = new StyledText(composite, SWT.V_SCROLL | SWT.BORDER); styledText.setEditable(false); GridData gd_styledText = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1); styledText.setLayoutData(gd_styledText);