diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-02-06 16:01:14 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-02-06 16:01:14 +0000 |
commit | c64529f3340c99c7626e77dafdaa48682625e8d4 (patch) | |
tree | 1a3c5fa03979b54e40eabe6704b1e7ea01a758b0 | |
parent | 1dc232b56fbeb7358996eae9fbdd7c965e1d9335 (diff) | |
download | rpmdrake-c64529f3340c99c7626e77dafdaa48682625e8d4.tar rpmdrake-c64529f3340c99c7626e77dafdaa48682625e8d4.tar.gz rpmdrake-c64529f3340c99c7626e77dafdaa48682625e8d4.tar.bz2 rpmdrake-c64529f3340c99c7626e77dafdaa48682625e8d4.tar.xz rpmdrake-c64529f3340c99c7626e77dafdaa48682625e8d4.zip |
(run_treeview_dialog) reindent a signal callback for readability too
-rwxr-xr-x | rpmdrake | 52 |
1 files changed, 26 insertions, 26 deletions
@@ -309,32 +309,32 @@ sub run_treeview_dialog { if_($is_backports, 'backports') } ], - $modes{$default_mode{$MODE} || 'all'}), - changed => sub { - my $val = $_[0]->get_text; - return if $val eq $old_value; # workarounding gtk+ sending us sometimes twice events - $old_value = $val; - $default_list_mode = $rmodes{$val}; - if (my @cat = $wanted_categories{$rmodes{$val}} && @{$wanted_categories{$rmodes{$val}}}) { - @$mandrakeupdate_wanted_categories = @cat; - } - if (0) { - reset_search(); - $options->{rebuild_tree}->(); - } - $options->{state}{flat} = 0; # was 1 only for the "All packages, alphabetical", "All packages, by size", "All packages, by selection state", and "Leaves only, sorted by install date" - - if ($options->{tree_mode} ne $val) { - ($options->{tree_mode}) = $val =~ /^by/ ? - $options->{tree_submode} : $rmodes{$val}; - $tree_mode->[0] = $options->{tree_mode}; - $tree_flat->[0] = $options->{state}{flat}; - reset_search(); - slow_func($::main_window->window, sub { switch_pkg_list_mode($rmodes{$val}) }); - $options->{rebuild_tree}->(); - } - } - ); + $modes{$default_mode{$MODE} || 'all'}), + changed => sub { + my $val = $_[0]->get_text; + return if $val eq $old_value; # workarounding gtk+ sending us sometimes twice events + $old_value = $val; + $default_list_mode = $rmodes{$val}; + if (my @cat = $wanted_categories{$rmodes{$val}} && @{$wanted_categories{$rmodes{$val}}}) { + @$mandrakeupdate_wanted_categories = @cat; + } + if (0) { + reset_search(); + $options->{rebuild_tree}->(); + } + $options->{state}{flat} = 0; # was 1 only for the "All packages, alphabetical", "All packages, by size", "All packages, by selection state", and "Leaves only, sorted by install date" + + if ($options->{tree_mode} ne $val) { + ($options->{tree_mode}) = $val =~ /^by/ ? + $options->{tree_submode} : $rmodes{$val}; + $tree_mode->[0] = $options->{tree_mode}; + $tree_flat->[0] = $options->{state}{flat}; + reset_search(); + slow_func($::main_window->window, sub { switch_pkg_list_mode($rmodes{$val}) }); + $options->{rebuild_tree}->(); + } + } + ); my $default_radio = $options->{tree_mode} = $default_list_mode; $cbox->set_text($modes{$default_radio}); |