mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
assign dicts as soon as language is changed.
This commit is contained in:
parent
399fc081d7
commit
9013897a5a
3 changed files with 12 additions and 13 deletions
|
@ -693,9 +693,9 @@ public class GameConfig extends XWActivity
|
|||
if ( chosen.equals( m_browseText ) ) {
|
||||
startActivity( Utils.mkDownloadActivity(GameConfig.this) );
|
||||
} else {
|
||||
m_gi.dictLang =
|
||||
DictLangCache.getLangLangCode( GameConfig.this,
|
||||
chosen );
|
||||
m_gi.setLang( DictLangCache.
|
||||
getLangLangCode( GameConfig.this,
|
||||
chosen ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -352,7 +352,7 @@ public class GameUtils {
|
|||
byte[] stream = savedGame( context, path );
|
||||
CurGameInfo gi = new CurGameInfo( context );
|
||||
XwJNI.gi_from_stream( gi, stream );
|
||||
final String[] dictNames = gi.dictNames( false );
|
||||
final String[] dictNames = gi.dictNames();
|
||||
HashSet<String> missingSet;
|
||||
String[] installed = dictList( context );
|
||||
|
||||
|
|
|
@ -137,6 +137,14 @@ public class CurGameInfo {
|
|||
m_inProgress = inProgress;
|
||||
}
|
||||
|
||||
public void setLang( int lang )
|
||||
{
|
||||
if ( dictLang != lang ) {
|
||||
dictLang = lang;
|
||||
assignDicts();
|
||||
}
|
||||
}
|
||||
|
||||
public int getRobotSmartness()
|
||||
{
|
||||
if ( m_smartness == 0 ) {
|
||||
|
@ -239,15 +247,6 @@ public class CurGameInfo {
|
|||
|
||||
public String[] dictNames()
|
||||
{
|
||||
return dictNames( true );
|
||||
}
|
||||
|
||||
public String[] dictNames( boolean assign )
|
||||
{
|
||||
if ( assign ) {
|
||||
assignDicts();
|
||||
}
|
||||
|
||||
String[] result = new String[nPlayers+1];
|
||||
result[0] = dictName;
|
||||
for ( int ii = 0; ii < nPlayers; ++ii ) {
|
||||
|
|
Loading…
Reference in a new issue