DroidFish: Made display of variations in the status area optional.

This commit is contained in:
Peter Osterlund
2012-09-29 13:07:01 +00:00
parent 566f76f598
commit 4541e83cf0
3 changed files with 12 additions and 2 deletions

View File

@@ -347,6 +347,8 @@ you are not actively using the program.\
<string name="prefs_viewNAG_summary">Include numeric annotation glyphs (NAGs), such as ! and ?</string> <string name="prefs_viewNAG_summary">Include numeric annotation glyphs (NAGs), such as ! and ?</string>
<string name="prefs_viewHeaders_title">Headers</string> <string name="prefs_viewHeaders_title">Headers</string>
<string name="prefs_viewHeaders_summary">Show PGN header lines</string> <string name="prefs_viewHeaders_summary">Show PGN header lines</string>
<string name="prefs_showVariationLine_title">Show Current Variations</string>
<string name="prefs_showVariationLine_summary">Show current variations in status area</string>
<string name="prefs_viewPieceType_title">Piece Names</string> <string name="prefs_viewPieceType_title">Piece Names</string>
<string name="prefs_viewPieceType_summary">Control how chess piece names are displayed</string> <string name="prefs_viewPieceType_summary">Control how chess piece names are displayed</string>
<string name="prefs_pgn_import">PGN import</string> <string name="prefs_pgn_import">PGN import</string>

View File

@@ -565,7 +565,13 @@
android:summary="@string/prefs_viewHeaders_summary" android:summary="@string/prefs_viewHeaders_summary"
android:defaultValue="false"> android:defaultValue="false">
</CheckBoxPreference> </CheckBoxPreference>
</PreferenceCategory> <CheckBoxPreference
android:key="showVariationLine"
android:title="@string/prefs_showVariationLine_title"
android:summary="@string/prefs_showVariationLine_summary"
android:defaultValue="false">
</CheckBoxPreference>
</PreferenceCategory>
<PreferenceCategory <PreferenceCategory
android:title="@string/prefs_pgn_import"> android:title="@string/prefs_pgn_import">
<CheckBoxPreference <CheckBoxPreference

View File

@@ -193,6 +193,7 @@ public class DroidFish extends Activity implements GUIInterface {
private boolean animateMoves; private boolean animateMoves;
private boolean autoScrollTitle; private boolean autoScrollTitle;
private boolean showMaterialDiff; private boolean showMaterialDiff;
private boolean showVariationLine;
private final static String bookDir = "DroidFish"; private final static String bookDir = "DroidFish";
private final static String pgnDir = "DroidFish" + File.separator + "pgn"; private final static String pgnDir = "DroidFish" + File.separator + "pgn";
@@ -882,6 +883,7 @@ public class DroidFish extends Activity implements GUIInterface {
pgnOptions.view.headers = settings.getBoolean("viewHeaders", false); pgnOptions.view.headers = settings.getBoolean("viewHeaders", false);
final int oldViewPieceType = pgnOptions.view.pieceType; final int oldViewPieceType = pgnOptions.view.pieceType;
pgnOptions.view.pieceType = getIntSetting("viewPieceType", PGNOptions.PT_LOCAL); pgnOptions.view.pieceType = getIntSetting("viewPieceType", PGNOptions.PT_LOCAL);
showVariationLine = settings.getBoolean("showVariationLine", false);
pgnOptions.imp.variations = settings.getBoolean("importVariations", true); pgnOptions.imp.variations = settings.getBoolean("importVariations", true);
pgnOptions.imp.comments = settings.getBoolean("importComments", true); pgnOptions.imp.comments = settings.getBoolean("importComments", true);
pgnOptions.imp.nag = settings.getBoolean("importNAG", true); pgnOptions.imp.nag = settings.getBoolean("importNAG", true);
@@ -1483,7 +1485,7 @@ public class DroidFish extends Activity implements GUIInterface {
thinking.append(Html.fromHtml(s)); thinking.append(Html.fromHtml(s));
thinkingEmpty = false; thinkingEmpty = false;
} }
if (variantStr.indexOf(' ') >= 0) { if (showVariationLine && (variantStr.indexOf(' ') >= 0)) {
String s = ""; String s = "";
if (!thinkingEmpty) if (!thinkingEmpty)
s += "<br>"; s += "<br>";