From 90c5ec79b53a99fbe006f93f0f64cae5eb97cc28 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sat, 11 Aug 2007 00:44:20 +0000 Subject: (do_search) do not create multiple useless N("Search results (none)") subtrees but display a message in status bar instead (#32332) --- rpmdrake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rpmdrake b/rpmdrake index 5ebcb50f..329b886f 100755 --- a/rpmdrake +++ b/rpmdrake @@ -54,8 +54,8 @@ sub do_search($$$$$$$) { my ($find_entry, $tree, $tree_model, $options, $current_search_type, $urpm, $pkgs) = @_; my $entry = $find_entry->get_text or return; 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; + my ($results_ok) = (N("Search results")); + $options->{delete_category}->($_) foreach $results_ok; $options->{state}{flat} and $options->{delete_all}->(); $tree->collapse_all; my @search_results; @@ -151,7 +151,8 @@ sub do_search($$$$$$$) { $tree->expand_row($path, 0); $tree->scroll_to_cell($path, undef, 1, 0.5, 0); } else { - $options->{add_nodes}->([ '', $results_none, { nochild => 1 } ]); + statusbar_msg(N("Search results (none)")); + gtkset_mousecursor_normal($::w->{rwindow}->window); } } -- cgit v1.2.1