diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-08-12 15:50:22 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-08-12 15:50:22 +0000 |
commit | 4d8c52da4724607b01ea288253d87581047fd485 (patch) | |
tree | 05ccfc65de890dfd6035769dd8b9ca932cfe4675 /perl-install/install/steps_gtk.pm | |
parent | d45cf3a081d5f5f85f58ac94fd19de64711694a0 (diff) | |
download | drakx-4d8c52da4724607b01ea288253d87581047fd485.tar drakx-4d8c52da4724607b01ea288253d87581047fd485.tar.gz drakx-4d8c52da4724607b01ea288253d87581047fd485.tar.bz2 drakx-4d8c52da4724607b01ea288253d87581047fd485.tar.xz drakx-4d8c52da4724607b01ea288253d87581047fd485.zip |
(reallyChooseDesktop) new desktop choice screen
Diffstat (limited to 'perl-install/install/steps_gtk.pm')
-rw-r--r-- | perl-install/install/steps_gtk.pm | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/perl-install/install/steps_gtk.pm b/perl-install/install/steps_gtk.pm index a360c9bb6..60dafbc29 100644 --- a/perl-install/install/steps_gtk.pm +++ b/perl-install/install/steps_gtk.pm @@ -223,16 +223,12 @@ sub reallyChooseDesktop { my $w = ugtk2->new($title); - my $sizegrp = Gtk2::SizeGroup->new('horizontal'); my $choice = $choices->[0]; my $prev; my @l = map { my $val = $_; $prev = gtknew('RadioButton', child => - gtknew('HBox', border_width => 15, spacing => 10, children => [ - 0, gtknew('Image', file => "desktop-$val->[0]", size_group => $sizegrp), - 1, gtknew('Label', text => $val->[1]), - ]), + gtknew('Label', text => $val->[1]), toggled => sub { $choice = $val if $_[0]->get_active }, $prev ? (group => $prev->get_group) : ()); $prev->signal_connect(key_press_event => sub { @@ -241,13 +237,37 @@ sub reallyChooseDesktop { Gtk2->main_quit; } }); - $prev + my $img = gtksignal_connect( + gtkadd(Gtk2::EventBox->new, gtknew('Image', file => "desktop-$val->[0]")), + 'button-press-event' => sub { + my $wp = ugtk2->new(N("Help"), transient => $w->{real_window}, modal => 1, + ); + gtkadd($wp->{rwindow}, + gtkpack_(Gtk2::VBox->new, + 0, N("Here's a preview of the '%s' desktop.", $val->[1]), + 1, gtknew('Image', file => "desktop-$val->[0]-big"), + 0, gtkpack(create_hbox('edge'), + gtknew('Button', text => N("Close"), clicked => sub { Gtk2->main_quit }) + ), + ), + ); + $wp->{real_window}->set_size_request(-1, -1); + $wp->{real_window}->grab_focus; + $wp->{real_window}->grab_focus; + $wp->{real_window}->show_all; + $wp->main; + }); + gtknew('VBox', border_width => 15, spacing => 10, children_tight => [ + $img, + $prev, + ]); } @$choices; ugtk2::gtkadd($w->{window}, gtknew('VBox', children => [ - 0, gtknew('WrappedLabel', text => $message), - (map { (1, $_) } @l), + 0, gtknew('WrappedLabel', text => $message . "\n\n" . + N("Click on images in order to see a bigger preview")), + 1, gtknew('HButtonBox', children_loose => \@l), 0, $w->create_okcancel(N("Next"), undef), ])); $w->main; |