javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt/InstallerUiEswt.java
changeset 49 35baca0e7a2e
parent 26 dc7c549001d5
child 56 abc41079b313
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt/InstallerUiEswt.java	Fri Jun 11 13:33:44 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt/InstallerUiEswt.java	Tue Jul 06 20:36:19 2010 +0300
@@ -126,7 +126,6 @@
         // Create a hashtable for icons.
         iImageTable = new Hashtable();
         // Create a new thread to be the UI main thread.
-        iUiThreadExists = true;
         UIThreadSupport.startInUIThread(new Runnable()
         {
             public void run()
@@ -145,6 +144,7 @@
     private void uiMain()
     {
         log("uiMain: thread started");
+        iUiThreadExists = true;
         try
         {
             // Create the necessary views.
@@ -512,6 +512,12 @@
         // updating it.
         synchronized (iProgressSyncObject)
         {
+            if (iDlProgressView != null && iDlProgressView.isVisible())
+            {
+                // If download progress is being displayed,
+                // do not display installation progress.
+                return;
+            }
             if (iDisplayProgress && !iProgressView.isVisible())
             {
                 iProgressView.setVisible(true);
@@ -994,6 +1000,14 @@
     }
 
     /**
+     * Executes given Runnable synchronously in the UI thread.
+     */
+    public void syncExec(Runnable aRunnable)
+    {
+        iParent.getDisplay().syncExec(aRunnable);
+    }
+
+    /**
      * Returns string title basing on mode of this InstallerUi.
      */
     protected String getTitle()