diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | Rpmdrake/edit_urpm_sources.pm | 11 |
2 files changed, 9 insertions, 5 deletions
@@ -1,3 +1,6 @@ +- edit-urpm-sources: + o fix edit button being unsensitive (mga#11961) + Version 6.3 - 6 December 2013, Thierry Vignaud - fix searching returning no results (mga#11898) diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index 7c7fe434..577a72b1 100644 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -1032,17 +1032,18 @@ sub mainwindow() { my ($dw_button, $edit_button, $remove_button, $up_button); $list_tv->get_selection->signal_connect(changed => sub { my ($selection) = @_; - my @rows = $selection->get_selected_rows; + my ($rows) = $selection->get_selected_rows; my $model = $list; + my $size = $#{$rows}; # we can delete several medium at a time: - $remove_button and $remove_button->set_sensitive($#rows != -1); + $remove_button and $remove_button->set_sensitive($size != -1); # we can only edit/move one item at a time: - $_ and $_->set_sensitive(@rows == 1) foreach $up_button, $dw_button, $edit_button; + $_ and $_->set_sensitive($size == 0) foreach $up_button, $dw_button, $edit_button; # we can only up/down one item if not at begin/end: - return if @rows != 1; + return if $size != 0; - my $curr_path = $rows[0]; + my $curr_path = $rows->[0]; my $first_path = $model->get_path($model->get_iter_first); $up_button->set_sensitive($first_path && $first_path->compare($curr_path)); |