[libgda] LibgdaUI: corrections



commit b5bcafb496aab9ad32824fb55f56c2c7bd062c05
Author: Vivien Malerba <malerba gnome-db org>
Date:   Tue Jul 19 22:27:11 2011 +0200

    LibgdaUI: corrections

 libgda-ui/gdaui-raw-form.c   |    1 +
 libgda-ui/internal/utility.c |   34 +++++-----------------------------
 2 files changed, 6 insertions(+), 29 deletions(-)
---
diff --git a/libgda-ui/gdaui-raw-form.c b/libgda-ui/gdaui-raw-form.c
index 0a86eaa..c47d871 100644
--- a/libgda-ui/gdaui-raw-form.c
+++ b/libgda-ui/gdaui-raw-form.c
@@ -574,6 +574,7 @@ proxy_reset_cb (GdaDataProxy *proxy, GdauiRawForm *form)
 	g_object_ref (G_OBJECT (proxy));
 	g_object_set (G_OBJECT (form), "model", proxy, NULL);
 	g_object_unref (G_OBJECT (proxy));
+	g_signal_emit_by_name (G_OBJECT (form), "selection-changed");
 }
 
 static void
diff --git a/libgda-ui/internal/utility.c b/libgda-ui/internal/utility.c
index 1a7acb1..75527d9 100644
--- a/libgda-ui/internal/utility.c
+++ b/libgda-ui/internal/utility.c
@@ -369,11 +369,11 @@ create_data_error_dialog (GdauiDataProxy *form, gboolean with_question, gboolean
 	if (can_discard) {
 		msg1 = _("Current modified data is invalid");
 		if (with_question)
-			msg2 =_("You may now choose to correct it, or to discard\n"
+			msg2 =_("You may now choose to correct it, or to discard "
 				"the modifications.\n\n"
 				"What do you wan to do?");
 		else
-			msg2 = _("please correct it and try again, or discard\n"
+			msg2 = _("please correct it and try again, or discard "
 				 "the modifications.");
 	}
 	else {
@@ -392,35 +392,11 @@ create_data_error_dialog (GdauiDataProxy *form, gboolean with_question, gboolean
 						  "<b>%s:</b>\n\n%s", msg1, msg2);
 
 	if (filled_error && filled_error->message) {
-		GtkWidget *exp, *sw, *view;
-		GtkTextBuffer *buffer;
-		GtkTextIter start, end;
-		GtkTextTag *tag;
-		
-		exp = gtk_expander_new (_("Error details"));
-
-		sw = gtk_scrolled_window_new (NULL, NULL);
-		gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
-						GTK_POLICY_AUTOMATIC,
-						GTK_POLICY_AUTOMATIC);
+		GtkWidget *label;
 
-		view = gtk_text_view_new ();
-		buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
-		gtk_text_buffer_set_text (buffer, filled_error->message, -1);
-						
-		/* Use a tag to change the color for just one part of the widget */
-		tag = gtk_text_buffer_create_tag (buffer, "monospace",
-						  "family", "monospace", NULL);
-		gtk_text_buffer_get_bounds (buffer, &start, &end);
-		gtk_text_buffer_apply_tag (buffer, tag, &start, &end);
-		
-		gtk_container_add (GTK_CONTAINER (sw), view);
-		gtk_container_add (GTK_CONTAINER (exp), sw);
+		label = gtk_label_new (filled_error->message);
 		gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
-				    exp, TRUE, TRUE, 0);
-		gtk_widget_show_all (exp);
-
-		gtk_window_set_resizable (GTK_WINDOW (dlg), TRUE);
+				    label, TRUE, TRUE, 0);
 	}
 
 	return dlg;



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