aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2004-01-14 11:29:01 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2004-01-14 11:29:01 +0000
commit2c409b18edf12b76b317b2b179a29ed6f6e546a6 (patch)
treee8410a4c3f9195fd8fc21576b130fd8b6a3244bc
parent2e84af2742597efc9b227db479bb74c223c15d4d (diff)
downloadrpmdrake-2c409b18edf12b76b317b2b179a29ed6f6e546a6.tar
rpmdrake-2c409b18edf12b76b317b2b179a29ed6f6e546a6.tar.gz
rpmdrake-2c409b18edf12b76b317b2b179a29ed6f6e546a6.tar.bz2
rpmdrake-2c409b18edf12b76b317b2b179a29ed6f6e546a6.tar.xz
rpmdrake-2c409b18edf12b76b317b2b179a29ed6f6e546a6.zip
fix wrongly using unavailable sorting method in remove mode after save in install mode
-rwxr-xr-xrpmdrake22
-rw-r--r--rpmdrake.spec6
2 files changed, 20 insertions, 8 deletions
diff --git a/rpmdrake b/rpmdrake
index 3ebfbed0..497177f0 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -698,7 +698,20 @@ or you already installed all of them."));
$compssUsers = parse_compssUsers_flat();
my @radios_names_ordered = qw(mandrake_choices flat by);
$compssUsers or shift @radios_names_ordered;
- @modes_buttons = gtkradio($radios_infos{by}{name}, map { $radios_infos{$_}{name} } @radios_names_ordered);
+
+ my @advanced_modes = ([ 'by_group', N("All packages, by group"), 0 ], [ 'by_size', N("All packages, by size"), 1 ],
+ [ 'by_selection', N("All packages, by selection state"), 1 ]);
+ $MODE eq 'install' and push @advanced_modes, ([ 'by_source', N("All packages, by medium repository"), 0 ], [ 'by_presence', N("All packages, by update availability"), 0 ]);
+ $MODE eq 'remove' and push @advanced_modes, [ 'by_leaves', N("Leaves only, sorted by install date"), 1 ];
+
+ my $default_radio = $options->{tree_mode} = 'mandrake_choices';
+ if (member($tree_mode->[0], keys %radios_infos, map { $_->[0] } @advanced_modes)) {
+ $default_radio = $options->{tree_mode} = $tree_mode->[0];
+ $options->{state}{flat} = $tree_flat->[0];
+ $default_radio =~ s/^by.*/by/;
+ }
+
+ @modes_buttons = gtkradio($radios_infos{$default_radio}{name}, map { $radios_infos{$_}{name} } @radios_names_ordered);
mapn {
my $capture_mode = $_[0];
@@ -714,15 +727,10 @@ or you already installed all of them."));
}
});
} \@radios_names_ordered, \@modes_buttons;
- $options->{tree_mode} = $tree_mode->[0];
- $options->{state}{flat} = $tree_flat->[0];
my $advanced_menu = Gtk2::Menu->new;
my $radio_by;
- my @advanced_modes = ([ 'by_group', N("All packages, by group"), 0 ], [ 'by_size', N("All packages, by size"), 1 ],
- [ 'by_selection', N("All packages, by selection state"), 1 ]);
- $MODE eq 'install' and push @advanced_modes, ([ 'by_source', N("All packages, by medium repository"), 0 ], [ 'by_presence', N("All packages, by update availability"), 0 ]);
- $MODE eq 'remove' and push @advanced_modes, [ 'by_leaves', N("Leaves only, sorted by install date"), 1 ];
+
each_index {
my ($capt_mode, $capt_flat) = ($_->[0], $_->[2]);
my $item = Gtk2::MenuItem->new_with_label($_->[1]);
diff --git a/rpmdrake.spec b/rpmdrake.spec
index b2fd1af1..884bfac3 100644
--- a/rpmdrake.spec
+++ b/rpmdrake.spec
@@ -8,7 +8,7 @@
%define name rpmdrake
%define version 2.1.1
-%define release 1mdk
+%define release 2mdk
Name: %{name}
Version: %{version}
@@ -101,6 +101,10 @@ rm -rf $RPM_BUILD_ROOT
%{perl_vendorarch}/*.pm
%changelog
+* Wed Jan 14 2004 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1.1-2mdk
+- fix wrongly using unavailable sorting method in remove mode after
+ save in install mode
+
* Mon Jan 12 2004 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1.1-1mdk
- add ability to cancel packages downloads (#6317)
- save sorting method at exit of rpmdrake for Lord Titi (#6051)