diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-01-25 19:03:01 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-01-25 19:03:01 +0000 |
commit | 00e1318362cfde1c00217e1299db8f6aa226d5ca (patch) | |
tree | 9ba003285028c622583e6793e7538a9d121e9f19 | |
parent | e1974cbb326052dd3ed48a3d1fb26fc6fadec385 (diff) | |
download | rpmdrake-00e1318362cfde1c00217e1299db8f6aa226d5ca.tar rpmdrake-00e1318362cfde1c00217e1299db8f6aa226d5ca.tar.gz rpmdrake-00e1318362cfde1c00217e1299db8f6aa226d5ca.tar.bz2 rpmdrake-00e1318362cfde1c00217e1299db8f6aa226d5ca.tar.xz rpmdrake-00e1318362cfde1c00217e1299db8f6aa226d5ca.zip |
(run_treeview_dialog) do not show "backports" in the list of filters
if there's no inactive backport medium (#37088)
-rwxr-xr-x | rpmdrake | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -264,6 +264,7 @@ sub run_treeview_dialog { $options->{state}{splited} = 1; #$options->{state}{flat} = 1; $compssUsers = parse_compssUsers_flat(); + my $is_backports = get_inactive_backport_media(fast_open_urpmi_db()); my %modes = (all => N("All"), installed => N("Installed"), non_installed => N("Not installed"), @@ -276,7 +277,7 @@ sub run_treeview_dialog { by_leaves => N("Leaves only, sorted by install date"), by_group => N("All packages, by group"), ), - backports => N("Backports"), + ($is_backports ? (backports => N("Backports")) : ()), all_updates => N("All updates"), security => N("Security updates"), bugfix => N("Bugfixes updates"), @@ -297,7 +298,9 @@ sub run_treeview_dialog { ); my $old_value; my $cbox = gtksignal_connect(Gtk2::ComboBox->new_with_strings([ @modes{'all', if_($compssUsers, 'mandrake_choices'), - qw(installed non_installed all_updates security bugfix normal backports) + qw(installed non_installed all_updates security bugfix normal), + if_($is_backports, 'backports') + } ], $modes{$default_mode{$MODE} || 'all'}), changed => sub { |