def __Delete(self):
        if self.__objective:

            # Delete in cascade
            if (self.config.Get('deleteCascade') and
                    len(self.controller.Requeriments(self.__objective)) > 1):
                dialog = DeleteCascade(self.__objective)

                dialog.window.set_transient_for(self.window)
                response = dialog.window.run()
                dialog.window.destroy()

#				if response > 0:
#					self.__CreateTree()

# Delete only the objective
            else:
                dialog = MessageDialog(
                    self.window, 0, MESSAGE_QUESTION, BUTTONS_YES_NO,
                    _("Do you want to delete the objective ") +
                    self.__objective + "?")
                response = dialog.run()
                dialog.destroy()
                if response == RESPONSE_YES:
                    self.controller.DeleteObjective(self.__objective)


#					self.__CreateTree()

        return True
    def __Cancel(self):
        closeDialog = self.oldObjective == self.txtObjective.get_text()

        if not closeDialog:
            dialog = MessageDialog(self.window, 0, MESSAGE_QUESTION,
                                   BUTTONS_YES_NO,
                                   _("The objective have been modified"))
            dialog.format_secondary_text(
                _("The objective have been modified and the changes will be lost. Are you sure do you want to continue?"
                  ))
            response = dialog.run()
            dialog.destroy()
            if response == RESPONSE_YES:
                return True

        return closeDialog