mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
add missing error message
This commit is contained in:
parent
4c191e0755
commit
c6da605b56
4 changed files with 12 additions and 7 deletions
|
@ -204,7 +204,7 @@ static CursesMenuHandler getHandlerForKey( const MenuList* list, char ch );
|
||||||
/* extern int errno; */
|
/* extern int errno; */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cursesUserError( CursesAppGlobals* globals, char* format, ... )
|
cursesUserError( CursesAppGlobals* globals, const char* format, ... )
|
||||||
{
|
{
|
||||||
char buf[512];
|
char buf[512];
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
@ -241,7 +241,7 @@ curses_util_userError( XW_UtilCtxt* uc, UtilErrID id )
|
||||||
{
|
{
|
||||||
CursesAppGlobals* globals = (CursesAppGlobals*)uc->closure;
|
CursesAppGlobals* globals = (CursesAppGlobals*)uc->closure;
|
||||||
XP_Bool silent;
|
XP_Bool silent;
|
||||||
XP_UCHAR* message = linux_getErrString( id, &silent );
|
const XP_UCHAR* message = linux_getErrString( id, &silent );
|
||||||
|
|
||||||
if ( silent ) {
|
if ( silent ) {
|
||||||
XP_LOGF( "silent userError: %s", message );
|
XP_LOGF( "silent userError: %s", message );
|
||||||
|
|
|
@ -1059,7 +1059,7 @@ handle_commit_button( GtkWidget* XP_UNUSED(widget), GtkAppGlobals* globals )
|
||||||
} /* handle_commit_button */
|
} /* handle_commit_button */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtkUserError( GtkAppGlobals* XP_UNUSED(globals), char* format, ... )
|
gtkUserError( GtkAppGlobals* XP_UNUSED(globals), const char* format, ... )
|
||||||
{
|
{
|
||||||
char buf[512];
|
char buf[512];
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
@ -1412,7 +1412,7 @@ gtk_util_userError( XW_UtilCtxt* uc, UtilErrID id )
|
||||||
{
|
{
|
||||||
GtkAppGlobals* globals = (GtkAppGlobals*)uc->closure;
|
GtkAppGlobals* globals = (GtkAppGlobals*)uc->closure;
|
||||||
XP_Bool silent;
|
XP_Bool silent;
|
||||||
XP_UCHAR* message = linux_getErrString( id, &silent );
|
const XP_UCHAR* message = linux_getErrString( id, &silent );
|
||||||
|
|
||||||
XP_LOGF( "%s(%d)", __func__, id );
|
XP_LOGF( "%s(%d)", __func__, id );
|
||||||
|
|
||||||
|
|
|
@ -135,11 +135,12 @@ strFromStream( XWStreamCtxt* stream )
|
||||||
return buf;
|
return buf;
|
||||||
} /* strFromStream */
|
} /* strFromStream */
|
||||||
|
|
||||||
XP_UCHAR*
|
|
||||||
|
const XP_UCHAR*
|
||||||
linux_getErrString( UtilErrID id, XP_Bool* silent )
|
linux_getErrString( UtilErrID id, XP_Bool* silent )
|
||||||
{
|
{
|
||||||
*silent = XP_FALSE;
|
*silent = XP_FALSE;
|
||||||
char* message = NULL;
|
const char* message = NULL;
|
||||||
|
|
||||||
switch( id ) {
|
switch( id ) {
|
||||||
case ERR_TILES_NOT_IN_LINE:
|
case ERR_TILES_NOT_IN_LINE:
|
||||||
|
@ -184,6 +185,10 @@ linux_getErrString( UtilErrID id, XP_Bool* silent )
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
case ERR_CANT_TRADE_MID_MOVE:
|
||||||
|
message = "Remove played tiles before trading.";
|
||||||
|
break;
|
||||||
|
|
||||||
case ERR_CANT_UNDO_TILEASSIGN:
|
case ERR_CANT_UNDO_TILEASSIGN:
|
||||||
message = "Tile assignment can't be undone.";
|
message = "Tile assignment can't be undone.";
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -56,7 +56,7 @@ void linuxFireTimer( CommonGlobals* cGlobals, XWTimerReason why );
|
||||||
|
|
||||||
XWStreamCtxt* stream_from_msgbuf( CommonGlobals* cGlobals,
|
XWStreamCtxt* stream_from_msgbuf( CommonGlobals* cGlobals,
|
||||||
unsigned char* bufPtr, XP_U16 nBytes );
|
unsigned char* bufPtr, XP_U16 nBytes );
|
||||||
XP_UCHAR* linux_getErrString( UtilErrID id, XP_Bool* silent );
|
const XP_UCHAR* linux_getErrString( UtilErrID id, XP_Bool* silent );
|
||||||
XP_UCHAR* strFromStream( XWStreamCtxt* stream );
|
XP_UCHAR* strFromStream( XWStreamCtxt* stream );
|
||||||
|
|
||||||
void catGameHistory( CommonGlobals* cGlobals );
|
void catGameHistory( CommonGlobals* cGlobals );
|
||||||
|
|
Loading…
Reference in a new issue