Changeset 2203
- Timestamp:
- 12/26/08 02:28:24 (3 years ago)
- File:
-
- 1 edited
-
trunk/Padre-Plugin-CPAN/lib/Padre/Plugin/CPAN.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre-Plugin-CPAN/lib/Padre/Plugin/CPAN.pm
r2201 r2203 34 34 my $default_dir = $INC{'CPAN.pm'}; 35 35 $default_dir =~ s/\.pm$//is; # remove .pm 36 my $filename = 'Config.pm';37 38 # copy from MainWindow.pm sub on_open39 40 my $file = File::Spec->catfile($default_dir, $filename);41 Padre::DB->add_recent_files($file);42 36 43 # If and only if there is only one current file, 44 # and it is unused, close it. 45 if ( $self->{notebook}->GetPageCount == 1 ) { 46 if ( Padre::Documents->current->is_unused ) { 47 $self->on_close($self); 37 foreach my $file ( 38 File::Spec->catfile($default_dir, 'Config.pm'), 39 File::Spec->catfile(File::HomeDir->my_home, '.cpan', 'CPAN', 'MyConfig.pm') 40 ) { 41 if (-e $file) { 42 $self->setup_editors($file); 43 last; 48 44 } 49 45 } 50 51 $self->setup_editor($file);52 $self->refresh_all;53 46 } 54 47
Note: See TracChangeset
for help on using the changeset viewer.
