rename ivar

This commit is contained in:
Eric House 2013-10-19 10:07:03 -07:00
parent 91142b1976
commit df48c5d142

View file

@ -133,7 +133,7 @@ public class GamesList extends XWExpandableListActivity
private NetLaunchInfo m_netLaunchInfo; private NetLaunchInfo m_netLaunchInfo;
private GameNamer m_namer; private GameNamer m_namer;
private boolean m_gameLaunched = false; private boolean m_gameLaunched = false;
private HashSet<Long> m_selectedRows; private HashSet<Long> m_selectedGames;
private HashSet<Integer> m_selectedGroups; private HashSet<Integer> m_selectedGroups;
@Override @Override
@ -363,7 +363,7 @@ public class GamesList extends XWExpandableListActivity
getBundledData( savedInstanceState ); getBundledData( savedInstanceState );
m_selectedRows = new HashSet<Long>(); m_selectedGames = new HashSet<Long>();
m_selectedGroups = new HashSet<Integer>(); m_selectedGroups = new HashSet<Integer>();
setContentView(R.layout.game_list); setContentView(R.layout.game_list);
@ -503,10 +503,10 @@ public class GamesList extends XWExpandableListActivity
if ( toggled instanceof GameListItem ) { if ( toggled instanceof GameListItem ) {
long rowid = ((GameListItem)toggled).getRowID(); long rowid = ((GameListItem)toggled).getRowID();
if ( selected ) { if ( selected ) {
m_selectedRows.add( rowid ); m_selectedGames.add( rowid );
clearSelectedGroups(); clearSelectedGroups();
} else { } else {
m_selectedRows.remove( rowid ); m_selectedGames.remove( rowid );
} }
} else if ( toggled instanceof GameListGroup ) { } else if ( toggled instanceof GameListGroup ) {
int position = ((GameListGroup)toggled).getGroupPosition(); int position = ((GameListGroup)toggled).getGroupPosition();
@ -522,7 +522,7 @@ public class GamesList extends XWExpandableListActivity
public boolean getSelected( long rowid ) public boolean getSelected( long rowid )
{ {
return m_selectedRows.contains( rowid ); return m_selectedGames.contains( rowid );
} }
// BTService.MultiEventListener interface // BTService.MultiEventListener interface
@ -599,7 +599,7 @@ public class GamesList extends XWExpandableListActivity
@Override @Override
public void onBackPressed() { public void onBackPressed() {
if ( 0 == m_selectedRows.size() ) { if ( 0 == m_selectedGames.size() ) {
super.onBackPressed(); super.onBackPressed();
} else { } else {
clearSelectedRows(); clearSelectedRows();
@ -618,7 +618,7 @@ public class GamesList extends XWExpandableListActivity
@Override @Override
public boolean onPrepareOptionsMenu( Menu menu ) public boolean onPrepareOptionsMenu( Menu menu )
{ {
int nGamesSelected = m_selectedRows.size(); int nGamesSelected = m_selectedGames.size();
int nGroupsSelected = m_selectedGroups.size(); int nGroupsSelected = m_selectedGroups.size();
boolean nothingSelected = 0 == (nGroupsSelected + nGamesSelected); boolean nothingSelected = 0 == (nGroupsSelected + nGamesSelected);
Assert.assertTrue( 0 == nGamesSelected || 0 == nGroupsSelected ); Assert.assertTrue( 0 == nGamesSelected || 0 == nGroupsSelected );
@ -679,13 +679,13 @@ public class GamesList extends XWExpandableListActivity
break; break;
case R.id.listl_item_config: case R.id.listl_item_config:
long rowid = m_selectedRows.iterator().next(); long rowid = m_selectedGames.iterator().next();
GameUtils.doConfig( this, rowid, GameConfig.class ); GameUtils.doConfig( this, rowid, GameConfig.class );
break; break;
case R.id.gamel_menu_delete: case R.id.gamel_menu_delete:
String msg = Utils.format( this, R.string.confirm_seldeletesf, String msg = Utils.format( this, R.string.confirm_seldeletesf,
m_selectedRows.size() ); m_selectedGames.size() );
showConfirmThen( msg, R.string.button_delete, showConfirmThen( msg, R.string.button_delete,
GamesActions.DELETE_SELGAMES.ordinal() ); GamesActions.DELETE_SELGAMES.ordinal() );
break; break;
@ -1049,11 +1049,11 @@ public class GamesList extends XWExpandableListActivity
private void deleteSelected() private void deleteSelected()
{ {
for ( Iterator<Long> iter = m_selectedRows.iterator(); iter.hasNext(); ) { for ( Iterator<Long> iter = m_selectedGames.iterator(); iter.hasNext(); ) {
long rowid = iter.next(); long rowid = iter.next();
GameUtils.deleteGame( this, rowid, false ); GameUtils.deleteGame( this, rowid, false );
} }
m_selectedRows.clear(); m_selectedGames.clear();
Utils.invalidateOptionsMenuIf( this ); Utils.invalidateOptionsMenuIf( this );
NetUtils.informOfDeaths( this ); NetUtils.informOfDeaths( this );
} }
@ -1071,9 +1071,9 @@ public class GamesList extends XWExpandableListActivity
private void clearSelectedRows() private void clearSelectedRows()
{ {
// clear any selection // clear any selection
if ( 0 < m_selectedRows.size() ) { if ( 0 < m_selectedGames.size() ) {
m_adapter.clearSelectedRows( m_selectedRows ); m_adapter.clearSelectedRows( m_selectedGames );
m_selectedRows.clear(); m_selectedGames.clear();
} }
} }
@ -1153,8 +1153,8 @@ public class GamesList extends XWExpandableListActivity
private long getSelRowID() private long getSelRowID()
{ {
long result = -1; long result = -1;
if ( 1 == m_selectedRows.size() ) { if ( 1 == m_selectedGames.size() ) {
result = m_selectedRows.iterator().next(); result = m_selectedGames.iterator().next();
} }
return result; return result;
} }