def _on_button_send_cb(button, dialog): buf = dialog.tev.get_buffer() it_start = buf.get_start_iter() it_end = buf.get_end_iter() description = buf.get_text(it_start, it_end, False) if len(description) < 10: _show_error_dialog(dialog, _("The description of problem is too short"), _("In order to get more useful reports we " "do not accept reports with the description " "shorter than 10 letters.")) dialog.tev.grab_focus() return summary = dialog.txe_reason.get_text() if len(summary) < 10: _show_error_dialog(dialog, _("The summary of problem is too short"), _("In order to get more useful reports we " "do not accept reports with the summary " "shorter than 10 letters.")) dialog.txe_reason.grab_focus() dialog.txe_reason.set_position(len(summary)) return dialog.destroy() report = problem_data() report.add("reason", summary) report.add("comment", description) report.add("component", gnome_abrt.PACKAGE) report.add("package", "{0}-{1}".format(gnome_abrt.PACKAGE, gnome_abrt.VERSION)) report.add_basics() report.add("duphash", report.get("uuid")[0]) report_problem_in_memory(report, LIBREPORT_NOWAIT)
def _on_button_send_cb(button, dialog): buf = dialog.tev.get_buffer() it_start = buf.get_start_iter() it_end = buf.get_end_iter() description = buf.get_text(it_start, it_end, False) if len(description) < 10: _show_error_dialog( dialog, _("The description of problem is too short"), _("In order to get more useful reports we " "do not accept reports with the description " "shorter than 10 letters.")) dialog.tev.grab_focus() return summary = dialog.txe_reason.get_text() if len(summary) < 10: _show_error_dialog( dialog, _("The summary of problem is too short"), _("In order to get more useful reports we " "do not accept reports with the summary " "shorter than 10 letters.")) dialog.txe_reason.grab_focus() dialog.txe_reason.set_position(len(summary)) return dialog.destroy() report = problem_data() report.add("reason", summary) report.add("comment", description) report.add("component", gnome_abrt.PACKAGE) report.add("package", "{0}-{1}".format(gnome_abrt.PACKAGE, gnome_abrt.VERSION)) report.add_basics() report.add("duphash", report.get("uuid")[0]) report_problem_in_memory(report, LIBREPORT_NOWAIT)
def run(self, *args, **kwargs): # Don't need to check the return value of report since it will # handle all the UI reporting for us. report.report_problem_in_memory(self.signature, LIBREPORT_WAIT|LIBREPORT_RUN_CLI)
def run(self, *args, **kwargs): # Don't need to check the return value of report since it will # handle all the UI reporting for us. report.report_problem_in_memory(self.signature, report.LIBREPORT_WAIT)