diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-10-28 16:22:55 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-10-28 16:22:55 +0000 |
commit | 7db3710114c361ad7bd74642c02f7920c455da9a (patch) | |
tree | cecbbd20534137f60f10f2d30c4986db3f4005dc | |
parent | 00443a806e5d2b626f2621053c536345dafc90eb (diff) | |
download | drakx-7db3710114c361ad7bd74642c02f7920c455da9a.tar drakx-7db3710114c361ad7bd74642c02f7920c455da9a.tar.gz drakx-7db3710114c361ad7bd74642c02f7920c455da9a.tar.bz2 drakx-7db3710114c361ad7bd74642c02f7920c455da9a.tar.xz drakx-7db3710114c361ad7bd74642c02f7920c455da9a.zip |
factorize in button_activate helper
-rw-r--r-- | perl-install/fs/partitioning_wizard.pm | 14 |
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; |