diff options
Diffstat (limited to 'src/Gui/CCReporterDialog.py')
| -rw-r--r-- | src/Gui/CCReporterDialog.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py index 83d1c77..078fdd0 100644 --- a/src/Gui/CCReporterDialog.py +++ b/src/Gui/CCReporterDialog.py @@ -79,7 +79,6 @@ class ReporterDialog(): self.tvReport.insert_column(column,0) # connect the signals self.tvReport.connect_after("size-allocate", self.on_window_resize) - self.wTree.get_widget("bSend").connect("clicked", self.on_send_clicked) # start with the warning hidden, so it's not visible when there is no rating self.wTree.get_widget("ebErrors").hide() self.hydrate() @@ -88,10 +87,10 @@ class ReporterDialog(): def on_response(self, dialog, response_id, daemon ): # thu button has been pressed (probably) if response_id == gtk.RESPONSE_APPLY: - if not self.check_settings(daemon): + if not (self.check_settings(daemon) and self.check_report()): dialog.stop_emission("response") self.wTree.get_widget("bSend").stop_emission("clicked") - + def on_send_toggled(self, cell, path, model): model[path][3] = not model[path][3] @@ -263,8 +262,11 @@ class ReporterDialog(): else: del self.report["How to reproduce"] - def on_send_clicked(self, button): - #def on_apply_clicked(self, button, treeview): + def check_report(self): + # FIXME: what to do if user press "Not to send BT and then press cancel" + # it uncheck the backtrace and let him to edit it, and then user might + # not noticed, that he is not sending the BT, so should we warn user about this + # or check the BT automatically? attributes = ["item", "content", "editable", "send", "attachment"] for row in self.reportListStore: rowe = dict(zip(attributes, row)) @@ -273,8 +275,10 @@ class ReporterDialog(): "Do you really want to send <b>%s</b>?\n" % rowe["item"]), self.window) if result == gtk.RESPONSE_NO: row[attributes.index("send")] = False + if result == (gtk.RESPONSE_CANCEL or gtk.RESPONSE_DELETE_EVENT): + return False self.dehydrate() - self.window.response(gtk.RESPONSE_APPLY) + return True def run(self): result = self.window.run() |
