~ubuntu-branches/ubuntu/wily/padre/wily

« back to all changes in this revision

Viewing changes to lib/Padre/PluginManager.pm

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2009-08-12 14:44:55 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090812144455-yvk90oa92khfcnls
Tags: 0.42-1
* New Upstream Version
  + add explicit dependency on libtest-simple-perl (>= 0.88)
  + rules: use dh --with quilt (and bump quilt build-dependency to 0.46-7)
  + rules: no need to re-generate .mo files from .po. Upstream does it now
  + copyright: describe share/icons/padre/16x16/logo.png
    - describe share/icons/padre/16x16/toggle-comments.png
    - Padre license is the same as Perl (i.e. not Perl 5)
    - update list of copright holders
    - also list translators
  + drop libtest-most-perl from build-dependencies
  + add liblocale-msgfmt-perl to build-dependencies
  + add libcapture-tiny-perl to (build-)dependencies
  + add libfile-remove-perl (>= 1.42) to (build-)dependencies
  + drop libmodule-inspector-perl from (build-)dependencies
  + add libppix-editortools-perl to (build-)dependencies
  + add libparse-exuberantctags-perl to (build-)dependencies
  + patches:
    - drop lower-wx-requirement-to-2.8.7.patch and replace it with
      SKIP_WXWIDGETS_VERSION_CHECK=1 when configuring
      adjust README.debian accordingly
    - refresh disable-tcp-server.patch
    - drop don't-require-new-file-path.patch (applied upstream)
    - rework fix-pod2-errors.patch (new release, new errors :))
* add fix-perl-interpreter-path.patch fixing the path to the perl interpreter
  in three examples (thanks lintian)
* add more lintian overrides about script-not-executable for scripts that are
  treated as examples/templates
* add fix-whatis.patch fixing the whatis entry of Padre::Wx
* add menu and .desktop file

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
use Padre::Wx                ();
36
36
use Padre::Wx::Menu::Plugins ();
37
37
 
38
 
our $VERSION = '0.36';
 
38
our $VERSION = '0.42';
39
39
 
40
40
#####################################################################
41
41
# Constructor and Accessors
122
122
                # full names, but always puts "My Plugin" first.
123
123
                $self->{plugin_names} = [
124
124
                        map { $_->[0] }
125
 
                                sort { ( $b->[0] eq 'My' ) <=> ( $a->[0] eq 'My' ) or $a->[1] cmp $b->[1] }
126
 
                                map { [ $_->name, $_->plugin_name ] } values %{ $self->{plugins} }
 
125
                        sort { ( $b->[0] eq 'My' ) <=> ( $a->[0] eq 'My' ) or $a->[1] cmp $b->[1] }
 
126
                        map { [ $_->name, $_->plugin_name ] } values %{ $self->{plugins} }
127
127
                ];
128
128
        }
129
129
        return @{ $self->{plugin_names} };
415
415
        my $plugin_dir = $self->plugin_dir;
416
416
        my $cache_dir = File::Spec->catdir( $plugin_dir, 'cache' );
417
417
        $ENV{PAR_GLOBAL_TEMP} = $cache_dir;
418
 
        File::Path::make_path($cache_dir) unless -e $cache_dir;
 
418
        File::Path::mkpath($cache_dir) unless -e $cache_dir;
419
419
        $ENV{PAR_TEMP} = $cache_dir;
420
420
 
421
421
        $self->{par_loaded} = 1;
468
468
 
469
469
        # Does the plugin load without error
470
470
        my $code = "use $module ();";
471
 
        eval $code;    ## no critic
 
471
        eval $code; ## no critic
472
472
        if ($@) {
473
473
                $plugin->errstr(
474
474
                        sprintf(
683
683
                $object = Padre::DB::Plugin->create(
684
684
                        name    => $plugin->class,
685
685
                        version => $plugin->version,
686
 
                        enabled => undef,              # undef means no preference yet
 
686
                        enabled => undef,           # undef means no preference yet
687
687
                        config  => undef,
688
688
                );
689
689
        }
857
857
        my $dialog = Wx::FileDialog->new(
858
858
                $main, Wx::gettext('Open file'), $default_dir, '', '*.*', Wx::wxFD_OPEN,
859
859
        );
860
 
        unless (Padre::Util::WIN32) {
 
860
        unless (Padre::Constant::WIN32) {
861
861
                $dialog->SetWildcard("*");
862
862
        }
863
863
        if ( $dialog->ShowModal == Wx::wxID_CANCEL ) {
884
884
                return;
885
885
        }
886
886
 
887
 
        $filename =~ s/\.pm$//;        # remove last .pm
 
887
        $filename =~ s/\.pm$//;     # remove last .pm
888
888
        $filename =~ s/[\\\/]/\:\:/;
889
889
        unless ( $INC[0] eq $default_dir ) {
890
890
                unshift @INC, $default_dir;