summaryrefslogtreecommitdiffstats
path: root/logdrake
diff options
context:
space:
mode:
authorYves Duret <yduret@mandriva.com>2002-01-27 20:47:58 +0000
committerYves Duret <yduret@mandriva.com>2002-01-27 20:47:58 +0000
commitc4a9611189c5cac194e3ca4281d8564d6f189d1f (patch)
treecb7e1e8ddc467c18d17f31aff46f4f0799c90de5 /logdrake
parent8b14e5a36bcdbf6b6400728fcb4508c70a32376b (diff)
downloadcontrol-center-c4a9611189c5cac194e3ca4281d8564d6f189d1f.tar
control-center-c4a9611189c5cac194e3ca4281d8564d6f189d1f.tar.gz
control-center-c4a9611189c5cac194e3ca4281d8564d6f189d1f.tar.bz2
control-center-c4a9611189c5cac194e3ca4281d8564d6f189d1f.tar.xz
control-center-c4a9611189c5cac194e3ca4281d8564d6f189d1f.zip
updated, added button in logdrake main screen, bug fix
Diffstat (limited to 'logdrake')
-rwxr-xr-xlogdrake27
1 files changed, 18 insertions, 9 deletions
diff --git a/logdrake b/logdrake
index 6ec6c1f7..58bc1f48 100755
--- a/logdrake
+++ b/logdrake
@@ -65,11 +65,11 @@ if ($::isEmbedded) {
#- parse arguments list.
for (@ARGV) {
/^--version$/ and die 'version: $Id$ '."\n";
- /^--help$/ and die 'logdrake [--version] [--file=myfyle] [--word=myword]';
+ /^--help$/ and die 'logdrake [--version] [--file=myfyle] [--word=myword] [--explain=regexp] [--alert]';
/^--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 };
- /^--alert$/ and do { alert_config(undef, $in); exit; };
+ /^--alert$/ and do { alert_config(); quit(); };
}
$::isTail=1 if ($::isFile);
@@ -205,8 +205,9 @@ gtkadd($window,
createScrolledWindow(my $log_text = new Gtk::Text(undef, undef))
),
0, gtkadd (gtkset_layout(new Gtk::HButtonBox,-end),
+ gtksignal_connect(new Gtk::Button (_("Mail/SMS alert")), clicked => \&alert_config),
gtksignal_connect(new Gtk::Button (_("Save")), clicked => \&save),
- gtksignal_connect(new Gtk::Button ($::isEmbedded ? _("Cancel") : _("Quit")), clicked => sub {$::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0)})
+ gtksignal_connect(new Gtk::Button ($::isEmbedded ? _("Cancel") : _("Quit")), clicked => \&quit)
)
)
@@ -221,6 +222,10 @@ Gtk->main_iteration while Gtk->events_pending;
$::isEmbedded and kill 'USR2', $::CCPID;
Gtk->main;
+sub quit {
+$::isEmbedded ? kill('USR1', $::CCPID) : Gtk->exit(0);
+}
+
#-------------------------------------------------------------
# search functions
#-------------------------------------------------------------
@@ -363,7 +368,7 @@ sub log_output {
#-------------------------------------------------------------
sub alert_config {
- my ($prefix, $in) = @_;
+
$::Wizard_pix_up = "wiz_drakgw.png"; # FIXME
$::Wizard_title = _("Mail/SMS alert");
@@ -381,8 +386,9 @@ my $r= "*** ". chomp_(`date`) . " ***\n";
$::isWizard = 1;
$::Wizard_no_previous = 1;
$in->ask_okcancel(_("Mail/SMS alert configuration"),
- _("Welcome to the mail/SMS configuration utility.\n\nHere, you'll be able to set up \n"
- ), 1);
+ _("Welcome to the mail/SMS configuration utility.\n\nHere, you'll be able to set up \n"),
+ 1) or quit();
+
step_service:
undef $::Wizard_no_previous;
my $l ={
@@ -425,8 +431,8 @@ $r .= "Load is huge: $load\n" if ($load >@ . "$load);\n\n";
{ label => "mail", val => \$mail, type => "bool", text => "mail output" },
{ label => "email", val => \$email, disabled => sub { !$mail; }},
{ label => "smtp ??", val => \$smtp, disabled => sub { !$mail; } },
- { label => "", text => "jjjjjjjjjjj" },
- { label => "sms output", val => \$sms, type => "bool", text => "you need some rpm, and to have set up smsend\nThis service can be unavailable on some countries" },
+ { label => "" },
+ { label => "sms output", val => \$sms, type => "bool", text => "You need to have set up smsend\nThis service can be unavailable on some countries" },
{ label => "smssend output", val => \$smssend , disabled => sub {!$sms;}},
]) or goto step_load;
@@ -452,7 +458,7 @@ sub save {
}
sub print_hello {
- print( "mcdtg !\n" );
+ print "mcdtg !\n";
}
sub get_main_menu {
@@ -502,6 +508,9 @@ sub destroy_window {
# log
# $Log$
+# Revision 1.32 2002/01/27 20:47:58 yduret
+# updated, added button in logdrake main screen, bug fix
+#
# Revision 1.31 2002/01/27 01:58:23 yduret
# added --alert feature
#