diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-03-09 17:12:52 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-03-09 17:12:52 +0000 |
commit | 99200c5bebf8a9409b2633fb49e9d54c4c136070 (patch) | |
tree | 9747a57eea4013f527587f3055c26d7a08bb927e /Rpmdrake/edit_urpm_sources.pm | |
parent | 84a416d8b6b7073828eb8b89918c2ea2a2466eea (diff) | |
download | rpmdrake-99200c5bebf8a9409b2633fb49e9d54c4c136070.tar rpmdrake-99200c5bebf8a9409b2633fb49e9d54c4c136070.tar.gz rpmdrake-99200c5bebf8a9409b2633fb49e9d54c4c136070.tar.bz2 rpmdrake-99200c5bebf8a9409b2633fb49e9d54c4c136070.tar.xz rpmdrake-99200c5bebf8a9409b2633fb49e9d54c4c136070.zip |
(downwards_callback, upwards_callback) adapt to multiple selection mode (#29186)
Diffstat (limited to 'Rpmdrake/edit_urpm_sources.pm')
-rwxr-xr-x | Rpmdrake/edit_urpm_sources.pm | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index d631f4f7..1c41ce55 100755 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -388,13 +388,18 @@ sub renum_media ($$$) { } sub upwards_callback() { - my ($model, $iter) = $list_tv->get_selection->get_selected; $model && $iter or return; - my $prev = $model->get_iter_from_string($model->get_path($iter)->to_string - 1); - defined $prev and renum_media($model, $iter, $prev); + my @rows = selected_rows(); + @rows == 0 and return; + my $model = $list_tv->get_model; + my $prev = $model->get_iter_from_string($rows[0] - 1); + defined $prev and renum_media($model, $model->get_iter_from_string($rows[0]), $prev); } sub downwards_callback() { - my ($model, $iter) = $list_tv->get_selection->get_selected; $model && $iter or return; + my @rows = selected_rows(); + @rows == 0 and return; + my $model = $list_tv->get_model; + my $iter = $model->get_iter_from_string($rows[0]); my $next = $model->iter_next($iter); defined $next and renum_media($model, $iter, $next); } |