* Try to fix URL handling.

This commit is contained in:
LevelX2 2018-05-27 00:41:30 +02:00
parent 16dc022018
commit d743864bbd
2 changed files with 13 additions and 12 deletions

View file

@ -60,7 +60,6 @@ import static mage.client.dialog.PreferencesDialog.KEY_TABLES_FILTER_SETTINGS;
import static mage.client.dialog.PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_1; import static mage.client.dialog.PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_1;
import static mage.client.dialog.PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_2; import static mage.client.dialog.PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_2;
import static mage.client.dialog.PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_3; import static mage.client.dialog.PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_3;
import static mage.client.dialog.PreferencesDialog.KEY_MAGE_PANEL_LAST_SIZE;
import mage.client.util.ButtonColumn; import mage.client.util.ButtonColumn;
import mage.client.util.GUISizeHelper; import mage.client.util.GUISizeHelper;
import mage.client.util.IgnoreList; import mage.client.util.IgnoreList;
@ -550,6 +549,7 @@ public class TablesPanel extends javax.swing.JPanel {
this.jPanelBottom.setVisible(false); this.jPanelBottom.setVisible(false);
} else { } else {
this.jPanelBottom.setVisible(true); this.jPanelBottom.setVisible(true);
URLHandler.RemoveMouseAdapter(jLabelFooterText);
URLHandler.handleMessage(serverMessages.get(0), this.jLabelFooterText); URLHandler.handleMessage(serverMessages.get(0), this.jLabelFooterText);
this.jButtonFooterNext.setVisible(serverMessages.size() > 1); this.jButtonFooterNext.setVisible(serverMessages.size() > 1);
} }

View file

@ -9,10 +9,10 @@ import java.awt.Desktop;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.io.IOException; import java.io.IOException;
import java.net.URL;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.net.URL;
import javax.swing.JLabel; import javax.swing.JLabel;
/** /**
@ -47,6 +47,7 @@ public class URLHandler {
private static MouseAdapter createMouseAdapter(String url) { private static MouseAdapter createMouseAdapter(String url) {
currentMouseAdapter = new MouseAdapter() { currentMouseAdapter = new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (e.getClickCount() > 0) { if (e.getClickCount() > 0) {
if (Desktop.isDesktopSupported()) { if (Desktop.isDesktopSupported()) {