r21400 - gnucash/trunk/src/import-export/csv - Bug #660875 - Make columns have minumum width in import dialog.
Mike Evans
mikee at code.gnucash.org
Sat Oct 8 15:19:16 EDT 2011
Author: mikee
Date: 2011-10-08 15:19:16 -0400 (Sat, 08 Oct 2011)
New Revision: 21400
Trac: http://svn.gnucash.org/trac/changeset/21400
Modified:
gnucash/trunk/src/import-export/csv/gnc-csv-import.c
Log:
Bug #660875 - Make columns have minumum width in import dialog.
Modified: gnucash/trunk/src/import-export/csv/gnc-csv-import.c
===================================================================
--- gnucash/trunk/src/import-export/csv/gnc-csv-import.c 2011-10-08 19:16:25 UTC (rev 21399)
+++ gnucash/trunk/src/import-export/csv/gnc-csv-import.c 2011-10-08 19:19:16 UTC (rev 21400)
@@ -41,6 +41,7 @@
#include "gnc-csv-gnumeric-popup.h"
#define GCONF_SECTION "dialogs/import/csv"
+#define MIN_COL_WIDTH 70
static QofLogModule log_module = GNC_MOD_IMPORT;
@@ -308,11 +309,15 @@
for (i = 0; i < ncols - 1; i++)
{
gint col_width; /* The width of the column in preview->treeview. */
+ GtkTreeViewColumn* pcol;
GtkTreeViewColumn* ccol; /* The corresponding column in preview->ctreeview. */
/* Get the width. */
col_width = gtk_tree_view_column_get_width(gtk_tree_view_get_column(preview->treeview, i));
-
+ /* Set the minumum width for a column so that drop down selector can be seen. */
+ if (col_width < MIN_COL_WIDTH){col_width = MIN_COL_WIDTH;}
+ pcol = gtk_tree_view_get_column(preview->treeview, i);
+ gtk_tree_view_column_set_min_width(pcol, col_width);
/* Set ccol's width the same. */
ccol = gtk_tree_view_get_column(preview->ctreeview, i);
gtk_tree_view_column_set_min_width(ccol, col_width);
More information about the gnucash-changes
mailing list