'Main quit.
:param widget: who sent the signal.
:param event: the event that happened
:param data: optional data to receive.'

def quit(self, widget, event, data=None):

    msg = _('Do    you    really    want    to    quit?')
    dlg = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, msg)
    opt = dlg.run()
    dlg.destroy()
    if (opt != gtk.RESPONSE_YES):
        return True
    helpers.end_threads()
    self.sb.clear()
    try:
        w = self.window
        self.generalconfig['should-maximize'] = self.is_maximized
        self.generalconfig['mainwindow-size'] = w.get_size()
        self.generalconfig['mainwindow-position'] = w.get_position()
        self.generalconfig.close()
    finally:
        self.generalconfig = FakeShelve()
        gtk.main_quit()
        time.sleep(0.5)
        self.w3af.quit()
        return False
