mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
linux: remove ask to accept duplicate invitations
This commit is contained in:
parent
e2f9c1c699
commit
47004a0e08
3 changed files with 14 additions and 11 deletions
|
@ -250,9 +250,9 @@ game_makeRematch( const XWGame* oldGame, XWEnv xwe, XW_UtilCtxt* newUtil,
|
|||
selfAddrP = &selfAddr;
|
||||
}
|
||||
|
||||
if ( game_makeNewGame( MPPARM(newUtil->mpool) xwe, newGame, newUtil->gameInfo,
|
||||
selfAddrP, (CommsAddrRec*)NULL, newUtil,
|
||||
(DrawCtx*)NULL, newCp, procs ) ) {
|
||||
if ( game_makeNewGame( MPPARM(newUtil->mpool) xwe, newGame,
|
||||
newUtil->gameInfo, selfAddrP, (CommsAddrRec*)NULL,
|
||||
newUtil, (DrawCtx*)NULL, newCp, procs ) ) {
|
||||
|
||||
const CurGameInfo* newGI = newUtil->gameInfo;
|
||||
for ( int ii = 0; ii < ra.nAddrs; ++ii ) {
|
||||
|
@ -1043,7 +1043,8 @@ player_timePenalty( CurGameInfo* gi, XP_U16 playerNum )
|
|||
void
|
||||
game_logGI( const CurGameInfo* gi, const char* msg, const char* func, int line )
|
||||
{
|
||||
XP_LOGFF( "msg: %s from %s() line %d; addr: %p", msg, func, line, gi );
|
||||
XP_LOGFF( "msg: %s from %s() line %d; gameID: %X", msg, func, line,
|
||||
!!gi ? gi->gameID:0 );
|
||||
if ( !!gi ) {
|
||||
XP_LOGF( " nPlayers: %d", gi->nPlayers );
|
||||
for ( XP_U16 ii = 0; ii < gi->nPlayers; ++ii ) {
|
||||
|
@ -1053,7 +1054,6 @@ game_logGI( const CurGameInfo* gi, const char* msg, const char* func, int line )
|
|||
}
|
||||
XP_LOGF( " forceChannel: %d", gi->forceChannel );
|
||||
XP_LOGF( " serverRole: %d", gi->serverRole );
|
||||
XP_LOGF( " gameID: %d", gi->gameID );
|
||||
XP_LOGF( " dictName: %s", gi->dictName );
|
||||
XP_LOGF( " isoCode: %s", gi->isoCodeStr );
|
||||
}
|
||||
|
|
|
@ -1193,9 +1193,10 @@ inviteReceivedCurses( void* closure, const NetLaunchInfo* invite )
|
|||
gdb_getRowsForGameID( aGlobals->cag.params->pDb, invite->gameID, rowids, &nRowIDs );
|
||||
bool doIt = 0 == nRowIDs;
|
||||
if ( ! doIt && !!aGlobals->mainWin ) {
|
||||
const gchar* question = "Duplicate invitation received. Accept anyway?";
|
||||
const char* buttons[] = { "Yes", "No" };
|
||||
doIt = 0 == cursesask( aGlobals->mainWin, question, VSIZE(buttons), buttons );
|
||||
XP_LOGFF( "duplicate invite; not creating game" );
|
||||
/* const gchar* question = "Duplicate invitation received. Accept anyway?"; */
|
||||
/* const char* buttons[] = { "Yes", "No" }; */
|
||||
/* doIt = 0 == cursesask( aGlobals->mainWin, question, VSIZE(buttons), buttons ); */
|
||||
}
|
||||
if ( doIt ) {
|
||||
cb_dims dims;
|
||||
|
|
|
@ -756,9 +756,11 @@ inviteReceivedGTK( void* closure, const NetLaunchInfo* invite )
|
|||
|
||||
bool doIt = 0 == nRowIDs;
|
||||
if ( ! doIt ) {
|
||||
doIt = GTK_RESPONSE_YES == gtkask( apg->window,
|
||||
"Duplicate invitation received. Accept anyway?",
|
||||
GTK_BUTTONS_YES_NO, NULL );
|
||||
doIt = XP_FALSE;
|
||||
XP_LOGFF( "duplicate invite; not creating game" );
|
||||
/* doIt = GTK_RESPONSE_YES == gtkask( apg->window, */
|
||||
/* "Duplicate invitation received. Accept anyway?", */
|
||||
/* GTK_BUTTONS_YES_NO, NULL ); */
|
||||
}
|
||||
if ( doIt ) {
|
||||
gameFromInvite( apg, invite );
|
||||
|
|
Loading…
Add table
Reference in a new issue