summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-03-06 18:29:11 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-03-06 18:29:11 +0000
commit918565b943eae7900d03ae4b53daa971c3020c58 (patch)
tree342383158009d54310a8c7f68b845ce8800f69ab
parent256c1b6fad5ccb85a8ac5bef1ac65b63e25ac1c8 (diff)
downloaddrakx-918565b943eae7900d03ae4b53daa971c3020c58.tar
drakx-918565b943eae7900d03ae4b53daa971c3020c58.tar.gz
drakx-918565b943eae7900d03ae4b53daa971c3020c58.tar.bz2
drakx-918565b943eae7900d03ae4b53daa971c3020c58.tar.xz
drakx-918565b943eae7900d03ae4b53daa971c3020c58.zip
do not crash on color selection
-rwxr-xr-xperl-install/standalone/draksplash9
1 files changed, 4 insertions, 5 deletions
diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash
index c1d60608a..405f3821d 100755
--- a/perl-install/standalone/draksplash
+++ b/perl-install/standalone/draksplash
@@ -428,18 +428,17 @@ sub make_boot_frame {
&mk_frame($VB, \%boot_conf_frame);
#- open a color choose box
$boot_conf_frame{widgets}{button}{pc}->signal_connect(clicked => sub {
- my $color = new Gtk2::ColorSelectionDialog(N("ProgressBar color selection"));
+ my $color = gtkshow(Gtk2::ColorSelectionDialog->new(N("ProgressBar color selection")));
$theme{boot_conf}{pc} =~ m/0x(.{2})(.{2})(.{2})/;
my @rgb = map { hex($_)/255 } ($1 ,$2, $3);
- $color->colorsel->set_color(@rgb);#$theme{boot_conf}{pc});
+ $color->colorsel->set_current_color(Gtk2::Gdk::Color->new(@rgb));
$color->cancel_button->signal_connect(clicked => sub { $color->destroy });
$color->ok_button->signal_connect(clicked => sub {
- @rgb = $color->colorsel->get_color();
- @rgb = map { dec2hex($_*255) } @rgb;
+ my $colour = $color->colorsel->get_current_color();
+ @rgb = map { dec2hex($_*255) } ($colour->red, $colour->green, $colour->blue);
$theme{boot_conf}{pc} = "0x$rgb[0]$rgb[1]$rgb[2]";
$color->destroy;
});
- $color->show;
});
#- quit button
$boot_conf_frame{widgets}{button}{kill}->signal_connect(clicked => \&CloseAppWindow);