javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ProgressView.java
changeset 47 f40128debb5d
parent 26 dc7c549001d5
child 48 e0d6e9bd3ca7
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ProgressView.java	Fri Jun 11 13:33:44 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ProgressView.java	Wed Jun 23 18:07:10 2010 +0300
@@ -169,13 +169,17 @@
         {
             public void run()
             {
+                // Set horizontalSpan to 2 for one button,
+                // and to 1 for one two buttons.
+                int horizontalSpan = 2;
+                GridData gridData = null;
+                /*
                 iHideCommand = new Button(getCommandComposite(), SWT.PUSH);
-                GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
-                gridData.horizontalSpan = 1;
+                gridData = new GridData(GridData.FILL_HORIZONTAL);
+                gridData.horizontalSpan = horizontalSpan;
                 iHideCommand.setLayoutData(gridData);
                 iHideCommand.setText(InstallerUiTexts.get(InstallerUiTexts.HIDE));
-                iHideCommand.addSelectionListener
-                (new SelectionListener()
+                iHideCommand.addSelectionListener(new SelectionListener()
                 {
                     public void widgetDefaultSelected(SelectionEvent aEvent)
                     {
@@ -187,15 +191,15 @@
                     }
                 });
                 addSoftKeyListenerFor(iHideCommand);
+                */
 
                 iCancelCommand = new Button(getCommandComposite(), SWT.PUSH);
                 gridData = new GridData(GridData.FILL_HORIZONTAL);
-                gridData.horizontalSpan = 1;
+                gridData.horizontalSpan = horizontalSpan;
                 iCancelCommand.setLayoutData(gridData);
                 iCancelCommand.setText(
                     InstallerUiTexts.get(InstallerUiTexts.CANCEL));
-                iCancelCommand.addSelectionListener
-                (new SelectionListener()
+                iCancelCommand.addSelectionListener(new SelectionListener()
                 {
                     public void widgetDefaultSelected(SelectionEvent aEvent)
                     {
@@ -234,8 +238,11 @@
             public void run()
             {
                 getShell().setDefaultButton(null);
-                iHideCommand.dispose();
-                iHideCommand = null;
+                if (iHideCommand != null)
+                {
+                    iHideCommand.dispose();
+                    iHideCommand = null;
+                }
                 iCancelCommand.dispose();
                 iCancelCommand = null;
             }