[maemo-commits] [maemo-commits] r9065 - in projects/haf/trunk/osso-application-installer: . src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Jan 11 16:10:36 EET 2007
Author: marivoll
Date: 2007-01-11 16:10:34 +0200 (Thu, 11 Jan 2007)
New Revision: 9065

Modified:
   projects/haf/trunk/osso-application-installer/ChangeLog
   projects/haf/trunk/osso-application-installer/src/menu.cc
Log:
	* src/menu.cc (noop_result, menu_close): Reverted change from
	2007-01-10.  It is better to exit immediately and hope that the
	user doesn't relaunch immediately.


Modified: projects/haf/trunk/osso-application-installer/ChangeLog
===================================================================
--- projects/haf/trunk/osso-application-installer/ChangeLog	2007-01-11 13:53:40 UTC (rev 9064)
+++ projects/haf/trunk/osso-application-installer/ChangeLog	2007-01-11 14:10:34 UTC (rev 9065)
@@ -1,3 +1,9 @@
+2007-01-11  Marius Vollmer  <marius.vollmer at nokia.com>
+
+	* src/menu.cc (noop_result, menu_close): Reverted change from
+	2007-01-10.  It is better to exit immediately and hope that the
+	user doesn't relaunch immediately.
+	
 2007-01-10  Marius Vollmer  <marius.vollmer at nokia.com>
 
 	* src/menu.cc (noop_result): New.

Modified: projects/haf/trunk/osso-application-installer/src/menu.cc
===================================================================
--- projects/haf/trunk/osso-application-installer/src/menu.cc	2007-01-11 13:53:40 UTC (rev 9064)
+++ projects/haf/trunk/osso-application-installer/src/menu.cc	2007-01-11 14:10:34 UTC (rev 9065)
@@ -91,26 +91,27 @@
 }
 
 static void
-noop_result (int cmd, apt_proto_decoder *dec, void *data)
+menu_close ()
 {
-  /* Even if we couldn't send the command, we just exit.  That way,
-     closing the application twice will reliably terminate it.
+  /* XXX - Sometimes the apt-worker is still performing some
+           background processing at this time and it wont quit
+           immediately when we do.  The problem with this is that the
+           Application Manager will not launch again until the old
+           apt-worker process has finally exited.
+
+	   We could wait here until the apt-worker is idle (by issuing
+	   a NOOP command for example and waiting for the reply), but
+	   UI-wise it is better to just quit immediately and hope that
+	   the user doesn't restart the Application Manager
+	   immediately.
+
+	   The real fix would be to make the Application Manager
+	   robust against startup problems of the apt-worker.
    */
+
   exit (0);
 }
 
-static void
-menu_close ()
-{
-  /* XXX - Wait for the apt-worker to be idle.  Otherwise the
-           Application Manager will not start when it is launched
-           again immediately.
-   */
-  show_updating ();
-  allow_updating ();
-  apt_worker_noop (noop_result, NULL);
-}
-
 static GtkWidget *details_menu_item = NULL;
 static GtkWidget *search_menu_item = NULL;
 static GtkWidget *operation_menu_item = NULL;


More information about the maemo-commits mailing list