diff --git a/pom.xml b/pom.xml
index a9c842d2..6a0490f3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.tonikelope
CoronaPoker
- 17.96
+ 17.97
jar
diff --git a/src/main/java/com/tonikelope/coronapoker/AboutDialog.java b/src/main/java/com/tonikelope/coronapoker/AboutDialog.java
index 90daf366..a3401eb2 100644
--- a/src/main/java/com/tonikelope/coronapoker/AboutDialog.java
+++ b/src/main/java/com/tonikelope/coronapoker/AboutDialog.java
@@ -64,7 +64,7 @@
*/
public class AboutDialog extends javax.swing.JDialog {
- public static final String VERSION = "17.96";
+ public static final String VERSION = "17.97";
public static final String UPDATE_URL = "https://github.com/tonikelope/coronapoker/releases/latest";
public static final String TITLE = "¿De dónde ha salido esto?";
public static final int MAX_MOD_LOGO_HEIGHT = 75;
diff --git a/src/main/java/com/tonikelope/coronapoker/GameFrame.java b/src/main/java/com/tonikelope/coronapoker/GameFrame.java
index 9e6bb902..e7efb367 100644
--- a/src/main/java/com/tonikelope/coronapoker/GameFrame.java
+++ b/src/main/java/com/tonikelope/coronapoker/GameFrame.java
@@ -698,8 +698,10 @@ public void vistaCompacta() {
for (RemotePlayer jugador : players) {
- jugador.refreshSecPotLabel();
- jugador.refreshNotifyChatLabel();
+ synchronized (jugador.getChat_notify_label()) {
+ jugador.refreshSecPotLabel();
+ jugador.refreshNotifyChatLabel();
+ }
}
}
diff --git a/src/main/java/com/tonikelope/coronapoker/NewGameDialog.java b/src/main/java/com/tonikelope/coronapoker/NewGameDialog.java
index 5df77c18..5b6a7922 100644
--- a/src/main/java/com/tonikelope/coronapoker/NewGameDialog.java
+++ b/src/main/java/com/tonikelope/coronapoker/NewGameDialog.java
@@ -49,6 +49,7 @@
import javax.imageio.ImageIO;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
+import javax.swing.JEditorPane;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JSpinner.DefaultEditor;
@@ -56,6 +57,7 @@
import javax.swing.SwingUtilities;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
+import javax.swing.event.HyperlinkEvent;
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.text.AbstractDocument;
@@ -1210,6 +1212,8 @@ private void vamosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:e
WaitingRoomFrame espera = new WaitingRoomFrame(partida_local, elnick, server_ip_textfield.getText().trim() + ":" + server_port_textfield.getText().trim(), avatar, pass_text.getPassword().length == 0 ? null : new String(pass_text.getPassword()), upnp_checkbox.isSelected());
+ WaitingRoomFrame.setInstance(espera);
+
espera.setLocationRelativeTo(this);
setVisible(false);
diff --git a/src/main/java/com/tonikelope/coronapoker/RemotePlayer.java b/src/main/java/com/tonikelope/coronapoker/RemotePlayer.java
index e460e2c3..3b160fc3 100644
--- a/src/main/java/com/tonikelope/coronapoker/RemotePlayer.java
+++ b/src/main/java/com/tonikelope/coronapoker/RemotePlayer.java
@@ -139,9 +139,7 @@ public void refreshNotifyChatLabel() {
Helpers.GUIRun(() -> {
if (getChat_notify_label().isVisible()) {
Helpers.threadRun(() -> {
- if (chat_notify_image_url != null) {
- setNotifyImageChatLabel(chat_notify_image_url);
- } else {
+ if (chat_notify_image_url == null) {
setNotifyTTSChatLabel();
}
});
diff --git a/src/main/java/com/tonikelope/coronapoker/WaitingRoomFrame.java b/src/main/java/com/tonikelope/coronapoker/WaitingRoomFrame.java
index b293ca1c..a14a42a0 100644
--- a/src/main/java/com/tonikelope/coronapoker/WaitingRoomFrame.java
+++ b/src/main/java/com/tonikelope/coronapoker/WaitingRoomFrame.java
@@ -101,7 +101,7 @@
* @author tonikelope
*/
public class WaitingRoomFrame extends javax.swing.JFrame {
-
+
public static final int MAX_PARTICIPANTES = 10;
public static final String MAGIC_BYTES = "5c1f158dd9855cc9";
public static final int PING_PONG_TIMEOUT = 15000;
@@ -113,7 +113,7 @@ public class WaitingRoomFrame extends javax.swing.JFrame {
public static final int ANTI_FLOOD_CHAT = 1000;
public static volatile boolean CHAT_GAME_NOTIFICATIONS = Boolean.parseBoolean(Helpers.PROPERTIES.getProperty("chat_game_notifications", "true"));
private static volatile WaitingRoomFrame THIS = null;
-
+
private final File local_avatar;
private final Map participantes = Collections.synchronizedMap(new LinkedHashMap<>());
private final Object local_client_socket_lock = new Object();
@@ -155,47 +155,47 @@ public class WaitingRoomFrame extends javax.swing.JFrame {
private volatile String local_avatar_chat_src;
private volatile Border chat_scroll_border = null;
private volatile boolean protect_focus = false;
-
+
public Object getLock_client_async_wait() {
return lock_client_async_wait;
}
-
+
public String getLocal_client_permutation_key_hash() {
return local_client_permutation_key_hash;
}
-
+
public String getBackground_chat_src() {
return background_chat_src;
}
-
+
public JButton getEmoji_button() {
return emoji_button;
}
-
+
public String getLocal_nick() {
return local_nick;
}
-
+
public StringBuffer getChat_text() {
return chat_text;
}
-
+
public JList getConectados() {
return conectados;
}
-
+
public void soundIconClick() {
Helpers.GUIRun(() -> {
sound_iconMouseClicked(null);
});
}
-
+
public void setExit(boolean exit) {
this.exit = exit;
}
-
+
public void closeServerSocket() {
-
+
if (server_socket != null) {
try {
server_socket.close();
@@ -203,11 +203,11 @@ public void closeServerSocket() {
Logger.getLogger(WaitingRoomFrame.class.getName()).log(Level.SEVERE, null, ex);
}
}
-
+
}
-
+
public void closeClientSocket() {
-
+
if (local_client_socket != null) {
try {
local_client_socket.close();
@@ -216,94 +216,94 @@ public void closeClientSocket() {
}
}
}
-
+
public static void resetInstance() {
THIS.protect_focus = false;
THIS.setVisible(false);
THIS.dispose();
THIS = null;
}
-
+
public JCheckBox getChat_notifications() {
return chat_notifications;
}
-
+
public JLabel getTts_warning() {
return tts_warning;
}
-
+
public boolean isChat_enabled() {
return chat_enabled;
}
-
+
public void setChat_enabled(boolean chat_enabled) {
this.chat_enabled = chat_enabled;
}
-
+
public Map getParticipantes() {
return participantes;
}
-
+
public File getLocal_avatar() {
return local_avatar;
}
-
+
public boolean isPartida_empezando() {
return partida_empezando;
}
-
+
public String getVideo_chat_link() {
return video_chat_link;
}
-
+
public void setVideo_chat_link(String video_chat_link) {
-
+
if (!server && (this.video_chat_link == null || !this.video_chat_link.equals(video_chat_link))) {
Audio.playWavResource("misc/chat_alert.wav");
}
-
+
this.video_chat_link = video_chat_link;
-
+
Helpers.GUIRun(() -> {
video_chat_button.setEnabled(true);
});
}
-
+
public boolean isUnsecure_server() {
return unsecure_server;
}
-
+
public int getServer_port() {
return server_port;
}
-
+
public boolean isUpnp() {
return upnp;
}
-
+
public void setUnsecure_server(boolean val) {
this.unsecure_server = val;
-
+
if (Boolean.parseBoolean(Helpers.PROPERTIES.getProperty("binary_check", "true"))) {
-
+
Helpers.GUIRun(() -> {
danger_server.setVisible(unsecure_server);
pack();
});
-
+
Helpers.threadRun(() -> {
mostrarMensajeInformativo(THIS, "CUIDADO: el ejecutable del juego del servidor es diferente\n(Es posible que intente hacer trampas con una versión hackeada del juego)");
});
-
+
}
}
-
+
public ConcurrentLinkedQueue