/usr/share/perl5/ClamTk/Settings.pm is in clamtk 5.20-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | # ClamTk, copyright (C) 2004-2015 Dave M
#
# This file is part of ClamTk (http://code.google.com/p/clamtk/).
#
# ClamTk is free software; you can redistribute it and/or modify it
# under the terms of either:
#
# a) the GNU General Public License as published by the Free Software
# Foundation; either version 1, or (at your option) any later version, or
#
# b) the "Artistic License".
package ClamTk::Settings;
# use strict;
# use warnings;
$| = 1;
use File::Basename 'basename';
use Glib 'TRUE', 'FALSE';
use POSIX 'locale_h';
use Locale::gettext;
sub show_window {
my $top_box = Gtk2::EventBox->new;
my $white = Gtk2::Gdk::Color->new( 0xFFFF, 0xFFFF, 0xFFFF );
$top_box->modify_bg( 'normal', $white );
my $box = Gtk2::VBox->new( FALSE, 0 );
$top_box->add( $box );
my %prefs = ClamTk::Prefs->get_all_prefs();
my $grid = Gtk2::Table->new( 6, 1, FALSE );
$box->pack_start( $grid, FALSE, FALSE, 10 );
$grid->set_col_spacings( 5 );
$grid->set_row_spacings( 5 );
$grid->set_homogeneous( TRUE );
my $option = Gtk2::CheckButton->new_with_label( _( 'Scan for PUAs' ) );
$option->can_focus( FALSE );
$option->set_tooltip_text(
_( 'Detect packed binaries, password recovery tools, and more' ) );
$option->set_active( TRUE ) if ( $prefs{ Thorough } );
$grid->attach_defaults( $option, 0, 1, 0, 1 );
$option->signal_connect(
toggled => sub {
my $btn = shift;
ClamTk::Prefs->set_preference( 'Thorough', $btn->get_active
? 1
: 0 );
}
);
$option = Gtk2::CheckButton->new_with_label(
_( 'Scan files beginning with a dot (.*)' ) );
$option->can_focus( FALSE );
$option->set_tooltip_text( _( 'Scan files typically hidden from view' ) );
$option->set_active( TRUE ) if ( $prefs{ ScanHidden } );
$grid->attach_defaults( $option, 0, 1, 1, 2 );
$option->signal_connect(
toggled => sub {
my $btn = shift;
ClamTk::Prefs->set_preference( 'ScanHidden', $btn->get_active
? 1
: 0 );
}
);
$option = Gtk2::CheckButton->new_with_label(
_( 'Scan files larger than 20 MB' ) );
$option->can_focus( FALSE );
$option->set_tooltip_text(
_( 'Scan large files which are typically not examined' ) );
$option->set_active( TRUE ) if ( $prefs{ SizeLimit } );
$grid->attach_defaults( $option, 0, 1, 2, 3 );
$option->signal_connect(
toggled => sub {
my $btn = shift;
ClamTk::Prefs->set_preference( 'SizeLimit', $btn->get_active
? 1
: 0 );
}
);
$option = Gtk2::CheckButton->new_with_label(
_( 'Scan directories recursively' ) );
$option->can_focus( FALSE );
$option->set_tooltip_text(
_( 'Scan all files and directories within a directory' ) );
$option->set_active( TRUE ) if ( $prefs{ Recursive } );
$grid->attach_defaults( $option, 0, 1, 3, 4 );
$option->signal_connect(
toggled => sub {
my $btn = shift;
ClamTk::Prefs->set_preference( 'Recursive', $btn->get_active
? 1
: 0 );
}
);
$option = Gtk2::CheckButton->new_with_label(
_( 'Check for updates to this program' ) );
$option->can_focus( FALSE );
$option->set_tooltip_text(
_( 'Check online for application and signature updates' ) );
$option->set_active( TRUE ) if ( $prefs{ GUICheck } );
$grid->attach_defaults( $option, 0, 1, 4, 5 );
$option->signal_connect(
toggled => sub {
my $btn = shift;
ClamTk::Prefs->set_preference( 'GUICheck', $btn->get_active
? 1
: 0 );
}
);
$option = Gtk2::CheckButton->new_with_label(
_( 'Double click icons to activate' ) );
$option->can_focus( FALSE );
$option->set_tooltip_text(
_( 'Uncheck this box to activate icons with single click' ) );
$option->set_active( TRUE ) if ( $prefs{ Clickings } == 2 );
$grid->attach_defaults( $option, 0, 1, 5, 6 );
$option->signal_connect(
toggled => sub {
my $btn = shift;
ClamTk::Prefs->set_preference( 'Clickings', $btn->get_active
? 2
: 1 );
}
);
my $infobar = Gtk2::InfoBar->new;
#$box->pack_start( $infobar, FALSE, FALSE, 10 );
$infobar->set_message_type( 'info' );
$infobar->add_button( 'gtk-go-back', -7 );
$infobar->signal_connect(
response => sub {
ClamTk::GUI->swap_button;
ClamTk::GUI->add_default_view;
}
);
$top_box->show_all;
return $top_box;
}
1;
|