summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakconnect
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-11-21 10:57:28 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-11-21 10:57:28 +0000
commitd0bc1a61790e16d4499b80539cf1561a45c75daf (patch)
treee9c4dc8f8dc7e30d15acd7e063214b440476f37f /perl-install/standalone/drakconnect
parent584e9c0f4dba22cb924a1bd407c247fe83b1629f (diff)
downloaddrakx-d0bc1a61790e16d4499b80539cf1561a45c75daf.tar
drakx-d0bc1a61790e16d4499b80539cf1561a45c75daf.tar.gz
drakx-d0bc1a61790e16d4499b80539cf1561a45c75daf.tar.bz2
drakx-d0bc1a61790e16d4499b80539cf1561a45c75daf.tar.xz
drakx-d0bc1a61790e16d4499b80539cf1561a45c75daf.zip
switch latest tools that still manually handle embedding
to use my_gtk
Diffstat (limited to 'perl-install/standalone/drakconnect')
-rwxr-xr-xperl-install/standalone/drakconnect26
1 files changed, 13 insertions, 13 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index 7d5f5ac36..b8f880371 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -60,8 +60,6 @@ MDK::Common::Globals::init(
);
$::isEmbedded && ref($in) =~ /gtk/ or goto dd;
-require Gtk;
-init Gtk;
require my_gtk;
import my_gtk qw(:helpers :wrappers);
my $expert_mode = 0;
@@ -70,14 +68,16 @@ any::load_category_no_message('net', undef);
my @all_cards = network::ethernet::conf_network_card_backend ($netc, $intf, undef, undef, undef, undef);
network::netconnect::load_conf($netcnx, $netc, $intf);
-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(N("Network configuration (%d adapters)", @all_cards));
-$window1->border_width(10);
-$::isEmbedded or $window1->set_usize(500, 400);
+my $window1 = my_gtk->new('drakconnect');
+$window1->{rwindow}->signal_connect (delete_event => sub { my_gtk->exit(0) });
+unless ($::isEmbedded) {
+ $window1->{rwindow}->set_position(1);
+ $window1->{rwindow}->set_title(N("Network configuration (%d adapters)", @all_cards));
+ $window1->{rwindow}->set_usize(500, 400);
+}
+$window1->{rwindow}->border_width(10);
my $vbox1 = new Gtk::VBox(0,10);
-$window1->add($vbox1);
+$window1->{rwindow}->add($vbox1);
my $hbox1 = new Gtk::HBox(0,0);
$vbox1->pack_start($hbox1,0,0,0);
$hbox1->pack_start(new Gtk::Label(N("Profile: ")),0,0,0);
@@ -316,13 +316,13 @@ $combo1->entry->signal_connect('changed', sub {
$button_apply->set_sensitive(1);
});
-$window1->show_all();
+$window1->{rwindow}->show_all();
$_->hide foreach ($button1, $button3);
Gtk->main_iteration while Gtk->events_pending;
$::isEmbedded and kill 'USR2', $::CCPID;
my $tag = Gtk->timeout_add(4000, \&update2);
-Gtk->main;
-Gtk->exit(0);
+$window1->main;
+my_gtk->exit(0);
dd:
network::netconnect::intro('', $netcnx, $in);
@@ -410,7 +410,7 @@ sub update2 {
}
sub quit_global {
- $::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0);
+ my_gtk->exit(0);
}
sub configure_lan {