diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-26 17:22:44 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-26 17:22:44 +0000 |
commit | 31dc56d85505d45123d0358b85edf1d2a528f2d1 (patch) | |
tree | 150a9ec522a08c985757e0234bffe40900a7ab13 /bin | |
parent | f441597185912699117c028b9c480eca9265fc6f (diff) | |
download | drakguard-31dc56d85505d45123d0358b85edf1d2a528f2d1.tar drakguard-31dc56d85505d45123d0358b85edf1d2a528f2d1.tar.gz drakguard-31dc56d85505d45123d0358b85edf1d2a528f2d1.tar.bz2 drakguard-31dc56d85505d45123d0358b85edf1d2a528f2d1.tar.xz drakguard-31dc56d85505d45123d0358b85edf1d2a528f2d1.zip |
add a hash with dansguardian levels
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/drakguard | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/drakguard b/bin/drakguard index 74a3fa7..6028518 100755 --- a/bin/drakguard +++ b/bin/drakguard @@ -15,6 +15,13 @@ use network::shorewall; use network::squid; use services; +my $dansguardian_file = "/etc/dansguardian/dansguardianf1.conf"; +my %dansguardian_levels = ( + 160 => N_("Low"), + 100 => N_("Normal"), + 50 => N_("High"), +); + my $toolname = 'drakguard'; my $title = N("Parental Control"); my $icon = "IC-control-52"; @@ -64,10 +71,10 @@ gtkadd($w->{window}, gtknew('Label_Left', text_markup => N("Control level"), alignment => [ 0, 0.5 ]), gtknew('ComboBox', - list => [ N_("Low"), N_("Normal"), N_("High") ], + list => [ keys %dansguardian_levels ], text_ref => \$level, sensitive_ref => \$enable, - format => \&translate), + format => sub { translate($dansguardian_levels{$_[0]}) }), ]), 1, gtknew('Label'), 0, gtknew('Title2', label => N("User access")), @@ -165,7 +172,7 @@ sub unwhitelist { sub quit_gui() { Gtk2->main_quit } sub load() { - $level ||= "Normal"; + $level ||= 100; $enable = services::starts_on_boot('dansguardian'); } |