From beb18298c08a8a6b0d65094b7683cafb21d9e240 Mon Sep 17 00:00:00 2001 From: Daouda Lo Date: Thu, 16 Jan 2003 15:14:29 +0000 Subject: - warn if documentation is not installed --- perl-install/standalone/drakhelp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'perl-install/standalone/drakhelp') diff --git a/perl-install/standalone/drakhelp b/perl-install/standalone/drakhelp index 265ecc83e..9d069ada8 100644 --- a/perl-install/standalone/drakhelp +++ b/perl-install/standalone/drakhelp @@ -9,10 +9,14 @@ use common; use lang; use any; +my $in = interactive->vnew; + my $lang = lang::lang2LANG(lang::read('',$>)) || 'en'; if (!member($lang, qw(de en es fr it ru))) { $lang = 'en' }; my $path_to_help = "/usr/share/doc/mandrake/" . $lang . "/"; +-d $path_to_help or $in->ask_warn('drakhelp', N("Documentation not available. \n Please install package mandrake_doc-%s \n",$lang)); + if ((my $wm = any::running_window_manager()) eq 'kwin') { system("mdklaunchhelp " . $path_to_help . $ARGV[0] . "&"); } else { @@ -21,7 +25,7 @@ if ((my $wm = any::running_window_manager()) eq 'kwin') { sub on_request_help { my ($link) = @_; - my $browser = $ENV{BROWSER} || find { -x "/usr/bin/$_" } qw(mozilla konqueror galeon) or return; + my $browser = $ENV{BROWSER} || find { -x "/usr/bin/$_" } qw(mozilla konqueror galeon) or $in->ask_warn('drakhelp', N("No browser is installed on your system, Please install one if you want to browse the help system")); standalone::explanations("Connection to help system at $link"); system("$browser $link &"); } -- cgit v1.2.1