mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-01 06:19:57 +01:00
improve download-or-cancel messages
This commit is contained in:
parent
8250447eca
commit
bffb231d13
2 changed files with 19 additions and 12 deletions
|
@ -1461,9 +1461,10 @@
|
|||
downloading and not opening the game. This first message
|
||||
takes wordlist name and language substituted in for %1$ and
|
||||
%2$ -->
|
||||
<string name="no_dictf">Unable to open game \"%1$s\" because no
|
||||
%2$s wordlist found. (It may have been deleted, or stored on
|
||||
an external card that is no longer available.)</string>
|
||||
<string name="no_dictf">You need to download a replacement %2$s
|
||||
wordlist before you can open game \"%1$s\". (The original may have
|
||||
been deleted or stored on an external card that is no longer
|
||||
available.)</string>
|
||||
|
||||
<!-- This is an alternative message presented when there's also
|
||||
the option of downloading another wordlist. Game name,
|
||||
|
@ -2114,10 +2115,10 @@
|
|||
play Crosswords using the wordlist %2$s (for play in %3$s), but it
|
||||
is not installed. Would you like to download the wordlist or
|
||||
decline the invitation?</string>
|
||||
<string name="invite_dict_missing_body_nonamef">You have been invited to
|
||||
play Crosswords using the wordlist %2$s (for play in %3$s), but it
|
||||
is not installed. Would you like to download the wordlist or
|
||||
decline the invitation?</string>
|
||||
<string name="invite_dict_missing_body_nonamef">You have been
|
||||
invited to play Crosswords using the wordlist %2$s (for play in
|
||||
%3$s), but it is not installed. Would you like to download the
|
||||
wordlist?</string>
|
||||
<string name="button_decline">Decline</string>
|
||||
|
||||
<string name="downloadingf">Downloading %s...</string>
|
||||
|
|
|
@ -57,9 +57,10 @@ public class GamesList extends XWListActivity
|
|||
|
||||
private static final int WARN_NODICT = DlgDelegate.DIALOG_LAST + 1;
|
||||
private static final int WARN_NODICT_SUBST = WARN_NODICT + 1;
|
||||
private static final int SHOW_SUBST = WARN_NODICT + 2;
|
||||
private static final int GET_NAME = WARN_NODICT + 3;
|
||||
private static final int RENAME_GAME = WARN_NODICT + 4;
|
||||
private static final int WARN_NODICT_NEW = WARN_NODICT + 2;
|
||||
private static final int SHOW_SUBST = WARN_NODICT + 3;
|
||||
private static final int GET_NAME = WARN_NODICT + 4;
|
||||
private static final int RENAME_GAME = WARN_NODICT + 5;
|
||||
|
||||
private static final String SAVE_ROWID = "SAVE_ROWID";
|
||||
private static final String SAVE_DICTNAMES = "SAVE_DICTNAMES";
|
||||
|
@ -102,6 +103,7 @@ public class GamesList extends XWListActivity
|
|||
AlertDialog.Builder ab;
|
||||
switch ( id ) {
|
||||
case WARN_NODICT:
|
||||
case WARN_NODICT_NEW:
|
||||
case WARN_NODICT_SUBST:
|
||||
lstnr = new DialogInterface.OnClickListener() {
|
||||
public void onClick( DialogInterface dlg, int item ) {
|
||||
|
@ -125,6 +127,10 @@ public class GamesList extends XWListActivity
|
|||
if ( WARN_NODICT == id ) {
|
||||
message = getString( R.string.no_dictf,
|
||||
gameName, langName );
|
||||
} else if ( WARN_NODICT_NEW == id ) {
|
||||
message =
|
||||
getString( R.string.invite_dict_missing_body_nonamef,
|
||||
null, m_missingDictName, langName );
|
||||
} else {
|
||||
message = getString( R.string.no_dict_substf,
|
||||
gameName, m_missingDictName,
|
||||
|
@ -134,7 +140,7 @@ public class GamesList extends XWListActivity
|
|||
ab = new AlertDialog.Builder( this )
|
||||
.setTitle( R.string.no_dict_title )
|
||||
.setMessage( message )
|
||||
.setPositiveButton( R.string.button_ok, null )
|
||||
.setPositiveButton( R.string.button_cancel, null )
|
||||
.setNegativeButton( R.string.button_download, lstnr )
|
||||
;
|
||||
if ( WARN_NODICT_SUBST == id ) {
|
||||
|
@ -691,7 +697,7 @@ public class GamesList extends XWListActivity
|
|||
m_netLaunchInfo = nli;
|
||||
m_missingDictLang = nli.lang;
|
||||
m_missingDictName = nli.dict;
|
||||
showDialog( WARN_NODICT );
|
||||
showDialog( WARN_NODICT_NEW );
|
||||
}
|
||||
return haveDict;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue