[gnome-packagekit] Don't try to update previously added deps to be installed in the update viewer
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-packagekit] Don't try to update previously added deps to be installed in the update viewer
- Date: Mon, 22 Jun 2009 04:37:49 -0400 (EDT)
commit 3f5a0c91fc3ae1d6023858eceb98757a6959017a
Author: Richard Hughes <richard hughsie com>
Date: Fri Jun 19 11:17:12 2009 +0100
Don't try to update previously added deps to be installed in the update viewer
src/gpk-update-viewer.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 3defe77..87786e7 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -356,6 +356,7 @@ gpk_update_viewer_button_install_cb (GtkWidget *widget, gpointer data)
GError *error = NULL;
GPtrArray *array = NULL;
gchar **package_ids = NULL;
+ PkInfoEnum info;
/* check connection */
ret = gpk_update_viewer_button_check_connection (size_total);
@@ -377,7 +378,9 @@ gpk_update_viewer_button_install_cb (GtkWidget *widget, gpointer data)
/* find out how many we should update */
while (valid) {
- gtk_tree_model_get (model, &iter, GPK_UPDATES_COLUMN_SELECT, &update,
+ gtk_tree_model_get (model, &iter,
+ GPK_UPDATES_COLUMN_INFO, &info,
+ GPK_UPDATES_COLUMN_SELECT, &update,
GPK_UPDATES_COLUMN_ID, &package_id, -1);
/* set all the checkboxes insensitive */
@@ -389,8 +392,8 @@ gpk_update_viewer_button_install_cb (GtkWidget *widget, gpointer data)
if (update)
selected_any = TRUE;
- /* do something with the data */
- if (update) {
+ /* if selected, and not added previously because of deps */
+ if (update && info != PK_INFO_ENUM_AVAILABLE) {
g_ptr_array_add (array, package_id);
} else {
/* need to free the one in the array later */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]