Eric House
b1ce992d23
gtk: don't resize scrollbar
...
Mistaken option to gtk_box_pack_start() meant the scrollbar got
allocated space along with the board when the container expands, not
what you want with a scrollbar.
2016-09-04 20:46:25 -07:00
Eric House
bf7a38da08
copy more state into board being used for snapshot
2016-08-05 21:19:49 -07:00
Eric House
80f894b869
fix remaining gtk dialogs
2016-08-04 12:43:33 -07:00
Eric House
66e26c1489
hook up draw signal
...
Whenver we get the draw signal, invalidate the whole board and draw
it. This is resulting in a lot of wasted effort that might be mitigated
if I figured out how to get the invalid region out of the cairo_t*
that's passed in, but this is a test app and my machine's pleny fast. So
go with it for now.
2016-08-04 11:41:43 -07:00
Eric House
b57e50a255
snapshot toward building with gtk3
...
Board renders, but only when touched. Tray and scoreboard skipped for
now. Lots of changed still to go, and some asserts added where I didn't
want to stop to solve a compile problem.
2016-08-03 15:19:12 -07:00
Eric House
2ade75158b
gtk: update constants
2016-08-03 08:20:05 -07:00
Eric House
799e89fdc1
gtk: use accessors instead of peeking at structs
2016-08-03 08:09:47 -07:00
Eric House
bd8e829a06
replace deprecated gtk symbols (lightly tested)
2016-08-03 07:11:02 -07:00
Eric House
406eb77f54
post notification (rather than just play sound) when turn comes into
...
boarddelegate but it's not visible
2016-04-14 22:16:18 -07:00
Eric House
19713a40ad
add param to comms_resendAll to limit type of message sent
...
(e.g. BT). Meant to be used when a single type has become available.
2016-02-02 07:01:48 -08:00
Eric House
87517edd6f
fix counting of messages sent by "Resend messages" menuitem: actually
...
count them, and do so based on new msgNo passed from comms that's
concatenation of channelNo and msgID so that duplicates (over multiple
transports) aren't counted twice.
2015-09-30 06:50:04 -07:00
Eric House
47954f82d0
add index of sending player to chat transmission, and on receiving
...
side translate that into showing the sender's name in
notification. Not yet done: replacing silly "not me" in chat listing
with same, but now it should be easy.
Conflicts:
xwords4/android/XWords4/archive/R.java
2015-08-12 07:43:20 -07:00
Eric House
dad39eedde
Remove devID from comms address. It's not needed yet, may never be,
...
and I don't want to store it until it is.
2015-07-22 06:16:29 -07:00
Eric House
1423bc933d
rename common file and methods for consistency with android. No logic
...
change.
2015-07-11 08:40:49 -07:00
Eric House
b5ae54f313
use common/native NetLaunchInfo to implement invite-via-relay that
...
works between linux and Android clients. Required renaming so struct
names and names of fields within match in c and java code. The point
is to test this as the foundation of rematch: now you have to type in
a deviceID in order to invite, which clearly sucks for users. Either
that goes away, or it's replaced with something that scans existing
games and lists past opponents as possible invitees.
2015-07-10 23:19:38 -07:00
Eric House
0f33228155
get rematch working on linux, at least for two-device games. (Handling
...
the case where one of several guests wants to rematch is a hard
problem for later.) Requires passing old-style relayIDs (connname plus
device index) when devIDs aren't available, which they may not always
be.
2015-07-06 20:28:16 -07:00
Eric House
3a896df199
show game-over dialog (with its Rematch button) when a over game is
...
opened
2015-07-01 18:38:33 -07:00
Eric House
8f794fbd32
beginning of support for invite-by-relay (which is mostly interesting
...
for Rematch): works for linux version, provided you know the relayID
of the device you're inviting. Added to common/ a stream-saving
version of java's NetLaunchInfo I'll probably want to use there too
for cross-platform compatibility (there being no jni support for
json.)
2015-07-01 07:10:45 -07:00
Eric House
ad6be1bb7e
add debug-only "tag" to open games so logging can more easily track
...
what's going on when multiple participants in a single game are on the
same device. But for a couple of strings passed into the jni the
changes are only in DEBUG code.
2015-02-09 19:15:43 -08:00
Eric House
28bfa3c904
make forceChannel part of CurGameInfo rather than comms, since Android
...
needs to save it there on receipt of an invitation (doesn't create
full game with comms until later.) Passes discon2 tests and seems to
work on a single Android device. (Haven't tested inviting on Android
yet.)
2014-12-29 07:39:28 -08:00
Eric House
897c4d5786
add param to force a client to connect to host requesting a particular
...
channel. Works well enough that relay test script works. Not yet
integrated for let alone tested on Android.
2014-12-21 17:40:00 -08:00
Eric House
b2b60d6c48
add commandline params that disable comms types on game creation so
...
relay not connecting initally can be tested.
2014-12-02 06:49:35 -08:00
Eric House
c008f55133
add invite button only if I'm a host and am missing players
2014-11-12 06:52:40 -08:00
Eric House
10a960930c
collect number to be invited. (Not tested: whether a number other than 1 works)
2014-11-11 07:35:14 -08:00
Eric House
540d3e9622
wire disabling checkboxes into comms. They work -- and show that
...
multi-addressing needs debugging still.
2014-11-06 06:35:28 -08:00
Eric House
b1de8663d6
fix to compile with DEBUG undefined
2014-11-06 06:32:00 -08:00
Eric House
564e671b47
quick hack to add checkboxes for turning off transport sends and
...
receives to be used for testing after it's actually hooked up. This
is just the UI.
2014-11-05 18:48:53 -08:00
Eric House
17bc0ab47c
snapshot of work toward communicating when two addresses are in use.
...
An invitation works with relay and (fake) SMS on, and the invited
client connects successfully using both (the second to arrive being
correctly identified as a dupe.) While the game can be played after,
only SMS messages are being received. And opening a saved game
crashes.
2014-11-05 07:41:20 -08:00
Eric House
9b336bde49
fix crash: must iterate when multiple types are possible
2014-10-28 08:04:05 -07:00
Eric House
fe4c7b52f2
snapshot: relay test script works with a second address type set
...
(though with its actual transport stubbed out). Android doesn't even
compile.
2014-10-15 07:26:18 -07:00
Eric House
43bd3c018a
make an addr's conType a bitfield rather than holding a single value.
...
Works for large numbers of relay games in test, but will not yet
actually hold more than one value. Should be safe to merge to main
branch once stream upgrade is verified.
2014-09-25 20:05:37 -07:00
Eric House
49689ab04c
always log error message
2014-09-23 07:30:34 -07:00
Eric House
6f07098cf3
return succes from server_initClientConnection()
2014-09-14 13:42:11 -07:00
Eric House
88248131da
show new client-formatted turn summary in notification; remove old
...
common-formatting code.
2014-08-26 21:37:33 -07:00
Eric House
2d08848715
snapshot: toward having a better description of the last move in
...
notifications.
2014-08-26 06:55:26 -07:00
Eric House
622760b71a
post response to long-tap on player as a gtk dialog rather than just logging it.
2014-08-25 07:52:18 -07:00
Eric House
a7c114e3f9
refcount dicts. Model "owns" its copy and so increments the refcount when gaining one and decrements the count on any being replaced (and on all on exit). This is setting up the real change, which is to let the java world wrap dicts in objects that hang onto them until they're destroyed, which should fix problems where dicts are referenced after they've been destroyed.
2014-03-08 20:57:27 -08:00
Eric House
8a6adfec34
cleanup -- no logic change
2014-03-08 20:51:49 -08:00
Eric House
e34cc9007d
fix problems with opening and using wordlists on 64-bit linux by
...
making XP_U32 32 rather than 64 bits. Duh. Do same on Android jni just
in case.
2014-01-07 06:58:20 -08:00
Eric House
e15fb02d8a
add ability in ask dialog to display buttons with arbitrary text
...
returning custom results. Use to add "Rematch" option (which so far
only fires an assert when chosen.)
2013-12-30 07:16:52 -08:00
Eric House
35c12eb7bb
add --ask-timeout param
2013-12-30 07:08:43 -08:00
Eric House
6d84dfea7e
cleanup: remove '2' from function and struct names
2013-12-30 07:08:42 -08:00
Eric House
ebdf5ed492
fix to compile on 64-bit system (untested on 32-bit :-)
2013-12-27 19:13:54 -08:00
Eric House
a1d5553266
fix invite button disabling logic
2013-12-19 07:58:32 -08:00
Eric House
79fae43100
enable invite and commit buttons based on game state
2013-12-19 06:59:34 -08:00
Eric House
bece99bb98
load dict named in invite
2013-12-17 22:11:21 -08:00
Eric House
f45f3bacbf
fix so invitation results in a playable game (though dictionary is not
...
yet available to invitation recipient)
2013-12-17 21:57:10 -08:00
Eric House
6bdd939531
rename field
2013-12-17 20:02:31 -08:00
Eric House
8d20c33b76
snapshot: still not correctly recording return address
2013-12-16 08:06:29 -08:00
Eric House
2a56a0ba98
snapshot: more linux-sms stuff
2013-12-12 21:08:25 -08:00
Eric House
78d8c0398f
another snapshot: invites are received but don't create game correctly yet
2013-12-12 07:58:02 -08:00
Eric House
5f97f8197c
progress on inviting via SMS
2013-12-12 06:08:56 -08:00
Eric House
833a3384b3
remove assert; add empty invite button
2013-12-11 08:02:29 -08:00
Eric House
7cffa27a88
snapshot toward implementing fake-sms as per-device rather than per-game
2013-12-11 07:54:26 -08:00
Eric House
46a5f83bb1
shrink "netstat rect" to reasonable size
2013-11-16 18:25:09 -08:00
Eric House
dfdbd9a8a2
pass scoreWidth separately into formatting code so space can be left
...
for network status icon.
2013-11-09 05:34:23 -08:00
Eric House
9f1b0c5121
Specify relative height of scoreboard and tray in board_figureLayout,
...
and allow those to be 0.
2013-11-04 06:19:33 -08:00
Eric House
184ac28ebc
fix to compile, and in gtk case to work, when COMMON_LAYOUT defined
2013-11-03 12:15:53 -08:00
Eric House
88b380503e
add function, not compiled by default, to return bounding rect of all
...
non-empty tiles. As a test, add menu that uses it to grey out that
region.
2013-10-27 21:51:30 -07:00
Eric House
71ea59e7fb
separate whether app is using udp from whether it stores games in a
...
sqlite3 db so that it can switch mid-game -- that being something that
needs testing.
2013-08-07 21:09:48 -07:00
Eric House
9db54a5461
make linux version's gameToken combine game's seed with rowid so we
...
can test that the relay is keeping them straight
2013-07-11 20:01:17 -07:00
Eric House
4bde445c48
fix so gtk mode works too by providing storage for CurGameInfo
2013-07-09 18:19:22 -07:00
Eric House
5a20cc282c
fix so curses app works well enough that discon_ok2.sh script runs
...
successfully. GTK mode is untested and certainly broken.
2013-07-09 18:10:41 -07:00
Eric House
4d96b695e6
toward having commandline params show up as defaults in new game dialog
2013-05-10 07:19:32 -07:00
Eric House
79a212c985
don't put up dict change dialog (which blocks) unless names are
...
different.
2013-05-09 21:37:58 -07:00
Eric House
d74814a806
part of previous (merge) commit that got left out -- files not saved.
2013-05-09 06:33:19 -07:00
Eric House
c75ecef240
test deletion of games and generation of anonymous relayIDs
2013-01-29 07:42:10 -08:00
Eric House
88b20769f9
increase buffer size
2013-01-26 11:56:29 -08:00
Eric House
2e0ff09cf9
fix memory leak and uninstall idle proc on the way out
2013-01-24 21:10:41 -08:00
Eric House
9f3250cb3f
make curses version use udp socket when --db param passed. There's no
...
UI for the DB and the assumption is only one game will be stored but
this should let the test script be modified to test the new protocol.
2013-01-24 07:49:49 -08:00
Eric House
12f70154a0
changes for includes-messageID-please-ack protocol addition
2013-01-23 07:43:58 -08:00
Eric House
1bb9f9b1bf
handle sending of messages generated by games opened only to receive
...
messages from relay. And handle report that relayID is bad.
2013-01-19 14:37:49 -08:00
Eric House
1519a00004
toward being able to handle messages received for closed game.
...
Receipt seems to work but send in that state doesn't.
2013-01-18 07:49:00 -08:00
Eric House
4163309dae
Let's have just one set of signal handlers
2013-01-17 06:37:53 -08:00
Eric House
2f772c56b2
make gtk app a better test bed: add db and row to window titles,
...
implement delete button and multiple selections, etc.
2013-01-16 21:16:07 -08:00
Eric House
a6784464ff
first set of networking changes testing per-device communication with
...
relay on behalf of a number of games. Works as long as all the games
are open.
2013-01-16 06:46:33 -08:00
Eric House
a107365c88
change names of two types and variables of that type to make a common
...
pattern more sensible. No code changes.
2013-01-15 19:04:20 -08:00
Eric House
dddb135b9d
add more columns, and update each time game is saved
2013-01-09 06:30:52 -08:00
Eric House
fac3e6b678
fix gtk version to correctly implement util_setIsServer (which only
...
Android did so far) by calling server_initClientConnection(). Now
relay games work with both started as hosts. (GTK UI prevents
starting one as a guest; cmdline is required for that, if it still
works.)
2013-01-08 07:28:30 -08:00
Eric House
76f3bb3413
fix curses version so discon_ok2 tests work again.
2013-01-07 20:40:46 -08:00
Eric House
565b742971
snapshot -- connects to relay but doesn't play yet.
2013-01-07 08:00:47 -08:00
Eric House
469e656464
track open games so don't double-open and can close all on quit
2013-01-07 06:36:34 -08:00
Eric House
f88387da80
lots of changes to separate game data from app data so several games
...
can be open at once. (curses version is almost certainly broken)
2013-01-07 06:10:44 -08:00
Eric House
b61ed7b631
opening saved games and saving of changes now work.
2013-01-05 21:01:26 -08:00
Eric House
e0dc83ed70
rest of what I just meant to commit.
2013-01-05 16:08:47 -08:00
Eric House
4af30c534c
snapshot. New game button works and game gets saved in DB. Next: display and open from DB.
2013-01-05 16:08:19 -08:00