summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive_gtk.pm
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2000-09-12 16:35:40 +0000
committerdamien <damien@mandriva.com>2000-09-12 16:35:40 +0000
commit8adabacd95f6a4455027f00084e39958fada6083 (patch)
tree776be23d2c5565d0db09e033b21f244c0b264354 /perl-install/interactive_gtk.pm
parent01b108dd78036bbb2fb36c6d8f9c9bcafdc65028 (diff)
downloaddrakx-backup-do-not-use-8adabacd95f6a4455027f00084e39958fada6083.tar
drakx-backup-do-not-use-8adabacd95f6a4455027f00084e39958fada6083.tar.gz
drakx-backup-do-not-use-8adabacd95f6a4455027f00084e39958fada6083.tar.bz2
drakx-backup-do-not-use-8adabacd95f6a4455027f00084e39958fada6083.tar.xz
drakx-backup-do-not-use-8adabacd95f6a4455027f00084e39958fada6083.zip
updated. Wizard is available.
Diffstat (limited to 'perl-install/interactive_gtk.pm')
-rw-r--r--perl-install/interactive_gtk.pm60
1 files changed, 46 insertions, 14 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index efe5912cd..9af288df0 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -34,25 +34,57 @@ sub ask_from_list_with_helpW {
my $r;
my $w = my_gtk->new(first(deref($title)), %$o);
+#gtkset_usize(createScrolledWindow($tree), 300, min(350, $::windowheight - 60)),
$w->{retval} = $def || $l->[0]; #- nearly especially for the X test case (see timeout in Xconfigurator.pm)
- if (@$l < 5) {
+ $w->{rwindow}->set_position('center') if $::isStandalone;
+# $w->{rwindow}->set_policy(0, 0, 1) if $::isWizard;
+ if (@$l < 5 or $::isWizard) {
my $defW;
my $tips = new Gtk::Tooltips;
my $f = sub { $w->{retval} = $_[1]; Gtk->main_quit };
- gtkadd($w->{window},
- gtkpack(create_box_with_title($w, @$messages),
- gtkadd(@$l < 3 && sum(map { length $_ } @$l) < 60 ? create_hbox() : create_vbox(),
- map {
- my $b = new Gtk::Button($_);
- $tips->set_tip($b, $help->{$_}) if $help && $help->{$_};
- $b->signal_connect(clicked => [ $f, $_ ]);
- $_ eq $def and $defW = $b;
- $b;
- } @$l),
- ),
- );
+ my $g = sub { $w->{retval} = $_[1]; };
+ my $b;
+ if ($::isWizard) {
+ $w->sync;
+ my $pixmap = new Gtk::Pixmap( gtkcreate_xpm($w->{window}, $::wizard_xpm)) or goto nowizard;
+ gtkset_usize($w->{rwindow},500, 400);
+ gtkadd($w->{window},
+ gtkpack2_(create_box_with_title($w, @$messages),
+ 1,
+ gtkpack2_(new Gtk::HBox(0,0),
+ 0, $pixmap,
+ 0, gtkset_usize(new Gtk::VBox(0,0),30, 0),
+ 0, gtkpack2__( new Gtk::VBox(0,0 ),
+ gtkset_usize(new Gtk::VBox(0,0), 0, 30),
+ map {
+ $b = new Gtk::RadioButton($b ? ($_, $b) : $_);
+ $tips->set_tip($b, $help->{$_}) if $help && $help->{$_};
+ $_ eq $def and $defW = $b;
+ $b->signal_connect(clicked => [ $g, $_ ]);
+ $b;
+ } @$l, )),
+ 0, new Gtk::HSeparator,
+ 0, $w->create_okcancel(),
+ ),
+ );
+ }
+ else {
+ nowizard:
+ gtkadd($w->{window},
+ gtkpack(create_box_with_title($w, @$messages),
+ gtkadd(@$l < 3 && sum(map { length $_ } @$l) < 60 ? create_hbox() : create_vbox(),
+ map {
+ $b = new Gtk::Button($_);
+ $b->signal_connect(clicked => [ $f, $_ ]);
+ $tips->set_tip($b, $help->{$_}) if $help && $help->{$_};
+ $_ eq $def and $defW = $b;
+ $b;
+ } @$l, ),
+ ),
+ );
+ }
+
$defW->grab_focus if $defW;
- $w->{rwindow}->set_position('center') if $::isStandalone;
$r = $w->main;
} else {
#- use ask_from_list_with_help only when needed, as key bindings are