mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
add preference controlling whether more than on player is invited per
remote device
This commit is contained in:
parent
05aaffb933
commit
6da1b54636
8 changed files with 649 additions and 627 deletions
File diff suppressed because it is too large
Load diff
|
@ -119,6 +119,7 @@
|
||||||
<string name="key_download_path">key_download_path</string>
|
<string name="key_download_path">key_download_path</string>
|
||||||
<string name="key_xlations_locale">key_xlations_locale</string>
|
<string name="key_xlations_locale">key_xlations_locale</string>
|
||||||
<string name="key_xlations_enabled">key_xlations_enabled</string>
|
<string name="key_xlations_enabled">key_xlations_enabled</string>
|
||||||
|
<string name="key_invite_multi">key_invite_multi</string>
|
||||||
|
|
||||||
<!-- Nor is my email address -->
|
<!-- Nor is my email address -->
|
||||||
<string name="email_author_email">xwords@eehouse.org</string>
|
<string name="email_author_email">xwords@eehouse.org</string>
|
||||||
|
|
|
@ -1835,7 +1835,7 @@
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<string name="new_move_body">One or more moves has arrived</string>
|
<string name="new_move_body">One or more moves has arrived</string>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<string name="invite_bt_desc_fmt">Please select the %1$d device[s]
|
<string name="invite_bt_desc_fmt">Please select up to %1$d device[s]
|
||||||
you want to include in this game. Use the \"%2$s\"
|
you want to include in this game. Use the \"%2$s\"
|
||||||
button if you don\'t see a device you expect.</string>
|
button if you don\'t see a device you expect.</string>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
@ -2258,8 +2258,8 @@
|
||||||
modes network games will use to communicate -->
|
modes network games will use to communicate -->
|
||||||
<string name="title_addrs_pref">Communicate via</string>
|
<string name="title_addrs_pref">Communicate via</string>
|
||||||
|
|
||||||
<string name="new_game">New Game</string>
|
<string name="new_game">New one-device game</string>
|
||||||
<string name="new_game_networked">New Networked Game </string>
|
<string name="new_game_networked">New networked game</string>
|
||||||
|
|
||||||
<string name="new_game_message">Would you like to create this game
|
<string name="new_game_message">Would you like to create this game
|
||||||
using default settings?\n\nOr would you like to configure it
|
using default settings?\n\nOr would you like to configure it
|
||||||
|
@ -2269,10 +2269,13 @@
|
||||||
|
|
||||||
<string name="use_defaults">Use defaults</string>
|
<string name="use_defaults">Use defaults</string>
|
||||||
|
|
||||||
<string name="nplayers_prompt">Number of players</string>
|
<string name="nplayers_prompt">Number on this device</string>
|
||||||
<string name="nplayers_fmt">%1$d player[s]</string>
|
<string name="nplayers_fmt">%1$d player[s]</string>
|
||||||
<string name="err_dup_invite_fmt">Duplicate invitation rejected:
|
<string name="err_dup_invite_fmt">Duplicate invitation rejected:
|
||||||
device \"%1$s\" has already accepted an invitation to this
|
device \"%1$s\" has already accepted an invitation to this
|
||||||
game.</string>
|
game.</string>
|
||||||
|
|
||||||
|
<string name="invite_multi_title">Invite multiple (Advanced)</string>
|
||||||
|
<string name="invite_multi_summary">Invite more than one player per remote device</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -294,6 +294,12 @@
|
||||||
android:summary="@string/notify_other_summary"
|
android:summary="@string/notify_other_summary"
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<CheckBoxPreference android:key="@string/key_invite_multi"
|
||||||
|
android:title="@string/invite_multi_title"
|
||||||
|
android:summary="@string/invite_multi_summary"
|
||||||
|
android:defaultValue="false"
|
||||||
|
/>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
||||||
<PreferenceScreen android:title="@string/advanced"
|
<PreferenceScreen android:title="@string/advanced"
|
||||||
|
|
|
@ -1572,7 +1572,7 @@
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<string name="new_move_body">Eno ro erom sevom sah devirra</string>
|
<string name="new_move_body">Eno ro erom sevom sah devirra</string>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<string name="invite_bt_desc_fmt">Esaelp tceles eht %1$d ]s[ecived
|
<string name="invite_bt_desc_fmt">Esaelp tceles pu ot %1$d ]s[ecived
|
||||||
uoy tnaw ot edulcni ni siht emag. Esu eht \"%2$s\"
|
uoy tnaw ot edulcni ni siht emag. Esu eht \"%2$s\"
|
||||||
nottub fi uoy nod\'t ees a ecived uoy tcepxe.</string>
|
nottub fi uoy nod\'t ees a ecived uoy tcepxe.</string>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
@ -1921,17 +1921,19 @@
|
||||||
<!-- Title of preference in which you select which addressing
|
<!-- Title of preference in which you select which addressing
|
||||||
modes network games will use to communicate -->
|
modes network games will use to communicate -->
|
||||||
<string name="title_addrs_pref">Etacinummoc aiv</string>
|
<string name="title_addrs_pref">Etacinummoc aiv</string>
|
||||||
<string name="new_game">Wen Emag</string>
|
<string name="new_game">Wen ecived-eno emag</string>
|
||||||
<string name="new_game_networked">Wen Dekrowten Emag </string>
|
<string name="new_game_networked">Wen dekrowten emag</string>
|
||||||
<string name="new_game_message">Dluow uoy ekil ot etaerc siht emag
|
<string name="new_game_message">Dluow uoy ekil ot etaerc siht emag
|
||||||
gnisu tluafed ?sgnittes\n\nRo dluow uoy ekil ot erugifnoc ti
|
gnisu tluafed ?sgnittes\n\nRo dluow uoy ekil ot erugifnoc ti
|
||||||
?tsrif</string>
|
?tsrif</string>
|
||||||
<string name="new_game_message_net">uOy( lliw evah a ecnahc ot
|
<string name="new_game_message_net">uOy( lliw evah a ecnahc ot
|
||||||
etivni rehto sreyalp retfa ti si detaerc.)</string>
|
etivni rehto sreyalp retfa ti si detaerc.)</string>
|
||||||
<string name="use_defaults">Esu stluafed</string>
|
<string name="use_defaults">Esu stluafed</string>
|
||||||
<string name="nplayers_prompt">Rebmun fo sreyalp</string>
|
<string name="nplayers_prompt">Rebmun no siht ecived</string>
|
||||||
<string name="nplayers_fmt">%1$d ]s[reyalp</string>
|
<string name="nplayers_fmt">%1$d ]s[reyalp</string>
|
||||||
<string name="err_dup_invite_fmt">Etacilpud noitativni detcejer:
|
<string name="err_dup_invite_fmt">Etacilpud noitativni detcejer:
|
||||||
ecived \"%1$s\" sah ydaerla detpecca na noitativni ot siht
|
ecived \"%1$s\" sah ydaerla detpecca na noitativni ot siht
|
||||||
emag.</string>
|
emag.</string>
|
||||||
|
<string name="invite_multi_title">Etivni elpitlum )Decnavda(</string>
|
||||||
|
<string name="invite_multi_summary">Etivni erom naht eno reyalp rep etomer ecived</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1572,7 +1572,7 @@
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<string name="new_move_body">ONE OR MORE MOVES HAS ARRIVED</string>
|
<string name="new_move_body">ONE OR MORE MOVES HAS ARRIVED</string>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<string name="invite_bt_desc_fmt">PLEASE SELECT THE %1$d DEVICE[S]
|
<string name="invite_bt_desc_fmt">PLEASE SELECT UP TO %1$d DEVICE[S]
|
||||||
YOU WANT TO INCLUDE IN THIS GAME. USE THE \"%2$s\"
|
YOU WANT TO INCLUDE IN THIS GAME. USE THE \"%2$s\"
|
||||||
BUTTON IF YOU DON\'T SEE A DEVICE YOU EXPECT.</string>
|
BUTTON IF YOU DON\'T SEE A DEVICE YOU EXPECT.</string>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
@ -1921,7 +1921,7 @@
|
||||||
<!-- Title of preference in which you select which addressing
|
<!-- Title of preference in which you select which addressing
|
||||||
modes network games will use to communicate -->
|
modes network games will use to communicate -->
|
||||||
<string name="title_addrs_pref">COMMUNICATE VIA</string>
|
<string name="title_addrs_pref">COMMUNICATE VIA</string>
|
||||||
<string name="new_game">NEW GAME</string>
|
<string name="new_game">NEW ONE-DEVICE GAME</string>
|
||||||
<string name="new_game_networked">NEW NETWORKED GAME</string>
|
<string name="new_game_networked">NEW NETWORKED GAME</string>
|
||||||
<string name="new_game_message">WOULD YOU LIKE TO CREATE THIS GAME
|
<string name="new_game_message">WOULD YOU LIKE TO CREATE THIS GAME
|
||||||
USING DEFAULT SETTINGS?\n\nOR WOULD YOU LIKE TO CONFIGURE IT
|
USING DEFAULT SETTINGS?\n\nOR WOULD YOU LIKE TO CONFIGURE IT
|
||||||
|
@ -1929,9 +1929,11 @@
|
||||||
<string name="new_game_message_net">(YOU WILL HAVE A CHANCE TO
|
<string name="new_game_message_net">(YOU WILL HAVE A CHANCE TO
|
||||||
INVITE OTHER PLAYERS AFTER IT IS CREATED.)</string>
|
INVITE OTHER PLAYERS AFTER IT IS CREATED.)</string>
|
||||||
<string name="use_defaults">USE DEFAULTS</string>
|
<string name="use_defaults">USE DEFAULTS</string>
|
||||||
<string name="nplayers_prompt">NUMBER OF PLAYERS</string>
|
<string name="nplayers_prompt">NUMBER ON THIS DEVICE</string>
|
||||||
<string name="nplayers_fmt">%1$d PLAYER[S]</string>
|
<string name="nplayers_fmt">%1$d PLAYER[S]</string>
|
||||||
<string name="err_dup_invite_fmt">DUPLICATE INVITATION REJECTED:
|
<string name="err_dup_invite_fmt">DUPLICATE INVITATION REJECTED:
|
||||||
DEVICE \"%1$s\" HAS ALREADY ACCEPTED AN INVITATION TO THIS
|
DEVICE \"%1$s\" HAS ALREADY ACCEPTED AN INVITATION TO THIS
|
||||||
GAME.</string>
|
GAME.</string>
|
||||||
|
<string name="invite_multi_title">INVITE MULTIPLE (ADVANCED)</string>
|
||||||
|
<string name="invite_multi_summary">INVITE MORE THAN ONE PLAYER PER REMOTE DEVICE</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -203,7 +203,7 @@ public class BTInviteDelegate extends InviteDelegate {
|
||||||
m_boxAddrs.put( box, m_devAddrs[position] );
|
m_boxAddrs.put( box, m_devAddrs[position] );
|
||||||
|
|
||||||
m_counts.put( position, 1 );
|
m_counts.put( position, 1 );
|
||||||
if ( 1 < m_nMissing ) {
|
if ( XWPrefs.getCanInviteMulti( m_activity ) && 1 < m_nMissing ) {
|
||||||
Spinner spinner = (Spinner)
|
Spinner spinner = (Spinner)
|
||||||
layout.findViewById(R.id.nperdev_spinner);
|
layout.findViewById(R.id.nperdev_spinner);
|
||||||
ArrayAdapter<String> adapter =
|
ArrayAdapter<String> adapter =
|
||||||
|
|
|
@ -465,6 +465,11 @@ public class XWPrefs {
|
||||||
return getPrefsBoolean( context, key_checked_upgrades, false );
|
return getPrefsBoolean( context, key_checked_upgrades, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean getCanInviteMulti( Context context )
|
||||||
|
{
|
||||||
|
return getPrefsBoolean( context, R.string.key_invite_multi, false );
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean getIsTablet( Context context )
|
public static boolean getIsTablet( Context context )
|
||||||
{
|
{
|
||||||
return isTablet( context ) ||
|
return isTablet( context ) ||
|
||||||
|
|
Loading…
Reference in a new issue