From 6bc143d880fe9fef836bc5783bf78e917d02fc77 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 15 Feb 2005 18:52:00 +0000 Subject: handle Init signal (look again for daemon if received) --- perl-install/standalone/drakids | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'perl-install/standalone/drakids') diff --git a/perl-install/standalone/drakids b/perl-install/standalone/drakids index e13c57c55..f6ce3c00e 100644 --- a/perl-install/standalone/drakids +++ b/perl-install/standalone/drakids @@ -13,6 +13,16 @@ use Gtk2::SimpleList; use ugtk2 qw(:create :helpers :wrappers); +my $blacklist = Gtk2::SimpleList->new(addr => 'hidden', + N("Date") => 'text', + N("Attacker") => 'text', + N("Attack type") => 'text', + N("Service") => 'text', + N("Network interface") => 'text', + N("Protocol") => 'text', + ); +$blacklist->get_selection->set_mode ('multiple'); + my $activefw = activefw->new(sub { my ($con, $msg) = @_; handle_blacklist($msg->get_args_list) if @@ -24,17 +34,13 @@ my $activefw = activefw->new(sub { $msg->get_interface eq "com.mandrakesoft.activefirewall" && $msg->get_path eq "/com/mandrakesoft/activefirewall" && $msg->get_member eq "Clear"; -}); -my $blacklist = Gtk2::SimpleList->new(addr => 'hidden', - N("Date") => 'text', - N("Attacker") => 'text', - N("Attack type") => 'text', - N("Service") => 'text', - N("Network interface") => 'text', - N("Protocol") => 'text', - ); -$blacklist->get_selection->set_mode ('multiple'); + handle_init() if + $msg->get_interface eq "com.mandrakesoft.activefirewall" && + $msg->get_path eq "/com/mandrakesoft/activefirewall" && + $msg->get_member eq "Init"; +}); +init_blacklist(); my $w = ugtk2->new(N("Active Firewall : Blacklist")); gtkpack($w->{window}, @@ -49,12 +55,15 @@ gtkpack($w->{window}, ]) ]), ])); -init_blacklist(); $w->show; Gtk2->main; ugtk2::exit(0); +sub handle_init { + $activefw->find_daemon; + init_blacklist(); +} sub init_blacklist { my @packets = $activefw->get_blacklist; -- cgit v1.2.1