Changeset 4198


Ignore:
Timestamp:
04/28/09 08:49:54 (3 years ago)
Author:
jquelin
Message:

selecting current dictionary by default

File:
1 edited

Legend:

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

    r4195 r4198  
    121121    my $engine  = Padre::Plugin::SpellCheck::Engine->new($self->_plugin); 
    122122    my @choices = $engine->dictionaries; 
    123     my $default = $choices[0]; 
     123    my %choices = map { $_ => 1 } @choices; 
     124    my $deflang = $self->_plugin->config->{dictionary}; 
     125    my $default = exists $choices{$deflang} ? $deflang : $choices[0]; 
    124126 
    125127    # create the controls 
Note: See TracChangeset for help on using the changeset viewer.