From a17ff20db758a028a5857acd8cc7c7d49f4a4395 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Sun, 21 Aug 2011 13:52:51 -0700 Subject: [PATCH 1/4] clean up background check pref wording to Chris's suggestions --- xwords4/android/XWords4/res/values/strings.xml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index 8cb0be23e..8f6c3f218 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -417,15 +417,14 @@ Recent changes Recent changes - Move check frequency - 60 seconds - 5 minutes - 15 minutes - 30 minutes - Hourly + Background move check + Never check + Every 5 minutes + Every 15 minutes + Every 30 minutes + Every hour Every six hours Once every day - Never check Play sound Vibrate From 9612b28b1ffef5d487114d5cc9115cd948e8d6a7 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Sun, 21 Aug 2011 14:20:59 -0700 Subject: [PATCH 2/4] use goto to avoid having multiple returns. No behavior change. --- xwords4/common/mscore.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/xwords4/common/mscore.c b/xwords4/common/mscore.c index 517fdaca2..f3dc718b5 100644 --- a/xwords4/common/mscore.c +++ b/xwords4/common/mscore.c @@ -339,6 +339,7 @@ modelIsEmptyAt( const ModelCtxt* model, XP_U16 col, XP_U16 row ) static XP_Bool isLegalMove( ModelCtxt* model, MoveInfo* mInfo, XP_Bool silent ) { + XP_Bool result = XP_TRUE; XP_S16 high, low; XP_S16 col, row; XP_S16* incr; @@ -376,11 +377,12 @@ isLegalMove( ModelCtxt* model, MoveInfo* mInfo, XP_Bool silent ) if ( !silent ) { util_userError( model->vol.util, ERR_NO_EMPTIES_IN_TURN ); } - return XP_FALSE; + result = XP_FALSE; + goto exit; } } XP_ASSERT( newTile == &moves[nTiles] ); - return XP_TRUE; + goto exit; /* else we're looking at 2b: make sure there's some contact UNLESS this is the first move */ @@ -389,13 +391,13 @@ isLegalMove( ModelCtxt* model, MoveInfo* mInfo, XP_Bool silent ) if ( low != 0 ) { *incr = low - 1; if ( !modelIsEmptyAt( model, col, row ) ) { - return XP_TRUE; + goto exit; } } if ( high != MAX_ROWS-1 ) { *incr = high+1; if ( !modelIsEmptyAt( model, col, row ) ) { - return XP_TRUE; + goto exit; } } /* now the neighbors above... */ @@ -403,7 +405,7 @@ isLegalMove( ModelCtxt* model, MoveInfo* mInfo, XP_Bool silent ) --*commonP; /* decrement whatever's not being looped over */ for ( *incr = low; *incr <= high; ++*incr ) { if ( !modelIsEmptyAt( model, col, row ) ) { - return XP_TRUE; + goto exit; } } ++*commonP;/* undo the decrement */ @@ -413,7 +415,7 @@ isLegalMove( ModelCtxt* model, MoveInfo* mInfo, XP_Bool silent ) ++*commonP; for ( *incr = low; *incr <= high; ++*incr ) { if ( !modelIsEmptyAt( model, col, row ) ) { - return XP_TRUE; + goto exit; } } --*commonP; @@ -424,22 +426,25 @@ isLegalMove( ModelCtxt* model, MoveInfo* mInfo, XP_Bool silent ) if ( ( commonCoord == star_row) && ( low <= star_row) && ( high >= star_row ) ) { if ( nTiles > 1 ) { - return XP_TRUE; + goto exit; } else { if ( !silent ) { util_userError(model->vol.util, ERR_TWO_TILES_FIRST_MOVE); } - return XP_FALSE; + result = XP_FALSE; + goto exit; } } else { if ( !silent ) { util_userError( model->vol.util, ERR_TILES_MUST_CONTACT ); } - return XP_FALSE; + result = XP_FALSE; + goto exit; } } - XP_ASSERT( XP_FALSE ); - return XP_FALSE; /* keep compiler happy */ + XP_ASSERT( XP_FALSE ); /* should not get here */ + exit: + return result; } /* isLegalMove */ XP_U16 From 04834c910b3e627a0d84708a22ce7d895056f9dd Mon Sep 17 00:00:00 2001 From: Andy2 Date: Sun, 21 Aug 2011 14:27:50 -0700 Subject: [PATCH 3/4] more dictionary->wordlist terminology change: debug-only preference and download URL. --- xwords4/android/XWords4/res/values/common_rsrc.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/res/values/common_rsrc.xml b/xwords4/android/XWords4/res/values/common_rsrc.xml index 0b8d1ba2b..66a2c3a4d 100644 --- a/xwords4/android/XWords4/res/values/common_rsrc.xml +++ b/xwords4/android/XWords4/res/values/common_rsrc.xml @@ -32,7 +32,7 @@ key_relay_port2 key_proxy_port key_sms_port - key_dict_host2 + key_dict_host3 key_logging_on key_init_hintsallowed key_init_autojuggle @@ -77,7 +77,7 @@ eehouse.org - http://eehouse.org/and_dicts_hh + http://eehouse.org/and_wordlists 4.4 beta 33 //%1$s/redir.php @@ -86,7 +86,7 @@ You should never need these... Relay host Invite redirect host - Dictionary download URL + Wordlist download URL Enable logging Relay game port Relay device port From d1b6bc16cf31d4d0c3d1095d9651899854990686 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Sun, 21 Aug 2011 14:30:00 -0700 Subject: [PATCH 4/4] add the standalone/network icons from GamesList display to the new games dialog so users get some association going. --- .../android/XWords4/res/layout/new_game.xml | 44 ++++++++++++++----- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/xwords4/android/XWords4/res/layout/new_game.xml b/xwords4/android/XWords4/res/layout/new_game.xml index bc6d56145..0a7afb455 100644 --- a/xwords4/android/XWords4/res/layout/new_game.xml +++ b/xwords4/android/XWords4/res/layout/new_game.xml @@ -28,12 +28,23 @@ android:textAppearance="?android:attr/textAppearanceMedium" android:text="@string/newgame_local_header" /> + + + + - - - + + + + +