From 6a4e9f2c433beabe7b651d34c3d8bd5b4150ec3e Mon Sep 17 00:00:00 2001 From: Andy2 Date: Tue, 29 Jun 2010 21:15:19 -0700 Subject: [PATCH 01/16] up versions in preparation for new release --- xwords4/android/XWords4/AndroidManifest.xml | 4 ++-- .../XWords4/src/org/eehouse/android/xw4/XWConstants.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/AndroidManifest.xml b/xwords4/android/XWords4/AndroidManifest.xml index ebe3539b3..edc4654c1 100644 --- a/xwords4/android/XWords4/AndroidManifest.xml +++ b/xwords4/android/XWords4/AndroidManifest.xml @@ -21,8 +21,8 @@ to come from a domain that you own or have control over. --> diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java index c71c03e0e..b2aaae04a 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java @@ -23,5 +23,5 @@ package org.eehouse.android.xw4; public interface XWConstants { public static final String GAME_EXTN = ".xwg"; public static final String DICT_EXTN = ".xwd"; - public static final String VERSION_STR = "4.4 beta 8"; + public static final String VERSION_STR = "4.4 beta 9"; } From b83867ff1359a49f67ed73c91713ef2ba679b3bb Mon Sep 17 00:00:00 2001 From: Andy2 Date: Wed, 30 Jun 2010 06:16:23 -0700 Subject: [PATCH 02/16] Configure -> Game settings --- xwords4/android/XWords4/res/values/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index 3dfacdc22..123ab23f9 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -19,7 +19,7 @@ Add game Add game - Configure + Game settings Hide Delete Copy @@ -41,7 +41,7 @@ Crosswords Crosswords dictionaries Game - Configure %s + %s settings Crosswords settings Crosswords From cf5f94ffc73149c8058ae9c2b338b15817a0abab Mon Sep 17 00:00:00 2001 From: Andy2 Date: Wed, 30 Jun 2010 06:31:40 -0700 Subject: [PATCH 03/16] fix crash by providing title id expected by warn-phonies dialog. --- .../XWords4/src/org/eehouse/android/xw4/BoardActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java index 5ad9f1664..711cfa303 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java @@ -1010,6 +1010,7 @@ public class BoardActivity extends Activity implements UtilCtxt { message + getString(R.string.badwords_lost) ); } else { m_dlgBytes = message + getString( R.string.badwords_accept ); + m_dlgTitle = R.string.query_title; accept = 0 != waitBlockingDialog( QUERY_REQUEST_BLK, 0 ); } From 0eab25eec9eb5bd662a607103ea9b7d79ea1b210 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Wed, 30 Jun 2010 06:32:21 -0700 Subject: [PATCH 04/16] make warn-phonies the default. Users are complaining about bogus words being accepted; this may may the feature easier to find. --- xwords4/android/XWords4/res/xml/xwprefs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/res/xml/xwprefs.xml b/xwords4/android/XWords4/res/xml/xwprefs.xml index f46abad60..7b4315d7f 100644 --- a/xwords4/android/XWords4/res/xml/xwprefs.xml +++ b/xwords4/android/XWords4/res/xml/xwprefs.xml @@ -16,7 +16,7 @@ android:title="@string/default_phonies" android:entries="@array/phony_names" android:entryValues="@array/phony_names" - android:defaultValue="@string/phonies_ignore" + android:defaultValue="@string/phonies_warn" /> Date: Wed, 30 Jun 2010 06:45:37 -0700 Subject: [PATCH 05/16] tweak strings --- xwords4/android/XWords4/res/values/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index 123ab23f9..f4cefd8d5 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -197,11 +197,11 @@ are added Volume keys zoom Zoom board using volume keys - rather than an on-screen widget + rather than on-screen buttons Hide titlebar - Increase board size by hiding - the window title that shows the game name + Hiding the game name lets the + board be slightly larger Standalone Host From 2b23c50a70e7a1894ce47833ebca74aff7529e9f Mon Sep 17 00:00:00 2001 From: Andy2 Date: Wed, 30 Jun 2010 19:35:18 -0700 Subject: [PATCH 06/16] change default phonies key name so upgrading users will still get the new value. --- xwords4/android/XWords4/res/values/common_rsrc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/res/values/common_rsrc.xml b/xwords4/android/XWords4/res/values/common_rsrc.xml index b12d52bab..95e4c4e0d 100644 --- a/xwords4/android/XWords4/res/values/common_rsrc.xml +++ b/xwords4/android/XWords4/res/values/common_rsrc.xml @@ -30,7 +30,7 @@ key_board_size key_initial_player_minutes key_default_dict - key_default_phonies + key_default_phonies2 key_default_timerenabled From 3b9240ca842996019d4044898ebe70910cdf414a Mon Sep 17 00:00:00 2001 From: Andy2 Date: Wed, 30 Jun 2010 21:24:17 -0700 Subject: [PATCH 07/16] up version strings/numbers --- xwords4/android/XWords4/AndroidManifest.xml | 4 ++-- .../XWords4/src/org/eehouse/android/xw4/XWConstants.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/AndroidManifest.xml b/xwords4/android/XWords4/AndroidManifest.xml index edc4654c1..37610d8dd 100644 --- a/xwords4/android/XWords4/AndroidManifest.xml +++ b/xwords4/android/XWords4/AndroidManifest.xml @@ -21,8 +21,8 @@ to come from a domain that you own or have control over. --> diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java index b2aaae04a..0394abf1b 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java @@ -23,5 +23,5 @@ package org.eehouse.android.xw4; public interface XWConstants { public static final String GAME_EXTN = ".xwg"; public static final String DICT_EXTN = ".xwd"; - public static final String VERSION_STR = "4.4 beta 9"; + public static final String VERSION_STR = "4.4 beta 10"; } From 9b3463c8e0ecf77758991002765c443d21debc28 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Fri, 2 Jul 2010 06:25:10 -0700 Subject: [PATCH 08/16] use local OnClickListener rather than have Activity implement interface --- .../src/org/eehouse/android/xw4/GamesList.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index e58c3c070..4a97f55e0 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -42,7 +42,7 @@ import junit.framework.Assert; import org.eehouse.android.xw4.jni.*; -public class GamesList extends ListActivity implements View.OnClickListener { +public class GamesList extends ListActivity { private static final int WARN_NODICT = Utils.DIALOG_LAST + 1; private static final int CONFIRM_DELETE_ALL = Utils.DIALOG_LAST + 2; @@ -117,7 +117,13 @@ public class GamesList extends ListActivity implements View.OnClickListener { registerForContextMenu( getListView() ); Button newGameB = (Button)findViewById(R.id.new_game); - newGameB.setOnClickListener( this ); + newGameB.setOnClickListener( new View.OnClickListener() { + @Override + public void onClick( View v ) { + saveNew( new CurGameInfo( GamesList.this ) ); + onContentChanged(); + } + } ); m_adapter = new GameListAdapter( this ); setListAdapter( m_adapter ); @@ -262,11 +268,6 @@ public class GamesList extends ListActivity implements View.OnClickListener { return handled; } - public void onClick( View v ) { - saveNew( new CurGameInfo( this ) ); - onContentChanged(); - } - @Override protected void onListItemClick(ListView l, View v, int position, long id) { From e22479ba03b5f809358278ebd06f1c08e25c5097 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Fri, 2 Jul 2010 07:04:37 -0700 Subject: [PATCH 09/16] add "play game" item to context menu, and invoke that menu on item click. This fixes problem with users apparently not knowing about long-tap and context menu and so not knowing they can configure a game. Unfortunately I can't figure out how to disable long-tap also bringing up the context menu. Yet another preference might be the fix. --- .../XWords4/res/menu/games_list_item_menu.xml | 6 ++-- .../android/XWords4/res/values/strings.xml | 1 + .../org/eehouse/android/xw4/GamesList.java | 29 ++++++++++--------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/xwords4/android/XWords4/res/menu/games_list_item_menu.xml b/xwords4/android/XWords4/res/menu/games_list_item_menu.xml index 6261d9588..874575d1a 100644 --- a/xwords4/android/XWords4/res/menu/games_list_item_menu.xml +++ b/xwords4/android/XWords4/res/menu/games_list_item_menu.xml @@ -1,9 +1,9 @@ - - - + diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index f4cefd8d5..660f9e9a7 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -19,6 +19,7 @@ Add game Add game + Play game Game settings Hide Delete diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index 4a97f55e0..2c2036889 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -177,6 +177,15 @@ public class GamesList extends ListActivity { showDialog( WARN_NODICT ); } else { switch ( id ) { + case R.id.list_item_play: + File file = new File( path ); + Uri uri = Uri.fromFile( file ); + Intent intent = new Intent( Intent.ACTION_EDIT, uri, + this, BoardActivity.class ); + startActivity( intent ); + m_invalPath = path; + break; + case R.id.list_item_config: doConfig( path ); invalPath = path; @@ -269,21 +278,13 @@ public class GamesList extends ListActivity { } @Override - protected void onListItemClick(ListView l, View v, int position, long id) + protected void onListItemClick( ListView l, View v, int position, long id ) { - String[] missingDict = new String[1]; - if ( ! GameUtils.gameDictHere( this, position, missingDict ) ) { - m_missingDict = missingDict[0]; - showDialog( WARN_NODICT ); - } else { - String path = GameUtils.gamesList(this)[position]; - File file = new File( path ); - Uri uri = Uri.fromFile( file ); - Intent intent = new Intent( Intent.ACTION_EDIT, uri, - this, BoardActivity.class ); - startActivity( intent ); - m_invalPath = path; - } + // Might want a preference that, when set, just opens game + // instead of bringing up the list. But that shouldn't be the + // default: new users don't know about long-taps. + super.onListItemClick( l, v, position, id ); + v.showContextMenu(); } private void doConfig( String path ) From 4b14e4aeb910c2fff88a6fc8e6007c15363de5a6 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Fri, 2 Jul 2010 07:14:48 -0700 Subject: [PATCH 10/16] break most top-level prefs into behavior or appearance --- .../android/XWords4/res/values/strings.xml | 6 ++ xwords4/android/XWords4/res/xml/xwprefs.xml | 78 ++++++++++--------- 2 files changed, 49 insertions(+), 35 deletions(-) diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index 660f9e9a7..9bc9cbcdd 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -242,6 +242,12 @@ New game defaults Default settings for new games + Appearance + Settings controlling + appearance + Behavior + Settings controlling app behavior + Game dictionary Handle phonies Board size diff --git a/xwords4/android/XWords4/res/xml/xwprefs.xml b/xwords4/android/XWords4/res/xml/xwprefs.xml index 7b4315d7f..c7b2223e4 100644 --- a/xwords4/android/XWords4/res/xml/xwprefs.xml +++ b/xwords4/android/XWords4/res/xml/xwprefs.xml @@ -39,42 +39,50 @@ - + + + + + - - - - - - + + + + + + Date: Fri, 2 Jul 2010 18:08:22 -0700 Subject: [PATCH 11/16] add preference, as yet unused, to control whether tap drops context menu or opens game (as it used to do). --- xwords4/android/XWords4/res/values/common_rsrc.xml | 1 + xwords4/android/XWords4/res/values/strings.xml | 3 +++ xwords4/android/XWords4/res/xml/xwprefs.xml | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/xwords4/android/XWords4/res/values/common_rsrc.xml b/xwords4/android/XWords4/res/values/common_rsrc.xml index 95e4c4e0d..a017f839e 100644 --- a/xwords4/android/XWords4/res/values/common_rsrc.xml +++ b/xwords4/android/XWords4/res/values/common_rsrc.xml @@ -11,6 +11,7 @@ key_sort_tiles key_hide_values key_ringer_zoom + key_click_launches key_hide_title key_clr_player0 key_clr_player1 diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index 9bc9cbcdd..27822ae3f 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -199,6 +199,9 @@ Volume keys zoom Zoom board using volume keys rather than on-screen buttons + Tap to play + Tapping on game in games + list opens it rather than dropping a menu Hide titlebar Hiding the game name lets the diff --git a/xwords4/android/XWords4/res/xml/xwprefs.xml b/xwords4/android/XWords4/res/xml/xwprefs.xml index c7b2223e4..b7a2be3c1 100644 --- a/xwords4/android/XWords4/res/xml/xwprefs.xml +++ b/xwords4/android/XWords4/res/xml/xwprefs.xml @@ -82,6 +82,11 @@ android:summary="@string/ringer_zoom_summary" android:defaultValue="false" /> + Date: Sun, 4 Jul 2010 12:09:22 -0700 Subject: [PATCH 12/16] fix crash when copying a new game by testing for null scores array --- .../src/org/eehouse/android/xw4/DBUtils.java | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java index 0a1bef83e..a74bbc825 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java @@ -60,14 +60,16 @@ public class DBUtils { String scoresStr = cursor.getString( cursor.getColumnIndex(DBHelper.SCORES)); - StringTokenizer st = new StringTokenizer( scoresStr ); - int[] scores = new int[st.countTokens()]; - for ( int ii = 0; ii < scores.length; ++ii ) { - Assert.assertTrue( st.hasMoreTokens() ); - String token = st.nextToken(); - scores[ii] = Integer.parseInt( token ); + if ( null != scoresStr ) { + StringTokenizer st = new StringTokenizer( scoresStr ); + int[] scores = new int[st.countTokens()]; + for ( int ii = 0; ii < scores.length; ++ii ) { + Assert.assertTrue( st.hasMoreTokens() ); + String token = st.nextToken(); + scores[ii] = Integer.parseInt( token ); + } + summary.scores = scores; } - summary.scores = scores; int col = cursor.getColumnIndex( DBHelper.CONTYPE ); if ( col >= 0 ) { @@ -103,11 +105,13 @@ public class DBUtils { values.put( DBHelper.NUM_MOVES, summary.nMoves ); values.put( DBHelper.GAME_OVER, summary.gameOver ); - StringBuffer sb = new StringBuffer(); - for ( int score : summary.scores ) { - sb.append( String.format( "%d ", score ) ); + if ( null != summary.scores ) { + StringBuffer sb = new StringBuffer(); + for ( int score : summary.scores ) { + sb.append( String.format( "%d ", score ) ); + } + values.put( DBHelper.SCORES, sb.toString() ); } - values.put( DBHelper.SCORES, sb.toString() ); if ( null != summary.conType ) { values.put( DBHelper.CONTYPE, summary.conType.ordinal() ); From 6264327d6339e03a60350c833ec4f7775c776669 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Sun, 4 Jul 2010 12:30:09 -0700 Subject: [PATCH 13/16] formatting change; whitespace only --- xwords4/android/XWords4/res/xml/xwprefs.xml | 324 ++++++++++---------- 1 file changed, 162 insertions(+), 162 deletions(-) diff --git a/xwords4/android/XWords4/res/xml/xwprefs.xml b/xwords4/android/XWords4/res/xml/xwprefs.xml index b7a2be3c1..7607fab1e 100644 --- a/xwords4/android/XWords4/res/xml/xwprefs.xml +++ b/xwords4/android/XWords4/res/xml/xwprefs.xml @@ -3,177 +3,177 @@ - + - + - + - + - + - + - + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - + + From dfe1d5f24573f51d9da0bd27d417f521f1e5fd7a Mon Sep 17 00:00:00 2001 From: Andy2 Date: Sun, 4 Jul 2010 12:52:36 -0700 Subject: [PATCH 14/16] break separate menu handling from context-menu stuff so can call from onclick handler, then use new preference to decide whether to launch game or drop context menu on click --- .../org/eehouse/android/xw4/GamesList.java | 159 +++++++++--------- .../eehouse/android/xw4/jni/CommonPrefs.java | 5 + 2 files changed, 88 insertions(+), 76 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index 2c2036889..dcf41a157 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -151,10 +151,6 @@ public class GamesList extends ListActivity { @Override public boolean onContextItemSelected( MenuItem item ) { - boolean handled = true; - byte[] stream; - String invalPath = null; - AdapterView.AdapterContextMenuInfo info; try { info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo(); @@ -163,74 +159,7 @@ public class GamesList extends ListActivity { return false; } - String path = GameUtils.gamesList( this )[info.position]; - int id = item.getItemId(); - - if ( R.id.list_item_delete == id ) { - GameUtils.deleteGame( this, path ); - invalPath = path; - } else { - String[] missingName = new String[1]; - boolean hasDict = GameUtils.gameDictHere( this, path, missingName ); - if ( !hasDict ) { - m_missingDict = missingName[0]; - showDialog( WARN_NODICT ); - } else { - switch ( id ) { - case R.id.list_item_play: - File file = new File( path ); - Uri uri = Uri.fromFile( file ); - Intent intent = new Intent( Intent.ACTION_EDIT, uri, - this, BoardActivity.class ); - startActivity( intent ); - m_invalPath = path; - break; - - case R.id.list_item_config: - doConfig( path ); - invalPath = path; - break; - - case R.id.list_item_reset: - GameUtils.resetGame( this, path, path ); - invalPath = path; - break; - case R.id.list_item_new_from: - String newName = GameUtils.resetGame( this, path ); - invalPath = newName; - break; - - case R.id.list_item_copy: - stream = GameUtils.savedGame( this, path ); - newName = GameUtils.saveGame( this, stream ); - DBUtils.saveSummary( newName, DBUtils.getSummary( this, path ) ); - break; - - // These require some notion of predictable sort order. - // Maybe put off until I'm using a db? - // case R.id.list_item_hide: - // case R.id.list_item_move_up: - // case R.id.list_item_move_down: - // case R.id.list_item_move_to_top: - // case R.id.list_item_move_to_bottom: - // Utils.notImpl( this ); - // break; - default: - handled = false; - break; - } - } - } - - if ( null != invalPath ) { - m_adapter.inval( invalPath ); - } - - if ( handled ) { - onContentChanged(); - } - - return handled; + return handleMenuItem( item.getItemId(), info.position ); } // onContextItemSelected public boolean onCreateOptionsMenu( Menu menu ) @@ -280,13 +209,91 @@ public class GamesList extends ListActivity { @Override protected void onListItemClick( ListView l, View v, int position, long id ) { - // Might want a preference that, when set, just opens game - // instead of bringing up the list. But that shouldn't be the - // default: new users don't know about long-taps. super.onListItemClick( l, v, position, id ); - v.showContextMenu(); + + if ( CommonPrefs.getClickLaunches( this ) ) { + handleMenuItem( R.id.list_item_play, position ); + } else { + v.showContextMenu(); + } } + private boolean handleMenuItem( int menuID, int position ) + { + boolean handled = true; + byte[] stream; + String invalPath = null; + + String path = GameUtils.gamesList( this )[position]; + + if ( R.id.list_item_delete == menuID ) { + GameUtils.deleteGame( this, path ); + invalPath = path; + } else { + String[] missingName = new String[1]; + boolean hasDict = GameUtils.gameDictHere( this, path, missingName ); + if ( !hasDict ) { + m_missingDict = missingName[0]; + showDialog( WARN_NODICT ); + } else { + switch ( menuID ) { + case R.id.list_item_play: + File file = new File( path ); + Uri uri = Uri.fromFile( file ); + Intent intent = new Intent( Intent.ACTION_EDIT, uri, + this, BoardActivity.class ); + startActivity( intent ); + m_invalPath = path; + break; + + case R.id.list_item_config: + doConfig( path ); + invalPath = path; + break; + + case R.id.list_item_reset: + GameUtils.resetGame( this, path, path ); + invalPath = path; + break; + case R.id.list_item_new_from: + String newName = GameUtils.resetGame( this, path ); + invalPath = newName; + break; + + case R.id.list_item_copy: + stream = GameUtils.savedGame( this, path ); + newName = GameUtils.saveGame( this, stream ); + DBUtils.saveSummary( newName, + DBUtils.getSummary( this, path ) ); + break; + + // These require some notion of predictable sort order. + // Maybe put off until I'm using a db? + // case R.id.list_item_hide: + // case R.id.list_item_move_up: + // case R.id.list_item_move_down: + // case R.id.list_item_move_to_top: + // case R.id.list_item_move_to_bottom: + // Utils.notImpl( this ); + // break; + default: + handled = false; + break; + } + } + } + + if ( null != invalPath ) { + m_adapter.inval( invalPath ); + } + + if ( handled ) { + onContentChanged(); + } + + return handled; + } // handleMenuItem + private void doConfig( String path ) { Uri uri = Uri.fromFile( new File(path) ); diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/CommonPrefs.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/CommonPrefs.java index e00406b7f..1c8195c54 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/CommonPrefs.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/CommonPrefs.java @@ -217,6 +217,11 @@ public class CommonPrefs { return getBoolean( context, R.string.key_hide_title, true ); } + public static boolean getClickLaunches( Context context ) + { + return getBoolean( context, R.string.key_click_launches, false ); + } + private static boolean getBoolean( Context context, int keyID, boolean defaultValue ) { From c2aaa04517858816e40283c6276faa21ad8aabe6 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Sun, 4 Jul 2010 12:53:45 -0700 Subject: [PATCH 15/16] move colors editing prefs screen into appearance prefs screen --- xwords4/android/XWords4/res/xml/xwprefs.xml | 120 ++++++++++---------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/xwords4/android/XWords4/res/xml/xwprefs.xml b/xwords4/android/XWords4/res/xml/xwprefs.xml index 7607fab1e..a598413a5 100644 --- a/xwords4/android/XWords4/res/xml/xwprefs.xml +++ b/xwords4/android/XWords4/res/xml/xwprefs.xml @@ -57,6 +57,66 @@ android:summary="@string/hide_title_summary" android:defaultValue="true" /> + + + + + + + + + + + + + + - - - - - - - - - - - - - - From f0a5fa603447ead9be3a86e8fd91188e41bb927f Mon Sep 17 00:00:00 2001 From: Andy2 Date: Sun, 4 Jul 2010 12:56:59 -0700 Subject: [PATCH 16/16] up version numbers/strings for beta 11 --- xwords4/android/XWords4/AndroidManifest.xml | 4 ++-- .../XWords4/src/org/eehouse/android/xw4/XWConstants.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/AndroidManifest.xml b/xwords4/android/XWords4/AndroidManifest.xml index 37610d8dd..4e5cf6157 100644 --- a/xwords4/android/XWords4/AndroidManifest.xml +++ b/xwords4/android/XWords4/AndroidManifest.xml @@ -21,8 +21,8 @@ to come from a domain that you own or have control over. --> diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java index 0394abf1b..b873fa6ec 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWConstants.java @@ -23,5 +23,5 @@ package org.eehouse.android.xw4; public interface XWConstants { public static final String GAME_EXTN = ".xwg"; public static final String DICT_EXTN = ".xwd"; - public static final String VERSION_STR = "4.4 beta 10"; + public static final String VERSION_STR = "4.4 beta 11"; }