* Password join value is now distinct from password you set of for a new table.

This commit is contained in:
LevelX2 2015-06-12 08:12:38 +02:00
parent f7bce827fe
commit 4f6d3f3a1a
2 changed files with 3 additions and 2 deletions

View file

@ -51,7 +51,7 @@ public class JoinTableDialog extends MageDialog {
public JoinTableDialog() {
initComponents();
newPlayerPanel.showLevel(false);
txtPassword.setText(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_PASSWORD, ""));
txtPassword.setText(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TABLE_PASSWORD_JOIN, ""));
}
public void showDialog(UUID roomId, UUID tableId, boolean isTournament, boolean isLimited) {
@ -148,7 +148,7 @@ public class JoinTableDialog extends MageDialog {
private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOKActionPerformed
Session session = MageFrame.getSession();
try {
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_PASSWORD, txtPassword.getText());
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_PASSWORD_JOIN, txtPassword.getText());
if (isTournament) {
joined = session.joinTournamentTable(roomId, tableId, this.newPlayerPanel.getPlayerName(), "Human", 1, DeckImporterUtil.importDeck(this.newPlayerPanel.getDeckFile()), this.txtPassword.getText());
} else {

View file

@ -164,6 +164,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
// pref setting for new table dialog
public static final String KEY_NEW_TABLE_NAME = "newTableName";
public static final String KEY_NEW_TABLE_PASSWORD = "newTablePassword";
public static final String KEY_NEW_TABLE_PASSWORD_JOIN = "newTablePasswordJoin";
public static final String KEY_NEW_TABLE_DECK_TYPE = "newTableDeckType";
public static final String KEY_NEW_TABLE_TIME_LIMIT = "newTableTimeLimit";
public static final String KEY_NEW_TABLE_GAME_TYPE = "newTableGameType";