summaryrefslogtreecommitdiffstats
path: root/docs/interactive/ask_from
blob: dad69247e76aa9917049ba021b736cc97eba8386 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/perl
# Yves Duret <yduret at mandrakesoft.com>
# license: GPL

use lib qw(/usr/lib/libDrakX);
use interactive;

my $irq=1;
my $login;
my $login2="editable";
my $check;
my $range=57;

my $in = 'interactive'->vnew(undef, 'default');

$in->ask_from("window title - ask_from",
	      "message\nexamples of utilisation of ask_from",
	      [
	       { label => "enter scalar", val => \$irq },
	       { label => "combo (type=>combo optionnal)", val => \$login, list => ['Netherlands', 'France', 'Belgium', 'Italy', 'UK'], type => 'combo'},
	       { label => "choose from list editable and sorted", val => \$login2, list => ['Netherlands', 'France', 'Belgium', 'Italy', 'UK'], not_edit => 0, sort => 1},
	       { label => "check box", val => \$check, type => "bool", text => "text" },
	       { label => "range", val => \$range, type => 'range', min => 0, max => 100 },
	      ],
	      complete => sub { print "complete\n";print "$irq\n$login\n$range\n"; },
#	      focus_out => sub { print "focus_out\n"},
#	      changed => sub { print "changed\n"; },
	     ) or $in->exit(0);
$in->exit(0);
s='sha1'>drakx-398d2b57fd63e7406699cd82061dded2b4ea60f2.tar
drakx-398d2b57fd63e7406699cd82061dded2b4ea60f2.tar.gz
drakx-398d2b57fd63e7406699cd82061dded2b4ea60f2.tar.bz2
drakx-398d2b57fd63e7406699cd82061dded2b4ea60f2.tar.xz
drakx-398d2b57fd63e7406699cd82061dded2b4ea60f2.zip
(make_boot_frame) fix crash on color switch
Diffstat (limited to 'perl-install/standalone/draksplash')
-rwxr-xr-xperl-install/standalone/draksplash2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash
index 22e511f3e..6670a205f 100755
--- a/perl-install/standalone/draksplash
+++ b/perl-install/standalone/draksplash
@@ -448,7 +448,7 @@ sub make_boot_frame() {
$boot_conf_frame{widgets}{button}{pc}->signal_connect(clicked => sub {
my $color = gtkshow(Gtk2::ColorSelectionDialog->new(N("ProgressBar color selection")));
my @rgb = map { hex($_)/255 } ($1, $2, $3) if $theme{boot_conf}{pc} =~ m/0x(.{2})(.{2})(.{2})/;
- $color->colorsel->set_current_color(Gtk2::Gdk::Color->new(@rgb));
+ $color->colorsel->set_current_color(gtkcolor(@rgb));
$color->cancel_button->signal_connect(clicked => sub { $color->destroy });
$color->ok_button->signal_connect(clicked => sub {
my $colour = $color->colorsel->get_current_color;