diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-12-30 15:40:16 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-12-30 15:40:16 +0000 |
commit | 6b91a0b77be1979bca9668fc2aa30c35a11347eb (patch) | |
tree | 6ccb201df8faf7c0c453c7c1a15f0ff030cd2e81 | |
parent | ab6010092425b73e73dfcd88873ea739470a467d (diff) | |
download | rpmdrake-6b91a0b77be1979bca9668fc2aa30c35a11347eb.tar rpmdrake-6b91a0b77be1979bca9668fc2aa30c35a11347eb.tar.gz rpmdrake-6b91a0b77be1979bca9668fc2aa30c35a11347eb.tar.bz2 rpmdrake-6b91a0b77be1979bca9668fc2aa30c35a11347eb.tar.xz rpmdrake-6b91a0b77be1979bca9668fc2aa30c35a11347eb.zip |
MandrakeUpdate: add ability to select all (#6576 and others)
-rwxr-xr-x | rpmdrake | 11 | ||||
-rw-r--r-- | rpmdrake.spec | 1 |
2 files changed, 8 insertions, 4 deletions
@@ -362,7 +362,7 @@ sub run_treeview_dialog { my ($urpm, $pkgs, $descriptions) = $pkgs_provider->(); - my ($options, $size_selected, $compssUsers, $info, $info_update, $tree, $disable_treeselect_callback, %elems); + my ($options, $size_selected, $compssUsers, $info, $info_update, $tree, $tree_model, $disable_treeselect_callback, %elems); $size_selected = 0; #- to remove the use strict warning my (undef, $size_free) = MDK::Common::System::df('/usr'); @@ -440,7 +440,10 @@ or you already installed all of them.")); if ($flat) { $add_node->($_->[0], '') foreach $sortmethods{$mode || 'flat'}->(@elems); } else { - if ($mode eq 'by_source') { + if ($MODE eq 'update') { + $add_node->($_->[0], N("All")) foreach $sortmethods{flat}->(@elems); + $tree->expand_row($tree_model->get_path($tree_model->get_iter_first), 0); + } elsif ($mode eq 'by_source') { $add_node->($_->[0], pkg2medium($pkgs->{$_->[0]}{pkg}, $urpm)->{name}) foreach $sortmethods{flat}->(@elems); } elsif ($mode eq 'by_presence') { $add_node->($_->[0], $pkgs->{$_->[0]}{pkg}->flag_installed && !$pkgs->{$_->[0]}{pkg}->flag_skip @@ -631,7 +634,7 @@ or you already installed all of them.")); rebuild_tree => sub {}, }; - my $tree_model = Gtk2::TreeStore->new("Glib::String", "Gtk2::Gdk::Pixbuf", "Glib::String"); + $tree_model = Gtk2::TreeStore->new("Glib::String", "Gtk2::Gdk::Pixbuf", "Glib::String"); $tree = Gtk2::TreeView->new_with_model($tree_model); $tree->get_selection->set_mode('browse'); @@ -673,7 +676,7 @@ or you already installed all of them.")); my @modes_buttons; if ($MODE eq 'update') { - $options->{state}{flat} = 1; + $options->{state}{flat} = 0; my %toggle_infos = (security => N("Security updates"), bugfix => N("Bugfixes updates"), normal => N("Normal updates")); my @toggle_names_ordered = qw(security bugfix normal); @modes_buttons = map { Gtk2::CheckButton->new(but($toggle_infos{$_})) } @toggle_names_ordered; diff --git a/rpmdrake.spec b/rpmdrake.spec index 51c53211..63c5698e 100644 --- a/rpmdrake.spec +++ b/rpmdrake.spec @@ -105,6 +105,7 @@ rm -rf $RPM_BUILD_ROOT - provide drak* names as well - fix filelist wrongly displayed in RTL language, thx titi (#6581) - remove info on last selected package after install (#4648) +- MandrakeUpdate: add ability to select all (#6576 and others) * Fri Sep 5 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-35mdk - fix invalid-build-requires libcurl2-devel |