diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-25 15:57:58 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-12-05 14:16:08 +0100 |
commit | 5c0074c71b6bc1ea7e8a92d6b5d638229881feab (patch) | |
tree | 4cf073e0125443b120036cdb6eb7469b6d9d92d9 | |
parent | 98dfa80dc4e68e6f4a6517e683c002490b6f7560 (diff) | |
download | rpmdrake-5c0074c71b6bc1ea7e8a92d6b5d638229881feab.tar rpmdrake-5c0074c71b6bc1ea7e8a92d6b5d638229881feab.tar.gz rpmdrake-5c0074c71b6bc1ea7e8a92d6b5d638229881feab.tar.bz2 rpmdrake-5c0074c71b6bc1ea7e8a92d6b5d638229881feab.tar.xz rpmdrake-5c0074c71b6bc1ea7e8a92d6b5d638229881feab.zip |
simplify
-rwxr-xr-x | rpmdrake | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -519,7 +519,8 @@ sub run_treeview_dialog { ); my $view_callback = sub { - my ($val) = @_; + my (undef, $current) = @_; + my $val = $current->get_name; return if $val eq $old_value; # workarounding gtk+ sending us sometimes twice events $old_value = $val; return if $mode->[0] eq $val; @@ -586,8 +587,8 @@ sub run_treeview_dialog { my @radio_labels = qw(flat by_group by_leaves by_presence by_selection by_size by_source); my @radios = map { - my $val = $_; - [ $_, undef, $modes{$_}, undef, undef, sub { $view_callback->($val) } ]; + [ $_, undef, $modes{$_}, undef, undef, $view_callback ]; + } @radio_labels; my $ui = gtknew('UIManager', |