diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-01-27 08:19:46 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-01-27 08:19:46 +0000 |
commit | b88e847b6be10ab51907b3e534ca9fddb2c1ed3f (patch) | |
tree | cb4ad737c34b7869ec72344d73709a99dfc71c86 | |
parent | f30d8a46228b0a8fc1332638371ff513a35bc262 (diff) | |
download | control-center-b88e847b6be10ab51907b3e534ca9fddb2c1ed3f.tar control-center-b88e847b6be10ab51907b3e534ca9fddb2c1ed3f.tar.gz control-center-b88e847b6be10ab51907b3e534ca9fddb2c1ed3f.tar.bz2 control-center-b88e847b6be10ab51907b3e534ca9fddb2c1ed3f.tar.xz control-center-b88e847b6be10ab51907b3e534ca9fddb2c1ed3f.zip |
fix program path when non embedded
-rwxr-xr-x | control-center | 93 |
1 files changed, 47 insertions, 46 deletions
diff --git a/control-center b/control-center index 7eaf9983..21365985 100755 --- a/control-center +++ b/control-center @@ -229,30 +229,30 @@ my @tree = [ N("Server Configuration"), 'wizard-mdk', [ (map { - my ($id, $wizard, $icon, $description) = @$_; - my $path = "/usr/share/wizards/".$wizard."_wizard/"."$wizard".".wiz"; + my ($id, $wizard, $icon, $description) = @$_; + my $path = "/usr/share/wizards/".$wizard."_wizard/"."$wizard".".wiz"; if (-e $path) { - $exec_hash->{$id} = [ "drakwizard", "$sbindir/drakwizard $path", -1, $description ]; - [ $id, $icon ]; - } else { - (); - } - } (# [ id, wizard file name, icon, description ] - [ "DHCP wizard", "dhcp", 'server-mdk', N("The DHCP wizard will help you configuring the DHCP services of your server") ], - [ "DNS Client wizard", "client", 'server-mdk', N("The DNS Client wizard will help you in adding a new client in your local DNS") ], - [ "DNS wizard", "dns", 'server-mdk', N("The DNS wizard will help you configuring the DNS services of your server.") ], - [ "Firewall wizard", "firewall", 'server-mdk', N("The Firewall wizard will help you configuring your server firewall that will protects your internal network from unauthorized accesses from the Internet") ], #NEW - [ "FTP wizard", "ftp", 'ftp-mdk', N("The FTP wizard will help you configuring the FTP Server for your network") ], - [ "News wizard", "news", 'news-mdk', N("The News wizard will help you configuring the Internet News services for your network") ], - [ "NFS wizard", "nfs", 'news-mdk', N("The NFS wizard will help you configuring the NFS Server for your network") ], #NEW - [ "Postfix wizard", "postfix", 'postfix-mdk', N("The Postfix wizard will help you configuring the Internet Mail services for your network") ], - [ "Squid wizard", "proxy", 'web-mdk', N("The Proxy wizard will help you configuring a web caching proxy server") ], - [ "Samba wizard", "samba", 'diskdrake_samba', N("The Samba wizard will help you configuring your server to behave as a file and print server for workstations running non-Linux systems") ], - [ "Server wizard", "server", 'diskdrake_samba', N("The Server wizard will help you configuring the basic networking services of your server") ], #NEW - [ "Time wizard", "time", 'time-mdk', N("The Time wizard will help you to set the time of your server synchronized with an external time server") ], - [ "Web wizard", "web", 'web-mdk', N("The Web wizard will help you configuring the Web Server for your network") ] - ) - ) + $exec_hash->{$id} = [ "drakwizard", "$sbindir/drakwizard $path", -1, $description ]; + [ $id, $icon ]; + } else { + (); + } + } (# [ id, wizard file name, icon, description ] + [ "DHCP wizard", "dhcp", 'server-mdk', N("The DHCP wizard will help you configuring the DHCP services of your server") ], + [ "DNS Client wizard", "client", 'server-mdk', N("The DNS Client wizard will help you in adding a new client in your local DNS") ], + [ "DNS wizard", "dns", 'server-mdk', N("The DNS wizard will help you configuring the DNS services of your server.") ], + [ "Firewall wizard", "firewall", 'server-mdk', N("The Firewall wizard will help you configuring your server firewall that will protects your internal network from unauthorized accesses from the Internet") ], #NEW + [ "FTP wizard", "ftp", 'ftp-mdk', N("The FTP wizard will help you configuring the FTP Server for your network") ], + [ "News wizard", "news", 'news-mdk', N("The News wizard will help you configuring the Internet News services for your network") ], + [ "NFS wizard", "nfs", 'news-mdk', N("The NFS wizard will help you configuring the NFS Server for your network") ], #NEW + [ "Postfix wizard", "postfix", 'postfix-mdk', N("The Postfix wizard will help you configuring the Internet Mail services for your network") ], + [ "Squid wizard", "proxy", 'web-mdk', N("The Proxy wizard will help you configuring a web caching proxy server") ], + [ "Samba wizard", "samba", 'diskdrake_samba', N("The Samba wizard will help you configuring your server to behave as a file and print server for workstations running non-Linux systems") ], + [ "Server wizard", "server", 'diskdrake_samba', N("The Server wizard will help you configuring the basic networking services of your server") ], #NEW + [ "Time wizard", "time", 'time-mdk', N("The Time wizard will help you to set the time of your server synchronized with an external time server") ], + [ "Web wizard", "web", 'web-mdk', N("The Web wizard will help you configuring the Web Server for your network") ] + ) + ) ] ]), ); @@ -304,7 +304,7 @@ my ($menu, $factory) = create_factory_menu($window_global, { path => N("/_Themes").N("/_More themes"), callback => \&more_themes } ), { path => N("/_Help"), type => '<Branch>' }, - { path => N("/_Help").N("/_"), callback => sub { fork_("drakhelp Starter.html/control-center.html") } }, + { path => N("/_Help").N("/_"), callback => sub { fork_("drakhelp Starter.html/control-center.html") } }, { path => N("/_Help").N("/_Report Bug"), callback => sub { fork_("drakbug --report drakconf &") } }, { path => N("/_Help").N("/_About..."), callback => \&about_mdk_cc } )); @@ -437,7 +437,7 @@ foreach (@tree) { unless ($dbl_area_left[$curr_state]) { my $extra = $curr_state == 1 ? $scale : 0; my $window = $darea_left->window; -# return unless $window; +# return unless $window; my $lspacing = $lspacing[$curr_state]; $dbl_area_left[$curr_state] = Gtk2::Gdk::Pixmap->new($window, $d_width, $d_height, $window->get_depth); my $gc = $darea_left->style->fg_gc('normal'); @@ -497,23 +497,23 @@ foreach (@tree) { # Create right notebook pages : my $tbl = create_packtable({ col_spacings => $spacing, row_spacings => $spacing, homogeneous => 1 }, - group_by2(map { - my ($label, $tag) = @$_; - my $text = $exec_hash->{$label}[3]; - die "$label 's icon is missing" unless $exec_hash->{$label}; - my $event_box = gtkadd(Gtk2::EventBox->new(), my $icon = gtkcreate_img($tag)); - $event_box->set_events([ 'enter_notify_mask', 'leave_notify_mask', 'button_press_mask', 'button_release_mask' ]); - # FIXME: do ->set_pixbuf() on {enter,leave}_events - $event_box->signal_connect(realize => sub { $event_box->window->set_cursor($cursor_hand) }); - $event_box->signal_connect(button_release_event => sub { compute_exec_string($tag, @{$exec_hash->{$label}}) }); - - # FIXME : resize sig: ->foreach; set_size_request - my $hbox_spacing = 10; - gtkpack_(Gtk2::HBox->new(0, $hbox_spacing), - 0, $event_box, - 1, gtktext_insert(Gtk2::TextView->new, [ [ $text, {'background_set' => 0, 'background_stipple_set' => 0 } ] ]) - ); - } @$subtree)); + group_by2(map { + my ($label, $tag) = @$_; + my $text = $exec_hash->{$label}[3]; + die "$label 's icon is missing" unless $exec_hash->{$label}; + my $event_box = gtkadd(Gtk2::EventBox->new(), my $icon = gtkcreate_img($tag)); + $event_box->set_events([ 'enter_notify_mask', 'leave_notify_mask', 'button_press_mask', 'button_release_mask' ]); + # FIXME: do ->set_pixbuf() on {enter,leave}_events + $event_box->signal_connect(realize => sub { $event_box->window->set_cursor($cursor_hand) }); + $event_box->signal_connect(button_release_event => sub { compute_exec_string($tag, @{$exec_hash->{$label}}) }); + + # FIXME : resize sig: ->foreach; set_size_request + my $hbox_spacing = 10; + gtkpack_(Gtk2::HBox->new(0, $hbox_spacing), + 0, $event_box, + 1, gtktext_insert(Gtk2::TextView->new, [ [ $text, {'background_set' => 0, 'background_stipple_set' => 0 } ] ]) + ); + } @$subtree)); $notebook_global->append_page(my $w_ret = create_scrolled_window($tbl, undef, 'none')); # $w_ret->vscrollbar->set_size_request(19, undef); @@ -539,9 +539,9 @@ $emb_box->set_size_request(-1, $index * 50); eval { if (defined $show_log_check_box) { - $show_log_check_box->set_active($show_logs); - $embedded_check_box->set_active($embedded); - $expert_wizard_check_box->set_active($expert_wizard); + $show_log_check_box->set_active($show_logs); + $embedded_check_box->set_active($embedded); + $expert_wizard_check_box->set_active($expert_wizard); }; }; print STDERR "BUG with LANGUAGE $ENV{LANGUAGE}\n" if $@; @@ -637,7 +637,8 @@ sub fork_ { sub compute_exec_string { my ($icon, $log_exp, $exec_, $gtkplug, undef, $alternate) = @_; #($_[0], @{$_[1]}); - my $exec = $exec_ . " --summary" if $expert_wizard && $exec_ =~ /drakwizard/; + my $exec = $exec_; + $exec .= " --summary" if $expert_wizard && $exec_ =~ /drakwizard/; if ($embedded) { if ($gtkplug != -1) { # not explicitely not embedded $notebook_global->hide; |