use
5.008;
our
$VERSION
=
'1.02'
;
our
$COMPATIBLE
=
'0.93'
;
our
(
%SETTING
,
%DEFAULT
,
%STARTUP
,
$REVISION
,
$SINGLETON
);
BEGIN {
%SETTING
= ();
%DEFAULT
= ();
%STARTUP
= ();
$SINGLETON
=
undef
;
}
getters
=> {
host
=> Padre::Constant::HOST,
human
=> Padre::Constant::HUMAN,
project
=> Padre::Constant::PROJECT,
},
accessors
=> {
restart
=> Padre::Constant::RESTART,
}
};
my
$PANEL_OPTIONS
= {
left
=> _T(
'Left Panel'
),
right
=> _T(
'Right Panel'
),
bottom
=> _T(
'Bottom Panel'
),
};
sub
settings {
my
@names
=
keys
%SETTING
;
return
wantarray
?
sort
@names
:
scalar
@names
;
}
sub
setting {
shift
if
ref
(
$_
[0] ) eq __PACKAGE__;
my
$object
= Padre::Config::Setting->new(
@_
);
my
$name
=
$object
->{name};
if
(
$SETTING
{
$name
} ) {
Carp::croak(
"The $name setting is already defined"
);
}
SCOPE: {
local
$@;
eval
$object
->code;
Carp::croak(
"Failed to compile setting $object->{name}: $@"
)
if
$@;
}
$SETTING
{
$name
} =
$object
;
$DEFAULT
{
$name
} =
$object
->{
default
};
$STARTUP
{
$name
} = 1
if
$object
->{startup};
return
1;
}
sub
new {
my
$class
=
shift
;
my
$host
=
shift
;
my
$human
=
shift
;
unless
( Params::Util::_INSTANCE(
$host
,
'Padre::Config::Host'
) ) {
Carp::croak(
"Did not provide a host config to Padre::Config->new"
);
}
unless
( Params::Util::_INSTANCE(
$human
,
'Padre::Config::Human'
) ) {
Carp::croak(
"Did not provide a user config to Padre::Config->new"
);
}
my
$self
=
bless
[
$host
,
$human
,
undef
, 0 ],
$class
;
if
(
@_
) {
my
$project
=
shift
;
unless
( Params::Util::_INSTANCE(
$project
,
'Padre::Config::Project'
) ) {
Carp::croak(
"Did not provide a project config to Padre::Config->new"
);
}
$self
->[Padre::Constant::PROJECT] =
$project
;
}
return
$self
;
}
sub
read
{
my
$class
=
shift
;
unless
(
$SINGLETON
) {
TRACE(
"Loading configuration for $class"
)
if
DEBUG;
my
$host
= Padre::Config::Host->
read
;
my
$human
= Padre::Config::Human->
read
|| Padre::Config::Human->create;
$SINGLETON
=
$class
->new(
$host
,
$human
);
}
return
$SINGLETON
;
}
sub
write
{
TRACE(
$_
[0] )
if
DEBUG;
my
$self
=
shift
;
delete
$self
->[Padre::Constant::HUMAN]->{version};
delete
$self
->[Padre::Constant::HUMAN]->{Version};
$self
->[Padre::Constant::HUMAN]->
write
;
delete
$self
->[Padre::Constant::HOST]->{version};
delete
$self
->[Padre::Constant::HOST]->{Version};
$self
->[Padre::Constant::HOST]->
write
;
my
%startup
= (
VERSION
=>
$VERSION
,
map
{
$_
=>
$self
->
$_
() }
sort
keys
%STARTUP
);
open
(
my
$FILE
,
'>'
, Padre::Constant::CONFIG_STARTUP ) or
return
1;
print
$FILE
map
{
"$_\n$startup{$_}\n"
}
sort
keys
%startup
or
return
1;
close
$FILE
or
return
1;
return
1;
}
sub
clone {
my
$self
=
shift
;
my
$class
= Scalar::Util::blessed(
$self
);
my
$host
=
$self
->host->clone;
my
$human
=
$self
->human->clone;
if
(
$self
->project ) {
my
$project
=
$self
->project->clone;
return
$class
->new(
$host
,
$human
,
$project
);
}
else
{
return
$class
->new(
$host
,
$human
);
}
}
sub
meta {
$SETTING
{
$_
[1] } or
die
(
"Missing or invalid setting name '$_[1]'"
);
}
sub
default
{
my
$self
=
shift
;
my
$name
=
shift
;
unless
(
$SETTING
{
$name
} ) {
Carp::croak(
"The configuration setting '$name' does not exist"
);
}
return
$DEFAULT
{
$name
};
}
sub
changed {
my
$self
=
shift
;
my
$name
=
shift
;
my
$new
=
shift
;
my
$old
=
$self
->
$name
();
my
$type
=
$self
->meta(
$name
)->type;
if
(
$type
== Padre::Constant::ASCII or
$type
== Padre::Constant::PATH ) {
return
$new
ne
$old
;
}
else
{
return
$new
!=
$old
;
}
}
sub
set {
TRACE(
$_
[1] )
if
DEBUG;
my
$self
=
shift
;
my
$name
=
shift
;
my
$value
=
shift
;
my
$setting
=
$SETTING
{
$name
};
unless
(
$setting
) {
Carp::croak(
"The configuration setting '$name' does not exist"
);
}
unless
(
defined
$value
and not
ref
$value
) {
Carp::croak(
"Missing or non-scalar value for setting '$name'"
);
}
my
$type
=
$setting
->type;
my
$store
=
$setting
->store;
unless
(
defined
$type
) {
Carp::croak(
"Setting '$name' has undefined type"
);
}
if
(
$type
== Padre::Constant::BOOLEAN ) {
$value
= 0
if
$value
eq
''
;
if
(
$value
ne
'1'
and
$value
ne
'0'
) {
Carp::croak(
"Setting '$name' to non-boolean '$value'"
);
}
}
if
(
$type
== Padre::Constant::POSINT and not Params::Util::_POSINT(
$value
) ) {
Carp::croak(
"Setting '$name' to non-posint '$value'"
);
}
if
(
$type
== Padre::Constant::INTEGER and not _INTEGER(
$value
) ) {
Carp::croak(
"Setting '$name' to non-integer '$value'"
);
}
if
(
$type
== Padre::Constant::PATH ) {
if
( Padre::Constant::WIN32 and utf8::is_utf8(
$value
) ) {
my
$long
= Win32::GetLongPathName(
$value
);
unless
(
defined
$long
) {
Carp::croak(
"Setting '$name' to non-existant path '$value'"
);
}
$value
=
$long
;
}
unless
( -e
$value
) {
Carp::croak(
"Setting '$name' to non-existant path '$value'"
);
}
if
( Padre::Constant::PORTABLE and
$store
== Padre::Constant::HOST ) {
$value
= Padre::Portable::freeze_directory(
$value
);
}
}
$self
->[
$store
]->{
$name
} =
$value
;
return
1;
}
sub
apply {
TRACE(
$_
[0] )
if
DEBUG;
my
$self
=
shift
;
my
$name
=
shift
;
my
$new
=
shift
;
my
$setting
=
$SETTING
{
$name
};
unless
(
$setting
) {
Carp::croak(
"The configuration setting '$name' does not exist"
);
}
my
$changed
=
$self
->changed(
$name
,
$new
);
return
$changed
unless
$changed
;
my
$old
=
$self
->
$name
();
$self
->set(
$name
=>
$new
);
my
$code
=
do
{
Padre::Config::Apply->can(
$name
);
};
if
(
$code
) {
my
$current
= Padre::Current::_CURRENT(
@_
);
$code
->(
$current
->main,
$new
,
$old
);
}
elsif
(
$setting
->restart ) {
$self
->restart(1);
}
return
1;
}
sub
themes {
my
$class
=
shift
;
my
$core_directory
= Padre::Util::sharedir(
'themes'
);
my
$user_directory
= File::Spec->catdir(
Padre::Constant::CONFIG_DIR,
'themes'
,
);
my
%themes
= ();
foreach
my
$directory
(
$user_directory
,
$core_directory
) {
next
unless
-d
$directory
;
local
*STYLEDIR
;
unless
(
opendir
( STYLEDIR,
$directory
) ) {
die
"Failed to read '$directory'"
;
}
foreach
my
$file
(
readdir
STYLEDIR ) {
next
unless
$file
=~ s/\.txt\z//;
next
unless
Params::Util::_IDENTIFIER(
$file
);
next
if
$themes
{
$file
};
$themes
{
$file
} = File::Spec->catfile(
$directory
,
"$file.txt"
);
}
closedir
STYLEDIR;
}
return
\
%themes
;
}
sub
_INTEGER {
return
defined
$_
[0] && !
ref
$_
[0] &&
$_
[0] =~ m/^(?:0|-?[1-9]\d*)$/;
}
setting(
name
=>
'identity_name'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
''
,
);
setting(
name
=>
'identity_email'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
''
,
);
setting(
name
=>
'identity_nickname'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
''
,
);
setting(
name
=>
'identity_location'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HOST,
default
=>
''
,
);
setting(
name
=>
'editor_indent_auto'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
project
=> 1,
);
setting(
name
=>
'editor_indent_tab'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
project
=> 1,
);
setting(
name
=>
'editor_indent_tab_width'
,
type
=> Padre::Constant::POSINT,
store
=> Padre::Constant::HUMAN,
default
=> 8,
project
=> 1,
);
setting(
name
=>
'editor_indent_width'
,
type
=> Padre::Constant::POSINT,
store
=> Padre::Constant::HUMAN,
default
=> 8,
project
=> 1,
);
setting(
name
=>
'startup_splash'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
startup
=> 1,
help
=> _T(
'Showing the splash image during start-up'
),
);
setting(
name
=>
'startup_files'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'new'
,
options
=> {
'last'
=> _T(
'Previous open files'
),
'new'
=> _T(
'A new empty file'
),
'nothing'
=> _T(
'No open files'
),
'session'
=> _T(
'Open session'
),
},
help
=> _T(
'"Open session" will ask which session (set of files) to open when you launch Padre.'
)
. _T(
'"Previous open files" will remember the open files when you close Padre and open the same files next time you launch Padre.'
),
);
setting(
name
=>
'nth_startup'
,
type
=> Padre::Constant::POSINT,
store
=> Padre::Constant::HUMAN,
default
=> 1,
);
setting(
name
=>
'nth_feedback'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'nth_birthday'
,
type
=> Padre::Constant::INTEGER,
store
=> Padre::Constant::HOST,
default
=> 0,
);
setting(
name
=>
'main_title'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=> ( Padre::Constant::PORTABLE ?
'Padre Portable'
:
'Padre'
),
help
=> _T(
'Contents of the window title'
) . _T(
'Several placeholders like the filename can be used'
),
);
setting(
name
=>
'main_singleinstance'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> Padre::Constant::DEFAULT_SINGLEINSTANCE,
startup
=> 1,
);
setting(
name
=>
'main_singleinstance_port'
,
type
=> Padre::Constant::POSINT,
store
=> Padre::Constant::HOST,
default
=> Padre::Constant::DEFAULT_SINGLEINSTANCE_PORT,
startup
=> 1,
);
setting(
name
=>
'main_lockinterface'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
);
setting(
name
=>
'main_functions'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'main_functions_panel'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'right'
,
options
=>
$PANEL_OPTIONS
,
);
setting(
name
=>
'main_functions_order'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'alphabetical'
,
options
=> {
'original'
=> _T(
'Code Order'
),
'alphabetical'
=> _T(
'Alphabetical Order'
),
'alphabetical_private_last'
=> _T(
'Alphabetical Order (Private Last)'
),
},
);
setting(
name
=>
'main_outline'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'main_outline_panel'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'right'
,
options
=>
$PANEL_OPTIONS
,
);
setting(
name
=>
'main_tasks'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'main_tasks_panel'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'bottom'
,
options
=>
$PANEL_OPTIONS
,
);
setting(
name
=>
'main_tasks_regexp'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
"#\\s*(?:TO[- ]?DO|XXX|FIX[- ]?ME)(?:[ \\t]*[:-]?)(?:[ \\t]*)(.*?)\\s*\$"
,
);
setting(
name
=>
'main_directory'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'main_directory_order'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'first'
,
options
=> {
first
=> _T(
'Directories First'
),
mixed
=> _T(
'Directories Mixed'
),
},
);
setting(
name
=>
'main_directory_panel'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'left'
,
options
=>
$PANEL_OPTIONS
,
);
setting(
name
=>
'main_directory_root'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HOST,
default
=> File::HomeDir->my_documents ||
''
,
);
setting(
name
=>
'main_output'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'main_output_panel'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'bottom'
,
options
=>
$PANEL_OPTIONS
,
);
setting(
name
=>
'main_output_ansi'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
);
setting(
name
=>
'main_command'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'main_command_panel'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'bottom'
,
options
=>
$PANEL_OPTIONS
,
);
setting(
name
=>
'main_syntax'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'main_syntax_panel'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'bottom'
,
options
=>
$PANEL_OPTIONS
,
);
setting(
name
=>
'main_vcs'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'main_vcs_panel'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'right'
,
options
=>
$PANEL_OPTIONS
,
);
setting(
name
=>
'main_cpan'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'main_cpan_panel'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'right'
,
options
=>
$PANEL_OPTIONS
,
);
setting(
name
=>
'main_foundinfiles_panel'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'bottom'
,
options
=>
$PANEL_OPTIONS
,
);
setting(
name
=>
'main_replaceinfiles_panel'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'bottom'
,
options
=>
$PANEL_OPTIONS
,
);
setting(
name
=>
'main_breakpoints'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'main_debugoutput'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'main_debugger'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'main_statusbar'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
help
=> _T(
'Show or hide the status bar at the bottom of the window.'
),
);
setting(
name
=>
'main_statusbar_template'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'%m %f'
,
help
=> _T(
'Contents of the status bar'
) . _T(
'Several placeholders like the filename can be used'
),
);
setting(
name
=>
'main_toolbar'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> Padre::Constant::MAC ? 0 : 1,
);
setting(
name
=>
'main_toolbar_items'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'file.new;'
.
'file.open;'
.
'file.save;'
.
'file.save_as;'
.
'file.save_all;'
.
'file.close;'
.
'|;'
.
'file.open_example;'
.
'|;'
.
'edit.undo;'
.
'edit.redo;'
.
'|;'
.
'edit.cut;'
.
'edit.copy;'
.
'edit.paste;'
.
'edit.select_all;'
.
'|;'
.
'search.find;'
.
'search.replace;'
.
'|;'
.
'edit.comment_toggle;'
.
'|;'
.
'search.open_resource;'
.
'search.quick_menu_access;'
.
'|;'
.
'run.run_document;'
.
'run.stop;'
.
'|;'
.
'debug.launch;'
.
'debug.set_breakpoint;'
.
'debug.quit;'
.
'|;'
);
setting(
name
=>
'default_projects_directory'
,
type
=> Padre::Constant::PATH,
store
=> Padre::Constant::HOST,
default
=> File::HomeDir->my_documents ||
''
,
);
setting(
name
=>
'editor_font'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=> Padre::Util::DISTRO =~ /^WIN(?:VISTA|7)$/ ?
'consolas 10'
:
''
,
);
setting(
name
=>
'editor_linenumbers'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
);
setting(
name
=>
'editor_eol'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'editor_whitespace'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'editor_indentationguides'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'editor_calltips'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'editor_autoindent'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'deep'
,
options
=> {
'no'
=> _T(
'No Autoindent'
),
'same'
=> _T(
'Indent to Same Depth'
),
'deep'
=> _T(
'Indent Deeply'
),
},
);
setting(
name
=>
'editor_folding'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'editor_fold_pod'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'editor_brace_expression_highlighting'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'save_autoclean'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'editor_currentline'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
);
setting(
name
=>
'editor_currentline_color'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'FFFF04'
,
);
setting(
name
=>
'editor_wordwrap'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'editor_file_size_limit'
,
type
=> Padre::Constant::POSINT,
store
=> Padre::Constant::HUMAN,
default
=> 5_000_000,
);
setting(
name
=>
'editor_right_margin_enable'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'editor_right_margin_column'
,
type
=> Padre::Constant::POSINT,
store
=> Padre::Constant::HUMAN,
default
=> 80,
);
setting(
name
=>
'editor_smart_highlight_enable'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
);
setting(
name
=>
'editor_cursor_blink'
,
type
=> Padre::Constant::INTEGER,
store
=> Padre::Constant::HUMAN,
default
=> 500,
);
setting(
name
=>
'editor_dwell'
,
type
=> Padre::Constant::INTEGER,
store
=> Padre::Constant::HUMAN,
default
=> 500,
);
setting(
name
=>
'find_case'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
);
setting(
name
=>
'find_regex'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'find_reverse'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'find_first'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'find_nohidden'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
);
setting(
name
=>
'find_nomatch'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'default_line_ending'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=> Padre::Constant::NEWLINE,
options
=> {
'UNIX'
=>
'UNIX'
,
'WIN'
=>
'WIN'
,
'MAC'
=>
'MAC'
,
},
);
setting(
name
=>
'update_file_from_disk_interval'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=> 2,
);
setting(
name
=>
'autocomplete_multiclosebracket'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'autocomplete_always'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'autocomplete_method'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'autocomplete_subroutine'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'lang_perl5_autocomplete_max_suggestions'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=> 20,
);
setting(
name
=>
'lang_perl5_autocomplete_min_chars'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=> 1,
);
setting(
name
=>
'lang_perl5_autocomplete_min_suggestion_len'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=> 3,
);
setting(
name
=>
'lang_perl5_lexer_ppi_limit'
,
type
=> Padre::Constant::POSINT,
store
=> Padre::Constant::HUMAN,
default
=> 4000,
);
setting(
name
=>
'run_save'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'same'
,
);
setting(
name
=>
'run_perl_cmd'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HOST,
default
=>
''
,
);
setting(
name
=>
'lang_perl5_tags_file'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HOST,
default
=>
''
,
);
setting(
name
=>
'lang_perl5_lexer'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HOST,
default
=>
''
,
options
=> {
''
=> _T(
'Scintilla'
),
'Padre::Document::Perl::Lexer'
=> _T(
'PPI Experimental'
),
'Padre::Document::Perl::PPILexer'
=> _T(
'PPI Standard'
),
},
);
setting(
name
=>
'xs_calltips_perlapi_version'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::PROJECT,
default
=>
'newest'
,
project
=> 1,
);
setting(
name
=>
'info_on_statusbar'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
help
=> _T(
'Show low-priority info messages on statusbar (not in a popup)'
),
);
setting(
name
=>
'run_stacktrace'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'autocomplete_brackets'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'mid_button_paste'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'sessionmanager_sortorder'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
"0,0"
,
);
setting(
name
=>
'threads'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
startup
=> 1,
);
setting(
name
=>
'threads_maximum'
,
type
=> Padre::Constant::INTEGER,
store
=> Padre::Constant::HOST,
default
=> 9,
);
setting(
name
=>
'threads_stacksize'
,
type
=> Padre::Constant::INTEGER,
store
=> Padre::Constant::HOST,
default
=> Padre::Constant::WIN32 ? 4194304 : 0,
startup
=> 1,
);
setting(
name
=>
'locale'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
''
,
);
setting(
name
=>
'editor_style'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HOST,
default
=>
'default'
,
options
=> Padre::Config->themes,
);
setting(
name
=>
'main_maximized'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 0,
);
setting(
name
=>
'main_top'
,
type
=> Padre::Constant::INTEGER,
store
=> Padre::Constant::HOST,
default
=> -1,
);
setting(
name
=>
'main_left'
,
type
=> Padre::Constant::INTEGER,
store
=> Padre::Constant::HOST,
default
=> -1,
);
setting(
name
=>
'main_width'
,
type
=> Padre::Constant::POSINT,
store
=> Padre::Constant::HOST,
default
=> -1,
);
setting(
name
=>
'main_height'
,
type
=> Padre::Constant::POSINT,
store
=> Padre::Constant::HOST,
default
=> -1,
);
setting(
name
=>
'run_interpreter_args_default'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HOST,
default
=>
''
,
);
setting(
name
=>
'run_script_args_default'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HOST,
default
=>
''
,
);
setting(
name
=>
'run_use_external_window'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'bin_shell'
,
type
=> Padre::Constant::PATH,
store
=> Padre::Constant::HOST,
default
=> Padre::Constant::WIN32 ?
'cmd.exe'
:
''
,
);
setting(
name
=>
'feature_bookmark'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
restart
=> 1,
);
setting(
name
=>
'feature_fontsize'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
restart
=> 1,
);
setting(
name
=>
'feature_folding'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
restart
=> 1,
);
setting(
name
=>
'feature_session'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
restart
=> 1,
);
setting(
name
=>
'feature_cursormemory'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
restart
=> 1,
);
setting(
name
=>
'feature_debugger'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
restart
=> 1,
);
setting(
name
=>
'feature_quick_fix'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
restart
=> 1,
);
setting(
name
=>
'feature_sync'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
restart
=> 1,
);
setting(
name
=>
'feature_style_gui'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
restart
=> 1,
);
setting(
name
=>
'feature_devel_endstats'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
restart
=> 1,
help
=> _T(
'Enable or disable the Run with Devel::EndStats if it is installed. '
)
. _T(
'This requires an installed Devel::EndStats and a Padre restart'
),
);
setting(
name
=>
'feature_devel_endstats_options'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'verbose,1'
,
help
=> _T(
q{Specify Devel::EndStats options. 'feature_devel_endstats' must be enabled.}
),
);
setting(
name
=>
'feature_devel_traceuse'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
restart
=> 1,
help
=> _T(
'Enable or disable the Run with Devel::TraceUse if it is installed. '
)
. _T(
'This requires an installed Devel::TraceUse and a Padre restart'
),
);
setting(
name
=>
'feature_devel_traceuse_options'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
''
,
help
=> _T(
q{Specify Devel::TraceUse options. 'feature_devel_traceuse' must be enabled.}
),
);
setting(
name
=>
'feature_syntax_check_annotations'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
restart
=> 1,
help
=> _T(
'Enable syntax checker annotations in the editor'
)
);
setting(
name
=>
'feature_document_diffs'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
restart
=> 1,
help
=> _T(
'Enable document differences feature'
)
);
setting(
name
=>
'feature_vcs_support'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
restart
=> 1,
help
=> _T(
'Enable version control system support'
)
);
setting(
name
=>
'feature_cpan'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
restart
=> 1,
help
=> _T(
'Enable the CPAN Explorer, powered by MetaCPAN'
),
);
setting(
name
=>
'feature_diff_window'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
restart
=> 1,
help
=> _T(
'Toggle Diff window feature that compares two buffers graphically'
),
);
setting(
name
=>
'feature_command'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
restart
=> 1,
help
=> _T(
'Enable the experimental command line interface'
),
);
setting(
name
=>
'lang_perl6_auto_detection'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
help
=> _T(
'Toggle Perl 6 auto detection in Perl 5 files'
)
);
setting(
name
=>
'window_list_shorten_path'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner_split'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner_warning'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner_map'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner_debugger'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner_chomp'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner_map2'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner_perl6'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner_ifsetvar'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner_pipeopen'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner_pipe2open'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner_regexq'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner_elseif'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'lang_perl5_beginner_close'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HOST,
default
=> 1,
);
setting(
name
=>
'file_http_timeout'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=> 30,
);
setting(
name
=>
'file_ftp_timeout'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=> 30,
);
setting(
name
=>
'file_ftp_passive'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 1,
);
setting(
name
=>
'vcs_normal_shown'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'vcs_unversioned_shown'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'vcs_ignored_shown'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'vcs_enable_command_bar'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'session_autosave'
,
type
=> Padre::Constant::BOOLEAN,
store
=> Padre::Constant::HUMAN,
default
=> 0,
);
setting(
name
=>
'config_sync_server'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HOST,
);
setting(
name
=>
'config_sync_username'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HOST,
default
=>
''
,
);
setting(
name
=>
'config_sync_password'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HOST,
default
=>
''
,
);
setting(
name
=>
'config_perltidy'
,
type
=> Padre::Constant::PATH,
store
=> Padre::Constant::PROJECT,
default
=>
''
,
);
setting(
name
=>
'config_perlcritic'
,
type
=> Padre::Constant::PATH,
store
=> Padre::Constant::PROJECT,
default
=>
''
,
);
setting(
name
=>
'module_starter_directory'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
''
,
);
setting(
name
=>
'module_starter_builder'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'Module::Install'
,
options
=> {
'ExtUtils::MakeMaker'
=>
'ExtUtils::MakeMaker'
,
'Module::Build'
=>
'Module::Build'
,
'Module::Install'
=>
'Module::Install'
,
},
);
setting(
name
=>
'module_starter_license'
,
type
=> Padre::Constant::ASCII,
store
=> Padre::Constant::HUMAN,
default
=>
'perl'
,
options
=> {
'apache'
=> _T(
'Apache License'
),
'bsd'
=> _T(
'Revised BSD License'
),
'gpl'
=> _T(
'GPL 2 or later'
),
'lgpl'
=> _T(
'LGPL 2.1 or later'
),
'mit'
=> _T(
'MIT License'
),
'perl'
=> _T(
'The same as Perl itself'
),
},
);
1;