mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +01:00
improve corrupt-game experience
add padding to alert, remove cancel button, clean up warning text, and confirm delete.
This commit is contained in:
parent
b165072bed
commit
04000ddf7e
3 changed files with 21 additions and 14 deletions
|
@ -1357,6 +1357,7 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
makeConfirmThenBuilder( R.string.unsafe_open_warning,
|
makeConfirmThenBuilder( R.string.unsafe_open_warning,
|
||||||
Action.QUARANTINE_CLEAR )
|
Action.QUARANTINE_CLEAR )
|
||||||
.setPosButton( R.string.unsafe_open_disregard )
|
.setPosButton( R.string.unsafe_open_disregard )
|
||||||
|
.setNegButton( 0 )
|
||||||
.setActionPair( Action.QUARANTINE_DELETE,
|
.setActionPair( Action.QUARANTINE_DELETE,
|
||||||
R.string.button_delete )
|
R.string.button_delete )
|
||||||
.setParams( rowid, summary )
|
.setParams( rowid, summary )
|
||||||
|
@ -1501,7 +1502,7 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
mkListAdapter();
|
mkListAdapter();
|
||||||
break;
|
break;
|
||||||
case DELETE_GAMES:
|
case DELETE_GAMES:
|
||||||
deleteGames( (long[])params[0], false );
|
deleteGames( (long[])params[0], (Boolean)params[1] );
|
||||||
break;
|
break;
|
||||||
case OPEN_GAME:
|
case OPEN_GAME:
|
||||||
doOpenGame( params );
|
doOpenGame( params );
|
||||||
|
@ -1514,8 +1515,7 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case QUARANTINE_DELETE:
|
case QUARANTINE_DELETE:
|
||||||
rowid = (long)params[0];
|
deleteIfConfirmed( new long[] {(long)params[0]}, true );
|
||||||
deleteGames( new long[] {rowid}, true );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLEAR_SELS:
|
case CLEAR_SELS:
|
||||||
|
@ -2076,12 +2076,7 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.games_game_delete:
|
case R.id.games_game_delete:
|
||||||
String msg = getQuantityString( R.plurals.confirm_seldeletes_fmt,
|
deleteIfConfirmed( selRowIDs, false );
|
||||||
selRowIDs.length, selRowIDs.length );
|
|
||||||
makeConfirmThenBuilder( msg, Action.DELETE_GAMES )
|
|
||||||
.setPosButton( R.string.button_delete )
|
|
||||||
.setParams( selRowIDs )
|
|
||||||
.show();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.games_game_rematch:
|
case R.id.games_game_rematch:
|
||||||
|
@ -2148,7 +2143,7 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
|
|
||||||
// DEBUG only
|
// DEBUG only
|
||||||
case R.id.games_game_invites:
|
case R.id.games_game_invites:
|
||||||
msg = GameUtils.getSummary( m_activity, selRowIDs[0] )
|
String msg = GameUtils.getSummary( m_activity, selRowIDs[0] )
|
||||||
.conTypes.toString( m_activity, true );
|
.conTypes.toString( m_activity, true );
|
||||||
msg = getString( R.string.invites_net_fmt, msg );
|
msg = getString( R.string.invites_net_fmt, msg );
|
||||||
|
|
||||||
|
@ -2700,6 +2695,16 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void deleteIfConfirmed( long[] rowids, boolean skipTell )
|
||||||
|
{
|
||||||
|
String msg = getQuantityString( R.plurals.confirm_seldeletes_fmt,
|
||||||
|
rowids.length, rowids.length );
|
||||||
|
makeConfirmThenBuilder( msg, Action.DELETE_GAMES )
|
||||||
|
.setPosButton( R.string.button_delete )
|
||||||
|
.setParams( rowids, skipTell )
|
||||||
|
.show();
|
||||||
|
}
|
||||||
|
|
||||||
private void deleteGames( long[] rowids, boolean skipTell )
|
private void deleteGames( long[] rowids, boolean skipTell )
|
||||||
{
|
{
|
||||||
for ( long rowid : rowids ) {
|
for ( long rowid : rowids ) {
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<LinearLayout android:orientation="vertical"
|
<LinearLayout android:orientation="vertical"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp"
|
||||||
>
|
>
|
||||||
|
|
||||||
<TextView android:id="@+id/msg"
|
<TextView android:id="@+id/msg"
|
||||||
|
|
|
@ -2568,10 +2568,11 @@
|
||||||
<string name="history_pause_fmt">Paused by: %1$s.</string>
|
<string name="history_pause_fmt">Paused by: %1$s.</string>
|
||||||
<string name="history_msg_fmt"> Message: %1$s.</string>
|
<string name="history_msg_fmt"> Message: %1$s.</string>
|
||||||
<string name="history_autopause">Auto-paused.</string>
|
<string name="history_autopause">Auto-paused.</string>
|
||||||
<string name="unsafe_open_warning">CrossWords seems to have
|
<string name="unsafe_open_warning">This game did not close
|
||||||
crashed recently while this game was open. It may be damaged, and
|
properly last time it was opened. \n\nThat can happen when
|
||||||
opening it might cause another crash. Do you want to try opening
|
CrossWords is force-closed, but it is possible that the game is
|
||||||
it anyway?</string>
|
damaged and will cause a crash when opened. If that happens you
|
||||||
|
may want to delete it.</string>
|
||||||
<string name="unsafe_open_disregard">Open anyway</string>
|
<string name="unsafe_open_disregard">Open anyway</string>
|
||||||
<string name="word_blocked_by_phony">Word or words not found in wordlist %2$s: %1$s.</string>
|
<string name="word_blocked_by_phony">Word or words not found in wordlist %2$s: %1$s.</string>
|
||||||
<string name="gamel_menu_logs">Debug logs</string>
|
<string name="gamel_menu_logs">Debug logs</string>
|
||||||
|
|
Loading…
Reference in a new issue