diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-11-12 17:02:58 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-11-12 17:02:58 +0100 |
commit | 4dd8433498da4dd817449bdcb978f612433631f0 (patch) | |
tree | ea3a087c82cea23739f64ee81d77fda60e759e03 /modules/rpmdragora/dragoraUpdate | |
parent | 1d0e7f9f823f62b304782ebe380aaebd1892a98a (diff) | |
download | manatools-4dd8433498da4dd817449bdcb978f612433631f0.tar manatools-4dd8433498da4dd817449bdcb978f612433631f0.tar.gz manatools-4dd8433498da4dd817449bdcb978f612433631f0.tar.bz2 manatools-4dd8433498da4dd817449bdcb978f612433631f0.tar.xz manatools-4dd8433498da4dd817449bdcb978f612433631f0.zip |
fixed selected item (if checked or unchecked)
Diffstat (limited to 'modules/rpmdragora/dragoraUpdate')
-rwxr-xr-x | modules/rpmdragora/dragoraUpdate | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/rpmdragora/dragoraUpdate b/modules/rpmdragora/dragoraUpdate index a597f218..f10e6385 100755 --- a/modules/rpmdragora/dragoraUpdate +++ b/modules/rpmdragora/dragoraUpdate @@ -81,6 +81,9 @@ my %icons_cache; sub _refresh_packages_list { my ($dialog, $packageTbl) = @_; + my $item = $packageTbl->selectedItem(); + my $packageName = $item ? $data{$item->index()}{name} : undef; + # select packages to update: my @requested = sort grep { $pkgs->{$_}{pkg} } @filtered_pkgs; @@ -103,8 +106,6 @@ sub _refresh_packages_list { my $itemCollection = new yui::YItemCollection; my $i = 0; foreach (@requested) { - - my $summary = get_summary($_); my ($name, $version, $release, $arch) = split_fullname($_); # TODO check if %data is needed @@ -114,7 +115,7 @@ sub _refresh_packages_list { my $medium = !$raw_medium->{fake} ? $raw_medium->{name} : undef; my $icon = ""; - my $item = new yui::YCBTableItem("", $name , $summary, $version, $release, $arch); + $item = new yui::YCBTableItem("", $name , $summary, $version, $release, $arch); my $importance = $medium && $descriptions->{$medium}{$name}{importance}; if ($importance) { @@ -140,6 +141,7 @@ sub _refresh_packages_list { $item->check($pkgs->{$_}{selected}); $item->setLabel($name); + $item->setSelected(1) if ($packageName && $name eq $packageName); $itemCollection->push($item); $item->DISOWN(); } |