Merge branch 'android_invite' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_invite

This commit is contained in:
Eric House 2011-06-14 05:47:16 -07:00
commit 5fc430c6da
8 changed files with 43 additions and 13 deletions

View file

@ -53,6 +53,7 @@
android:scrollHorizontally="true"
android:autoText="false"
android:capitalize="words"
android:selectAllOnFocus="true"
android:gravity="fill_horizontal"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"

View file

@ -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>
@ -67,14 +68,26 @@
<string name="key_notagain_dicts">key_notagain_dicts</string>
<string name="key_notagain_arrow">key_notagain_arrow</string>
<string name="key_notagain_turnchanged">key_notagain_turnchanged</string>
<string name="key_notagain_newfrom">key_notagain_newfrom</string>
<!-- 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">

View file

@ -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>
@ -532,6 +524,10 @@
the scoreboard to get details about that player\'s most recent
move.</string>
<string name="not_again_newfrom">Create a new ready-to-play game
using all the settings from this one. That is, treat this game
as a template.</string>
<string name="relay_game_explainf">To start a basic networked two-player
game in %s:</string>
@ -570,9 +566,9 @@
<string name="no_download_warning">Unable to download. Do you have
a web browser installed?</string>
<string name="default_name_title">New player welcome</string>
<string name="default_name_title">Welcome</string>
<string name="default_name_message">Thanks for installing
Crosswords! Feel free to enter your name here. It will be used
Crosswords! Feel free to enter your name here. It will be used
when creating new games. (You can change it later in the \"New
game default\" section of Settings.)</string>

View file

@ -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" -->

View file

@ -468,8 +468,17 @@ public class GamesList extends XWListActivity
break;
case R.id.list_item_new_from:
String newName = GameUtils.dupeGame( this, path );
invalPath = newName;
Runnable proc = new Runnable() {
public void run() {
String newName =
GameUtils.dupeGame( GamesList.this, path );
if ( null != m_adapter ) {
m_adapter.inval( newName );
}
}
};
showNotAgainDlgThen( R.string.not_again_newfrom,
R.string.key_notagain_newfrom, proc );
break;
case R.id.list_item_copy:

View file

@ -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 ) );

View file

@ -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,

View file

@ -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 );