[gnome-software] Remove the package after the update has been applied, or the package has been installed



commit ebbfd04cd20fef776b050ecd1ade5ed08ab97391
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jun 28 09:47:22 2012 +0100

    Remove the package after the update has been applied, or the package has been installed

 src/gs-main.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-main.c b/src/gs-main.c
index ac53645..4dc809c 100644
--- a/src/gs-main.c
+++ b/src/gs-main.c
@@ -286,6 +286,7 @@ gs_main_remove_packages_cb (PkClient *client,
 	PkError *error_code = NULL;
 	PkPackage *item;
 	PkResults *results;
+	GsAppWidget *app_widget;
 
 	/* get the results */
 	results = pk_client_generic_finish (client, res, &error);
@@ -309,6 +310,18 @@ gs_main_remove_packages_cb (PkClient *client,
 	for (i=0; i<array->len; i++) {
 		item = g_ptr_array_index (array, i);
 		g_debug ("removed %s", pk_package_get_id (item));
+		app_widget = gs_main_get_app_widget_for_id (priv->list_box_installed,
+							    pk_package_get_id (item));
+		if (app_widget != NULL) {
+			gtk_container_remove (GTK_CONTAINER (priv->list_box_installed),
+					      GTK_WIDGET (app_widget));
+		}
+		app_widget = gs_main_get_app_widget_for_id (priv->list_box_updates,
+							    pk_package_get_id (item));
+		if (app_widget != NULL) {
+			gtk_container_remove (GTK_CONTAINER (priv->list_box_updates),
+					      GTK_WIDGET (app_widget));
+		}
 	}
 out:
 	if (error_code != NULL)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]