diff options
author | damien <damien@mandriva.com> | 2001-03-09 00:06:58 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2001-03-09 00:06:58 +0000 |
commit | 70b76d6a7a67689860d0c702e874202092407791 (patch) | |
tree | ead31a8f5b0baf3a2d26e1b9e2cc564e005fd773 | |
parent | 82e29ed33e5f12fc6a40d278a4acad2cf321d68d (diff) | |
download | drakx-70b76d6a7a67689860d0c702e874202092407791.tar drakx-70b76d6a7a67689860d0c702e874202092407791.tar.gz drakx-70b76d6a7a67689860d0c702e874202092407791.tar.bz2 drakx-70b76d6a7a67689860d0c702e874202092407791.tar.xz drakx-70b76d6a7a67689860d0c702e874202092407791.zip |
changed graphical layout, expert mode
-rwxr-xr-x | perl-install/standalone/draknet | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/perl-install/standalone/draknet b/perl-install/standalone/draknet index e720c2e36..a4ca0ec76 100755 --- a/perl-install/standalone/draknet +++ b/perl-install/standalone/draknet @@ -60,6 +60,7 @@ my $in = vnew interactive('su'); $::isEmbedded && ref($in) =~ /gtk/ or goto dd; require Gtk; init Gtk; +my $expert_mode=0; netconnect::read_net_conf('', $netcnx, $netc); any::setup_thiskind_backend('net', undef); my @all_cards = netconnect::conf_network_card_backend ('', $netc, $intf, undef, undef, undef, undef); @@ -107,6 +108,7 @@ $button_del->signal_connect( clicked => sub { $button_cancel->signal_connect ( clicked => sub { Gtk->main_quit(); }); $bbox_dialog->add($button_cancel); $dialog->show_all; + $dialog->set_modal(1); Gtk->main(); $dialog->destroy; $combo1->entry->set_text((-e "/etc/sysconfig/network-scripts/draknet_conf." . $combo1->entry->get_text) ? $combo1->entry->get_text : "default"); @@ -137,6 +139,7 @@ $button_new->signal_connect( clicked => sub { $button_cancel->signal_connect ( clicked => sub { Gtk->main_quit(); }); $bbox_dialog->add($button_cancel); $dialog->show_all; + $dialog->set_modal(1); Gtk->main(); $dialog->destroy; $combo1->entry->set_text((-e "/etc/sysconfig/network-scripts/draknet_conf." . $netcnx->{PROFILE}) ? $netcnx->{PROFILE} : "default"); @@ -188,8 +191,7 @@ $button1->signal_connect( clicked => [ \&configure_net, '', $netcnx, $netc, $int $hbox_frame1_button->pack_start($button1, 0, 0, 0); $vbox_frame1->pack_start($hbox_frame1_button,0,0,0); -my $separator2 = new Gtk::HSeparator; -$vbox1->pack_start($separator2,1,1,5); +$vbox1->pack_start(new Gtk::HSeparator,1,1,5); my $frame2 = new Gtk::Frame (_("LAN configuration")); $vbox1->pack_start($frame2,1,1,0); @@ -224,6 +226,33 @@ $button3->signal_connect( clicked => [ \&configure_lan, '', $netcnx, $netc, $int $hbox3->pack_start($button3, 0, 0, 0); $vbox2->pack_start($hbox3, 0, 0, 0); +$vbox1->pack_start(new Gtk::HSeparator,1,1,5); + +my $frame3 = new Gtk::Frame (_("Actions")); +$vbox1->pack_start($frame3,1,1,0); +my $bbox0 = new Gtk::HButtonBox; +$frame3->add($bbox0); +$bbox0->set_layout(-start); +$bbox0->set_border_width(5); +my $button_wizard = new Gtk::Button "Configure with Wizard..."; +$button_wizard->signal_connect ( clicked => sub { + $::isWizard = 1; + system("draknet --wizard"); +# netconnect::intro('', $netcnx, $in, sub { $in->standalone::pkgs_install(@_) }); + $combo1->entry->set_text((-e "/etc/sysconfig/network-scripts/draknet_conf." . $combo1->entry->get_text) ? $combo1->entry->get_text : "default"); + netconnect::load_conf('', $netcnx, $netc, $intf); + update(); + }); +$bbox0->add($button_wizard ); +my $button_expert = new Gtk::Button "Switch to Expert Mode"; +$button_expert->signal_connect ( clicked => sub { + foreach($button1, $button3) { $expert_mode ? $_->hide() : $_->show() } + $button_expert->child->set($expert_mode ? "Switch to Expert Mode" : "Switch to Normal Mode"); + $expert_mode = !$expert_mode; + }); +$bbox0->add($button_expert ); + +$vbox1->pack_start(new Gtk::HSeparator,1,1,5); # my $label9 = new Gtk::Label(_("Network adaptater 1 (eth0):")); # $table2->attach($label9, 0, 1, 0, 1, 'fill', 'fill',0,0); @@ -243,16 +272,6 @@ $vbox1->pack_start($bbox1,0,0,0); $bbox1->set_layout(-end); $bbox1->set_border_width(5); -my $button_wizard = new Gtk::Button "Wizard..."; -$button_wizard->signal_connect ( clicked => sub { - $::isWizard = 1; - system("draknet --wizard"); -# netconnect::intro('', $netcnx, $in, sub { $in->standalone::pkgs_install(@_) }); - $combo1->entry->set_text((-e "/etc/sysconfig/network-scripts/draknet_conf." . $combo1->entry->get_text) ? $combo1->entry->get_text : "default"); - netconnect::load_conf('', $netcnx, $netc, $intf); - update(); - }); -$bbox1->add($button_wizard ); my $button_ok = new Gtk::Button "OK"; $button_ok->signal_connect ( clicked => sub { my $dialog = new Gtk::Dialog(); @@ -292,6 +311,7 @@ $combo1->entry->signal_connect( 'changed', sub { }); $window1->show_all(); +$_->hide foreach ($button1, $button3); Gtk->main_iteration while Gtk->events_pending; $::isEmbedded and kill USR2, $::CCPID; Gtk->main; @@ -479,8 +499,8 @@ sub configure_net { [_("Password"), \$cnx->{passwd} ], [_("Authentication"), \$cnx->{auth}, [ _("PAP"), _("Terminal-based"), _("Script-based") ] ], [_("Domain name"), \$cnx->{domain} ], - [_("First DNS Server"), \$cnx->{dns1} ], - [_("Second DNS Server"), \$cnx->{dns2} ], + [_("First DNS Server (optional)"), \$cnx->{dns1} ], + [_("Second DNS Server (optional)"), \$cnx->{dns2} ], [_("Ethernet Card"), \$netc->{NET_DEVICE}, [ 'eth0', 'eth1', 'eth2', 'eth3', 'eth4', 'eth5','eth6', 'eth7', 'eth8', 'eth9' ]], [_("DHCP Client"), \$netcnx->{dhcp_client}, ["dhcpcd", "dhcpxd", "dhcp-client"] ] ); |