summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-09-01 15:41:12 +0000
committerThierry Vignaud <tv@mandriva.org>2008-09-01 15:41:12 +0000
commitfc147800e336d2e0b7785b162174bce959cf7faa (patch)
treec57dbbeeda476edf06acd0dc2f7258fdeee2229a /perl-install/interactive
parent9f3df62f9ac342b808f7bf4a3d1462776b397a03 (diff)
downloaddrakx-backup-do-not-use-fc147800e336d2e0b7785b162174bce959cf7faa.tar
drakx-backup-do-not-use-fc147800e336d2e0b7785b162174bce959cf7faa.tar.gz
drakx-backup-do-not-use-fc147800e336d2e0b7785b162174bce959cf7faa.tar.bz2
drakx-backup-do-not-use-fc147800e336d2e0b7785b162174bce959cf7faa.tar.xz
drakx-backup-do-not-use-fc147800e336d2e0b7785b162174bce959cf7faa.zip
(add_padding) factorize code for next commits
Diffstat (limited to 'perl-install/interactive')
-rw-r--r--perl-install/interactive/gtk.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 6d3f10c17..2030bab14 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -352,6 +352,14 @@ sub add_modify_remove_action {
1;
}
+sub add_padding {
+ my ($w) = @_;
+ gtknew('HBox', children => [
+ 0, gtknew('Alignment', width => $mygtk2::left_padding),
+ 1, $w
+ ]);
+}
+
sub create_widget {
my ($o, $e, $onchange_f, $update, $ignore_ref) = @_;
@@ -385,11 +393,7 @@ sub create_widget {
}
$w->signal_connect(clicked => $onchange->(sub { $w->get_active }));
$set = sub { $w->set_active($_[0]) };
- $real_w = gtknew('HBox', children => [
- 0, gtknew('Alignment', width => $mygtk2::left_padding),
- 1, $w
- ]);
-
+ $real_w = add_padding($w);
} elsif ($e->{type} eq 'only_label') {
$w = $e->{title} ?
gtknew('Title2', label => escape_text_for_TextView_markup_format(${$e->{val}}),