diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-08-25 13:41:56 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-08-25 13:41:56 +0000 |
commit | 7e7a62d588fe132695225a1f65e9104a5c4fb320 (patch) | |
tree | 640b1143025309aeaa2860669879fe6f2d4096f0 | |
parent | c271fb2afe02cedfe41e8549a761107f2a673452 (diff) | |
download | rpmdrake-7e7a62d588fe132695225a1f65e9104a5c4fb320.tar rpmdrake-7e7a62d588fe132695225a1f65e9104a5c4fb320.tar.gz rpmdrake-7e7a62d588fe132695225a1f65e9104a5c4fb320.tar.bz2 rpmdrake-7e7a62d588fe132695225a1f65e9104a5c4fb320.tar.xz rpmdrake-7e7a62d588fe132695225a1f65e9104a5c4fb320.zip |
fix sorting by type of update
-rwxr-xr-x | MandrivaUpdate | 13 | ||||
-rw-r--r-- | NEWS | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/MandrivaUpdate b/MandrivaUpdate index 5a117eb2..37491d71 100755 --- a/MandrivaUpdate +++ b/MandrivaUpdate @@ -50,7 +50,8 @@ use Gtk2::SimpleList; short_name => 3, version => 4, release => 5, - arch => 6 + arch => 6, + importance => 7, ); $ugtk2::wm_icon = "title-$MODE"; @@ -97,7 +98,7 @@ sub refresh_packages_list { if ($importance) { $icon = $icons_cache{$importance} ||= gtknew('Pixbuf', file => $update_icons{$importance}); } - [ $icon, $pkgs->{$_}{selected}, $_, format_name_n_summary($name, $summary), $version, $release, $arch ]; + [ $icon, $pkgs->{$_}{selected}, $_, format_name_n_summary($name, $summary), $version, $release, $arch, $importance ]; } grep { $pkgs->{$_}{pkg} } @requested; gtktext_insert($info, formatAlaTeX(N("The list of updates is empty. This means that either there is @@ -159,6 +160,7 @@ sub run_treeview_dialog { " " . N("Version") . " " => 'text', " " . N("Release") . " " => 'text', " " . N("Arch") . " " => 'text', + '' => 'hidden', ), ), @@ -205,6 +207,13 @@ sub run_treeview_dialog { ); $statusbar = Gtk2::Statusbar->new; + $list->get_model->set_sort_func($pkg_columns{image} + 1, sub { + my ($store, $treeiter1, $treeiter2) = @_; + $store->get_value($treeiter1, $pkg_columns{importance}) cmp + $store->get_value($treeiter2, $pkg_columns{importance}); + }); + + $list->set_rules_hint(1); my $bool_col = $list->get_column(0); $bool_col->set_fixed_width(24); @@ -1,3 +1,5 @@ +- MandrivaUpdate: + o fix sorting by type of update - rpmdrake: o workaround crashing when media's MD5SUM are garbaged (#41352) |