Skip to content

Commit

Permalink
Move messages, warehouse and other groups to INTERFACE_GROUP.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Pope committed Jan 28, 2022
1 parent 6880aa0 commit 7ad69d2
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 60 deletions.
5 changes: 1 addition & 4 deletions data/base/client-options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,6 @@
<!-- Option to disable end turn grey background. -->
<booleanOption id="model.option.disableGrayLayer"
defaultValue="false"/>
<!-- Used by GUI to sort colonies. -->


<!-- Option for autoload emigrants on sailing to america. -->
<booleanOption id="model.option.autoloadEmigrants"
defaultValue="false"/>
Expand Down Expand Up @@ -309,7 +306,7 @@
panel when its quantity is at least this number. -->
<integerOption id="model.option.guiMinNumberToDisplayGoods"
defaultValue="0" minimumValue="0" maximumValue="100"/>
<!-- Used by GUI to sort colonies. -->
<selectOption id="model.option.colonyComparator"
defaultValue="0" localizedLabels="true">
<selectValue label="clientOptions.gui.colonyComparator.byName" value="0"/>
Expand Down
113 changes: 57 additions & 56 deletions src/net/sf/freecol/client/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,10 @@ public class ClientOptions extends OptionGroup {
public static final String MINIMAP_BACKGROUND_COLOR
= "model.option.color.background";


// clientOptions.messages
// clientOptions.interface.messages

private static final String MESSAGES_GROUP
= "clientOptions.messages";
= "clientOptions.messages"; // should be .interface.warehouse

/**
* Used by GUI, this defines the grouping of ModelMessages.
Expand Down Expand Up @@ -318,11 +317,10 @@ public class ClientOptions extends OptionGroup {
public static final int LABOUR_REPORT_CLASSIC = 0;
public static final int LABOUR_REPORT_COMPACT = 1;


// clientOptions.warehouse
// clientOptions.interface.warehouse

private static final String WAREHOUSE_GROUP
= "clientOptions.warehouse";
= "clientOptions.warehouse"; // should be .interface.warehouse

/** The amount of stock the custom house should keep when selling goods. */
public static final String CUSTOM_STOCK
Expand All @@ -343,6 +341,53 @@ public class ClientOptions extends OptionGroup {
public static final String STOCK_ACCOUNTS_FOR_PRODUCTION
= "model.option.stockAccountsForProduction";

// clientOptions.other

private static final String OTHER_GROUP
= "clientOptions.other"; // should be .interface.other

/** Whether to remember the positions of various dialogs and panels. */
public static final String REMEMBER_PANEL_POSITIONS
= "model.option.rememberPanelPositions";

/** Whether to remember the sizes of various dialogs and panels. */
public static final String REMEMBER_PANEL_SIZES
= "model.option.rememberPanelSizes";

/** Whether to display end turn grey background or not. */
public static final String DISABLE_GRAY_LAYER
= "model.option.disableGrayLayer";

/** Option to autoload emigrants on sailing to america. */
public static final String AUTOLOAD_EMIGRANTS
= "model.option.autoloadEmigrants";

/** Option to autoload sentried units. */
public static final String AUTOLOAD_SENTRIES
= "model.option.autoloadSentries";

/** Automatically end the turn when no units can be * made active. */
public static final String AUTO_END_TURN
= "model.option.autoEndTurn";

/** Show the end turn dialog. */
public static final String SHOW_END_TURN_DIALOG
= "model.option.showEndTurnDialog";

/** Set the default native demand action. */
public static final String INDIAN_DEMAND_RESPONSE
= "model.option.indianDemandResponse";
public static final int INDIAN_DEMAND_RESPONSE_ASK = 0;
public static final int INDIAN_DEMAND_RESPONSE_ACCEPT = 1;
public static final int INDIAN_DEMAND_RESPONSE_REJECT = 2;

/** Set the default warehouse overflow on unload action. */
public static final String UNLOAD_OVERFLOW_RESPONSE
= "model.option.unloadOverflowResponse";
public static final int UNLOAD_OVERFLOW_RESPONSE_ASK = 0;
public static final int UNLOAD_OVERFLOW_RESPONSE_NEVER = 1;
public static final int UNLOAD_OVERFLOW_RESPONSE_ALWAYS = 2;

/**
* Used by GUI, the number will be displayed when a group of goods are
* higher than this number.
Expand Down Expand Up @@ -371,18 +416,6 @@ public class ClientOptions extends OptionGroup {
public static final String MIN_NUMBER_FOR_DISPLAYING_GOODS
= "model.option.guiMinNumberToDisplayGoods";

/** Whether to remember the positions of various dialogs and panels. */
public static final String REMEMBER_PANEL_POSITIONS
= "model.option.rememberPanelPositions";

/** Whether to remember the sizes of various dialogs and panels. */
public static final String REMEMBER_PANEL_SIZES
= "model.option.rememberPanelSizes";

/** Whether to display end turn grey background or not. */
public static final String DISABLE_GRAY_LAYER
= "model.option.disableGrayLayer";

/** Used by GUI to sort colonies. */
public static final String COLONY_COMPARATOR
= "model.option.colonyComparator";
Expand Down Expand Up @@ -464,42 +497,6 @@ public class ClientOptions extends OptionGroup {
= "model.option.audioAlerts";


// clientOptions.other

private static final String OTHER_GROUP
= "clientOptions.other";

/** Option to autoload emigrants on sailing to america. */
public static final String AUTOLOAD_EMIGRANTS
= "model.option.autoloadEmigrants";

/** Option to autoload sentried units. */
public static final String AUTOLOAD_SENTRIES
= "model.option.autoloadSentries";

/** Automatically end the turn when no units can be * made active. */
public static final String AUTO_END_TURN
= "model.option.autoEndTurn";

/** Show the end turn dialog. */
public static final String SHOW_END_TURN_DIALOG
= "model.option.showEndTurnDialog";

/** Set the default native demand action. */
public static final String INDIAN_DEMAND_RESPONSE
= "model.option.indianDemandResponse";
public static final int INDIAN_DEMAND_RESPONSE_ASK = 0;
public static final int INDIAN_DEMAND_RESPONSE_ACCEPT = 1;
public static final int INDIAN_DEMAND_RESPONSE_REJECT = 2;

/** Set the default warehouse overflow on unload action. */
public static final String UNLOAD_OVERFLOW_RESPONSE
= "model.option.unloadOverflowResponse";
public static final int UNLOAD_OVERFLOW_RESPONSE_ASK = 0;
public static final int UNLOAD_OVERFLOW_RESPONSE_NEVER = 1;
public static final int UNLOAD_OVERFLOW_RESPONSE_ALWAYS = 2;


// clientOptions.mods

/** The mods. */
Expand Down Expand Up @@ -787,7 +784,7 @@ public void fixClientOptions() {
FRIENDLY_MOVE_ANIMATION_SPEED }) {
regroup(n, DISPLAY_GROUP);
}
// Most of the remaining options move to the MAPVIEW_GROUP
// Most of the remaining options move to the MAPVIEW_GROUP...
addOptionGroup(INTERFACE_GROUP, TAG);
addOptionGroup(MAPVIEW_GROUP, INTERFACE_GROUP);
for (String n: new String[] {
Expand All @@ -797,7 +794,7 @@ public void fixClientOptions() {
DISPLAY_TILE_TEXT, DISPLAY_COLONY_LABELS }) {
regroup(n, MAPVIEW_GROUP);
}
// except the minimap controls which are in MAPCONTROLS_GROUP
// ...except the minimap controls which are in MAPCONTROLS_GROUP
addOptionGroup(MAPCONTROLS_GROUP, INTERFACE_GROUP);
for (String n: new String[] {
DISPLAY_COMPASS_ROSE, DISPLAY_MAP_CONTROLS,
Expand All @@ -806,6 +803,10 @@ public void fixClientOptions() {
MINIMAP_BACKGROUND_COLOR }) {
regroup(n, MAPCONTROLS_GROUP);
}
// MESSAGES,WAREHOUSE,OTHER_GROUP move to INTERFACE_GROUP
regroup(MESSAGES_GROUP, INTERFACE_GROUP);
regroup(WAREHOUSE_GROUP, INTERFACE_GROUP);
regroup(OTHER_GROUP, INTERFACE_GROUP);
// end @compat 0.11.6
}

Expand Down

0 comments on commit 7ad69d2

Please sign in to comment.