From 2a9c7637018dd144caa04679ed7fbfbe90b6eb13 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Tue, 1 Sep 2009 15:27:26 +0200 Subject: GUI: every item in report is sent by default - added warning dialog to let user change it --- src/Gui/CCReporterDialog.py | 10 +++++++++- src/Gui/CC_gui_functions.py | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/Gui') diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py index bae5cf72..e9de8ca0 100644 --- a/src/Gui/CCReporterDialog.py +++ b/src/Gui/CCReporterDialog.py @@ -91,6 +91,14 @@ class ReporterDialog(): return def on_apply_clicked(self, button, treeview): + attributes = ["item", "content", "editable", "send", "attachment"] + for row in self.reportListStore: + rowe = dict(zip(attributes, row)) + if (rowe["attachment"] or (rowe["editable"] and rowe["attachment"])) and rowe["send"]: + result = gui_question_dialog(_("WARNING, you're about to send data that might contain some sensitive informations!\n" + "Do you really want to send %s?\n" % rowe["item"]), self.window) + if result == gtk.RESPONSE_NO: + row[attributes.index("send")] = False self.dehydrate() def on_cancel_clicked(self, button, treeview): @@ -108,7 +116,7 @@ class ReporterDialog(): if self.report[item][EDITABLE] == 'y': self.editable.append(item) self.row_dict[item] = self.reportListStore.append([item, self.report[item][CONTENT], - item in self.editable, False, + item in self.editable, True, self.report[item][TYPE] in ['a','b']]) def dehydrate(self): diff --git a/src/Gui/CC_gui_functions.py b/src/Gui/CC_gui_functions.py index 5a1d3541..6a638683 100644 --- a/src/Gui/CC_gui_functions.py +++ b/src/Gui/CC_gui_functions.py @@ -140,6 +140,7 @@ def gui_question_dialog ( message, parent_dialog=None, message_type, gtk.BUTTONS_YES_NO, message ) + dialog.set_markup(message) if parent_dialog: dialog.set_position (gtk.WIN_POS_CENTER_ON_PARENT) dialog.set_transient_for(parent_dialog) -- cgit