Skip to content

Commit

Permalink
Remove unused fxml files and the tournaments and tutorials tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheikah45 committed Jun 10, 2023
1 parent bec19fc commit c7950ec
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 105 deletions.
19 changes: 1 addition & 18 deletions src/main/java/com/faforever/client/chat/UrlPreviewResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,5 @@ public interface UrlPreviewResolver {

CompletableFuture<Optional<Preview>> resolvePreview(String urlString);

class Preview {

private final Node node;
private final String description;

public Preview(Node node, String description) {
this.node = node;
this.description = description;
}

public Node getNode() {
return node;
}

public String getDescription() {
return description;
}
}
record Preview(Node node, String description) {}
}
4 changes: 2 additions & 2 deletions src/main/java/com/faforever/client/fx/BrowserCallback.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ public void hideUrlPreview() {
@SuppressWarnings("unused")
public void previewUrl(String urlString) {
urlPreviewResolver.resolvePreview(urlString).thenAccept(optionalPreview -> optionalPreview.ifPresent(preview -> {
linkPreviewTooltip = new Tooltip(preview.getDescription());
linkPreviewTooltip = new Tooltip(preview.description());
linkPreviewTooltip.setAutoHide(true);
linkPreviewTooltip.setAnchorLocation(AnchorLocation.CONTENT_BOTTOM_LEFT);
linkPreviewTooltip.setGraphic(preview.getNode());
linkPreviewTooltip.setGraphic(preview.node());
linkPreviewTooltip.setContentDisplay(ContentDisplay.TOP);
fxApplicationThreadExecutor.execute(() -> linkPreviewTooltip.show(StageHolder.getStage(), lastMouseX + 20, lastMouseY));
}));
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/com/faforever/client/main/MainController.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,9 @@ public class MainController implements Controller<Node>, InitializingBean {
public ToggleButton chatButton;
public ToggleButton playButton;
public ToggleButton replayButton;
public ToggleButton tutorialsButton;
public ToggleButton mapButton;
public ToggleButton modButton;
public ToggleButton leaderboardsButton;
public ToggleButton tournamentsButton;
public ToggleButton unitsButton;
public StackPane contentWrapperPane;
public ToggleGroup mainNavigation;
Expand Down Expand Up @@ -194,9 +192,7 @@ public void initialize() {
mapButton.setUserData(NavigationItem.MAP);
modButton.setUserData(NavigationItem.MOD);
leaderboardsButton.setUserData(NavigationItem.LEADERBOARD);
tournamentsButton.setUserData(NavigationItem.TOURNAMENTS);
unitsButton.setUserData(NavigationItem.UNITS);
tutorialsButton.setUserData(NavigationItem.TUTORIALS);
eventBus.register(this);

PersistentNotificationsController persistentNotificationsController = uiService.loadFxml("theme/persistent_notifications.fxml");
Expand Down
31 changes: 0 additions & 31 deletions src/main/resources/theme/comment_card.fxml

This file was deleted.

15 changes: 0 additions & 15 deletions src/main/resources/theme/dialog.fxml

This file was deleted.

6 changes: 0 additions & 6 deletions src/main/resources/theme/main.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,9 @@
<ToggleButton fx:id="leaderboardsButton" minWidth="-Infinity" mnemonicParsing="false"
onAction="#onNavigateButtonClicked" styleClass="main-navigation-button"
text="%main.leaderboards" toggleGroup="$mainNavigation"/>
<ToggleButton fx:id="tournamentsButton" minWidth="-Infinity" mnemonicParsing="false"
onAction="#onNavigateButtonClicked" styleClass="main-navigation-button"
text="%main.tournaments" toggleGroup="$mainNavigation"/>
<ToggleButton fx:id="unitsButton" minWidth="-Infinity" mnemonicParsing="false"
onAction="#onNavigateButtonClicked" styleClass="main-navigation-button"
text="%main.units" toggleGroup="$mainNavigation"/>
<ToggleButton fx:id="tutorialsButton" minWidth="-Infinity" mnemonicParsing="false"
onAction="#onNavigateButtonClicked" styleClass="main-navigation-button"
text="%main.tutorials" toggleGroup="$mainNavigation"/>
</children>
</HBox>
<MenuButton fx:id="navigationDropdown" minHeight="-Infinity" minWidth="-Infinity" />
Expand Down
29 changes: 0 additions & 29 deletions src/main/resources/theme/notification_bar.fxml

This file was deleted.

Empty file.

0 comments on commit c7950ec

Please sign in to comment.