[gnome-packagekit/gnome-2-32] gpk-update-viewer: toggle subpackages when toggling the main package
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit/gnome-2-32] gpk-update-viewer: toggle subpackages when toggling the main package
- Date: Tue, 15 Mar 2011 12:22:07 +0000 (UTC)
commit e1f2a44cfd5ee375bfc9cf10ce05f37fc82d9f0e
Author: Christopher Aillon <caillon redhat com>
Date: Thu Feb 24 15:58:02 2011 -0800
gpk-update-viewer: toggle subpackages when toggling the main package
GNOME Bug 616149
src/gpk-update-viewer.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 9c4e8d3..505c423 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -1523,9 +1523,10 @@ out:
static void
gpk_update_viewer_treeview_update_toggled (GtkCellRendererToggle *cell, gchar *path_str, GpkUpdateViewer *update_viewer)
{
- GtkTreeIter iter;
+ GtkTreeIter iter, child_iter;
GtkTreePath *path = gtk_tree_path_new_from_string (path_str);
gboolean update;
+ gboolean child_valid;
gchar *package_id;
GtkTreeView *treeview;
GtkTreeModel *model;
@@ -1547,6 +1548,14 @@ gpk_update_viewer_treeview_update_toggled (GtkCellRendererToggle *cell, gchar *p
/* set new value */
gtk_tree_store_set (GTK_TREE_STORE(model), &iter, GPK_UPDATES_COLUMN_SELECT, update, -1);
+ /* do the same for any children */
+ child_valid = gtk_tree_model_iter_children (model, &child_iter, &iter);
+ while (child_valid) {
+ gtk_tree_store_set (GTK_TREE_STORE(model), &child_iter,
+ GPK_UPDATES_COLUMN_SELECT, update, -1);
+ child_valid = gtk_tree_model_iter_next (model, &child_iter);
+ }
+
/* clean up */
gtk_tree_path_free (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]