'Return a Settings object that\'s full of values from the settings dialog.'

def settings_from_fields(self):

    common.log('SettingsDialog', 'settings_from_fields')
    settings = Settings(self.config)
    settings.load()
    settings.set('close_after_first_download', self.close_after_first_download_checkbox.isChecked())
    settings.set('systray_notifications', self.systray_notifications_checkbox.isChecked())
    settings.set('use_stealth', self.stealth_checkbox.isChecked())
    if self.connection_type_bundled_radio.isChecked():
        settings.set('connection_type', 'bundled')
    if self.connection_type_automatic_radio.isChecked():
        settings.set('connection_type', 'automatic')
    if self.connection_type_control_port_radio.isChecked():
        settings.set('connection_type', 'control_port')
    if self.connection_type_socket_file_radio.isChecked():
        settings.set('connection_type', 'socket_file')
    settings.set('control_port_address', self.connection_type_control_port_extras_address.text())
    settings.set('control_port_port', self.connection_type_control_port_extras_port.text())
    settings.set('socket_file_path', self.connection_type_socket_file_extras_path.text())
    settings.set('socks_address', self.connection_type_socks_address.text())
    settings.set('socks_port', self.connection_type_socks_port.text())
    if self.authenticate_no_auth_radio.isChecked():
        settings.set('auth_type', 'no_auth')
    if self.authenticate_password_radio.isChecked():
        settings.set('auth_type', 'password')
    settings.set('auth_password', self.authenticate_password_extras_password.text())
    return settings
