The reason the GNCAmountEdit was putting the text through the parser twice was that it was setting gae->need_to_parse FALSE, but then immediately calling gtk_entry_set_text(), which issues a "changed" signal. The callback for that signal was setting gae->need_to_parse back to TRUE. So I simply changed the order of the statements.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17553 57a11ea4-9604-0410-9ed3-97b8803252fd
Much of this patch consists of new ENTER(), DEBUG() and LEAVE() calls for debugging. Nearly all of the rest is refactoring. The code that detected and acted on changes to the account cell has been placed into its own function, gnc_split_register_check_account(). The several calls needed to checking a cell for changes have been combined in gnc_split_register_check_cell().
About 15 lines represent actual changes in functionality. Specifically, the code does a better job of recognizing when an exchange rate needs to be requested from the user, and when it does not. When an account cell is changed in the register, and the new account is denominated in the same commodity as the original, the original exchange rate is used. On the other hand, if the commodity differs, the rate is reset to zero. The register remembers that the zero exchange rate is due to the reset (i.e. was not user-entered) so that the the exchange rate dialog can be presented. Finally, the cell contents are checked before doing a save; previously the checks were missed in certain cases, e.g. if the user pressed "Enter" or clicked the close button.
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17507 57a11ea4-9604-0410-9ed3-97b8803252fd
-Fix popup button behavior (sometimes non-responsive)
-Make calendar clickable in modal dialogs
-Update design to be more like GtkComboBox, less like GtkCombo
-Adjust a few signal names, e.g. "focus-out-event" vs. "focus_out_event"
-Lose the GtkFrame shadowing; perhaps the GtkFrame is no longer needed
-Add comments
-Add a few ENTER() and LEAVE() calls for debugging
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17493 57a11ea4-9604-0410-9ed3-97b8803252fd
-Check account value to avoid causing a CRIT message.
-Reorganize function for smaller size and more readability.
-Add some comments (there were none).
BP
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17451 57a11ea4-9604-0410-9ed3-97b8803252fd
-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
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
-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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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