summaryrefslogtreecommitdiffstats
path: root/perl-install/fs/partitioning_wizard.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-10-28 16:03:58 +0000
committerOlivier Blin <oblin@mandriva.com>2009-10-28 16:03:58 +0000
commit3c55ae215572e4b490e564234adac06ec3855b3c (patch)
tree19a7137d1c8cc58f851a79f326be67fb8c2eedfd /perl-install/fs/partitioning_wizard.pm
parentb16bd9930aa06c25b82a9c495b53e98c29c6b7b8 (diff)
downloaddrakx-3c55ae215572e4b490e564234adac06ec3855b3c.tar
drakx-3c55ae215572e4b490e564234adac06ec3855b3c.tar.gz
drakx-3c55ae215572e4b490e564234adac06ec3855b3c.tar.bz2
drakx-3c55ae215572e4b490e564234adac06ec3855b3c.tar.xz
drakx-3c55ae215572e4b490e564234adac06ec3855b3c.zip
factorize entry width computing
Diffstat (limited to 'perl-install/fs/partitioning_wizard.pm')
-rw-r--r--perl-install/fs/partitioning_wizard.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm
index 857354470..a4f79a43b 100644
--- a/perl-install/fs/partitioning_wizard.pm
+++ b/perl-install/fs/partitioning_wizard.pm
@@ -313,6 +313,7 @@ sub create_display_box {
my $w = Gtk2::Label->new($info);
my @colorized_fs_types = qw(ext2 ext3 ext4 xfs swap vfat ntfs ntfs-3g);
$ev = Gtk2::EventBox->new;
+ $entry->{width} = $entry->{size} * $initial_ratio + $minwidth;
my $part;
if ($last && $last->{device} eq "$entry->{device}") {
$part = $last;
@@ -332,7 +333,7 @@ sub create_display_box {
$hpane->add2($ev2);
$hpane->child2_shrink(0);
$hpane->set_position(ceil($ratio * $part->{req_size}));
- ugtk2::gtkset_size_request($hpane, $ratio * $part->{size} + $minwidth, 0);
+ ugtk2::gtkset_size_request($hpane, $entry->{width}, 0);
ugtk2::gtkpack__($display_box, $hpane);
my $size = int($hpane->get_position / $ratio);
@@ -399,7 +400,7 @@ sub create_display_box {
$entry->{fs_type} && member($entry->{fs_type}, @colorized_fs_types) ? $entry->{fs_type} :
'other'));
}
- $ev->set_size_request($entry->{size} * $ratio + $minwidth, 0);
+ $ev->set_size_request($entry->{width}, 0);
ugtk2::gtkpack($display_box, $ev);
}
$ev->add($w);