From 237deee542838dea6a6a81a3b800c253ce543de3 Mon Sep 17 00:00:00 2001 From: ehouse Date: Wed, 14 Sep 2005 05:11:29 +0000 Subject: [PATCH] just log some messages so user interaction not required. --- xwords4/linux/gtkmain.c | 9 +++++++-- xwords4/linux/linuxmain.c | 5 ++++- xwords4/linux/linuxmain.h | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/xwords4/linux/gtkmain.c b/xwords4/linux/gtkmain.c index 92ec33549..4bb61700a 100644 --- a/xwords4/linux/gtkmain.c +++ b/xwords4/linux/gtkmain.c @@ -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 diff --git a/xwords4/linux/linuxmain.c b/xwords4/linux/linuxmain.c index c27c23902..32b890e87 100644 --- a/xwords4/linux/linuxmain.c +++ b/xwords4/linux/linuxmain.c @@ -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; diff --git a/xwords4/linux/linuxmain.h b/xwords4/linux/linuxmain.h index 197f38f14..9e2601997 100644 --- a/xwords4/linux/linuxmain.h +++ b/xwords4/linux/linuxmain.h @@ -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 );