[libgda/LIBGDA_4.2] LibgdaUI: corrections
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/LIBGDA_4.2] LibgdaUI: corrections
- Date: Sun, 24 Jul 2011 21:24:19 +0000 (UTC)
commit 97b718ba686e10c7aae93024053fb07d375f72fe
Author: Vivien Malerba <malerba gnome-db org>
Date: Sun Jul 24 19:09:00 2011 +0200
LibgdaUI: corrections
libgda-ui/gdaui-raw-form.c | 1 +
libgda-ui/internal/utility.c | 38 +++++---------------------------------
2 files changed, 6 insertions(+), 33 deletions(-)
---
diff --git a/libgda-ui/gdaui-raw-form.c b/libgda-ui/gdaui-raw-form.c
index c7beeed..a214639 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 6d858e7..79c6984 100644
--- a/libgda-ui/internal/utility.c
+++ b/libgda-ui/internal/utility.c
@@ -394,11 +394,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 {
@@ -417,39 +417,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);
-#if GTK_CHECK_VERSION(2,18,0)
+ 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);
-#else
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), exp, TRUE, TRUE, 0);
-#endif
- 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]