Commit Graph
7 Commits
Author SHA1 Message Date
J. Alex Aycinena 4516270399 Correct memory leaks found with valgrind
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20378 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-03-05 23:29:12 +00:00
J. Alex Aycinena c17a907f08 Correct memory leak found with valgrind
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20364 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-03-03 00:30:10 +00:00
J. Alex Aycinena 1b9023e78f Modify Tax Info on Account Page to display or not display sub-account info based on whether row is expanded.
Re-apply changes reverted in r20251. The only difference between this commit and r20207 is that, contrary to the recommendation given in gnc-tree-view.h, "Use GNC_TREE_VIEW_COLUMN_DATA_NONE if you plan on using a non-model data source for this column", it cobtinues to use "GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO". Using "GNC_TREE_VIEW_COLUMN_DATA_NONE" generates problems later in the "gnc_tree_view_add_text_column" routine when it tries to set up sorting for the column ("CRIT <Gtk> gtk_tree_sortable_set_sort_func: assertion `sort_column_id >= 0' failed").

Define a new column, GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO_SUB_ACCT, in gnc-tree-model-account.c filled with gnc_ui_account_get_tax_info_sub_acct_string.

Modify gnc-tree-view-account.c to define a tax_info_data_func that displays only the the data in the GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO model column if the row is expanded; otherwise it combines it with the data in the GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO_SUB_ACCT model column. Modily the view creation function to use the new tax_info_data_func for the text after having first set it to GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO to prevent the problem mentioned above, thereby overriding it.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20359 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-03-01 23:09:37 +00:00
J. Alex Aycinena 9968d038a2 Modify Tax Info on Account Page to display or not display sub-account info based on whether row is expanded.
Revert changes made in gnc-ui-util.c in rev 20039 and instead put those changes in new function: gnc_ui_account_get_tax_info_sub_acct_string.

Define a new column, GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO_SUB_ACCT, in gnc-tree-model-account.c filled with gnc_ui_account_get_tax_info_sub_acct_string.

Modify gnc-tree-view-account.c to define a tax_info_data_func that displays only the the data in the GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO model column if the row is expanded; otherwise it combines it with the data in the GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO_SUB_ACCT model column. Modily the view creation function to use the new tax_info_data_func.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20207 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-30 20:34:55 +00:00
J. Alex Aycinena f70cb1fe2f Fix typo
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20058 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-11 00:15:02 +00:00
J. Alex Aycinena 04078234c0 Add info about sub-accounts to Tax Info column on Accounts page.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20039 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-08 23:52:13 +00:00
J. Alex Aycinena c44254c424 Remove leading character N from tax code, but only if it is there, and remove leading blank character when no tax code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19616 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-09-27 15:58:52 +00:00