2043: Error on cosole output when Esc press in configure window of custom text in the book report

svn: r14626
This commit is contained in:
Benny Malengier 2010-03-05 15:24:07 +00:00
parent d0803692e7
commit a8206b52ac
2 changed files with 23 additions and 8 deletions

View File

@ -639,7 +639,10 @@ def report(dbstate, uistate, person, report_class, options_class,
except:
LOG.error("Failed to run report.", exc_info=True)
break
elif (response == gtk.RESPONSE_DELETE_EVENT or
response == gtk.RESPONSE_CANCEL):
elif response == gtk.RESPONSE_CANCEL:
dialog.close()
break
elif response == gtk.RESPONSE_DELETE_EVENT:
#just stop, in ManagedWindow, delete-event is already coupled to
#correct action.
break

View File

@ -899,12 +899,24 @@ class BookReportSelector(ManagedWindow.ManagedWindow):
item.get_name(),
item.get_translated_name(),
self.track)
response = item_dialog.window.run()
if response == gtk.RESPONSE_OK:
subject = _get_subject(option_class, self.db)
self.book_model.model.set_value(the_iter, 2, subject)
self.book.set_item(row, item)
item_dialog.close()
while True:
response = item_dialog.window.run()
if response == gtk.RESPONSE_OK:
# dialog will be closed by connect, now continue work while
# rest of dialog is unresponsive, release when finished
subject = _get_subject(option_class, self.db)
self.book_model.model.set_value(the_iter, 2, subject)
self.book.set_item(row, item)
item_dialog.close()
break
elif response == gtk.RESPONSE_CANCEL:
item_dialog.close()
break
elif response == gtk.RESPONSE_DELETE_EVENT:
#just stop, in ManagedWindow, delete-event is already coupled to
#correct action.
break
def book_button_press(self, obj, event):
"""