def run(self): response = MessageDialog.run(self) self.destroy() return response
def _message_dialog(parent, type, primary, secondary, buttons=gtk.BUTTONS_OK, title="TortoiseHg"): """ Display a given type of MessageDialog with the given message. :param type: message dialog type :param message: the message you want to display. """ dialog = MessageDialog(parent, flags=gtk.DIALOG_MODAL, type=type, buttons=buttons) dialog.set_title(title) dialog.set_markup('<big><b>' + primary + '</b></big>') dialog.format_secondary_text(secondary) dialog.set_position(gtk.WIN_POS_MOUSE) response = dialog.run() dialog.destroy() return response