From a7f0f9aa3164dbe16da025db4af15204dc265e59 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Fri, 29 Jan 2010 15:46:40 +0100 Subject: GUI: fixed the rating logic, to prevent sending BT with rating < 3 --- src/Gui/CCReporterDialog.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py index b5f57d7..a8539b0 100644 --- a/src/Gui/CCReporterDialog.py +++ b/src/Gui/CCReporterDialog.py @@ -89,7 +89,7 @@ class ReporterDialog(): send = True error_msgs = [] try: - rating = self.report[FILENAME_RATING] + rating = int(self.report[FILENAME_RATING][CD_CONTENT]) except: rating = None # active buttons acording to required fields @@ -98,7 +98,7 @@ class ReporterDialog(): send = False error_msgs.append(_("You must agree with submitting the backtrace.")) # we have both SendBacktrace and rating - if rating: + if rating != None: try: package = self.report[FILENAME_PACKAGE][CD_CONTENT] # if we don't have package for some reason @@ -110,6 +110,7 @@ class ReporterDialog(): error_msgs.append(_("Reporting disabled because the backtrace is unusable.\nPlease try to install debuginfo manually using command: debuginfo-install %s \nthen use Refresh button to regenerate the backtrace." % package[0:package.rfind('-',0,package.rfind('-'))])) else: error_msgs.append(_("The backtrace is unusable, you can't report this!")) + send = False # probably usable 3 elif int(self.report[FILENAME_RATING][CD_CONTENT]) < 4: error_msgs.append(_("The backtrace is incomplete, please make sure you provide good steps to reproduce.")) -- cgit