diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-11-27 17:57:09 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-11-27 17:57:09 +0100 |
commit | 27bed37935370a2b4f5ad7e2d0dc99bb7e5ad687 (patch) | |
tree | 895cf9b0d5c7fd23fdf1549fa2c11b43c6343082 /modules | |
parent | 5c9e03406db337887d1217d77b715fbf823b36e4 (diff) | |
download | manatools-27bed37935370a2b4f5ad7e2d0dc99bb7e5ad687.tar manatools-27bed37935370a2b4f5ad7e2d0dc99bb7e5ad687.tar.gz manatools-27bed37935370a2b4f5ad7e2d0dc99bb7e5ad687.tar.bz2 manatools-27bed37935370a2b4f5ad7e2d0dc99bb7e5ad687.tar.xz manatools-27bed37935370a2b4f5ad7e2d0dc99bb7e5ad687.zip |
first attempt to add and remove a group from tree tree
Diffstat (limited to 'modules')
-rwxr-xr-x | modules/rpmdragora/rpmdragora | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/modules/rpmdragora/rpmdragora b/modules/rpmdragora/rpmdragora index 6bb949f1..47d8393c 100755 --- a/modules/rpmdragora/rpmdragora +++ b/modules/rpmdragora/rpmdragora @@ -246,7 +246,12 @@ sub _do_search($$$$$$) { $entry =~ s/^\s*$//; } my $entry_rx = eval { qr/$entry/i } or return; + reset_search(); + # TODO FIXME speed up, we cannot remove an item but rebuilding all is slow + # We could just rebuild the tree items + $options->{rebuild_tree}->(); + $options->{state}{flat} and $options->{delete_all}->(); # TODO: write a collapse_all method #$tree->collapse_all; @@ -381,11 +386,13 @@ sub _do_search($$$$$$) { $searchw->destroy; } - my $iter; +# my $iter; if (@search_results) { @search_results = sort_packages(@search_results); $elems{$results_ok} = [ map { [ $_, $results_ok ] } @search_results ]; - $iter = $options->{add_parent}->($tree, $results_ok); +# $iter = $options->{add_parent}->($tree, $results_ok); + + AdminPanel::Rpmdragora::gui::add_tree_item($tree, $results_ok, 1); $options->{add_nodes}->(map { [ $_, $results_ok . ($options->{tree_mode} eq 'by_presence' ? '|' . ($pkgs->{$_}{pkg}->flag_installed ? $loc->N("Upgradable") : $loc->N("Addable")) : ($options->{tree_mode} eq 'by_selection' @@ -393,7 +400,8 @@ sub _do_search($$$$$$) { : '')) ] } @search_results); } else { - $iter = $options->{add_parent}->($tree, $results_none); + AdminPanel::Rpmdragora::gui::add_tree_item($tree, $results_none, 1); +# $iter = $options->{add_parent}->($tree, $results_none); # clear package list: $options->{add_nodes}->(); my $string = $default_list_mode eq 'all' && $filter->[0] eq 'all' ? $loc->N("No search results.") : @@ -1181,7 +1189,9 @@ sub run_treeview_dialog { reset_search(); } elsif ($widget == $find_button) { + yui::YUI::app()->busyCursor(); _do_search($find_entry, $tree, $options, $current_search_type, $urpm, $pkgs); + yui::YUI::app()->normalCursor(); } elsif ($widget == $select_all_button) { toggle_all($options, 1); |