summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-10-28 16:19:34 +0000
committerOlivier Blin <oblin@mandriva.com>2009-10-28 16:19:34 +0000
commit00443a806e5d2b626f2621053c536345dafc90eb (patch)
tree10c9c2922834c87a155ae1d8918a9c2b079f9fd9
parent525b391860ca07ec268b43a9aa8fb64dcd23b8e9 (diff)
downloaddrakx-00443a806e5d2b626f2621053c536345dafc90eb.tar
drakx-00443a806e5d2b626f2621053c536345dafc90eb.tar.gz
drakx-00443a806e5d2b626f2621053c536345dafc90eb.tar.bz2
drakx-00443a806e5d2b626f2621053c536345dafc90eb.tar.xz
drakx-00443a806e5d2b626f2621053c536345dafc90eb.zip
factorize in update_req_size helper
-rw-r--r--perl-install/fs/partitioning_wizard.pm17
1 files changed, 7 insertions, 10 deletions
diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm
index 3f1b44276..99d87e72a 100644
--- a/perl-install/fs/partitioning_wizard.pm
+++ b/perl-install/fs/partitioning_wizard.pm
@@ -361,20 +361,17 @@ sub create_display_box {
$mdv_size_label->set_label(" Mandriva (" . formatXiB($part->{size} - $part->{req_size}, 512) . ")");
0;
};
- $hpane->signal_connect('size-allocate' => sub {
- my (undef, $alloc) = @_;
+ my $update_req_size = sub {
$part->{req_size} = int($hpane->get_position * $part->{size} / $part->{width});
$update_size_labels->();
+ };
+ $hpane->signal_connect('size-allocate' => sub {
+ my (undef, $alloc) = @_;
+ $update_req_size->();
});
$update_size_labels->();
- $hpane->signal_connect('motion-notify-event' => sub {
- $part->{req_size} = int($hpane->get_position * $part->{size} / $part->{width});
- $update_size_labels->();
- });
- $hpane->signal_connect('move-handle' => sub {
- $part->{req_size} = int($hpane->get_position * $part->{size} / $part->{width});
- $update_size_labels->();
- });
+ $hpane->signal_connect('motion-notify-event' => $update_req_size);
+ $hpane->signal_connect('move-handle' => $update_req_size);
$hpane->signal_connect('button-press-event' => sub {
$button->activate;
0;