[libgda] GdaBrowser: small UI corrections in the data manager perspective



commit f92b1d7d4fe3737b3669cf4bc57afa9ecdb20057
Author: Vivien Malerba <malerba gnome-db org>
Date:   Mon Sep 6 21:14:11 2010 +0200

    GdaBrowser: small UI corrections in the data manager perspective

 tools/browser/data-manager/data-source-editor.c |   13 +++++++------
 tools/browser/data-manager/data-source.c        |    2 +-
 2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/tools/browser/data-manager/data-source-editor.c b/tools/browser/data-manager/data-source-editor.c
index 1026d33..4bf1def 100644
--- a/tools/browser/data-manager/data-source-editor.c
+++ b/tools/browser/data-manager/data-source-editor.c
@@ -105,6 +105,12 @@ data_source_editor_init (DataSourceEditor *editor)
 	g_signal_connect (editor->priv->attributes, "holder-changed",
 			  G_CALLBACK (attribute_changed_cb), editor);
 
+	GtkWidget *form;
+	form = gdaui_basic_form_new (editor->priv->attributes);
+	editor->priv->form = GDAUI_BASIC_FORM (form);
+	gtk_box_pack_start (GTK_BOX (editor), form, TRUE, TRUE, 0);
+	gtk_widget_show (form);
+
 	GdaHolder *holder;
 	GValue *value;
 	holder = gda_set_get_holder (editor->priv->attributes, "id");
@@ -112,6 +118,7 @@ data_source_editor_init (DataSourceEditor *editor)
 		      "description",
 		      _("Data source's ID\n"
 			"(as referenced by other data sources)"), NULL);
+	gdaui_basic_form_entry_set_editable (GDAUI_BASIC_FORM (form), holder, FALSE);
 
 	holder = gda_set_get_holder (editor->priv->attributes, "descr");
 	g_object_set ((GObject*) holder, "name", _("Description"),
@@ -128,12 +135,6 @@ data_source_editor_init (DataSourceEditor *editor)
 	value = gda_value_new_from_string ("text:PROG_LANG=gda-sql", G_TYPE_STRING);
         gda_holder_set_attribute_static (holder, GDAUI_ATTRIBUTE_PLUGIN, value);
         gda_value_free (value);
-
-	GtkWidget *form;
-	form = gdaui_basic_form_new (editor->priv->attributes);
-	editor->priv->form = GDAUI_BASIC_FORM (form);
-	gtk_box_pack_start (GTK_BOX (editor), form, TRUE, TRUE, 0);
-	gtk_widget_show (form);
 }
 
 static void
diff --git a/tools/browser/data-manager/data-source.c b/tools/browser/data-manager/data-source.c
index 7c143a2..1723777 100644
--- a/tools/browser/data-manager/data-source.c
+++ b/tools/browser/data-manager/data-source.c
@@ -773,7 +773,7 @@ data_source_set_params (DataSource *source, GdaSet *params)
 			GdaHolder *bind = NULL;
 			if (params)
 				bind = gda_set_get_holder (params, gda_holder_get_id (holder));
-			if (gda_holder_set_bind (holder, bind, NULL))
+			if ((holder != bind) && gda_holder_set_bind (holder, bind, NULL))
 				bound = TRUE;
 		}
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]