more tweaks, e.g. name the group that's preventing deletion, and

select newly created game copy
This commit is contained in:
Eric House 2013-10-24 19:58:21 -07:00
parent 73e1ac0a93
commit 521f0e3cf3
2 changed files with 8 additions and 4 deletions

View file

@ -2139,7 +2139,7 @@
<string name="rename_group_label">Change the name of this group to:</string>
<string name="game_name_group_title">Name group</string>
<string name="cannot_delete_default_group">The group for new games
<string name="cannot_delete_default_groupf">The group for new games, %s,
cannot be deleted.</string>
<string name="no_move_onegroup">Moving is impossible until there

View file

@ -827,6 +827,7 @@ public class GamesList extends XWExpandableListActivity
byte[] stream = GameUtils.savedGame( this, selRowIDs[0] );
GameLock lock = GameUtils.saveNewGame( this, stream );
DBUtils.saveSummary( this, lock, summary );
m_selGames.add( lock.getRowid() );
lock.unlock();
}
break;
@ -838,6 +839,7 @@ public class GamesList extends XWExpandableListActivity
break;
case R.id.list_item_rename:
keepSels = true;
m_rowid = selRowIDs[0];
showDialog( RENAME_GAME );
break;
@ -845,9 +847,11 @@ public class GamesList extends XWExpandableListActivity
// Group menus
case R.id.list_group_delete:
keepSels = true;
if ( m_selGroupIDs
.contains( XWPrefs.getDefaultNewGameGroup( this ) ) ) {
showOKOnlyDialog( R.string.cannot_delete_default_group );
long dftGroup = XWPrefs.getDefaultNewGameGroup( this );
if ( m_selGroupIDs.contains( dftGroup ) ) {
msg = getString( R.string.cannot_delete_default_groupf,
m_adapter.groupName( dftGroup ) );
showOKOnlyDialog( msg );
} else {
long[] groupIDs = getSelGroupIDs();
Assert.assertTrue( 0 < groupIDs.length );