Beispiel #1
0
 def handler(e_type, e_value, e_trace):
    sys.excepthook = sys.__excepthook__
    msg = str(e_value) + '\n'
    msg += '\n'.join(traceback.format_tb(e_trace))
    msg += '\n' + 'Further exceptions will not be shown.'
    dialog = gtk.MessageDialog(parent=self.window, buttons=gtk.BUTTONS_OK, flags=gtk.DIALOG_MODAL, type=gtk.MESSAGE_ERROR)
    dialog.set_title(str(e_type))
    dialog.set_markup(escape(msg))
    dialog.run()
    dialog.hide()
Beispiel #2
0
def eventformatter(column, renderer, model, iter):
   event = model.get_value(iter, 0)
   if event.deleted:
      renderer.set_property('markup', '<span strikethrough="true">%s</span>' % escape(event.text))
   else:
      renderer.set_property('text', event.text)
Beispiel #3
0
 def __str__(self):
     if self.tdelta.seconds:
         return "%s<i> - %s</i>" % (escape(self.text), self.get_timestring())
     return "%s" % (self.text)