Eric House
4d5aad61b4
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
...
Conflicts:
xwords4/android/XWords4/src/org/eehouse/android/xw4/RelayService.java
2011-02-26 20:02:29 -08:00
Andy2
6df2abecb6
don't use special launchModes for GamesList *but* do invoke it from
...
DispatchNotify so that an existing instance will be reused rather than
a new on created on top of the stack.
2011-02-26 19:47:33 -08:00
Andy2
9cc7cd0dc8
add logging of activity lifecycle methods -- and override a couple just
...
to do the logging before calling super(). These should go once I've
got the lifecycle stuff working.
2011-02-26 19:46:29 -08:00
Andy2
ef074f2944
don't bother passing flags to DispatchNotify class.
2011-02-26 19:45:05 -08:00
Andy2
a0f5ef4e18
remove logging
2011-02-26 19:44:02 -08:00
Eric House
a68170de51
remove PendingIntent.FLAG_UPDATE_CURRENT; it's breaking things.
2011-02-26 12:10:24 -08:00
Andy2
5ba6579180
Add Discard button to dialog explaining that remote game's been
...
deleted. To do that: added interface to TransportProcs that a caller
can implement and to which it delegates the UI (error code reports).
BoardActivity implements that interface. To avoid a race condition
where the JNIThread would save the game after I'd deleted it I kill
the thread and wait for it to die before deleting the game and calling
finish().
2011-02-25 19:57:43 -08:00
Andy2
86274785dd
add newbie-info on turn-changed
2011-02-25 07:13:54 -08:00
Andy2
5e0f12e49d
add a confirmation dialog to "undo last", and remove it altogether
...
from networked games since as currently implemented it can quickly get
them permanently out-of-sync (and cause the jni code to assert.) Need
to debug this....
2011-02-25 06:54:38 -08:00
Andy2
0be59d1ba7
add showConfirmThen (which XWListActivity already has)
2011-02-25 06:53:36 -08:00
Andy2
d41487150b
add draw_boardBegin (fix broken compile)
2011-02-24 22:28:15 -08:00
Andy2
ce64f79cdd
add draw_boardBegin
2011-02-24 22:24:24 -08:00
Andy2
5afb7aadff
add dict_getTileValue
2011-02-24 22:23:57 -08:00
Andy2
40dcda2262
add flag that's supposed to help notification launch an open activity
2011-02-24 22:21:04 -08:00
Andy2
5291307c11
get rid of onRestart -- onStart is always called right after.
2011-02-24 22:20:10 -08:00
Andy2
8b5f4a84f2
tweak strings so relevant part visible.
2011-02-24 17:45:02 -08:00
Andy2
9809864afb
move connect-never option to the top where won't be scrolled off
...
screen initially
2011-02-24 17:44:43 -08:00
Andy2
66bc435f28
always save after receiving messages that may have changed state.
...
Previously did so only when in background, but that leaves a problem:
if device A sends messages to B and B ACKs them so that they're
deleted but exits without saving (for any reason) the game is
permanently horked. It's safer to save immediately.
2011-02-24 17:35:22 -08:00
Andy2
f382f17d20
make game_receiveMessage return even if server doesn't do anything
...
with it -- since caller will use the return value to decide whether to
save state.
2011-02-24 17:33:10 -08:00
Andy2
f0d90f0576
get rid of cute auto-array-creation. No behavior change; maybe no
...
change in generated code.
2011-02-24 07:39:35 -08:00
Andy2
9818a29f86
Use bitvector (an int) instead of an enum for flags noting what
...
arrived in the background. When notification that game's over arrives,
add it to the flags, then on game open show the game over dialog (in
addition to raising chat activity and possibly showing recent move.)
2011-02-24 07:09:41 -08:00
Andy2
7910aed896
XW[List]Activity now call removeDialog() every time a dialog is
...
dismissed so that they now all go through onCreateDialog() every time.
This allows to shrink or eliminate onPrepareDialog(). The hope is
that it will fix the occasional crash where restoreManagedDialogs
invokes onPrepareDialog() and some ivar I need isn't set because the
class was just reloaded.
2011-02-24 06:25:18 -08:00
Andy2
1529319a60
add vibrate permission; get RelayReceiver notified on boot so can set
...
initial timer.
2011-02-23 07:39:14 -08:00
Eric House
83cb8550dc
set the right field for sounds and notifications (helps to RTFM, but still not tested on device)
2011-02-23 06:00:27 -08:00
Eric House
29b05b83ec
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2011-02-22 19:56:40 -08:00
Eric House
ab71ac8847
add game name to chat activity title
2011-02-22 19:55:57 -08:00
Andy2
aaffb749cd
move network prefs into its own category; add prefs checkboxes there
...
and getters controlling whether vibrate and sound are used as part of
notifications.
2011-02-22 18:59:56 -08:00
Andy2
151df44c96
get rid of m_invalPath. It seems to be the onContentChanged() on
...
focus grabs that was needed.
2011-02-22 18:30:37 -08:00
Andy2
dbb69bfff5
add in flags to get vibration and sound with notifications. (Untested
...
on device.) Will want to add prefs to disable these.
2011-02-22 18:29:53 -08:00
Andy2
bf567a131a
fix crash (according to stack crawl from device)
2011-02-22 18:09:20 -08:00
Andy2
697fc7d5ca
get rid of some logging
2011-02-22 06:54:03 -08:00
Andy2
030d2e76a7
add interface with method that's called whenever a DB record is saved.
...
GamesList implements that interface and invalidates the list item
corresponding so it'll get redrawn with updated info. Should allow to
replace m_invalPath but doesn't...
2011-02-22 06:48:20 -08:00
Andy2
f75318e9d0
rename method and add variant then remove duplicated code. No behavior change.
2011-02-21 19:47:00 -08:00
Andy2
a4e995742f
bring back RelayService, which RelayReceiver now delegates to for the
...
work of pinging relay on timer. That work, which can cause receiver
to exceed its timeout if there are e.g. problems resolving hostnames,
must be done in a thread and Receivers aren't supposed to have
threads. Seems to work as well as it did before and also fixes
force-restart bugs when the network is slow/unavailable.
2011-02-21 18:12:15 -08:00
Andy2
318b820ea7
tweak newbie info for chat
2011-02-21 18:09:12 -08:00
Andy2
07fd2f6bb8
add title to chat activity
2011-02-21 06:51:47 -08:00
Andy2
21d46957be
comment out some logging and the annoying toast-on-relay-check
2011-02-21 06:50:54 -08:00
Andy2
353832a7ca
Look at opening game immediately when relaunched via onNewIntent() as
...
well as via onCreate().
2011-02-19 21:20:56 -08:00
Andy2
5ede3b19f0
up constants for beta 22
2011-02-19 08:41:14 -08:00
Andy2
2150d8b4a4
be a bit less pessimistic
2011-02-18 22:53:13 -08:00
Eric House
5d25faa780
update changes log
2011-02-18 22:51:09 -08:00
Eric House
1e3f094289
up constants for b21
2011-02-18 22:50:37 -08:00
Andy2
5460941ba8
cleanup
2011-02-18 22:23:06 -08:00
Andy2
9fbce6f942
remove old comment that wasn't supposed to get checked in.
2011-02-18 22:18:28 -08:00
Eric House
8fe195e91c
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2011-02-18 22:15:03 -08:00
Eric House
020c2b6982
fix warnings by removing unused strings
2011-02-18 22:13:24 -08:00
Andy2
27bc89b684
when launched after chat messages have been received, launch the chat
...
activity. This requires an enum be stored in the DB instead of a
boolean.
2011-02-18 18:45:26 -08:00
Andy2
31348d978e
mark game as synced -- having messages -- if the only messages to
...
arrive had to do with chat. Clear that flag when opening game, not
when saving it.
2011-02-18 18:06:27 -08:00
Andy2
94a7361e99
Add spaces to sql commands adding columns -- they'll fail otherwise.
2011-02-18 18:02:52 -08:00
Andy2
0726cefb10
fix NPE: if there's no history string don't try to split it.
2011-02-18 17:44:23 -08:00
Andy2
da6d7da350
always say the net's available when on simulator. The net-up
...
notification stuff just doesn't work there.
2011-02-18 17:41:15 -08:00
Andy2
cd01c32ad1
When launched with a list of relayIDs (presumably because data has
...
arrived for them), open the first corresponding game for which the
dictionary is still there.
2011-02-17 17:41:53 -08:00
Andy2
2e9d87fddc
override gameDictHere to allow null params
2011-02-17 17:40:35 -08:00
Andy2
c271cb2fdd
add a clear-history menu to chat
2011-02-17 07:14:58 -08:00
Andy2
b3ffb4895b
use background rather than text color to separate local and non- chat.
2011-02-17 06:56:48 -08:00
Andy2
c844e9165d
limit knowledge of how history is stored to DBUtils.
2011-02-17 06:27:48 -08:00
Andy2
fec402cf50
display chat history as a scrolling list of TextView objects rather
...
than in a single TextView so different styles can be applied based on
whether text is from local or remote device. For now text is just
grey if local.
2011-02-16 18:53:47 -08:00
Andy2
736860685b
add a Send button to the chat activity and send on it rather than <cr>.
2011-02-16 18:13:54 -08:00
Andy2
0c9b053844
save into DB rather than drop chat messages received in background.
...
Still need to add UI to let user know a new message is there.
2011-02-16 07:37:14 -08:00
Andy2
a954977e56
white-space difference only: fix indentation.
2011-02-16 07:13:41 -08:00
Andy2
1400de489d
implement chat with an activity rather than a little dialog. Include
...
history, and store it in the game record in the DB (new column). This
will allow to not drop chat messages that arrive in the background,
though that's not implemented yet.
2011-02-16 06:55:46 -08:00
Andy2
9eba54344b
get rid of theme stuff. It's broken and looks like crap. When
...
there's enough color control to make a different theme look good put
this change back and fix it.
2011-02-14 20:14:48 -08:00
Andy2
526b3c1bef
register receiver with app context rather than a single activity's so
...
that it doesn't leak when that activity goes away.
2011-02-14 18:12:46 -08:00
Andy2
0354c3f1d9
sort by creation time rather than lastsaved time. This is a temporary
...
workaround to fix a bug where the UI isn't updating often enough and
sometimes delete or other position-based long-tap menu actions on the
list act on the wrong game. This gives an order that won't change.
Revisit later if a more dynamic order is desired.
2011-02-14 18:11:55 -08:00
Andy2
700c58d6dc
drop any relayIDs for which messages didn't have any effect on the
...
game they were passed to. This prevents duplicate messages from
generating notifications over and over -- and dupes are common when
messages stay on relay until the receiving game ACKs them.
2011-02-14 07:08:35 -08:00
Andy2
688fadb965
override onNewIntent to inval games whose ids have changed
2011-02-14 07:07:05 -08:00
Andy2
fffeceb665
include list of changed relayIDs in intent used to relaunch GamesList.
2011-02-14 07:06:16 -08:00
Andy2
be4bb3a73e
set launchMode of GamesList activity to singleTask. This seems to be
...
the only way to have it wind up on top *and without it being a second
instance of the activity* when relaunched in response to a move-made
notification. Even passing the SINGLE_TASK flag to the relaunching
Intent doesn't accomplish this.
2011-02-14 07:04:34 -08:00
Andy2
c2aa7438c7
get rid of excess logging
2011-02-14 06:13:20 -08:00
Andy2
95b60cc767
modify games list items to include a second column with everything but
...
the players and connection method in it. Put the game's last-saved
time in that column. Now sort order has most recently opened games at
top.
2011-02-11 18:29:11 -08:00
Andy2
061eb9c405
return list of games ordered by mod time so they display in that
...
order, with newest (most recently modified) at top. This won't really
make sense until modtime is added to the display.
2011-02-10 06:13:07 -08:00
Andy2
0f764664d4
add comment about failed attempt to deliniate list items by having
...
their backgrounds alternate slightly.
2011-02-10 06:11:54 -08:00
eehouse@eehouse.org
0184369e5d
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2011-02-09 06:50:21 -08:00
Andy2
b4d0774aa7
getRelayIDs -> getRelayIDNoMsgs to allow option of querying all, even
...
those already flagged as having new data. The idea is that there
might be still newer data available, e.g. chat messages, that should
be fetched.
2011-02-09 06:45:45 -08:00
Andy2
cf65d9baec
override onRestart to, like onStart, register subclasses with
...
DispatchNotify class as ready to handle notifications.
2011-02-09 06:44:16 -08:00
Andy2
d02295ac85
use new function to try to avoid creating a notification when the UI
...
to display a change -- the GamesList activity -- is already available.
2011-02-09 06:43:11 -08:00
Andy2
e59148dbe5
use changed API
2011-02-09 06:42:14 -08:00
Andy2
af0048c93a
use changed API
2011-02-09 06:41:53 -08:00
Andy2
4c1c298168
move logic for deciding whether a change needs to be turned into a
...
notification or can just be reflected via a currently-visible UI into
a separate function callable from outside.
2011-02-09 06:40:27 -08:00
Andy2
c18625d69a
change what's reported via notifications to reflect that changes have
...
already been fetched.
2011-02-09 06:32:58 -08:00
Andy2
c60e48b156
RelayReceiver should not be launched in new process since that
...
prevents its communicating with/updating a game that's already
running. User presumably wants the current app state updated when
possible.
2011-02-09 06:32:07 -08:00
Andy2
f956df853d
return "" rather than null when there's no java class backing util --
...
common code is less likely to crash.
2011-02-09 06:17:38 -08:00
Eric House
dada74aad7
delete dict if there's an IO error while writing it. A German
...
correspondent's having occasional crashes with a single dictionary.
It appears that if it were truncated during the download that it would
appear ok until a word search spread into a missing area. This fix is
untested, and should probably be replaced by a checksum that computed
and checked after the download, but I think it's an improvement.
2011-02-08 21:18:51 -08:00
Eric House
a2ad3d7c0b
cleanup
2011-02-08 21:07:31 -08:00
Eric House
ad7f8252b9
separate out UtilCtxt implementation from BoardActivity so there's no
...
dependency on an open game having a visual representation. This
should allow e.g. receiving and caching chat messages that come in
while game is not in foreground.
2011-02-08 21:06:18 -08:00
Eric House
861aec127b
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2011-02-04 08:09:50 -08:00
Andy2
c587a11ee2
Add turn and isrobot/islocal flags to summaries DB, and use to
...
background in green the player whose turn it is provided that player's
local.
2011-02-04 06:20:40 -08:00
Andy2
79bd17e59b
put each player in a game list item in its own line with score at
...
right end and name at the left. This will allow e.g. marking in green
a local player whose turn it is.
2011-02-03 06:47:20 -08:00
Andy2
935fe0c7a0
remove option to not show bonus values.
2011-02-01 21:13:46 -08:00
Andy2
33bccaaf42
use slightly different, recommended code to test if network's available.
2011-02-01 20:57:05 -08:00
Andy2
223909f560
change what checking with the server means, from calling HAS_MSGS to
...
GET_MSGS. When the messages come in, open up saved games and play
them into them, saving them after if there were any changes. Tested
by playing a two-device game all the way through fetching messages
after every move.
2011-02-01 20:51:46 -08:00
Andy2
ee620a3e37
move bonus squares into jni since they're constant rather than e.g. in
...
an editable resource.
2011-02-01 18:55:00 -08:00
Andy2
c2be642302
add game_getGi to fetch into java world any changes to the gi in the
...
jni world.
2011-02-01 18:53:29 -08:00
Andy2
383206f5dc
move bonus squares into jni since they're constant rather than e.g. in
...
an editable resource.
2011-02-01 18:52:29 -08:00
Eric House
c6e7b21f8a
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2011-02-01 09:39:55 -08:00
Andy2
977feada82
use a reference to a byte array in the java heap (locking down the
...
object) rather than allocating a new array in the C heap -- for the
DAWG data of a dictionary. This can use up to 5% of the java heap for
huge dictionaries, but I'm hoping it fixes a problem reported by a
user of the large German dictionary that seems to involve allocation.
If I'm reading correctly, as long as I stay within 16M (24M or more on
newer devices) I'm sure to get my memory in the java world while it's
less a sure thing in the JNI world (where in addition linux's
aggressive overallocation is used, meaning I'll fail when I try to
swap in memory on write rather than get back NULL from malloc.)
2011-01-31 18:56:20 -08:00
Eric House
95443ec9d9
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2011-01-28 14:43:20 -08:00
Andy2
566a456489
use getChannel().size() rather than available() to decide how many
...
bytes to read from downloaded dictionary file -- because available()
will not always return the full size. I suspect this is why a German
user is crashing when using the very large 2_15 German dict.
2011-01-27 21:03:37 -08:00
Eric House
70f52b162b
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2011-01-27 14:58:10 -08:00
Andy2
b863931db5
turn proxy service back on
2011-01-21 06:10:06 -08:00
Eric House
4202ea5fac
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2011-01-19 09:10:51 -08:00
Andy2
a8f4d772f8
set one timestamp when saving game, and another on game creation.
2011-01-19 06:54:23 -08:00
eehouse@eehouse.org
a9c65aa950
Revert "add ctime and mtime timestamps to DB when creating, and upgrade to new"
...
This reverts commit 465370bac6
.
Better to work with the existing timestamps as ints than mess with largely unsupported TIMESTAMP type.
2011-01-19 06:19:33 -08:00
Andy2
7f866da8da
draw dragged tiles translucent
2011-01-18 22:03:17 -08:00
Andy2
46f085f479
drop rather than asserting failure when unable to create a dialog.
2011-01-18 21:19:02 -08:00
Andy2
f6b95f93a1
use HashSet rather than String[] for faster lookup.
2011-01-18 18:47:24 -08:00
Andy2
bce4a11595
more work on color prefs. Add a list pref at the same level as colors
...
for setting "scheme". Implement that as changing potentially several
colors but only empty cell color for now. Remove prefs for whether
cell letters follow user colors (they always will) and the new one for
frame color -- it'll always be dark grey.
2011-01-18 18:42:25 -08:00
Andy2
8d52149c28
cache the background color on which arrow is based so don't have to
...
compute its blackness each time.
2011-01-17 20:39:35 -08:00
Andy2
e9e54ba379
toward supporting a light-on-dark theme: add pref for cell border
...
color; add pref for whether highlight is black-on-white or the
reverse; and remake the board arrow in white if the background is a
dark color. It's now possible to configure various colors so that
black empty cells looks good. Next need a single control to do it.
2011-01-17 18:55:36 -08:00
Andy2
33d5246b7a
add a new-user hint, displayed the first time the arrow's drawn on the
...
board, explaining what the arrow's for and how to move and disable it.
Implementation required passing XWActivity into BoardView so the
newbie hint method could be called on it.
2011-01-15 21:46:28 -08:00
Andy2
465370bac6
add ctime and mtime timestamps to DB when creating, and upgrade to new
...
version by adding them. Can't have them default to 'now' because
that's not supported for ADDs. Can't remove columns either, so at
some point I'll need to migrate to get rid of accumulated cruft.
Timestamps are not set nor read yet.
2011-01-14 19:03:08 -08:00
Eric House
04d8260f01
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2011-01-14 12:02:15 -08:00
Andy2
13ef8dd098
add hints-allowed to set of defaults for new games
2011-01-13 18:45:38 -08:00
Eric House
e7172fb4af
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2011-01-13 14:57:24 -08:00
Andy2
9ebbbb0fec
replace robot smart checkbox with a spinner having three settings.
...
Keep the kludge whereby the settings in all the players are kept the
same.
2011-01-13 06:48:50 -08:00
Andy2
d2ddc5cee7
turn off tile selection for android
2011-01-12 19:01:04 -08:00
Andy2
ceab787cdd
update to work with robot-smartness changes. At this point the UI's
...
unchanged and I'm trying to mimic the old per-game setting using the
new per-robot setting internally. Still need to change the UI to
allow move than just a boolean choice.
2011-01-10 20:46:05 -08:00
Andy2
6495bd321f
fix to compile with robotiq changes
2011-01-10 06:57:10 -08:00
Andy2
d3717c579e
add ACCESS_NETWORK_STATE permission
2011-01-06 08:08:36 -08:00
Andy2
99c26cc0e9
move network state listener into own class so it can live longer than
...
a single game (keeping network state across games launches) and be
used by other network clients later.
2011-01-06 08:08:16 -08:00
Eric House
46e9ae3c01
up copyright date
2011-01-03 16:33:03 -08:00
Andy2
ff6fb7070e
Android market reports a few crashes going out-of-bounds on array of
...
bad words. Add an assertion on the only path that seems likely to be
causing that.
2010-12-17 18:57:43 -08:00
Andy2
53de4eab9b
correctly detect empty dict and set top ptr to null. Fixes crash
...
using empty dicts.
2010-12-17 18:54:27 -08:00
Andy2
1535f56cd6
adding Turkish and Arabic and language names
2010-12-17 17:34:54 -08:00
Andy2
7e0f025d9e
remove logging
2010-12-17 06:51:56 -08:00
Andy2
3336b39d6d
add (wordcount) to subst title to make meaning more clear
2010-12-16 20:29:48 -08:00
Andy2
ea85512c4f
put word count into list of dicts for substitution. Done by adding
...
actual count then stripping it back off to form the dict name again.
2010-12-16 20:24:04 -08:00
Andy2
0059f92626
use medium sized text for empty view
2010-12-16 18:50:15 -08:00
Andy2
693909ec67
add an empty view along side list view; all setEmptyView to install it
...
to be shown when list is empty.
2010-12-16 18:47:25 -08:00
Andy2
740060f531
remove logging
2010-12-16 18:45:46 -08:00
Andy2
95a6982851
use new overridden method
2010-12-16 06:38:47 -08:00
Andy2
993e66da99
add newbie info on launch of dicts activity (and override method so
...
don't have to pass null)
2010-12-16 06:37:05 -08:00
Andy2
6cd22f6461
add newbie info on launch of dicts activity
2010-12-16 06:36:25 -08:00
Andy2
16933d14c1
fix list item layout to have variable height so it doesn't clip dict
...
listings that wrap to a second line -- e.g. the Spanish_FAA ones.
2010-12-16 06:24:47 -08:00
Andy2
647443c03e
reintroduce BroadcastReceiver listening for connectivity going up and
...
down. When network's down, return -1 from send proc so that comms
timing can retry. This works on both cellphone on carrier network
(with airplane mode as the test for loss/gain of network) and on
emulator (with death/restart of relay as the test since I don't know
how to kill the iface itself). A quick test on phone using wifi this
morning suggested it didn't work, that into/out of airplane mode did
not result in notifications getting set. Need to test that, and back
this out if can't be fixed since I can't break wifi.
2010-12-15 18:39:25 -08:00
Andy2
cd3ff71efb
notify comms layer when unable to establish connection. This allows
...
comms logic to retry and fixes failure on device to detect when
network comes up after being down when game was opened.
2010-12-13 18:30:22 -08:00
Andy2
23a4a7ef64
get rid of unused/stubbed out method
2010-12-13 06:37:26 -08:00
Andy2
183d920eb0
update changelog for beta 20
2010-12-09 07:41:43 -08:00
Andy2
1fbdd62372
up version num/strings
2010-12-09 07:21:56 -08:00
Andy2
c4fa9cb707
exit loop rather than trying to use key again after cancelling it.
...
Fixes CancelledKeyException raised when launching networked game in
airplane mode.
2010-12-09 06:58:55 -08:00
Andy2
d5d81fea5b
don't return dialog when msgID is 0. This should fix occasional crash
...
where OS wants to restore a dialog but the message ID has gotten
cleared -- via a mechanism I'm not quite clear on.
2010-12-08 18:52:08 -08:00
Andy2
a1c96b5601
change default dict download url so new set can coexist with old and
...
get picked up only by new release that can handle it.
2010-12-08 18:47:21 -08:00
Andy2
65ea075102
when downloading new dict inval the info cache to it'll get reloaded
...
-- in case we're overwriting one with the same name.
2010-12-08 18:46:25 -08:00
Andy2
1b40d1d47b
make method public to be used outside
2010-12-08 18:45:31 -08:00
Andy2
5534939407
add inval() to prevent stale data when new dict downloaded over top of
...
old.
2010-12-08 18:44:59 -08:00
Andy2
c83e4cc7a3
all places where dict lang is displayed can also display word count
2010-12-08 05:51:26 -08:00
eehouse@eehouse.org
64bcb8bb2b
Revert "replace call to rand() with android_only function that reads two bytes"
...
This reverts commit 1653b9f6e9
.
2010-12-08 05:38:41 -08:00
Andy2
3987749079
log calls to set-not-again. I'm getting crashes and that may help
...
track it down. Remove this later.
2010-12-07 18:57:38 -08:00
Andy2
4a12f7a96f
Revert "in attempt to work around non-random rand() in jni world, call back"
...
This reverts commit 99c92e779d
.
Conflicts:
xwords4/android/XWords4/jni/utilwrapper.c
2010-12-07 18:43:53 -08:00
eehouse@eehouse.org
57bfe4c943
Revert "switch from nio to regular old io, with separate reader and writer"
...
This reverts commit b23de9a958
.
2010-12-07 18:12:35 -08:00
eehouse@eehouse.org
b389478350
Revert "register for notification of network going up and down; start using"
...
This reverts commit 77fe3952da
.
2010-12-07 18:12:02 -08:00
Eric House
eb22322e8d
change title until we have column headers
2010-12-06 21:08:38 -08:00
Eric House
2a0151baf7
add BasEnglish dictionary.
2010-12-06 21:08:15 -08:00
Eric House
4ac4b37619
Merge remote branch 'maidu/android_branch' into dawg_fixup
2010-12-06 21:05:41 -08:00
Andy2
77fe3952da
register for notification of network going up and down; start using
...
that information to connect and not. There seems to be no way to get
notified when a socket's underlying transport goes down (might not
even want to) so this will be the best way to have the arrows go red
when the device goes into airplane mode.
2010-12-06 20:19:17 -08:00
eehouse@eehouse.org
fcd179f6b7
Merge remote branch 'origin/android_branch' into dawg_fixup
2010-12-06 18:50:13 -08:00
Andy2
74fc103e9d
opt for the long form of annotated name (includes word count)
2010-12-06 18:28:00 -08:00
Andy2
ad829b74f7
cache DictInfo rather than just lang code; add method that formats
...
name with lang and count. Ideally the dict display would be a table,
but it's not trivial to switch from a list to scrolling table.
2010-12-06 18:27:00 -08:00
Andy2
f50e6b3f1b
turn dict_getLangCode into dict_getInfo, adding a struct that contains
...
lang code and new word count.
2010-12-06 18:25:23 -08:00
Andy2
ff9e03ef4b
read rather than just skipping word count
2010-12-06 07:30:28 -08:00
Andy2
91c04d3267
switch to new format (with header giving word count)
2010-12-06 07:26:47 -08:00
Andy2
e2bb50ef62
skip new header if present
2010-12-06 07:22:07 -08:00
Eric House
c4cdc24b78
initial changes to add a header to xwd format so that stuff like
...
number of words can be included. Changed to build dicts and linux to
open them. Android still needs to learn. Also, some of the tools in
dawg/ need to be fixed to read old-format (pre-utf8) .xwd files.
2010-12-05 19:33:10 -08:00
Andy2
b23de9a958
switch from nio to regular old io, with separate reader and writer
...
threads. Greatly simplifies things, but only tested for the simplest
case, and I know it won't correctly reconnect when relay goes down.
But folks recommend against nio, and I'd like to see if I'll get
notifications in the form of blocking socket calls returning or
raising exceptions when the network goes down, something that isn't
happenening with nio.
2010-12-03 18:48:14 -08:00
Andy2
fda21e8d15
save room and player names if leaving simple config dialog via the
...
advanced config button (but still drop if back button hit.)
2010-12-03 06:44:34 -08:00
Andy2
426f990156
fix infinite loop creating networked game: util_rand() can't call into
...
java in some cases so needs to fall back to returning rand().
2010-12-03 06:43:40 -08:00
Andy2
984a5d6154
Fix yet again what shouldn't have been checked in.
2010-12-02 22:37:21 -08:00
Andy2
99c92e779d
in attempt to work around non-random rand() in jni world, call back
...
into the java world by making it a util_ctxt function. Do same on
linux to test. We'll see how it is -- and can back this commit out if
there's no improvement.
2010-12-02 19:02:36 -08:00
Andy2
2e956e2f6e
debug is not supposed to be checked in turned on
2010-12-01 18:13:55 -08:00
Andy2
78be732c64
use min of score ht and cell width for network status icon. Fixes
...
problem on 600x800 devices where the icon overlaps the board.
2010-11-30 18:21:28 -08:00
Andy2
a5c36f37a4
new strings for dict substitution
2010-11-30 06:37:23 -08:00
Andy2
d086dad34e
Since you can't add/remove buttons in onCreateDialog(), add a new one
...
to use when there are other dicts available in the same langauge as
the missing one that offers to substitute, and another dialog
presenting a list of same-language dicts. Then substitute the one
tapped.
2010-11-30 06:37:01 -08:00
Andy2
3a9eb72db3
add static methods to count and list dicts in a given langauge.
2010-11-30 06:34:57 -08:00
Andy2
1653b9f6e9
replace call to rand() with android_only function that reads two bytes
...
from /dev/urandom. rand() has been returning pretty crappy numbers
resulting in lots of clustering of tiles in trays. Let's see if this
is any better.
2010-11-29 17:12:12 -08:00
Andy2
b4fb57de9c
move thread inside so it can be started and stopped. And exit the
...
thread on failure to connect, allowing comms' timer to control when we
retry. This fixes problem where would try multiple times/second to
connect when relay was down. Now we try every 15 seconds (per comms,
which can as well back-off), and shortly after the relay comes back up
connect successfully.
2010-11-24 18:14:34 -08:00
Andy2
8623c569e7
move game data from separate files into a BLOB column in the existing
...
summaries db table, using the existing SNAPSHOT column rather than
adding a new one and upping the version. Includes utility fired at
game-start to convert existing games that seems to work. Also
improved a few queries and updates to -- I think -- use the API
better.
2010-11-24 17:22:46 -08:00
Andy2
be35d875b2
move game data from separate files into a BLOB column in the existing
...
summaries db table, using the existing SNAPSHOT column rather than
adding a new one and upping the version. Includes utility fired at
game-start to convert existing games that seems to work. Also
improved a few queries and updates to -- I think -- use the API
better.
2010-11-24 17:22:04 -08:00
Andy2
7c96048ba2
add, but comment out because it requires user permission, code to
...
notice when cellular data becomes available and notify relay of dead
games then. Must be a way to notice a network interface cellular or
not without permission since I already have permission to use it.
2010-11-23 19:01:32 -08:00
Andy2
c3f43dd26c
when deleting all games don't inform relay until after the last one so
...
a single connection does it.
2010-11-23 18:28:05 -08:00
Andy2
0bbf7272aa
don't create thread if there are no obits in the db -- makes it
...
cheaper to call when there may be nothing to do.
2010-11-23 18:10:51 -08:00
Andy2
7c8622392d
send the list of saved deleted relayID/seed pairs off to the relay and
...
remove them from db when relay reports success. TODO: relay always
reports success even if some are malformed and it's aborted parsing.
2010-11-23 17:56:17 -08:00
Andy2
111c59dd30
toward having game deletion get reported even if network isn't live at
...
the moment: create new "obits" table and put dead game info in it.
Change constant for current table name to be less generic.
2010-11-23 06:44:59 -08:00
Andy2
eebf5f1252
remove the big dictionary. Ideally I'll figure out how to gracefully
...
allow to switch without downloading before the next beta.
2010-11-22 18:24:37 -08:00
Andy2
983906810c
set dropdown view resource on public rooms spinner -- fixes problem
...
where it was drawing super-small.
2010-11-22 07:39:18 -08:00
Andy2
edab239060
add one more change
2010-11-21 20:12:45 -08:00
Andy2
ead21206e0
up version to 5 not 6 since prev beta was at 4.
2010-11-21 20:12:34 -08:00
Andy2
7d164f2389
complete list of changes
2010-11-20 21:19:56 -08:00
Andy2
d23dc4aee5
No need to use CurGameInfo for any game summary fields since it's all
...
in the summary db now. Saves opening the game itself just to show it
in a list.
2010-11-20 20:37:01 -08:00
Andy2
985c3d586c
move gameslist summarizing methods from CurGameInfo to GameSummary.
2010-11-20 20:34:41 -08:00
Andy2
b3b9742cdf
add serverrole and players summary to summary db
2010-11-20 20:34:00 -08:00
Andy2
a9a1076d02
actually delete dict when no games use it.
2010-11-19 21:47:38 -08:00
Andy2
b2e418436d
tweak string
2010-11-19 21:09:36 -08:00
Andy2
e38ac33e00
move dict-missing dialog from DlgDelegate into GamesList because
...
that's the only place that is or should be calling it. And since we
can usually figure out the exact url for the dictionary go ahead and
try to download that.
2010-11-19 21:08:09 -08:00
Andy2
0578a0e4f6
When deleting dictionaries, just do it unless the dictionary's in use
...
in which case tell user how many games are using it when asking for
confirmation. To do that, add dict into summary DB, and to do that
add CurGameInfo into GameSummary's constructor. Also, when there's no
summary for a game, make one on the spot and add it to the db. This
will crash if the game's dict has been deleted. Need to deal with
that, probably by deleting unsummarazible games, becuase now if
somebody installs this on top of a device where a game's dict is
missing and it has no summary I'll never boot.
2010-11-19 18:37:00 -08:00
Andy2
586b211b04
add dict name and language to summary database. Probably eventually
...
want to move everything for the display here -- and maybe the file
contents too as a BLOB.
2010-11-19 18:24:56 -08:00
Andy2
71059e6dff
remove nPlayers from game_summarize
2010-11-19 18:23:34 -08:00
Andy2
43be0183a5
just assert that dict can be opened as part of opening game. GamesList
...
is now responsible for not launching a game if its dict is gone.
2010-11-18 19:05:22 -08:00
Andy2
3eb8b723de
don't assume no-dict dialog should call finish on its calling
...
Activity() on exit -- we're not letting the Activity launch any more.
2010-11-18 19:04:43 -08:00
Andy2
198534dce3
check if dict missing and warn rather than do anything that will crash
...
if it's not there. Ideally I could open the config dialog so user
could change the dict but that isn't working. Maybe just offer to
open it after swapping in the default dict?
2010-11-18 19:00:49 -08:00
Andy2
7921ddca10
don't crash when asked to reset a game whose dict has been deleted.
2010-11-18 18:52:04 -08:00
Andy2
163c124072
update for b19
2010-11-17 06:13:31 -08:00
Andy2
fc88742978
up constants for b19
2010-11-16 21:06:43 -08:00
Andy2
a1be555910
improve string for deleted remote game -- but really needs a "delete
...
now" button.
2010-11-15 19:02:12 -08:00
Andy2
d809db7b21
plug into delete and reset code to notify relay that game's forever gone.
2010-11-11 06:25:08 -08:00
Andy2
cf84cce41a
define and handle new other-was-deleted error relay is about to start
...
returning.
2010-11-11 06:23:48 -08:00
Andy2
e3f373039a
add informOfDeath to communicate to relay when game is deleted
2010-11-11 06:22:38 -08:00
eehouse@eehouse.org
048eff92b8
Merge branch 'relay_proxy' of /home/andy2/dev/git/LOCAL_ORIGIN into relay_proxy
2010-11-10 07:17:39 -08:00
eehouse@eehouse.org
7929167129
Merge branch 'android_branch' into relay_proxy
2010-11-10 07:06:10 -08:00
Andy2
f373b52d45
fix bug drawing tile letters when drawScaled() got triggered (e.g. for
...
W on non-std-sized screen): pass null as scr rect to drawBitmap so the
whole bitmap gets used.
2010-11-10 07:05:40 -08:00
Andy2
d3e644db83
stop requiring 1.6 sdk when runs fine on 1.5
2010-11-10 06:57:45 -08:00
Andy2
42481a31cc
add seed to db; get and set it.
2010-11-08 17:23:54 -08:00
Andy2
82876bda06
add seed and fetch it in jni
2010-11-08 17:23:16 -08:00
Andy2
b49015c9a1
map out-of-range lang codes to 0. Otherwise we get outOfBounds
...
exceptions once Hex dict is installed.
2010-11-07 15:42:09 -08:00
Andy2
d893632e1b
map out-of-range lang codes to 0. Otherwise we get outOfBounds
...
exceptions once Hex dict is installed.
2010-11-07 15:34:40 -08:00
Andy2
83ae8d316c
switch to RelativeLayout, putting lock checkbox at top and play game
...
button in the middle with everything else scrolling in between. This
particular application of RelativeLayout works on 1.5 (in emulator).
2010-11-07 15:13:39 -08:00
Andy2
aff3c9a931
stop requiring 1.6 sdk when runs fine on 1.5
2010-11-07 15:12:37 -08:00
Andy2
1e5ac393c1
update for b18 (but leave b17 description below since that represents
...
two months of work and b18 two hours.)
2010-11-07 14:13:04 -08:00
Andy2
6da013af9d
up constants for beta-18
2010-11-07 14:04:37 -08:00
Andy2
c2472c0cb5
don't call java code if rect width is 0. Fixes crash (but not design
...
problem) where first to connect in room specifies a timer and second
does not. Second eventually gets message saying there's a timer but
has not layed out space in the board and java freaks out when later
asked to make a 0-width image. This fix leaves the device not drawing
the timer until the game is reopened. The better fix would trigger a
re-layout as soon as the change is made.
2010-11-07 14:03:24 -08:00
Andy2
83f6ebca79
work around bug -- or design flaw -- where when timer is set hint or
...
robot with blank in tray keeps flashing the in-progress indicator by
flagging CMD_TIMER_FIRED as a non-ui event so busy() won't return when
it's what's on the queue. Problem with that is that the timer stops
advancing during a hint which is clearly not what's happened.
2010-11-07 12:13:07 -08:00
Andy2
2c95179050
don't complain about empty room name for standalone game
2010-11-07 11:50:01 -08:00
Andy2
57838c0436
improve script. Allow pass either branch or tag on commandline,
...
defaulting to branch of tree from which called. Add usage(). set -u
-e and deal with [ -n "$1" ] being an error in that case.
2010-11-07 08:16:36 -08:00
Andy2
46a01ace56
work around occasional crash in on-device testing by checking for 0
...
before passing to getString. Not sure of the circumstances but the
crash is coming from restoreManagedDialogs() -- might be related to
screen orientation changes.
2010-11-06 21:34:16 -07:00
Andy2
a6a7f1899d
remove logging
2010-11-06 21:01:50 -07:00
Andy2
2fc48cbd97
nuke unused constant
2010-11-06 21:01:29 -07:00
Andy2
92ec742f90
script to build from a clean tree. I'm getting emacs and git tmpfile
...
picked up by the android build system and incorporated into .apks;
this will avoid that.
2010-11-06 20:19:07 -07:00
Andy2
73d7c7a27b
use new field to determine if simple relay config dialog can handle
...
the game or if user's already changed it enough that the full-on
dialog is required.
2010-11-06 18:26:09 -07:00
Andy2
f36b253ae7
add number of players to GameSummary. Changes DB but it's already
...
changed since last beta so I'm not upping the version.
2010-11-06 18:24:44 -07:00
Andy2
9fccbcc6b4
Problem with new minimal-config relay dialog: user can accidentally
...
tap "play game" and wind up connecting and creating an empty-room-name
game; or can dismiss the dialog and be confused because there's no way
back to it. Solution: define empty-room-name as an illegal case.
Check for it when "play game" is tapped in either config dialog and
raise an alert. And when user wants to open a game from the GamesList
activity go to the minimal config dialog if it's a relay game without
a room name.
2010-11-06 16:41:12 -07:00
Andy2
8213c9a5c1
add showOKOnlyDialog
2010-11-06 16:38:33 -07:00
Andy2
248c758b1c
add a bit of space around bullet items
2010-11-06 16:37:59 -07:00
Andy2
b7fc678e3d
tweak changes, removing steps to create networked game since that's
...
part of the UI now.
2010-11-06 15:29:05 -07:00
eehouse@eehouse.org
58317afb28
Merge branch 'android_branch' into relay_proxy
2010-11-06 15:06:08 -07:00
Andy2
ceec9eda28
set m_invalPath so new network game will be drawn correctly first time
...
back in GamesList
2010-11-06 15:01:06 -07:00
Andy2
a72e029f40
add name field to and use a style for bulleted items in simplified
...
relay-connect dialog; remove not-again text and dialog attached to
new-relay-game button; tweak text.
2010-11-06 14:55:57 -07:00
eehouse@eehouse.org
8dad8750ba
Merge branch 'relay_proxy' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2010-11-06 14:43:57 -07:00
Andy2
d6adc84ee3
tweak two prefs strings
2010-11-06 14:40:28 -07:00
Eric House
98716b755a
get rid of menuitem that was there only for development testing
2010-11-06 08:30:45 -07:00
Andy2
c125edd2cb
make text bulleted -- easier to read/follow
2010-11-05 05:53:28 -07:00
eehouse@eehouse.org
fc739e2c67
Merge branch 'android_branch' into relay_proxy
2010-11-05 05:19:16 -07:00
eehouse@eehouse.org
6d205011f5
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2010-11-05 05:12:59 -07:00
Andy2
145ab6f356
remove wordy explanation
2010-11-05 05:11:40 -07:00
eehouse@eehouse.org
64cc199e1a
Merge branch 'relay_proxy' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into relay_proxy
2010-11-05 05:10:24 -07:00
Eric House
0d863d2d3f
fix casting error caught by compiler
2010-11-05 05:06:24 -07:00
Eric House
7b3691662a
version of build.xml modified to pass -xline to javac. For future use...
2010-11-05 05:06:04 -07:00
Andy2
2f38ce3d92
add button leading to the main config dialog plus an explanation of
...
what it's for.
2010-11-04 20:37:59 -07:00
Andy2
23924ff74e
add new activity that's popped up on creation of a networked game to
...
ask only for the room name to make it as easy as possible to
get started.
2010-11-04 19:48:46 -07:00
Andy2
c9239fc921
make method public
2010-11-04 19:46:05 -07:00
Andy2
9c48c91156
init room name to current text -- duh! -- preventing close process
...
from thinking a change has been made (room name nulled) when none had
been.
2010-11-04 06:36:28 -07:00
Andy2
c630697c59
Fix crash on 2.2 emulator by turning of ipv6 on emulator. per
...
workarounds found online. Suggested fix is to use io instead of nio.
2010-11-03 20:54:35 -07:00
Andy2
e2ee0755cb
set max len for roomname field (with comment that it should be kept in
...
sync with the C constant)
2010-11-03 18:38:13 -07:00
Andy2
c039b92339
don't send 0-length message
2010-11-03 18:26:20 -07:00
Andy2
8bf8383d60
reread preferences in case of an upgrade. Fixes bug where default
...
port was 0 because the new key, meant to change the value, was not
being initialized. It's a hack to use a side-effect to determine
whether this is an upgrade, but since I'm already calculating it
didn't see any point to doing it again.
2010-11-01 18:56:23 -07:00
Andy2
1e5a856287
log host/port connecting to. Too useful to omit.
2010-11-01 18:53:36 -07:00
Andy2
8f55469930
remove strings no longer in English
2010-11-01 18:12:14 -07:00
Andy2
40e42b79c5
up version numbers and strings -- getting ready for release
2010-10-30 09:11:47 -07:00
Andy2
b2fd178d60
tray->rack; clarify not-again text for 'turn done' button so it isn't
...
stupid when displayed for ending a trade.
2010-10-29 20:24:50 -07:00
Andy2
64a8b1e61a
change confusing const name
2010-10-29 20:20:25 -07:00
Andy2
3d52698939
don't show all-here not-again dialog to host host -- already got the
...
first-in version.
2010-10-29 19:14:56 -07:00
Andy2
148fe848c2
get rid of implication that some deletions are undoable.
2010-10-29 19:02:57 -07:00
Andy2
fd1ca2c9c5
confirm single game delete.
2010-10-29 19:02:21 -07:00
Andy2
5b6a5aafe8
add three not-again messages displayed after connection is first made
...
with the relay, for first-in-room, last-in-room, and the less common
middle case. Add confirmation dialog for game reset.
2010-10-29 18:44:07 -07:00
Andy2
6de7fb28e3
add lock-setting checkbox to game config dialog and toggle
...
setEnabled() on most widgets as it's checked. Add not-again dialog
explaining possibility of reset of started game. Don't even show the
checkbox for non-started game.
2010-10-29 07:42:16 -07:00
Andy2
814dd89458
remove unused ivar; override setEnabled to dis/enable delete button
2010-10-29 07:40:41 -07:00
Andy2
30b6a6b54e
remove unused and confusing id
2010-10-29 06:48:45 -07:00
Andy2
a7c1319527
call super only in the default case
2010-10-29 06:48:18 -07:00
Andy2
d98525de95
make chat display dialog blocking. This fixes problem where multiple
...
chats received at once see all but the first dropped, and probably
fixes reported problem where only one message every got displayed.
2010-10-29 06:46:27 -07:00
Andy2
b115ce14ed
add devOrder (= hostID) to params passed on connect. Fix to pass new
...
param from jni; use object to pass params into UI thread since there
are now too many for handler.
2010-10-29 06:34:39 -07:00
Andy2
4cd15a9c6a
Merge branch 'relay_proxy' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into relay_proxy
...
Conflicts:
xwords4/common/comms.c
2010-10-29 05:27:07 -07:00
Andy2
c087b4b031
add room name to callback used when device connects: pass the new
...
parameter through and format into messages posted via Toast.
2010-10-28 18:48:07 -07:00
Andy2
645a042481
add room name to callback used when device connects: fix jni to compile
2010-10-28 18:46:28 -07:00
Andy2
ddeb744ff7
init room name to empty string
2010-10-28 18:43:06 -07:00
Eric House
4ae58342da
test, don't assert: comms can be null
2010-10-28 05:45:56 -07:00
Eric House
670f7982ea
add comms_isConnected
2010-10-27 21:58:36 -07:00
Eric House
1b83b13101
make player name and password single-line
2010-10-27 21:58:02 -07:00
Eric House
eba5b77494
add comms_isConnected; public room variables default to false
2010-10-27 20:50:11 -07:00
Andy2
7ad4a43468
use new confirm-delete-all dialog to confirm deletion of dictionary
2010-10-27 06:33:13 -07:00
Andy2
4c17ea8802
generalize confirm-delete-all dialog into confirm-then-do
2010-10-27 06:25:29 -07:00
Andy2
559f933ef5
tweak not-again hint wording
2010-10-26 19:33:38 -07:00
Andy2
11c68797bf
unique title for not-again dialogs
2010-10-26 19:28:22 -07:00
Andy2
eb41e24c4e
show language of dict that can't be found
2010-10-26 18:48:28 -07:00
Andy2
84e6d94919
add languages to dict names in set-default spinner
2010-10-26 18:35:54 -07:00
Andy2
c8a6f453c9
dismiss underlying activity when no-dict dialog is cancelled too.
2010-10-26 18:28:54 -07:00
Andy2
1ceea2cde2
check that default dict exists and if it doesn't use same as if hadn't
...
been specified. Catches case where dict is downloaded, made new-game
default, and then deleted.
2010-10-26 18:20:49 -07:00
Andy2
26210e1cf2
new function for reporting missing dict called from two places
2010-10-26 18:08:53 -07:00
Andy2
89c7e02928
add CollegeEng dict and make it default for new games
2010-10-26 06:54:54 -07:00
Andy2
f9b2eb4a3e
attach not-again dialog to turn done menuitem
2010-10-25 21:32:07 -07:00
Andy2
d7b6cb0691
use resetGame() to populate a newly created game. With this change a
...
new network game will connect without first having been opened in the
GameConfig dialog.
2010-10-25 18:56:51 -07:00
Andy2
e1b7a0f44d
when resetting game, if it's multi-device but doesn't have a default
...
address (as will be the case if it was just created), get and give it
one.
2010-10-25 18:55:53 -07:00
Andy2
3cbda7471c
init public room vars to false
2010-10-25 18:55:15 -07:00
Andy2
54d312e523
saveSummary(0 needs to be passed context in case must init dbhelper.
2010-10-25 18:51:07 -07:00
Andy2
2e122fe9f3
default for new networked game is no robots, second player remote.
2010-10-25 18:08:09 -07:00
Andy2
39e502fe71
add not-again hints to all the buttons
2010-10-24 17:47:11 -07:00
Andy2
2fa76a9e24
add second button to games list to add networked game, and remove
...
ability from config dialog to make a game networked or not. This
should confuse people less. Better would be if the two buttons had
icons and those icons were associated with games in the list according
to which type of game they represent.
2010-10-23 18:41:37 -07:00
Andy2
cff95ce3de
go back to play being the onclick action (removing preference to make
...
it that way); add more newbie hints; fix DIALOG id definitions to not
overlap superclass's.
2010-10-23 14:08:57 -07:00
Andy2
038f6bd94c
rename some private methods; add onPrepareDialog to fix problem where
...
msg stuck from previous invocation
2010-10-23 14:06:03 -07:00
Andy2
dd82fa02ad
remove chat menuitem -- it's only a button now.
2010-10-23 14:00:24 -07:00
Andy2
314872d533
shrink needs-sync flag icon
2010-10-23 13:52:56 -07:00
Andy2
9383ef064d
use sync icon instead of "M" to mark games with data.
2010-10-23 13:45:31 -07:00
Andy2
43ad43b604
change meetup server back to relay
2010-10-23 11:24:19 -07:00
Andy2
b6dfa0be8b
disable background-checking code for now: make default be disabled and
...
remove Preference that allows to change it.
2010-10-23 11:19:55 -07:00
Andy2
5a5c73916e
Don't allow copy of relay-connected game.
2010-10-23 11:08:33 -07:00
Andy2
593dac9d99
rotate 90 degrees
2010-10-22 22:04:09 -07:00
Andy2
7765bd0a1a
move decision how to display connection info from CommsTransport to
...
BoardActivity (where it'll be easier to include optional not-again dialog)
2010-10-21 20:13:41 -07:00
Andy2
8fac0945b9
chat not-again message without obscenities
2010-10-21 19:22:17 -07:00
Andy2
99dbbb443c
add comms_canChat, which knows better than java code what state a
...
connected game is in, and call it to determine whether to show the
chat icon.
2010-10-21 19:14:10 -07:00
Andy2
198f39b606
don't use yes button for simple ok dialog
2010-10-21 19:12:04 -07:00
Andy2
ae97d7d0f4
shouldn't have commented that out...
2010-10-21 06:51:26 -07:00
Andy2
aa0be5e2f2
remove unused imports
2010-10-21 06:50:29 -07:00
Andy2
ea617f39fa
to deal with not being implement a common superclass for Activity and
...
ListActivity create a delegate they use for dialog-related stuff.
Move code from them into it -- and delegate.
2010-10-21 06:33:04 -07:00
Andy2
5599f91232
new prefs key and string for not-again help dlg for chat
2010-10-21 06:31:28 -07:00
Andy2
848c1493fd
chat button enabled only for multi-device games. Needs to be disabled
...
for unconnected games as well....
2010-10-21 06:30:48 -07:00
Andy2
8a891816b4
add chat button
2010-10-21 06:28:01 -07:00
Andy2
5c9cf0ebc8
add first helptext dialog, with do-not-show-again button, attached to
...
the sync menuitem. The plan's that a bunch of these will make the
game easier for newbies to use.
2010-10-20 20:48:18 -07:00
Andy2
0d4f77fb0a
add sync icon to games list menu
2010-10-20 20:00:40 -07:00
Andy2
8788f9d4d5
move OK dialog to new scheme. Using a static global Bundle instead of
...
the newer form of showDialog because that requires version 8 of the
SDK.
2010-10-20 19:52:13 -07:00
Andy2
c1dc34e25d
move common dialog code from Utils to XWActivity and XWListActivity
...
(which delegates to XWActivity.)
2010-10-20 18:34:41 -07:00
Andy2
8db6c7ad7f
add setPrefsBoolean
2010-10-20 18:09:24 -07:00
Andy2
95f5c2e023
cleanup: add missing string; remove unused strings and array.
2010-10-19 18:43:26 -07:00
Andy2
01e926e8b3
up sdk version to silence warning
2010-10-19 18:42:32 -07:00
Andy2
17f1790d52
remove unused layout files (since they take up space in the .apk even
...
if never referenced)
2010-10-19 18:42:07 -07:00
Andy2
85e32907f0
remove '\r's
2010-10-19 18:39:27 -07:00
Andy2
1fecf9dbb4
implement new check-relay menu, and use new task to check for messages
...
if there are any connected games.
2010-10-19 07:54:52 -07:00
Andy2
4a5c0832d4
use new generalized code to check for messages.
2010-10-19 07:54:10 -07:00
Andy2
94b8aedda7
generalize relay-msg-check code so can be used from two places.
2010-10-19 07:53:26 -07:00
Andy2
d1b1e6db14
refactor into common subroutine -- no behavior change
2010-10-19 07:50:23 -07:00
Andy2
994a73e28b
return null, not empty list, when nothing found
2010-10-19 07:49:54 -07:00
Andy2
f31e28dbd7
menu and strings for check-server menu added to GamesList
2010-10-19 07:49:23 -07:00
Andy2
ab8c3f985e
add generic info dialog that, with luck, can be reused.
2010-10-19 07:48:34 -07:00
Andy2
b718804a4b
new AsyncTask for pinging server on demand
2010-10-19 07:47:05 -07:00
Andy2
9cfb302a2f
don't populate room name; better that people see the hint
2010-10-18 06:48:26 -07:00
Andy2
db3c4da01f
set a default value that actually exists
2010-10-18 06:47:31 -07:00
Andy2
b4c1710c66
remove strings dropped with prev change
2010-10-18 06:31:19 -07:00
Andy2
62d054cd46
default show-robot-scores to true; move background-check-frequency
...
within existing PreferenceScreen
2010-10-18 06:30:56 -07:00
Andy2
a2f0ec232a
put back RestartTimer call inadvertently removed
2010-10-18 06:23:24 -07:00
Andy2
dda6e056a0
set summary from the array of use-visible values
2010-10-18 06:18:37 -07:00
Andy2
2d66913323
populate public rooms list as soon as checkbox set -- and mention
...
language and number of players in failure message
2010-10-17 21:13:14 -07:00
Andy2
56e83bfc1c
trim leading and trailing whitespace from roomnames. If somebody has
...
two spaces between words those will still matter.
2010-10-17 20:45:48 -07:00
Andy2
6b7a92534a
make default relay port 10997 (and change key so it'll apply for everybody)
2010-10-17 20:37:51 -07:00
Andy2
332ff27d8a
use same string for both
2010-10-17 20:30:43 -07:00
Andy2
a58e74b70a
add play game button at bottom of game config dialog.
2010-10-17 20:27:21 -07:00
Andy2
5c958eaadb
deal with null socket (e.g. if in airplane mode); deal with new public
...
rooms format.
2010-10-17 20:18:24 -07:00
Andy2
1621e5932a
give label different text from dialog title
2010-10-17 20:00:41 -07:00
Andy2
8972df7b88
add explanatory title to phonies spinner
2010-10-17 18:55:09 -07:00
Andy2
885bfe4779
remove values button. Seven buttons is too much. Add back when have
...
means of assigning priority so it only shows up when there's space.
2010-10-17 18:42:44 -07:00
Andy2
2cd0bf8c24
add singleline and selectonfocus for roomname edit
2010-10-17 12:45:34 -07:00
Andy2
b63d730b53
compare languages rather than actual dict names so can switch dicts
...
mid-game.
2010-10-16 15:05:46 -07:00
Andy2
60e4c624e4
implement reply button; clear message edit field each time
2010-10-16 15:05:16 -07:00
Andy2
21afd79751
make send message first rather than last menuitem
2010-10-16 15:04:12 -07:00
Andy2
26b777acf8
don't post notification when results list returns empty
2010-10-16 11:01:12 -07:00