diff options
author | Thierry Vignaud <tv@mandriva.org> | 2006-09-11 11:42:24 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2006-09-11 11:42:24 +0000 |
commit | 826d71610788e4a6e8ebf258ab15d50a191c1eda (patch) | |
tree | 41f3df6ef8105587f472ac68097096faff863a6c | |
parent | eb5de5c35939a535f62f40ada24d8348aa661c4d (diff) | |
download | rpmdrake-826d71610788e4a6e8ebf258ab15d50a191c1eda.tar rpmdrake-826d71610788e4a6e8ebf258ab15d50a191c1eda.tar.gz rpmdrake-826d71610788e4a6e8ebf258ab15d50a191c1eda.tar.bz2 rpmdrake-826d71610788e4a6e8ebf258ab15d50a191c1eda.tar.xz rpmdrake-826d71610788e4a6e8ebf258ab15d50a191c1eda.zip |
(run_treeview_dialog) fix crash (#24870)
-rwxr-xr-x | rpmdrake | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1052,6 +1052,8 @@ or you already installed all of them.")); ), all_updates => N("All updates"), security => N("Security updates"), bugfix => N("Bugfixes updates"), normal => N("Normal updates") ); + my %rmodes = reverse %modes; + my %default_mode = (install => 'all', # we want the new GUI by default instead of "non_installed" remove => 'installed', update => 'all_updates', @@ -1069,8 +1071,7 @@ or you already installed all of them.")); $modes{$default_mode{$MODE} || 'all'}), changed => sub { my $val = $_[0]->get_text; - my %h = reverse %modes; - if (0 or my @cat = $wanted_categories{$h{$val}}) { + if (0 or my @cat = $wanted_categories{$rmodes{$val}}) { @$mandrakeupdate_wanted_categories = @cat; $reset_search->(); $options->{rebuild_tree}->(); @@ -1083,7 +1084,7 @@ or you already installed all of them.")); $tree_mode->[0] = $options->{tree_mode}; $tree_flat->[0] = $options->{state}{flat}; $reset_search->(); - slow_func($::main_window->window, sub { $pkgs_provider->({}, $h{$val}) }); + slow_func($::main_window->window, sub { $pkgs_provider->({}, $rmodes{$val}) }); $options->{rebuild_tree}->(); } } @@ -1165,7 +1166,7 @@ Is it ok to continue?", } } if (!$callback_action->($urpm, $pkgs)) { - $pkgs_provider->({ skip_updating_mu => 1 }, $options->{tree_mode}); + $pkgs_provider->({ skip_updating_mu => 1 }, $rmodes{$options->{tree_mode}}); $reset_search->(); $size_selected = 0; (undef, $size_free) = MDK::Common::System::df('/usr'); @@ -1191,7 +1192,7 @@ Is it ok to continue?", [ N("/_File") . N("/_Update media"), undef, sub { update_sources_interactive($urpm, transient => $w->{rwindow}) and do { - $pkgs_provider->({ skip_updating_mu => 1 }, $options->{tree_mode}); + $pkgs_provider->({ skip_updating_mu => 1 }, $rmodes{$options->{tree_mode}}); $reset_search->(); $size_selected = 0; $options->{rebuild_tree}->(); @@ -1211,7 +1212,7 @@ Is it ok to continue?", $options->{rebuild_tree}->(); }, undef, '<Item>' ], [ N("/_File") . N("/Reload the _packages list"), undef, sub { - slow_func($::main_window->window, sub { $pkgs_provider->({ skip_updating_mu => 1 }, $options->{tree_mode}) }); + slow_func($::main_window->window, sub { $rmodes{$pkgs_provider->({ skip_updating_mu => 1 }, $options->{tree_mode})}}); $reset_search->(); $size_selected = 0; $options->{rebuild_tree}->(); |