Commit graph

5092 commits

Author SHA1 Message Date
Andy2
f88697fd3f complete conversion of showConfirmThen, removing old methods and
adding second param to buttonClicked() callback indicating which
button was cancelled.
2011-08-24 06:14:42 -07:00
Andy2
7d0cbcf07f use new showConfirmThen scheme 2011-08-24 06:12:57 -07:00
Andy2
85c38e831f cleanup: null's same as empty onClick handler 2011-08-24 05:40:13 -07:00
Andy2
fbb467af80 convert some more callbacks to ints passed back: GamesList done. 2011-08-23 20:25:59 -07:00
Andy2
05607a15b9 toward a bundleable DlgDelegate: add new interface to replace
OnClickListerners passed on, have clients of DlgDelegate implement it,
and convert one dialog to use it.  Will eventually remove old code.
2011-08-23 19:50:01 -07:00
Andy2
0d85a67700 verify that bundle saving works in DlgDelegate and fix one
disappearing message.  Still need solution for callbacks passed in.
2011-08-23 19:18:45 -07:00
Andy2
7a235ed6b6 put onPrepareDialog() back -- it's required to use DlgDelegate dialogs. 2011-08-23 18:51:48 -07:00
Andy2
7da5b24e0f rewrite DictsActivity to not crash when un- and re-loaded: make
dialogs depend only on bundleable ivars -- ints and strings, not Views
-- and bundle them.  Don't use onPrepareDialog, only onCreateDialog,
and so call removeDialog() every time one's dismissed.  Do some
refactoring to support this.
2011-08-23 18:41:19 -07:00
Andy2
84e61f3b3f remove no-op line 2011-08-22 18:43:42 -07:00
Andy2
953909d0f0 remove logging 2011-08-22 18:40:44 -07:00
Andy2
3537161d3b add change 2011-08-22 18:40:30 -07:00
Andy2
3296cad731 pass bundle into DlgDelegate so state can be saved and restored. Not
doing anything with it yet because any scheme to survive
OS-restoration has to deal with the Runnables I'm saving that can't be
bundled.  Work in progress....
2011-08-22 18:10:22 -07:00
Andy2
7e6daa5797 move role out of players column to where it can be a full line long,
preventing it from increasing the size of the item by line-wrapping.
For now it's outside the View that gets hidden, but that may need to
change.
2011-08-22 07:05:33 -07:00
Andy2
d7a515ca97 display three states of relay connectedness in games list items:
configured, connected but waiting for players, and game-in-play.
2011-08-22 07:03:46 -07:00
Andy2
1ee0dfdd6d set wordlist spinner prompt and include language 2011-08-21 22:13:18 -07:00
Eric House
609f4be8a6 Merge branch 'android_branch' into french_xlation 2011-08-21 21:56:52 -07:00
Eric House
cf6d868bd3 use separate strings for window title and spinner prompt 2011-08-21 18:17:21 -07:00
eehouse@eehouse.org
abe270d45c Merge branch 'android_branch' into french_xlation 2011-08-21 15:03:57 -07:00
Andy2
aeafb9cefa Tweak language for moving wordlists to more clearly refer to storage
locations.
2011-08-21 15:03:41 -07:00
Andy2
bbb73bb2e9 somehow dict deletion got broken (because wasn't adding file
extention); fix.
2011-08-21 15:02:42 -07:00
Andy2
6b8fd222ef Merge branch 'android_branch' into french_xlation
Conflicts:
	xwords4/android/XWords4/res/values/strings.xml
2011-08-21 14:35:53 -07:00
Andy2
d1b6bc16cf add the standalone/network icons from GamesList display to the new
games dialog so users get some association going.
2011-08-21 14:30:00 -07:00
Andy2
04834c910b more dictionary->wordlist terminology change: debug-only preference
and download URL.
2011-08-21 14:27:50 -07:00
Andy2
9612b28b1f use goto to avoid having multiple returns. No behavior change. 2011-08-21 14:20:59 -07:00
Andy2
a17ff20db7 clean up background check pref wording to Chris's suggestions 2011-08-21 13:52:51 -07:00
Andy2
a72883ae9a Merge branch 'android_branch' into french_xlation
Conflicts:
	xwords4/android/XWords4/res/values/strings.xml
2011-08-21 12:29:32 -07:00
Andy2
c0dae019d5 use same context menu header, including wordlist name, as for game
list items.
2011-08-21 12:19:58 -07:00
Andy2
5c8afa06ce version string and changelog for beta 33 2011-08-21 12:07:45 -07:00
Andy2
56fd01a05b oops -- missing semicolon. 2011-08-21 12:07:21 -07:00
Andy2
c38e3593fb replace hard-coded placeholder names for optional top-line of games
list item display with real "aa vs. bb vs..." consed up in
GameSummary, and set field to singleline so doesn't wrap when names
get too long.
2011-08-21 11:39:38 -07:00
Andy2
c41af221b7 fix non-debug compile warning 2011-08-21 11:33:23 -07:00
Andy2
47bdec4eda pass context into GameSummary constructor rather than into methods
that need it.  No behavior change.
2011-08-20 21:51:57 -07:00
Andy2
28c78a0a6a dictionary->wordlist 2011-08-20 14:16:38 -07:00
Andy2
659c054696 add new class that listens for SDCard mounted event (could be
generalized for multiple events and map them to multiple notification
callbacks), and use it from DictsActivity to redraw the list when the
SD card comes back online.  While the default android behavior works
for the unmount case (relaunches DictsActivity which correctly draws
only those dicts still available) it needs this change to redraw after
the available set grows.
2011-08-20 11:59:32 -07:00
Andy2
6ca60438a1 no need for onClick listener when onDismiss listener does the same thing 2011-08-19 18:54:21 -07:00
Andy2
8f60ca5af3 Need to show dict-gone-missing dialog when umount from GameConfig too,
so: change loadMakeGame() to return gamePtr rather than take one in,
and to return 0 when any dict no available.  Move dict-gone-missing
dialog into DlgDelegate.  Remove DlgDelegate always adding onDismiss
listener that removes the dialog, and instead add one to the
dict-gone-missing dialog that, like the onClick handler, calls
finish() on the activity.
2011-08-19 18:52:55 -07:00
Andy2
fd4e627628 when sd card is umounted, android sends a message to apps. I can't
figure out how to get that so I ignore it and am killed then
relaunched if I have a dict file open on the SD.  On relauch, don't
crash.  Instead, check if any dicts used by the game is unreachable
and put up an alert with only one choice: Close game.  Thought about
using the missing-dicts stuff from GamesList, but this is a special
case that should be seen only when user umounts while a BoardActivity
instance is frontmost.
2011-08-18 07:54:00 -07:00
Andy2
7a1346e530 add assert to catch bad dict earlier 2011-08-18 07:49:40 -07:00
Andy2
455cb9a4c4 Include possibility of umounted sd card in missing dict
explanation. Name of game too.  Use single-selectable list and
Substitute button instead of expecting user to tap once to select
(which confused me.)
2011-08-18 06:26:43 -07:00
Andy2
0c29a4c1ca fix NPE when sd card unmounted 2011-08-17 20:11:30 -07:00
Eric House
c2c673e932 improve testing of proxy delete by saving up a number of relayIDs and
sending with multiple -d flags to rq.
2011-08-16 19:44:37 -07:00
Eric House
5c68f375fd reorder more strings and add a bunch more context comments. 2011-08-16 19:42:54 -07:00
Eric House
9f84468297 beginning process of adding contextual comments to all translatable strings. 2011-08-15 21:49:30 -07:00
Andy2
dc273c7162 fix proxy msg handling to process more than one relayID per message.
Formerly all but the first were dropped.
2011-08-15 18:27:00 -07:00
Andy2
e2ef25ae90 add pref for choosing what goes in parens along with the game name
(where <language> was before.)  opponent name still needs to not be
hard-coded; the rest works.
2011-08-09 19:26:59 -07:00
Andy2
ceb2d1ac63 fix indenting -- white space only. 2011-08-09 06:48:10 -07:00
Andy2
c67e92ea2c log sends for a while. I want to fix the occasional stall. 2011-08-09 06:44:09 -07:00
Andy2
8adb925cca only load and pass in dict as byte[] when path isn't available
(i.e. when it's a builtin), and use mmap in that case.  Works!  Still
need to try a speed test.
2011-08-08 20:27:42 -07:00
Andy2
35f059e14c remove logging 2011-08-08 20:21:55 -07:00
Andy2
755d3e5bb2 as first step in using mmap for dictionaries instead of passing byte
arrays into the jni, pass the full file paths in in addition to the
byte arrays.  This isn't possible with the built-in dicts, but does
work for the downloaded ones (which are usually larger).  This checkin
does the mmap and uses memcmp to verify that the bytes are the same as
passed in.  Next step is to not pass the bytes when the path will do
and to actually use the mmap'd ptr.
2011-08-08 19:41:45 -07:00