forked from Captain-Chaos/WorldPainter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate showing of error, warning and informational messages
- Loading branch information
1 parent
89a2dd4
commit d86a656
Showing
26 changed files
with
179 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 45 additions & 65 deletions
110
WorldPainter/WPGUI/src/main/java/org/pepsoft/worldpainter/App.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ | |
import static org.pepsoft.util.AwtUtils.doOnEventThread; | ||
import static org.pepsoft.util.GUIUtils.scaleToUI; | ||
import static org.pepsoft.util.mdc.MDCUtils.gatherMdcContext; | ||
import static org.pepsoft.util.swing.MessageUtils.showInfo; | ||
import static org.pepsoft.worldpainter.Constants.*; | ||
|
||
/** | ||
|
@@ -277,7 +278,7 @@ private void email() { | |
URI uri = new URI("mailto", "[email protected]?subject=WorldPainter error report&body=" + body, null); | ||
Desktop desktop = Desktop.getDesktop(); | ||
desktop.mail(uri); | ||
JOptionPane.showMessageDialog(this, "A new email message should have been opened now for you to send.\nIf it did not work, please use the \"copy to clipboard\" button\nand manually mail the information to [email protected].", "Email Created", JOptionPane.INFORMATION_MESSAGE); | ||
showInfo(this, "A new email message should have been opened now for you to send.\nIf it did not work, please use the \"copy to clipboard\" button\nand manually mail the information to [email protected].", "Email Created"); | ||
} catch (URISyntaxException e) { | ||
logger.error("URI syntax error while trying to send email", e); | ||
JOptionPane.showMessageDialog(this, "Could not create email message with error details!\nPlease use the \"copy to clipboard\" button and mail\nthe information to [email protected].", "Could Not Create Email", JOptionPane.ERROR_MESSAGE); | ||
|
@@ -291,7 +292,7 @@ private void copyToClipboard() { | |
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); | ||
StringSelection data = new StringSelection(body); | ||
clipboard.setContents(data, data); | ||
JOptionPane.showMessageDialog(this, "The information has been copied to the clipboard. Please paste\nit in a new email and send it to [email protected].", "Information Copied", JOptionPane.INFORMATION_MESSAGE); | ||
showInfo(this, "The information has been copied to the clipboard. Please paste\nit in a new email and send it to [email protected].", "Information Copied"); | ||
} | ||
|
||
private void submitInBackground() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.