aboutsummaryrefslogtreecommitdiffstats
path: root/MandrivaUpdate
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-06-18 13:53:13 +0000
committerThierry Vignaud <tv@mandriva.org>2008-06-18 13:53:13 +0000
commite72a469b772e6a721ab295c4bd3da3bcb6439484 (patch)
tree25cf4f4f86d5c142d5522c56d7ab9249064badf9 /MandrivaUpdate
parentedfc2469956da350f3ea8c196b5d07d46dcdf2d2 (diff)
downloadrpmdrake-e72a469b772e6a721ab295c4bd3da3bcb6439484.tar
rpmdrake-e72a469b772e6a721ab295c4bd3da3bcb6439484.tar.gz
rpmdrake-e72a469b772e6a721ab295c4bd3da3bcb6439484.tar.bz2
rpmdrake-e72a469b772e6a721ab295c4bd3da3bcb6439484.tar.xz
rpmdrake-e72a469b772e6a721ab295c4bd3da3bcb6439484.zip
(refresh_packages_list, run_treeview_dialog) show type of update in
mandrivaupdate: fix, security, ... (spec 216)
Diffstat (limited to 'MandrivaUpdate')
-rwxr-xr-xMandrivaUpdate32
1 files changed, 25 insertions, 7 deletions
diff --git a/MandrivaUpdate b/MandrivaUpdate
index c2443d51..78892bde 100755
--- a/MandrivaUpdate
+++ b/MandrivaUpdate
@@ -44,12 +44,13 @@ use Gtk2::SimpleList;
# make Rpmdrake::gui aware MandrivaUpdate do not use the same columns ids as rpmdrake:
%pkg_columns = (
- selected => 0,
- text => 1,
- short_name => 2,
- version => 3,
- release => 4,
- arch => 5
+ image => 0,
+ selected => 1,
+ text => 2,
+ short_name => 3,
+ version => 4,
+ release => 5,
+ arch => 6
);
$ugtk2::wm_icon = "title-$MODE";
@@ -62,6 +63,14 @@ warn_about_user_mode();
my (%data, $initialized);
+my %update_icons = (
+ security => 'security-update',
+ bugfix => 'bugfix-update',
+ normal => 'general-update',
+);
+
+my %icons_cache;
+
sub refresh_packages_list {
my ($list, $info, $button) = @_;
# select packages to update:
@@ -80,7 +89,15 @@ sub refresh_packages_list {
$data{$_} = $i++;
my $summary = get_summary($_);
my ($name, $version, $release, $arch) = split_fullname($_);
- [ $pkgs->{$_}{selected}, $_, format_name_n_summary($name, $summary), $version, $release, $arch ];
+ my $pkg = $pkgs->{$_};
+ my $raw_medium = pkg2medium($pkg->{pkg}, $urpm);
+ my $medium = $raw_medium ? $raw_medium->{name} : undef;
+ my $icon;
+ my $importance = $medium && $descriptions->{$medium}{$name}{importance};
+ if ($importance) {
+ $icon = $icons_cache{$importance} ||= gtknew('Pixbuf', file => $update_icons{$importance});
+ }
+ [ $icon, $pkgs->{$_}{selected}, $_, format_name_n_summary($name, $summary), $version, $release, $arch ];
} grep { $pkgs->{$_}{pkg} } @requested;
gtktext_insert($info,
formatAlaTeX(N("The list of updates is empty. This means that either there is
@@ -130,6 +147,7 @@ sub run_treeview_dialog {
1, create_vpaned(
gtknew('ScrolledWindow', width => $typical_width*0.9, height => $is_small_screen ? 150 : 200,
child => $list = Gtk2::SimpleList->new(
+ " " => 'pixbuf',
" " . " " . " " => 'bool', #N("Selected")
'' => 'hidden',
" " . N("Name") . " " => 'markup', #N("Name")