aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/edit_urpm_sources.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-09 17:12:52 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-09 17:12:52 +0000
commit99200c5bebf8a9409b2633fb49e9d54c4c136070 (patch)
tree9747a57eea4013f527587f3055c26d7a08bb927e /Rpmdrake/edit_urpm_sources.pm
parent84a416d8b6b7073828eb8b89918c2ea2a2466eea (diff)
downloadrpmdrake-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-xRpmdrake/edit_urpm_sources.pm13
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);
}