cleanup -- no code change beyond ordering and renaming.

This commit is contained in:
Andy2 2011-09-03 19:41:36 -07:00
parent 9956bc417d
commit 471199ba2f

View file

@ -167,7 +167,7 @@ public class GameConfig extends XWActivity
onClick( DialogInterface dlg, onClick( DialogInterface dlg,
int button ) { int button ) {
getPlayerSettings( dlg ); getPlayerSettings( dlg );
loadPlayers(); loadPlayersList();
} }
}) })
.setNegativeButton( R.string.button_cancel, null ) .setNegativeButton( R.string.button_cancel, null )
@ -192,18 +192,19 @@ public class GameConfig extends XWActivity
// break; // break;
case FORCE_REMOTE: case FORCE_REMOTE:
dlpos = new DialogInterface.OnClickListener() {
public void onClick( DialogInterface dlg,
int whichButton ) {
loadPlayersList();
}
};
dialog = new AlertDialog.Builder( this ) dialog = new AlertDialog.Builder( this )
.setTitle( R.string.force_title ) .setTitle( R.string.force_title )
.setView( Utils.inflate( this, layoutForDlg(id) ) ) .setView( Utils.inflate( this, layoutForDlg(id) ) )
.setPositiveButton( R.string.button_ok, .setPositiveButton( R.string.button_ok, dlpos )
new DialogInterface.OnClickListener() {
public void onClick( DialogInterface dlg,
int whichButton ) {
loadPlayers();
}
})
.create(); .create();
dialog.setOnDismissListener( new DialogInterface.OnDismissListener() { DialogInterface.OnDismissListener dismiss =
new DialogInterface.OnDismissListener() {
@Override @Override
public void onDismiss( DialogInterface di ) public void onDismiss( DialogInterface di )
{ {
@ -211,10 +212,11 @@ public class GameConfig extends XWActivity
Toast.makeText( GameConfig.this, Toast.makeText( GameConfig.this,
R.string.forced_consistent, R.string.forced_consistent,
Toast.LENGTH_SHORT).show(); Toast.LENGTH_SHORT).show();
loadPlayers(); loadPlayersList();
} }
} }
}); };
dialog.setOnDismissListener( dismiss );
break; break;
case CONFIRM_CHANGE_PLAY: case CONFIRM_CHANGE_PLAY:
case CONFIRM_CHANGE: case CONFIRM_CHANGE:
@ -495,7 +497,7 @@ public class GameConfig extends XWActivity
adjustConnectStuff(); adjustConnectStuff();
} }
loadPlayers(); loadPlayersList();
configLangSpinner(); configLangSpinner();
m_phoniesSpinner.setSelection( m_gi.phoniesAction.ordinal() ); m_phoniesSpinner.setSelection( m_gi.phoniesAction.ordinal() );
@ -532,7 +534,7 @@ public class GameConfig extends XWActivity
public void deleteCalled( int myPosition, final String name ) public void deleteCalled( int myPosition, final String name )
{ {
if ( m_gi.delete( myPosition ) ) { if ( m_gi.delete( myPosition ) ) {
loadPlayers(); loadPlayersList();
} }
} }
@ -562,11 +564,11 @@ public class GameConfig extends XWActivity
int curIndex = m_gi.nPlayers; int curIndex = m_gi.nPlayers;
if ( curIndex < CurGameInfo.MAX_NUM_PLAYERS ) { if ( curIndex < CurGameInfo.MAX_NUM_PLAYERS ) {
m_gi.addPlayer(); // ups nPlayers m_gi.addPlayer(); // ups nPlayers
loadPlayers(); loadPlayersList();
} }
} else if ( m_jugglePlayersButton == view ) { } else if ( m_jugglePlayersButton == view ) {
m_gi.juggle(); m_gi.juggle();
loadPlayers(); loadPlayersList();
} else if ( m_joinPublicCheck == view ) { } else if ( m_joinPublicCheck == view ) {
adjustConnectStuff(); adjustConnectStuff();
} else if ( m_gameLockedCheck == view ) { } else if ( m_gameLockedCheck == view ) {
@ -619,7 +621,7 @@ public class GameConfig extends XWActivity
return consumed || super.onKeyDown( keyCode, event ); return consumed || super.onKeyDown( keyCode, event );
} }
private void loadPlayers() private void loadPlayersList()
{ {
m_playerLayout.removeAllViews(); m_playerLayout.removeAllViews();
@ -669,7 +671,7 @@ public class GameConfig extends XWActivity
showDialog( FORCE_REMOTE ); showDialog( FORCE_REMOTE );
} }
adjustPlayersLabel(); adjustPlayersLabel();
} // loadPlayers } // loadPlayersList
private String[] buildListWithBrowse( String[] input ) private String[] buildListWithBrowse( String[] input )
{ {