summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-04-16 03:52:58 +0000
committerdamien <damien@mandriva.com>2001-04-16 03:52:58 +0000
commit5b48c1cd8211fdb5ade5cca4c98a9f14a5af5a8d (patch)
tree1f4a494e0273d8a1a06da1509653b05df68af008
parentd3eadfbba415ef48e28706c293094c1230522499 (diff)
downloaddrakx-5b48c1cd8211fdb5ade5cca4c98a9f14a5af5a8d.tar
drakx-5b48c1cd8211fdb5ade5cca4c98a9f14a5af5a8d.tar.gz
drakx-5b48c1cd8211fdb5ade5cca4c98a9f14a5af5a8d.tar.bz2
drakx-5b48c1cd8211fdb5ade5cca4c98a9f14a5af5a8d.tar.xz
drakx-5b48c1cd8211fdb5ade5cca4c98a9f14a5af5a8d.zip
updated expert mode
-rwxr-xr-xperl-install/standalone/draknet88
1 files changed, 66 insertions, 22 deletions
diff --git a/perl-install/standalone/draknet b/perl-install/standalone/draknet
index 99a2a8f9a..98a270f7a 100755
--- a/perl-install/standalone/draknet
+++ b/perl-install/standalone/draknet
@@ -252,7 +252,7 @@ $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);
+$vbox1->pack_start(new Gtk::HSeparator,1,1,5);
my $bbox0 = new Gtk::HButtonBox;
$vbox1->pack_start($bbox0,0,0,0);
@@ -270,21 +270,35 @@ $button_wizard->signal_connect ( clicked => sub {
});
$bbox0->add($button_wizard );
+$vbox1->pack_start(new Gtk::HSeparator,1,1,5);
+
+my $bbox1 = new Gtk::HButtonBox;
+$vbox1->pack_start($bbox1,0,0,0);
+$bbox1->set_layout(-end);
+#$bbox1->set_border_width(5);
+
my $button_expert = new Gtk::Button _("Expert Mode");
$button_expert->signal_connect ( clicked => sub {
foreach($button1, $button3) { $expert_mode ? $_->hide() : $_->show() }
$button_expert->child->set($expert_mode ? _("Expert Mode") : _("Normal Mode"));
$expert_mode = !$expert_mode;
});
-$bbox0->add($button_expert );
-
-$vbox1->pack_start(new Gtk::HSeparator,1,1,5);
+$bbox1->add($button_expert );
-my $bbox1 = new Gtk::HButtonBox;
-$vbox1->pack_start($bbox1,0,0,0);
-$bbox1->set_layout(-end);
-#$bbox1->set_border_width(5);
+my $button_apply = new Gtk::Button _("Apply");
+$button_apply->signal_connect ( clicked => sub {
+ apply();
+ });
+$button_apply->set_sensitive(0);
+$bbox1->add($button_apply);
+my $button_cancel = new Gtk::Button _("Cancel");
+$button_cancel->signal_connect ( clicked => sub {
+ $combo1->entry->set_text($old_profile);
+ update();
+ quit_global();
+ });
+$bbox1->add($button_cancel);
my $button_ok = new Gtk::Button _("OK");
$button_ok->signal_connect ( clicked => sub {
my $dialog = new Gtk::Dialog();
@@ -296,25 +310,11 @@ $button_ok->signal_connect ( clicked => sub {
$dialog->show_all;
Gtk->main_iteration while Gtk->events_pending;
apply();
- system("$prefix/etc/rc.d/init.d/network $_") foreach "stop", "start";
$dialog->destroy;
update();
quit_global();
});
$bbox1->add($button_ok);
-my $button_apply = new Gtk::Button _("Apply");
-$button_apply->signal_connect ( clicked => sub {
- apply();
- });
-$button_apply->set_sensitive(0);
-$bbox1->add($button_apply);
-my $button_cancel = new Gtk::Button _("Cancel");
-$button_cancel->signal_connect ( clicked => sub {
- $combo1->entry->set_text($old_profile);
- update();
- quit_global();
- });
-$bbox1->add($button_cancel);
$combo1->entry->signal_connect( 'changed', sub {
netconnect::set_profile('', $netcnx, $combo1->entry->get_text());
netconnect::load_conf('', $netcnx, $netc, $intf);
@@ -342,6 +342,7 @@ sub apply {
netconnect::save_conf('', $netcnx, $netc, $intf);
network::configureNetwork2($prefix, $netc, $intf, \&standalone::pkgs_install);
$netcnx->{type} =~ /adsl/ or system("/sbin/chkconfig --del adsl 2> /dev/null");
+ system("$prefix/etc/rc.d/init.d/network $_") foreach "stop", "start";
$button_apply->set_sensitive(0);
}
@@ -379,6 +380,28 @@ sub configure_lan {
my @infos;
my @conf_data;
+ if ($all_cards < 1) {
+ my $dialog = new Gtk::Dialog();
+ $dialog->set_position(1);
+ $dialog->vbox->set_border_width(10);
+ $dialog->signal_connect ( delete_event => sub { Gtk->main_quit(); });
+ $dialog->vbox->pack_start(new Gtk::Label(_("You don't any configured interface.
+Configure them first by clicking on 'Configure'")),1,1,0);
+ my $bbox_dialog = new Gtk::HButtonBox;
+ $dialog->action_area->add($bbox_dialog);
+ $bbox_dialog->set_layout(-end);
+ my $button_ok = new Gtk::Button _("OK");
+ $button_ok->signal_connect ( clicked => sub {
+ Gtk->main_quit();
+ });
+ $bbox_dialog->add($button_ok );
+ $dialog->show_all;
+ $dialog->set_modal(1);
+ Gtk->main();
+ $dialog->destroy;
+ return;
+ }
+
$window->set_policy (1, 1, 1);
$window->signal_connect ( delete_event => sub { Gtk->main_quit; });
$window->set_position(1);
@@ -470,6 +493,27 @@ sub configure_lan {
sub configure_net {
my (undef, $prefix, $netcnx, $netc, $intf) = @_;
+ if (!$netcnx->{type}) {
+ my $dialog = new Gtk::Dialog();
+ $dialog->set_position(1);
+ $dialog->vbox->set_border_width(10);
+ $dialog->signal_connect ( delete_event => sub { Gtk->main_quit(); });
+ $dialog->vbox->pack_start(new Gtk::Label(_("You don't have any internet connection.
+Create one first by clicking on 'Configure'")),1,1,0);
+ my $bbox_dialog = new Gtk::HButtonBox;
+ $dialog->action_area->add($bbox_dialog);
+ $bbox_dialog->set_layout(-end);
+ my $button_ok = new Gtk::Button _("OK");
+ $button_ok->signal_connect ( clicked => sub {
+ Gtk->main_quit();
+ });
+ $bbox_dialog->add($button_ok );
+ $dialog->show_all;
+ $dialog->set_modal(1);
+ Gtk->main();
+ $dialog->destroy;
+ return;
+ }
my $cnx={};
my @infos;
$cnx=$netcnx->{$netcnx->{type}};