diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-08-13 13:50:28 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-08-13 13:50:28 +0000 |
commit | 67ef9f0900970968b71421ebed01f0da697a4da2 (patch) | |
tree | b0202066f5e92e825cd6b19c2ac3dc704a5b192f /bin | |
parent | 0bb547dd0153812c7ad5828316937dc7b15fe19c (diff) | |
download | drakguard-67ef9f0900970968b71421ebed01f0da697a4da2.tar drakguard-67ef9f0900970968b71421ebed01f0da697a4da2.tar.gz drakguard-67ef9f0900970968b71421ebed01f0da697a4da2.tar.bz2 drakguard-67ef9f0900970968b71421ebed01f0da697a4da2.tar.xz drakguard-67ef9f0900970968b71421ebed01f0da697a4da2.zip |
move time settings in variables
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/drakguard | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/drakguard b/bin/drakguard index 67f179f..707f89f 100755 --- a/bin/drakguard +++ b/bin/drakguard @@ -54,7 +54,7 @@ my %dansguardian_langs = ( my $blacklist_url_file = "/etc/dansguardian/lists/blacklists/drakguard/urls"; my $whitelist_url_file = "/etc/dansguardian/lists/whitelists/drakguard/urls"; -my ($enable, $level, $time_control, $allow_time_change); +my ($enable, $level, $time_control, $time_start_h, $time_start_m, $time_stop_h, $time_stop_m, $allow_time_change); my $shorewall = network::shorewall::read(); my $proxy_port = 3128; my $proxy_user = 'squid'; @@ -144,16 +144,16 @@ gtkadd($w->{window}, 0, gtknew('HBox', sensitive_ref => \$allow_time_change, spacing => 20, children_tight => [ gtknew('Label', text => N("Start:")), gtknew('HBox', spacing => 2, children_tight => [ - gtknew('SpinButton', lower => 0, upper => 24, step_increment => 1, value => 18), + gtknew('SpinButton', lower => 0, upper => 24, step_increment => 1, value => $time_start_h), gtknew('Label', text => ':'), - gtknew('SpinButton', lower => 0, upper => 60, step_increment => 1), + gtknew('SpinButton', lower => 0, upper => 60, step_increment => 1, value => $time_start_m), ]), gtknew('Label'), gtknew('Label', text => N("End:")), gtknew('HBox', spacing => 2, children_tight => [ - gtknew('SpinButton', lower => 0, upper => 24, step_increment => 1, value => 21), + gtknew('SpinButton', lower => 0, upper => 24, step_increment => 1, value => $time_stop_h), gtknew('Label', text => ':'), - gtknew('SpinButton', lower => 0, upper => 60, step_increment => 1), + gtknew('SpinButton', lower => 0, upper => 60, step_increment => 1, value => $time_stop_m), ]), ]) ) : ()), ]), @@ -244,6 +244,11 @@ sub load() { $level = { reverse %dansguardian_levels }->{$guardian->{naughtynesslimit}}; $level ||= { reverse %dansguardian_levels }->{High}; $enable = services::starts_on_boot('dansguardian'); + + $time_start_h //= 18; + $time_start_m //= 0; + $time_stop_h //= 21; + $time_stop_m //= 0; } sub save() { |