diff -r ee81db3137c2 src/genworld_gui.cpp
--- src/genworld_gui.cpp	Wed Jan 21 23:49:59 2009 +0000
+++ src/genworld_gui.cpp	Thu Jan 22 03:54:19 2009 +0100
@@ -42,6 +42,17 @@
 	GLWP_HEIGHTMAP,
 	GLWP_SCENARIO,
 	GLWP_END
+};
+
+/**
+ * For storing the water borders which shall be retained.
+ * FIX: It's code duplication from tgp.cpp
+ */
+enum BorderDirections {
+	BORDER_NE = 0,
+	BORDER_SE = 1,
+	BORDER_SW = 2,
+	BORDER_NW = 3,
 };
 
 extern void SwitchMode(int new_mode);
@@ -99,13 +110,22 @@
 	GLAND_WATER_PULLDOWN,
 	GLAND_SMOOTHNESS_TEXT,
 	GLAND_SMOOTHNESS_PULLDOWN,
-	GLAND_WATER_BORDERS_PULLDOWN,
+	
+	GLAND_BORDER_TYPES,
+	GLAND_WATER_NW_TEXT,
+	GLAND_WATER_NE_TEXT,
+	GLAND_WATER_NW,
+	GLAND_WATER_NE,
+	GLAND_WATER_SE_TEXT,
+	GLAND_WATER_SW_TEXT,
+	GLAND_WATER_SE,
+	GLAND_WATER_SW,
 };
 
 static const Widget _generate_landscape_widgets[] = {
 {  WWT_CLOSEBOX,  RESIZE_NONE, COLOUR_BROWN,    0,  10,   0,  13, STR_00C5,                     STR_018B_CLOSE_WINDOW},
 {    WWT_CAPTION, RESIZE_NONE, COLOUR_BROWN,   11, 337,   0,  13, STR_WORLD_GENERATION_CAPTION, STR_NULL},
-{      WWT_PANEL, RESIZE_NONE, COLOUR_BROWN,    0, 337,  14, 285, 0x0,                          STR_NULL},
+{      WWT_PANEL, RESIZE_NONE, COLOUR_BROWN,    0, 337,  14, 313, 0x0,                          STR_NULL},
 
 /* Landscape selection */
 {   WWT_IMGBTN_2, RESIZE_NONE, COLOUR_ORANGE,  10,  86,  24,  78, SPR_SELECT_TEMPERATE,         STR_030E_SELECT_TEMPERATE_LANDSCAPE},    // GLAND_TEMPERATE
@@ -169,7 +189,15 @@
 {   WWT_DROPDOWN, RESIZE_NONE, COLOUR_ORANGE, 114, 231, 246, 257, 0x0,                          STR_NULL},                               // GLAND_SMOOTHNESS_PULLDOWN
 
 /* Water borders */
-{   WWT_DROPDOWN, RESIZE_NONE, COLOUR_ORANGE,  12, 326, 264, 275, 0x0,                          STR_NULL},                               // GLAND_WATER_BORDERS_PULLDOWN
+{       WWT_TEXT, RESIZE_NONE, COLOUR_ORANGE,   12, 210, 264, 275, STR_BORDER_TYPE,             STR_NULL},                               // GLAND_BORDER_TYPES
+{       WWT_TEXT, RESIZE_NONE, COLOUR_ORANGE,   12,  72, 280, 291, STR_NORTHWEST,               STR_NULL},                               // GLAND_WATER_NW_TEXT
+{       WWT_TEXT, RESIZE_NONE, COLOUR_ORANGE,   82, 142, 280, 291, STR_NORTHEAST,               STR_NULL},                               // GLAND_WATER_NE_TEXT
+{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_YELLOW,   12,  72, 293, 305, STR_NORTHWEST,               STR_NORTHWEST},                          // GLAND_WATER_NW
+{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_YELLOW,   82, 142, 293, 305, STR_NORTHEAST,               STR_NORTHEAST},                          // GLAND_WATER_NE
+{       WWT_TEXT, RESIZE_NONE, COLOUR_ORANGE,  152, 212, 280, 291, STR_SOUTHWEST,               STR_NULL},                               // GLAND_WATER_SW_TEXT
+{       WWT_TEXT, RESIZE_NONE, COLOUR_ORANGE,  222, 282, 280, 291, STR_SOUTHEAST,               STR_NULL},                               // GLAND_WATER_SE_TEXT
+{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_YELLOW,  152, 212, 293, 305, STR_SOUTHEAST,               STR_SOUTHEAST},                          // GLAND_WATER_SE
+{ WWT_PUSHTXTBTN, RESIZE_NONE, COLOUR_YELLOW,  222, 282, 293, 305, STR_SOUTHWEST,               STR_SOUTHWEST},                          // GLAND_WATER_SW
 {   WIDGETS_END},
 };
 
@@ -273,25 +301,6 @@
 static const StringID _landscape[]   = {STR_CONFIG_PATCHES_LAND_GENERATOR_ORIGINAL, STR_CONFIG_PATCHES_LAND_GENERATOR_TERRA_GENESIS, INVALID_STRING_ID};
 static const StringID _num_towns[]   = {STR_NUM_VERY_LOW, STR_6816_LOW, STR_6817_NORMAL, STR_6818_HIGH, INVALID_STRING_ID};
 static const StringID _num_inds[]    = {STR_NONE, STR_NUM_VERY_LOW, STR_6816_LOW, STR_6817_NORMAL, STR_6818_HIGH, INVALID_STRING_ID};
-static const StringID _water_borders[] = {
-	STR_CONFIG_PATCHES_WATER_BORDER_NONE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_SE,
-	STR_CONFIG_PATCHES_WATER_BORDER_SE_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_SW,
-	STR_CONFIG_PATCHES_WATER_BORDER_SW_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_SW_SE,
-	STR_CONFIG_PATCHES_WATER_BORDER_SW_SE_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_SE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_SE_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_SW,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_NE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE,
-	STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE_NE,
-	INVALID_STRING_ID
-};
 
 struct GenerateLandscapeWindow : public QueryStringBaseWindow {
 	uint widget_id;
@@ -320,7 +329,10 @@
 		/* You can't select smoothness / non-water borders if not terragenesis */
 		if (mode == GLWP_GENERATE) {
 			this->SetWidgetDisabledState(GLAND_SMOOTHNESS_PULLDOWN, _settings_newgame.game_creation.land_generator == 0);
-			this->SetWidgetDisabledState(GLAND_WATER_BORDERS_PULLDOWN, _settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges);
+			this->SetWidgetDisabledState(GLAND_WATER_NW, _settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges);
+			this->SetWidgetDisabledState(GLAND_WATER_NE, _settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges);
+			this->SetWidgetDisabledState(GLAND_WATER_SE, _settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges);
+			this->SetWidgetDisabledState(GLAND_WATER_SW, _settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges);
 		}
 		/* Disable snowline if not hilly */
 		this->SetWidgetDisabledState(GLAND_SNOW_LEVEL_TEXT, _settings_newgame.game_creation.landscape != LT_ARCTIC);
@@ -338,7 +350,12 @@
 		this->SetWidgetLoweredState(GLAND_ARCTIC,    _settings_newgame.game_creation.landscape == LT_ARCTIC);
 		this->SetWidgetLoweredState(GLAND_TROPICAL,  _settings_newgame.game_creation.landscape == LT_TROPIC);
 		this->SetWidgetLoweredState(GLAND_TOYLAND,   _settings_newgame.game_creation.landscape == LT_TOYLAND);
-
+		
+		this->SetWidgetLoweredState(GLAND_WATER_NW, HasBit(_settings_newgame.game_creation.water_borders,BORDER_NW));
+		this->SetWidgetLoweredState(GLAND_WATER_NE, HasBit(_settings_newgame.game_creation.water_borders,BORDER_NE));
+		this->SetWidgetLoweredState(GLAND_WATER_SE, HasBit(_settings_newgame.game_creation.water_borders,BORDER_SE));
+		this->SetWidgetLoweredState(GLAND_WATER_SW, HasBit(_settings_newgame.game_creation.water_borders,BORDER_SW));
+		
 		if (_game_mode == GM_EDITOR) {
 			this->widget[GLAND_TOWN_PULLDOWN].data     = STR_6836_OFF;
 			this->widget[GLAND_INDUSTRY_PULLDOWN].data = STR_6836_OFF;
@@ -353,7 +370,12 @@
 			this->widget[GLAND_TERRAIN_PULLDOWN].data       = _elevations[_settings_newgame.difficulty.terrain_type];
 			this->widget[GLAND_WATER_PULLDOWN].data         = _sea_lakes[_settings_newgame.difficulty.quantity_sea_lakes];
 			this->widget[GLAND_SMOOTHNESS_PULLDOWN].data    = _smoothness[_settings_newgame.game_creation.tgen_smoothness];
-			this->widget[GLAND_WATER_BORDERS_PULLDOWN].data = _settings_newgame.construction.freeform_edges ? _water_borders[_settings_newgame.game_creation.water_borders] : STR_CONFIG_PATCHES_WATER_BORDER_NW_SW_SE_NE;
+			this->widget[GLAND_BORDER_TYPES].data           = STR_BORDER_TYPE;
+			this->widget[GLAND_WATER_NE_TEXT].data          = STR_NORTHEAST;
+			this->widget[GLAND_WATER_NE].data               = HasBit(_settings_newgame.game_creation.water_borders,BORDER_NE) ? STR_BORDER_WATER : STR_BORDER_LAND;
+			this->widget[GLAND_WATER_NW].data               = HasBit(_settings_newgame.game_creation.water_borders,BORDER_NW) ? STR_BORDER_WATER : STR_BORDER_LAND;
+			this->widget[GLAND_WATER_SE].data               = HasBit(_settings_newgame.game_creation.water_borders,BORDER_SE) ? STR_BORDER_WATER : STR_BORDER_LAND;
+			this->widget[GLAND_WATER_SW].data               = HasBit(_settings_newgame.game_creation.water_borders,BORDER_SW) ? STR_BORDER_WATER : STR_BORDER_LAND;
 		} else {
 			this->widget[GLAND_TREE_PULLDOWN].data               = _tree_placer[_settings_newgame.game_creation.tree_placer];
 			this->widget[GLAND_HEIGHTMAP_ROTATION_PULLDOWN].data = _rotation[_settings_newgame.game_creation.heightmap_rotation];
@@ -509,9 +531,22 @@
 				ShowDropDownMenu(this, _smoothness, _settings_newgame.game_creation.tgen_smoothness, GLAND_SMOOTHNESS_PULLDOWN, 0, 0);
 				break;
 
-			case GLAND_WATER_BORDERS_PULLDOWN: // Water borders
+			case GLAND_WATER_NW:
+				_settings_newgame.game_creation.water_borders = ToggleBit(_settings_newgame.game_creation.water_borders,BORDER_NW);	
+				this->SetDirty();
+				break;
+			case GLAND_WATER_NE:
+				_settings_newgame.game_creation.water_borders = ToggleBit(_settings_newgame.game_creation.water_borders,BORDER_NE);
+				break;
+			case GLAND_WATER_SE:
+				_settings_newgame.game_creation.water_borders = ToggleBit(_settings_newgame.game_creation.water_borders,BORDER_SE);
+				break;
+			case GLAND_WATER_SW:
+				_settings_newgame.game_creation.water_borders = ToggleBit(_settings_newgame.game_creation.water_borders,BORDER_SW);
+				break;
+/*			case GLAND_WATER_BORDERS_PULLDOWN: // Water borders
 				ShowDropDownMenu(this, _water_borders, _settings_newgame.game_creation.water_borders, GLAND_WATER_BORDERS_PULLDOWN, 0, 0);
-				break;
+				break;*/
 		}
 	}
 
@@ -540,7 +575,7 @@
 			case GLAND_MAPSIZE_Y_PULLDOWN:     _settings_newgame.game_creation.map_y = index; break;
 			case GLAND_TREE_PULLDOWN:          _settings_newgame.game_creation.tree_placer = index; break;
 			case GLAND_SMOOTHNESS_PULLDOWN:    _settings_newgame.game_creation.tgen_smoothness = index;  break;
-			case GLAND_WATER_BORDERS_PULLDOWN: _settings_newgame.game_creation.water_borders = index;  break;
+//			case GLAND_WATER_BORDERS_PULLDOWN: _settings_newgame.game_creation.water_borders = index;  break;
 
 			case GLAND_TOWN_PULLDOWN:
 				_settings_newgame.difficulty.number_towns = index;
@@ -601,7 +636,7 @@
 };
 
 static const WindowDesc _generate_landscape_desc = {
-	WDP_CENTER, WDP_CENTER, 338, 286, 338, 286,
+	WDP_CENTER, WDP_CENTER, 338, 313, 338, 313,
 	WC_GENERATE_LANDSCAPE, WC_NONE,
 	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 	_generate_landscape_widgets,
diff -r ee81db3137c2 src/lang/english.txt
--- src/lang/english.txt	Wed Jan 21 23:49:59 2009 +0000
+++ src/lang/english.txt	Thu Jan 22 03:54:19 2009 +0100
@@ -3510,6 +3510,15 @@
 STR_SMALLMAP_CENTER                                             :{BLACK}Center the smallmap on the current position
 STR_SMALLMAP_INDUSTRY                                           :{TINYFONT}{STRING} ({NUM})
 
+STR_BORDER_TYPE                                                 :{BLACK}Type of the map edges:
+STR_NORTHWEST                                                   :{BLACK}Northwest
+STR_NORTHEAST                                                   :{BLACK}Northeast
+STR_SOUTHEAST                                                   :{BLACK}Southeast
+STR_SOUTHWEST                                                   :{BLACK}Southwest
+STR_BORDER_LAND                                                 :{BLACK}Land
+STR_BORDER_WATER                                                :{BLACK}Water
+
+
 ########### String for new airports
 STR_SMALL_AIRPORT                                               :{BLACK}Small
 STR_CITY_AIRPORT                                                :{BLACK}City
