use board_canHint to set hint buttons state so buttons don't show for

remote or robot players
This commit is contained in:
Andy2 2010-07-07 18:48:35 -07:00
parent af2d2c71b5
commit f8d1ebd075
2 changed files with 6 additions and 6 deletions

View file

@ -773,12 +773,6 @@ public class BoardActivity extends Activity implements UtilCtxt {
.CMD_UNDO_CUR );
}
}) ;
// Stuff we can disable now
if ( m_gi.hintsNotAllowed ) {
m_toolbar.update( Toolbar.BUTTON_HINT_PREV, 0 );
m_toolbar.update( Toolbar.BUTTON_HINT_NEXT, 0 );
}
} // populateToolbar
private DialogInterface.OnDismissListener makeODLforBlocking()

View file

@ -263,6 +263,12 @@ public class JNIThread extends Thread {
int canRedo = XwJNI.board_canTogglePending( m_jniGamePtr ) ? 1 : 0;
Message.obtain( m_handler, TOOLBAR_STATES, Toolbar.BUTTON_UNDO,
canRedo ).sendToTarget();
int canHint = XwJNI.board_canHint( m_jniGamePtr ) ? 1 : 0;
Message.obtain( m_handler, TOOLBAR_STATES, Toolbar.BUTTON_HINT_PREV,
canHint ).sendToTarget();
Message.obtain( m_handler, TOOLBAR_STATES, Toolbar.BUTTON_HINT_NEXT,
canHint ).sendToTarget();
}
public void run()