Skip to content
Merged

dev #74

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,6 @@ public void addAccount(String cookieOrig) throws IOException {
}
}

public void addAccount() throws IOException {
addAccount(cookieField.getText());
}

public void delAccount() throws IOException {
if (accountCombo.getSelectedIndex() != -1) {
ConfigManager.getAccounts().remove(accountCombo.getSelectionModel().getSelectedItem());
Expand Down Expand Up @@ -237,4 +233,13 @@ public void browserLoginBtnOnAction() {
logger.error("Failed to add account", e);
}
}

public void addAccountOnAction() {
try {
addAccount(cookieField.getText());
} catch (IOException e) {
Notice.showError(ResourceBundleUtil.getString("gui.pixiv.account.addFailed"), gui.mainPane);
logger.error("Failed to add account", e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<MFXButton fx:id="cookieHelpBtn" buttonType="RAISED" depthLevel="LEVEL1"
onAction="#cookieHelp"/>
<MFXButton buttonType="RAISED" depthLevel="LEVEL1" layoutX="264.0" layoutY="12.0"
onAction="#addAccount" text="%gui.pixiv.account.add"/>
onAction="#addAccountOnAction" text="%gui.pixiv.account.add"/>
</children>
</HBox>
</children>
Expand Down
Loading