Commit graph

4360 commits

Author SHA1 Message Date
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
Eric House
bb24694e37 Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch 2011-01-27 21:09:30 -08:00
Eric House
dc82e57f14 add ability to fetch messages for more than one game at a time 2011-01-27 21:08:17 -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
57ec020330 change format of reply to MSG_GET: include number of messages per
device to support fetching for more than one at once.  This is
meaningless for rq as written now but a device will want to do this.
2011-01-27 06:37:36 -08:00
Eric House
481a533e58 ignore uncompressed dicts too 2011-01-24 22:21:44 -08:00
Eric House
4bf613a006 move pipe handling code to where can be shared by curses and gtk -- but use from curses is untested. 2011-01-24 22:20:47 -08:00
Eric House
63d16a99a2 turn off http view 2011-01-24 22:20:01 -08:00
Eric House
4ae8c76959 break printed runtime into hours:minutes:seconds 2011-01-24 22:19:02 -08:00
Andy2
825cda9125 new feature for testing proxy: --with-pipe option causes linux client
to, instead of putting up UI, blocking on pipe and once it's readable
opening saved game and passing messages into it from pipe then saving
it when done.  Works, but requires gtk so far.
2011-01-23 21:52:26 -08:00
Andy2
4b8e462b8b check for null ptrs to allow creating loading games that won't draw or
communicate with users.
2011-01-23 21:45:41 -08:00
Andy2
42d1a713c9 add new -f flag to invoke new fetch-message proxy command. Write the
results to stdout in stream format (len + message).  Goal is to be
able to pipe output to the linux clients to test.
2011-01-22 12:54:47 -08:00
Andy2
f96f4a040b add new proxy command that fetches actual messages stored for a device. 2011-01-22 12:52:26 -08:00
Andy2
d98a3fe232 when peeking is disabled (the default on android), don't allow
swapping to view of the current player's board if the current player
is remote -- because then won't be able to swap back to own view until
it's your turn.  Fixes annoyance in multi-device game on Android.
2011-01-21 21:32:52 -08:00
Andy2
09b5c44fb4 add option to prevent switching players by tapping scoreboard (to
mimic android)
2011-01-21 21:29:28 -08:00
Andy2
96fead3164 add msglen column to msgs table to be used to avoid calculating size
later.  Stores size of string as it was passed to db, not as stored.
2011-01-21 06:46:49 -08:00
Andy2
b863931db5 turn proxy service back on 2011-01-21 06:10:06 -08:00
Eric House
725888cb6c run proxy sockets through same thread pool as game sockets. This
prevents race conditions that are turning up when I'm running multiple
threads -- by allowing me to really not be running multiple threads.
Tested with the usual script.
2011-01-20 18:14:56 -08:00
Eric House
c4bf153d36 log reason game ended to game's logfile 2011-01-20 18:10:33 -08:00
Andy2
b506673946 use only one thread until race condition's fixed 2011-01-19 18:36:50 -08:00
Andy2
3ae62e4704 use an index rather than a ptr to track fd array (so a parallel array
can be added)
2011-01-19 18:36:24 -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
Andy2
7d6e136ca3 fix comment 2011-01-19 06:21:31 -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
Andy2
c9fec737e5 changes, protected by a disabled compile-time flag, to use cairo-based
API for drawing instead of now-deprecated gdk ones.  Unfortunately
nothing actually draws and I'm putting the debugging off until I have
some time.
2011-01-14 18:15:33 -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
cd5dedfa67 add compile-time flag to disable selection of tiles in tray (other
than as part of an exchange) and to remove feature where tapping empty
cell moves selected tile there.  This is to address user confusion on
Android, and I'll ask for testing before putting this in the main
branch.  This leaves only place-arrow-then-tap as an alternative to
drag-and-drop, and may annoy people.  Worth trying: disable only the
automatic selection of another tile after the selected one is dropped.
2011-01-12 19:00:48 -08:00
Andy2
e7dbac41a6 fix to compile with new gdk that's on ubuntu 10.10. Need to fix the
APIs eventually.....
2011-01-12 19:00:20 -08:00
Andy2
6ccf0c167c fix next-hint which I just broke: need to track whether working on
behalf of robot after all, though it's not needed in the API, to
distinguish case where moves must be cached (for next-hint feature).
2011-01-11 18:10:48 -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
eehouse@eehouse.org
a656bb8f0c Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch 2011-01-10 18:20:42 -08:00
Eric House
2b502a39c6 fix mod-by-zero error when iq == 2 2011-01-10 18:19:10 -08:00
Eric House
b3de3fc91e add --robot-iq param for testing 2011-01-10 18:18:35 -08:00
Andy2
6495bd321f fix to compile with robotiq changes 2011-01-10 06:57:10 -08:00
Andy2
efb54c7b05 fix compile errors the stricter android compiler found. 2011-01-10 06:56:11 -08:00
eehouse@eehouse.org
09da57f165 Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch 2011-01-10 06:48:25 -08:00