javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/PermissionConfirmationView.java
branchRCL_3
changeset 18 9ac0a0a7da70
parent 17 0fd27995241b
child 24 6c158198356e
equal deleted inserted replaced
17:0fd27995241b 18:9ac0a0a7da70
    61     /** Constructor */
    61     /** Constructor */
    62     protected PermissionConfirmationView(
    62     protected PermissionConfirmationView(
    63         InstallerUiEswt aInstallerUi, Composite aParent)
    63         InstallerUiEswt aInstallerUi, Composite aParent)
    64     {
    64     {
    65         super(aInstallerUi, aParent, 8, true);
    65         super(aInstallerUi, aParent, 8, true);
    66         setTitle(InstallerUiTexts.get(InstallerUiTexts.INSTALL));
    66         setTitle(InstallerUiTexts.get(InstallerUiTexts.INSTALLING));
    67         setCommands(null, null);
    67         setCommands(null, null);
    68     }
    68     }
    69 
    69 
    70     /**
    70     /**
    71      * Synchoronous method for asking user confirmation.
    71      * Synchoronous method for asking user confirmation.
    92      */
    92      */
    93     protected void createView()
    93     protected void createView()
    94     {
    94     {
    95         // Add header.
    95         // Add header.
    96         String title = "Install?";
    96         String title = "Install?";
       
    97         String appName = "";
    97         if (iInstallInfo != null)
    98         if (iInstallInfo != null)
    98         {
    99         {
    99             if (iInstallInfo.getOldVersion() != null)
   100             if (iInstallInfo.getOldVersion() != null)
   100             {
   101             {
   101                 title = "Update?";
   102                 title = "Update?";
   102             }
   103             }
       
   104             appName = iInstallInfo.getName();
   103         }
   105         }
   104         addHeader(title, iInstallInfo, null);
   106         addHeader(title, iInstallInfo, null);
   105 
   107 
   106         GridData gridData = null;
   108         GridData gridData = null;
   107         int horizontalSpan = getColumns();
   109         int horizontalSpan = getColumns();
   108         int labelStyle = SWT.WRAP;
   110         int labelStyle = SWT.WRAP;
   109 
   111 
   110         // Add permission query label.
   112         // Add permission query label.
   111         Label domainLabel = createLabel(
   113         Label domainLabel = createLabel(
   112                                 InstallerUiTexts.get(InstallerUiTexts.PERM_QUERY),
   114             InstallerUiTexts.get(InstallerUiTexts.PERM_QUERY,
   113                                 horizontalSpan, labelStyle);
   115                                  new String[] { appName }),
       
   116             horizontalSpan, labelStyle);
   114 
   117 
   115         // Add link for permission details.
   118         // Add link for permission details.
   116         if (iPermissionInfo != null &&
   119         if (iPermissionInfo != null &&
   117                 iPermissionInfo.getPermissionNames() != null &&
   120                 iPermissionInfo.getPermissionNames() != null &&
   118                 iPermissionInfo.getPermissionNames().length > 0)
   121                 iPermissionInfo.getPermissionNames().length > 0)
   203         iDenyButton.setLayoutData(gridData);
   206         iDenyButton.setLayoutData(gridData);
   204         addSoftKeyListenerFor(iDenyButton);
   207         addSoftKeyListenerFor(iDenyButton);
   205 
   208 
   206         // Add cancel button.
   209         // Add cancel button.
   207         iCancelButton = new Button(getComposite(), SWT.NONE);
   210         iCancelButton = new Button(getComposite(), SWT.NONE);
   208         iCancelButton.setText(InstallerUiTexts.get(InstallerUiTexts.CANCEL));
   211         iCancelButton.setText(InstallerUiTexts.get(InstallerUiTexts.PERM_CANCEL));
   209         iCancelButton.addListener(SWT.Selection, new Listener()
   212         iCancelButton.addListener(SWT.Selection, new Listener()
   210         {
   213         {
   211             public void handleEvent(Event aEvent)
   214             public void handleEvent(Event aEvent)
   212             {
   215             {
   213                 confirmCancel();
   216                 confirmCancel();