summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-06-11 16:03:10 +0000
committerdamien <damien@mandriva.com>2001-06-11 16:03:10 +0000
commit95ff7bc93e23c8ed4f216ca5a69a8f9cfbf5c884 (patch)
tree8cbb3e82d7c15d3d5ed4bd7a98841db0b178e364
parentd6f47e29221b0fb0c2248d47f0cc21031d5e330b (diff)
downloaddrakx-backup-do-not-use-95ff7bc93e23c8ed4f216ca5a69a8f9cfbf5c884.tar
drakx-backup-do-not-use-95ff7bc93e23c8ed4f216ca5a69a8f9cfbf5c884.tar.gz
drakx-backup-do-not-use-95ff7bc93e23c8ed4f216ca5a69a8f9cfbf5c884.tar.bz2
drakx-backup-do-not-use-95ff7bc93e23c8ed4f216ca5a69a8f9cfbf5c884.tar.xz
drakx-backup-do-not-use-95ff7bc93e23c8ed4f216ca5a69a8f9cfbf5c884.zip
perlised
-rwxr-xr-xperl-install/standalone/drakproxy94
1 files changed, 32 insertions, 62 deletions
diff --git a/perl-install/standalone/drakproxy b/perl-install/standalone/drakproxy
index 1bd02ac77..127edaf67 100755
--- a/perl-install/standalone/drakproxy
+++ b/perl-install/standalone/drakproxy
@@ -20,7 +20,7 @@ use interactive;
use standalone;
use log;
use c;
-# use netconnect;
+use proxy;
# use detect_devices;
$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/;
@@ -35,72 +35,42 @@ $::Wizard_title = _("Proxy handling");
my $in = interactive::vnew('su', 'default');
-pur_gtk_mode() if $::isEmbedded && ref($in) =~ /gtk/;
-
-begin:
-
-$::Wizard_no_previous = 1;
-
-$in->ask_okcancel(_("Proxy configuration"), _("blabla proxy"), 1) or quit_global($in, 0);
-
-my $url = $in->ask_from_entry($url, _("foo"), _("url"));
-print STDERR $url, "\n";
-
-undef $::Wizard_no_previous;
-
-log::l("[drakproxy] Installation complete, exiting\n");
-quit_global($in, 0);
-
-sub quit_global {
- my ($in, $exitcode) = @_;
- $in->exit($exitcode);
- goto begin
+if ($::isEmbedded && ref($in) =~ /gtk/) {
+ proxy::main('', $in, sub { $in->standalone::pkgs_install(@_) });
+ $in->exit(0);
}
-sub pur_gtk_mode
-{
- require Gtk;
- init Gtk;
- my $window1 = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel;
- $window1->signal_connect ( delete_event => sub { Gtk->exit(0); });
- $window1->set_position(1);
- $window1->set_title(_("Proxy configuration"));
- $window1->border_width(10);
- my $vbox1 = new Gtk::VBox(0,0);
- $window1->add($vbox1);
- my $hbox1 = new Gtk::HBox(0,0);
- $vbox1->pack_start($hbox1,1,1,0);
- my $label1 = new Gtk::Label(
-_("Welcome to the Proxy Connection utility!
-
-Click on Configure to launch the setup wizard."));
- $hbox1->pack_start($label1,1,1,0);
- my $hbox2 = new Gtk::HBox(0,0);
- $vbox1->pack_start($hbox2,1,1,0);
-
- my $bbox1 = new Gtk::HButtonBox;
- $vbox1->pack_start($bbox1,0,0,0);
- $bbox1->set_layout(-end);
- my $button_conf = new Gtk::Button _("Configure");
- $button_conf->signal_connect ( clicked => sub {
- system("/usr/sbin/drakgw --wizard");
- });
- $bbox1->add($button_conf);
- my $button_cancel = new Gtk::Button _("Cancel");
- $button_cancel->signal_connect ( clicked => sub {
- kill(USR1, $::CCPID);
- });
- $bbox1->add($button_cancel);
- $window1->show_all();
- Gtk->main_iteration while Gtk->events_pending;
- $::isEmbedded and kill USR2, $::CCPID;
- Gtk->main;
- Gtk->exit(0);
-
-}
+# pure gtk_mode
+my $window1 = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel;
+$window1->signal_connect ( delete_event => sub { Gtk->exit(0); });
+$window1->set_position(1);
+$window1->set_title(_("Proxy configuration"));
+$window1->border_width(10);
+gtkadd($window1,
+ gtkpack_(new Gtk::VBox(0,0),
+ 1, gtkpack(new Gtk::HBox(0,0),
+ new Gtk::Label _("Welcome to the Proxy Connection utility
+
+Click on Configure to launch the setup wizard."),
+ )
+ 1, gtkpack(my $hbox2 = new Gtk::HBox(0,0),),
+ 0, gtkadd(gtkset_layout(new Gtk::HButtonBox, -end),
+ gtksignal_connect(new Gtk::Button _("Configure"), clicked => sub { system ("/usr/sbin/drakgw --wizard") }),
+ gtksignal_connect(new Gtk::Button _("Cancel"), clicked => sub { kill(USR1, $::CCPID) }),
+ )
+ )
+ );
+
+Gtk->main_iteration while Gtk->events_pending;
+$::isEmbedded and kill USR2, $::CCPID;
+Gtk->main;
+Gtk->exit(0);
#-------------------------------------------------
#- $Log$
+#- Revision 1.2 2001/06/11 16:03:10 damien
+#- perlised
+#-
#- Revision 1.1 2001/06/11 15:22:41 odin
#- first import of drakproxy
#-