diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-09-22 13:33:05 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-09-22 13:33:05 +0000 |
commit | db4f69a8272af9dc19fa360dcee4e2e47ef59156 (patch) | |
tree | f74ac45f7908140066b932fe3d9f8c1c726de82c | |
parent | 4e51a3864c6e4ddf9fb0f423d678e6fff3ea8aea (diff) | |
download | drakx-db4f69a8272af9dc19fa360dcee4e2e47ef59156.tar drakx-db4f69a8272af9dc19fa360dcee4e2e47ef59156.tar.gz drakx-db4f69a8272af9dc19fa360dcee4e2e47ef59156.tar.bz2 drakx-db4f69a8272af9dc19fa360dcee4e2e47ef59156.tar.xz drakx-db4f69a8272af9dc19fa360dcee4e2e47ef59156.zip |
(create_step_box) factorize code
-rw-r--r-- | perl-install/install/gtk.pm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/perl-install/install/gtk.pm b/perl-install/install/gtk.pm index 8f2a74785..1655f6743 100644 --- a/perl-install/install/gtk.pm +++ b/perl-install/install/gtk.pm @@ -104,6 +104,12 @@ sub install_theme { $root_window = $win; } +sub create_step_box { + gtknew('HBox', spacing => 7, children => [ + @_, + ]); +} + #------------------------------------------------------------------------------ my %steps; sub create_steps_window { @@ -112,11 +118,12 @@ sub create_steps_window { $o->{steps_window} and $o->{steps_window}->destroy; $steps{$_} ||= gtknew('Pixbuf', file => "steps_$_") foreach qw(on off done); + my $category = sub { - gtknew('HBox', spacing => 7, children => [ + create_step_box( 1, gtknew('Label_Right', text_markup => '<b>' . uc($_[0]) . '</b>', widget_name => 'Step-categories'), 0, gtknew('Image', file => 'steps_off.png'), - ]); + ); }; my @l = ( @@ -128,10 +135,10 @@ sub create_steps_window { } my $img = gtknew('Image', file => 'steps_off.png'); $steps{steps}{$_}{img} = $img; - push @l, gtknew('HBox', spacing => 7, children => [ + push @l, create_step_box( 1, $steps{steps}{$_}{text} = gtknew('Label_Right', text => translate($o->{steps}{$_}{text})), 0, $img, - ]); + ); } my $offset = 10; |