[maemo-commits] [maemo-commits] r8786 - projects/haf/trunk/osso-application-installer/src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Dec 15 17:18:03 EET 2006
Author: marivoll
Date: 2006-12-15 17:18:02 +0200 (Fri, 15 Dec 2006)
New Revision: 8786

Modified:
   projects/haf/trunk/osso-application-installer/src/apt-worker.cc
Log:
	* src/apt-worker.cc (operation): Only send the status reply before
	fetching when there is actually something to fetch.  Otherwise the
	Download dialog is also shown during uninstalling, stupid.


Modified: projects/haf/trunk/osso-application-installer/src/apt-worker.cc
===================================================================
--- projects/haf/trunk/osso-application-installer/src/apt-worker.cc	2006-12-15 15:08:08 UTC (rev 8785)
+++ projects/haf/trunk/osso-application-installer/src/apt-worker.cc	2006-12-15 15:18:02 UTC (rev 8786)
@@ -2353,7 +2353,12 @@
        }
    }
    
-   send_status (op_downloading, 0, (int)(FetchBytes - FetchPBytes), 0);
+   /* Send a status report now if we are going to download something.
+      This makes sure that the progress dialog is shown even if the
+      first pulse of the fetcher takes a long time to arrive.
+   */
+   if ((int)(FetchBytes - FetchPBytes) > 0)
+     send_status (op_downloading, 0, (int)(FetchBytes - FetchPBytes), 0);
 
    if (Fetcher.Run() == pkgAcquire::Failed)
      return rescode_failure;


More information about the maemo-commits mailing list