summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-08-26 14:13:18 +0000
committerThierry Vignaud <tv@mandriva.org>2008-08-26 14:13:18 +0000
commit0381cb67373cd802101c299bc0adc3f15c13f2b3 (patch)
tree64f84aa48a90a5bb869d65854cab94eddc08da8a /perl-install
parent099db4aa69c64e0e9d4811c1fc37b49aa02011e5 (diff)
downloaddrakx-0381cb67373cd802101c299bc0adc3f15c13f2b3.tar
drakx-0381cb67373cd802101c299bc0adc3f15c13f2b3.tar.gz
drakx-0381cb67373cd802101c299bc0adc3f15c13f2b3.tar.bz2
drakx-0381cb67373cd802101c299bc0adc3f15c13f2b3.tar.xz
drakx-0381cb67373cd802101c299bc0adc3f15c13f2b3.zip
(_gtk__Label_Right) factorize code
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install/gtk.pm6
-rw-r--r--perl-install/mygtk2.pm7
2 files changed, 9 insertions, 4 deletions
diff --git a/perl-install/install/gtk.pm b/perl-install/install/gtk.pm
index 36855f148..99e2ede7f 100644
--- a/perl-install/install/gtk.pm
+++ b/perl-install/install/gtk.pm
@@ -116,8 +116,7 @@ sub create_steps_window {
$steps{$_} ||= gtknew('Pixbuf', file => "steps_$_") foreach qw(on off done);
my $category = sub {
gtknew('HBox', spacing => 7, children => [
- 1, '',
- 0, gtknew('Label', text_markup => '<b>' . uc($_[0]) . '</b>', widget_name => 'Step-categories'),
+ 1, gtknew('Label_Right', text_markup => '<b>' . uc($_[0]) . '</b>', widget_name => 'Step-categories'),
0, gtknew('Image', file => 'steps_off.png'),
]);
};
@@ -133,8 +132,7 @@ sub create_steps_window {
my $img = gtknew('Image', file => 'steps_off.png');
$steps{steps}{$_}{img} = $img;
push @l, gtknew('HBox', spacing => 7, children => [
- 1, '',
- 0, $steps{steps}{$_}{text} = gtknew('Label', text => translate($o->{steps}{$_}{text})),
+ 1, $steps{steps}{$_}{text} = gtknew('Label_Right', text => translate($o->{steps}{$_}{text})),
0, $img,
]);
}
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm
index ced9315a8..aeebc0807 100644
--- a/perl-install/mygtk2.pm
+++ b/perl-install/mygtk2.pm
@@ -363,6 +363,13 @@ sub _gtk__Label_Left {
_gtk__Label($w, $opts);
}
+sub _gtk__Label_Right {
+ my ($w, $opts) = @_;
+ $opts->{alignment} ||= [ 1, 0.5 ];
+ _gtk__Label($w, $opts);
+}
+
+
sub _gtk__Label {
my ($w, $opts) = @_;