diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-10-28 16:30:33 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-10-28 16:30:33 +0000 |
commit | 4124c184b26056e4bda71fa1a7229ae161d03235 (patch) | |
tree | 154d1093f4a5a24ac8621d13d2867f947364aed0 /perl-install | |
parent | 99675091bfe27313b47637befb121e1056fa4689 (diff) | |
download | drakx-4124c184b26056e4bda71fa1a7229ae161d03235.tar drakx-4124c184b26056e4bda71fa1a7229ae161d03235.tar.gz drakx-4124c184b26056e4bda71fa1a7229ae161d03235.tar.bz2 drakx-4124c184b26056e4bda71fa1a7229ae161d03235.tar.xz drakx-4124c184b26056e4bda71fa1a7229ae161d03235.zip |
update ratio on size-allocate
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/fs/partitioning_wizard.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm index f47019b37..afd1c985c 100644 --- a/perl-install/fs/partitioning_wizard.pm +++ b/perl-install/fs/partitioning_wizard.pm @@ -315,7 +315,9 @@ sub create_display_box { $entry->{width} = $entry->{size} * $initial_ratio + $minwidth; if ($last && $last->{device} eq "$entry->{device}") { #- entry is the last resizable partition - my $ratio = $entry->{width} / $entry->{size}; + my $ratio; + my $update_ratio = sub { $ratio = $entry->{width} / $entry->{size} }; + $update_ratio->(); $ev->set_name("PART_vfat"); $w->set_size_request(ceil($ratio * $entry->{min_win}), 0); my $ev2 = Gtk2::EventBox->new; @@ -366,6 +368,8 @@ sub create_display_box { }; $hpane->signal_connect('size-allocate' => sub { my (undef, $alloc) = @_; + $entry->{width} = $alloc->width; + $update_ratio->(); $update_req_size->(); }); $update_size_labels->(); |