Re: Feedback about 2.7.8

2018-03-28 Thread David Carlson
Neither of those sample .css file addresses Adreien's question

" Is there a class/id list for the GnuCash UI so we can know what’s
available to style? Or are those listed in the sample file the only ones
available? (I’m also assuming other properties can be set, for example
font-size in addition to color, etc. or is this not possible?)
"

David C

On Wed, Mar 28, 2018 at 4:04 PM, Robert Fewell <14ubo...@gmail.com> wrote:

> I do not think that is the right file to link to, I would of thought this
> one was the correct one...
> https://github.com/Gnucash/gnucash/blob/unstable/doc/gtk-3.0.css
>
> Bob
>
> On 28 March 2018 at 21:13, Adrien Monteleone 
> wrote:
>
> > Christop,
> >
> > A general guide to CSS(in the context of web pages) is available here:
> >
> > https://www.w3schools.com/css/
> >
> > A more specific guide with respect to CSS usage in GTK3 is here:
> >
> > https://developer.gnome.org/gtk3/stable/chap-css-overview.html
> >
> >
> > Regards,
> > Adrien
> >
> > > On Mar 28, 2018, at 2:20 PM, Christoph R  > net> wrote:
> > >
> > > Hi Geert,
> > >
> > >> Am 28.03.2018 um 17:24 schrieb Geert Janssens <
> > geert.gnuc...@kobaltwit.be>:
> > >>
> > >> Op woensdag 28 maart 2018 15:46:26 CEST schreef Christoph R:
> > >>
> > >>> It choked on one of my files, which worked fine with 2.6 and was
> > probably
> > >>> created with 2.4 or even earlier.  There was an out-of range date in
> > the
> > >>> price database which I corrected manually. But normal users would
> have
> > been
> > >>> lost.
> > >> What was the date set to before you corrected it ? And how does it
> > display in
> > >> gnucash 2.6 if you look at that particular price in the Price editor ?
> > >
> > > Date was 1301-09-13 00:05:08 +0053
> > > and it shows up absolutely correct as 13.9.1301 :-)
> > >
> > >>
> > >>> adding “EXTRA_ARGS=--nofile” to Library/Application\
> > >>> Support/Gnucash/gnucashrc does not have any effect any more.
> > >>
> > >> I never heard of a gnucashrc file. Perhaps that is/was an OS X/Quarz
> > specific
> > >> extension ? The loading code on OS X has been aligned with Windows and
> > Linux
> > >> in this development cycle, so perhaps it got lost in that work.
> > >
> > > Yes it was parsed by the MacOS launcher script, which apparently is
> gone
> > now.
> > >
> > >>> Changing account or value of a reconciled
> > >>> split gives me the correct warning as needed. Yeah! But I can change
> > the
> > >>> description of a reconciled split without a warning.
> > >>
> > >> Hmm, a split doesn't have a description, only a memo. Do you mean you
> > get no
> > >> warning when changing the memo ? Or do you mean you can change the
> > transaction
> > >> description of a transaction that has reconciled splits ?
> > >
> > > I get no warning when changing the memo. I get one when changing the
> > transaction description.
> > >
> > >>
> > >>> Fonts and icons are different - due to gtk3 - and not
> > >>> necessarily to my liking. I had customised .gtkrc-2.0.gnucash a bit
> > and of
> > >>> course this does not work any more. Unfortunately I did not figure
> out
> > how
> > >>> to customise gtk3 on MacOS. Any help would be appreciated
> > >>
> > >> I have updated the relevant FAQ entry:
> > >> https://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_change_the_
> > register_colors.3F
> > >
> > > Wow, this CSS stuff is cryptic. Can you enlighten me how to set font
> and
> > font size?
> > >
> > > Cheers,
> > > Christoph
> > >
> > > ___
> > > gnucash-devel mailing list
> > > gnucash-devel@gnucash.org
> > > https://lists.gnucash.org/mailman/listinfo/gnucash-devel
> >
> > ___
> > gnucash-devel mailing list
> > gnucash-devel@gnucash.org
> > https://lists.gnucash.org/mailman/listinfo/gnucash-devel
> >
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Feedback about 2.7.8

2018-03-28 Thread Robert Fewell
I do not think that is the right file to link to, I would of thought this
one was the correct one...
https://github.com/Gnucash/gnucash/blob/unstable/doc/gtk-3.0.css

Bob

On 28 March 2018 at 21:13, Adrien Monteleone 
wrote:

> Christop,
>
> A general guide to CSS(in the context of web pages) is available here:
>
> https://www.w3schools.com/css/
>
> A more specific guide with respect to CSS usage in GTK3 is here:
>
> https://developer.gnome.org/gtk3/stable/chap-css-overview.html
>
>
> Regards,
> Adrien
>
> > On Mar 28, 2018, at 2:20 PM, Christoph R  net> wrote:
> >
> > Hi Geert,
> >
> >> Am 28.03.2018 um 17:24 schrieb Geert Janssens <
> geert.gnuc...@kobaltwit.be>:
> >>
> >> Op woensdag 28 maart 2018 15:46:26 CEST schreef Christoph R:
> >>
> >>> It choked on one of my files, which worked fine with 2.6 and was
> probably
> >>> created with 2.4 or even earlier.  There was an out-of range date in
> the
> >>> price database which I corrected manually. But normal users would have
> been
> >>> lost.
> >> What was the date set to before you corrected it ? And how does it
> display in
> >> gnucash 2.6 if you look at that particular price in the Price editor ?
> >
> > Date was 1301-09-13 00:05:08 +0053
> > and it shows up absolutely correct as 13.9.1301 :-)
> >
> >>
> >>> adding “EXTRA_ARGS=--nofile” to Library/Application\
> >>> Support/Gnucash/gnucashrc does not have any effect any more.
> >>
> >> I never heard of a gnucashrc file. Perhaps that is/was an OS X/Quarz
> specific
> >> extension ? The loading code on OS X has been aligned with Windows and
> Linux
> >> in this development cycle, so perhaps it got lost in that work.
> >
> > Yes it was parsed by the MacOS launcher script, which apparently is gone
> now.
> >
> >>> Changing account or value of a reconciled
> >>> split gives me the correct warning as needed. Yeah! But I can change
> the
> >>> description of a reconciled split without a warning.
> >>
> >> Hmm, a split doesn't have a description, only a memo. Do you mean you
> get no
> >> warning when changing the memo ? Or do you mean you can change the
> transaction
> >> description of a transaction that has reconciled splits ?
> >
> > I get no warning when changing the memo. I get one when changing the
> transaction description.
> >
> >>
> >>> Fonts and icons are different - due to gtk3 - and not
> >>> necessarily to my liking. I had customised .gtkrc-2.0.gnucash a bit
> and of
> >>> course this does not work any more. Unfortunately I did not figure out
> how
> >>> to customise gtk3 on MacOS. Any help would be appreciated
> >>
> >> I have updated the relevant FAQ entry:
> >> https://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_change_the_
> register_colors.3F
> >
> > Wow, this CSS stuff is cryptic. Can you enlighten me how to set font and
> font size?
> >
> > Cheers,
> > Christoph
> >
> > ___
> > gnucash-devel mailing list
> > gnucash-devel@gnucash.org
> > https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Feedback about 2.7.8

2018-03-28 Thread Adrien Monteleone
Christop,

A general guide to CSS(in the context of web pages) is available here:

https://www.w3schools.com/css/

A more specific guide with respect to CSS usage in GTK3 is here:

https://developer.gnome.org/gtk3/stable/chap-css-overview.html


Regards,
Adrien

> On Mar 28, 2018, at 2:20 PM, Christoph R  
> wrote:
> 
> Hi Geert,
> 
>> Am 28.03.2018 um 17:24 schrieb Geert Janssens :
>> 
>> Op woensdag 28 maart 2018 15:46:26 CEST schreef Christoph R:
>> 
>>> It choked on one of my files, which worked fine with 2.6 and was probably
>>> created with 2.4 or even earlier.  There was an out-of range date in the
>>> price database which I corrected manually. But normal users would have been
>>> lost.
>> What was the date set to before you corrected it ? And how does it display 
>> in 
>> gnucash 2.6 if you look at that particular price in the Price editor ?
> 
> Date was 1301-09-13 00:05:08 +0053
> and it shows up absolutely correct as 13.9.1301 :-)
> 
>> 
>>> adding “EXTRA_ARGS=--nofile” to Library/Application\
>>> Support/Gnucash/gnucashrc does not have any effect any more.
>> 
>> I never heard of a gnucashrc file. Perhaps that is/was an OS X/Quarz 
>> specific 
>> extension ? The loading code on OS X has been aligned with Windows and Linux 
>> in this development cycle, so perhaps it got lost in that work.
> 
> Yes it was parsed by the MacOS launcher script, which apparently is gone now.
> 
>>> Changing account or value of a reconciled
>>> split gives me the correct warning as needed. Yeah! But I can change the
>>> description of a reconciled split without a warning.
>> 
>> Hmm, a split doesn't have a description, only a memo. Do you mean you get no 
>> warning when changing the memo ? Or do you mean you can change the 
>> transaction 
>> description of a transaction that has reconciled splits ?
> 
> I get no warning when changing the memo. I get one when changing the 
> transaction description.
> 
>> 
>>> Fonts and icons are different - due to gtk3 - and not
>>> necessarily to my liking. I had customised .gtkrc-2.0.gnucash a bit and of
>>> course this does not work any more. Unfortunately I did not figure out how
>>> to customise gtk3 on MacOS. Any help would be appreciated
>> 
>> I have updated the relevant FAQ entry:
>> https://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_change_the_register_colors.3F
> 
> Wow, this CSS stuff is cryptic. Can you enlighten me how to set font and font 
> size?
> 
> Cheers,
> Christoph 
> 
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

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


Re: Feedback about 2.7.8

2018-03-28 Thread Adrien Monteleone
Geert,

I just noticed in the sample file linked in the FAQ that the following rules 
are repeated at the top and bottom of the file:


/* Change font color by mixing with grey */
.lighter-grey-mix {
color: mix (currentColor, grey, 0.8);
}
.darker-grey-mix {
color: mix (currentColor, grey, 0.2);
}

If someone didn’t see the bottom rules and only changed the top versions, they 
wouldn’t see any change in the interface.

Is there a class/id list for the GnuCash UI so we can know what’s available to 
style? Or are those listed in the sample file the only ones available? (I’m 
also assuming other properties can be set, for example font-size in addition to 
color, etc. or is this not possible?)

Regards,
Adrien

> On Mar 28, 2018, at 10:24 AM, Geert Janssens  
> wrote:
> 
> Op woensdag 28 maart 2018 15:46:26 CEST schreef Christoph R:
>> Hi,
>> 
>> since 2.7.8 is deemed a release candidate I am giving it a try on MacOS High
>> Sierra.
>> 
>> here is my feedback so far:
> 
> Thanks for your feedback.
> 
>> It choked on one of my files, which worked fine with 2.6 and was probably
>> created with 2.4 or even earlier.  There was an out-of range date in the
>> price database which I corrected manually. But normal users would have been
>> lost.
> What was the date set to before you corrected it ? And how does it display in 
> gnucash 2.6 if you look at that particular price in the Price editor ?
> 
>> adding “EXTRA_ARGS=--nofile” to Library/Application\
>> Support/Gnucash/gnucashrc does not have any effect any more.
> 
> I never heard of a gnucashrc file. Perhaps that is/was an OS X/Quarz specific 
> extension ? The loading code on OS X has been aligned with Windows and Linux 
> in this development cycle, so perhaps it got lost in that work.
> 
>> Normal
>> accounting with aqbanking and trading accounts seems to work fine. My
>> reports are fine.
> 
> Nice :)
> 
>> Finally I can change unreconciled splits in a transaction
>> with reconciled splits again.
> 
> Yay!
> 
>> Changing account or value of a reconciled
>> split gives me the correct warning as needed. Yeah! But I can change the
>> description of a reconciled split without a warning.
> 
> Hmm, a split doesn't have a description, only a memo. Do you mean you get no 
> warning when changing the memo ? Or do you mean you can change the 
> transaction 
> description of a transaction that has reconciled splits ?
> 
>> I need to file a bug
>> report on that.
> 
>> Fonts and icons are different - due to gtk3 - and not
>> necessarily to my liking. I had customised .gtkrc-2.0.gnucash a bit and of
>> course this does not work any more. Unfortunately I did not figure out how
>> to customise gtk3 on MacOS. Any help would be appreciated
> 
> I have updated the relevant FAQ entry:
> https://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_change_the_register_colors.3F
> 
>> 
>> Besides the nitpicks above it looks pretty good. Thanks for all the good
>> work!
> 
> Thanks! I'm happy the overall result is satisfactory as the gtk update was 
> unplanned and pretty late in the development cycle.
> 
> Geert
> 
> 
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel

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


Re: Feedback about 2.7.8

2018-03-28 Thread Christoph R
Hi Geert,

> Am 28.03.2018 um 17:24 schrieb Geert Janssens :
> 
> Op woensdag 28 maart 2018 15:46:26 CEST schreef Christoph R:
> 
>> It choked on one of my files, which worked fine with 2.6 and was probably
>> created with 2.4 or even earlier.  There was an out-of range date in the
>> price database which I corrected manually. But normal users would have been
>> lost.
> What was the date set to before you corrected it ? And how does it display in 
> gnucash 2.6 if you look at that particular price in the Price editor ?

Date was 1301-09-13 00:05:08 +0053
and it shows up absolutely correct as 13.9.1301 :-)

> 
>> adding “EXTRA_ARGS=--nofile” to Library/Application\
>> Support/Gnucash/gnucashrc does not have any effect any more.
> 
> I never heard of a gnucashrc file. Perhaps that is/was an OS X/Quarz specific 
> extension ? The loading code on OS X has been aligned with Windows and Linux 
> in this development cycle, so perhaps it got lost in that work.

Yes it was parsed by the MacOS launcher script, which apparently is gone now.

>> Changing account or value of a reconciled
>> split gives me the correct warning as needed. Yeah! But I can change the
>> description of a reconciled split without a warning.
> 
> Hmm, a split doesn't have a description, only a memo. Do you mean you get no 
> warning when changing the memo ? Or do you mean you can change the 
> transaction 
> description of a transaction that has reconciled splits ?

I get no warning when changing the memo. I get one when changing the 
transaction description.

> 
>> Fonts and icons are different - due to gtk3 - and not
>> necessarily to my liking. I had customised .gtkrc-2.0.gnucash a bit and of
>> course this does not work any more. Unfortunately I did not figure out how
>> to customise gtk3 on MacOS. Any help would be appreciated
> 
> I have updated the relevant FAQ entry:
> https://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_change_the_register_colors.3F

Wow, this CSS stuff is cryptic. Can you enlighten me how to set font and font 
size?

Cheers,
Christoph 

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


Re: Feedback about 2.7.8

2018-03-28 Thread Geert Janssens
Op woensdag 28 maart 2018 15:46:26 CEST schreef Christoph R:
> Hi,
> 
> since 2.7.8 is deemed a release candidate I am giving it a try on MacOS High
> Sierra.
> 
> here is my feedback so far:

Thanks for your feedback.

> It choked on one of my files, which worked fine with 2.6 and was probably
> created with 2.4 or even earlier.  There was an out-of range date in the
> price database which I corrected manually. But normal users would have been
> lost.
What was the date set to before you corrected it ? And how does it display in 
gnucash 2.6 if you look at that particular price in the Price editor ?

> adding “EXTRA_ARGS=--nofile” to Library/Application\
> Support/Gnucash/gnucashrc does not have any effect any more.

I never heard of a gnucashrc file. Perhaps that is/was an OS X/Quarz specific 
extension ? The loading code on OS X has been aligned with Windows and Linux 
in this development cycle, so perhaps it got lost in that work.

> Normal
> accounting with aqbanking and trading accounts seems to work fine. My
> reports are fine.

Nice :)

> Finally I can change unreconciled splits in a transaction
> with reconciled splits again.

Yay!

> Changing account or value of a reconciled
> split gives me the correct warning as needed. Yeah! But I can change the
> description of a reconciled split without a warning.

Hmm, a split doesn't have a description, only a memo. Do you mean you get no 
warning when changing the memo ? Or do you mean you can change the transaction 
description of a transaction that has reconciled splits ?

> I need to file a bug
> report on that.

> Fonts and icons are different - due to gtk3 - and not
> necessarily to my liking. I had customised .gtkrc-2.0.gnucash a bit and of
> course this does not work any more. Unfortunately I did not figure out how
> to customise gtk3 on MacOS. Any help would be appreciated

I have updated the relevant FAQ entry:
https://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_change_the_register_colors.3F

> 
> Besides the nitpicks above it looks pretty good. Thanks for all the good
> work!

Thanks! I'm happy the overall result is satisfactory as the gtk update was 
unplanned and pretty late in the development cycle.

Geert


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


Re: Feedback about 2.7.8

2018-03-28 Thread Christoph R
Hi Alen,

> The description is something for me (the user) to add notes about the 
> transaction and is basically irrelevant for anyone else

we might argue about that. 

I find it at least inconsistent since the transaction description is in fact 
protected by the reconciliation of a single split.

Cheers,
Christoph

> Am 28.03.2018 um 15:54 schrieb Alen Siljak :
> 
> 
>> Sent: Wednesday, March 28, 2018 at 3:46 PM
>> From: "Christoph R" 
>> To: gnucash-devel 
>> Subject: Feedback about 2.7.8
>> But I can change the description of a reconciled split without a warning. I 
>> need to file a bug report on that.
> 
> Chris, I'm just wondering - why would a change of description require 
> re-reconciliation? 
> Somehow, I'd expect that the date and amount are the relevant fields. The 
> description is something for me (the user) to add notes about the transaction 
> and is basically irrelevant for anyone else, therefore not requiring 
> re-reconciliation with another account statement (i.e. bank or credit card 
> statement). Just wondering what your case is.
> 
> Cheers,
> 
> Alen

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


Re: Feedback about 2.7.8

2018-03-28 Thread Christoph R
> Does changing the description of a reconciled split line unreconcile the 
> transaction or does it leave the split reconciled but simply have no warning?

It leaves the split reconciled.

Cheers,
Christoph

> Am 28.03.2018 um 16:03 schrieb David Carlson :
> 
> Does changing the description of a reconciled split line unreconcile the 
> transaction or does it leave the split reconciled but simply have no warning?
> 
> David C
> 
> On Wed, Mar 28, 2018 at 8:54 AM, Alen Siljak  > wrote:
> 
> > Sent: Wednesday, March 28, 2018 at 3:46 PM
> > From: "Christoph R"  > >
> > To: gnucash-devel  > >
> > Subject: Feedback about 2.7.8
> > But I can change the description of a reconciled split without a warning. I 
> > need to file a bug report on that.
> 
> Chris, I'm just wondering - why would a change of description require 
> re-reconciliation?
> Somehow, I'd expect that the date and amount are the relevant fields. The 
> description is something for me (the user) to add notes about the transaction 
> and is basically irrelevant for anyone else, therefore not requiring 
> re-reconciliation with another account statement (i.e. bank or credit card 
> statement). Just wondering what your case is.
> 
> Cheers,
> 
> Alen
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org 
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel 
> 
> 

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


Re: Feedback about 2.7.8

2018-03-28 Thread David Carlson
Does changing the description of a reconciled split line unreconcile the
transaction or does it leave the split reconciled but simply have no
warning?

David C

On Wed, Mar 28, 2018 at 8:54 AM, Alen Siljak  wrote:

>
> > Sent: Wednesday, March 28, 2018 at 3:46 PM
> > From: "Christoph R" 
> > To: gnucash-devel 
> > Subject: Feedback about 2.7.8
> > But I can change the description of a reconciled split without a
> warning. I need to file a bug report on that.
>
> Chris, I'm just wondering - why would a change of description require
> re-reconciliation?
> Somehow, I'd expect that the date and amount are the relevant fields. The
> description is something for me (the user) to add notes about the
> transaction and is basically irrelevant for anyone else, therefore not
> requiring re-reconciliation with another account statement (i.e. bank or
> credit card statement). Just wondering what your case is.
>
> Cheers,
>
> Alen
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Feedback about 2.7.8

2018-03-28 Thread Alen Siljak

> Sent: Wednesday, March 28, 2018 at 3:46 PM
> From: "Christoph R" 
> To: gnucash-devel 
> Subject: Feedback about 2.7.8
> But I can change the description of a reconciled split without a warning. I 
> need to file a bug report on that.

Chris, I'm just wondering - why would a change of description require 
re-reconciliation? 
Somehow, I'd expect that the date and amount are the relevant fields. The 
description is something for me (the user) to add notes about the transaction 
and is basically irrelevant for anyone else, therefore not requiring 
re-reconciliation with another account statement (i.e. bank or credit card 
statement). Just wondering what your case is.

Cheers,

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


Feedback about 2.7.8

2018-03-28 Thread Christoph R
Hi,

since 2.7.8 is deemed a release candidate I am giving it a try on MacOS High 
Sierra. 

here is my feedback so far:
It choked on one of my files, which worked fine with 2.6 and was probably 
created with 2.4 or even earlier.  There was an out-of range date in the price 
database which I corrected manually. But normal users would have been lost.
adding “EXTRA_ARGS=--nofile” to Library/Application\ Support/Gnucash/gnucashrc 
does not have any effect any more. 
Normal accounting with aqbanking and trading accounts seems to work fine. My 
reports are fine.
Finally I can change unreconciled splits in a transaction with reconciled 
splits again. Changing account or value of a reconciled split gives me the 
correct warning as needed. Yeah!
But I can change the description of a reconciled split without a warning. I 
need to file a bug report on that.
Fonts and icons are different - due to gtk3 - and not necessarily to my liking. 
I had customised .gtkrc-2.0.gnucash a bit and of course this does not work any 
more. Unfortunately I did not figure out how to customise gtk3 on MacOS. Any 
help would be appreciated

Besides the nitpicks above it looks pretty good. Thanks for all the good work!

Cheers,
Christoph

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


Re: Unstable Imap Editor

2018-03-28 Thread Geert Janssens
Op woensdag 28 maart 2018 12:09:33 CEST schreef Robert Fewell:
> Could some one explain the following, trying to fix the 2nd problem as I
> thought was the simpler one...
> If I try this ...
> 
> std::vector path {IMAP_FRAME};
> if (category)
> path.emplace_back (category);
> 
> if (qof_instance_has_path_slot (QOF_INSTANCE (acc), path))
> 
> I have a slot but the following does not...
> 
> category_head = g_strdup_printf (IMAP_FRAME "/%s", category);
> 
> if (qof_instance_has_slot (QOF_INSTANCE(acc), category_head))
> 
> These two functions look like this...
> 
> bool qof_instance_has_path_slot (QofInstance const * inst,
> std::vector const & path)
> {
> return inst->kvp_data->get_slot (path) != nullptr;
> }
> 
> gboolean
> qof_instance_has_slot (const QofInstance *inst, const char *path)
> {
> return inst->kvp_data->get_slot({path}) != NULL;
> }
> 
> Does category_head need to be in a different format ?

get_slot expects a vector of path components.

In your first example that is what you pass. That path vector has two 
elements: IMAP_FRAME and category.

In the second example you pass a concatenated string that is used to 
initialize a path vector with one element. That is not what get_slot is 
expecting. It will search its internal model for this string as a key, but 
that doesn't exist. Only category exists as key. Using the vector 
specification it does work.

The primary change here is that internally gnucash is not interpreting the "/" 
as a path separator any more.

Geert


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


Re: Unstable Imap Editor

2018-03-28 Thread Robert Fewell
Could some one explain the following, trying to fix the 2nd problem as I
thought was the simpler one...
If I try this ...

std::vector path {IMAP_FRAME};
if (category)
path.emplace_back (category);

if (qof_instance_has_path_slot (QOF_INSTANCE (acc), path))

I have a slot but the following does not...

category_head = g_strdup_printf (IMAP_FRAME "/%s", category);

if (qof_instance_has_slot (QOF_INSTANCE(acc), category_head))

These two functions look like this...

bool qof_instance_has_path_slot (QofInstance const * inst,
std::vector const & path)
{
return inst->kvp_data->get_slot (path) != nullptr;
}

gboolean
qof_instance_has_slot (const QofInstance *inst, const char *path)
{
return inst->kvp_data->get_slot({path}) != NULL;
}

Does category_head need to be in a different format ?

Regards,

Bob



On 27 March 2018 at 17:33, Robert Fewell <14ubo...@gmail.com> wrote:

> It was mentioned some where it was slow to load so thought I would have a
> look.
>
> Dropping the GtkTreeModel has improved that but that has highlighted a
> couple of problems so far...
>
> 1st, when retrieving 'import-map-bays', the list consists of the number of
> tokens squared like this...
>  imported 1 transaction which results in 3 tokens and 1 transaction which
> results in 2 tokens in the file which then leads to 25 entries in the
> treeview.
>
> So for the above the list coming back from 'gnc_account_imap_get_info_bayes'
> is 25 entries.
>
> 2nd, when retrieving 'import-map', the list is empty despite having this
> entry...
>
>   Checking Account
>   
> 
>   import-map
>   
> 
>   desc
>   
> 
>   'MY HEALTH
>   32282cd8503549af9cf62265df11b3
> c7
> 
>   
> 
>   
> 
>
> It seems that in account.cpp line 5642 which is..
>
> if (qof_instance_has_slot (QOF_INSTANCE(acc), category_head))
>
> is returning false despite category_head being 'import-map/desc'
>
> Hopefully I will get it sorted and create a PR for it.
>
> Bob
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel