'Copies the selected profile.'

def save_as_profile(self, widget=None):

    if (not self.w3af.mainwin.save_state_to_core(relaxedTarget=True)):
        return
    dlg = entries.EntryDialog(_('Save    as...'), gtk.STOCK_SAVE_AS, [_('Name:'), _('Description:')])
    dlg.run()
    dlgResponse = dlg.inputtexts
    dlg.destroy()
    if (dlgResponse is not None):
        (filename, description) = dlgResponse
        filename = cgi.escape(filename)
        try:
            profile_obj = helpers.coreWrap(self.w3af.profiles.save_current_to_new_profile, filename, description)
        except BaseFrameworkException:
            self.w3af.mainwin.sb(_('There    was    a    problem    saving    the    profile!'))
            return
        self.w3af.mainwin.sb(_('New    profile    created'))
        self.load_profiles(selected=profile_obj.get_name())
