Commit Graph

18931 Commits

Author SHA1 Message Date
Robert Fewell
7a2c1492fd Replace the cell foreground and background colour handlers
By using CSS classes, there is no need to have separate handlers for
the foreground and background colours so replace them with one being of
a similar format to that of cell_border_handlers.
2017-11-01 12:35:20 +00:00
Robert Fewell
451161837d Test the widget state to get the correct background colour.
When the cell borders are not displayed, the border colour is set to
the background colour so test for the widget being in an insensitive
state to get the correct background colour.
2017-11-01 12:35:19 +00:00
Robert Fewell
c5fb0d6dce Change the look of the toggle button
With these changes the button image is removed and you are left with
the arrow and frame on the yellow background. This can be dropped or
adjusted if it was deemed a good idea.
2017-11-01 12:35:11 +00:00
Robert Fewell
5500211305 Control the toggle button width
There did not seem to be an easier way to control the toggle button
width so created a custom one based on the GtkToggleButton. This
allowed the use of the class function get_preferred_width which is set
at two thirds the height.
2017-11-01 12:12:01 +00:00
Robert Fewell
0c44383696 Move the double line to be inside the cursor cell 2017-11-01 12:09:37 +00:00
Robert Fewell
2a93842574 If a font size is specified for the sheet, popup size may be wrong
When you specify a font size for the sheet, the popup will inherit this
but when first popped it will use the minimum height value and so may
be different resulting in not being in the right position. So check on
allocation and if different remove and pop again.
2017-11-01 12:08:02 +00:00
Robert Fewell
a278bcc052 Use previously created functions
Use the previously created functions to reduce code and for conformity.
As part of this some variables were renamed to be common.
2017-11-01 12:05:46 +00:00
Robert Fewell
0ba9b76899 Provide two functions for common code
These two sections of code appear in three separate files in slightly
different versions so define them hear for conformity
2017-11-01 12:01:54 +00:00
Robert Fewell
70ad2c3bc4 This function doesn't do much and is only used for new account registers
This function is used to get the width of the toggle button and add it
to the sample text length to set the default column width. As it is
square, just use the row height instead and the user will no doubt set
there own widths any way.
2017-11-01 11:57:58 +00:00
Robert Fewell
bb16e07d8f Adjust the sheet to get its spacings from the item_edit CSS 2017-11-01 11:56:12 +00:00
Robert Fewell
9f76441d50 Get the item_edit cell padding from CSS instead of defines
This commit sets up getting the vertical and horizontal item_edit cell
margins, borders and padding from CSS. This increases the option to
specify individual values for top, right, bottom and left instead of
just specifying just two values.
2017-11-01 11:54:05 +00:00
John Ralls
4f9716362c Merge branch J. Marino's fix-report-colors into unstable 2017-10-31 17:31:33 -07:00
John Ralls
a6f4ea65e9 Merge J. Marino's 'fix/report-net-barchart' into unstable 2017-10-31 17:24:44 -07:00
Jose Marino
f4acb6c000 report/category-barchart: fix unit test to work with gnc-monetary
The unit test for category-barchart did not initialize html stylesheets.
Without any stylesheets available, the renderer defaults to a
trivial renderer. This works fine if the table in the report is
populated by doubles. However, now it is populated by gnc-monetary
and they need a stylesheet to be properly formatted.

This commit makes sure to initialize the html stylesheet code in
the unit test and adapts the parsing code to the new formatting.
2017-10-31 16:10:45 -06:00
Jose Marino
3913c528f1 report/category-barchart: calculate using gnc-monetary instead of double
Perform and store all calculations using gnc-monetary instead of double.
Conversion to double is only needed as a last step when adding data
to the chart (using new local function "monetary->double").

When a table is displayed, since the values are gnc-monetary, they are
properly formatted as monetary values.
2017-10-31 16:10:45 -06:00
Jose Marino
46b3e1caad report/net-linechart: fix unit test to work with gnc-monetary
The unit test for net-linechart did not initialize html stylesheets.
Without any stylesheets available, the renderer defaults to a
trivial renderer. This works fine if the table in the net-linechart
report is populated by doubles. However, now it is populated by
gnc-monetary and they need a stylesheet to be properly formatted.

This commit makes sure to initialize the html stylesheet code in
the unit test and adapts the parsing code to the new formatting.
2017-10-31 16:10:45 -06:00
Jose Marino
85e5651202 report/net-linechart: calculate using gnc-monetary instead of double
Perform and store all calculations using gnc-monetary instead of double.
Conversion to double is only needed as a last step when adding data
to the chart (using new function "monetary->double").

If the table is displayed, its values are properly formatted as monetary
values since they are gnc-monetary instead of doubles.
2017-10-31 16:10:45 -06:00
Jose Marino
9c7ba52315 report/net-barchart: fix unit test to work with gnc-monetary
The unit test for net-barchart did not initialize html stylesheets.
Without any stylesheets available, the renderer defaults to a
trivial renderer. This works fine if the table in the net-barchart
report is populated by doubles. However, now it is populated by
gnc-monetary and they need a stylesheet to be properly formatted.

Using doubles and the trivial renderer, a table cell looks like:
<td class="number-cell"><number> 6.0</td>

Using gnc-monetary and the trivial renderer, a table cell looks like:
<td class="number-cell"><gnc-monetary> #[unknown]</td>

Initializing the html stylesheets, the table cell looks like:
<td class="number-cell">$6.00</td>

This commit makes sure to initialize the html stylesheet code in
the unit test and adapts the parsing code to the new formatting.
2017-10-31 16:10:45 -06:00
Jose Marino
2fcd1efd6d report/net-barchart: default to list of zeros instead of empty list
This was the original behavior before the change to gnc-monetary.
2017-10-31 16:10:45 -06:00
Jose Marino
3c8eeb8b3b report/net-barchart: calculate using gnc-monetary instead of double
Perform and store all calculations using gnc-monetary instead of double.
Conversion to double is only needed as a last step when adding data
to the chart (using new function "monetary->double").

When a table is displayed, since the values are gnc-monetary, they are
properly formatted as monetary values.
2017-10-31 16:10:45 -06:00
John Ralls
a840748409 [Gwenhywfar] Use the new getpassword API only on the gwen5 branch. 2017-10-31 14:31:00 -07:00
John Ralls
be44db2ef8 Provide for report/report-system/test/test-extras to be built before other tests. 2017-10-31 12:06:02 -07:00
John Ralls
cbd8764780 Ensure that report unit tests dependencies are built with target. 2017-10-31 10:59:12 -07:00
John Ralls
039dda5294 Merge J. Marino's cashflow-barchart updates into unstable. 2017-10-31 10:20:50 -07:00
Jose Marino
41ad89154f report-test: move add-to-load-path to build system
The unit test for cashflow-barchart.scm needs module stylesheets
to work, to render gnc-monetary objects correctly.
It makes sense to add the extra load-path needed by the module
in the build system instead of with code in the test file.

This is only needed when building with autotools. It seems cmake
builds don't need this.
2017-10-31 11:04:17 -06:00
John Ralls
49c70795c3 Remove X11 error handler
And with it the only direct X11 dependency.
2017-10-31 08:53:20 -07:00
Geert Janssens
f05761e636 Merge branch 'gtk3-update7' of https://github.com/Bob-IT/gnucash into unstable 2017-10-31 09:53:33 +01:00
Robert Fewell
641d56f346 Move the CSS files to a Gresource file
Move the source CSS files to the gnucash directory and load them from
a gresource file. As pseudo class 'insensative' is deprecated, add a
second main css file to be used after Gtk3.20
2017-10-30 20:11:38 +00:00
John Ralls
9669bd6b6c Release 2.7.1 2017-10-29 14:01:15 -07:00
John Ralls
09bcb515a1 Set relative path to icon file in Windows resource script.
No idea why this is necessary for tarball builds, but it is.
Also update the copyright date in the same file.
2017-10-29 13:59:51 -07:00
John Ralls
e959822817 Don't copy ChangeLog on a tarball build.
There's no reason to and besides it breaks in-source builds
because trying to copy onto itself raises an error.
2017-10-28 14:21:39 -07:00
John Ralls
b92a41b608 Pass a NULL parent to gnc_options_dialog_new_modal in assistant-hierarchy.
In this case the dialog isn't a dialog, it's a notebook page, so it
doesn't need to have a parent at creation.
2017-10-28 09:56:58 -07:00
John Ralls
d22b098dff Set a parent window for the options dialogs.
So they pop up centered on the GnuCash window instead of
on the wrong monitor.
2017-10-27 16:23:02 -07:00
Jose Marino
5ca2834bd0 cashflow-barchart: split option "show money in/out" into two separate ones
The report had two display options: one to control the display of
money in/out and another one to control the display of net flow.
In this commit we split the first option into two separate ones to
allow toggling the display of money in, out and net independently.
2017-10-27 15:27:41 -06:00
Jose Marino
44df91adca cashflow-barchart: delete unnecessary intermediate lists
These intermediate lists *-value-list hold the double values needed
by the barchart. We can easily create these lists on the fly,
there's no need to store them in a separate variable.

The same is done to include total values in the table, we can easily
append the total value on the fly.
2017-10-27 15:27:41 -06:00
Jose Marino
9cb8a3c87a cashflow-barchart: use direct gnc-monetary math instead of collectors
Operate between gnc-monetary objects instead of using collectors. The
resulting code is simpler and easier to read.
2017-10-27 15:27:36 -06:00
John Ralls
5157d8b50a Merge branch Christopher Lam's Transaction Report Improvements into unstable. 2017-10-27 12:06:52 -07:00
John Ralls
e64e73b655 Merge branch J. Marino's cashflow-barchart report into unstable. 2017-10-27 11:31:46 -07:00
John Ralls
115c0bf4a4 Merge Aaron Law's branch 'buildfix' to unstable. 2017-10-27 10:13:06 -07:00
John Ralls
04642fc42a [SQL] Check return of string_to_guid, bail if false. 2017-10-27 09:46:47 -07:00
John Ralls
d17c24b770 Bug 789298 - Prompt for file history update leads to crash during startup. 2017-10-27 09:46:47 -07:00
lmat
7a0d5a5735 Updating home directory to fix CI error messages 2017-10-27 11:57:06 -04:00
Christopher Lam
a9fab36040 transaction.scm upgrade complete
It now has account and transaction substring/regex matcher.
Verified working in 2.7.0
2017-10-27 17:33:38 +08:00
christopherlam
dfa25e8cbd refactor old is-filter-member to use srfi-1
This has better readability
2017-10-27 16:53:08 +08:00
christopherlam
cdb677633c improve split-remove-duplicates, combine filters
To use inbuilt list functions
2017-10-27 16:53:08 +08:00
christopherlam
3475a894f9 Regex is optional, and add transaction matcher
This commit will reinstate substring matcher, with optional regex matching.

Will also add a Transaction Matcher - will include splits whose description/notes/memo is substring/regex matched. Will be usable for #category matching, especially when backported to transaction.scm

Also strings are defined centrally which will aid localization and reduce typos.
2017-10-27 16:53:08 +08:00
Christopher Lam
885272a150 Enhance transaction.scm account filter to regex
This commit will enhance the account fullname filter to full regex matching capabilities. Will allow complex account fullname queries e.g. 'Car|Flights'
2017-10-27 16:53:08 +08:00
christopherlam
d077400ba8 Enhance account filter to a regex
This commit will enhance the account fullname filter to full regex matching capabilities. Will allow complex account fullname queries e.g. "Car|Flights|Travel"
2017-10-27 16:53:08 +08:00
christopherlam
b74c0bedfd Amend some strings for improved visibility
Enhance visibility of total-sales and total-purchases (all caps) and amend input/output tax accounts display.
2017-10-27 16:53:08 +08:00
christopherlam
51a0a55e43 Change critical code to pure FP
The function split-adder is the most crucial code  in this report. This commit changes it to pure functional programming.
2017-10-27 16:53:08 +08:00