diff options
author | Thierry.Vignaud <thierry.vignaud@gmail.com> | 2014-05-28 22:37:23 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-05-28 22:37:23 +0200 |
commit | df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085 (patch) | |
tree | 3ce05fa2bbad4d01d0df7a268abab40315b72e22 /perl-install/interactive/gtk.pm | |
parent | ac656a1c73103b06962ab6199da16a8607528c19 (diff) | |
download | drakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.tar drakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.tar.gz drakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.tar.bz2 drakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.tar.xz drakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.zip |
simplify using member()
Diffstat (limited to 'perl-install/interactive/gtk.pm')
-rw-r--r-- | perl-install/interactive/gtk.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 9b989b84f..98f1eb2a7 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -112,7 +112,7 @@ sub create_treeview_list { } else { $e->{may_go_to_next}(), return 1 if $c eq ' '; - $curr++ if $starting_word eq '' || $starting_word eq $c; + $curr++ if member($starting_word, '', $c); $starting_word .= $c unless $starting_word eq $c; } my @l = @{$e->{formatted_list}}; @@ -276,7 +276,7 @@ sub create_treeview_tree { $next = 1; } else { &$toggle and return 1 if $c eq ' '; - $next = 1 if $starting_word eq '' || $starting_word eq $c; + $next = 1 if member($starting_word, '', $c); $starting_word .= $c unless $starting_word eq $c; } my $word = quotemeta $starting_word; @@ -561,7 +561,7 @@ sub create_widget { $w->set_active_iter($model->get_iter_from_string($path_str)); }; } else { - $w->set_text($s) if $s ne $w->get_text && $_[0] ne $w->get_text; + $w->set_text($s) if !member($w->get_text, $s, $_[0]); } }; } else { |