l_acc_gtls_pri => _('GnuTLS priority'),
h_acc_gtls_pri => _('Value to use as GnuTLS priority string if custom priority check is enabled. Otherwise this value is ignored.'),
+ l_plu_gpg_alimit => _('Autocompletion limit'),
+ h_plu_gpg_alimit => _('Limits the number of addresses obtained from from keyring through autocompletion. Use 0 to get all matches.'),
l_plu_lav_burl => _('Base URL'),
h_plu_lav_burl => _('This is the URL where avatar requests are sent. You can use the one of your own libravatar server, if available.'),
l_plu_prl_flvb => _('Log level'),
my $CONFIGDIR = $ENV{HOME} . '/.claws-mail/';
my $CONFIGRC = 'clawsrc';
my $ACCOUNTRC = 'accountrc';
+# supported and available plugins lists
+my @PLUGINS = qw(AttRemover GPG ManageSieve Libravatar PerlPlugin);
+my @AVPLUGINS = ();
# index constants for preference arrays
use constant NAME => 0; # the name on the rc file
'-1',
'AttRemover',
],
+ # GPG
+ gpg_alimit => [
+ 'autocompletion_limit',
+ $xl::s{l_plu_gpg_alimit},
+ $xl::s{h_plu_gpg_alimit},
+ 'int,0,100',
+ '3.12.0.75',
+ '0',
+ 'GPG',
+ ],
+ # managesieve
+ msv_winw => [
+ 'manager_win_width',
+ $xl::s{l_win_w},
+ $xl::s{h_win_w},
+ 'int,0,3000', # 0 pixels - 3000 pixels
+ '3.11.1.210',
+ '-1',
+ 'ManageSieve',
+ ],
+ msv_winh => [
+ 'manager_win_height',
+ $xl::s{l_win_h},
+ $xl::s{h_win_h},
+ 'int,0,3000', # 0 pixels - 3000 pixels
+ '3.11.1.210',
+ '-1',
+ 'ManageSieve',
+ ],
# libravatar
lav_burl => [
'base_url',
);
sub new_plugins_page() {
- return new_vbox_pack (
+ my %frame = ();
+ $frame{'AttRemover'} =
new_subpage_frame (
new_hbox_pack (
new_text_box_for_int (\%pr::plu, 'arm_winw', $PLHPVALUE{'AttRemover'}),
new_text_box_for_int (\%pr::plu, 'arm_winh', $PLHPVALUE{'AttRemover'})),
- _('Attachment remover'), 'not-packed'),
+ _('Attachment remover'), 'not-packed');
+ $frame{'GPG'} =
+ new_subpage_frame (
+ new_hbox_pack (
+ new_text_box_for_int (\%pr::plu, 'gpg_alimit', $PLHPVALUE{'GPG'})),
+ _('GPG'), 'not-packed');
+ $frame{'ManageSieve'} =
+ new_subpage_frame (
+ new_hbox_pack (
+ new_text_box_for_int (\%pr::plu, 'msv_winw', $PLHPVALUE{'ManageSieve'}),
+ new_text_box_for_int (\%pr::plu, 'msv_winh', $PLHPVALUE{'ManageSieve'})),
+ _('Sieve manager'), 'not-packed');
+ $frame{'Libravatar'} =
new_subpage_frame (
new_hbox_pack (
new_text_box_for_nchar (\%pr::plu, 'lav_burl', $PLHPVALUE{'Libravatar'})),
- _('Libravatar'), 'not-packed'),
+ _('Libravatar'), 'not-packed');
+ $frame{'PerlPlugin'} =
new_subpage_frame (
new_hbox_pack (
new_selection_box_for (\%pr::plu, 'prl_flvb', $PLHPVALUE{'PerlPlugin'})),
- _('Perl'), 'not-packed')
- );
+ _('Perl'), 'not-packed');
+ foreach (@PLUGINS) {
+ $frame{$_}->set_sensitive (defined $PLHPVALUE{$_});
+ }
+ return new_vbox_pack (
+ $frame{'AttRemover'},
+ $frame{'GPG'},
+ $frame{'ManageSieve'},
+ $frame{'Libravatar'},
+ $frame{'PerlPlugin'});
}
# version info
-sub print_version() {
- print $xl::s{about_title} . "\n";
- print $xl::s{about_version} . " $VERSION\n";
- print "Perl-GLib " . $Glib::VERSION;
+sub get_toolkit_versions {
+ my %versions = ();
+ $versions{'glib'} = $Glib::VERSION;
# version info stuff appeared in 1.040
if ($Glib::VERSION >= 1.040) {
- print _(", built for ") . join(".", Glib->GET_VERSION_INFO)
- . _(", running with ") . join(".", &Glib::major_version,
- &Glib::minor_version, &Glib::micro_version);
+ $versions{'glib-b'} = join('.', Glib->GET_VERSION_INFO);
+ $versions{'glib-r'} = join('.',
+ &Glib::major_version, &Glib::minor_version, &Glib::micro_version);
}
- print "\n";
- print "Perl-GTK2 " . $Gtk2::VERSION;
+ $versions{'gtk2'} = $Gtk2::VERSION;
if ($Gtk2::VERSION >= 1.040) {
- print _(", built for ") . join(".", Gtk2->GET_VERSION_INFO)
- . _(", running with ") . join(".", &Gtk2::major_version,
- &Gtk2::minor_version, &Gtk2::micro_version);
+ $versions{'gtk2-b'} = join('.', Gtk2->GET_VERSION_INFO);
+ $versions{'gtk2-r'} = join('.',
+ &Gtk2::major_version, &Gtk2::minor_version, &Gtk2::micro_version);
}
+ return \%versions;
+}
+
+sub print_version() {
+ print $xl::s{about_title} . "\n";
+ print $xl::s{about_version} . " $VERSION\n";
+ my $v = get_toolkit_versions ();
+ print "Perl-GLib " . $v->{'glib'};
+ print _(", built for ") . $v->{'glib-b'}
+ . _(", running with ") . $v->{'glib-r'} if $v->{'glib-b'};
+ print "\n";
+ print "Perl-GTK2 " . $v->{'gtk2'};
+ print _(", built for ") . $v->{'gtk2-b'}
+ . _(", running with ") . $v->{'gtk2-r'} if $v->{'gtk2-b'};
print "\n";
my $clawsver = ($CLAWSV eq "") ?
_("was not found!") :
print _("Syntax:\n");
print _(" clawsker [options]\n");
print _("Options:\n");
- print _(" -h|--help Prints this help screen.\n");
- print _(" -v|--version Prints version infos.\n");
- print _(" -b|--verbose More messages on standard output.\n");
print _(" -a|--alternate-config-dir <dir> Uses <dir> as Claws Mail config dir.\n");
+ print _(" -b|--verbose More messages on standard output.\n");
print _(" -c|--clawsrc <file> Uses <file> as full resource name.\n");
+ print _(" -h|--help Prints this help screen.\n");
+ print _(" -r|--read-only Disables writing changes to disk.\n");
+ print _(" -v|--version Prints version infos.\n");
}
sub parse_command_line {
foreach my $key (keys %pr::plu) {
my $plugin = $pr::plu{$key}[PLUGIN];
my $pname = $pr::plu{$key}[NAME];
- $PLHPVALUE{$plugin}{$pname} = $PLPREFS{$plugin}{$pname};
+ if (defined $PLPREFS{$plugin}) {
+ $PLHPVALUE{$plugin}{$pname} = $PLPREFS{$plugin}{$pname};
+ }
}
return TRUE;
}
foreach (keys %{$CONFIGDATA->{'Common'}}) {
$PREFS{$_} = $CONFIGDATA->{'Common'}{$_};
}
- foreach my $plugin (qw(AttRemover Libravatar PerlPlugin)) {
- foreach (keys %{$CONFIGDATA->{$plugin}}) {
- $PLPREFS{$plugin}{$_} = $CONFIGDATA->{$plugin}{$_};
+ foreach my $plugin (@PLUGINS) {
+ if (defined $CONFIGDATA->{$plugin}) {
+ push (@AVPLUGINS, $plugin);
+ foreach (keys %{$CONFIGDATA->{$plugin}}) {
+ $PLPREFS{$plugin}{$_} = $CONFIGDATA->{$plugin}{$_};
+ }
}
}
return TRUE;
$CONFIGDATA->{'Common'}{$_} = $HPVALUE{$_};
}
}
- foreach my $plugin (qw(AttRemover Libravatar PerlPlugin)) {
+ foreach my $plugin (@AVPLUGINS) {
foreach (keys %{$CONFIGDATA->{$plugin}}) {
if (defined $PLHPVALUE{$plugin}{$_}) {
$CONFIGDATA->{$plugin}{$_} = $PLHPVALUE{$plugin}{$_};