From 1a1257453ed71d17df91031922c462073a4848e7 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 1 Mar 2007 15:46:39 +0000 Subject: (selected_rows) introduce it to (based on selrow template) --- Rpmdrake/edit_urpm_sources.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Rpmdrake/edit_urpm_sources.pm') diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index e0c4fb7e..4af06bdc 100755 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -54,6 +54,14 @@ sub selrow { return $row; } +sub selected_rows { + my ($o_list_tv) = @_; + defined $o_list_tv or $o_list_tv = $list_tv; + my (@rows) = $o_list_tv->get_selection->get_selected_rows; + return -1 if $#rows == -1; + map { $_->to_string } @rows; +} + sub remove_row { my ($model, $path_str) = @_; my $iter = $model->get_iter_from_string($path_str); -- cgit v1.2.1