diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2002-10-09 13:14:49 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2002-10-09 13:14:49 +0000 |
commit | 8346dedbb1791281f72c83331cb09802904ef634 (patch) | |
tree | ca60e36635bd64c7ec7c4457a5a6076ccf8876d2 /perl-install | |
parent | 319db06824f86eeace4ff9f8fff01d7af0b9503a (diff) | |
download | drakx-backup-do-not-use-8346dedbb1791281f72c83331cb09802904ef634.tar drakx-backup-do-not-use-8346dedbb1791281f72c83331cb09802904ef634.tar.gz drakx-backup-do-not-use-8346dedbb1791281f72c83331cb09802904ef634.tar.bz2 drakx-backup-do-not-use-8346dedbb1791281f72c83331cb09802904ef634.tar.xz drakx-backup-do-not-use-8346dedbb1791281f72c83331cb09802904ef634.zip |
don't use ugtk directly
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/harddrake/ui.pm | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/perl-install/harddrake/ui.pm b/perl-install/harddrake/ui.pm index 260aced21..b6c361cd1 100644 --- a/perl-install/harddrake/ui.pm +++ b/perl-install/harddrake/ui.pm @@ -5,8 +5,7 @@ use strict; use harddrake::data; use harddrake::sound; use common; -use ugtk qw(:helpers :wrappers :various); -use my_gtk qw(:helpers :wrappers); +use my_gtk qw(:helpers :wrappers :various); use interactive; @@ -59,8 +58,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. my ($in, %IDs, $pid, $w); +my %options; +my $conffile = "/etc/sysconfig/harddrake2/ui.conf"; + +my ($modem_check_box, $printer_check_box); + my @menu_items = ( { path => _("/_File"), type => '<Branch>' }, { path => _("/_File")._("/_Quit"), accelerator => _("<control>Q"), callback => \&quit_global }, +# { path => _("/_Options")._("/Autodetect _printers"), type => '<CheckItem>', +# callback => sub { $options{PRINTERS_DETECTION} ^= 1 } }, +# { path => _("/_Options")._("/Autodetect _modems"), type => '<CheckItem>', +# callback => sub { $options{MODEMS_DETECTION} ^= 1 } }, + { path => _("/_Help"), type => '<Branch>' }, { path => _("/_Help")._("/_Help..."), callback => sub { $in->ask_warn(_("Harddrake help"), @@ -86,6 +95,8 @@ sub detect { my ($Ident, $title, $icon, $configurator, $detector) = @$_; next if (ref($detector) ne "CODE"); #skip class witouth detector next if $Ident =~ /(MODEM|PRINTER)/ && "@ARGV" =~ /test/; + next if $Ident =~ /MODEM/ && !$options{MODEMS_DETECTION}; + next if $Ident =~ /PRINTER/ && !$options{PRINTERS_DETECTION}; # print _("Probing %s class\n", $Ident); # standalone::explanations("Probing %s class\n", $Ident); @@ -132,14 +143,18 @@ sub new { unless ($::isEmbedded) { $in = 'interactive'->vnew('su', 'default'); $wait = $in->wait_message(_("Please wait"), _("Detection in progress")); - gtkflush; + my_gtk::flush; } + %options = getVarsFromSh($conffile); my @class_tree = &detect; # Build the gui add_icon_path('/usr/share/pixmaps/harddrake2/'); $w = my_gtk->new((_("Harddrake2 version ") . $harddrake::data::version)); $w->{window}->set_usize(760, 550) unless $::isEmbedded; + $options{MODEMS_DETECTION} = 1 unless defined $options{MODEMS_DETECTION}; + $options{PRINTERS_DETECTION} = 1 unless defined $options{PRINTERS_DETECTION}; + $w->{window}->add( my $main_vbox = gtkadd(gtkadd($::isEmbedded ? new Gtk::VBox(0, 0) : gtkadd(new Gtk::VBox(0, 0), @@ -249,6 +264,7 @@ sub new { sub quit_global { kill(15, $pid) if ($pid); + setVarsInSh($conffile, \%options); $w->{rwindow}->destroy; $in->exit; } |