dont show exception twice.
svn: r5696
This commit is contained in:
parent
c2195c1074
commit
41e81a1034
@ -1,3 +1,9 @@
|
|||||||
|
2006-01-08 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
|
||||||
|
* src/GrampsLogger/_ErrorReportAssistant.py: don't show excep twice
|
||||||
|
* src/GrampsLogger/_ErrorView.py: don't show excep twice
|
||||||
|
* src/GrampsLogger/_GtkHandler.py: don't show excep twice
|
||||||
|
* src/GrampsLogger/_RotateHandler.py: don't show excep twice
|
||||||
|
|
||||||
2006-01-08 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
|
2006-01-08 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
|
||||||
* src/Assistant.py: changed button handling to improve usability
|
* src/Assistant.py: changed button handling to improve usability
|
||||||
* src/GrampsLogger/_ErrorReportAssistant.py: rewording and some frames.
|
* src/GrampsLogger/_ErrorReportAssistant.py: rewording and some frames.
|
||||||
|
@ -99,9 +99,10 @@ class ErrorReportAssistant:
|
|||||||
textview = gtk.TextView()
|
textview = gtk.TextView()
|
||||||
|
|
||||||
self._error_details_text_buffer = textview.get_buffer()
|
self._error_details_text_buffer = textview.get_buffer()
|
||||||
self._error_details_text_buffer.set_text("\n".join(self._rotate_handler.get_formatted_log()) +
|
self._error_details_text_buffer.set_text(
|
||||||
"\n\n" +
|
"\n".join(self._rotate_handler.get_formatted_log(self._error_detail.get_record())) +
|
||||||
self._error_detail)
|
"\n\n" +
|
||||||
|
self._error_detail.get_formatted_log())
|
||||||
|
|
||||||
sw.add(textview)
|
sw.add(textview)
|
||||||
sw.show()
|
sw.show()
|
||||||
@ -219,7 +220,7 @@ class ErrorReportAssistant:
|
|||||||
self._sys_information_text_buffer.get_text(
|
self._sys_information_text_buffer.get_text(
|
||||||
self._sys_information_text_buffer.get_start_iter(),
|
self._sys_information_text_buffer.get_start_iter(),
|
||||||
self._sys_information_text_buffer.get_end_iter()) +
|
self._sys_information_text_buffer.get_end_iter()) +
|
||||||
"Additional Information: \n\n" +
|
"\nAdditional Information: \n\n" +
|
||||||
self._user_information_text_buffer.get_text(
|
self._user_information_text_buffer.get_text(
|
||||||
self._user_information_text_buffer.get_start_iter(),
|
self._user_information_text_buffer.get_start_iter(),
|
||||||
self._user_information_text_buffer.get_end_iter()) +
|
self._user_information_text_buffer.get_end_iter()) +
|
||||||
|
@ -62,7 +62,7 @@ class ErrorView(object):
|
|||||||
tb_frame = gtk.Frame(_("Error Detail"))
|
tb_frame = gtk.Frame(_("Error Detail"))
|
||||||
tb_frame.set_border_width(6)
|
tb_frame.set_border_width(6)
|
||||||
tb_label = gtk.TextView()
|
tb_label = gtk.TextView()
|
||||||
tb_label.get_buffer().set_text(self._error_detail)
|
tb_label.get_buffer().set_text(self._error_detail.get_formatted_log())
|
||||||
tb_label.set_border_width(6)
|
tb_label.set_border_width(6)
|
||||||
tb_label.set_editable(False)
|
tb_label.set_editable(False)
|
||||||
|
|
||||||
|
@ -24,4 +24,11 @@ class GtkHandler(logging.Handler):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
ErrorView(error_detail=self.format(record),rotate_handler=self._rotate_handler)
|
self._record = record
|
||||||
|
ErrorView(error_detail=self,rotate_handler=self._rotate_handler)
|
||||||
|
|
||||||
|
def get_formatted_log(self):
|
||||||
|
return self.format(self._record)
|
||||||
|
|
||||||
|
def get_record(self):
|
||||||
|
return self._record
|
||||||
|
@ -31,7 +31,7 @@ class RotateHandler(logging.Handler):
|
|||||||
return [record for record in self._buffer[self._index:] + self._buffer[:self._index]
|
return [record for record in self._buffer[self._index:] + self._buffer[:self._index]
|
||||||
if record is not None]
|
if record is not None]
|
||||||
|
|
||||||
def get_formatted_log(self):
|
def get_formatted_log(self, remove_tail_duplicate=None):
|
||||||
"""
|
"""
|
||||||
Return the log buffer after it has been formatted.
|
Return the log buffer after it has been formatted.
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ class RotateHandler(logging.Handler):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
return [self.format(record) for record in self._buffer[self._index:] + self._buffer[:self._index]
|
return [self.format(record) for record in self._buffer[self._index:] + self._buffer[:self._index]
|
||||||
if record is not None]
|
if record is not None and record != remove_tail_duplicate]
|
||||||
|
|
||||||
def set_capacity(self,capacity):
|
def set_capacity(self,capacity):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user