r22814 - gnucash/trunk/src/import-export/csv-import - Replace GtkLabel with a GtkTextView within a GtkScrolledWindow for error summary for csv account import so that window doesn't get larger than screen with large error messages.
J. Alex Aycinena
alex.aycinena at code.gnucash.org
Wed Feb 27 18:31:36 EST 2013
Author: alex.aycinena
Date: 2013-02-27 18:31:35 -0500 (Wed, 27 Feb 2013)
New Revision: 22814
Trac: http://svn.gnucash.org/trac/changeset/22814
Modified:
gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.c
gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.glade
gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.h
Log:
Replace GtkLabel with a GtkTextView within a GtkScrolledWindow for error summary for csv account import so that window doesn't get larger than screen with large error messages.
Modified: gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.c
===================================================================
--- gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.c 2013-02-25 10:13:26 UTC (rev 22813)
+++ gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.c 2013-02-27 23:31:35 UTC (rev 22814)
@@ -410,10 +410,13 @@
if (!g_strcmp0(info->error, "") == 0)
{
+ GtkTextBuffer *buffer;
+
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (info->summary_error_view));
text = g_strdup_printf(gettext ("Import completed but with errors!\n\nThe number of Accounts added was %u and "
"updated was %u.\n\nSee below for errors..." ), info->num_new, info->num_updates );
errtext = g_strdup_printf ( "%s", info->error);
- gtk_label_set_text (GTK_LABEL(info->summary_error), errtext);
+ gtk_text_buffer_set_text (buffer, errtext, -1);
g_free(errtext);
g_free(info->error);
}
@@ -604,7 +607,7 @@
info->finish_label = GTK_WIDGET(gtk_builder_get_object(builder, "end_page"));
/* Summary Page */
info->summary_label = GTK_WIDGET(gtk_builder_get_object(builder, "summary_label"));
- info->summary_error = GTK_WIDGET(gtk_builder_get_object(builder, "summary_error"));
+ info->summary_error_view = GTK_WIDGET(gtk_builder_get_object(builder, "summary_error_view"));
g_signal_connect (G_OBJECT(window), "destroy",
G_CALLBACK (csv_import_assistant_destroy_cb), info);
Modified: gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.glade
===================================================================
--- gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.glade 2013-02-25 10:13:26 UTC (rev 22813)
+++ gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.glade 2013-02-27 23:31:35 UTC (rev 22814)
@@ -341,14 +341,25 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="summary_error">
+ <object class="GtkScrolledWindow" id="summary_error_scrolledwindow">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="wrap">True</property>
+ <property name="border_width">1</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">etched-in</property>
+ <child>
+ <object class="GtkTextView" id="summary_error_view">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_margin">2</property>
+ <property name="right_margin">2</property>
+ </object>
+ </child>
</object>
<packing>
<property name="expand">True</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
Modified: gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.h
===================================================================
--- gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.h 2013-02-25 10:13:26 UTC (rev 22813)
+++ gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.h 2013-02-27 23:31:35 UTC (rev 22814)
@@ -49,7 +49,7 @@
GtkWidget *header_row_spin;
GtkWidget *finish_label;
GtkWidget *summary_label;
- GtkWidget *summary_error;
+ GtkWidget *summary_error_view;
gchar *starting_dir;
gchar *file_name;
More information about the gnucash-changes
mailing list