aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-10-01 11:32:27 +0000
committerThierry Vignaud <tv@mandriva.org>2009-10-01 11:32:27 +0000
commitcc5a2f3b67d3c245b50a8ac69287731094ccf8b3 (patch)
tree31fa6e9ea7d70cdc12158a28c9bcc0a84b046c7d
parentdb3b6f3c6fc75f5d3de3e37901602b5ec1c70226 (diff)
downloadrpmdrake-cc5a2f3b67d3c245b50a8ac69287731094ccf8b3.tar
rpmdrake-cc5a2f3b67d3c245b50a8ac69287731094ccf8b3.tar.gz
rpmdrake-cc5a2f3b67d3c245b50a8ac69287731094ccf8b3.tar.bz2
rpmdrake-cc5a2f3b67d3c245b50a8ac69287731094ccf8b3.tar.xz
rpmdrake-cc5a2f3b67d3c245b50a8ac69287731094ccf8b3.zip
(reset_search) move code from do_search() here (needed for next commit)
-rw-r--r--Rpmdrake/gui.pm7
-rwxr-xr-xrpmdrake3
2 files changed, 8 insertions, 2 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index 7241dbae..96a07d6f 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -46,6 +46,8 @@ our @EXPORT = qw(
$force_displaying_group
$force_rebuild
$pkgs
+ $results_ok
+ $results_none
$size_free
$size_selected
$urpm
@@ -72,6 +74,7 @@ our @EXPORT = qw(
);
our ($descriptions, %filters, @filtered_pkgs, %filter_methods, $force_displaying_group, $force_rebuild, @initial_selection, $pkgs, $size_free, $size_selected, $urpm);
+our ($results_ok, $results_none) = (N("Search results"), N("Search results (none)"));
our %grp_columns = (
label => 0,
@@ -516,6 +519,10 @@ sub ask_browse_tree_given_widgets_for_rpmdrake {
our $find_entry;
sub reset_search() {
+ return if !$common;
+ $common->{delete_category}->($_) foreach $results_ok, $results_none;
+ # clear package list:
+ $common->{add_nodes}->();
}
sub is_a_package {
diff --git a/rpmdrake b/rpmdrake
index 09094b54..fe134c15 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -68,8 +68,7 @@ sub do_search($$$$$$$) {
$entry =~ s/^\s*$//;
}
my $entry_rx = eval { qr/$entry/i } or return;
- my ($results_ok, $results_none) = (N("Search results"), N("Search results (none)"));
- $options->{delete_category}->($_) foreach $results_ok, $results_none;
+ reset_search();
$options->{state}{flat} and $options->{delete_all}->();
$tree->collapse_all;
my @search_results;