mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
populate public rooms list as soon as checkbox set -- and mention
language and number of players in failure message
This commit is contained in:
parent
56e83bfc1c
commit
2d66913323
2 changed files with 15 additions and 5 deletions
|
@ -167,7 +167,7 @@
|
||||||
<string name="room_public">Make new room public</string>
|
<string name="room_public">Make new room public</string>
|
||||||
<string name="join_room">Join public room</string>
|
<string name="join_room">Join public room</string>
|
||||||
<string name="new_room_hint">New room name</string>
|
<string name="new_room_hint">New room name</string>
|
||||||
<string name="room_public_prompt">Pick room to play in</string>
|
<string name="room_public_prompt">Select public room</string>
|
||||||
|
|
||||||
<string name="configure_role">Configure connection</string>
|
<string name="configure_role">Configure connection</string>
|
||||||
<string name="configure_rolef">Configure %s connection</string>
|
<string name="configure_rolef">Configure %s connection</string>
|
||||||
|
@ -385,8 +385,8 @@
|
||||||
|
|
||||||
<string name="public_names_progress">Fetching public rooms for
|
<string name="public_names_progress">Fetching public rooms for
|
||||||
%d-player games in %s.</string>
|
%d-player games in %s.</string>
|
||||||
<string name="no_name_found">No public rooms found. Try
|
<string name="no_name_found_f">No public rooms found for %d-player
|
||||||
refreshing or creating your own.</string>
|
games in %s. Try refreshing or creating your own.</string>
|
||||||
|
|
||||||
<string name="chat_received">Message received</string>
|
<string name="chat_received">Message received</string>
|
||||||
<string name="button_send">Send</string>
|
<string name="button_send">Send</string>
|
||||||
|
|
|
@ -242,11 +242,13 @@ public class GameConfig extends XWActivity
|
||||||
case NO_NAME_FOUND:
|
case NO_NAME_FOUND:
|
||||||
dialog = new AlertDialog.Builder( this )
|
dialog = new AlertDialog.Builder( this )
|
||||||
.setPositiveButton( R.string.button_ok, null )
|
.setPositiveButton( R.string.button_ok, null )
|
||||||
.setMessage( R.string.no_name_found )
|
// message added below since varies with language etc.
|
||||||
|
.setMessage("") // if not set here can't change later
|
||||||
.create();
|
.create();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return dialog;
|
return dialog;
|
||||||
}
|
} // onCreateDialog
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPrepareDialog( int id, Dialog dialog )
|
protected void onPrepareDialog( int id, Dialog dialog )
|
||||||
|
@ -267,6 +269,12 @@ public class GameConfig extends XWActivity
|
||||||
ListView listview = (ListView)dialog.findViewById( R.id.players );
|
ListView listview = (ListView)dialog.findViewById( R.id.players );
|
||||||
listview.setAdapter( new RemoteChoices() );
|
listview.setAdapter( new RemoteChoices() );
|
||||||
break;
|
break;
|
||||||
|
case NO_NAME_FOUND:
|
||||||
|
String format = getString( R.string.no_name_found_f );
|
||||||
|
String msg = String.format( format, m_gi.nPlayers, DictLangCache.
|
||||||
|
getLangName( this, m_gi.dictLang ) );
|
||||||
|
((AlertDialog)dialog).setMessage( msg );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
super.onPrepareDialog( id, dialog );
|
super.onPrepareDialog( id, dialog );
|
||||||
}
|
}
|
||||||
|
@ -726,6 +734,8 @@ public class GameConfig extends XWActivity
|
||||||
private void adjustConnectStuff()
|
private void adjustConnectStuff()
|
||||||
{
|
{
|
||||||
if ( m_joinPublicCheck.isChecked() ) {
|
if ( m_joinPublicCheck.isChecked() ) {
|
||||||
|
new RefreshNamesTask( this, this, m_gi.dictLang,
|
||||||
|
m_gi.nPlayers, m_roomChoose ).execute();
|
||||||
m_privateRoomsSet.setVisibility( View.GONE );
|
m_privateRoomsSet.setVisibility( View.GONE );
|
||||||
m_publicRoomsSet.setVisibility( View.VISIBLE );
|
m_publicRoomsSet.setVisibility( View.VISIBLE );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue