64
64
# This is the list of binary files
65
65
# (which we don't support loading in fallback text mode)
67
aiff => 1, au => 1, avi => 1, bmp => 1, cache => 1, dat => 1, doc => 1, gif => 1, gz => 1, icns => 1,
68
jar => 1, jpeg => 1, jpg => 1, m4a => 1, mov => 1, mp3 => 1, mpg => 1, ogg => 1, pdf => 1, png => 1,
69
pnt => 1, ppt => 1, qt => 1, ra => 1, svg => 1, svgz => 1, svn => 1, swf => 1, tar => 1, tgz => 1,
70
tif => 1, tiff => 1, wav => 1, xls => 1, xlw => 1, zip => 1,
66
our %EXT_BINARY = map { $_ => 1 } qw{
67
aiff au avi bmp cache dat doc gif gz icns
68
jar jpeg jpg m4a mov mp3 mpg ogg pdf png
69
pnt ppt qt ra svg svgz svn swf tar tgz
70
tif tiff wav xls xlw zip
73
73
# This is the primary file extension to mime-type mapping
168
168
# This is the mime-type to document class mapping
169
our %MIME_CLASS = ( 'application/x-perl' => 'Padre::Document::Perl', 'text/x-pod' => 'Padre::Document::POD', );
170
'application/x-perl' => 'Padre::Document::Perl',
171
'text/x-pod' => 'Padre::Document::POD',
171
174
sub menu_view_mimes {
172
175
'00Plain Text' => 'text/plain',
339
341
return if not $text;
340
342
return 1 if $text =~ /^=begin\s+pod/msx;
341
return if $text =~ /^=head[12]/msx; # needed for eg/perl5_with_perl6_example.pod
344
# Needed for eg/perl5_with_perl6_example.pod
345
return if $text =~ /^=head[12]/msx;
342
347
return 1 if $text =~ /^\s*use\s+v6;/msx;
343
348
return 1 if $text =~ /^\s*(?:class|grammar|module|role)\s+\w/msx;
829
=head2 event_on_left_up
831
NOT IMPLEMENTED IN THE BASE CLASS
833
This method - if implemented - is called when a user left-clicks in an
834
editor. This can be used to implement context-sensitive actions if
835
the user presses modifier keys while clicking.
837
Parameters retrieved are the objects for the document, the editor,
826
844
#####################################################################