diff options
-rw-r--r-- | perl-install/Makefile.config | 2 | ||||
-rw-r--r-- | perl-install/harddrake/ui.pm | 18 | ||||
-rw-r--r-- | perl-install/modules/interactive.pm | 25 |
3 files changed, 28 insertions, 17 deletions
diff --git a/perl-install/Makefile.config b/perl-install/Makefile.config index 74026b480..cdd3b5eeb 100644 --- a/perl-install/Makefile.config +++ b/perl-install/Makefile.config @@ -11,7 +11,7 @@ endif VERSION = 2.2.10-BOOT SUDO = sudo SO_FILES = c/blib/arch/auto/c/c.so -PMS_DIRS = Newt Xconfig c diskdrake harddrake interactive network partition_table resize_fat sbus_probing security +PMS_DIRS = Newt Xconfig c diskdrake harddrake interactive modules network partition_table resize_fat sbus_probing security PMS = *.pm $(PMS_DIRS:%=%/*.pm) commands install2 g_auto_install live_install live_install2 share/advertising/*.pl STANDALONEPMS_ = XFdrake adduserdrake diskdrake drakTermServ drakautoinst drakbackup drakboot drakbug drakbug_report drakconnect drakfirewall drakfloppy drakfont drakgw drakperm drakproxy draksec draksound draksplash drakupdate_fstab drakxservices drakxtv fileshareset harddrake2 keyboarddrake livedrake localedrake logdrake lsnetdrake mousedrake net_monitor printerdrake scannerdrake service_harddrake service_harddrake.sh STANDALONEPMS = $(STANDALONEPMS_:%=standalone/%) diff --git a/perl-install/harddrake/ui.pm b/perl-install/harddrake/ui.pm index c12a9a5ea..0a1d25446 100644 --- a/perl-install/harddrake/ui.pm +++ b/perl-install/harddrake/ui.pm @@ -188,22 +188,8 @@ sub new { if (exists $data->{driver} && $data->{driver} !~ /(unknown|.*\|.*)/ && $data->{driver} !~ /^Card:/) { $module_cfg_button->show; $IDs{module} = $module_cfg_button->signal_connect(clicked => sub { - require modules; - modules::mergein_conf('/etc/modules.conf'); - my %conf = modules::get_parameters($data->{driver}); - require modparm; - my @l; - foreach (modparm::parameters($data->{driver})) { - my ($name, $format, $description) = @$_; - push @l, { label => $name, help => "$description\n[$format]", val => \$conf{$name} }; - } - if ($in->ask_from("Module configuration", _("You can configure each parameter of the module here."), \@l)) { - my $options = join(' ', map { if_($conf{$_}, "$_=$conf{$_}") } keys %conf); - if ($options) { - modules::set_options($_->{driver}, $options); - modules::write_conf; - } - } + require modules::interactive; + modules::interactive::config_window($in, $data); gtkset_mousecursor_normal(); }); } diff --git a/perl-install/modules/interactive.pm b/perl-install/modules/interactive.pm new file mode 100644 index 000000000..f0e4ae09a --- /dev/null +++ b/perl-install/modules/interactive.pm @@ -0,0 +1,25 @@ +package modules::interactive; +use interactive; +use common; + +sub config_window { + my ($in, $data) = @_; + require modules; + modules::mergein_conf('/etc/modules.conf'); + my %conf = modules::get_parameters($data->{driver}); + require modparm; + my @l; + foreach (modparm::parameters($data->{driver})) { + my ($name, $format, $description) = @$_; + push @l, { label => $name, help => "$description\n[$format]", val => \$conf{$name} }; + } + if ($in->ask_from("Module configuration", _("You can configure each parameter of the module here."), \@l)) { + my $options = join(' ', map { if_($conf{$_}, "$_=$conf{$_}") } keys %conf); + if ($options) { + modules::set_options($_->{driver}, $options); + modules::write_conf; + } + } +} + +1; |