[UI] Fixed question dialogs always appearing on root virtual table instead of current one (linux&macos)

This commit is contained in:
magenoxx 2014-08-07 15:38:05 +04:00
parent 53453243dc
commit 7adf282ff5

View file

@ -494,7 +494,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
beforeCall = System.currentTimeMillis(); beforeCall = System.currentTimeMillis();
if (DownloadPictures.checkForNewCards(cards)) { if (DownloadPictures.checkForNewCards(cards)) {
logger.info("Card images checking time: " + ((System.currentTimeMillis() - beforeCall) / 1000 + " seconds")); logger.info("Card images checking time: " + ((System.currentTimeMillis() - beforeCall) / 1000 + " seconds"));
if (JOptionPane.showConfirmDialog(null, "New cards are available. Do you want to download the images?", "New images available", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { if (JOptionPane.showConfirmDialog(this, "New cards are available. Do you want to download the images?", "New images available", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
DownloadPictures.startDownload(null, cards); DownloadPictures.startDownload(null, cards);
} }
} }
@ -507,7 +507,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
} }
public void btnSymbolsActionPerformed(java.awt.event.ActionEvent evt) { public void btnSymbolsActionPerformed(java.awt.event.ActionEvent evt) {
if (JOptionPane.showConfirmDialog(null, "Do you want to download mana symbols?") == JOptionPane.OK_OPTION) { if (JOptionPane.showConfirmDialog(this, "Do you want to download mana symbols?") == JOptionPane.OK_OPTION) {
Plugins.getInstance().downloadSymbols(); Plugins.getInstance().downloadSymbols();
} }
} }
@ -1226,7 +1226,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
@Override @Override
public void run() { public void run() {
disableButtons(); disableButtons();
if (JOptionPane.showConfirmDialog(null, "The connection to server was lost. Reconnect?", "Warning", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { if (JOptionPane.showConfirmDialog(MageFrame.this, "The connection to server was lost. Reconnect?", "Warning", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
session.disconnect(false); session.disconnect(false);
tablesPane.clearChat(); tablesPane.clearChat();
if (performConnect()) { if (performConnect()) {