diff options
author | Norbert Preining <preining@logic.at> | 2012-05-08 23:06:04 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2012-05-08 23:06:04 +0000 |
commit | 9258e271a96545e80cceeae9e95eaeb6a6fc7c4f (patch) | |
tree | a0d13c96ff16cc2f688dfada941019956167d8e4 /Master | |
parent | 30d3cdf94abb9f7cb0e270abef2b0aa8aef08225 (diff) |
tlmgr gui match handling according to Karl
git-svn-id: svn://tug.org/texlive/trunk@26264 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf/scripts/texlive/tlmgrgui.pl | 62 |
1 files changed, 36 insertions, 26 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgrgui.pl b/Master/texmf/scripts/texlive/tlmgrgui.pl index 3a3cf58a9ce..565624af11c 100644 --- a/Master/texmf/scripts/texlive/tlmgrgui.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui.pl @@ -122,9 +122,9 @@ my $status_value = 0; my $show_packages = 1; my $show_collections = 1; my $show_schemes = 1; -my $match_descriptions = 0; -my $match_filenames = 0; -my $match_taxonomies = 0; +my $match_descriptions = 1; +my $match_filenames = 1; +my $match_taxonomies = 1; my $selection_value = 0; @@ -335,18 +335,18 @@ sub do_rest_of_gui { $match_entry->configure(-validate => 'key', -validatecommand => sub { my ($new_val, undef, $old_val) = @_; - if (!$new_val) { - $match_descriptions = 0; - $match_taxonomies = 0; - $match_filenames = 0; - } else { - # if something is already in the search field don't change selection - if (!$old_val) { - $match_descriptions = 1; - $match_taxonomies = 1 if (defined($taxonomy)); - $match_filenames = 1; - } - } + # if (!$new_val) { + # $match_descriptions = 0; + # $match_taxonomies = 0; + # $match_filenames = 0; + # } else { + # # if something is already in the search field don't change selection + # if (!$old_val) { + # $match_descriptions = 1; + # $match_taxonomies = 1 if (defined($taxonomy)); + # $match_filenames = 1; + # } + # } update_grid(); return 1; }); my $filter_selection = $filter_frame->Labelframe(-text => __("Selection")); @@ -375,9 +375,9 @@ sub do_rest_of_gui { $show_packages = 1; $show_collections = 1; $show_schemes = 1; $selection_value = 0; - $match_descriptions = 0; - $match_taxonomies = 0; - $match_filenames = 0; + $match_descriptions = 1; + $match_taxonomies = 1; + $match_filenames = 1; update_grid(); })->pack(@x_x, @a_c); @@ -911,19 +911,23 @@ sub MatchesFilters { } # # match dealing - # here we have an "or" condition, either it matches the one or the - # other, so since we are in negative branch returning 0 we have to - # make sure that we negate the value - # (sorry if you don't understand that one, I had some Sake) # - # SPECIAL: If neiter description matching nor file name matching is - # selected, we do NOT do any checks at all. Somehow that is what - # feels right to me, but please correct me! + # * some search targets selected, search string empty + # + search string empty + # -> show all packages + # + search string non-empty + # -> only show matching packages + # * no search target selected + # + search string empty + # -> show empty list (no warning) + # + search string non-empty + # -> show empty list (maybe show warning "select something") + # if ($match_descriptions || $match_taxonomies || $match_filenames) { my $found = 0; my $r = $match_entry->get; if ($r eq "") { - return 0; + return 1; } # check first for the default search type, the descriptions # also match the remoterevisionstring to get search for repositories @@ -955,6 +959,12 @@ sub MatchesFilters { return 0; } # otherwise more checks have to be done + } else { + my $r = $match_entry->get; + if ($r ne "") { + # we could give a warning "select something" but HOW??? + } + return 0 } # selection if ($selection_value == 0) { |