From 3bc4a1400cb57eaa50dcf2c7625d08492c72f269 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Thu, 22 Apr 2010 14:26:49 +0000 Subject: display lock icon on encrypted partitions --- perl-install/NEWS | 1 + perl-install/diskdrake/hd_gtk.pm | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/NEWS b/perl-install/NEWS index 421c5ab03..36c34ae66 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -2,6 +2,7 @@ o do not warn about data loss when changing type of unformatted partition o do not write partition table after creation if not needed o handle deleting encrypted partitions + o display lock icon on encrypted partitions Version 13.20 - 21 April 2010 diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index d4029f326..bbe6f8a75 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -315,6 +315,10 @@ sub create_buttons4partitions { }; foreach my $entry (@parts) { + if(fs::type::isRawLUKS($entry)) { + my $p = find { $entry->{dm_name} eq $_->{dmcrypt_name} } @{$all_hds->{dmcrypts}}; + $entry = $p if $p; + } my $info = $entry->{mntpoint} || $entry->{device_LABEL}; $info .= "\n" . ($entry->{size} ? formatXiB($entry->{size}, 512) : N("Unknown")) if $info; my $w = Gtk2::ToggleButton->new_with_label($info) or internal_error('new_with_label'); @@ -341,9 +345,8 @@ sub create_buttons4partitions { last; } }); - if(fs::type::isRawLUKS($entry)) { - my $p = find { $entry->{dm_name} eq $_->{dmcrypt_name} } @{$all_hds->{dmcrypts}}; - $entry = $p; + if($entry->{dmcrypt_name}) { + $w->set_image(gtknew("Image", file => "security-strong")); } my @colorized_fs_types = qw(ext3 ext4 xfs swap vfat ntfs ntfs-3g); $w->set_name("PART_" . (isEmpty($entry) ? 'empty' : -- cgit v1.2.1