Skip to content

Commit

Permalink
Remove chat format settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheikah45 committed Jan 18, 2024
1 parent 5832805 commit 1338574
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 60 deletions.
15 changes: 0 additions & 15 deletions src/main/java/com/faforever/client/chat/ChatFormat.java

This file was deleted.

14 changes: 0 additions & 14 deletions src/main/java/com/faforever/client/preferences/ChatPrefs.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.faforever.client.preferences;

import com.faforever.client.chat.ChatColorMode;
import com.faforever.client.chat.ChatFormat;
import com.faforever.client.chat.ChatUserCategory;
import com.google.common.annotations.VisibleForTesting;
import javafx.beans.property.BooleanProperty;
Expand Down Expand Up @@ -48,7 +47,6 @@ public class ChatPrefs {
private final BooleanProperty hideFoeMessages = new SimpleBooleanProperty(true);
private final BooleanProperty playerListShown = new SimpleBooleanProperty(true);
private final ObjectProperty<TimeInfo> timeFormat = new SimpleObjectProperty<>(TimeInfo.AUTO);
private final ObjectProperty<ChatFormat> chatFormat = new SimpleObjectProperty<>(ChatFormat.COMPACT);
private final ObservableList<String> autoJoinChannels = FXCollections.observableArrayList();
private final BooleanProperty showMapName = new SimpleBooleanProperty(false);
private final BooleanProperty showMapPreview = new SimpleBooleanProperty(false);
Expand Down Expand Up @@ -80,18 +78,6 @@ public ObjectProperty<TimeInfo> timeFormatProperty() {
return timeFormat;
}

public ChatFormat getChatFormat() {
return this.chatFormat.get();
}

public void setChatFormat(ChatFormat chatFormat) {
this.chatFormat.setValue(chatFormat);
}

public ObjectProperty<ChatFormat> chatFormatProperty() {
return chatFormat;
}

public ObjectProperty<ChatColorMode> chatColorModeProperty() {
return chatColorMode;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import ch.qos.logback.classic.Level;
import com.faforever.client.api.IceServer;
import com.faforever.client.chat.ChatColorMode;
import com.faforever.client.chat.ChatFormat;
import com.faforever.client.config.ClientProperties;
import com.faforever.client.fa.debugger.DownloadFAFDebuggerTask;
import com.faforever.client.fa.relay.ice.CoturnService;
Expand Down Expand Up @@ -154,7 +153,6 @@ public class SettingsController extends NodeController<Node> {
public ToggleButton bottomRightToastButton;
public ComboBox<TimeInfo> timeComboBox;
public ComboBox<DateInfo> dateComboBox;
public ComboBox<ChatFormat> chatComboBox;
public ComboBox<UnitDataBaseType> unitDatabaseComboBox;
public CheckBox notifyOnAtMentionOnlyToggle;
public Pane languagesContainer;
Expand Down Expand Up @@ -223,7 +221,6 @@ protected void onInitialize() {

configureTimeSetting();
configureDateSetting();
configureChatSetting();
configureLanguageSelection();
configureThemeSelection();
configureToastScreen();
Expand Down Expand Up @@ -482,19 +479,6 @@ public void onDateFormatSelected() {
preferences.getLocalization().setDateFormat(dateComboBox.getValue());
}

private void configureChatSetting() {
ChatPrefs chatPrefs = preferences.getChat();
chatComboBox.setButtonCell(new StringListCell<>(chatFormat -> i18n.get(chatFormat.getI18nKey()), fxApplicationThreadExecutor));
chatComboBox.setCellFactory(param -> new StringListCell<>(chatFormat -> i18n.get(chatFormat.getI18nKey()), fxApplicationThreadExecutor));
chatComboBox.setItems(FXCollections.observableArrayList(ChatFormat.values()));
chatComboBox.getSelectionModel().select(chatPrefs.getChatFormat());
}

public void onChatFormatSelected() {
log.trace("A new chat format was selected: `{}`", chatComboBox.getValue());
preferences.getChat().setChatFormat(chatComboBox.getValue());
}

private StringListCell<Screen> screenListCell() {
return new StringListCell<>(screen -> i18n.get("settings.screenFormat", Screen.getScreens()
.indexOf(screen) + 1), fxApplicationThreadExecutor);
Expand Down
15 changes: 0 additions & 15 deletions src/main/resources/theme/settings/settings.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -297,21 +297,6 @@
onAction="#onTimeFormatSelected" GridPane.columnIndex="1"/>
</children>
</GridPane>
<GridPane styleClass="setting-container">
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0"/>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"/>
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" valignment="TOP" vgrow="SOMETIMES"/>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES"/>
</rowConstraints>
<children>
<Label styleClass="setting-title" text="%settings.chat.chatFormat"/>
<ComboBox fx:id="chatComboBox" maxWidth="1.7976931348623157E308"
onAction="#onChatFormatSelected" GridPane.columnIndex="1"/>
</children>
</GridPane>
<GridPane styleClass="setting-container">
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0"/>
Expand Down

0 comments on commit 1338574

Please sign in to comment.