mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
just log some messages so user interaction not required.
This commit is contained in:
parent
87d1c8f593
commit
237deee542
3 changed files with 12 additions and 4 deletions
|
@ -1210,9 +1210,14 @@ static void
|
|||
gtk_util_userError( XW_UtilCtxt* uc, UtilErrID id )
|
||||
{
|
||||
GtkAppGlobals* globals = (GtkAppGlobals*)uc->closure;
|
||||
XP_UCHAR* message = linux_getErrString( id );
|
||||
XP_Bool silent;
|
||||
XP_UCHAR* message = linux_getErrString( id, &silent );
|
||||
|
||||
gtkUserError( globals, message );
|
||||
if ( silent ) {
|
||||
XP_LOGF( message );
|
||||
} else {
|
||||
gtkUserError( globals, message );
|
||||
}
|
||||
} /* gtk_util_userError */
|
||||
|
||||
static XP_Bool
|
||||
|
|
|
@ -122,8 +122,9 @@ strFromStream( XWStreamCtxt* stream )
|
|||
} /* strFromStream */
|
||||
|
||||
XP_UCHAR*
|
||||
linux_getErrString( UtilErrID id )
|
||||
linux_getErrString( UtilErrID id, XP_Bool* silent )
|
||||
{
|
||||
*silent = XP_FALSE;
|
||||
char* message = NULL;
|
||||
|
||||
switch( id ) {
|
||||
|
@ -170,6 +171,7 @@ linux_getErrString( UtilErrID id )
|
|||
/* break; */
|
||||
|
||||
case ERR_RELAY_BASE + XWRELAY_ERROR_LOST_OTHER:
|
||||
*silent = XP_TRUE;
|
||||
message = "XWRELAY_ERROR_LOST_OTHER";
|
||||
break;
|
||||
|
||||
|
@ -182,6 +184,7 @@ linux_getErrString( UtilErrID id )
|
|||
"hear from you in too long.";
|
||||
break;
|
||||
case ERR_RELAY_BASE + XWRELAY_ERROR_HEART_OTHER:
|
||||
*silent = XP_TRUE;
|
||||
message = "The relay has lost contact with a device in this game.";
|
||||
break;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ void linuxFireTimer( CommonGlobals* cGlobals, XWTimerReason why );
|
|||
|
||||
XWStreamCtxt* stream_from_msgbuf( CommonGlobals* cGlobals, char* bufPtr,
|
||||
XP_U16 nBytes );
|
||||
XP_UCHAR* linux_getErrString( UtilErrID id );
|
||||
XP_UCHAR* linux_getErrString( UtilErrID id, XP_Bool* silent );
|
||||
XP_UCHAR* strFromStream( XWStreamCtxt* stream );
|
||||
|
||||
void catGameHistory( CommonGlobals* cGlobals );
|
||||
|
|
Loading…
Reference in a new issue