diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-12-02 19:04:17 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-12-02 19:04:17 +0100 |
commit | ddfb4a855432efa26ee8e00044074e9c19edd5b2 (patch) | |
tree | b4f19c55d2f884628e7e5029823849608140dc9c /modules | |
parent | 9228b5b393f964b988ec472d046b61cbde41ba62 (diff) | |
download | manatools-ddfb4a855432efa26ee8e00044074e9c19edd5b2.tar manatools-ddfb4a855432efa26ee8e00044074e9c19edd5b2.tar.gz manatools-ddfb4a855432efa26ee8e00044074e9c19edd5b2.tar.bz2 manatools-ddfb4a855432efa26ee8e00044074e9c19edd5b2.tar.xz manatools-ddfb4a855432efa26ee8e00044074e9c19edd5b2.zip |
- Fixed package selection, when canceled now it is in the right status
Diffstat (limited to 'modules')
-rwxr-xr-x | modules/rpmdragora/rpmdragora | 57 |
1 files changed, 11 insertions, 46 deletions
diff --git a/modules/rpmdragora/rpmdragora b/modules/rpmdragora/rpmdragora index 71499e3e..9a91a7f9 100755 --- a/modules/rpmdragora/rpmdragora +++ b/modules/rpmdragora/rpmdragora @@ -161,51 +161,9 @@ sub detaillist_changeditem_callback { my $changedItem = $detail_list->changedItem(); return if (!$changedItem); - # handles installist and droplist - my $index=0; - if ($changedItem->checked()) { - # to be installed if not in to be removed list - my $found = 0; - foreach $index (0 .. scalar(@itemsToBeRemoved) -1) { - my $currItem = $itemsToBeRemoved[$index]; -#pasmatt why? changedItem is YCBTableItem now so it's what you're looking for -# if(ref $currItem eq "yui::YCBTableItem") { - if ($currItem->label() eq $changedItem->label()) { - $found = 1; - splice (@itemsToBeRemoved, $index ,1); - last; - } -# } - } - if ($found == 0) { - push(@itemsToBeInstalled, $changedItem); - # $pkgs->{$options->{table_item_list}[$changedItem->index()]}{selected} = 1; - # toggle_veloce($options->{table_item_list}[$changedItem->index()],"to_install"); - fast_toggle($changedItem); - } - } - else { - # to be removed if not in to be installed list - my $found = 0; - foreach $index (0 .. scalar(@itemsToBeInstalled)-1) { - my $currItem = $itemsToBeInstalled[$index]; -# if(ref $currItem eq "yui::YCBTableItem") { - if ($currItem->label() eq $changedItem->label()) { - $found = 1; - splice (@itemsToBeInstalled, $index ,1); - last; - } -# } - } - if ($found == 0) { - push(@itemsToBeRemoved, $changedItem); - # $pkgs->{$options->{table_item_list}[$changedItem->index()]}{selected} = 0; - # toggle_veloce($options->{table_item_list}[$changedItem->index()],"to_remove"); - fast_toggle($changedItem); - } - } - print "itemsToBeRemoved counts ".scalar(@itemsToBeRemoved)." items\n"; - print "itemsToBeInstalled counts ".scalar(@itemsToBeInstalled)." items\n"; + fast_toggle($changedItem); + + return; } sub detaillist_callback { @@ -1219,8 +1177,15 @@ sub run_treeview_dialog { } elsif ($widget == $detail_list){ $info_options = {}; + my $wEvent = yui::toYWidgetEvent($event); + + if ($wEvent->reason() == $yui::YEvent::ValueChanged) { + yui::YUI::app()->busyCursor(); + detaillist_changeditem_callback($detail_list, \%$options); + yui::YUI::app()->normalCursor(); + tree_callback($tree->currentItem(),\%$options); + } detaillist_callback($detail_list->selectedItem(), $info, \%$options); - detaillist_changeditem_callback($detail_list, \%$options); } elsif ($widget == $QuitButton) { quit(); |