The "Report Errors" checkbox is no longer stuck on or off.

Split it into two settings, one for report errors and one for asking on startup if it's okay to report errors.
This commit is contained in:
David Vierra 2012-11-07 12:34:23 -10:00
parent f185473c5d
commit 241a648ce2
3 changed files with 6 additions and 4 deletions

View File

@ -191,7 +191,7 @@ def post_crash_report():
def reportException(): def reportException():
try: try:
import config import config
if config.config.get("Settings", "report crashes new") == "yes": if config.config.get("Settings", "report crashes new"):
post_crash_report() post_crash_report()
except Exception, e: except Exception, e:
print "Error while reporting crash: ", repr(e) print "Error while reporting crash: ", repr(e)

View File

@ -78,7 +78,8 @@ Settings.skin = Settings("MCEdit Skin", "[Current]")
Settings.fov = Settings("Field of View", 70.0) Settings.fov = Settings("Field of View", 70.0)
Settings.spaceHeight = Settings("Space Height", 64) Settings.spaceHeight = Settings("Space Height", 64)
Settings.blockBuffer = Settings("Block Buffer", 256 * 1048576) Settings.blockBuffer = Settings("Block Buffer", 256 * 1048576)
Settings.reportCrashes = Settings("report crashes new", "ask") Settings.reportCrashes = Settings("report crashes new", False)
Settings.reportCrashesAsked = Settings("report crashes asked", False)
Settings.doubleBuffer = Settings("Double Buffer", True) Settings.doubleBuffer = Settings("Double Buffer", True)

View File

@ -905,7 +905,7 @@ class MCEdit(GLViewport):
if answer == "Don't remind me again.": if answer == "Don't remind me again.":
mcedit.closeMinecraftWarning = False mcedit.closeMinecraftWarning = False
if Settings.reportCrashes.get() == "ask": if not Settings.reportCrashesAsked.get():
answer = albow.ask( answer = albow.ask(
"When an error occurs, MCEdit can report the details of the error to its developers. " "When an error occurs, MCEdit can report the details of the error to its developers. "
"The error report will include your operating system version, MCEdit version, " "The error report will include your operating system version, MCEdit version, "
@ -915,7 +915,8 @@ class MCEdit(GLViewport):
"Enable error reporting?", "Enable error reporting?",
["Yes", "No"], ["Yes", "No"],
default=0) default=0)
Settings.reportCrashes.set(answer.lower()) Settings.reportCrashes.set(answer == "Yes")
Settings.reportCrashesAsked.set(True)
config.saveConfig() config.saveConfig()