error_popop: added a button for Exiting the program altogether
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@657 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
78934b9961
commit
b20a0f7e77
2 changed files with 17 additions and 2 deletions
|
@ -1208,7 +1208,8 @@ public class MainWindow extends JFrame
|
|||
null,
|
||||
new String[] {
|
||||
strings.getString("main.error_show_stacktrace"),
|
||||
strings.getString("main.error_close")
|
||||
strings.getString("main.error_close"),
|
||||
strings.getString("main.error_shutdown")
|
||||
},
|
||||
1
|
||||
);
|
||||
|
@ -1218,6 +1219,18 @@ public class MainWindow extends JFrame
|
|||
strings.getString("main.error_unexpected"),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
if (rv == 2)
|
||||
{
|
||||
rv = JOptionPane.showConfirmDialog(
|
||||
this,
|
||||
strings.getString("error.shutdown_query"),
|
||||
strings.getString("main.error_unexpected"),
|
||||
JOptionPane.OK_CANCEL_OPTION,
|
||||
JOptionPane.WARNING_MESSAGE);
|
||||
if (rv == JOptionPane.OK_OPTION) {
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class EarthquakeStepper
|
||||
|
|
|
@ -17,7 +17,9 @@ main.population_label = Population:
|
|||
main.error_caption = Error
|
||||
main.error_unexpected = An unexpected error occurred
|
||||
main.error_show_stacktrace = Show Details
|
||||
main.error_close = Close
|
||||
main.error_close = Dismiss
|
||||
main.error_shutdown = Exit Program
|
||||
error.shutdown_query = Do you really want to exit the program? Your city will not be saved.
|
||||
main.tools_caption = Tools
|
||||
main.about_caption = About MicropolisJ
|
||||
main.version_string = Version {0} (Java %java.version%, %java.vendor%)
|
||||
|
|
Reference in a new issue