Changeset 9576
- Timestamp:
- 12/09/09 15:59:58 (2 years ago)
- Location:
- trunk/Padre-Plugin-Catalyst/lib/Padre
- Files:
-
- 2 edited
-
Plugin/Catalyst.pm (modified) (1 diff)
-
Wx/Menu/Catalyst.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre-Plugin-Catalyst/lib/Padre/Plugin/Catalyst.pm
r9574 r9576 583 583 sub editor_changed { 584 584 my $self = shift; 585 586 return; # TODO: remove this line as soon as the following are working. 587 588 my $document = undef; # TODO: Fill with the current document 589 585 my $document = $self->main->current->document || return; 586 590 587 $document->{menu} = [] if (!defined($document->{menu})) or (ref($document->{menu}) ne 'ARRAY'); 591 $document ->{menu} = [grep (!/^menu\.catalyst$/,@{$document->{menu}}) ]; 592 if (my $document_is_from_catalyst_project) { 593 push @{$document->{menu}},'menu.catalyst'; 588 $document->{menu} = [grep (!/^menu\.Catalyst$/,@{$document->{menu}}) ]; 589 590 require Padre::Plugin::Catalyst::Util; 591 if (Padre::Plugin::Catalyst::Util::in_catalyst_project($document->filename)) { 592 push @{$document->{menu}}, 'menu.Catalyst'; 594 593 } 595 594 } -
trunk/Padre-Plugin-Catalyst/lib/Padre/Wx/Menu/Catalyst.pm
r9574 r9576 8 8 use Padre::Wx (); 9 9 use Padre::Wx::Menu (); 10 use Params::Util '_INSTANCE'; 11 use Padre::Current '_CURRENT'; 10 12 11 13 our $VERSION = '0.51'; … … 57 59 # Disable document-specific entries if we are in a Perl project 58 60 # but not in a Perl document. 59 $self->{beginner_check}->Enable($perl); 61 # FIXME: the two commands below crash unless they are defined. Should they 62 # ALWAYS be defined or should we leave them like so? (garu) 63 $self->{beginner_check}->Enable($perl) if defined $self->{beginner_check}; 60 64 61 65 # Apply config-driven state 62 $self->{autocomplete_brackets}->Check( $config->autocomplete_brackets ); 66 $self->{autocomplete_brackets}->Check( $config->autocomplete_brackets ) 67 if defined $self->{autocomplete_brackets}; 63 68 64 69 return;
Note: See TracChangeset
for help on using the changeset viewer.
