diff options
author | Yves Duret <yduret@mandriva.com> | 2002-01-26 20:42:30 +0000 |
---|---|---|
committer | Yves Duret <yduret@mandriva.com> | 2002-01-26 20:42:30 +0000 |
commit | 6e9e1b15bdf50173ea78b3dbc614f5d92b3f57b6 (patch) | |
tree | c71172bf0fb157950a00d7ac328e6ab2d4c7a725 /logdrake | |
parent | d5d5582ad5a872d2dac33a915265c157df47bfe5 (diff) | |
download | control-center-6e9e1b15bdf50173ea78b3dbc614f5d92b3f57b6.tar control-center-6e9e1b15bdf50173ea78b3dbc614f5d92b3f57b6.tar.gz control-center-6e9e1b15bdf50173ea78b3dbc614f5d92b3f57b6.tar.bz2 control-center-6e9e1b15bdf50173ea78b3dbc614f5d92b3f57b6.tar.xz control-center-6e9e1b15bdf50173ea78b3dbc614f5d92b3f57b6.zip |
--explain= feature
Diffstat (limited to 'logdrake')
-rwxr-xr-x | logdrake | 38 |
1 files changed, 35 insertions, 3 deletions
@@ -23,8 +23,9 @@ use POSIX; use Gtk; use lib qw(/usr/lib/libDrakX); +use standalone; #- warning, standalone must be loaded very first, for 'explanations' + use interactive; -use standalone; use any; use Config; init Gtk; @@ -65,6 +66,7 @@ if ($::isEmbedded) { for (@ARGV) { /^--version$/ and die 'version: $Id$ '."\n"; /^--help$/ and die 'logdrake [--version] [--file=myfyle] [--word=myword]'; + /^--explain=(.*)$/ and do { $::isExplain = ($::Explain) = $1; $::isFile=1; $::File="/var/log/explanations"; next }; /^--file=(.*)$/ and do { $::isFile = ($::File) = $1; next }; /^--word=(.*)$/ and do { $::isWord = ($::Word) = $1; next }; } @@ -111,6 +113,22 @@ my $menubar = get_main_menu( $window ); my $n = Gtk::Gdk::Font->fontset_load(_("-misc-fixed-medium-r-*-*-*-100-*-*-*-*-*-*,*")); my $b = Gtk::Gdk::Font->fontset_load(_("-misc-fixed-bold-r-*-*-*-100-*-*-*-*-*-*,*")); +#$black = "\033[30m"; +#$red = "\033[31m"; +#$green = "\033[32m"; +#$yellow = "\033[33m"; +#$blue = "\033[34m"; +#$magenta = "\033[35m"; +#$purple = "\033[35m"; +#$cyan = "\033[36m"; +#$white = "\033[37m"; +#$darkgray = "\033[30m"; +#$col_norm = "\033[00m"; +#$col_background = "\033[07m"; +#$col_brighten = "\033[01m"; +#$col_underline = "\033[04m"; +#$col_blink = "\033[05m"; + my $white = my_gtk::gtkcolor(50400, 655, 20000); my $black = my_gtk::gtkcolor(0, 0, 0); my $red = my_gtk::gtkcolor(0xFFFF, 655, 655); @@ -149,7 +167,8 @@ my %files = ( "auth" => { file => "/var/log/auth.log", desc => _("authentification") }, "user" => { file => "/var/log/user.log", desc => _("user") }, "messages" => { file => "/var/log/messages", desc => _("messages") }, - "syslog" => { file => "/var/log/syslog", desc => _("syslog") } + "syslog" => { file => "/var/log/syslog", desc => _("syslog") }, + "explanations" => { file => "/var/log/explanations", desc => _("Mandrake Tools Explanations")} ); #### far from window @@ -165,7 +184,6 @@ gtkadd($window, " " . _("but not matching") . " ", $e_no = new Gtk::Entry() ) ), - # _("tips: you can use OR"), gtkpack_(new Gtk::HBox(0,0), 1, gtkadd(gtkset_border_width(new Gtk::Frame(_("Choose file")),2), gtkpack (gtkset_border_width(new Gtk::VBox(0,0),0), @@ -244,6 +262,17 @@ sub parse_file { } my @all=catMaybeCompressed ($file); + + if ($isExplain) { + my @t, $t; + while (@all) { + $t = pop @all; + last if !($t =~ /$Explain/); + push @t, $t; + } + @all=reverse @t; + } + my $taille= @all; foreach (@all) { $i++; @@ -391,6 +420,9 @@ sub destroy_window { # log # $Log$ +# Revision 1.30 2002/01/26 20:42:30 yduret +# --explain= feature +# # Revision 1.29 2001/09/15 15:44:22 siegel # added missing space in "matching" line # |