Changeset 484:e6fc7bff478b for src/mlx/gui/bugreport.py
- Timestamp:
- 03/31/13 09:33:45 (11 years ago)
- Branch:
- default
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/bugreport.py
r483 r484 97 97 def run(self): 98 98 """Run the checklist editor dialog.""" 99 self.set_sensitive(True) 100 self._description.set_sensitive(True) 99 101 self._updateButtons() 100 102 self._sendButton.grab_default() 101 103 self.show_all() 102 104 response = super(BugReportDialog, self).run() 103 self.hide() 105 106 print "response", response, RESPONSETYPE_ACCEPT 107 if response==RESPONSETYPE_ACCEPT: 108 self._send() 109 else: 110 self.hide() 104 111 105 112 def _summaryChanged(self, entry): … … 110 117 """Update the sensitivity of the buttoms.""" 111 118 self._sendButton.set_sensitive(self._summary.get_text()!="") 119 120 def _send(self): 121 """Send the bug report.""" 122 descriptionBuffer = self._description.get_buffer() 123 description = \ 124 descriptionBuffer.get_text(descriptionBuffer.get_start_iter(), 125 descriptionBuffer.get_end_iter(), 126 False) 127 self.set_sensitive(False) 128 self._gui.sendBugReport(self._summary.get_text(), 129 description, 130 self._email.get_text(), 131 self._bugReportSent) 132 133 def _bugReportSent(self, returned, result): 134 """Called when the bug report was sent.""" 135 self.set_sensitive(True) 136 self._description.set_sensitive(True) 137 if returned and result.success: 138 self.hide() 139 self._summary.set_text("") 140 self._description.get_buffer().set_text("") 141 self._email.set_text("") 142 else: 143 self.run()
Note:
See TracChangeset
for help on using the changeset viewer.