diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-02-13 14:35:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-02-13 14:35:52 +0000 |
commit | fe57c63558450228ca52c6f3302910372be6ebb4 (patch) | |
tree | cba149bbace96874d5e4831b24c29621c7c7b1cd /perl-install | |
parent | 39824973bc990aabe121d812abfc3467df8be98a (diff) | |
download | drakx-backup-do-not-use-fe57c63558450228ca52c6f3302910372be6ebb4.tar drakx-backup-do-not-use-fe57c63558450228ca52c6f3302910372be6ebb4.tar.gz drakx-backup-do-not-use-fe57c63558450228ca52c6f3302910372be6ebb4.tar.bz2 drakx-backup-do-not-use-fe57c63558450228ca52c6f3302910372be6ebb4.tar.xz drakx-backup-do-not-use-fe57c63558450228ca52c6f3302910372be6ebb4.zip |
- set_help is deprecated
- it is replaced by interactive_help_id on each ask_*
- many set_help do not have any correspondance in help.pm (drakxid-*),
those are commented for now
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/Xconfig/various.pm | 5 | ||||
-rw-r--r-- | perl-install/any.pm | 26 | ||||
-rw-r--r-- | perl-install/diskdrake/hd_gtk.pm | 8 | ||||
-rw-r--r-- | perl-install/diskdrake/interactive.pm | 2 | ||||
-rw-r--r-- | perl-install/install_interactive.pm | 28 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 1 | ||||
-rw-r--r-- | perl-install/install_steps_gtk.pm | 15 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 63 | ||||
-rw-r--r-- | perl-install/interactive.pm | 9 | ||||
-rw-r--r-- | perl-install/interactive/gtk.pm | 7 | ||||
-rw-r--r-- | perl-install/modules/interactive.pm | 5 | ||||
-rw-r--r-- | perl-install/network/adsl.pm | 2 | ||||
-rw-r--r-- | perl-install/network/ethernet.pm | 6 | ||||
-rw-r--r-- | perl-install/network/isdn.pm | 2 | ||||
-rw-r--r-- | perl-install/network/modem.pm | 7 | ||||
-rw-r--r-- | perl-install/network/netconnect.pm | 14 | ||||
-rw-r--r-- | perl-install/network/network.pm | 6 | ||||
-rw-r--r-- | perl-install/network/tools.pm | 2 | ||||
-rw-r--r-- | perl-install/printer/printerdrake.pm | 53 | ||||
-rw-r--r-- | perl-install/security/level.pm | 10 | ||||
-rw-r--r-- | perl-install/services.pm | 1 | ||||
-rw-r--r-- | perl-install/ugtk2.pm | 4 |
22 files changed, 150 insertions, 126 deletions
diff --git a/perl-install/Xconfig/various.pm b/perl-install/Xconfig/various.pm index 2ea15e841..8fd1bf68b 100644 --- a/perl-install/Xconfig/various.pm +++ b/perl-install/Xconfig/various.pm @@ -67,9 +67,8 @@ sub choose_xdm { my $xdm = $::isStandalone ? runlevel() == 5 : 1; if (!$auto || $::isStandalone) { - $in->set_help('configureXxdm') if !$::isStandalone; - - $xdm = $in->ask_yesorno(N("Graphical interface at startup"), + $xdm = $in->ask_yesorno_({ interactive_help_id => 'configureXxdm' }, + N("Graphical interface at startup"), N("I can setup your computer to automatically start the graphical interface (XFree) upon booting. Would you like XFree to start when you reboot?"), $xdm) or return; } diff --git a/perl-install/any.pm b/perl-install/any.pm index c7cbafe02..27c914edd 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -82,8 +82,6 @@ sub kernelVersion { sub mkbootdisk { my ($in, $bootloader, $fstab) = @_; - $in->set_help('createBootdisk') if !$::isStandalone; - if (arch() =~ /sparc/) { #- as probing floppies is a bit more different on sparc, assume always /dev/fd0. #- [pixel] uh, but in that case it would be better to change detect_devices::floppies, no? @@ -194,7 +192,6 @@ On which drive are you booting?"), \&partition_table::description, $hds) or retu sub setupBootloader__mbr_or_not { my ($in, $b, $hds, $fstab) = @_; - $in->set_help('setupBootloaderBeginner') if !$::isStandalone; if (arch() =~ /ppc/) { if (defined $partition_table::mac::bootstrap_part) { $b->{boot} = $partition_table::mac::bootstrap_part; @@ -216,8 +213,10 @@ sub setupBootloader__mbr_or_not { my $default = arch() =~ /sparc/ ? ($b->{use_partition} ? $l[1] : $l[0]) : find { $_->[1] eq $b->{boot} } @l; - $in->ask_from(arch() =~ /sparc/ ? N("SILO Installation") : N("LILO/grub Installation"), - N("Where do you want to install the bootloader?"), + $in->ask_from_({ title => arch() =~ /sparc/ ? N("SILO Installation") : N("LILO/grub Installation"), + messages => N("Where do you want to install the bootloader?"), + interactive_help_id => 'setupBootloaderBeginner', + }, [ { val => \$default, list => \@l, format => sub { $_[0][0] }, type => 'list' } ]); my $new_boot = $default->[1] or return; @@ -236,8 +235,6 @@ sub setupBootloader__mbr_or_not { sub setupBootloader__general { my ($in, $b, $all_hds, $fstab, $security) = @_; - $in->set_help(arch() =~ /sparc/ ? "setupSILOGeneral" : arch() =~ /ppc/ ? 'setupYabootGeneral' : "setupBootloader") if !$::isStandalone; #- TO MERGE ? - my @silo_install_lang = (N("First sector of drive (MBR)"), N("First sector of boot partition")); ($b->{method}, my $method_choices) = bootloader::method_choices($fstab); @@ -250,7 +247,9 @@ sub setupBootloader__general { $b->{password2} ||= $b->{password} ||= ''; $b->{vga} ||= 'normal'; if (arch() !~ /ppc/) { - $in->ask_from('', N("Bootloader main options"), [ + $in->ask_from_({ messages => N("Bootloader main options"), + interactive_help_id => 'setupBootloader', + }, [ { label => N("Bootloader to use"), val => \$b->{method}, list => [ keys %$method_choices ], format => sub { $method_choices->{$_[0]} } }, arch() =~ /sparc/ ? ( { label => N("Bootloader installation"), val => \$b->{use_partition}, list => [ 0, 1 ], format => sub { $silo_install_lang[$_[0]] } }, @@ -283,7 +282,9 @@ sub setupBootloader__general { }) or return 0; } else { $b->{boot} = $partition_table::mac::bootstrap_part; - $in->ask_from('', N("Bootloader main options"), [ + $in->ask_from_({ messages => N("Bootloader main options"), + interactive_help_id => 'setupYabootGeneral', + }, [ { label => N("Bootloader to use"), val => \$b->{method}, list => [ keys %$method_choices ], format => sub { $method_choices->{$_[0]} } }, { label => N("Init Message"), val => \$b->{'init-message'} }, { label => N("Boot device"), val => \$b->{boot}, list => [ map { "/dev/$_" } (map { $_->{device} } (grep { isAppleBootstrap($_) } @$fstab)) ], not_edit => !$::expert }, @@ -320,8 +321,6 @@ sub setupBootloader__general { sub setupBootloader__entries { my ($in, $b, $all_hds, $fstab) = @_; - $in->set_help(arch() =~ /sparc/ ? 'setupSILOAddEntry' : arch() =~ /ppc/ ? 'setupYabootAddEntry' : 'setupBootloaderAddEntry') unless $::isStandalone; - my $Modify = sub { my ($e) = @_; my $default = my $old_default = $e->{label} eq $b->{default}; @@ -369,7 +368,8 @@ if_(arch() !~ /sparc|ppc|ia64/, } $in->ask_from_( - { + { + interactive_help_id => arch() =~ /ppc/ ? 'setupYabootAddEntry' : 'setupBootloaderAddEntry', callbacks => { complete => sub { $e->{label} or $in->ask_warn('', N("Empty label not allowed")), return 1; @@ -543,6 +543,7 @@ sub ask_users { my $ret = $in->ask_from_( { title => N("Add user"), messages => N("Enter a user\n%s", $names), + interactive_help_id => 'addUser', focus_first => 1, if_(!$::isInstall, ok => N("Done")), cancel => N("Accept user"), @@ -621,6 +622,7 @@ sub selectLanguage { $in->ask_from_( { messages => N("Please choose a language to use."), title => 'language choice', + interactive_help_id => 'selectLanguage', if_($::isInstall, cancel => ''), advanced_messages => formatAlaTeX(N("Mandrake Linux can support multiple languages. Select the languages you would like to install. They will be available diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index 6bd61bd24..0ee38fc49 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -48,7 +48,7 @@ notebook current_kind[] =cut sub main { - ($in, $all_hds, my $nowizard, $do_force_reload) = @_; + ($in, $all_hds, my $nowizard, $do_force_reload, my $interactive_help) = @_; @notebook = (); @@ -79,7 +79,7 @@ sub main { $lock = 1; partition_table::assign_device_numbers($_) foreach fsedit::all_hds($all_hds); create_automatic_notebooks($notebook_widget); - general_action_box($general_action_box, $nowizard); + general_action_box($general_action_box, $nowizard, $interactive_help); per_kind_action_box($per_kind_action_box, $current_kind); current_kind_changed($in, $current_kind); current_entry_changed($current_kind, $current_entry); @@ -151,10 +151,10 @@ sub add_kind2notebook { } sub general_action_box { - my ($box, $nowizard) = @_; + my ($box, $nowizard, $interactive_help) = @_; $_->widget->destroy foreach $box->children; - gtkadd($box, gtksignal_connect(Gtk2::Button->new(N("Help")), clicked => $in->{interactive_help})) if $in->{interactive_help}; + gtkadd($box, gtksignal_connect(Gtk2::Button->new(N("Help")), clicked => sub { $in->ask_warn(N("Help"), $interactive_help->()) })) if $interactive_help; my @actions = (if_($::isInstall && !$nowizard, N_("Wizard")), diskdrake::interactive::general_possible_actions($in, $all_hds), diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index 82a49bd30..2e7692208 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -164,7 +164,7 @@ struct all_hds { sub main { - my ($in, $all_hds, $_nowizard, $do_force_reload) = @_; + my ($in, $all_hds, $_nowizard, $do_force_reload, $_interactive_help) = @_; if ($in->isa('interactive::gtk')) { require diskdrake::hd_gtk; diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm index e6982da16..cad2f74c5 100644 --- a/perl-install/install_interactive.pm +++ b/perl-install/install_interactive.pm @@ -38,7 +38,6 @@ sub partition_with_diskdrake { my ($o, $all_hds, $nowizard) = @_; my $ok; - $o->set_help('partition_with_diskdrake'); do { $ok = 1; my $do_force_reload = sub { @@ -50,7 +49,7 @@ sub partition_with_diskdrake { require diskdrake::interactive; { local $::expert = $::expert; - diskdrake::interactive::main($o, $all_hds, $nowizard, $do_force_reload); + diskdrake::interactive::main($o, $all_hds, $nowizard, $do_force_reload, sub { $o->interactive_help_get_id('choosePackages') }); } if (delete $o->{wizard}) { partitionWizard($o, 'nodiskdrake') or redo; @@ -137,10 +136,10 @@ sub partitionWizardSolutions { $solutions{resize_fat} = [ 6 - @ok_for_resize_fat, N("Use the free space on the Windows partition"), sub { - $o->set_help('resizeFATChoose'); - my $part = $o->ask_from_listf('', N("Which partition do you want to resize?"), \&partition_table::description, \@ok_for_resize_fat) or return; + my $part = $o->ask_from_listf_raw({ messages => N("Which partition do you want to resize?"), + interactive_help_id => 'resizeFATChoose', + }, \&partition_table::description, \@ok_for_resize_fat) or return; my $hd = fsedit::part2hd($part, $all_hds); - $o->set_help('resizeFATWait'); my $resize_fat = eval { my $pkg = isFat($part) ? do { require resize_fat::main; @@ -206,11 +205,12 @@ When sure, press Ok.")) or return; $solutions{wipe_drive} = [ 10, fsedit::is_one_big_fat_or_NT($hds) ? N("Remove Windows(TM)") : N("Erase entire disk"), sub { - $o->set_help('takeOverHdChoose'); - my $hd = $o->ask_from_listf('', N("You have more than one hard drive, which one do you install linux on?"), - \&partition_table::description, \@hds_rw) or return; - $o->set_help('takeOverHdConfirm'); - $o->ask_okcancel('', N("ALL existing partitions and their data will be lost on drive %s", partition_table::description($hd))) or return; + my $hd = $o->ask_from_listf_raw({ messages => N("You have more than one hard drive, which one do you install linux on?"), + interactive_help_id => 'takeOverHdChoose', + }, + \&partition_table::description, \@hds_rw) or return; + $o->ask_okcancel_({ messages => N("ALL existing partitions and their data will be lost on drive %s", partition_table::description($hd)), + interactive_help_id => 'takeOverHdConfirm' }) or return; partition_table::raw::zero_MBR($hd); fsedit::auto_allocate($all_hds); 1; @@ -247,8 +247,6 @@ When you are done, don't forget to save using `w'", partition_table::description sub partitionWizard { my ($o, $nodiskdrake) = @_; - $o->set_help('doPartitionDisks'); - my %solutions = partitionWizardSolutions($o, $o->{all_hds}); delete $solutions{diskdrake} if $nodiskdrake; @@ -267,8 +265,10 @@ sub partitionWizard { log::l('HERE: ', join(',', map { $_->[1] } @solutions)); my $sol; - $o->ask_from('', N("The DrakX Partitioning wizard found the following solutions:"), - [ { val => \$sol, list => \@solutions, format => sub { $_[0][1] }, type => 'list' } ]); + $o->ask_from_({ messages => N("The DrakX Partitioning wizard found the following solutions:"), + interactive_help_id => 'doPartitionDisks', + }, + [ { val => \$sol, list => \@solutions, format => sub { $_[0][1] }, type => 'list' } ]); log::l("partitionWizard calling solution $sol->[1]"); my $ok = eval { $sol->[2]->() }; $@ and $o->ask_warn('', N("Partitioning failed: %s", $@)); diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index d8a6c8018..0658bb12c 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -80,7 +80,6 @@ Continue at your own risk."), $@ ]) if $@; sub errorInStep($$) { print "error :(\n"; c::_exit(1) } sub kill_action {} -sub set_help { 1 } #-###################################################################################### #- Steps Functions diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index bfe920546..6a5802b17 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -139,7 +139,6 @@ sub enteringStep { $o->SUPER::enteringStep($step); install_gtk::create_steps_window($o); # install_gtk::create_help_window($o); #- HACK: without this it doesn't work (reaches step doPartitionDisks then fail) - $o->set_help($o->{step}); } sub leavingStep { my ($o, $step) = @_; @@ -260,6 +259,7 @@ sub reallyChooseGroups { )), 1, '', 0, gtkadd(Gtk2::HBox->new(0, 0), + gtksignal_connect(Gtk2::Button->new(N("Help")), clicked => sub { $o->ask_warn(N("Help"), $o->interactive_help_get_id('choosePackages')) }), $w_size, if_($individual, do { my $check = Gtk2::CheckButton->new(N("Individual package selection")); @@ -395,6 +395,7 @@ sub choosePackagesTree { return; }, auto_deps => N("Show automatically selected packages"), + interactive_help_id => 'choosePackagesTree', ok => N("Install"), cancel => N("<- Previous"), icons => [ { icon => 'floppy', @@ -418,7 +419,6 @@ sub choosePackagesTree { }, }; - $o->set_help('choosePackagesTree'); $o->ask_browse_tree_info('', N("Choose the packages you want to install"), $common); } @@ -616,15 +616,4 @@ N("There was an error installing packages:"), $1, N("Go on anyway?") ], 1) and r $install_result; } -sub set_help { - my ($o, @l) = @_; - - my @l2 = map { - join("\n\n", map { s/\n/ /mg; $_ } split("\n\n", translate($help::steps{$_}))) - } @l; - $o->{current_help} = join("\n\n\n", @l2); -# gtktext_insert($o->{help_window_text}, $o->{current_help}); - 1; -} - 1; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index e13fb2bd7..9f3ba1674 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -83,6 +83,7 @@ sub acceptLicense { $o->ask_from_({ title => N("License agreement"), messages => formatAlaTeX(install_messages::main_license() . "\n\n\n" . install_messages::warning_about_patents()), + interactive_help_id => 'acceptLicense', callbacks => { ok_disabled => sub { $r eq 'Refuse' } }, }, [ { list => [ N_("Accept"), N_("Refuse") ], val => \$r, type => 'list' } ]) or die 'already displayed'; @@ -105,6 +106,7 @@ sub selectKeyboard { $o->ask_from_( { title => N("Keyboard"), messages => N("Please choose your keyboard layout."), + interactive_help_id => 'selectKeyboard', advanced_messages => N("Here is the full list of keyboards available"), advanced_label => N("More"), callbacks => { changed => sub { $other = $_[0] == 1 } }, @@ -134,8 +136,10 @@ sub selectInstallClass { $_->{release} .= " ($_->{part}{device})" foreach @l; } - my $p = $o->ask_from_listf(N("Install/Upgrade"), - N("Is this an install or an upgrade?"), + my $p = $o->ask_from_listf_raw({ title => N("Install/Upgrade"), + messages => N("Is this an install or an upgrade?"), + interactive_help_id => 'selectInstallClass', + }, sub { ref($_[0]) ? (@l > 1 ? N("Upgrade %s", $_[0]{release}) : @@ -160,16 +164,19 @@ sub selectMouse { if ($force) { my $prev = $o->{mouse}{type} . '|' . $o->{mouse}{name}; - $o->ask_from('', N("Please choose your type of mouse."), + $o->ask_from_({ messages => N("Please choose your type of mouse."), + interactive_help_id => 'selectMouse', + }, [ { list => [ mouse::fullnames() ], separator => '|', val => \$prev } ]); $o->{mouse} = mouse::fullname2mouse($prev); } if ($force && $o->{mouse}{type} eq 'serial') { - $o->set_help('selectSerialPort'); $o->{mouse}{device} = - $o->ask_from_listf(N("Mouse Port"), - N("Please choose which serial port your mouse is connected to."), + $o->ask_from_listf_raw({ title => N("Mouse Port"), + messages => N("Please choose which serial port your mouse is connected to."), + interactive_help_id => 'selectSerialPort', + }, \&mouse::serial_port2text, [ mouse::serial_ports() ]) or return &selectMouse; } @@ -222,9 +229,8 @@ sub setupSCSI { install_any::getHds($o, $o); } -sub ask_mntpoint_s { +sub ask_mntpoint_s { #- }{} my ($o, $fstab) = @_; - $o->set_help('ask_mntpoint_s'); my @fstab = grep { isTrueFS($_) } @$fstab; @fstab = grep { isSwap($_) } @$fstab if @fstab == 0; @@ -239,13 +245,14 @@ sub ask_mntpoint_s { if (@fstab == 1) { $fstab[0]{mntpoint} = '/'; } else { - $o->ask_from('', - N("Choose the mount points"), - [ map { { label => partition_table::description($_), - val => \$_->{mntpoint}, - not_edit => 0, - list => [ '', fsedit::suggestions_mntpoint(fsedit::empty_all_hds()) ] } - } grep { !$_->{real_mntpoint} || common::usingRamdisk() } @fstab ]) or return; + $o->ask_from_({ messages => N("Choose the mount points"), + interactive_help_id => 'ask_mntpoint_s', + }, + [ map { { label => partition_table::description($_), + val => \$_->{mntpoint}, + not_edit => 0, + list => [ '', fsedit::suggestions_mntpoint(fsedit::empty_all_hds()) ] } + } grep { !$_->{real_mntpoint} || common::usingRamdisk() } @fstab ]) or return; } $o->SUPER::ask_mntpoint_s($fstab); } @@ -306,6 +313,7 @@ sub choosePartitionsToFormat { $o->ask_from_( { messages => N("Choose the partitions you want to format"), + interactive_help_id => 'formatPartitions', advanced_messages => N("Check bad blocks?"), }, [ map { @@ -551,7 +559,9 @@ sub reallyChooseGroups { my $size_text = &$size_to_display; my ($path, $all); - $o->ask_from('', N("Package Group Selection"), [ + $o->ask_from_({ messages => N("Package Group Selection"), + interactive_help_id => 'choosePackages', + }, [ { val => \$size_text, type => 'label' }, {}, (map { my $old = $path; @@ -607,7 +617,7 @@ sub chooseCD { #- note first CD is always selected and should not be unselected! return if @mediumsDescr == () || !$::expert; - $o->set_help('chooseCD'); +# $o->set_help('chooseCD'); $o->ask_many_from_list('', N("If you have all the CDs in the list below, click Ok. If you have none of those CDs, click Cancel. @@ -619,7 +629,6 @@ If only some CDs are missing, unselect them, then click Ok."), }) or do { $mediumsDescr{$_} = 0 foreach @mediumsDescr; #- force unselection of other CDs. }; - $o->set_help('choosePackages'); #- restore true selection of medium (which may have been grouped together) foreach (@mediums) { @@ -721,8 +730,7 @@ sub installUpdates { $o->hasNetwork or return; - is_empty_hash_ref($u) and $o->ask_yesorno('', -formatAlaTeX( + is_empty_hash_ref($u) and $o->ask_yesorno_({ messages => formatAlaTeX( N("You now have the opportunity to download updated packages. These packages have been updated after the distribution was released. They may contain security or bug fixes. @@ -730,7 +738,9 @@ contain security or bug fixes. To download these packages, you will need to have a working Internet connection. -Do you want to install the updates ?"))) || return; +Do you want to install the updates ?")), + interactive_help_id => 'installUpdates', + }) || return; #- bring all interface up for installing crypto packages. install_interactive::upNetwork($o); @@ -781,10 +791,9 @@ sub configureTimezone { require timezone; $o->{timezone}{timezone} = $o->ask_from_treelist('', N("Which is your timezone?"), '/', [ timezone::getTimeZones($::g_auto_install ? '' : $o->{prefix}) ], $o->{timezone}{timezone}) || return; - $o->set_help('configureTimezoneGMT'); my $ntp = to_bool($o->{timezone}{ntp}); - $o->ask_from('', '', [ + $o->ask_from_({ interactive_help_id => 'configureTimezoneGMT' }, [ { text => N("Hardware clock set to GMT"), val => \$o->{timezone}{UTC}, type => 'bool' }, { text => N("Automatic time synchronization (using NTP)"), val => \$ntp, type => 'bool' }, ]) or goto &configureTimezone @@ -792,7 +801,7 @@ sub configureTimezone { if ($ntp) { my @servers = split("\n", timezone::ntp_servers()); - $o->ask_from('', '', + $o->ask_from_({}, [ { label => N("NTP Server"), val => \$o->{timezone}{ntp}, list => \@servers, not_edit => 0 } ] ) or goto &configureTimezone; $o->{timezone}{ntp} =~ s/.*\((.+)\)/$1/; @@ -827,6 +836,7 @@ sub summary_prompt { $o->ask_from_({ messages => N("Summary"), + interactive_help_id => 'summary', cancel => '', }, $l); } @@ -994,12 +1004,11 @@ sub setRootPassword { return if $o->{security} < 1 && !$clicked; - $::isInstall and $o->set_help("setRootPassword", if_($::expert, "setRootPasswordAuth")); - $o->ask_from_( { title => N("Set root password"), messages => N("Set root password"), + interactive_help_id => "setRootPassword", cancel => ($o->{security} <= 2 && !$::corporate ? N("No password") : ''), focus_first => 1, callbacks => { @@ -1071,7 +1080,6 @@ sub addUser { sub setupBootloaderBefore { my ($o) = @_; my $_w = $o->wait_message('', N("Preparing bootloader...")); - $o->set_help('empty'); $o->SUPER::setupBootloaderBefore($o); } @@ -1173,6 +1181,7 @@ Do you really want to quit now?"), 0); $o->ask_from_no_check( { messages => formatAlaTeX(install_messages::install_completed()), + interactive_help_id => 'exitInstall', ok => N("Reboot"), }, [ diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 53915ca61..f812ecba5 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -365,6 +365,7 @@ sub ask_from_normalize { ($common->{title} = $0) =~ s|.*/||; } $common->{interactive_help} ||= $o->{interactive_help}; + $common->{interactive_help} ||= $common->{interactive_help_id} && sub { $o->interactive_help_get_id($common->{interactive_help_id}) }; $common->{advanced_label} ||= N("Advanced"); $common->{advanced_label_close} ||= N("Basic"); $common->{$_} = [ deref($common->{$_}) ] foreach qw(messages advanced_messages); @@ -394,6 +395,7 @@ sub ask_from_real { sub ask_browse_tree_info { my ($o, $title, $message, $common) = @_; + $common->{interactive_help} ||= $common->{interactive_help_id} && sub { $o->interactive_help_get_id($common->{interactive_help_id}) }; add2hash_($common, { ok => N("Ok"), cancel => N("Cancel") }); add2hash_($common, { title => $title, message => $message }); add2hash_($common, { grep_allowed_to_toggle => sub { @_ }, @@ -468,4 +470,11 @@ sub helper_separator_tree_to_tree { } +sub interactive_help_get_id { + my @l = map { + join("\n\n", map { s/\n/ /mg; $_ } split("\n\n", translate($help::steps{$_}))) + } grep { exists $help::steps{$_} } @_; + join("\n\n\n", @l); +} + 1; diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index f7d934fa0..e67a4a5c7 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -637,7 +637,12 @@ sub ask_fromW { 0, Gtk2::HSeparator->new, 1, $create_widgets->($advanced_total_size, @widgets_advanced)); - my $buttons_pack = ($common->{ok} || !exists $common->{ok}) && $mainw->create_okcancel($common->{ok}, $common->{cancel}, '', if_($common->{interactive_help}, [ N("Help"), sub { $o->ask_warn(N("Help"), $common->{interactive_help}->()) }, 1 ]), if_(@$l2, $advanced_button)); + my @help = if_($common->{interactive_help}, + [ N("Help"), sub { + my $message = $common->{interactive_help}->() or return; + $o->ask_warn(N("Help"), $message); + }, 1 ]); + my $buttons_pack = ($common->{ok} || !exists $common->{ok}) && $mainw->create_okcancel($common->{ok}, $common->{cancel}, '', @help, if_(@$l2, $advanced_button)); $pack->pack_start($always_pack, 1, 1, 0); $always_pack->show; $pack->pack_start($advanced_pack, 1, 1, 0); diff --git a/perl-install/modules/interactive.pm b/perl-install/modules/interactive.pm index add2f5ccd..1e5e039d5 100644 --- a/perl-install/modules/interactive.pm +++ b/perl-install/modules/interactive.pm @@ -59,7 +59,10 @@ sub load_category__prompt_for_more { N("Do you have any %s interfaces?", $msg_type); my $r = 'No'; - $in->ask_from('', $msg, [ { list => [ N_("Yes"), N_("No"), N_("See hardware info") ], val => \$r, type => 'list' } ]); + $in->ask_from_({ messages => $msg, + if_($category =~ m|disk/scsi|, interactive_help_id => 'setupSCSI'), + }, + [ { list => [ N_("Yes"), N_("No"), N_("See hardware info") ], val => \$r, type => 'list' } ]); if ($r eq "No") { return @l } if ($r eq "Yes") { push @l, load_category__prompt($in, $category) || next; diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm index 4819bb2a6..37f3520e5 100644 --- a/perl-install/network/adsl.pm +++ b/perl-install/network/adsl.pm @@ -13,7 +13,7 @@ use MDK::Common::Globals "network", qw($in $prefix); sub configure { my ($netcnx, $netc, $intf, $first_time) = @_; - $::isInstall and $in->set_help('configureNetworkADSL'); +# $::isInstall and $in->set_help('configureNetworkADSL'); conf_adsl_step1: my $l = [ N_("use pppoe"), diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index fc87f5b3a..0d62c68ba 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -17,7 +17,7 @@ use MDK::Common::Globals "network", qw($in $prefix); sub configure_cable { my ($netcnx, $netc, $intf, $first_time) = @_; - $::isInstall and $in->set_help('configureNetworkCable'); +# $::isInstall and $in->set_help('configureNetworkCable'); $netcnx->{type} = 'cable'; if ($::expert) { @@ -54,7 +54,7 @@ qq( sub configure_lan { my ($netcnx, $netc, $intf, $first_time) = @_; - $::isInstall and $in->set_help('configureNetworkIP'); +# $::isInstall and $in->set_help('configureNetworkIP'); configureNetwork($netc, $intf, $first_time) or return; configureNetwork2($in, $prefix, $netc, $intf); $netc->{NETWORKING} = "yes"; @@ -183,7 +183,7 @@ sub configureNetwork { if ($last->{BOOTPROTO} !~ /static/) { $netc->{minus_one} = 1; - $::isInstall and $in->set_help('configureNetworkHostDHCP'); +# $::isInstall and $in->set_help('configureNetworkHostDHCP'); $in->ask_from(N("Configuring network"), N("Please enter your host name if you know it. Some DHCP servers require the hostname to work. diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm index a5666bed3..2c218621b 100644 --- a/perl-install/network/isdn.pm +++ b/perl-install/network/isdn.pm @@ -18,7 +18,7 @@ sub configure { my ($netcnx, $netc, $isdn) = @_; isdn_step_1: defined $netc->{autodetect}{isdn}{id} and goto intern_pci; - $::isInstall and $in->set_help('configureNetworkISDN'); +# $::isInstall and $in->set_help('configureNetworkISDN'); my $e = $in->ask_from_list_(N("Network Configuration Wizard"), N("Which ISDN configuration do you prefer? diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index 011ee9054..050743794 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -218,8 +218,9 @@ sub ppp_choose { $mouse ||= {}; $mouse->{device} ||= readlink "$::prefix/dev/mouse"; - $::isInstall and $in->set_help('selectSerialPort'); - $modem->{device} ||= $in->ask_from_listf('', N("Please choose which serial port your modem is connected to."), + $modem->{device} ||= $in->ask_from_listf_raw({ messsages => N("Please choose which serial port your modem is connected to."), + interactive_help_id => 'selectSerialPort', + }, \&mouse::serial_port2text, [ grep { $_ ne $mouse->{device} } (mouse::serial_ports(), if_(-e '/dev/modem', '/dev/modem')) ]) || return; @@ -228,7 +229,7 @@ sub ppp_choose { foreach (@$secret) { push @cnx_list, $_->{server}; } - $::isStandalone || $in->set_help('configureNetworkISP'); +# $::isStandalone || $in->set_help('configureNetworkISP'); $in->ask_from('', N("Dialup options"), [ { label => N("Connection name"), val => \$modem->{connection} }, { label => N("Phone number"), val => \$modem->{phone} }, diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index e38e419cf..85bf8dd74 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -118,7 +118,6 @@ sub main { my ($prefix, $netcnx, $netc, $mouse, $in, $intf, $first_time, $_direct_fr, $noauto) = @_; init_globals($in, $prefix); $netc->{minus_one} = 0; #When one configure an eth in dhcp without gateway - $::isInstall and $in->set_help('configureNetwork'); $::isStandalone and read_net_conf($prefix, $netcnx, $netc); # REDONDANCE with intro. FIXME $netc->{NET_DEVICE} = $netcnx->{NET_DEVICE} if $netcnx->{NET_DEVICE}; # REDONDANCE with read_conf. FIXME $netc->{NET_INTERFACE} = $netcnx->{NET_INTERFACE} if $netcnx->{NET_INTERFACE}; # REDONDANCE with read_conf. FIXME @@ -152,12 +151,14 @@ ifdown eth0 step_1: $::Wizard_no_previous = 1; my @profiles = get_profiles(); - eval { $in->ask_from(N("Network Configuration Wizard"), - N("Welcome to The Network Configuration Wizard. + eval { $in->ask_from_({ title => N("Network Configuration Wizard"), + messages => N("Welcome to The Network Configuration Wizard. We are about to configure your internet/network connection. If you don't want to use the auto detection, deselect the checkbox. "), + interactive_help_id => 'configureNetwork', + }, [ if_(@profiles > 1, { label => N("Choose the profile to configure"), val => \$netcnx->{PROFILE}, list => \@profiles }), { label => N("Use auto detection"), val => \$netc->{autodetection}, type => 'bool' }, @@ -175,7 +176,6 @@ If you don't want to use the auto detection, deselect the checkbox. $conf{$_} = $netc->{autodetect}{$_} ? 1 : 0 foreach 'modem', 'winmodem', 'adsl', 'cable', 'lan'; $conf{isdn} = $netc->{autodetect}{isdn}{description} ? 1 : 0; - $::isInstall and $in->set_help('configureNetwork'); my @l = ( [N("Normal modem connection") . if_($netc->{autodetect}{modem}, " - " . N("detected on port %s", $netc->{autodetect}{modem})), \$conf{modem}], [N("Winmodem connection") . if_($netc->{autodetect}{winmodem}, " - " . N("detected")), \$conf{winmodem}], @@ -184,8 +184,10 @@ If you don't want to use the auto detection, deselect the checkbox. [N("Cable connection") . if_($netc->{autodetect}{cable}, " - " . N("cable connection detected")), \$conf{cable}], [N("LAN connection") . if_($netc->{autodetect}{lan}, " - " . N("ethernet card(s) detected")), \$conf{lan}] ); - $::isInstall and $in->set_help('configureNetwork'); - eval { $in->ask_from(N("Network Configuration Wizard"), N("Choose the connection you want to configure"), + eval { $in->ask_from_({ title => N("Network Configuration Wizard"), + messages => N("Choose the connection you want to configure"), + interactive_help_id => 'configureNetwork', + }, [ map { { label => $_->[0], val => $_->[1], type => 'bool' } } @l ], changed => sub { return if !$netc->{autodetection}; diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index beb0bf441..e41f9f593 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -326,7 +326,7 @@ notation (for example, 1.2.3.4)."); delete $intf->{NETWORK}; delete $intf->{BROADCAST}; my @fields = qw(IPADDR NETMASK); - $::isStandalone or $in->set_help('configureNetworkIP'); +# $::isStandalone or $in->set_help('configureNetworkIP'); $in->ask_from(N("Configuring network device %s", $intf->{DEVICE}), (N("Configuring network device %s", $intf->{DEVICE}) . ($module ? N(" (driver %s)", $module) : '') . "\n\n") . $text, @@ -389,7 +389,7 @@ sub configureNetworkNet { my $gateway_ex = gateway($intf->{IPADDR}); #- $netc->{GATEWAY} ||= gateway($intf->{IPADDR}); - $::isInstall and $in->set_help('configureNetworkHost'); +# $::isInstall and $in->set_help('configureNetworkHost'); $in->ask_from(N("Configuring network"), N("Please enter your host name. Your host name should be a fully-qualified host name, @@ -426,7 +426,7 @@ want to use the default host name."), sub miscellaneous_choose { my ($in, $u, $clicked, $no_track_net) = @_; - $in->set_help('configureNetworkProxy') if $::isInstall; +# $in->set_help('configureNetworkProxy') if $::isInstall; $in->ask_from('', N("Proxies configuration"), diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 6b7db7c63..d1c533a2f 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -112,7 +112,7 @@ sub read_providers_backend { my ($file) = @_; map { /(.*?)=>/ } catMaybeCompress sub ask_info2 { my ($cnx, $netc) = @_; - $::isInstall and $in->set_help('configureNetworkDNS'); +# $::isInstall and $in->set_help('configureNetworkDNS'); $in->ask_from(N("Connection Configuration"), N("Please fill or check the field below"), [ diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index 6b3c22948..2cc829326 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -18,7 +18,6 @@ use printer::data; sub choose_printer_type { my ($printer, $in) = @_; - $in->set_help('configurePrinterConnected') if $::isInstall; $printer->{str_type} = $printer_type_inv{$printer->{TYPE}}; my $autodetect = 0; $autodetect = 1 if $printer->{AUTODETECT}; @@ -52,7 +51,7 @@ sub config_cups { # running if (!check_network($printer, $in, $upNetwork, 0)) { return 0 }; - $in->set_help('configureRemoteCUPSServer') if $::isInstall; +# $in->set_help('configureRemoteCUPSServer') if $::isInstall; #- hack to handle cups remote server printing, #- first read /etc/cups/cupsd.conf for variable BrowsePoll address:port my ($server, $port, $autoconf); @@ -644,7 +643,7 @@ sub setup_local_autoscan { my @autodetected; my $menuentries = {}; - $in->set_help('setupLocal') if $::isInstall; +# $in->set_help('setupLocal') if $::isInstall; if ($do_auto_detect) { if (!$::testing && !$expert_or_modify && $printer->{AUTODETECTSMB} && !files_exist('/usr/bin/smbclient')) { @@ -761,7 +760,7 @@ sub setup_local_autoscan { $device = $menuentries->{$menuchoice} if $device eq ""; } if ($in) { - $::expert or $in->set_help('configurePrinterDev') if $::isInstall; +# $::expert or $in->set_help('configurePrinterDev') if $::isInstall; if ($#menuentrieslist < 0) { # No menu entry # auto-detection has failed, we must do all manually $do_auto_detect = 0; @@ -874,7 +873,7 @@ sub setup_lpd { # running if (!check_network($printer, $in, $upNetwork, 0)) { return 0 }; - $in->set_help('setupLPD') if $::isInstall; +# $in->set_help('setupLPD') if $::isInstall; my ($uri, $remotehost, $remotequeue); my $queue = $printer->{OLD_QUEUE}; if ($printer->{configured}{$queue} && @@ -945,7 +944,7 @@ sub setup_smb { # running if (!check_network($printer, $in, $upNetwork, 0)) { return 0 }; - $in->set_help('setupSMB') if $::isInstall; +# $in->set_help('setupSMB') if $::isInstall; my ($uri, $smbuser, $smbpassword, $workgroup, $smbserver, $smbserverip, $smbshare); my $queue = $printer->{OLD_QUEUE}; if ($printer->{configured}{$queue} && @@ -1135,7 +1134,7 @@ sub setup_ncp { # running if (!check_network($printer, $in, $upNetwork, 0)) { return 0 }; - $in->set_help('setupNCP') if $::isInstall; +# $in->set_help('setupNCP') if $::isInstall; my ($uri, $ncpuser, $ncppassword, $ncpserver, $ncpqueue); my $queue = $printer->{OLD_QUEUE}; if ($printer->{configured}{$queue} && @@ -1202,7 +1201,7 @@ sub setup_socket { # running if (!check_network($printer, $in, $upNetwork, 0)) { return 0 }; - $in->set_help('setupSocket') if $::isInstall; +# $in->set_help('setupSocket') if $::isInstall; my ($uri, $remotehost, $remoteport); my $queue = $printer->{OLD_QUEUE}; @@ -1361,7 +1360,7 @@ sub setup_socket { sub setup_uri { my ($printer, $in, $upNetwork) = @_; - $in->set_help('setupURI') if $::isInstall; +# $in->set_help('setupURI') if $::isInstall; return if !$in->ask_from(N("Printer Device URI"), N("You can specify directly the URI to access the printer. The URI must fulfill either the CUPS or the Foomatic specifications. Note that not all URI types are supported by all the spoolers."), [ { label => N("Printer Device URI"), @@ -1450,7 +1449,7 @@ complete => sub { sub setup_postpipe { my ($printer, $in) = @_; - $in->set_help('setupPostpipe') if $::isInstall; +# $in->set_help('setupPostpipe') if $::isInstall; my $uri; my $commandline; my $queue = $printer->{OLD_QUEUE}; @@ -1820,7 +1819,7 @@ sub setup_common { sub choose_printer_name { my ($printer, $in) = @_; # Name, description, location - $in->set_help('setupPrinterName') if $::isInstall; +# $in->set_help('setupPrinterName') if $::isInstall; my $default = $printer->{currentqueue}{queue}; $in->ask_from_( { title => N("Enter Printer Name and Comments"), @@ -1969,7 +1968,7 @@ sub get_db_entry { sub is_model_correct { my ($printer, $in) = @_; - $in->set_help('chooseModel') if $::isInstall; +# $in->set_help('chooseModel') if $::isInstall; my $dbentry = $printer->{DBENTRY}; if (!$dbentry) { # If printerdrake could not determine the model, omit this dialog and @@ -1996,7 +1995,7 @@ For your printer Printerdrake has found: sub choose_model { my ($printer, $in) = @_; - $in->set_help('chooseModel') if $::isInstall; +# $in->set_help('chooseModel') if $::isInstall; #- Read the printer driver database if necessary if ((keys %printer::main::thedb) == 0) { my $_w = $in->wait_message(N("Printerdrake"), @@ -2287,7 +2286,7 @@ sub setup_options { "Option29", "Option30" ); - $in->set_help('setupOptions') if $::isInstall; +# $in->set_help('setupOptions') if $::isInstall; if ($printer->{currentqueue}{printer} || # We have a Foomatic queue $printer->{currentqueue}{ppd}) { # We have a CUPS+PPD queue # Set up the widgets for the option dialog @@ -2471,7 +2470,7 @@ You should make sure that the page size and the ink type/printing mode (if avail sub setasdefault { my ($printer, $in) = @_; - $in->set_help('setupAsDefault') if $::isInstall; +# $in->set_help('setupAsDefault') if $::isInstall; if ($printer->{DEFAULT} eq '' || # We have no default printer, # so set the current one as default $in->ask_yesorno('', N("Do you want to set this printer (\"%s\")\nas the default printer?", $printer->{QUEUE}), 0)) { # Ask the user @@ -2482,7 +2481,7 @@ sub setasdefault { sub print_testpages { my ($printer, $in, $upNetwork) = @_; - $in->set_help('printTestPages') if $::isInstall; +# $in->set_help('printTestPages') if $::isInstall; # print test pages my $res2 = 0; my %options = (alta4 => 0, altletter => 0, ascii => 0, photo => 0, standard => 1); @@ -2740,7 +2739,7 @@ sub photocard_help { sub copy_queues_from { my ($printer, $in, $oldspooler) = @_; - $in->set_help('copyQueues') if $::isInstall; +# $in->set_help('copyQueues') if $::isInstall; my $newspooler = $printer->{SPOOLER}; my @oldqueues; my @queueentries; @@ -2885,7 +2884,7 @@ sub check_network { # extra windows and not embedded in the "Add printer" wizard. local $::isWizard = 0; - $in->set_help('checkNetwork') if $::isInstall; +# $in->set_help('checkNetwork') if $::isInstall; # First check: Do configured networks # (/etc/sysconfig/network-scripts/ifcfg*) exist? @@ -2958,7 +2957,7 @@ sub security_check { # extra windows and not embedded in the "Add printer" wizard. local $::isWizard = 0; - $in->set_help('securityCheck') if $::isInstall; +# $in->set_help('securityCheck') if $::isInstall; # Get security level my $security; @@ -3016,7 +3015,7 @@ sub start_spooler_on_boot { # extra windows and not embedded in the "Add printer" wizard. local $::isWizard = 0; - $in->set_help('startSpoolerOnBoot') if $::isInstall; +# $in->set_help('startSpoolerOnBoot') if $::isInstall; if (!services::starts_on_boot($service)) { if ($in->ask_yesorno(N("Starting the printing system at boot time"), N("The printing system (%s) will not be started automatically when the machine is booted. @@ -3095,13 +3094,15 @@ sub install_spooler { sub setup_default_spooler { my ($printer, $in, $upNetwork) = @_; - $in->set_help('setupDefaultSpooler') if $::isInstall; $printer->{SPOOLER} ||= 'cups'; my $oldspooler = $printer->{SPOOLER}; my $str_spooler = - $in->ask_from_list_(N("Select Printer Spooler"), - N("Which printing system (spooler) do you want to use?"), + $in->ask_from_listf_raw({ title => N("Select Printer Spooler"), + messages => N("Which printing system (spooler) do you want to use?"), + interactive_help_id => 'setupDefaultSpooler', + }, + sub { translate($_[0]) }, [ printer::main::spooler() ], $spoolers{$printer->{SPOOLER}}{long_name}, ) or return; @@ -3279,7 +3280,7 @@ sub main { $modify = N("Printer options"); if (!$ask_multiple_printer && %{$printer->{configured} || {}} == ()) { - $in->set_help('doYouWantToPrint') if $::isInstall; +# $in->set_help('doYouWantToPrint') if $::isInstall; $newqueue = 1; $menuchoice = $printer->{want} || $in->ask_yesorno(N("Printer"), @@ -3308,7 +3309,7 @@ sub main { # when we are in expert mode, or when we are not in the # installation. if (%{$printer->{configured} || {}} || $::expert || !$::isInstall) { - $in->set_help('mainMenu') if $::isInstall; +# $in->set_help('mainMenu') if $::isInstall; # Cancelling the printer type dialog should leed to this # dialog $continue = 1; @@ -3630,7 +3631,7 @@ sub main { } else { $printer->{NEW} = 0; # Modify a queue, ask which part should be modified - $in->set_help('modifyPrinterMenu') if $::isInstall; +# $in->set_help('modifyPrinterMenu') if $::isInstall; # Get some info to display my $infoline; if ($printer->{configured}{$queue}) { diff --git a/perl-install/security/level.pm b/perl-install/security/level.pm index fabc9f150..1513892ca 100644 --- a/perl-install/security/level.pm +++ b/perl-install/security/level.pm @@ -70,11 +70,11 @@ connections from many clients. Note: if your machine is only a client on the Int delete @l{0,1}; delete $l{5} if !$::expert; - $in->ask_from( - N("DrakSec Basic Options"), - N("Please choose the desired security level") . "\n\n" . - join('', map { "$l{$_}: " . formatAlaTeX($help{$_}) . "\n\n" } ikeys %l), - [ + $in->ask_from_({ title => N("DrakSec Basic Options"), + messages => N("Please choose the desired security level") . "\n\n" . + join('', map { "$l{$_}: " . formatAlaTeX($help{$_}) . "\n\n" } ikeys %l), + interactive_help_id => 'miscellaneous', + }, [ { label => N("Security level"), val => $security, list => [ sort keys %l ], format => sub { $l{$_[0]} } }, if_($in->do_pkgs->is_installed('libsafe') && arch() =~ /^i.86/, { label => N("Use libsafe for servers"), val => $libsafe, type => 'bool', text => diff --git a/perl-install/services.pm b/perl-install/services.pm index de2a961ef..576ed9a3c 100644 --- a/perl-install/services.pm +++ b/perl-install/services.pm @@ -177,6 +177,7 @@ sub ask_install { scalar(values %services)); }, get_info => sub { formatLines(description($_[0], $prefix)) }, + interactive_help_id => 'configureServices', }) or return ($l, $on_services); #- no change on cancel. [ grep { $services{$_} } @$l ]; } diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index e527fe36c..ec00ee5d9 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -1052,6 +1052,10 @@ sub ask_browse_tree_info { } @l; @buttons = reverse @buttons if !$::isInstall; + gtkpack__($box2, gtksignal_connect(Gtk2::Button->new(N("Help")), clicked => sub { + ask_warn(N("Help"), $common->{interactive_help}->()) + })) if $common->{interactive_help}; + if ($common->{auto_deps}) { gtkpack__($box1, gtksignal_connect(gtkset_active(Gtk2::CheckButton->new($common->{auto_deps}), $common->{state}{auto_deps}), clicked => sub { invbool \$common->{state}{auto_deps} })); |