Loses three bits so GncInt128 becomes really a GncInt125, but we don’t
really need the single order-of-magnitude: 10**38 is big enough. Saves
a full word of memory for each GncInt128, which means 2 words for GncRational.
That’s a 33% saving in memory for 64-bit and makes the object size the
same (32 bytes) for all architectures.
More consistent with GncNumeric and saves a word of memory per instance.
Still bleeping huge because the two GncInt128s each need 128 bits (2 or 4 words)
plus a word for status (for 3 bits!).
Also provide a couple of convenience functions, is_big() and valid() to
test if the either numerator and denominator is big or overflowed or NaN.
Similar to GncRational, except that it’s based on int64_t instead of
GncInt128 and throws instead of using a status byte.
Most calculations are performed using GncRational, the result is then
rounded (RoundType::half_down) to fit. GncRational should be used in
circumstances where the automatic rounding is undesirable.
- Adjust description on the assistant's start page to match current behavior
- Hide separator buttons in case the file format is set to fixed width
- For fixed width display some instructions on how to manipulate columns
- Move the error messages to below the preview table
This happens because in case std::string is the base type for the tokenizer
the offsets are interpreted as byte offsets although some characters
may consist of more that one byte in utf-8. This is not so for std::wstring
so to solve this issue the fixed width tokenizer is changed to use
wide character strings internally.
Each column change would cause the code to completely delete the
existing columns and then add new ones from scratch. For some
reason his upsets the MOVE_NOTIFY event, which is triggered
whenever you move the mouse pointer around. I suspect it internally
keeps a link to the last hovered column to check if the move action
moves the mouse to a different column. As the code removed the columns
this internal references becomes invalid.
I have worked around this by no longer completely recreating the
columns. Instead columns are added or removed as needed to follow
the changes in the data model.
At the same time the refresh function has been split into several
smaller ones.
- Properly enable/disable context menu for managing columns in fixed width data mode
- Make this context menu work on the table body instead of the table headers
- Both of the above is done a well for the double-click column creation behaviour
- Migrate the column type setting widgets to the table header cells and remove
the second (one-row) table, which was only used to allow type selection.
- Use enums instead of magic numbers to access associated treeview models
To fix: for some reason the column headers are no responding to clicks when
the preview page is first opened. However the first time the preview table
is regenerated (pretty much whenever an option is changed) they are. This
should still be debugged.
The keyfile that stores the settings won't accept '[' and ']' as settingss names,
so this commit will prevent the user from entering these characters. They are
automatically replaced with the valid '(' and ')' characters.
In addition any attempt to save settings with an invalid name via a code path
bypassing the gui will be refused.
In this form not all data needs reparsing when a single column
changes. The drawback is it makes the code slightly more complicated
because accounts can only be verified after the account match page
has completed, while most columns are set on the preview page.