diff --git a/xwords4/linux/gtknewgame.c b/xwords4/linux/gtknewgame.c index 06b8f6085..dace64d3f 100644 --- a/xwords4/linux/gtknewgame.c +++ b/xwords4/linux/gtknewgame.c @@ -357,18 +357,16 @@ makeNewGameDialog( GtkNewGameState* state ) for ( iter = dicts, ii = 0; !!iter; iter = iter->next, ++ii ) { const gchar* name = iter->data; gtk_combo_box_append_text( GTK_COMBO_BOX(dictCombo), name ); - if ( !!gi->dictName && !strcmp( name, gi->dictName ) ) { + if ( !!gi->dictName ) { + if ( !strcmp( name, gi->dictName ) ) { + gtk_combo_box_set_active( GTK_COMBO_BOX(dictCombo), ii ); + } + } else if ( 0 == ii ) { gtk_combo_box_set_active( GTK_COMBO_BOX(dictCombo), ii ); } } g_slist_free( dicts ); - /* if ( !!gi->dictName ) { */ - /* gtk_box_pack_start( GTK_BOX(hbox), */ - /* gtk_label_new(gi->dictName), */ - /* FALSE, TRUE, 0 ); */ - /* } */ - gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX(vbox), hbox, FALSE, TRUE, 0 ); @@ -571,6 +569,9 @@ newGameDialog( GtkGameGlobals* globals, CurGameInfo* gi, CommsAddrRec* addr, state.revert = FALSE; state.loaded = XP_FALSE; state.nCols = gi->boardSize; + if ( 0 == state.nCols ) { + state.nCols = globals->cGlobals.params->pgi.boardSize; + } state.role = gi->serverRole; XP_MEMCPY( &state.addr, addr, sizeof(state.addr) ); diff --git a/xwords4/linux/linuxmain.c b/xwords4/linux/linuxmain.c index 083035540..e5510a2c8 100644 --- a/xwords4/linux/linuxmain.c +++ b/xwords4/linux/linuxmain.c @@ -1512,10 +1512,10 @@ getDictPath( const LaunchParams *params, const char* name, char* result, int resultLen ) { XP_Bool success = XP_FALSE; - GSList* dictDirs; + GSList* iter; result[0] = '\0'; - for ( dictDirs = params->dictDirs; !!dictDirs; dictDirs = dictDirs->next ) { - const char* path = dictDirs->data; + for ( iter = params->dictDirs; !!iter; iter = iter->next ) { + const char* path = iter->data; char buf[256]; int len = snprintf( buf, VSIZE(buf), "%s/%s.xwd", path, name ); if ( len < VSIZE(buf) && file_exists( buf ) ) { @@ -1734,7 +1734,8 @@ main( int argc, char** argv ) mainParams.showRobotScores = XP_FALSE; mainParams.useMmap = XP_TRUE; - char* envDictPath = getenv( "XW_DICTSPATH" ); + char* envDictPath = getenv( "XW_DICTDIR" ); + XP_LOGF( "%s: envDictPath=%s", __func__, envDictPath ); if ( !!envDictPath ) { char *saveptr; for ( ; ; ) {