'Generic close.'

def _close(self):

    if self.like_initial:
        return False
    msg = 'Do    you    want    to    quit    without    saving    the    changes?'
    dlg = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_YES_NO, msg)
    stayhere = (dlg.run() != gtk.RESPONSE_YES)
    dlg.destroy()
    return stayhere
