mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
add new debug pref for redirecting host so it and relay can live on
different machines.
This commit is contained in:
parent
c9c470b724
commit
d18ac741b7
6 changed files with 24 additions and 9 deletions
|
@ -28,6 +28,7 @@
|
|||
<string name="key_clr_crosshairs">key_clr_crosshairs</string>
|
||||
|
||||
<string name="key_relay_host">key_relay_host</string>
|
||||
<string name="key_redir_host">key_redir_host</string>
|
||||
<string name="key_relay_port">key_relay_port2</string>
|
||||
<string name="key_proxy_port">key_proxy_port</string>
|
||||
<string name="key_sms_port">key_sms_port</string>
|
||||
|
@ -70,11 +71,22 @@
|
|||
|
||||
<!-- other -->
|
||||
<string name="default_host">eehouse.org</string>
|
||||
|
||||
<!-- <string name="default_host">10.0.2.2</string> -->
|
||||
<string name="dict_url">http://eehouse.org/and_dicts_hh</string>
|
||||
<string name="app_version">4.4 beta 28</string>
|
||||
<string name="game_url_pathf">//%1$s/redir.php</string>
|
||||
|
||||
<!-- Debugging stuff. No point in localizing it. -->
|
||||
<string name="advanced">For debugging</string>
|
||||
<string name="advanced_summary">You should never need these...</string>
|
||||
<string name="relay_host">Relay host</string>
|
||||
<string name="redir_host">Invite redirect host</string>
|
||||
<string name="dict_host">Dictionary download URL</string>
|
||||
<string name="logging_on">Enable logging</string>
|
||||
<string name="relay_port">Relay game port</string>
|
||||
<string name="proxy_port">Relay device port</string>
|
||||
|
||||
<!--string name="dict_url">http://10.0.2.2/~eehouse/and_dicts</string-->
|
||||
|
||||
<string-array name="board_sizes">
|
||||
|
|
|
@ -328,14 +328,6 @@
|
|||
<string name="clr_crosshairs">Crosshairs color</string>
|
||||
<string name="background">Board background</string>
|
||||
|
||||
<string name="advanced">For debugging</string>
|
||||
<string name="advanced_summary">You should never need these...</string>
|
||||
<string name="relay_host">Relay address</string>
|
||||
<string name="dict_host">Dictionary download URL</string>
|
||||
<string name="logging_on">Enable logging</string>
|
||||
<string name="relay_port">Relay game port</string>
|
||||
<string name="proxy_port">Relay device port</string>
|
||||
|
||||
<string name="key_player">key_player</string>
|
||||
<string name="tab_relay">Internet/Relay</string>
|
||||
<string name="tab_sms">SMS (broken)</string>
|
||||
|
|
|
@ -247,6 +247,11 @@
|
|||
android:defaultValue="10998"
|
||||
android:numeric="decimal"
|
||||
/>
|
||||
<EditTextPreference android:key="@string/key_redir_host"
|
||||
android:title="@string/redir_host"
|
||||
android:defaultValue="@string/default_host"
|
||||
/>
|
||||
|
||||
<!-- <EditTextPreference android:key="@string/key_sms_port" -->
|
||||
<!-- android:title="@string/sms_port" -->
|
||||
<!-- android:defaultValue="5432" -->
|
||||
|
|
|
@ -42,7 +42,7 @@ public class NetLaunchInfo {
|
|||
ub.scheme( "http" );
|
||||
String format = context.getString( R.string.game_url_pathf );
|
||||
ub.path( String.format( format,
|
||||
CommonPrefs.getDefaultRelayHost( context ) ) );
|
||||
CommonPrefs.getDefaultRedirHost( context ) ) );
|
||||
|
||||
ub.appendQueryParameter( "lang", String.format("%d", lang ) );
|
||||
ub.appendQueryParameter( "np", String.format( "%d", nPlayers ) );
|
||||
|
|
|
@ -115,6 +115,7 @@ public class PrefsActivity extends PreferenceActivity
|
|||
addPreferencesFromResource( R.xml.xwprefs );
|
||||
|
||||
int[] textKeyIds = { R.string.key_relay_host,
|
||||
R.string.key_redir_host,
|
||||
R.string.key_relay_port,
|
||||
R.string.key_proxy_port,
|
||||
R.string.key_dict_host,
|
||||
|
|
|
@ -138,6 +138,11 @@ public class CommonPrefs {
|
|||
return getString( context, R.string.key_relay_host );
|
||||
}
|
||||
|
||||
public static String getDefaultRedirHost( Context context )
|
||||
{
|
||||
return getString( context, R.string.key_redir_host );
|
||||
}
|
||||
|
||||
public static int getDefaultRelayPort( Context context )
|
||||
{
|
||||
String val = getString( context, R.string.key_relay_port );
|
||||
|
|
Loading…
Add table
Reference in a new issue