Skip to content
Snippets Groups Projects
Commit b77e6623 authored by Dott. Federico Volpini's avatar Dott. Federico Volpini
Browse files

Small bugs fixed.

Added method performCancel in GUI.java to confirm the exit.
parent 3543c089
No related branches found
No related tags found
No related merge requests found
......@@ -187,6 +187,11 @@ public class GUI extends WizardMod {
setPages(decoratedPhases);
}
@Override
public boolean performCancel(){
return MessageDialog.openConfirm(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Confirm Exit", "Are you sure you want to Exit?");
}
@Override
public boolean performFinish() {
......
......@@ -42,6 +42,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.PlatformUI;
import org.universaal.tools.packaging.tool.impl.PageImpl;
import org.universaal.tools.packaging.tool.util.Dialog;
import org.universaal.tools.packaging.tool.util.XSDParser;
......@@ -245,9 +246,9 @@ public class Page1 extends PageImpl {
if (width != 512 || height != 512){
app.getApplication().getMenuEntry().setIconScale(true);
if (aspect_ratio == 1.0)
MessageDialog.openError(null, "Invalid size", "The selected image will be scaled due to invalid pixel size.\n\nThe optimal size is 512x512 pixels (A/R 1:1)");
MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Invalid size", "The selected image will be scaled due to invalid pixel size.\n\nThe optimal size is 512x512 pixels (A/R 1:1)");
else
MessageDialog.openError(null, "Invalid size and aspect ratio", "The selected image will be scaled and stretched due to invalid pixel size and aspect ratio.\n\nThe optimal size is 512x512 pixels (A/R 1:1)");
MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Invalid size and aspect ratio", "The selected image will be scaled and stretched due to invalid pixel size and aspect ratio.\n\nThe optimal size is 512x512 pixels (A/R 1:1)");
}
......
......@@ -154,14 +154,15 @@ public class StartPage extends PageImpl {
public void widgetSelected(SelectionEvent e) {
Dialog d = new Dialog();
destination = d.open(parent.getShell(), new String[]{"*.uapp"}, false, "UAPP file path...");
if(destination != null){
if(!destination.getAbsolutePath().endsWith(".uapp"))
destination = new File(destination+".uapp");
if(!destination.getAbsolutePath().endsWith(".uapp"))
destination = new File(destination+".uapp");
name.setText(destination.getAbsolutePath());
name.setText(destination.getAbsolutePath());
if(destination != null && destination.isAbsolute() && parts.size() > 0)
setPageComplete(true);
if(destination.isAbsolute() && parts.size() > 0)
setPageComplete(true);
}
}
public void widgetDefaultSelected(SelectionEvent e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment