From: Brett L. <wak...@gm...> - 2008-05-27 22:57:47
|
On Sat, 2008-05-24 at 20:35 +0200, Freek Dijkstra wrote: > plain text document attachment (defaultgame.diff) > diff -waur 18xx repos/my.properties 18xx/my.properties > --- 18xx/my.properties 2007-07-23 21:59:16.000000000 +0200 > +++ 18xx/my.properties 2008-05-23 00:05:48.000000000 +0200 > @@ -55,8 +55,12 @@ > ### Default players > # Comma-separated list of player names. > # Useful for game testing purposes. > #default_players=Alice,Bob,Charlie > > +### Default game > +# Name of game selected in the game selection window. > +# Useful for game testing purposes. > +#default_game=1830 > > ####################### Log4J properties ############################## > # For information on how to customise log4j logging, see for instance > diff -waur 18xx repos/rails/ui/swing/GameSetupWindow.java 18xx/rails/ui/swing/GameSetupWindow.java > --- 18xx/rails/ui/swing/GameSetupWindow.java 2008-01-28 00:27:54.000000000 +0100 > +++ 18xx/rails/ui/swing/GameSetupWindow.java 2008-05-24 16:55:37.000000000 +0200 > @@ -176,9 +175,13 @@ > } > > private void populateGameList(List<String> gameNames, JComboBox gameNameBox) { > + String preferredgame = Config.get("default_game"); > for (String gameName : gameNames) { > String gameText = gameName + " - " + GamesInfo.getNote(gameName); > gameNameBox.addItem(gameText); > + if (preferredgame.equals(gameName)) { > + gameNameBox.setSelectedItem(gameText); > + } > } > } > Patch applied. Sorry for the wait on this one. The (American) holiday weekend slowed me down a bit. ---Brett. |