mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-20 22:26:54 +01:00
more tweaks, e.g. name the group that's preventing deletion, and
select newly created game copy
This commit is contained in:
parent
73e1ac0a93
commit
521f0e3cf3
2 changed files with 8 additions and 4 deletions
|
@ -2139,7 +2139,7 @@
|
||||||
<string name="rename_group_label">Change the name of this group to:</string>
|
<string name="rename_group_label">Change the name of this group to:</string>
|
||||||
<string name="game_name_group_title">Name group</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>
|
cannot be deleted.</string>
|
||||||
|
|
||||||
<string name="no_move_onegroup">Moving is impossible until there
|
<string name="no_move_onegroup">Moving is impossible until there
|
||||||
|
|
|
@ -827,6 +827,7 @@ public class GamesList extends XWExpandableListActivity
|
||||||
byte[] stream = GameUtils.savedGame( this, selRowIDs[0] );
|
byte[] stream = GameUtils.savedGame( this, selRowIDs[0] );
|
||||||
GameLock lock = GameUtils.saveNewGame( this, stream );
|
GameLock lock = GameUtils.saveNewGame( this, stream );
|
||||||
DBUtils.saveSummary( this, lock, summary );
|
DBUtils.saveSummary( this, lock, summary );
|
||||||
|
m_selGames.add( lock.getRowid() );
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -838,6 +839,7 @@ public class GamesList extends XWExpandableListActivity
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.list_item_rename:
|
case R.id.list_item_rename:
|
||||||
|
keepSels = true;
|
||||||
m_rowid = selRowIDs[0];
|
m_rowid = selRowIDs[0];
|
||||||
showDialog( RENAME_GAME );
|
showDialog( RENAME_GAME );
|
||||||
break;
|
break;
|
||||||
|
@ -845,9 +847,11 @@ public class GamesList extends XWExpandableListActivity
|
||||||
// Group menus
|
// Group menus
|
||||||
case R.id.list_group_delete:
|
case R.id.list_group_delete:
|
||||||
keepSels = true;
|
keepSels = true;
|
||||||
if ( m_selGroupIDs
|
long dftGroup = XWPrefs.getDefaultNewGameGroup( this );
|
||||||
.contains( XWPrefs.getDefaultNewGameGroup( this ) ) ) {
|
if ( m_selGroupIDs.contains( dftGroup ) ) {
|
||||||
showOKOnlyDialog( R.string.cannot_delete_default_group );
|
msg = getString( R.string.cannot_delete_default_groupf,
|
||||||
|
m_adapter.groupName( dftGroup ) );
|
||||||
|
showOKOnlyDialog( msg );
|
||||||
} else {
|
} else {
|
||||||
long[] groupIDs = getSelGroupIDs();
|
long[] groupIDs = getSelGroupIDs();
|
||||||
Assert.assertTrue( 0 < groupIDs.length );
|
Assert.assertTrue( 0 < groupIDs.length );
|
||||||
|
|
Loading…
Reference in a new issue