Commit graph

4651 commits

Author SHA1 Message Date
Andy2
3762fc07d1 express size in K (rounding up) 2011-05-15 08:02:06 -07:00
Andy2
94f582cdc0 switch size and wordcount columns 2011-05-15 08:01:36 -07:00
Andy2
332767105c express size in K (rounding up) 2011-05-15 07:37:29 -07:00
Andy2
7ccacdc26d switch size and wordcount columns 2011-05-15 07:28:10 -07:00
Andy2
a89d81587d Merge branch 'android_branch' into android_invite
Conflicts:
	xwords4/android/XWords4/res/values/strings.xml
2011-05-14 11:54:31 -07:00
Andy2
53f1bc8858 fix to use positional params in format strings 2011-05-14 11:44:13 -07:00
Andy2
ba6968c937 remove strings no longer used 2011-05-14 11:29:05 -07:00
Andy2
c996e98624 replace two menuitems, default-robot and default-human, with a single
that invokes a dialog giving an explanation and three choices: robot,
human and both.
2011-05-14 11:04:19 -07:00
Andy2
54a793f6c2 fix to use positional params in format strings 2011-05-14 10:25:58 -07:00
Andy2
6ee8c171be implement moveDict and redraw row with new location if successful. 2011-05-14 10:12:30 -07:00
Andy2
aedc3c6cdc fix title -- not showing wordcount any more 2011-05-14 10:10:24 -07:00
Andy2
f914a15b97 comment field GONE by default; revealed when used 2011-05-14 10:07:34 -07:00
Eric House
c99093fb35 Merge branch 'android_branch' into android_invite 2011-05-11 22:04:06 -07:00
Andy2
fe1bec74f5 add context menuitem to move dicts, dialog to confirm, and call
stubbed-out method to do the actual move.  Still need a title and to
inval so gets redrawn (and to implement the actual move.)
2011-05-11 19:01:13 -07:00
Andy2
644100a005 Add generic Object cache to work around being unable to subclass an
object that's defined in a layout file (class cast to the subclass
fails, as you'd expect.)  Will use this to cache a dict's location.
Eventually there needs to be a DB for dict details.
2011-05-11 18:59:41 -07:00
Andy2
e51b6f3322 add dict's locations to display 2011-05-11 18:07:07 -07:00
Andy2
19ed409dda add notion of dict location, method to get it, and rewrite a couple of
others to use that.
2011-05-11 18:06:43 -07:00
Andy2
7d38a629b5 add comment field to XWListItem and its layout. Get elements by id
rather than position.
2011-05-11 18:05:41 -07:00
Andy2
8b130521fa Merge branch 'android_branch' into android_invite
Conflicts:
	xwords4/android/XWords4/res/values/strings.xml
2011-05-10 18:55:13 -07:00
Andy2
b4b54c5fb9 quick hack to open up all groups. Need eventually to remember how
user sets 'em.
2011-05-10 18:52:47 -07:00
Andy2
ec1e8674ec replace placeholder language names with empty strings so, maybe, can
elect not to display
2011-05-10 18:36:48 -07:00
Andy2
782a9f1f70 get rid of strings that don't seem to be used anymore. Still need to
pull from localized files.
2011-05-10 18:36:04 -07:00
Andy2
af96e184d7 don't refresh public room names when game is locked. 2011-05-10 18:34:39 -07:00
eehouse@eehouse.org
bad8a5e19b Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch 2011-05-10 18:30:00 -07:00
Eric House
dd27a0ebcd first cut at script to do stuff with xml string resources, e.g. find strings that aren't used 2011-05-10 18:26:54 -07:00
Andy2
8a8e1c9db0 remove no-op method and call of same 2011-05-10 18:25:27 -07:00
Andy2
472ffd02bf fix getting wrong networked window title even when configuring a
non-networked game.  And remove no-op method call.
2011-05-10 18:24:57 -07:00
Andy2
75e41caf90 go back to using XWListItem (with its delete-me X) and get rid of
delete context menu item.
2011-05-10 06:31:09 -07:00
Andy2
2dbf1ac489 add formatted=false to postpone fix suggested by new version of SDK 2011-05-10 06:27:58 -07:00
Andy2
085748e201 hook up context menus, and add a delete item to replace the
checkboxes.  Still need to disable it when dict is built-in.  And
maybe add a different menu for languages.
2011-05-09 18:59:51 -07:00
Andy2
c990900913 cache list of langs. Performance is otherwise abysmal. May need to
add mechanism to notify when the list is invalidated.  (Or move
caching into DictsLangCache class.)
2011-05-09 06:49:45 -07:00
Andy2
a559fdaae9 use a built-in layout for top-level rows to get the expander drawn right. 2011-05-09 06:32:30 -07:00
Andy2
9dfcb2dda2 first step toward using an expandable list for dicts browser, with
languages as first-level items each containing all of the dictionaries
in that language.  This is a snapshot: it's broken visually and
functionally.
2011-05-08 22:50:42 -07:00
Andy2
129a9e97ef fix compile error 2011-05-06 19:01:15 -07:00
Andy2
d407880dc1 complete the work of handling an incoming intent sent via a
new-game-invite URI.  Seems to work, but requires two devices to test.
2011-05-06 18:56:30 -07:00
Andy2
249402758a add new activity for starting a new game. Has four buttons and
(eventually) explanatory text.  Currently more-or-less works,
including sending an email with a link that when clicked launches
Crosswords.  (Still need to respond to that link on receipt, but I'm
at least pulling out the necessary fields.)
2011-05-06 06:52:10 -07:00
Andy2
77bf5e2d36 php file to be run on server to enable via redirection clickable links
in SMS app that will launch Crosswords.
2011-05-06 06:49:43 -07:00
Andy2
f05e02144c move setting gameID (if not already set) to creation of C version of
the struct so it always happens, and also set it back into the java
version at the same time.  Makes creation of new games easier.
2011-05-06 06:47:44 -07:00
Andy2
2294159c7c change sufficient to get a custom scheme in browser to launch me. Had
to duplicate an activity element which is bad and maybe won't work
everywhere so try to fix this.  But this *does* work in 2.2 emulator.
2011-05-04 19:04:02 -07:00
Andy2
4d31c9cbe5 update release notes 2011-05-03 18:55:51 -07:00
Andy2
a87f90b6e9 up version for b26 2011-05-03 18:47:16 -07:00
Andy2
b4bfea0d93 handle missing-dict downloads through DictsActivity too. Now
everything routes through that class via static methods that kick the
activity off if needed.
2011-05-03 18:25:46 -07:00
Andy2
6e973ba48d tweak wording 2011-05-02 18:40:35 -07:00
Andy2
0b7891ad8f look in sd dir too when asking if file exists 2011-05-02 18:33:19 -07:00
Andy2
d11ef3c390 From game config's download-more spinner items, launch DictsActivity
rather than a separate download.  This uses DictsActivity's query for
where the downloaded item should be stored.
2011-05-02 08:04:04 -07:00
Andy2
7cf412dd50 implement test for presence of external storage; don't crash if not present. 2011-05-02 07:39:07 -07:00
Andy2
5886f0ed85 cleanup; use dialog id from the right range. 2011-04-30 15:23:36 -07:00
Andy2
0171d0ccb2 inval new file from main thread after async task finished. Seems to
prevent attempts to read file while it's still being written (but only
on external storage.)
2011-04-30 15:23:14 -07:00
Andy2
e1e181949e offer user a choice between using internal and external storage when
downloading dicts.  Still to do: check if external is available before
offering; and either remove ability to download from within config
dialog or offer that choice there.  Or just use a preference to
determine where storage happens.  Also, on emulator game hangs during
download when using external storage.
2011-04-30 14:28:35 -07:00
Andy2
8caefef406 test for null lock. Market reports a NPE that this fixes, though it
can only happen if an onClick handler gets called after onPause().
Assuming that's true, this fixes it.
2011-04-29 18:58:02 -07:00
Andy2
f53f2dd224 remove GameConverter -- it's been months 2011-04-29 06:40:00 -07:00
Andy2
e89c6f94b6 update with changes since b24 2011-04-29 06:39:34 -07:00
Andy2
d49a20867a new default robot dictionary 2011-04-29 06:25:16 -07:00
Andy2
deeb2f3cba fix compile-command 2011-04-29 06:24:41 -07:00
Andy2
61c33ca783 new smallish English dictionary. See the Makefile for origins. 2011-04-29 06:24:25 -07:00
Andy2
02f23ac1ec In list item loading async task, don't wait on lock. Give up if it's
not available and wait to be called again.  Fixes occasional assertion
failure when lock held for even five seconds.  Screen jerks around a
bit but otherwise seems to work well.
2011-04-28 21:08:24 -07:00
Andy2
ba026f761d get rid of unused parameter 2011-04-28 18:47:16 -07:00
Andy2
2572af039d fix NPE by refusing to calc font info when don't have char set, and by
resusing to draw when don't have font info.  Until other bugs got
fixed this must meant lots of all-white boards, and it's not strictly
necessary, but is an improvement.
2011-04-28 18:43:18 -07:00
Andy2
09100dcb2c track lang code of last dict sent and don't send repeats. 2011-04-28 18:41:39 -07:00
Andy2
3b3a822dcc a gmae may have several dictionaries in several places, but all should
share the same language.  So pick one to send to draw_dictChanged
rather than sending all (some of which may be null.)
2011-04-28 18:40:44 -07:00
Andy2
2886458814 assign dicts in constructor. Makes new games have the right dicts
even if not configured after, assuming defaults are set.
2011-04-27 06:51:30 -07:00
Andy2
9013897a5a assign dicts as soon as language is changed. 2011-04-27 06:39:52 -07:00
Andy2
399fc081d7 add menuitem to set default robot dict. 2011-04-27 06:38:45 -07:00
Andy2
17fd65fb2d list cur value for robot dict too 2011-04-27 06:38:07 -07:00
Andy2
0c9d33da3f Add infrastructure to sort dicts by wordcount so robot can have
smallest and human largest.  Sorting works.  Still need to fix when
new dicts get assigned after lang change -- too often all players wind
up inheriting the default.
2011-04-26 18:59:11 -07:00
Andy2
a5fd4cef30 move setRemoveOnDismiss into delegate, and call it from a dialog
that's been crashing when called from performRestoreInstanceState.
The hope is that this will prevent the crash by forcing the dialog to
always be recreated.  But it may be that I just need to test for
m_missingDictNames being null....
2011-04-26 18:26:21 -07:00
Andy2
83f2882589 what I mean to check in (without commented out stuff) 2011-04-26 06:43:06 -07:00
Andy2
4113d92be7 need to replace the main dict too 2011-04-26 06:41:31 -07:00
Andy2
33c81ec7ec check for null to fix NPE. 2011-04-25 21:08:51 -07:00
Andy2
7a5920e9f2 use game dict if no player dict (to avoid NPE) 2011-04-25 21:01:15 -07:00
Andy2
ecc5357ef8 up version info, and collapse two locations into one resource entry. 2011-04-25 20:46:23 -07:00
Andy2
024f7e0541 per-gi dictName matters again: preserve it, include it in lists passed
to jni, and don't bother to assign a per-player dict when it'd be the
same as the game dict.  Allows many games to have just the one, and
also fixes problems opening games saved with older versions.  Duh.
2011-04-25 20:24:56 -07:00
Andy2
af08b2e5b0 add a couple of asserts 2011-04-25 20:17:54 -07:00
Andy2
bf67a88c5a expect the array of dicts passed to include the game dict (as part of
changes to always have a game dict and to have player dicts only when
they're different.)
2011-04-25 20:16:38 -07:00
Andy2
6aa0d38c45 don't call through to java draw_dictChanged unless it's for the main
game dict.
2011-04-25 20:15:34 -07:00
Andy2
9d973cca15 load summaries for game list items via async tasks whenever a cached
View isn't present.  Fixes failure to redraw after changing language,
and also should speed inital load.  Needs testing.
2011-04-23 22:58:11 -07:00
Andy2
e9fadd4d96 Rework list item code to deal with when the summary isn't available:
have update icon hidden by default, and print the game name (which we
know.)
2011-04-23 18:19:35 -07:00
Andy2
20ec6dd011 Avoid relocking game after downloading: don't set lock checkbox
in onResume() unless it's the first time through.
2011-04-23 07:51:31 -07:00
Andy2
3c30cbd23a move ownership of language and dict lists used in spinners into
DictLangCache where they can be updated when a dict is added via the
"download more..." item (inclusion of which is a hack.)  Now as soon
as you return to the spinner after downloading you'll have the new
dict or lang to choose.
2011-04-23 07:39:56 -07:00
eehouse@eehouse.org
325ac65c05 Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch 2011-04-21 18:44:46 -07:00
Andy2
60922baf72 bunch of changes moving UI from using one dict per game to one per
player: remove dictName from CurGameInfo and GameSummary classes and
from DB; deal with missing dicts (the warning, fetching and replacing)
when opening games and deleting dicts.  Etc.  Trivial testing passes.
2011-04-21 18:37:11 -07:00
Andy2
3970a3ef8a no need to make new string to copy since they're immutable 2011-04-21 18:35:10 -07:00
Andy2
c814226a08 get rid of gi.dictName: don't pass it across the jni boundary 2011-04-21 18:29:37 -07:00
Andy2
4e7570020f remove mistaken (I think) assert 2011-04-20 22:13:44 -07:00
Eric House
1ab5aa02b9 Makefile for new dict containing 4288 words: good for the robot. 2011-04-14 22:09:44 -07:00
eehouse@eehouse.org
5a21aea2e5 Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch 2011-04-13 06:58:58 -07:00
Eric House
3cc105da0b add ability to dump board (model) as text, protected by ifdef that
will likely only get set on Linux.  Uses lower-case to designate
blanks.  For that and maybe string size assumptions is very broken for
non-ascii languages, including Spanish.
2011-04-13 06:45:22 -07:00
Eric House
0474fda127 reverse (back) sense of show-other option 2011-04-13 06:41:49 -07:00
Eric House
baedbdff2c remove logging 2011-04-12 22:17:56 -07:00
Eric House
92ac25ed3f don't require MAX_NUM_PLAYERS==4 2011-04-12 22:17:45 -07:00
Andy2
002bb40a09 report counts/values using language rather than dictionary name. To
support that, pass lang name from java into jni.
2011-04-11 18:55:42 -07:00
Andy2
40116d792f format "game_name (lang)" using string in resource. 2011-04-11 18:52:10 -07:00
Andy2
3c0cf176ef show language as part of game name, not dict as separate line 2011-04-11 06:54:31 -07:00
Andy2
3fb368692c dammit -- proofread those checkins! 2011-04-11 06:52:07 -07:00
eehouse@eehouse.org
819adbe236 Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch 2011-04-11 06:43:00 -07:00
Andy2
c6cd60deef Save and restore per-player dicts; load games that have 'em correctly.
Robots default to BasEnglish dict and humans to CollegeEng.  Add new
per-game default for robot dict.  Still need to deal with language
changes and non-English case in general.
2011-04-11 06:42:17 -07:00
Andy2
96254ad8b5 when opening saved game, notify draw of per-player dicts as well as of
a single game-wide one.
2011-04-11 06:39:31 -07:00
Andy2
092dfdd590 not supposed to be checked in with debugging on 2011-04-11 06:33:31 -07:00
Andy2
2b3398e6a2 pass Context in constructor rather than to methods that need it 2011-04-11 06:31:48 -07:00
Andy2
dc70db5ba4 catch up with API change 2011-04-11 06:16:25 -07:00
Eric House
d6165deb47 anything beyond the 15th char in a bonus-square line is a comment (ignored) 2011-04-10 13:13:45 -07:00
Eric House
26eadb3b99 add commandline option to set bonus square pattern via an external
file.  (Effects only Linux versions.)
2011-04-10 13:04:05 -07:00
Eric House
3310645a12 test files for new bonus-squares-settable feature 2011-04-10 13:02:45 -07:00
Andy2
4272686034 Makefile for new smaller Dutch wordlist 2011-04-08 22:13:31 -07:00
Andy2
97d54c86eb snapshot: track dictName per player in addition to per game. Not yet
used yet; need to pass into jni next.
2011-04-08 06:50:08 -07:00
Andy2
fc4e454d92 bugfix: add background to set of colors restored. 2011-04-08 06:17:35 -07:00
Eric House
c77d3039cc add XP_FREEP. Should be no change in behavior. 2011-04-07 18:07:45 -07:00
Eric House
0ce963336a Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch 2011-04-04 16:16:09 -07:00
Andy2
55221c70b0 fix for new API 2011-04-03 21:51:51 -07:00
Andy2
3b7b4802a9 add ability to specify, track and use separate dictionaries for each
player.  Works for gtk client.  Compiles for Android but there's no UI
yet to specify more than one dict.  Management of dupicate dicts
without duplicating memory -- refcounting -- will be up to the
platforms.
2011-04-01 19:57:10 -07:00
Eric House
b5746eece9 color tray divider 2011-04-01 18:16:04 -07:00
Andy2
d430e158ba add commandline flag for phonies 2011-04-01 17:36:04 -07:00
Andy2
f64257752f fix failure to draw timer in different player color when it has same
value as previous timer, e.g. when you're tapping on players who
haven't had a turn yet.  Note that without the test to prevent drawing
the same timer hints are broken -- device is too busy to make progress.
2011-04-01 07:49:31 -07:00
Andy2
f6be6222a1 draw timer in player color 2011-04-01 07:22:40 -07:00
Andy2
6584c69df1 add and honor preference for board background color (e.g. scoreboard
and tray when no tile present).  This may allow a light-on-dark theme.
2011-04-01 07:17:11 -07:00
Andy2
a64bad0b73 just make network icon the height of scoreboard (not tested on tablet,
the place where this was last changed)
2011-04-01 07:14:04 -07:00
eehouse@eehouse.org
32143d8116 Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch 2011-03-31 18:19:31 -07:00
Andy2
9f76bdede9 hold mutex for slightly shorter time 2011-03-31 18:16:56 -07:00
Eric House
27346cf58b change AIP to remove several stored messages at a time. Will use
later to delete messages after proxy fetches and ACKs them so traffic
isn't repeated.
2011-03-31 18:15:03 -07:00
Eric House
7aeb0a4df0 make default socket timeout 5 seconds, not 20. 2011-03-31 18:13:16 -07:00
Eric House
c30dd905a2 move getting user strings into impl so available in background. Fixes
bug where trades were not reported when received from relay via proxy.
2011-03-31 18:11:36 -07:00
Eric House
13b5acf8b5 changes log updated 2011-03-31 18:07:02 -07:00
Andy2
cd4ddd5dbb fix help 2011-03-31 06:41:39 -07:00
Andy2
379538fd7e show robot/remote scores by default 2011-03-31 06:41:34 -07:00
Andy2
80e0edbf03 cleanup 2011-03-31 06:41:11 -07:00
Andy2
21ab1d6d55 constants: toward beta 24 2011-03-30 18:58:06 -07:00
Eric House
67a3349919 Don't move arrow on pen-up if pen-down was in a different cell. 2011-03-29 18:13:38 -07:00
Eric House
f4ea54c30b cleanup; no behavior change 2011-03-29 18:12:55 -07:00
Eric House
1caddcf39b no need to request orientation when it never changes 2011-03-15 06:17:00 -07:00
Eric House
553bee4956 replace fwrite etc with write so fsync can be added before close. 2011-03-14 18:56:17 -07:00
Eric House
bcf767d66e fix NPE in race; no longer any need to set preferred orientation; do a
bit of asserting trying to catch another race.
2011-03-14 18:34:00 -07:00
Eric House
58cb40b08e claim to handle keyboardHidden change so it'll be ignored. 2011-03-14 18:32:36 -07:00
Eric House
c0dd42d0ba let's see if not claiming to handle orientation changes stops Samsung from ignoring my portrait-only setting. 2011-03-14 06:57:17 -07:00
Andy2
8bb2857e63 The relay is hanging inside recv(). Use setsockopt to set a 20-second
receive (and send) timeout on all sockets accept() returns.  Sockets
that timeout should then get closed and dropped.
2011-03-12 05:13:54 -08:00
Andy2
58ff3189a0 remove layout and code allowing toolbar to be positioned in landscape
mode.
2011-03-12 04:15:57 -08:00
Andy2
257d7cf094 set requested screen orientation. Seems to prevent going into
landscape mode when keyboard opened.
2011-03-11 21:52:37 -08:00
Andy2
84d0823341 prevent board from displaying in portrait mode. 2011-03-11 19:07:05 -08:00
Andy2
01fe8f6087 don't ping relay every time app is launched -- timer is enough. 2011-03-11 19:06:42 -08:00
Eric House
9b99183d2c update for b23 2011-03-11 18:06:43 -08:00
Andy2
e7ab1c34b7 add more carriage returns for history formatting 2011-03-11 06:52:43 -08:00
Andy2
a280fe7e3e remove localized format strings identical to that causing crash in English 2011-03-11 06:47:29 -08:00
Andy2
552a5ff6da up constants for beta 23 2011-03-11 06:45:49 -08:00
Andy2
28f3ad316b hide/show hint at top of games list via a preference rather than the
number of games in the list, and modify hint text to point to the
prefs setting.
2011-03-11 06:44:25 -08:00
Andy2
c909f91a61 fix over-long initial trays in history by adding <cr>. Not sure if
line brakes belong in common code or strings however...
2011-03-10 19:00:15 -08:00
Andy2
d6dd2b942f fix crash tapping player name after a trade -- since the format string
was wrong.
2011-03-10 18:56:13 -08:00
Andy2
492e086311 break the hint into two so goes-away part can be smaller. 2011-03-10 18:34:02 -08:00
Andy2
d56ce42585 hide games-list hint when more than 2 games present, and add text to
that effect so people aren't surprised.
2011-03-10 18:24:27 -08:00
Andy2
d9bb5197d4 Add two new menus to be available only when in trade mode. Hide and
show them and another group depending on whether trading at the time.
To make that work, replace the individual calls made to dis/enable
toolbar buttons with a single jin call that takes a struct full of
booleans and make that struct available in BoardActivity where menus
are hidden/shown.  Remove the individual calls from the jin interface.
2011-03-10 18:13:56 -08:00
Andy2
26a274ab0f make the empty-list message a header instead since its instructions
matter after there are games in the list.  But hide it whenever there
are four or more games.
2011-03-09 18:42:06 -08:00
Andy2
bfc5bb62dc don't call nobody dumb, even a robot. 2011-03-08 21:58:12 -08:00
Andy2
8ef3aa51b2 Reverse sense of is-local bit so that on upgrade people don't see all
their local players marked as remote.
2011-03-08 18:43:29 -08:00
Andy2
678cbe1dea fix plural and make name consistent 2011-03-08 18:42:45 -08:00
Andy2
fc4fddb055 check if can hint (to refresh buttons) after enter/leaving trade mode 2011-03-08 07:41:16 -08:00
Andy2
aa88503cfb have board_canHint() return false when trade in progress. 2011-03-08 07:40:38 -08:00
Andy2
15ef9c4fd2 add prompt to dict-pick spinner 2011-03-08 07:31:11 -08:00
Andy2
7de951f149 update with changes from b21 2011-03-08 07:13:14 -08:00
Andy2
9acea8ec5a fire a toast in response to "check relay" menu so people get sense of
something being done.  Firing from RelayService might be more honest
but is much harder.
2011-03-08 06:33:22 -08:00
Andy2
9dd69015cc say "relay", not "server" 2011-03-07 21:37:56 -08:00
Andy2
133079e200 tweak newbie message for new local game creation 2011-03-07 21:14:47 -08:00
Andy2
0225bf215b change text of add-game buttons to be (says Deb) clearer 2011-03-07 20:47:49 -08:00
Andy2
b2db1a0936 don't call remote player robot 2011-03-07 20:44:31 -08:00
Andy2
b441fdb56e make hint text bigger and proportional to cell size. 2011-03-07 20:29:44 -08:00
Andy2
a6edcaadd9 zoom by five instead of four 2011-03-07 20:26:08 -08:00
Andy2
2f3a1b03f5 cleanup 2011-03-07 20:23:47 -08:00
Andy2
5c2d0a064c Better exchange miniwindow text. But more needed after fixing
BoardView code to better format.
2011-03-07 06:41:17 -08:00
Andy2
8c40628916 Support new error message about exchange being disallowed when no selection. 2011-03-07 06:40:11 -08:00
Andy2
54f2ae3edf error string for: fire user error rather than committing turn when
trade attempted without any tiles selected.
2011-03-07 06:29:40 -08:00
Andy2
828bd9aa4c fire user error rather than committing turn when trade attempted
without any tiles selected.
2011-03-07 06:28:43 -08:00
Andy2
0e86467ea1 use high-contrast for mini-window (same as arrow) 2011-03-05 23:21:38 -08:00
Andy2
58d29fbb26 a bit of cleanup: inval rather than replace 2011-03-05 15:38:03 -08:00
Andy2
81e3578dd5 Fix another recycled dialog message by making superclass dismiss
listener adder available and using it.
2011-03-05 10:16:29 -08:00
Andy2
92a726aff3 call removeDialog() when dismissing blocking dialogs. Fixes reporting
the same robot move every time.
2011-03-05 10:05:31 -08:00
Andy2
166bee6c82 always show game name (for now) 2011-03-04 21:33:26 -08:00
Andy2
b0b747f642 remove logging around GameLock 2011-03-04 18:53:47 -08:00
Andy2
997365bc20 new printStack() required for prev commit 2011-03-04 18:36:53 -08:00
Andy2
4cdafbd510 reduce the length of the sleep when waiting for lock; add code to
capture stack trace at lock time that'll be printed out along with the
current thread's trace when I can't get a lock in one second.  I'll
comment that out shortly but want it for debugging -- though it's
untested: can't repro any failure to lock now.
2011-03-04 18:36:33 -08:00
Andy2
2b28a4d27c unlock GameLock before launching BoardActivity -- to fix a deadlock.
Also do lock/unlock in onPause/onResume rather than onStart/Stop to
hold the lock for a shorter time.
2011-03-04 18:22:17 -08:00
Andy2
1b6d8ebed2 don't show game name if it's hidden in BoardActivity -- that is, use
the same preference to govern both.  Still to do: need to inval all
game list items when that preference changes.
2011-03-04 07:40:56 -08:00
Andy2
2fdda2bae1 move game_name to its own row at top so it serves as title. 2011-03-04 07:39:54 -08:00
Andy2
754d7b06ef add boolean 'wait' to getSummary() allowing it to return null if it
can't get a read lock.  Fix GameListAdapter to handle that null.
2011-03-04 07:22:08 -08:00
Andy2
abdabd9c3c don't pass timeout value to join() when stopping jni thread. If the
timeout fires there's nothing I can do anyway.  So it it take as long
as required to exit run(), and if that's too long fix it.
2011-03-04 07:19:06 -08:00
Andy2
b085540ee3 make the jni thread a daemon per recommendation from google dev suppt. 2011-03-04 07:14:17 -08:00
Andy2
f21ddedc59 go back to singleTop for GamesList to see if it fixes the occasional
Activity duplication I'm seeing on-device.
2011-03-04 07:13:00 -08:00
Andy2
a5ba0ac5fe remove pending messages after sending them. 2011-03-04 06:38:25 -08:00
Andy2
a1d1251c0e remove logging 2011-03-04 05:46:20 -08:00
Andy2
6acf7fda68 fix crash: rather than pass chat message to jnithread that will be
null when the board activity has lost focus, save it to be sent once
the thread's been recreated.
2011-03-04 05:45:29 -08:00
Andy2
eb3b83ec48 fix rare crash by tracking whether showDialog has been called and
testing that before dismissing it.
2011-03-03 19:00:50 -08:00
Andy2
ecfe1d110e Make getSummary able to fail since it can be called when somebody has
a write lock that will be held for a long time.  One place it'll fail
is when game list item's been invalidated and wants to update.  Deal
with null summary coming back there.
2011-03-03 06:52:20 -08:00
Andy2
c6fc912d89 reimplement GameLock without ReadWriteLock which isn't quite what I
wanted (which is more like a checkout mechanism).  Lots of logging
remains to be removed.
2011-03-03 06:50:48 -08:00
Andy2
1ca8ce9192 make saveDict return false if aborts the download. (Not used yet.) 2011-03-03 05:38:45 -08:00
Andy2
ce61427bba generate md5 sum file optionally. Later I'll want to download these
to check that the file arrived safely.
2011-03-02 19:00:25 -08:00
Andy2
0348867326 add printStack() 2011-03-02 18:59:35 -08:00
Andy2
a0bf3405b8 get rid of columns I don't plan to use yet -- can always add later. 2011-03-02 18:58:20 -08:00
Andy2
693310bdc7 don't call super() twice!! 2011-03-02 18:57:56 -08:00
Andy2
b32f65574d now that game name's in the display, sort by that. 2011-03-02 07:10:43 -08:00
Andy2
9e56e4f40c call dbchange listeners after deleting game. And with the dbchange
listeners working a lot of inval/onContentChanged stuff can be
removed.
2011-03-02 07:02:24 -08:00
Andy2
61a9f708a2 add game name to list item. I really want to swap the columns now but
can't make player name/score line up correctly on right.
2011-03-02 06:49:04 -08:00
Andy2
467e999509 set and clear dbchange listener in onCreate and onDestroy rather than
onStart and onPause so it'll get called when not in front too.  Not
sure why this worked before the GameLock change....
2011-03-02 06:48:14 -08:00
Andy2
c144503630 move GameLock class from DBUtils to GameUtils 2011-03-01 21:59:15 -08:00
Andy2
ce6eca3fe5 add class that maintains read and write locks per-game record to
prevent writes to a game while it's open.  Seems to work, but needs
more testing.
2011-03-01 21:44:59 -08:00
Andy2
4eb77809fb remove redundant logging 2011-03-01 06:51:20 -08:00
Andy2
a344f26d1b add static boolean that controls whether logging is on (for java).
Add an Application subclass that fetches the value from a preference,
a checkbox setting in advanced prefs, and modify the static when
that's changed at runtime.
2011-02-28 20:07:07 -08:00
Andy2
54ef8f73c9 get rid of some logging 2011-02-28 18:43:47 -08:00
Andy2
69638d8aa9 fix string so we get called on boot 2011-02-28 18:36:47 -08:00
Andy2
bfc82242d7 add new column to be used to track whether a game is in use -- not
used yet but anticipated and I'm added a lot this release anyway....
2011-02-28 06:45:52 -08:00
Andy2
20ad465b96 from GamesList.onNewIntent, launch the first changed game rather than
just invalidating all changed list items.
2011-02-28 06:37:29 -08:00
Andy2
ed8707fb4b replace array[1] with HashSet to support more than one db change
listener (part 2)
2011-02-28 05:42:09 -08:00
Andy2
b57b6b1b31 replace array[1] with HashSet to support more than one db change listener 2011-02-28 05:41:02 -08:00
Andy2
c31e964ce4 remove class and interface no longer used 2011-02-27 22:45:51 -08:00
Andy2
fe9932b57d remove hint menu. Add sync-with-server item to board and factor code
implementing same in GamesList up into DlgDelegate where it can be
called from both.  Also, make syncing fire off the service just as the
timer does so that results generate Notifications.  Makes it better
for testing if nothing else.
2011-02-27 22:43:09 -08:00
Andy2
d2e663fa99 remove logging 2011-02-27 22:40:26 -08:00
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