From 241a648ce2ae5d718aafbeade84ff9feaf008f6c Mon Sep 17 00:00:00 2001 From: David Vierra Date: Wed, 7 Nov 2012 12:34:23 -1000 Subject: [PATCH] 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. --- errorreporting.py | 2 +- leveleditor.py | 3 ++- mcedit.py | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/errorreporting.py b/errorreporting.py index 1151816..80eb378 100644 --- a/errorreporting.py +++ b/errorreporting.py @@ -191,7 +191,7 @@ def post_crash_report(): def reportException(): try: import config - if config.config.get("Settings", "report crashes new") == "yes": + if config.config.get("Settings", "report crashes new"): post_crash_report() except Exception, e: print "Error while reporting crash: ", repr(e) diff --git a/leveleditor.py b/leveleditor.py index 25464eb..340653b 100644 --- a/leveleditor.py +++ b/leveleditor.py @@ -78,7 +78,8 @@ Settings.skin = Settings("MCEdit Skin", "[Current]") Settings.fov = Settings("Field of View", 70.0) Settings.spaceHeight = Settings("Space Height", 64) 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) diff --git a/mcedit.py b/mcedit.py index 9b601b9..d5fbfce 100755 --- a/mcedit.py +++ b/mcedit.py @@ -905,7 +905,7 @@ class MCEdit(GLViewport): if answer == "Don't remind me again.": mcedit.closeMinecraftWarning = False - if Settings.reportCrashes.get() == "ask": + if not Settings.reportCrashesAsked.get(): answer = albow.ask( "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, " @@ -915,7 +915,8 @@ class MCEdit(GLViewport): "Enable error reporting?", ["Yes", "No"], default=0) - Settings.reportCrashes.set(answer.lower()) + Settings.reportCrashes.set(answer == "Yes") + Settings.reportCrashesAsked.set(True) config.saveConfig()