Re: [GNC-dev] Mouse usage in Gnucash

2019-10-13 Thread Frank H. Ellenberger
Hi all,

my main concern was against the use of 'Fat
text', where more specific docbook elements exist. In
between I have no strong opinion about "Left click" vs. "click
Button1". It seems "Button n" makes the things gratuitous complex.
Perhaps we should include a short common snippet "Conventions in this
document" at the beginning of both docs, explaining we assume a
right-hand configured mouse.

Am So., 13. Okt. 2019 um 05:44 Uhr schrieb David Cousens
:
>
> Thanks Tommy,
>
> The gnome developers guide is a useful read in any case apart from the mouse
> specific issues. They seem to settle on the primary and secondary
> descriptions in one place and then use the left-click right-click etc,
> particularly in the glossary
> (https://developer.gnome.org/gdp-style-guide/2.32/gdp-style-guide.html#gnome-glossary-user-actions)
> description of user actions. It may be useful to link to this from the wiki
> on udpdating the documentation( see below). Perhaps a glossary may be a
> useful place to eventually include references/crossreferences  to alternate
> actions.
>
> The current docbook glossary

Which?

> is not terribly useful for html documents as it
> simply displays a popup with the glossary term in it rather than the
> definition part of the glossary entry which would be really useful. That
> behavior could be altered by using some custon xslt processing in the build
> but I don't have any expertise in that as yet.

1. For docbook/xml there is no build.
2. In theory it could be done in the xslt directory, which is mostly a
two decades old copy of yelps xslt with a few modifications or updates
- who knows. The versioned subdir is the official docbook xslt.

> At present the glossary
> exists only in the guide and not the help manual. There is a way of making a
> common glossary available in both but it will require some alteration of the
> build structure. I am avoiding that at the moment because I think it is more
> important to update the documentation in a few areas where there were new
> features in V3 and I don't have the expertise in the cmake and xslt
> processing to do it easily at the moment.

Right, that is a separate task.

> This section is a pretty good guide to usage in developments and the
> organization of GTK3
> https://developer.gnome.org/hig-book/unstable/input-mouse.html.en
> particularly the table of mouse and keyboard equivalents.

You saw also 
https://developer.gnome.org/hig-book/unstable/note-on-gnome3.html.en
? It is a GTK2 doc. They did until now not release a HIG3.

> The GDK reference manual refers to Button 1,2,3 with 1 Left 2 Middle and 3
> Right but that is more related to  usage in coding than in user
> documentation.
>
> There is no style guide in the Gnome documentation guide sense but there is
> the wiki on updating documentation
> (https://wiki.gnucash.org/wiki/Documentation_Update_Instructions) but it
> doesn't refer to mouse interaction descrptions.
>
> My inclination is to stay with left click, right click  descriptions as for
> a two button mouse for the moment. It is probably more important to be
> consistent rather than totally compliant with being as general as possible.
> I think some general  reference to the GTK3 input-mouse.html document would
> be useful as all the intefaces are based on it as well as
> https://developer.gnome.org/hig/stable/pointer-and-touch-input.html.en bu
> that is problematical as these are external references.

It is no problem to define
https://developer.gnome.org/;> 
in gnc-docbookx.dtd. I am collecting others used in the texts: gnu
wikipedia as orgs, alphavantage, yahoo as coms...

> If it is desired to change this a global search and replace can always be
> used and much of the current documentation uses a left click, right click
> convention

yes

> David

Frank
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] [gnucash-de] Test gnucash-3.7-2019-10-13-git-3.7-131-g57e403b04+.setup.exe (Windows)

2019-10-13 Thread Martin Preuss
Hi,

as you know there are hard to debug crashes with current Gnucash GIT
and branch-6 of AqBanking on Windows. These crashes don't seem to happen
under Linux or in other apps.

Because of that I ran gnucash through valgrind (with your
gnucash-valgrind script).

Valgrind reports multiple problems like this:

--x8

==32275== 152 errors in context 65 of 444:
==32275== Mismatched free() / delete / delete []
==32275==at 0x4C30D3B: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==32275==by 0x893DF1C: spl_id_handler(_xmlNode*, void*)
(gnc-transaction-xml-v2.cpp:240)
==32275==by 0x895D0BF: gnc_xml_set_data(char const*, _xmlNode*,
void*, dom_tree_handler*) (sixtp-dom-parsers.cpp:809)
==32275==by 0x895D1B5: dom_tree_generic_parse(_xmlNode*,
dom_tree_handler*, void*) (sixtp-dom-parsers.cpp:840)
==32275==by 0x893E43D: dom_tree_to_split(_xmlNode*, _QofBook*)
(gnc-transaction-xml-v2.cpp:391)
==32275==by 0x893E8A9: trn_splits_handler(_xmlNode*, void*)
(gnc-transaction-xml-v2.cpp:548)
==32275==by 0x895D0BF: gnc_xml_set_data(char const*, _xmlNode*,
void*, dom_tree_handler*) (sixtp-dom-parsers.cpp:809)
==32275==by 0x895D1B5: dom_tree_generic_parse(_xmlNode*,
dom_tree_handler*, void*) (sixtp-dom-parsers.cpp:840)
==32275==by 0x893EAA5: dom_tree_to_transaction(_xmlNode*, _QofBook*)
(gnc-transaction-xml-v2.cpp:628)
==32275==by 0x893E97F: gnc_transaction_end_handler(void*, _GSList*,
_GSList*, void*, void*, void**, char const*)
(gnc-transaction-xml-v2.cpp:599)
==32275==by 0x896026D: sixtp_sax_end_handler(void*, unsigned char
const*) (sixtp.cpp:541)
==32275==by 0xBE2D5D1: ??? (in
/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4)
==32275==by 0xBE33E7A: xmlParseElement (in
/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4)
==32275==by 0xBE3328E: xmlParseContent (in
/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4)
==32275==by 0xBE33B72: xmlParseElement (in
/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4)
==32275==by 0xBE3328E: xmlParseContent (in
/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4)
==32275==by 0xBE33B72: xmlParseElement (in
/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4)
==32275==by 0xBE3438A: xmlParseDocument (in
/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4)
==32275==by 0x8960732: sixtp_parse_file_common(sixtp*,
_xmlParserCtxt*, void*, void*, void**) (sixtp.cpp:719)
==32275==by 0x89608EC: sixtp_parse_fd(sixtp*, _IO_FILE*, void*,
void*, void**) (sixtp.cpp:794)
==32275==by 0x8943EAA: gnc_xml_parse_fd(sixtp*, _IO_FILE*, int
(*)(char const*, void*, void*), void*, void*) (io-gncxml-gen.cpp:60)
==32275==by 0x894BABC:
qof_session_load_from_xml_file_v2_full(GncXmlBackend*, _QofBook*, void
(*)(_xmlParserCtxt*, void*), void*, QofBookFileType) (io-gncxml-v2.cpp:808)
==32275==by 0x894BD6A:
qof_session_load_from_xml_file_v2(GncXmlBackend*, _QofBook*,
QofBookFileType) (io-gncxml-v2.cpp:874)
==32275==by 0x8940512: GncXmlBackend::load(_QofBook*,
QofBackendLoadType) (gnc-xml-backend.cpp:251)
==32275==by 0x5FC580F: QofSessionImpl::load(void (*)(char const*,
double)) (qofsession.cpp:216)
==32275==  Address 0x27adc700 is 0 bytes inside a block of size 16 alloc'd
==32275==at 0x4C3017F: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==32275==by 0x5F63E26: guid_malloc (guid.cpp:107)
==32275==by 0x5F63E7B: guid_copy (guid.cpp:124)
==32275==by 0x5F63F58: guid_new (guid.cpp:155)
==32275==by 0x895B9D5: dom_tree_to_guid(_xmlNode*)
(sixtp-dom-parsers.cpp:64)
==32275==by 0x893DEB8: spl_id_handler(_xmlNode*, void*)
(gnc-transaction-xml-v2.cpp:235)
==32275==by 0x895D0BF: gnc_xml_set_data(char const*, _xmlNode*,
void*, dom_tree_handler*) (sixtp-dom-parsers.cpp:809)
==32275==by 0x895D1B5: dom_tree_generic_parse(_xmlNode*,
dom_tree_handler*, void*) (sixtp-dom-parsers.cpp:840)
==32275==by 0x893E43D: dom_tree_to_split(_xmlNode*, _QofBook*)
(gnc-transaction-xml-v2.cpp:391)
==32275==by 0x893E8A9: trn_splits_handler(_xmlNode*, void*)
(gnc-transaction-xml-v2.cpp:548)
==32275==by 0x895D0BF: gnc_xml_set_data(char const*, _xmlNode*,
void*, dom_tree_handler*) (sixtp-dom-parsers.cpp:809)
==32275==by 0x895D1B5: dom_tree_generic_parse(_xmlNode*,
dom_tree_handler*, void*) (sixtp-dom-parsers.cpp:840)
==32275==by 0x893EAA5: dom_tree_to_transaction(_xmlNode*, _QofBook*)
(gnc-transaction-xml-v2.cpp:628)
==32275==by 0x893E97F: gnc_transaction_end_handler(void*, _GSList*,
_GSList*, void*, void*, void**, char const*)
(gnc-transaction-xml-v2.cpp:599)
==32275==by 0x896026D: sixtp_sax_end_handler(void*, unsigned char
const*) (sixtp.cpp:541)
==32275==by 0xBE2D5D1: ??? (in
/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4)
==32275==by 0xBE33E7A: xmlParseElement (in
/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4)
==32275==by 0xBE3328E: xmlParseContent (in
/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4)
==32275==by 0xBE33B72: 

Re: [GNC-dev] [GNC] Transaction Report Sign Reverses

2019-10-13 Thread David T. via gnucash-devel

Chris,

Thanks for returning to this.

I see that this is a patch file for trep-engine.scm. My only experience 
using patches was when I was on a Mac; now I am on Windows, and wonder 
which tools to use to apply your patch.


Moreover, I am using 3.5, and do not find trep-engine.scm anywhere in 
C:\Program Files (x86)\gnucash. Does "recent build" mean?? GC 3.7?


Best,

David T.

On 10/13/2019 6:51 PM, Christopher Lam wrote:
Hi David, I'd had a review of transaction-report and can attempt fix 
signs for subtotals when sorting by 'account name'.
The difficult issue remains how to handle reversals when sorting by 
'other account name'. I think it's buggy and not sure how to handle it.

Try this patch to trep-engine.scm in a recent build.



On Mon, 12 Aug 2019 at 08:45, David T. > wrote:


Well, it seems odd to me that "Double" display (as Adrien
noted)(thank you, Adrien!) is able to display the figures as the
user prefers. It is also odd to me that the report knows to switch
the values of the individual transactions, but is unable to
remember that fact when it comes to the totals. That right there
is the problem.

As for the FAQ, it seems to me that there is a mistake in the
example there: the GnuCash option is to change signs for Income
*and* Expenses. But the example provided reverses Income but not
Expenses. Were it to reverse both sets of accounts as the
preference indicates, then the math should work out correctly
($100+10-20=$90). Or am I missing something here?

Why is it not possible to perform the calculation for totals and
then apply a display modifier so that the user sees numbers as
they prefer?

The current solution is a poor one.

On 8/12/2019 11:12 AM, Christopher Lam wrote:


https://wiki.gnucash.org/wiki/FAQ#Q:_Why_does_the_Transaction_Report_.27Sign_Reversal.27_setting_not_work_on_subtotals


This issue could be fixed if the scenario addressed in this FAQ
can be resolved. I don't really know how to handle that
particular case.

On Mon., 12 Aug. 2019, 13:02 David T. via gnucash-user,
mailto:gnucash-u...@gnucash.org>> wrote:

Hello,

I am trying to create a YTD Capital Gains report, and am
encountering a
problem with how the Transaction Report implements the Sign
Reverses
setting.

I recall some time back a discussion about the fact that the
Sign
Reverses setting reverses signs in these reports in a
confusing way.
There was some discussion about reversing the individual
transactions
but not the totals. Although I do not recall the specifics of
the
discussion, I am encountering the same situation now, where the
transactions themselves respect the user setting, but the
totals do not.
To say this is confusing is an understatement.

It seems to me that other financial applications must have
encountered
the problem of displaying income to users as a positive value
(since
that is how most of us view income!) while still finding a
way to
display the correct accounting information.

To display my YTD report of Capital Gains, I ran a
Transaction Report
and selected the Income:Realized Gains accounts for the
current year.
The result shows losses as positive numbers, and gains as
negative. I
don't know about you, but my expectation is reversed from
this. If I
change the Sign Reverses setting to Income and Expense, then the
transactions switch, but the totals do not. This result was
the gist of
the discussion in an earlier thread. Bleah!

Now, I know that I can copy the data, paste it into another
program and
change all the settings to my heart's content, but I am
looking for a
way to run a report in GnuCash that directly and
unambiguously shows me
whether I have gained money (a positive) or lost it (a
negative) over
the current year. Does anyone have suggestions?

FWIW, I attempted to turn this report around and have a
report that
lists transactions in the asset accounts, filtered by the
Income:Realized Gains accounts, but that seems to report only
the Asset
account currency--in this case, the mutual fund or stock
shares involved
on the Gain/Loss transaction. Unfortunately, that's not the
actual
Gain/Loss value...

It would be nice if the sign reverses setting could be fixed.
Barring
that, does anyone have a workaround report setup that can
give me a
sensible YTD Capital Gains total as described?

David T.

___
gnucash-user mailing list
 

Re: [GNC-dev] [GNC] Transaction Report Sign Reverses

2019-10-13 Thread Christopher Lam
Hi David, I'd had a review of transaction-report and can attempt fix signs
for subtotals when sorting by 'account name'.
The difficult issue remains how to handle reversals when sorting by 'other
account name'. I think it's buggy and not sure how to handle it.
Try this patch to trep-engine.scm in a recent build.



On Mon, 12 Aug 2019 at 08:45, David T.  wrote:

> Well, it seems odd to me that "Double" display (as Adrien noted)(thank
> you, Adrien!) is able to display the figures as the user prefers. It is
> also odd to me that the report knows to switch the values of the individual
> transactions, but is unable to remember that fact when it comes to the
> totals. That right there is the problem.
>
> As for the FAQ, it seems to me that there is a mistake in the example
> there: the GnuCash option is to change signs for Income *and* Expenses. But
> the example provided reverses Income but not Expenses. Were it to reverse
> both sets of accounts as the preference indicates, then the math should
> work out correctly ($100+10-20=$90). Or am I missing something here?
>
> Why is it not possible to perform the calculation for totals and then
> apply a display modifier so that the user sees numbers as they prefer?
>
> The current solution is a poor one.
> On 8/12/2019 11:12 AM, Christopher Lam wrote:
>
>
> https://wiki.gnucash.org/wiki/FAQ#Q:_Why_does_the_Transaction_Report_.27Sign_Reversal.27_setting_not_work_on_subtotals
>
> This issue could be fixed if the scenario addressed in this FAQ can be
> resolved. I don't really know how to handle that particular case.
>
> On Mon., 12 Aug. 2019, 13:02 David T. via gnucash-user, <
> gnucash-u...@gnucash.org> wrote:
>
>> Hello,
>>
>> I am trying to create a YTD Capital Gains report, and am encountering a
>> problem with how the Transaction Report implements the Sign Reverses
>> setting.
>>
>> I recall some time back a discussion about the fact that the Sign
>> Reverses setting reverses signs in these reports in a confusing way.
>> There was some discussion about reversing the individual transactions
>> but not the totals. Although I do not recall the specifics of the
>> discussion, I am encountering the same situation now, where the
>> transactions themselves respect the user setting, but the totals do not.
>> To say this is confusing is an understatement.
>>
>> It seems to me that other financial applications must have encountered
>> the problem of displaying income to users as a positive value (since
>> that is how most of us view income!) while still finding a way to
>> display the correct accounting information.
>>
>> To display my YTD report of Capital Gains, I ran a Transaction Report
>> and selected the Income:Realized Gains accounts for the current year.
>> The result shows losses as positive numbers, and gains as negative. I
>> don't know about you, but my expectation is reversed from this. If I
>> change the Sign Reverses setting to Income and Expense, then the
>> transactions switch, but the totals do not. This result was the gist of
>> the discussion in an earlier thread. Bleah!
>>
>> Now, I know that I can copy the data, paste it into another program and
>> change all the settings to my heart's content, but I am looking for a
>> way to run a report in GnuCash that directly and unambiguously shows me
>> whether I have gained money (a positive) or lost it (a negative) over
>> the current year. Does anyone have suggestions?
>>
>> FWIW, I attempted to turn this report around and have a report that
>> lists transactions in the asset accounts, filtered by the
>> Income:Realized Gains accounts, but that seems to report only the Asset
>> account currency--in this case, the mutual fund or stock shares involved
>> on the Gain/Loss transaction. Unfortunately, that's not the actual
>> Gain/Loss value...
>>
>> It would be nice if the sign reverses setting could be fixed. Barring
>> that, does anyone have a workaround report setup that can give me a
>> sensible YTD Capital Gains total as described?
>>
>> David T.
>>
>> ___
>> gnucash-user mailing list
>> gnucash-u...@gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> If you are using Nabble or Gmane, please see
>> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>> -
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>>
>
diff --git a/gnucash/report/report-system/trep-engine.scm b/gnucash/report/report-system/trep-engine.scm
index fbcce9f05..b63fcebcb 100644
--- a/gnucash/report/report-system/trep-engine.scm
+++ b/gnucash/report/report-system/trep-engine.scm
@@ -1422,16 +1422,25 @@ be excluded from periodic reporting.")
   data
 
 (define (add-subtotal-row subtotal-string subtotal-collectors
-  subtotal-style level row col)
+  

[GNC-dev] Just another windows build problem

2019-10-13 Thread Andre Joost

Hi folks,

I tried to build GnuCash for Windows using the powershell scripts as
described on https://wiki.gnucash.org/wiki/Building_on_Windows

Unfortunately, I get stuck when running jhbuild:
---
Joost@HP-Laptop MINGW32 ~
# cd /c/gcdev64

Joost@HP-Laptop MINGW32 /c/gcdev64
# jhbuild -f src/gnucash-on-windows.git/jhbuildrc build
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
Benötigte Pakete:
  Im System installierte Pakete, die zu alt sind:
(keine)
  Kein passendes Systempaket installiert:
gnutls (gnutls.pc, Benötigt=3.5.10)
jhbuild build: Required system dependencies not installed. Install using
the command 'jhbuild sysdeps --install' or to ignore system dependencies
use command-line option --nodeps

Joost@HP-Laptop MINGW32 /c/gcdev64
#


Joost@HP-Laptop MINGW32 ~
# cd /c/gcdev64

Joost@HP-Laptop MINGW32 /c/gcdev64
# jhbuild -f src/gnucash-on-windows.git/jhbuildrc build
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in 
globals()[__func_name] = __get_hash(__func_name)
  File "/usr/lib/python2.7/hashlib.py", line 97, in
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/hashlib.py", line 147, in