deal with case where user removes existing game's ability to connect:

refuse to save until something's put back
This commit is contained in:
Eric House 2015-02-03 22:11:13 -08:00
parent c55bba5aab
commit e0a337ff4c
5 changed files with 15 additions and 9 deletions

View file

@ -554,6 +554,7 @@ public final class R {
reset a game.
*/
public static final int button_discard=0x7f0501b5;
public static final int button_discard_changes=0x7f0502dd;
/**
*/
public static final int button_done=0x7f0501e5;

View file

@ -2304,7 +2304,9 @@
manually.</string>
<string name="config_no_connvia">This game has no way to connect
and cannot be saved. Would you like to discard it, or edit to give
it a way to connect?</string>
and cannot be saved. Would you like to discard your changes, or
edit to give it a way to connect?</string>
<string name="button_edit">Edit</string>
<string name="button_discard_changes">Discard changes</string>
</resources>

View file

@ -1956,7 +1956,8 @@
snoitpo yreve wen dekrowten emag lliw evah ot eb derugifnoc
yllaunam.</string>
<string name="config_no_connvia">Siht emag sah on yaw ot tcennoc
dna tonnac eb devas. Dluow uoy ekil ot dracsid ,ti ro tide ot evig
ti a yaw ot ?tcennoc</string>
dna tonnac eb devas. Dluow uoy ekil ot dracsid ruoy ,segnahc ro
tide ot evig ti a yaw ot ?tcennoc</string>
<string name="button_edit">Tide</string>
<string name="button_discard_changes">Dracsid segnahc</string>
</resources>

View file

@ -1956,7 +1956,8 @@
OPTIONS EVERY NEW NETWORKED GAME WILL HAVE TO BE CONFIGURED
MANUALLY.</string>
<string name="config_no_connvia">THIS GAME HAS NO WAY TO CONNECT
AND CANNOT BE SAVED. WOULD YOU LIKE TO DISCARD IT, OR EDIT TO GIVE
IT A WAY TO CONNECT?</string>
AND CANNOT BE SAVED. WOULD YOU LIKE TO DISCARD YOUR CHANGES, OR
EDIT TO GIVE IT A WAY TO CONNECT?</string>
<string name="button_edit">EDIT</string>
<string name="button_discard_changes">DISCARD CHANGES</string>
</resources>

View file

@ -258,7 +258,7 @@ public class GameConfigDelegate extends DelegateBase
} else {
dlpos = null;
}
ab.setNegativeButton( R.string.button_discard, dlpos );
ab.setNegativeButton( R.string.button_discard_changes, dlpos );
dialog = ab.create();
dialog.setOnDismissListener( new DialogInterface.
@ -645,7 +645,9 @@ public class GameConfigDelegate extends DelegateBase
Utils.launchSettings( m_activity );
break;
case DELETE_AND_EXIT:
deleteGame();
if ( m_forResult ) {
deleteGame();
}
finish();
break;
default:
@ -751,7 +753,6 @@ public class GameConfigDelegate extends DelegateBase
private void deleteGame()
{
Assert.assertTrue( m_forResult );
if ( null != m_gameLock ) {
DBUtils.deleteGame( m_activity, m_gameLock );
m_gameLock.unlock();