[maemo-commits] [maemo-commits] r9035 - projects/haf/trunk/osso-application-installer/src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Jan 10 16:41:00 EET 2007
- Previous message: [maemo-commits] r9034 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Next message: [maemo-commits] r9036 - projects/haf/trunk/osso-application-installer/src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: marivoll Date: 2007-01-10 16:40:59 +0200 (Wed, 10 Jan 2007) New Revision: 9035 Modified: projects/haf/trunk/osso-application-installer/src/menu.cc Log: * src/menu.cc (noop_result): New. (menu_close): Perform a APT_CMD_NOOP before exiting to ensure that the apt-worker is idle. (N49759) Modified: projects/haf/trunk/osso-application-installer/src/menu.cc =================================================================== --- projects/haf/trunk/osso-application-installer/src/menu.cc 2007-01-10 14:37:30 UTC (rev 9034) +++ projects/haf/trunk/osso-application-installer/src/menu.cc 2007-01-10 14:40:59 UTC (rev 9035) @@ -33,6 +33,7 @@ #include "settings.h" #include "repo.h" #include "search.h" +#include "apt-worker-client.h" #define _(x) gettext (x) @@ -90,11 +91,26 @@ } static void -menu_close () +noop_result (int cmd, apt_proto_decoder *dec, void *data) { + /* Even if we couldn't send the command, we just exit. That way, + closing the application twice will reliably terminate it. + */ 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;
- Previous message: [maemo-commits] r9034 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Next message: [maemo-commits] r9036 - projects/haf/trunk/osso-application-installer/src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]