diff options
author | Daouda Lo <daouda@mandriva.com> | 2001-03-19 11:08:50 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2001-03-19 11:08:50 +0000 |
commit | 0da9e0fbee3c98e0cf51c4a6f3a2239ad22cc4fc (patch) | |
tree | 4aa19b8a8f9165471cc6f71d3b9c615f12f32a29 | |
parent | 104f598c5c35793fb63d7ad869b34821af25c8cd (diff) | |
download | control-center-0da9e0fbee3c98e0cf51c4a6f3a2239ad22cc4fc.tar control-center-0da9e0fbee3c98e0cf51c4a6f3a2239ad22cc4fc.tar.gz control-center-0da9e0fbee3c98e0cf51c4a6f3a2239ad22cc4fc.tar.bz2 control-center-0da9e0fbee3c98e0cf51c4a6f3a2239ad22cc4fc.tar.xz control-center-0da9e0fbee3c98e0cf51c4a6f3a2239ad22cc4fc.zip |
add rpmdrake
-rwxr-xr-x | control-center3 | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/control-center3 b/control-center3 index f79e90b6..f12266a2 100755 --- a/control-center3 +++ b/control-center3 @@ -144,9 +144,11 @@ map { [_("Display"),'XFdrake-mdk.png',2] , [_("Hardware"),'harddrake-mdk.png',2] , [_("Mouse"), 'mousedrake-mdk.png',2] , [_("Printer"),'printer-mdk.png',2] , [_("Keyboard"), 'keyboard-mdk.png',2], # [_("Users Config"),'item.png',3] , - [_("Connection") , 'draknet-mdk.png',1] , [_("Connection Sharing"),'drakgw-mdk.png',1], - [_("System Menus") , 'menudrake-mdk.png',0], [_("User Menus") , 'menudrake-mdk.png',0] , [_("Services") , 'service-mdk.png' , 0], [_("Fonts"), 'drakfont-mdk.png',0], [_("Date & Time") , 'time-mdk.png',0], -# [_("Root Password") , 'passwd-mdk.png',0] + [_("Internet & Network") , 'draknet-mdk.png',1] , [_("Gateway Config"),'drakgw-mdk.png',1], + [_("System Menus") , 'menudrake-mdk.png',0], [_("User Menus") , 'menudrake-mdk.png',0] , [_("Services") , 'service-mdk.png' , 0], + [_("Fonts"), 'drakfont-mdk.png',0], [_("Date & Time") , 'time-mdk.png',0], + [_("Package Management"), 'harddrake-mdk.png',0] +# [_("Root Password") , 'passwd-mdk.png',0] ); my %tree_exec = (_("Boot Config") => "$_sbindir/drakboot", _("Boot Disk") => "$_xbindir/drakfloppy", @@ -158,6 +160,7 @@ my %tree_exec = (_("Boot Config") => "$_sbindir/drakboot", _("Boot Disk") => "$_ _("Connection Sharing") => "$_sbindir/drakgw" , _("Date & Time") => "$_sbindir/clock.pm", _("User Menus") => "$_bindir/menudrake" , _("Services") => "$_sbindir/drakxservices", _("System Menus") => "$_bindir/menudrake", _("Fonts") => "$_xbindir/drakfont", + _("Package Management") => "$_bindir/rpmdrake", _("Root Password") => "$_sbindir/drakpasswd", # _("Fonts") => "$_xbindir/drakfont" ); @@ -231,6 +234,10 @@ sub gtkcreate_png { } sub quit_global { + foreach(@pid_launched) + { + print "$_\n"; + } kill TERM, @pid_launched; Gtk->exit(0); } @@ -265,11 +272,11 @@ sub splash_warning { my $bbox1 = new Gtk::HButtonBox; $win_about->action_area->pack_start($bbox1,0,0,0); - + my $button = new Gtk::Button(_("Close")); $button->signal_connect_object("clicked",$win_about => 'destroy'); $bbox1->add($button); - + my $lab = new Gtk::Label($label); my $style1 = new Gtk::Style; $win_about->vbox->pack_start( $lab, 1, 1, 0 ); @@ -464,17 +471,19 @@ sub exec_treeitem { }); $socket->realize; # $label->destroy; - my $a = $exec_string . " --embedded " . $socket->window->XWINDOW . " " . $$; - my $pid; - #($pid = fork) ? $pid_launched[$nb_pages] = $pid : system($a) == 0 or splash_warning(_("couldn't exec $a: $!")); - unless ($pid = fork) { - splash_warning(_("cannot fork: $~")) unless defined $pid; - exec("$a"); - } - $pid_launched[$nb_pages] = $pid; - } else { - $notebook_global->set_page($tree_launched{$label}->[0]); - } +my $a = $exec_string . " --embedded " . $socket->window->XWINDOW . " " . $$; +my $pid; +#($pid = fork) ? $pid_launched[$nb_pages] = $pid : system($a) == 0 or splash_warning(_("couldn't exec $a: $!")); +unless ($pid = fork) { + splash_warning(_("cannot fork: $~")) unless defined $pid; +system("$a"); +waitpid(-1,WNOHANG); +} +$pid_launched[$nb_pages] = $pid; + +} else { + $notebook_global->set_page($tree_launched{$label}->[0]); +} } sub item_factory_cb { @@ -487,7 +496,6 @@ sub item_factory_cb { } - sub create_item_factory { if (!defined $item_factory_window) { my ($accel_group, $item_factory, $box1, $label, $box2); |