Commit Graph
51 Commits
Author SHA1 Message Date
Charles Day 669470ad48 Bug #539829: Make sure msg gets assigned before it can get dereferenced.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17248 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-24 22:08:12 +00:00
Charles Day e58209bf8f Some minor corrections to the doxygen documentation for progress-dialog.h.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17247 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-24 19:34:32 +00:00
Charles Day 3b596cbfff A small correction to r17245 for a QIF importer error message. I forgot to mention in the log that r17245 includes many added or improved QIF importer error and warning messages. Should help users in debugging their own QIF files.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17246 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-23 20:09:14 +00:00
Charles Day 385a3342fd The following changes are included:
-Add many new features to the progress dialog API, including support for n levels of suboperations. Fully compatible with existing code.
-Add doxygen documentation for the progress dialog API (none previously existed).
-Add a progress bar page to the QIF importer with pause and cancel functions for the loading and parsing phases.
-Log loading and parsing error messages on the page instead of using popups, which resolves bug #309359.
-Add a pair of new procedures to the library of Scheme string routines.
-Finally, some miscellaneous QIF importer clean up.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17245 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-23 18:46:34 +00:00
Charles Day 894c0f20a6 Fix Scheme logging bug in core-utils by treating strings as generic strings rather than format strings.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17214 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-11 15:37:50 +00:00
Charles Day d2683f020f Scheme: Send backtraces to the gnucash.trace log as well as the console.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17209 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-10 16:50:35 +00:00
Charles Day 5743752704 QIF Import: 10x improvement in file loading performance. Line numbers added for message logging.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17208 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-10 03:30:43 +00:00
Charles Day e7bb4ac09f QIF Import: Fix support for multi-byte account separators.
In doing so, a number of reusable Scheme string manipulation procedures were written and placed in string.scm. These are now available to all Scheme code by automatic inclusion in main.scm.

The new Scheme procedures are:
gnc:string-rcontains    (a variation on string-contains)
gnc:substring-count     (a variation on string-count)
gnc:substring-split     (a variation on string-split)
gnc:substring-replace   (search/replace a substring)
gnc:string-replace-char (search/replace a character)
gnc:string-delete-chars (delete a variety of characters)

Finally, the custom version of string-split was removed because Guile 1.4 is no longer supported and later versions come with this procedure.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17191 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-06 16:46:03 +00:00
Charles Day 9e7438bfd5 QIF Import: Skip over blank category mapping pages. Also some cleanup:
-Centralize preparation of mapping pages (eliminating several callbacks)
-Reorder functions to make forward declarations unnecessary
-Eliminate dead function gnc_ui_qif_import_memo_next_cb()
-Make widget spacing consistent on mapping pages
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17187 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-02 19:40:29 +00:00
Charles Day f7447960c1 Bug #515163: QIF importer no longer asks for mappings that will never get used.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17186 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-01 19:31:26 +00:00
Charles Day 26a8c73c70 Add Charles Day to the AUTHORS list.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17182 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-05-30 16:23:03 +00:00
Charles Day 8ef7e9cd99 Bug #535407: Stop the QIF importer from crashing GnuCash when an invalid or unsupported date format is found.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17181 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-05-29 21:13:24 +00:00
Charles Day d8eac7b083 QIF Import: Add support for importing to A/R and A/P account types, which were previously unknown to the importer. I also had to adjust a function in the engine's Account API that caused imported accounts trees to not merge properly in rare cases where one an existing GnuCash account has a NULL string pointer but an importer-created account has an empty string instead. This situation arises as a side effect of using SWIG, which doesn't let Scheme distinguish between NULL and an empty string (a string containing only NUL).
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17180 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-05-29 15:23:56 +00:00
Charles Day 8ee9abc9f1 Revision to r17178 for an unintended change to the file's introductory comments.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17179 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-05-28 16:56:08 +00:00
Charles Day b9a3f6a81f Reporting: Prevent GnuCash from crashing if a report's option generating procedure causes a Scheme exception. Also fix a typo of "names" vs. "namer".
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17178 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-05-28 15:47:49 +00:00
Charles Day 7d8230ad77 Eliminate requests to translate several phrases that are never displayed.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17164 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-05-20 16:06:48 +00:00
Charles Day 55483496a4 Bug #475980: Fix the labeling of several QIF importer pages.
The account, category, and memo matching pages have been redesigned to better comply with the HIG:
1. The labels that told (sometimes incorrectly) which page comes next are gone.
2. The lists now offer a mnemonic for keyboard navigation.
3. A count of selected matches is now indicated by a label.
4. A "Change" button has been added as a more obvious alternative to double-clicking.

On the currency page
1. The label that told (sometimes incorrectly) which page comes next is gone.
2. The remaining labels have been simplified.
3. A mnemonic is now offered for keyboard navigation.

Finally, some function names have been adjusted for consistency.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17162 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-05-18 22:20:21 +00:00
Charles Day 08deb71541 Bug #514210: This fixes a QIF import bug introduced in r17156 which prevented users from creating new accounts while mapping accounts. It also fixes several GUI annoyances:
1. The tree now automatically expands to show the currently selected account.
 2. The new account dialog's OK button is now activated by the Enter key.
 3. Focus returns to the account tree when the new account dialog is closed.
 4. Creation of empty account names is prevented.

Finally, a memory leak has been fixed and many new comments have been added.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17157 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-05-16 22:14:25 +00:00
Charles Day 23b3f81410 Bug #514210: Allow multiple rows to be selected and remapped on QIF Import
account mapping pages. Also includes many whitespace adjustments.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17156 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-05-14 02:49:29 +00:00
Charles Day 54f7aed224 Bug #336192: The QIF importer now allows new namespaces to be entered by the
user when defining new securities. New namespaces become available for
selection in all security pages. Also includes fixes for several memory leaks
and mismatched type definitions.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17150 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-05-11 16:56:34 +00:00
Charles Day d9ad51488a Bug #511231: QIF importer now takes into account any provided QIF security type
when determining a default namespace for new commodities. Previously saved
security mappings for the same symbol are also considered, if available.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17090 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-04-18 01:55:02 +00:00
Charles Day 53b254e316 Bug #512208: Upon cancellation or failure, the QIF importer now removes any new
commodities that have been created as part of the import process. In addition,
any new accounts, splits, and transactions are explicitly destroyed to avoid
leaking memory and potentially leaving splits in an Imbalance account. Also
includes some improvements to the QIF file format documentation.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17088 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-04-16 21:26:57 +00:00
Charles Day f053c59549 Add a risk-reduction measure to xaccAccountStagedTransactionTraversal() in case
of a naughty thunk. Add warnings to doxygen documentation for all Account.h
functions with TransactionCallback parameters.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17087 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-04-16 18:00:53 +00:00
Charles Day e2c8a2037b Bug #527886: Add support for QIF numeric formats of 12'345.67 as produced by
Quicken 4. Also support 12'345,67 for completeness. Added documentation for
this format, along with investment 'N' lines. Added two new string manipulation
utility procedures for simplification. Mild whitespace and readability cleanup.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17086 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-04-14 17:09:04 +00:00
Charles Day 051fb2181d Bug #523194: Fixed QIF importer so that if the user enters a combination of
namespace & mnemonic that matches an existing commodity, the existing commodity
will be used. Added some support for destroying the commodity pages. Some
readability, comment and whitespace improvements thrown in too.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17085 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-04-13 22:25:35 +00:00
Charles Day 473310ef52 Bug #527459: Add QIF importer support for voided transactions.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17075 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-04-10 23:34:42 +00:00
Charles Day 54d94702d5 Bug #511182: Commodity mapping preferences are now preserved correctly. In
addition, use of the misleading term "stock" has been replaced by "security"
throughout the C code. Also includes a small fix to prevent passing a null
pointer to xaccAccountGetType(), which caused some critical warnings to be
logged. Some comment and whitespace cleanup as well.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17074 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-04-10 20:37:41 +00:00
Charles Day 9982dc104a Small adjustments to a few comment lines used for doxygen documentation.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17072 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-04-07 22:28:02 +00:00
Charles Day 66445dd9ea Improve documentation of GLib helper functions for doxygen. In particular, move
these functions out of the GConf section and fix the broken documentation of
gnc_utf8_validate(), which doesn't appear to have been written for doxygen.
Requesting backport because a significant percentage of lines have changed.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17064 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-04-04 15:43:17 +00:00
Charles Day 6a7585f729 Bug #396665: When any QIF file content is found that is not encoded in UTF-8,
the importer now first attempts to convert it to UTF-8 according to the locale.
If this fails, the offending bytes will be removed from the string as usual.
In addition, the user will now be informed of either of these actions via a
pop-up warning in the GUI. Each occurrence will also be logged.

This changeset also exposes the previously static GnuCash-specific UTF-8
validation C function, gnc_utf8_validate(), and creates a corresponding
Scheme predicate named "gnc-utf8?" for validating strings in this manner.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17063 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-04-02 18:10:35 +00:00
Charles Day 03fe82538c Bug #450354: QIF importer now tries using locale-encoded path if UTF-8 encoded
path fails. Adds supports for use of non-ASCII filenames under Win32.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17062 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-04-01 22:07:28 +00:00
Charles Day 15d086d178 Bug #522795: Add QIF importer support for short sales and covers.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17057 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-27 23:39:57 +00:00
Charles Day ff83dc72a7 QIF importer: Upon successful completion, open an account tab in the main
window (if there isn't one already). Also includes some comment improvements.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17047 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-25 04:12:59 +00:00
Charles Day 440587a30c Bug #514027: Fix QIF importer druid so that commodities pages are not skipped
if the user goes back to the currency page. Create additional commodity pages
if the user goes back and loads additional QIF files with new securities.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17035 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-17 16:04:49 +00:00
Charles Day b4afeb06aa Bug #519988: Update QIF importer bug detection and error messaging to use the
proper Gnome functions. These are g_warning and g_critical for C, and gnc:warn
for Scheme.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17032 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-15 04:26:35 +00:00
Charles Day 081b8b6b7f Bug #509089: Improve the way the QIF importer handles Scheme exceptions that may
occur during conversion of QIF data into GnuCash data. If an exception occurs,
the druid now displays a cancellation page instead of a pop up message. In
addition to avoiding taking the user to an empty duplicate checking window,
the new page could, in the future, be extended to show multiple, specific
warning and error messages instead of the current, generic one.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17031 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-14 03:24:11 +00:00
Charles Day 7a03f93b8b Bug #341414: Save the account separator used when creating the QIF importer's
mapping file so that changing the separator won't break future QIF imports.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17030 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-13 23:27:42 +00:00
Charles Day 148e4a2c02 QIF import: Update error handling used when looking up the user's documentation
page preference in gconf. Use existing #define for gconf section and add one
for name. This is an update to r16976.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17018 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-08 21:16:17 +00:00
Charles Day 8ec7175e04 Minor update to replace a reference to README.patches.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17017 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-08 21:05:53 +00:00
Charles Day c45b4e668c Bug #520606: Fix memo mapping for non-split, non-investment QIF transactions.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17010 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-05 22:42:29 +00:00
Charles Day bd6dcf53b5 QIF import: Show the druid's documentation pages by default. Previously these pages were hidden by default.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16976 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-02-28 22:50:39 +00:00
Charles Day c47e0cd53b Bug #503166: Correct the QIF druid flow such that the duplicates page and the
commodities doc page are not shown going backwards if they were not shown
going forwards.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16962 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-02-24 22:32:04 +00:00
Charles Day 8340f0dbdb Bug #512173: Skip the "match payees/memos" step of the QIF druid if no mappings
are needed. Patch from Ian Lewis.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16956 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-02-24 17:12:40 +00:00
Charles Day 0d2a91ef03 Prevent unresponsive QIF druid by cleaning up any existing progress dialog
if a Scheme error should occur while reading a QIF file (similar to bug
#516178). Also includes many whitespace and comment improvements.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16955 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-02-24 02:48:58 +00:00
Charles Day fa61dee797 Bug#516178: Prevent unresponsive QIF druid by cleaning up any existing progress
dialog if a Scheme error should occur during conversion.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16954 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-02-23 05:39:34 +00:00
Charles Day 848808c4c2 Bug#481528: Relax duplicate matching criteria on imported QIF transactions that
contain only a debit/credit pair so that they have a chance of match existing
transactions with more than two splits.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16953 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-02-23 04:54:51 +00:00
Charles Day e2cff72ade QIF importer: adjust order of "or" conditions for faster performance.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16952 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-02-23 02:58:14 +00:00
Charles Day 7644d8fd2e For bug 123312: This QIF importer patch provides a somewhat smarter default
namespace for the commodities druid pages if a ticker symbol is included in
the QIF data:
-NYSE for symbols of 1-3 characters with an optional .X or .XX suffix
-NASDAQ for symbols of 4 characters
-FUND for symbols of 5 or more characters
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16950 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-02-22 18:25:35 +00:00
Charles Day f7ece28796 Fixes bug 360058 by rewriting qif-import:get-account-name to avoid use
of regular expressions. The new algorithm is simpler and faster anyway.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16949 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-02-21 21:09:39 +00:00
Charles Day e51ce0a1cf Updates to whitespace, comments, and display text. I have also corrected the default return value in the date parsing procedure, qif-parse:parse-date/format. All parsing procedures should return #f if the parsing fails.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16948 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-02-21 17:13:22 +00:00
Charles Day c3d8516c64 QIF importer: Prevent currency-denominated accounts from being assigned
a stock or mutual fund account type (bug 513829).
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16947 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-02-21 05:03:55 +00:00