aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-11-27 17:57:09 +0100
committerAngelo Naselli <anaselli@linux.it>2014-11-27 17:57:09 +0100
commit27bed37935370a2b4f5ad7e2d0dc99bb7e5ad687 (patch)
tree895cf9b0d5c7fd23fdf1549fa2c11b43c6343082 /lib/AdminPanel
parent5c9e03406db337887d1217d77b715fbf823b36e4 (diff)
downloadcolin-keep-27bed37935370a2b4f5ad7e2d0dc99bb7e5ad687.tar
colin-keep-27bed37935370a2b4f5ad7e2d0dc99bb7e5ad687.tar.gz
colin-keep-27bed37935370a2b4f5ad7e2d0dc99bb7e5ad687.tar.bz2
colin-keep-27bed37935370a2b4f5ad7e2d0dc99bb7e5ad687.tar.xz
colin-keep-27bed37935370a2b4f5ad7e2d0dc99bb7e5ad687.zip
first attempt to add and remove a group from tree tree
Diffstat (limited to 'lib/AdminPanel')
-rw-r--r--lib/AdminPanel/Rpmdragora/gui.pm45
1 files changed, 43 insertions, 2 deletions
diff --git a/lib/AdminPanel/Rpmdragora/gui.pm b/lib/AdminPanel/Rpmdragora/gui.pm
index aa97435..e9f39b6 100644
--- a/lib/AdminPanel/Rpmdragora/gui.pm
+++ b/lib/AdminPanel/Rpmdragora/gui.pm
@@ -611,6 +611,41 @@ sub add_parent {
$tree->rebuildTree();
}
+
+#=============================================================
+
+=head2 add_tree_item
+
+=head3 INPUT
+
+=item B<$tree> YTree for the group of the rpm packages
+
+=item B<$item> string containing a group (to be added as leaf node)
+
+=item B<$selected> if the new item is selected
+
+
+=head3 DESCRIPTION
+
+ This function add a group to the tree view
+
+=cut
+
+#=============================================================
+sub add_tree_item {
+ my ($tree, $item, $selected) = @_;
+
+ $tree or return undef;
+
+ $tree->startMultipleChanges();
+ my $treeItem = new yui::YTreeItem($item, get_icon_path($item, 0), 0);
+ $treeItem->setSelected($selected);
+
+ $tree->addItem($treeItem);
+ $tree->rebuildTree();
+ $tree->doneMultipleChanges();
+}
+
#=============================================================
=head2 add_package_item
@@ -1041,9 +1076,15 @@ our $find_entry;
sub reset_search() {
return if !$common;
- $common->{delete_category}->($_) foreach $results_ok, $results_none;
+
+# TODO $common->{delete_category}->($_) foreach $results_ok, $results_none;
# clear package list:
- $common->{add_nodes}->();
+ yui::YUI::app()->busyCursor();
+ my $wdgt = $common->{widgets};
+ $wdgt->{detail_list}->startMultipleChanges();
+ $wdgt->{detail_list}->deleteAllItems();
+ $wdgt->{detail_list}->doneMultipleChanges();
+ yui::YUI::app()->normalCursor();
}
sub is_a_package {