mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-07 05:24:46 +01:00
new param to interface to allow passing closure to delayed dialog
handling. Unused, so no behavior change yet.
This commit is contained in:
parent
6a6c528d36
commit
2ec0a7ba8d
12 changed files with 22 additions and 18 deletions
|
@ -785,7 +785,7 @@ public class BoardActivity extends XWActivity
|
|||
showNotAgainDlgThen( R.string.not_again_done,
|
||||
R.string.key_notagain_done, COMMIT_ACTION );
|
||||
} else {
|
||||
dlgButtonClicked( COMMIT_ACTION, AlertDialog.BUTTON_POSITIVE );
|
||||
dlgButtonClicked( COMMIT_ACTION, AlertDialog.BUTTON_POSITIVE, null );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -891,7 +891,7 @@ public class BoardActivity extends XWActivity
|
|||
// DlgDelegate.DlgClickNotify interface
|
||||
//////////////////////////////////////////////////
|
||||
@Override
|
||||
public void dlgButtonClicked( int id, int which )
|
||||
public void dlgButtonClicked( int id, int which, Object[] params )
|
||||
{
|
||||
if ( LAUNCH_INVITE_ACTION == id ) {
|
||||
if ( DlgDelegate.DISMISS_BUTTON != which ) {
|
||||
|
@ -1302,7 +1302,7 @@ public class BoardActivity extends XWActivity
|
|||
m_toastStr = toastStr;
|
||||
if ( naMsg == 0 ) {
|
||||
dlgButtonClicked( SHOW_EXPL_ACTION,
|
||||
AlertDialog.BUTTON_POSITIVE );
|
||||
AlertDialog.BUTTON_POSITIVE, null );
|
||||
} else {
|
||||
showNotAgainDlgThen( naMsg, naKey, SHOW_EXPL_ACTION );
|
||||
}
|
||||
|
|
|
@ -301,7 +301,7 @@ public class DictBrowseActivity extends XWListActivity
|
|||
// DlgDelegate.DlgClickNotify interface
|
||||
//////////////////////////////////////////////////
|
||||
@Override
|
||||
public void dlgButtonClicked( int id, int which )
|
||||
public void dlgButtonClicked( int id, int which, Object[] params )
|
||||
{
|
||||
Assert.assertTrue( FINISH_ACTION == id );
|
||||
finish();
|
||||
|
|
|
@ -644,7 +644,7 @@ public class DictsActivity extends XWExpandableListActivity
|
|||
}
|
||||
|
||||
// DlgDelegate.DlgClickNotify interface
|
||||
public void dlgButtonClicked( int id, int which )
|
||||
public void dlgButtonClicked( int id, int which, Object[] params )
|
||||
{
|
||||
switch( id ) {
|
||||
case DELETE_DICT_ACTION:
|
||||
|
|
|
@ -56,7 +56,7 @@ public class DlgDelegate {
|
|||
private static final String STATE_KEYF = "STATE_%d";
|
||||
|
||||
public interface DlgClickNotify {
|
||||
void dlgButtonClicked( int id, int button );
|
||||
void dlgButtonClicked( int id, int button, Object[] params );
|
||||
}
|
||||
|
||||
private Activity m_activity;
|
||||
|
@ -164,7 +164,8 @@ public class DlgDelegate {
|
|||
// dialog
|
||||
if ( SKIP_CALLBACK != callbackID ) {
|
||||
m_clickCallback.dlgButtonClicked( callbackID,
|
||||
AlertDialog.BUTTON_POSITIVE );
|
||||
AlertDialog.BUTTON_POSITIVE,
|
||||
null );
|
||||
}
|
||||
} else {
|
||||
String msg = m_activity.getString( msgID );
|
||||
|
@ -202,7 +203,7 @@ public class DlgDelegate {
|
|||
} else {
|
||||
post( new Runnable() {
|
||||
public void run() {
|
||||
m_clickCallback.dlgButtonClicked( callbackID, EMAIL_BTN );
|
||||
m_clickCallback.dlgButtonClicked( callbackID, EMAIL_BTN, null );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -345,7 +346,7 @@ public class DlgDelegate {
|
|||
if ( SKIP_CALLBACK != state.m_cbckID ) {
|
||||
m_clickCallback.
|
||||
dlgButtonClicked( state.m_cbckID,
|
||||
AlertDialog.BUTTON_POSITIVE );
|
||||
AlertDialog.BUTTON_POSITIVE, null );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -411,7 +412,8 @@ public class DlgDelegate {
|
|||
public void onClick( DialogInterface dlg, int button ) {
|
||||
if ( SKIP_CALLBACK != state.m_cbckID ) {
|
||||
m_clickCallback.dlgButtonClicked( state.m_cbckID,
|
||||
button );
|
||||
button,
|
||||
state.m_params );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -428,7 +430,8 @@ public class DlgDelegate {
|
|||
dropState( state );
|
||||
if ( SKIP_CALLBACK != state.m_cbckID ) {
|
||||
m_clickCallback.dlgButtonClicked( state.m_cbckID,
|
||||
DISMISS_BUTTON );
|
||||
DISMISS_BUTTON,
|
||||
state.m_params );
|
||||
}
|
||||
m_activity.removeDialog( id );
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ public class DlgState implements Parcelable {
|
|||
public int m_posButton;
|
||||
public int m_cbckID = 0;
|
||||
public int m_prefsKey;
|
||||
public Object[] m_params;
|
||||
|
||||
public DlgState( int id, String msg, int cbckID )
|
||||
{
|
||||
|
|
|
@ -600,7 +600,7 @@ public class GameConfig extends XWActivity
|
|||
}
|
||||
|
||||
@Override
|
||||
public void dlgButtonClicked( int id, int button )
|
||||
public void dlgButtonClicked( int id, int button, Object[] params )
|
||||
{
|
||||
switch( id ) {
|
||||
case LOCKED_CHANGE_ACTION:
|
||||
|
|
|
@ -552,7 +552,7 @@ public class GamesList extends XWExpandableListActivity
|
|||
|
||||
// DlgDelegate.DlgClickNotify interface
|
||||
@Override
|
||||
public void dlgButtonClicked( int id, int which )
|
||||
public void dlgButtonClicked( int id, int which, Object[] params )
|
||||
{
|
||||
if ( AlertDialog.BUTTON_POSITIVE == which ) {
|
||||
switch( id ) {
|
||||
|
|
|
@ -149,7 +149,7 @@ public class NewGameActivity extends XWActivity {
|
|||
|
||||
// DlgDelegate.DlgClickNotify interface
|
||||
@Override
|
||||
public void dlgButtonClicked( int id, int which )
|
||||
public void dlgButtonClicked( int id, int which, Object[] params )
|
||||
{
|
||||
switch( id ) {
|
||||
case NEW_GAME_ACTION:
|
||||
|
|
|
@ -190,7 +190,7 @@ public class SMSInviteActivity extends InviteActivity {
|
|||
|
||||
// DlgDelegate.DlgClickNotify interface
|
||||
@Override
|
||||
public void dlgButtonClicked( int id, int which )
|
||||
public void dlgButtonClicked( int id, int which, Object[] params )
|
||||
{
|
||||
switch( which ) {
|
||||
case AlertDialog.BUTTON_POSITIVE:
|
||||
|
|
|
@ -178,7 +178,7 @@ public class XWActivity extends Activity
|
|||
}
|
||||
|
||||
// DlgDelegate.DlgClickNotify interface
|
||||
public void dlgButtonClicked( int id, int which )
|
||||
public void dlgButtonClicked( int id, int which, Object[] params )
|
||||
{
|
||||
Assert.fail();
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ public class XWExpandableListActivity extends ExpandableListActivity
|
|||
}
|
||||
|
||||
// DlgDelegate.DlgClickNotify interface
|
||||
public void dlgButtonClicked( int id, int which )
|
||||
public void dlgButtonClicked( int id, int which, Object[] params )
|
||||
{
|
||||
Assert.fail();
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ public class XWListActivity extends ListActivity
|
|||
}
|
||||
|
||||
// DlgDelegate.DlgClickNotify interface
|
||||
public void dlgButtonClicked( int id, int which )
|
||||
public void dlgButtonClicked( int id, int which, Object[] params )
|
||||
{
|
||||
Assert.fail();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue