summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-10-28 16:22:55 +0000
committerOlivier Blin <oblin@mandriva.com>2009-10-28 16:22:55 +0000
commit7db3710114c361ad7bd74642c02f7920c455da9a (patch)
treececbbd20534137f60f10f2d30c4986db3f4005dc
parent00443a806e5d2b626f2621053c536345dafc90eb (diff)
downloaddrakx-backup-do-not-use-7db3710114c361ad7bd74642c02f7920c455da9a.tar
drakx-backup-do-not-use-7db3710114c361ad7bd74642c02f7920c455da9a.tar.gz
drakx-backup-do-not-use-7db3710114c361ad7bd74642c02f7920c455da9a.tar.bz2
drakx-backup-do-not-use-7db3710114c361ad7bd74642c02f7920c455da9a.tar.xz
drakx-backup-do-not-use-7db3710114c361ad7bd74642c02f7920c455da9a.zip
factorize in button_activate helper
-rw-r--r--perl-install/fs/partitioning_wizard.pm14
1 files changed, 6 insertions, 8 deletions
diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm
index 99d87e72a..a68038cca 100644
--- a/perl-install/fs/partitioning_wizard.pm
+++ b/perl-install/fs/partitioning_wizard.pm
@@ -365,6 +365,10 @@ sub create_display_box {
$part->{req_size} = int($hpane->get_position * $part->{size} / $part->{width});
$update_size_labels->();
};
+ my $button_activate = sub {
+ $button->activate;
+ 0;
+ };
$hpane->signal_connect('size-allocate' => sub {
my (undef, $alloc) = @_;
$update_req_size->();
@@ -372,14 +376,8 @@ sub create_display_box {
$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;
- });
- $vbox->signal_connect('button-press-event' => sub {
- $button->activate;
- 0;
- });
+ $hpane->signal_connect('button-press-event' => $button_activate);
+ $vbox->signal_connect('button-press-event' => $button_activate);
$button->signal_connect('focus-in-event' => sub {
$hpane->grab_focus;
0;