[libgda/LIBGDA_5.0] Data entry tester: fixed expand issues with data entries



commit c636b74f2bb526c0487821a0c4b909fa7402ab35
Author: Vivien Malerba <malerba gnome-db org>
Date:   Wed Jan 18 18:40:59 2012 +0100

    Data entry tester: fixed expand issues with data entries

 testing/gdaui-test-data-entries.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/testing/gdaui-test-data-entries.c b/testing/gdaui-test-data-entries.c
index c76e750..4f6c6eb 100644
--- a/testing/gdaui-test-data-entries.c
+++ b/testing/gdaui-test-data-entries.c
@@ -718,7 +718,7 @@ build_basic_test_for_gtype (GdaDataHandler *dh, GType type, const gchar *plugin_
 	label = gtk_label_new (_("Current flags: "));
 	gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
 	gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0);
-	gtk_widget_show (label);	
+	gtk_widget_show (label);
 
 	label = gtk_label_new (_("--"));
 	gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
@@ -780,7 +780,10 @@ build_basic_test_for_gtype (GdaDataHandler *dh, GType type, const gchar *plugin_
 	entry = GTK_WIDGET (gdaui_new_data_entry (type, plugin_name));
 	g_object_set (G_OBJECT (entry), "handler", dh, NULL);
 
-	gtk_table_attach (GTK_TABLE (table), entry, 0, 2, 5, 6, GTK_FILL | GTK_EXPAND, 0, 0, 0);
+	if (expand)
+		gtk_table_attach_defaults (GTK_TABLE (table), entry, 0, 2, 5, 6);
+	else
+		gtk_table_attach (GTK_TABLE (table), entry, 0, 2, 5, 6, GTK_FILL | GTK_EXPAND, 0, 0, 0);
 	gtk_widget_show (entry);
 	button = gtk_button_new_with_label (_("Set as original"));
 	g_object_set_data (G_OBJECT (button), "entry", entry);
@@ -793,7 +796,10 @@ build_basic_test_for_gtype (GdaDataHandler *dh, GType type, const gchar *plugin_
 	entry = GTK_WIDGET (gdaui_new_data_entry (type, plugin_name));
 	g_object_set (G_OBJECT (entry), "handler", dh, NULL);
 
-	gtk_table_attach (GTK_TABLE (table), entry, 0, 2, 6, 7, GTK_FILL | GTK_EXPAND, 0, 0, 0);
+	if (expand)
+		gtk_table_attach_defaults (GTK_TABLE (table), entry, 0, 2, 6, 7);
+	else
+		gtk_table_attach (GTK_TABLE (table), entry, 0, 2, 6, 7, GTK_FILL | GTK_EXPAND, 0, 0, 0);
 	gtk_widget_show (entry);
 	button = gtk_button_new_with_label (_("Set as default"));
 	g_object_set_data (G_OBJECT (button), "entry", entry);



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