mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
use lang name, not code, to build download URL. Fixes download of Experimental lists.
This commit is contained in:
parent
40d63be58b
commit
c82ec8b646
2 changed files with 14 additions and 8 deletions
|
@ -986,11 +986,10 @@ public class DictsDelegate extends ListDelegateBase
|
||||||
Button button = (Button)view.findViewById( R.id.download_button );
|
Button button = (Button)view.findViewById( R.id.download_button );
|
||||||
button.setOnClickListener( new View.OnClickListener() {
|
button.setOnClickListener( new View.OnClickListener() {
|
||||||
public void onClick( View view ) {
|
public void onClick( View view ) {
|
||||||
int langCode = DictLangCache.getLangLangCode( m_activity,
|
DwnldDelegate.
|
||||||
info.m_lang );
|
downloadDictInBack( m_activity, info.m_lang,
|
||||||
DwnldDelegate.downloadDictInBack( m_activity, langCode,
|
info.m_name,
|
||||||
info.m_name,
|
DictsDelegate.this );
|
||||||
DictsDelegate.this );
|
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
|
@ -346,14 +346,21 @@ public class DwnldDelegate extends ListDelegateBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void downloadDictInBack( Context context, String langName,
|
||||||
|
String name,
|
||||||
|
DownloadFinishedListener lstnr )
|
||||||
|
{
|
||||||
|
String url = Utils.makeDictUrl( context, langName, name );
|
||||||
|
// DbgUtils.logf( "downloadDictInBack(lang=%s): url=%s", langName, url );
|
||||||
|
downloadDictInBack( context, url, lstnr );
|
||||||
|
}
|
||||||
|
|
||||||
public static void downloadDictInBack( Context context, int lang,
|
public static void downloadDictInBack( Context context, int lang,
|
||||||
String name,
|
String name,
|
||||||
DownloadFinishedListener lstnr )
|
DownloadFinishedListener lstnr )
|
||||||
{
|
{
|
||||||
String url = Utils.makeDictUrl( context, lang, name );
|
String url = Utils.makeDictUrl( context, lang, name );
|
||||||
// if ( null != lstnr ) {
|
// DbgUtils.logf( "downloadDictInBack(lang=%d): url=%s", lang, url );
|
||||||
// rememberListener( url, name, lstnr );
|
|
||||||
// }
|
|
||||||
downloadDictInBack( context, url, lstnr );
|
downloadDictInBack( context, url, lstnr );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue