mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
add --ask-timeout param
This commit is contained in:
parent
6d84dfea7e
commit
35c12eb7bb
3 changed files with 9 additions and 1 deletions
|
@ -1622,7 +1622,7 @@ gtkShowFinalScores( const GtkGameGlobals* globals )
|
|||
text = strFromStream( stream );
|
||||
stream_destroy( stream );
|
||||
|
||||
XP_U16 timeout = cGlobals->manualFinal? 0 : 500;
|
||||
XP_U16 timeout = cGlobals->manualFinal? 0 : cGlobals->params->askTimeout;
|
||||
(void)gtkask_timeout( globals->window, text, GTK_BUTTONS_OK, timeout );
|
||||
|
||||
free( text );
|
||||
|
|
|
@ -669,6 +669,7 @@ typedef enum {
|
|||
,CMD_ASKNEWGAME
|
||||
,CMD_NHIDDENROWS
|
||||
#endif
|
||||
,CMD_ASKTIME
|
||||
,N_CMDS
|
||||
} XwLinuxCmd;
|
||||
|
||||
|
@ -780,6 +781,8 @@ static CmdInfoRec CmdInfoRecs[] = {
|
|||
#if defined PLATFORM_GTK
|
||||
,{ CMD_ASKNEWGAME, false, "ask-new", "put up ui for new game params" }
|
||||
,{ CMD_NHIDDENROWS, true, "hide-rows", "number of rows obscured by tray" }
|
||||
,{ CMD_ASKTIME, true, "ask-timeout",
|
||||
"Wait this many ms before cancelling dialog (default 500 ms; 0 means forever)" }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -1974,6 +1977,7 @@ main( int argc, char** argv )
|
|||
mainParams.noHeartbeat = XP_FALSE;
|
||||
mainParams.nHidden = 0;
|
||||
mainParams.needsNewGame = XP_FALSE;
|
||||
mainParams.askTimeout = 500;
|
||||
#ifdef XWFEATURE_SEARCHLIMIT
|
||||
mainParams.allowHintRect = XP_FALSE;
|
||||
#endif
|
||||
|
@ -2312,6 +2316,9 @@ main( int argc, char** argv )
|
|||
case CMD_NHIDDENROWS:
|
||||
mainParams.nHidden = atoi(optarg);
|
||||
break;
|
||||
case CMD_ASKTIME:
|
||||
mainParams.askTimeout = atoi(optarg);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
done = true;
|
||||
|
|
|
@ -104,6 +104,7 @@ typedef struct LaunchParams {
|
|||
XP_Bool useUdp;
|
||||
XP_U16 splitPackets;
|
||||
XP_U16 chatsInterval; /* 0 means disabled */
|
||||
XP_U16 askTimeout;
|
||||
#ifdef XWFEATURE_SEARCHLIMIT
|
||||
XP_Bool allowHintRect;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue