From 8dde3efdac1b068c68c4e68cab5ac9bb307da2a9 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 27 Aug 2007 10:29:14 +0000 Subject: - diskdrake o fix coloring "Other" partitions (#32845) --- perl-install/diskdrake/hd_gtk.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'perl-install/diskdrake') diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index 64a2b9a48..a2c7f5589 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -314,7 +314,10 @@ sub create_buttons4partitions { last; } }); - $w->set_name("PART_" . fs::type::part2type_name($entry)); + my @colorized_fs_types = qw(ext3 xfs swap vfat ntfs ntfs-3g); + $w->set_name("PART_" . (isEmpty($entry) ? 'empty' : + $entry->{fs_type} && member($entry->{fs_type}, @colorized_fs_types) ? $entry->{fs_type} : + 'other')); $w->set_size_request($entry->{size} * $ratio + $minwidth, 0); gtkpack__($kind->{display_box}, $w); if ($current_entry && fsedit::are_same_partitions($current_entry, $entry)) { @@ -358,7 +361,7 @@ sub filesystems_button_box() { my $t = $name2fs_type{$_}; $w->signal_connect(clicked => sub { try_('', \&createOrChangeType, $t, current_hd(), current_part()) }); $w->can_focus(0); - $w->set_name($_); + $w->set_name("PART_$t"); $w; } @types); } -- cgit v1.2.1