diff options
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/draknet | 89 |
1 files changed, 45 insertions, 44 deletions
diff --git a/perl-install/standalone/draknet b/perl-install/standalone/draknet index 743b8eb95..5698c54c5 100755 --- a/perl-install/standalone/draknet +++ b/perl-install/standalone/draknet @@ -28,13 +28,19 @@ use standalone; use netconnect; use c; +$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\S*) (\S*)/; + +print "EMBED\n" if $::isEmbedded; +print "XID : $::XID\n"; +print "CCPID : $::CCPID\n"; + local $_ = join '', @ARGV; #/-h/ and die "usage: draknet[--xf3] [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing]\n"; my $netcnx = {}; -$::isWizard = 0; +$::isWizard = 1; $::wizard_xpm = "/usr/share/pixmaps/internet.xpm"; #$::force_xf3 = /-xf3/; #$::beginner = /-beginner/; @@ -50,6 +56,7 @@ $::wizard_xpm = "/usr/share/pixmaps/internet.xpm"; my $in = vnew interactive('su'); +#goto dd; my $window1 = new Gtk::Window -toplevel; $window1->signal_connect ( delete_event => sub { Gtk->exit(0); }); $window1->set_position(1); @@ -60,7 +67,11 @@ $window1->add($vbox1); my $hbox1 = new Gtk::HBox(0,0); $vbox1->pack_start($hbox1,1,1,0); $hbox1->pack_start(new Gtk::Label(_("Profile: ")),0,0,0); -$hbox1->pack_start(new Gtk::Label(_("default")),0,0,0); +my $combo1 = new Gtk::Combo; +$combo1->set_popdown_strings ("default", "maison", "travail" ); +$combo1->entry->set_editable(0); +$combo1->entry->signal_connect( 'changed', sub { print "CHANGED\n" });#\&configure_net ); +$hbox1->pack_start($combo1,0,0,0); my $hbox2 = new Gtk::HBox(0,0); $vbox1->pack_start($hbox2,1,1,0); $hbox2->pack_start(new Gtk::Label(_("Hostname: ")),0,0,0); @@ -141,53 +152,43 @@ sub configure_net { $window->border_width(10); my $vbox1 = new Gtk::VBox(0,0); $window->add($vbox1); + $vbox1->pack_start(new Gtk::Label(_("Internet Connection Configuration")),0,1,0); - my $table1 = new Gtk::Table (2,2, 0); + $vbox1->pack_start(new Gtk::HSeparator,0,0,5); + my $table1 = new Gtk::Table (2, 4, 0); $table1->set_row_spacings(5); $table1->set_col_spacings(5); - $vbox1->pack_start($table1,1,1,0); - $table1->attach(new Gtk::Label(_('Select the connection')), 0, 1, 0, 1, 'fill', 'fill',0,0); - my $combo1=new Gtk::Combo; - $combo1->set_popdown_strings("Manual"); - $table1->attach($combo1, 0, 1, 1, 2, 'fill', 'fill',0,0); - my $button1 = new Gtk::Button(_("Detect...")); - $table1->attach($button1, 1,2, 0, 2, 'fill', 'fill',0,0); + $vbox1->pack_start($table1,0,0,0); + $table1->attach(new Gtk::Label(_("Profile: ")), 0, 1, 0, 1, 'fill', 'fill',0,0); + $table1->attach(new Gtk::Label(_('default')), 1, 2, 0, 1, 'fill', 'fill',0,0); + $table1->attach(new Gtk::Label(_("Connection type: ")), 0, 1, 1, 2, 'fill', 'fill',0,0); + $table1->attach(new Gtk::Label(_('modem')), 1, 2, 1, 2, 'fill', 'fill',0,0); + my $button1 = new Gtk::Button(_("Reconfigure using wizard...")); + $table1->attach($button1, 2, 4, 0, 2, 'fill', 'fill',0,0); + $vbox1->pack_start(new Gtk::HSeparator,0,0,5); + my $frame1 = new Gtk::Frame (_("Parameters")); $vbox1->pack_start($frame1,1,1,0); - - my $socket = new Gtk::Socket; - $socket->show; - $frame1->add($socket); - $socket->realize; - print ("The XID of the sockets window n°$arg is [" . $socket->window->XWINDOW . "]\nMy PID is [" . $$ . "]\n"); - $::isEmbedded = 1; - $::XID = $socket->window->XWINDOW; - $::CCPID = $$; - - my $isdn={}; - my $netc={}; - - $window->show_all(); - $window->realize(); - $isdn->{$_} ||= '' foreach qw(phone_in phone_out dialing_mode login passwd passwd2 idl); - common::add2hash($netc, { dnsServer2 => '', dnsServer3 => '', DOMAINNAME2 => '' }); - netconnect::ask_info2('', $isdn, $netc, $in, -e "/etc/pcmcia"); - Gtk->main; - - -# my $table2 = new Gtk::Table (20,2, 0); -# $table2->set_row_spacings(5); -# $table2->set_col_spacings(5); -# $frame1->add($table2); - -# my $i=0; -# foreach ("Card IRQ", "Card mem (DMA)", "Card IO", "Card IO_0", "Card IO_1", "Your personal phone number", "Provider name (ex provider.net)", "Provider phone number", "Provider dns 1", "Provider dns 2", "Dialing mode", "Account Login (user name)", "Account Password", "Confirm Password") { -# print "$_\n"; -# $table2->attach(new Gtk::Label(_($_)), 0, 1, $i, $i+1, 'fill', 'fill',0,0); -# $infos[$i]=new Gtk::Entry(); -# $table2->attach($infos[$i], 1, 2, $i, $i+1, 'fill', 'fill',0,0); -# $i++; -# } + my $table2 = new Gtk::Table (14,2, 0); + $table2->set_row_spacings(5); + $table2->set_col_spacings(5); + $frame1->add($table2); + my $i=0; + foreach (_("Card IRQ"), _("Card mem (DMA)"), _("Card IO"), _("Card IO_0"), _("Card IO_1"), _("Your personal phone number"), _("Provider name (ex provider.net)"), _("Provider phone number"), _("Provider dns 1"), _("Provider dns 2"), _("Account Login (user name)"), _("Account Password")) { + $infos[2*$i]=new Gtk::Label(_($_)); + $table2->attach($infos[2*$i], 0, 1, $i+1, $i+2, 'fill', 'fill',0,0); + $infos[2*$i+1]=new Gtk::Entry(); + $table2->attach($infos[2*$i+1], 1, 2, $i+1, $i+2, 'fill', 'fill',0,0); + $i++; + } + $vbox1->pack_start(new Gtk::HSeparator,0,0,5); + my $bbox1 = new Gtk::HButtonBox; + $vbox1->pack_start($bbox1,0,0,0); + $bbox1->set_layout(-end); + my $button1 = new Gtk::Button "OK"; + $bbox1->add($button1); + my $button2 = new Gtk::Button "Cancel"; + $bbox1->add($button2); $window->show_all(); Gtk->main; |