Ignore:
Timestamp:
08/16/09 02:07:42 (2 years ago)
Author:
szabgab
Message:

remove private _sharedir function from several plugins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre-Plugin-SpellCheck/lib/Padre/Plugin/SpellCheck.pm

    r5373 r7251  
    3434# plugin icon 
    3535sub plugin_icon { 
     36    my $self = shift; 
     37 
    3638    # find resource path 
    3739    my $pkgpath = find_installed(__PACKAGE__); 
    3840    my (undef, $dirname, undef) = fileparse($pkgpath); 
    39     my $iconpath = catfile( _sharedir(), 'icons', 'spellcheck.png'); 
     41    my $iconpath = catfile( $self->plugin_directory_share, 'icons', 'spellcheck.png'); 
    4042 
    4143    # create and return icon 
    4244    return Wx::Bitmap->new( $iconpath, Wx::wxBITMAP_TYPE_PNG ); 
    43 } 
    44  
    45 # directory where to find the translations 
    46 sub plugin_locale_directory { 
    47     return catdir( _sharedir(), 'locale' ); 
    4845} 
    4946 
     
    117114 
    118115 
    119 # -- private methods 
    120  
    121 # 
    122 # my $dir = $self->_sharedir; 
    123 # 
    124 # return the private share directory where the module resources are stored. 
    125 # 
    126 sub _sharedir { 
    127     # find resource path 
    128     my $pkgpath = find_installed(__PACKAGE__); 
    129     my (undef, $dirname, undef) = fileparse($pkgpath); 
    130     return catdir( $dirname, 'SpellCheck', 'share' ); 
    131 } 
    132  
    1331161; 
    134117__END__ 
     
    178161 
    179162=item plugin_icon() 
    180  
    181 =item plugin_locale_directory() 
    182163 
    183164=item plugin_name() 
Note: See TracChangeset for help on using the changeset viewer.