Ejemplo n.º 1
0
/**
 * gdaui_login_set_connection_information:
 * @login: a #GdauiLogin object
 * @cinfo: a pointer to a structure representing the information to display.
 *
 * Changes the information displayed in @login, to represent @cinfo.
 * If @login's mode has %GDA_UI_LOGIN_HIDE_DIRECT_CONNECTION_MODE, then
 * if @cinfo->name is not %NULL it is displayed in the DSN selector, otherwise
 * a warning is shown and the result
 * is the same as having passed %NULL for the @cinfo argument.
 *
 * In any case @login's mode (set by gdaui_login_set_mode()) is not changed.
 */
void
gdaui_login_set_connection_information (GdauiLogin *login, const GdaDsnInfo *cinfo)
{
	g_return_if_fail (GDAUI_IS_LOGIN (login));
	GdauiLoginPrivate *priv = gdaui_login_get_instance_private (login);
	if (!cinfo) {
		_gdaui_dsn_selector_set_dsn (GDAUI_DSN_SELECTOR (priv->dsn_selector), NULL);
	}
	else {
		GdaDsnInfo *info = NULL;
		if (cinfo->name)
			info = gda_config_get_dsn_info (cinfo->name);
		if (info)
			_gdaui_dsn_selector_set_dsn (GDAUI_DSN_SELECTOR (priv->dsn_selector), cinfo->name);
		else {
			/* force switch to */
			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->rb_dsn), FALSE);
		}
		g_signal_handlers_block_by_func (priv->prov_selector,
						 G_CALLBACK (prov_entry_changed_cb), login);
		gdaui_provider_selector_set_provider (GDAUI_PROVIDER_SELECTOR (priv->prov_selector),
		                                      cinfo->provider);
		g_signal_handlers_unblock_by_func (priv->prov_selector,
						   G_CALLBACK (prov_entry_changed_cb), login);

		_gdaui_provider_spec_editor_set_provider (GDAUI_PROVIDER_SPEC_EDITOR (priv->cnc_params_editor),
							  cinfo->provider);
		_gdaui_provider_spec_editor_set_specs (GDAUI_PROVIDER_SPEC_EDITOR (priv->cnc_params_editor),
						       cinfo->cnc_string);
		_gdaui_provider_auth_editor_set_provider (GDAUI_PROVIDER_AUTH_EDITOR (priv->auth_widget),
							  cinfo->provider);
		_gdaui_provider_auth_editor_set_auth (GDAUI_PROVIDER_AUTH_EDITOR (priv->auth_widget),
						      cinfo->auth_string);
	}
}
Ejemplo n.º 2
0
static void
field_changed_cb (GtkWidget *widget, GdauiDsnEditor *config)
{
	if (widget == config->priv->wprovider) {
		/* replace the expander's contents */
		const gchar *pname;
		pname = gdaui_provider_selector_get_provider (GDAUI_PROVIDER_SELECTOR (config->priv->wprovider));
		_gdaui_provider_spec_editor_set_provider (GDAUI_PROVIDER_SPEC_EDITOR (config->priv->dsn_spec),
							  pname);
		_gdaui_provider_auth_editor_set_provider (GDAUI_PROVIDER_AUTH_EDITOR (config->priv->dsn_auth),
							  pname);

		GdaProviderInfo *pinfo;
		pinfo = gda_config_get_provider_info (pname);

		GdkPixbuf *pix;
		pix = support_create_pixbuf_for_provider (pinfo);
		if (pix) {
			gtk_image_set_from_pixbuf (GTK_IMAGE (config->priv->icon), pix);
			g_object_unref (pix);
		}
		else
			gtk_image_clear (GTK_IMAGE (config->priv->icon));

		if (pinfo)
			gtk_widget_hide (config->priv->warning);
		else
			gtk_widget_show (config->priv->warning);
	}

	if (! config->priv->no_change_signal)
		g_signal_emit (config, gdaui_dsn_editor_signals[CHANGED], 0, NULL);
}
Ejemplo n.º 3
0
/**
 * gdaui_dsn_editor_get_dsn
 * @config:
 *
 *
 *
 * Returns: a pointer to the currently configured DSN (do not modify)
 */
const GdaDsnInfo *
gdaui_dsn_editor_get_dsn (GdauiDsnEditor *config)
{
	GdaDsnInfo *dsn_info;

	g_return_val_if_fail (GDAUI_IS_DSN_EDITOR (config), NULL);
	dsn_info = config->priv->dsn_info;

	g_free (dsn_info->provider); dsn_info->provider = NULL;
	g_free (dsn_info->cnc_string); dsn_info->cnc_string = NULL;
	g_free (dsn_info->description); dsn_info->description = NULL;
	g_free (dsn_info->auth_string); dsn_info->auth_string = NULL;
	g_free (dsn_info->name); dsn_info->name = NULL;
	dsn_info->name = g_strdup (config->priv->name);
	dsn_info->provider = g_strdup (gdaui_provider_selector_get_provider 
				       (GDAUI_PROVIDER_SELECTOR (config->priv->wprovider)));
	dsn_info->cnc_string = _gdaui_provider_spec_editor_get_specs (GDAUI_PROVIDER_SPEC_EDITOR (config->priv->dsn_spec));
	GtkTextBuffer *buf;
	GtkTextIter start, end;
	buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (config->priv->wdesc));
	gtk_text_buffer_get_start_iter (buf, &start);
	gtk_text_buffer_get_end_iter (buf, &end);
	dsn_info->description = gtk_text_buffer_get_text (buf, &start, &end, FALSE);
	dsn_info->auth_string = _gdaui_provider_auth_editor_get_auth (GDAUI_PROVIDER_AUTH_EDITOR (config->priv->dsn_auth));
	dsn_info->is_system = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (config->priv->is_system));

	return dsn_info;
}
Ejemplo n.º 4
0
static gboolean
settings_are_valid (GdauiLogin *login)
{
	GdauiLoginPrivate *priv = gdaui_login_get_instance_private (login);
	/* validate cnc information */
	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->rb_dsn))) {
		/* using a DSN */
		gchar *dsn;
		dsn = _gdaui_dsn_selector_get_dsn (GDAUI_DSN_SELECTOR (priv->dsn_selector));
		if (dsn)
			g_free (dsn);
		else
			return FALSE;
	}
	else {
		/* using a direct CNC string */
		const gchar *prov;
		prov = gdaui_provider_selector_get_provider (GDAUI_PROVIDER_SELECTOR (priv->prov_selector));
		if (!prov)
			return FALSE;

		if (! _gdaui_provider_spec_editor_is_valid (GDAUI_PROVIDER_SPEC_EDITOR (priv->cnc_params_editor)))
			return FALSE;
	}

	/* validate authentication */
	if (! _gdaui_provider_auth_editor_is_valid (GDAUI_PROVIDER_AUTH_EDITOR (priv->auth_widget)))
		return FALSE;

	return TRUE;
}
Ejemplo n.º 5
0
static void
dsn_entry_changed_cb (GdauiDsnSelector *sel, GdauiLogin *login)
{
	GdauiLoginPrivate *priv = gdaui_login_get_instance_private (login);
	gchar *dsn;
        GdaDsnInfo *info = NULL;
        dsn = _gdaui_dsn_selector_get_dsn (sel);

	if (dsn) {
		info = gda_config_get_dsn_info (dsn);
		g_free (dsn);
	}

	/* update prov_selector */
	g_signal_handlers_block_by_func (priv->prov_selector, G_CALLBACK (prov_entry_changed_cb), login);
	gdaui_provider_selector_set_provider (GDAUI_PROVIDER_SELECTOR (priv->prov_selector),
					      info ? info->provider : NULL);
	g_signal_handlers_unblock_by_func (priv->prov_selector, G_CALLBACK (prov_entry_changed_cb), login);

	/* update auth editor */
	_gdaui_provider_auth_editor_set_provider (GDAUI_PROVIDER_AUTH_EDITOR (priv->auth_widget),
						 info ? info->provider : NULL);
	_gdaui_provider_auth_editor_set_auth (GDAUI_PROVIDER_AUTH_EDITOR (priv->auth_widget),
					     info && info->auth_string ? info->auth_string : NULL);

	/* update spec editor */
	_gdaui_provider_spec_editor_set_provider (GDAUI_PROVIDER_SPEC_EDITOR (priv->cnc_params_editor),
						  info ? info->provider : NULL);
	_gdaui_provider_spec_editor_set_specs (GDAUI_PROVIDER_SPEC_EDITOR (priv->cnc_params_editor),
					       info ? info->cnc_string : NULL);

	if (priv->auth_widget)
		gtk_widget_grab_focus (priv->auth_widget);

	g_signal_emit (login, gdaui_login_signals [CHANGED], 0, settings_are_valid (login));
}
Ejemplo n.º 6
0
static void
gdaui_provider_spec_editor_get_property (GObject *object,
                                            guint param_id,
                                            GValue *value,
                                            GParamSpec *pspec)
{
	GdauiProviderSpecEditor *spec;
	spec = GDAUI_PROVIDER_SPEC_EDITOR (object);

	switch (param_id) {
	case PROP_PROVIDER:
		g_value_set_string (value, spec->priv->provider);
		break;
	default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
		break;
	}
}
Ejemplo n.º 7
0
static void
prov_entry_changed_cb (GdauiProviderSelector *sel, GdauiLogin *login)
{
	GdauiLoginPrivate *priv = gdaui_login_get_instance_private (login);
	const gchar *prov;
        
	g_signal_handlers_block_by_func (priv->dsn_selector, G_CALLBACK (dsn_entry_changed_cb), login);
	_gdaui_dsn_selector_set_dsn (GDAUI_DSN_SELECTOR (priv->dsn_selector), NULL);
	g_signal_handlers_unblock_by_func (priv->dsn_selector, G_CALLBACK (dsn_entry_changed_cb), login);

        prov = gdaui_provider_selector_get_provider (sel);
	_gdaui_provider_spec_editor_set_provider (GDAUI_PROVIDER_SPEC_EDITOR (priv->cnc_params_editor),
						 prov);
	_gdaui_provider_auth_editor_set_provider (GDAUI_PROVIDER_AUTH_EDITOR (priv->auth_widget),
						 prov);

	if (priv->auth_widget)
		gtk_widget_grab_focus (priv->auth_widget);

	g_signal_emit (login, gdaui_login_signals [CHANGED], 0, settings_are_valid (login));
}
Ejemplo n.º 8
0
/**
 * gdaui_login_get_connection_information:
 * @login: a #GdauiLogin object
 *
 * Get the information specified in @login as a pointer to a (read-only) #GdaDsnInfo.
 * If the connection is not specified by a DSN, then the 'name' attribute of the returned
 * #GdaDsnInfo will be %NULL, and otherwise it will contain the name of the selected DSN.
 *
 * Returns: (transfer none): a pointer to a (read-only) #GdaDsnInfo.
 *
 * Since: 4.2
 */
const GdaDsnInfo *
gdaui_login_get_connection_information (GdauiLogin *login)
{
	g_return_val_if_fail (GDAUI_IS_LOGIN (login), NULL);
	GdauiLoginPrivate *priv = gdaui_login_get_instance_private (login);

	clear_dsn_info (login);
	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->rb_dsn))) {
		GdaDsnInfo *info = NULL;
		gchar *dsn;
		dsn = _gdaui_dsn_selector_get_dsn (GDAUI_DSN_SELECTOR (priv->dsn_selector));
		if (dsn && *dsn)
			info = gda_config_get_dsn_info (dsn);
		g_free (dsn);
		if (info) {
			priv->dsn_info.name = g_strdup (info->name);
			if (info->provider)
				priv->dsn_info.provider = g_strdup (info->provider);
			if (info->description)
				priv->dsn_info.description = g_strdup (info->description);
			if (info->cnc_string)
				priv->dsn_info.cnc_string = g_strdup (info->cnc_string);
			priv->dsn_info.is_system = info->is_system;
		}
		priv->dsn_info.auth_string = _gdaui_provider_auth_editor_get_auth (GDAUI_PROVIDER_AUTH_EDITOR (priv->auth_widget));
	}
	else {
		const gchar *str;
		str = gdaui_provider_selector_get_provider (GDAUI_PROVIDER_SELECTOR (priv->prov_selector));
		if (str)
			priv->dsn_info.provider = g_strdup (str);
		priv->dsn_info.cnc_string = _gdaui_provider_spec_editor_get_specs (GDAUI_PROVIDER_SPEC_EDITOR (priv->cnc_params_editor));
		priv->dsn_info.auth_string = _gdaui_provider_auth_editor_get_auth (GDAUI_PROVIDER_AUTH_EDITOR (priv->auth_widget));
	}

	return &(priv->dsn_info);
}
Ejemplo n.º 9
0
/**
 * gdaui_dsn_editor_set_dsn
 * @editor: a #GdauiDsnEditor widget
 * @dsn_info: (allow-none): a #GdaDsnInfo pointer or %NULL
 *
 *
 * Requests that @editor update its contents with @dsn_info's contents
 */
void
gdaui_dsn_editor_set_dsn (GdauiDsnEditor *editor, const GdaDsnInfo *dsn_info)
{
	g_return_if_fail (GDAUI_IS_DSN_EDITOR (editor));
	editor->priv->no_change_signal = TRUE;

	if (dsn_info) {
		GdaProviderInfo *pinfo;
		pinfo = gda_config_get_provider_info (dsn_info->provider);

		GdkPixbuf *pix;
		pix = support_create_pixbuf_for_provider (pinfo);
		if (pix) {
			gtk_image_set_from_pixbuf (GTK_IMAGE (editor->priv->icon), pix);
			g_object_unref (pix);
		}
		else
			gtk_image_clear (GTK_IMAGE (editor->priv->icon));

		if (pinfo)
			gtk_widget_hide (editor->priv->warning);
		else
			gtk_widget_show (editor->priv->warning);

		gchar *tmp;
		tmp = g_markup_printf_escaped ("<big><b>%s</b></big>", dsn_info->name);
		gtk_label_set_markup (GTK_LABEL (editor->priv->wname), tmp);
		g_free (tmp);

		g_free (editor->priv->name);
		editor->priv->name = g_strdup (dsn_info->name);
		gdaui_provider_selector_set_provider (GDAUI_PROVIDER_SELECTOR (editor->priv->wprovider), 
						      dsn_info->provider);
		_gdaui_provider_spec_editor_set_provider (GDAUI_PROVIDER_SPEC_EDITOR (editor->priv->dsn_spec),
							 dsn_info->provider);
		_gdaui_provider_spec_editor_set_specs (GDAUI_PROVIDER_SPEC_EDITOR (editor->priv->dsn_spec),
						      dsn_info->cnc_string);
		gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (editor->priv->wdesc)),
					  dsn_info->description ? dsn_info->description : "", -1);
		_gdaui_provider_auth_editor_set_provider (GDAUI_PROVIDER_AUTH_EDITOR (editor->priv->dsn_auth),
							 dsn_info->provider);
		_gdaui_provider_auth_editor_set_auth (GDAUI_PROVIDER_AUTH_EDITOR (editor->priv->dsn_auth),
						     dsn_info->auth_string);
		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->is_system), dsn_info->is_system);
		
		if (dsn_info->is_system && !gda_config_can_modify_system_config ()) {
			gtk_widget_set_sensitive (editor->priv->wprovider, FALSE);
			gtk_text_view_set_editable (GTK_TEXT_VIEW (editor->priv->wdesc), pinfo ? TRUE : FALSE);
			gtk_widget_set_sensitive (editor->priv->dsn_spec, FALSE);
			gtk_widget_set_sensitive (editor->priv->dsn_auth, FALSE);
			gtk_widget_set_sensitive (editor->priv->is_system, FALSE);
		}
		else {
			gtk_widget_set_sensitive (editor->priv->wprovider, pinfo ? TRUE : FALSE);
			gtk_text_view_set_editable (GTK_TEXT_VIEW (editor->priv->wdesc), pinfo ? TRUE : FALSE);
			gtk_widget_set_sensitive (editor->priv->dsn_spec, TRUE);
			gtk_widget_set_sensitive (editor->priv->dsn_auth, TRUE);
			gtk_widget_set_sensitive (editor->priv->is_system,
						  pinfo && gda_config_can_modify_system_config () ? TRUE : FALSE);
		}
	}
	else {
		gtk_image_clear (GTK_IMAGE (editor->priv->icon));
		gtk_label_set_text (GTK_LABEL (editor->priv->wname), "");
		gdaui_provider_selector_set_provider (GDAUI_PROVIDER_SELECTOR (editor->priv->wprovider), NULL);
		_gdaui_provider_spec_editor_set_provider (GDAUI_PROVIDER_SPEC_EDITOR (editor->priv->dsn_spec), NULL);
		gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (editor->priv->wdesc)), "", -1);
		_gdaui_provider_auth_editor_set_provider (GDAUI_PROVIDER_AUTH_EDITOR (editor->priv->dsn_auth), NULL);
		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->is_system), FALSE);

		gtk_widget_set_sensitive (editor->priv->wprovider, FALSE);
		gtk_text_view_set_editable (GTK_TEXT_VIEW (editor->priv->wdesc), FALSE);
		gtk_widget_set_sensitive (editor->priv->dsn_spec, FALSE);
		gtk_widget_set_sensitive (editor->priv->dsn_auth, FALSE);
		gtk_widget_set_sensitive (editor->priv->is_system, FALSE);
	}

	editor->priv->no_change_signal = FALSE;
	g_signal_emit (editor, gdaui_dsn_editor_signals[CHANGED], 0, NULL);
}
Ejemplo n.º 10
0
static void
provider_changed_cb (G_GNUC_UNUSED GtkWidget *combo, GdauiDsnAssistant *assistant)
{
	GdaServerOperation *op;
	const gchar *provider;

	/* clean any previous Provider specific stuff */
	if (assistant->priv->newdb_params) {
		gtk_widget_destroy (assistant->priv->newdb_params);
		assistant->priv->newdb_params = NULL;
	}

	if (assistant->priv->create_db_op) {
		g_object_unref (assistant->priv->create_db_op);
		assistant->priv->create_db_op = NULL;
	}

	if (!assistant->priv->size_group)
		assistant->priv->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);

	/* is the database creation supported by the chosen provider? */
	op = get_specs_database_creation (assistant);
	if (op) {
		assistant->priv->newdb_params = g_object_new (GDAUI_TYPE_SERVER_OPERATION, 
							      "hide-single-header", TRUE,
							      "server-operation", op, NULL);
		gtk_widget_show (assistant->priv->newdb_params);
		gtk_container_add (GTK_CONTAINER (assistant->priv->newdb_box), 
				   assistant->priv->newdb_params);
		assistant->priv->create_db_op = op;
		gtk_widget_set_sensitive (assistant->priv->choose_toggle, TRUE);
	}
	else {
		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (assistant->priv->choose_toggle),
					      FALSE);
		gtk_widget_set_sensitive (assistant->priv->choose_toggle, FALSE);
	}

	/* dsn spec for the selected provider */
	provider = gdaui_provider_selector_get_provider (GDAUI_PROVIDER_SELECTOR (assistant->priv->general_provider));
	g_assert (provider);
	if (!assistant->priv->provider_detail) {
		assistant->priv->provider_detail = _gdaui_provider_spec_editor_new (provider);
		gtk_box_pack_start (GTK_BOX (assistant->priv->provider_container),
				    assistant->priv->provider_detail, TRUE, TRUE, 0);
		gtk_widget_show (assistant->priv->provider_detail);
		g_signal_connect (assistant->priv->provider_detail, "changed",
				  G_CALLBACK (dsn_spec_changed_cb), assistant);
		_gdaui_provider_spec_editor_add_to_size_group (GDAUI_PROVIDER_SPEC_EDITOR (assistant->priv->provider_detail),
							       assistant->priv->size_group,
							       GDAUI_BASIC_FORM_LABELS);
	}
	else
		_gdaui_provider_spec_editor_set_provider (GDAUI_PROVIDER_SPEC_EDITOR (assistant->priv->provider_detail), provider);

	/* dsn authentication for the selected provider */
	if (!assistant->priv->auth_detail) {
		assistant->priv->auth_detail = _gdaui_provider_auth_editor_new (provider);
		gtk_box_pack_start (GTK_BOX (assistant->priv->auth_container),
				    assistant->priv->auth_detail, TRUE, TRUE, 0);
		gtk_widget_show (assistant->priv->auth_detail);
		g_signal_connect (assistant->priv->auth_detail, "changed",
				  G_CALLBACK (dsn_auth_changed_cb), assistant);
		_gdaui_provider_auth_editor_add_to_size_group (GDAUI_PROVIDER_AUTH_EDITOR (assistant->priv->auth_detail),
							       assistant->priv->size_group,
							       GDAUI_BASIC_FORM_LABELS);
	}
	else
		_gdaui_provider_auth_editor_set_provider (GDAUI_PROVIDER_AUTH_EDITOR (assistant->priv->auth_detail), provider);
}
Ejemplo n.º 11
0
static void
assistant_applied_cb (GtkAssistant *assist, G_GNUC_UNUSED gpointer data)
{
	gboolean allok = TRUE;
	GString *cnc_string = NULL;
	GdauiDsnAssistant *assistant = (GdauiDsnAssistant *) assist;

	g_return_if_fail (GDAUI_IS_DSN_ASSISTANT (assistant));

	/* clear the internal dsn_info */
	if (assistant->priv->dsn_info) {
		data_source_info_free (assistant->priv->dsn_info);
		assistant->priv->dsn_info = NULL;
	}

	/* New database creation first */
	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (assistant->priv->choose_toggle))) {
		if (!gda_server_operation_is_valid (assistant->priv->create_db_op, NULL, NULL)) {
			_gdaui_utility_show_error (NULL, _("Missing mandatory information, to create database"));
			gtk_assistant_set_current_page (assist, PAGE_CREATE_DB_INFO);
			return;
		}
		else {
			GdaProviderInfo *prov_info;
			GSList *dsn_params;
			GError *error = NULL;

			allok = gda_server_operation_perform_create_database (assistant->priv->create_db_op, NULL, &error);
			if (!allok) {
				gchar *str;
				str = g_strdup_printf (_("Error creating database: %s"), 
						       error && error->message ? error->message : _("Unknown error"));
				_gdaui_utility_show_error (NULL, str);
				g_free (str);
				
				gtk_assistant_set_current_page (assist, PAGE_CREATE_DB_INFO);
				return;
			}
			
			/* make the connection string for the data source */
			prov_info = gda_config_get_provider_info (gdaui_provider_selector_get_provider 
								  (GDAUI_PROVIDER_SELECTOR (assistant->priv->general_provider)));
			g_return_if_fail (prov_info);
			for (dsn_params = prov_info->dsn_params->holders; dsn_params; dsn_params = dsn_params->next) {
				GdaHolder *param = GDA_HOLDER (dsn_params->data);
				const GValue *value;
				
				value = gda_server_operation_get_value_at (assistant->priv->create_db_op,
									   "/DB_DEF_P/%s",
									   gda_holder_get_id (param));
				if (!value)
					value = gda_server_operation_get_value_at (assistant->priv->create_db_op,
										   "/SERVER_CNX_P/%s",
										   gda_holder_get_id (param));
				
				if (value && !gda_value_is_null ((GValue *) value)) {
					gchar *str;

					if (dsn_params == prov_info->dsn_params->holders)
						cnc_string = g_string_new ("");
					else
						g_string_append (cnc_string, ";");
					str = gda_value_stringify ((GValue *) value);
					g_string_append_printf (cnc_string, "%s=%s", gda_holder_get_id (param), str);
					g_free (str);
				}
			}
		}
	}

	/* Data source declaration */
	if (allok) {
		assistant->priv->dsn_info = g_new0 (GdaDsnInfo, 1);
		assistant->priv->dsn_info->name = g_strdup (gtk_entry_get_text (GTK_ENTRY (assistant->priv->general_name)));
		assistant->priv->dsn_info->provider = g_strdup (
					 gdaui_provider_selector_get_provider (
					 GDAUI_PROVIDER_SELECTOR (assistant->priv->general_provider)));
		if (cnc_string) {
			assistant->priv->dsn_info->cnc_string = cnc_string->str;
			g_string_free (cnc_string, FALSE);
		}
		else
			assistant->priv->dsn_info->cnc_string = _gdaui_provider_spec_editor_get_specs 
				(GDAUI_PROVIDER_SPEC_EDITOR (assistant->priv->provider_detail));
		assistant->priv->dsn_info->description =
			g_strdup (gtk_entry_get_text (GTK_ENTRY (assistant->priv->general_description)));
		assistant->priv->dsn_info->auth_string = NULL;
		if (assistant->priv->auth_detail)
			assistant->priv->dsn_info->auth_string =
				_gdaui_provider_auth_editor_get_auth (GDAUI_PROVIDER_AUTH_EDITOR (assistant->priv->auth_detail));
		if (gda_config_can_modify_system_config ())
			assistant->priv->dsn_info->is_system = gtk_toggle_button_get_active 
				(GTK_TOGGLE_BUTTON (assistant->priv->general_is_system));
		else
			assistant->priv->dsn_info->is_system = FALSE;
	}

	/* notify listeners */
	g_signal_emit (G_OBJECT (assistant), config_assistant_signals[FINISHED], 0, !allok);
}