Re: [GNC-dev] Problem retrieving online quotes

2023-04-29 Thread Herbert Thoma

Am 29.04.23 um 22:11 schrieb John Ralls:




On Apr 29, 2023, at 12:56 PM, Herbert Thoma  
wrote:

Hi!

when I press the "get online quotes" button
finance-quote-wrapper gets called, but it runs forever (at least
a few hours, then I killed it).

I patched libgnucash/app-utils/gnc-quotes.cpp to write the json
string to a file before it is passed to finance-quote-wrapper.
This string looks good to me.

When I pass the string to finance-quote-wrapper on the command line,
it spawns a few error messages of the form
"Use of uninitialized value in sprintf at 
/usr/lib/perl5/site_perl/5.26.1/Finance/Quote/YahooJSON.pm line 168"
but it produces an output that looks good to me as well.

There are about 60 different stocks/funds/currencies in the
request, the return string is about 20 kByte.

Any idea how I could debug this further?

Herbert.

PS: Getting online quotes used to work with GnuCash 4.x for me.


First, if you're not using a current git stable, do.


I am using current git stable.


Then attach a debugger to see what it's doing.


It's been a while since I last used gdb ...

OK, will try. What do I need to pass to cmake to get a debug build?

 Herbert.


Regards,
John Ralls

___
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


[GNC-dev] Problem retrieving online quotes

2023-04-29 Thread Herbert Thoma

Hi!

when I press the "get online quotes" button
finance-quote-wrapper gets called, but it runs forever (at least
a few hours, then I killed it).

I patched libgnucash/app-utils/gnc-quotes.cpp to write the json
string to a file before it is passed to finance-quote-wrapper.
This string looks good to me.

When I pass the string to finance-quote-wrapper on the command line,
it spawns a few error messages of the form
"Use of uninitialized value in sprintf at 
/usr/lib/perl5/site_perl/5.26.1/Finance/Quote/YahooJSON.pm line 168"
but it produces an output that looks good to me as well.

There are about 60 different stocks/funds/currencies in the
request, the return string is about 20 kByte.

Any idea how I could debug this further?

 Herbert.

PS: Getting online quotes used to work with GnuCash 4.x for me.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Error building stable

2023-04-03 Thread Herbert Thoma

Hi John,

thanks for your detailed explaination.

Actually I am a bit surprised now that openSUSE ships such an
old (outdated) gcc. Everything used to work with GnuCash 4.x, so I never cared.

I installed one of the community builds of gcc 12 and it builds and runs just 
fine.

Thanks again for your support!

Best regards,
 Herbert

Am 03.04.23 um 00:30 schrieb John Ralls:

Herbert,

gcc 8 is the minimum required since 2019: 
https://github.com/Gnucash/gnucash/commit/e4bbf7257f6555808ffbac85e446ed0cb53c6015

According to https://software.opensuse.org/package/gcc there's no official gcc package 
for leap 15.4, but there are three community builds of gcc 12 and an experimental build 
of gcc 13. Under the heading "Unsupported distributions The following distributions 
are not officially supported. Use these packages at your own risk." it lists 
official releases and updates for gcc 7 under Leap 15.0, 15.1, and 15.2... so I guess 
building software isn't a supported activity on openSuSE. Maybe you should consider a 
different distro.

In case you insist on using this obsolete compiler, I found an old Ubuntu 18.04 
VM that has gcc 7.5 and built GnuCash all the way through.

Although the static char* empty is easy to fix (and is actually wrong for a 
different reason), the next problem in gcc 7.5 is
   gnucash/gnome/dialog-report-column-view.cpp:533:29: error: unused variable 
‘id’ [-Werror=unused-variable]
  auto [id, wide, high] = r->contents_list[r->contents_selected];
and the correct work-around (since 8 and later recognize that unless an rv is 
marked no discard in the function decl that it's normal to not use all of the 
values returned in a structured binding) of marking the decl with 
[[maybe_unused]] doesn't work:

gnucash/gnome/dialog-report-column-view.cpp:533:46: error: unused variable ‘id’ 
[-Werror=unused-variable]
  [[maybe_unused]] auto [id, wide, high] =
   ^
so to get it to build on gcc 7 one must
--- a/gnucash/gnome/dialog-report-column-view.cpp
+++ b/gnucash/gnome/dialog-report-column-view.cpp
@@ -530,7 +530,11 @@ gnc_column_view_edit_size_cb(GtkButton * button, gpointer 
user_data)
  
  if (r->contents_list.size() > static_cast(r->contents_selected))

  {
-auto [id, wide, high] = r->contents_list[r->contents_selected];
+#pragma GCC diagnostic push
+#pragma GCC diagnostic warning "-Wunused-variable"
+[[maybe_unused]] auto [id, wide, high] =
+r->contents_list[r->contents_selected];
+#pragma GCC diagnostic pop
  
  gtk_spin_button_set_value(GTK_SPIN_BUTTON(colspin),

static_cast(wide));

I'm not willing to do that to support a compiler that we said we don't 4 years 
ago, but the beauty of free software is that you can patch your own repo.

Once it all builds it fails a test:
/home/john/gnucash-git/libgnucash/engine/test/test-gnc-guid.cpp:82: Failure
Value of: fail
   Actual: false
Expected: true
Parsing the bogus string should throw

That's not good, it means that passing an invalid string to create a GUID will 
generate bogus output instead of signaling an error. I don't know why it's not 
throwing and I'm not sufficiently motivated to debug it. IMO it's far safer to 
upgrade to a more up-to-date compiler.

Regards,
John Ralls


On Apr 2, 2023, at 10:59 AM, Herbert Thoma  
wrote:

Am 02.04.23 um 19:23 schrieb john:

Herbert,
Hmm, I tested with gcc 8, 9, 10, and 12 . What version are you using?


gcc --version
gcc (SUSE Linux) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.

This is the latest stable open SUSE 15.4

Herbert.


The SWIG version doesn't matter as long as it's at least 3.0.12.
Regards,
John Ralls

On Apr 2, 2023, at 8:59 AM, Herbert Thoma  
wrote:

Hi John, Maarten,

thnaks for the fixes. This error is now gone on my machine.
But it finds another one a bit later:

[ 20%] Building CXX object 
bindings/guile/CMakeFiles/gnucash-guile.dir/swig-engine.cpp.o
/home/tma/gnucash/gnucash_cvs/build_stable/bindings/guile/swig-engine.cpp: In 
function ‘GncMultichoiceOptionIndexVec scm_to_multichoices(SCM, const 
GncOptionMultichoiceValue&)’:
/home/tma/gnucash/gnucash_cvs/build_stable/bindings/guile/swig-engine.cpp:2153:28:
 error: variable ‘empty’ set but not used [-Werror=unused-but-set-variable]
 static const char* empty{""};
^
cc1plus: all warnings being treated as errors

I understand that this is an autogenerated file. My version of swig is:

SWIG Version 3.0.12

Compiled with g++ [x86_64-suse-linux-gnu]

Configured options: +pcre

Best,
Herbert.

Am 02.04.23 um 17:36 schrieb john:

On Apr 2, 2023, at 1:38 AM, Maarten Bosmans  wrote:

Op ma 27 mrt 2023 om 17:59 schreef Herbert Thoma
:

/home/tma/gnucash/gnucash_cvs/gnucash_stable/libgnucash/engine/gnc-option.cpp:448:35:
   required from here
/home/tma/gnucash/gnucash_cvs/gnucash_stable/l

Re: [GNC-dev] Error building stable

2023-04-02 Thread Herbert Thoma

Am 02.04.23 um 19:23 schrieb john:

Herbert,

Hmm, I tested with gcc 8, 9, 10, and 12 . What version are you using?


gcc --version
gcc (SUSE Linux) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.

This is the latest stable open SUSE 15.4

 Herbert.


The SWIG version doesn't matter as long as it's at least 3.0.12.

Regards,
John Ralls


On Apr 2, 2023, at 8:59 AM, Herbert Thoma  
wrote:

Hi John, Maarten,

thnaks for the fixes. This error is now gone on my machine.
But it finds another one a bit later:

[ 20%] Building CXX object 
bindings/guile/CMakeFiles/gnucash-guile.dir/swig-engine.cpp.o
/home/tma/gnucash/gnucash_cvs/build_stable/bindings/guile/swig-engine.cpp: In 
function ‘GncMultichoiceOptionIndexVec scm_to_multichoices(SCM, const 
GncOptionMultichoiceValue&)’:
/home/tma/gnucash/gnucash_cvs/build_stable/bindings/guile/swig-engine.cpp:2153:28:
 error: variable ‘empty’ set but not used [-Werror=unused-but-set-variable]
 static const char* empty{""};
^
cc1plus: all warnings being treated as errors

I understand that this is an autogenerated file. My version of swig is:

SWIG Version 3.0.12

Compiled with g++ [x86_64-suse-linux-gnu]

Configured options: +pcre

Best,
Herbert.

Am 02.04.23 um 17:36 schrieb john:

On Apr 2, 2023, at 1:38 AM, Maarten Bosmans  wrote:

Op ma 27 mrt 2023 om 17:59 schreef Herbert Thoma
:

/home/tma/gnucash/gnucash_cvs/gnucash_stable/libgnucash/engine/gnc-option.cpp:448:35:
   required from here
/home/tma/gnucash/gnucash_cvs/gnucash_stable/libgnucash/engine/gnc-option-impl.hpp:331:45:
 error: variable ‘value’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors


This is fixed in my PR #1582  (
https://github.com/Gnucash/gnucash/pull/1582/commits/9a3316bea883e46737abc12d35e76e625de3c2e2
)
I still need to push a new version of that though, taking care of all
the review remarks that I got.

That along with other workarounds for deficiencies in gcc 8 & 9, is already 
committed in 
https://github.com/Gnucash/gnucash/commit/9fa2a48fe17ead2791b9481ef9ce61a2ac8ddbeb.
Regards,
John Ralls
___
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


--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Applications Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: herbert.th...@iis.fraunhofer.de
www: http://www.iis.fraunhofer.de/

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


Re: [GNC-dev] Error building stable

2023-04-02 Thread Herbert Thoma

Hi John, Maarten,

thnaks for the fixes. This error is now gone on my machine.
But it finds another one a bit later:

[ 20%] Building CXX object 
bindings/guile/CMakeFiles/gnucash-guile.dir/swig-engine.cpp.o
/home/tma/gnucash/gnucash_cvs/build_stable/bindings/guile/swig-engine.cpp: In 
function ‘GncMultichoiceOptionIndexVec scm_to_multichoices(SCM, const 
GncOptionMultichoiceValue&)’:
/home/tma/gnucash/gnucash_cvs/build_stable/bindings/guile/swig-engine.cpp:2153:28:
 error: variable ‘empty’ set but not used [-Werror=unused-but-set-variable]
 static const char* empty{""};
^
cc1plus: all warnings being treated as errors

I understand that this is an autogenerated file. My version of swig is:

SWIG Version 3.0.12

Compiled with g++ [x86_64-suse-linux-gnu]

Configured options: +pcre

Best,
 Herbert.

Am 02.04.23 um 17:36 schrieb john:




On Apr 2, 2023, at 1:38 AM, Maarten Bosmans  wrote:

Op ma 27 mrt 2023 om 17:59 schreef Herbert Thoma
:

/home/tma/gnucash/gnucash_cvs/gnucash_stable/libgnucash/engine/gnc-option.cpp:448:35:
   required from here
/home/tma/gnucash/gnucash_cvs/gnucash_stable/libgnucash/engine/gnc-option-impl.hpp:331:45:
 error: variable ‘value’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors


This is fixed in my PR #1582  (
https://github.com/Gnucash/gnucash/pull/1582/commits/9a3316bea883e46737abc12d35e76e625de3c2e2
)
I still need to push a new version of that though, taking care of all
the review remarks that I got.


That along with other workarounds for deficiencies in gcc 8 & 9, is already 
committed in 
https://github.com/Gnucash/gnucash/commit/9fa2a48fe17ead2791b9481ef9ce61a2ac8ddbeb.

Regards,
John Ralls
___
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: [GNC-dev] Error building stable

2023-03-27 Thread Herbert Thoma
alue, GncOptionAccountSelValue, 
GncOptionMultichoiceValue, GncOptionRangeValue, GncOptionRangeValue, GncOptionCommodityValue, GncOptionDateValue>&)>; _Result_type = std::basic_istream&; _Visitor = GncOption::in_stream(std::istream&)::&&; long unsigned int ...__dimensions = {14}; _Variants = 
{std::variant, std::allocator > >, GncOptionValue, GncOptionValue, GncOptionQofInstanceValue, GncOptionGncOwnerValue, GncOptionValue, GncOptionValue, std::allocator > > >, GncOptionAccountListValue, GncOptionAccountSelValue, GncOptionMultichoiceValue, GncOptionRangeValue, GncOptionRangeValue, GncOptionCommodityValue, GncOptionDateValue>&}; long unsigned int ...__indices = {}]’
/usr/include/c++/7/variant:659:39:   required from ‘constexpr const std::__detail::__variant::_Multi_array& (*)(GncOption::in_stream(std::istream&)::&&, std::variant, 
std::allocator > >, GncOptionValue, GncOptionValue, GncOptionQofInstanceValue, GncOptionGncOwnerValue, GncOptionValue, GncOptionValue, std::allocator > > >, GncOptionAccountListValue, GncOptionAccountSelValue, GncOptionMultichoiceValue, GncOptionRangeValue, GncOptionRangeValue, GncOptionCommodityValue, GncOptionDateValue>&), 14> std::__detail::__variant::__gen_vtable&, 
GncOption::in_stream(std::istream&)::&&, std::variant, std::allocator > >, GncOptionValue, GncOptionValue, GncOptionQofInstanceValue, GncOptionGncOwnerValue, 
GncOptionValue, GncOptionValue, std::allocator > > >, GncOptionAccountListValue, GncOptionAccountSelValue, GncOptionMultichoiceValue, GncOptionRangeValue, 
GncOptionRangeValue, GncOptionCommodityValue, GncOptionDateValue>&>::_S_vtable’
/usr/include/c++/7/variant:711:29:   required from ‘struct std::__detail::__variant::__gen_vtable&, 
GncOption::in_stream(std::istream&)::&&, std::variant, std::allocator 
> >, GncOptionValue, GncOptionValue, GncOptionQofInstanceValue, GncOptionGncOwnerValue, GncOptionValue, 
GncOptionValue, std::allocator > > >, 
GncOptionAccountListValue, GncOptionAccountSelValue, GncOptionMultichoiceValue, GncOptionRangeValue, GncOptionRangeValue, GncOptionCommodityValue, GncOptionDateValue>&>’
/usr/include/c++/7/variant:1255:23:   required from ‘constexpr decltype(auto) std::visit(_Visitor&&, _Variants&& ...) [with _Visitor = 
GncOption::in_stream(std::istream&)::; _Variants = {std::variant, 
std::allocator > >, GncOptionValue, GncOptionValue, GncOptionQofInstanceValue, GncOptionGncOwnerValue, GncOptionValue, 
GncOptionValue, std::allocator > > >, 
GncOptionAccountListValue, GncOptionAccountSelValue, GncOptionMultichoiceValue, GncOptionRangeValue, GncOptionRangeValue, GncOptionCommodityValue, GncOptionDateValue>&}]’
/home/tma/gnucash/gnucash_cvs/gnucash_stable/libgnucash/engine/gnc-option.cpp:448:35:
   required from here
/home/tma/gnucash/gnucash_cvs/gnucash_stable/libgnucash/engine/gnc-option-impl.hpp:331:45:
 error: variable ‘value’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
make[2]: *** [libgnucash/engine/CMakeFiles/gnc-engine.dir/build.make:548: 
libgnucash/engine/CMakeFiles/gnc-engine.dir/gnc-option.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:4486: 
libgnucash/engine/CMakeFiles/gnc-engine.dir/all] Fehler 2
make: *** [Makefile:166: all] Fehler 2




Regards,
John Ralls



On Mar 27, 2023, at 8:59 AM, Herbert Thoma  
wrote:

Hi!

I tried to build the current stable branch and got the following error:

[ 10%] Building CXX object 
libgnucash/engine/CMakeFiles/gnc-engine.dir/gnc-option.cpp.o
In file included from 
/home/tma/gnucash/gnucash_cvs/gnucash_stable/libgnucash/engine/gnc-option.cpp:25:0:



/home/tma/gnucash/gnucash_cvs/gnucash_stable/libgnucash/engine/gnc-option.cpp:448:35:
   required from here
/home/tma/gnucash/gnucash_cvs/gnucash_stable/libgnucash/engine/gnc-option-impl.hpp:331:45:
 error: variable ‘value’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors


The last 4.x maint branch compiled for me, but I updated the OS in the meantime

openSUSE 13.4
gcc 7.5.0

Herbert.
___
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


[GNC-dev] Error building stable

2023-03-27 Thread Herbert Thoma

Hi!

I tried to build the current stable branch and got the following error:

[ 10%] Building CXX object 
libgnucash/engine/CMakeFiles/gnc-engine.dir/gnc-option.cpp.o
In file included from 
/home/tma/gnucash/gnucash_cvs/gnucash_stable/libgnucash/engine/gnc-option.cpp:25:0:



/home/tma/gnucash/gnucash_cvs/gnucash_stable/libgnucash/engine/gnc-option.cpp:448:35:
   required from here
/home/tma/gnucash/gnucash_cvs/gnucash_stable/libgnucash/engine/gnc-option-impl.hpp:331:45:
 error: variable ‘value’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors


The last 4.x maint branch compiled for me, but I updated the OS in the meantime

openSUSE 13.4
gcc 7.5.0

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


Re: [GNC-dev] No graphical reports on openSUSE 15.2

2020-09-06 Thread Herbert Thoma

Am 06.09.20 um 13:25 schrieb Christopher Lam:

The advice has usually been to run from install dir.


OK, graphical reports work when installing and running from the install dir.

After installing the script tag points to a reasonable location:


> Not sure why build dir cannot show reports anymore.

The GnuCash 3.9 that comes with openSUSE 15.2 uses another script


I am pretty sure that I built 3.9 also myself and that this worked from the 
build dir.

So I think it is likely that graphical reports stopped working from the build 
dir
when the reports were changed from jqplot to chartjs.

Is this a bug? Should I add this to bugzilla?



On Sun, 6 Sep 2020, 6:33 pm Herbert Thoma, mailto:herbert.th...@iis.fraunhofer.de>> wrote:

Am 06.09.20 um 11:32 schrieb Christopher Lam:
 > I suspect that ChartJS isn't being loaded at all. Check the html for the 
 tag and whether it's pointing correctly to your Chart.bundle.min.js

I have:
<body bgcolor="#ff"><script language="javascript" type="text/javascript" 
src="file:///">

 > Are you running from the build dir instead of the install dir by any 
chance?

Yes. I'm running from the build dir. I am pretty sure that graphical reports
worked from the build dir for GnuCash 3.x. Is this no longer the case?

There is a borrowed/chartjs/Chart.bundle.min.js file in the source dir
and a borrowed/chartjs directory in the build dir, but only cmake files and
a Makefile are in this directory.

 > On Sun, 6 Sep 2020 at 08:40, Herbert Thoma mailto:herbert.th...@iis.fraunhofer.de> <mailto:herbert.th...@iis.fraunhofer.de 
<mailto:herbert.th...@iis.fraunhofer.de>>> wrote:
 >
 >     Am 05.09.20 um 19:13 schrieb Christopher Lam:
 >      > Not sure why this would fail. Edit html-chart.scm and delete the relevant 
(push "Chart"...) line. My setup successfully sets the Chart option. If this fails 
then I'm not sure, you'll have to dig in.
 >
 >     If I comment out the line, then I get the
 >     ReferenceError: Can't find variable: Chart
 >     somewhere else:
 >
 >     // draw the background color
 >     Chart.pluginService.register({
 >         beforeDraw: function (chart, easing) {
 >
 >     I really would like to debug this, but I have no clue about
 >     java script. So any hints on where to start are very welcome.
 >
 >      >
 >      > On Sat, 5 Sep 2020 at 16:47, Herbert Thoma mailto:herbert.th...@iis.fraunhofer.de> <mailto:herbert.th...@iis.fraunhofer.de 
<mailto:herbert.th...@iis.fraunhofer.de>> <mailto:herbert.th...@iis.fraunhofer.de 
<mailto:herbert.th...@iis.fraunhofer.de> <mailto:herbert.th...@iis.fraunhofer.de 
<mailto:herbert.th...@iis.fraunhofer.de>>>> wrote:
 >      >
 >      >     Am 05.09.20 um 17:28 schrieb Christopher Lam:
 >      >      > What happens with combined reports eg net worth line chart 
with display/table enabled?
 >      >
 >      >     I see the table, no chart.
 >      >
 >      >      > Try right click the blank page and open the WebKit 
inspector, and report the console messages. Maybe chartjs is not being found.
 >      >
 >      >     I get 2 errors:
 >      >
 >      >     SystaxError: Unexpected token '<'
 >      >        (anonymous function) --- file:///:1
 >      >
 >      >     This one I think is a bit strange, because it points to the 
first line in the report html code.
 >      >
 >      >
 >      >     ReferenceError: Can't find variable: Chart
 >      >        Global Code --- gnc-report-7J8DQ0.html:185
 >      >
 >      >     here the line in the code is:
 >      >     Chart.defaults.global.defaultFontFamily = "'Trebuchet MS', Arial, 
Helvetica, sans-serif";
 >      >
 >      >
 >      >        Herbert.
 >      >
 >      >      > On Sat, 5 Sep 2020, 10:41 pm Herbert Thoma, mailto:herbert.th...@iis.fraunhofer.de> 
<mailto:herbert.th...@iis.fraunhofer.de <mailto:herbert.th...@iis.fraunhofer.de>> <mailto:herbert.th...@iis.fraunhofer.de <mailto:herbert.th...@iis.fraunhofer.de> 
<mailto:herbert.th...@iis.fraunhofer.de <mailto:herbert.th...@iis.fraunhofer.de>>> <mailto:herbert.th...@iis.fraunhofer.de 
<mailto:herbert.th...@iis.fraunhofer.de> <mailto:herbert.th...@iis.fraunhofer.de <mailto:herbert.th...@iis.fraunhofer.de>> <mailto:herbert.th...@iis.fraunhofer.de 
<mailto:herbert.th...@iis.fraunhofer.de> <mailto:herbert.th...@iis.fraunhofer.de <mailto:herbert.th...@iis.f

Re: [GNC-dev] No graphical reports on openSUSE 15.2

2020-09-06 Thread Herbert Thoma

Am 06.09.20 um 11:32 schrieb Christopher Lam:

I suspect that ChartJS isn't being loaded at all. Check the html for the 
 tag and whether it's pointing correctly to your Chart.bundle.min.js
</pre></blockquote><pre style="margin: 0em;">

I have:
<body bgcolor="#ff"><script language="javascript" type="text/javascript" 
src="file:///">


Are you running from the build dir instead of the install dir by any chance?


Yes. I'm running from the build dir. I am pretty sure that graphical reports
worked from the build dir for GnuCash 3.x. Is this no longer the case?

There is a borrowed/chartjs/Chart.bundle.min.js file in the source dir
and a borrowed/chartjs directory in the build dir, but only cmake files and
a Makefile are in this directory.


On Sun, 6 Sep 2020 at 08:40, Herbert Thoma mailto:herbert.th...@iis.fraunhofer.de>> wrote:

Am 05.09.20 um 19:13 schrieb Christopher Lam:
 > Not sure why this would fail. Edit html-chart.scm and delete the relevant (push 
"Chart"...) line. My setup successfully sets the Chart option. If this fails then 
I'm not sure, you'll have to dig in.

If I comment out the line, then I get the
ReferenceError: Can't find variable: Chart
somewhere else:

// draw the background color
Chart.pluginService.register({
    beforeDraw: function (chart, easing) {

I really would like to debug this, but I have no clue about
java script. So any hints on where to start are very welcome.

 >
 > On Sat, 5 Sep 2020 at 16:47, Herbert Thoma mailto:herbert.th...@iis.fraunhofer.de> <mailto:herbert.th...@iis.fraunhofer.de 
<mailto:herbert.th...@iis.fraunhofer.de>>> wrote:
 >
 >     Am 05.09.20 um 17:28 schrieb Christopher Lam:
 >      > What happens with combined reports eg net worth line chart with 
display/table enabled?
 >
 >     I see the table, no chart.
 >
 >      > Try right click the blank page and open the WebKit inspector, and 
report the console messages. Maybe chartjs is not being found.
 >
 >     I get 2 errors:
 >
 >     SystaxError: Unexpected token '<'
 >        (anonymous function) --- file:///:1
 >
 >     This one I think is a bit strange, because it points to the first 
line in the report html code.
 >
 >
 >     ReferenceError: Can't find variable: Chart
 >        Global Code --- gnc-report-7J8DQ0.html:185
 >
 >     here the line in the code is:
 >     Chart.defaults.global.defaultFontFamily = "'Trebuchet MS', Arial, 
Helvetica, sans-serif";
 >
 >
 >        Herbert.
 >
 >      > On Sat, 5 Sep 2020, 10:41 pm Herbert Thoma, mailto:herbert.th...@iis.fraunhofer.de> <mailto:herbert.th...@iis.fraunhofer.de 
<mailto:herbert.th...@iis.fraunhofer.de>> <mailto:herbert.th...@iis.fraunhofer.de 
<mailto:herbert.th...@iis.fraunhofer.de> <mailto:herbert.th...@iis.fraunhofer.de 
<mailto:herbert.th...@iis.fraunhofer.de>>>> wrote:
 >      >
 >      >     Hi!
 >      >
 >      >     I built GnuCash on openSUSE 15.2. from git. Everything works 
as expected,
 >      >     with one exception: graphical reports are not displayed. Text 
reports work.
 >      >
 >      >     I exported a report as html and tested in firefox. This 
displays an empty
 >      >     page, too.
 >      >
 >      >     openSUSE 15.2 comes with a packaged GnuCash 3.9, there the 
graphical
 >      >     reports work.
 >      >
 >      >     Any ideas why the reports don't work?
 >      >     Any hints how I could debug this?
 >      >
 >      >        Herbert.
 >      >
 >      >     ___
 >      >     gnucash-devel mailing list
 >      > gnucash-devel@gnucash.org <mailto:gnucash-devel@gnucash.org> <mailto:gnucash-devel@gnucash.org 
<mailto:gnucash-devel@gnucash.org>> <mailto:gnucash-devel@gnucash.org <mailto:gnucash-devel@gnucash.org> 
<mailto:gnucash-devel@gnucash.org <mailto:gnucash-devel@gnucash.org>>>
 >      > https://lists.gnucash.org/mailman/listinfo/gnucash-devel
 >      >
 >



--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Applications Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: herbert.th...@iis.fraunhofer.de
www: http://www.iis.fraunhofer.de/

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


Re: [GNC-dev] No graphical reports on openSUSE 15.2

2020-09-06 Thread Herbert Thoma

Am 05.09.20 um 19:13 schrieb Christopher Lam:

Not sure why this would fail. Edit html-chart.scm and delete the relevant (push 
"Chart"...) line. My setup successfully sets the Chart option. If this fails 
then I'm not sure, you'll have to dig in.


If I comment out the line, then I get the
ReferenceError: Can't find variable: Chart
somewhere else:

// draw the background color
Chart.pluginService.register({
  beforeDraw: function (chart, easing) {

I really would like to debug this, but I have no clue about
java script. So any hints on where to start are very welcome.



On Sat, 5 Sep 2020 at 16:47, Herbert Thoma mailto:herbert.th...@iis.fraunhofer.de>> wrote:

Am 05.09.20 um 17:28 schrieb Christopher Lam:
 > What happens with combined reports eg net worth line chart with 
display/table enabled?

I see the table, no chart.

 > Try right click the blank page and open the WebKit inspector, and report 
the console messages. Maybe chartjs is not being found.

I get 2 errors:

SystaxError: Unexpected token '<'
   (anonymous function) --- file:///:1

This one I think is a bit strange, because it points to the first line in 
the report html code.


ReferenceError: Can't find variable: Chart
   Global Code --- gnc-report-7J8DQ0.html:185

here the line in the code is:
Chart.defaults.global.defaultFontFamily = "'Trebuchet MS', Arial, Helvetica, 
sans-serif";


   Herbert.

 > On Sat, 5 Sep 2020, 10:41 pm Herbert Thoma, mailto:herbert.th...@iis.fraunhofer.de> <mailto:herbert.th...@iis.fraunhofer.de 
<mailto:herbert.th...@iis.fraunhofer.de>>> wrote:
 >
 >     Hi!
 >
 >     I built GnuCash on openSUSE 15.2. from git. Everything works as 
expected,
 >     with one exception: graphical reports are not displayed. Text 
reports work.
 >
 >     I exported a report as html and tested in firefox. This displays an 
empty
 >     page, too.
 >
 >     openSUSE 15.2 comes with a packaged GnuCash 3.9, there the graphical
 >     reports work.
 >
 >     Any ideas why the reports don't work?
 >     Any hints how I could debug this?
 >
 >        Herbert.
 >
 >     ___
 >     gnucash-devel mailing list
 > gnucash-devel@gnucash.org <mailto:gnucash-devel@gnucash.org> 
<mailto:gnucash-devel@gnucash.org <mailto: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: [GNC-dev] No graphical reports on openSUSE 15.2

2020-09-05 Thread Herbert Thoma

Am 05.09.20 um 17:28 schrieb Christopher Lam:

What happens with combined reports eg net worth line chart with display/table 
enabled?


I see the table, no chart.


Try right click the blank page and open the WebKit inspector, and report the 
console messages. Maybe chartjs is not being found.


I get 2 errors:

SystaxError: Unexpected token '<'
 (anonymous function) --- file:///:1

This one I think is a bit strange, because it points to the first line in the 
report html code.


ReferenceError: Can't find variable: Chart
 Global Code --- gnc-report-7J8DQ0.html:185

here the line in the code is:
Chart.defaults.global.defaultFontFamily = "'Trebuchet MS', Arial, Helvetica, 
sans-serif";


 Herbert.


On Sat, 5 Sep 2020, 10:41 pm Herbert Thoma, mailto:herbert.th...@iis.fraunhofer.de>> wrote:

Hi!

I built GnuCash on openSUSE 15.2. from git. Everything works as expected,
with one exception: graphical reports are not displayed. Text reports work.

I exported a report as html and tested in firefox. This displays an empty
page, too.

openSUSE 15.2 comes with a packaged GnuCash 3.9, there the graphical
reports work.

Any ideas why the reports don't work?
Any hints how I could debug this?

   Herbert.

___
gnucash-devel mailing list
gnucash-devel@gnucash.org <mailto: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


[GNC-dev] No graphical reports on openSUSE 15.2

2020-09-05 Thread Herbert Thoma

Hi!

I built GnuCash on openSUSE 15.2. from git. Everything works as expected,
with one exception: graphical reports are not displayed. Text reports work.

I exported a report as html and tested in firefox. This displays an empty
page, too.

openSUSE 15.2 comes with a packaged GnuCash 3.9, there the graphical
reports work.

Any ideas why the reports don't work?
Any hints how I could debug this?

 Herbert.

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


Re: [GNC-dev] End of 'X' date on 3.4-50 (maint)

2019-02-02 Thread Herbert Thoma

Am 02.02.19 um 00:27 schrieb Wm via gnucash-devel:

On 30/01/2019 01:54, Stephen M. Butler wrote:

I compiled origin/maint (gnucash 3.4-50) and noticed that the end of
accounting period was at 12/31/2020 while the start of accounting period
is at 1/1/2019.

Checked:

* Today:  1/29/2019


what the fuck do you expect if you are using american dates


Hmm, I would think that the problem is not the backwards US date
format. I would rather think that if the start of accounting
period is 1/1/2019, then the end should be 12/31/20*19* instead
of 12/31/20*20*.


this is not news.


This seems to me like a bug.


___
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: [GNC-dev] emojis everywhere, seeking understanding / clarity / opinion

2018-04-12 Thread Herbert Thoma

This is a really strange discussion ...

Am 12.04.2018 um 17:01 schrieb Wm via gnucash-devel:

<...>


Disagree strongly.  Show me a swastika and I have an emotion.  Don't care if it 
is new amerika Trump supporters or not ... and I'm not from a jewish background.

Why can you not see that these emoticons / glyphs / whatever have meaning ?

What is there to be denied ?

Why is "I hate women" OK in an emoticon but not in an account description ?


How should the developers prohibit that any user names an account "I hate 
women"?
Or "I love Trump"?

Any string can hold any unicode character and the user is free to edit any 
string
as he pleases. And this is a *good thing* (TM).

If you don't like emoticons or account names like "I hate women" then just don't
use such strings. But you should not impose your view of the world onto other 
users.

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


Re: [GNC-dev] guile error during build

2018-04-08 Thread Herbert Thoma

Hi John,

Am 08.04.2018 um 18:45 schrieb John Ralls:




On Apr 8, 2018, at 3:04 AM, Herbert Thoma <herbert.th...@iis.fraunhofer.de> 
wrote:

This message had the subject "Building GnuCash 3 on openSuSE".
May be that did not raise enough attention ...

So, any hints from anybody with more scheme knowledge is greatly
appreciated.



<...>

With this environment set cmake completes, but make aborts with this
error:

[ 30%] Built target scm-gnc-module
Scanning dependencies of target scm-core-utils
[ 30%] Generating ../../lib64/gnucash/scm/ccache/2.0/gnucash/core-utils.go
Backtrace:
In srfi/srfi-1.scm:
619: 19 [for-each # #]


<...>


Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

Any suggestions?

gcc --version
gcc (SUSE Linux) 4.8.5

guile --version
guile (GNU Guile) 2.0.9


Frank did reply to your first email, though he didn’t address the missing 
gnc-build-userdata-path.


Yes, I saw that.


Delete ~/.cache/guile


Did not help.

Make sure that you’re building from a completely clean source, in a completely clean build directory, and installing to a prefix with no //gnucash. 


I started from a fresh git clone, so this should be OK.


Make sure that there are no cached gnucash files anywhere guile can find them: 
You make need to fuddle guile’s search paths if you have gnucash installed from 
the package manager in /usr. I don’t know how to do that. The OpenSuSE packager 
hangs out on IRC with the nick luc14n0 and he might be able to help.


I'll fiddle with this when I find more spare time. Or just try it in a fresh VM.

Thanks for your suggestions.

Best regards,
 Herbert.


Regards,
John Ralls


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


[GNC-dev] guile error during build

2018-04-08 Thread Herbert Thoma

This message had the subject "Building GnuCash 3 on openSuSE".
May be that did not raise enough attention ...

So, any hints from anybody with more scheme knowledge is greatly
appreciated.


Hi!

I did not build GnuCash myself for some time, but with 3.0 I did
try again.

I'm running openSUSE Leap 42.3.

So the first error was about gettext being only version 0.19.2.
OK, this is easily circumvented with -D ALLOW_OLD_GETTEXT=ON,
but still a bit unfortunate because openSUSE Leap 42.3 ships only
0.19.2 and openSUSE Leap 42.3 is the most recent stable openSUSE
distribution.

Next problem was GTEST. openSUSE Leap 42.3 has a package libgtest0,
but this does not help. So I downloaded googletest and set the
GTEST_ROOT and GMOCK_ROOT variables.

With this environment set cmake completes, but make aborts with this
error:

[ 30%] Built target scm-gnc-module
Scanning dependencies of target scm-core-utils
[ 30%] Generating ../../lib64/gnucash/scm/ccache/2.0/gnucash/core-utils.go
Backtrace:
In srfi/srfi-1.scm:
 619: 19 [for-each # #]
In scripts/compile.scm:
 182: 18 [# 
"/home/tma/gnucash/gnucash_cvs/gnucash/libgnucash/core-utils/core-utils.scm"]
In system/base/target.scm:
  59: 17 [with-target "x86_64-suse-linux-gnu" ...]
In system/base/compile.scm:
 150: 16 [compile-file 
"/home/tma/gnucash/gnucash_cvs/gnucash/libgnucash/core-utils/core-utils.scm" 
...]
  43: 15 [call-once #]
In ice-9/boot-9.scm:
 171: 14 [with-throw-handler #t ...]
In system/base/compile.scm:
  59: 13 [#]
 153: 12 [# #]
 216: 11 [read-and-compile # #:from ...]
 232: 10 [lp (# # # # ...) # #]
 180: 9 [lp # # # ...]
In ice-9/boot-9.scm:
2320: 8 [save-module-excursion #]
In language/scheme/compile-tree-il.scm:
  31: 7 [#]
In ice-9/psyntax.scm:
1091: 6 [expand-top-sequence ((re-export gnc-build-userdata-path)) () ...]
 976: 5 [scan ((re-export gnc-build-userdata-path)) () ...]
 270: 4 [scan ((# #)) () (()) ...]
In ice-9/boot-9.scm:
2015: 3 [call-with-deferred-observers #]
 700: 2 [for-each # #]
In unknown file:
   ?: 1 [scm-error misc-error #f ...]
In ice-9/boot-9.scm:
 106: 0 [# 
misc-error ...]

ice-9/boot-9.scm:106:20: In procedure #:
ice-9/boot-9.scm:106:20: Undefined variable: gnc-build-userdata-path
libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/build.make:61: recipe for 
target 'lib64/gnucash/scm/ccache/2.0/gnucash/core-utils.go' failed
make[2]: *** [lib64/gnucash/scm/ccache/2.0/gnucash/core-utils.go] Error 1
CMakeFiles/Makefile2:3773: recipe for target 
'libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/all' failed
make[1]: *** [libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

Any suggestions?

gcc --version
gcc (SUSE Linux) 4.8.5

guile --version
guile (GNU Guile) 2.0.9


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


Building GnuCash 3 on openSuSE

2018-04-05 Thread Herbert Thoma

Hi!

I did not build GnuCash myself for some time, but with 3.0 I did
try again.

I'm running openSUSE Leap 42.3.

So the first error was about gettext being only version 0.19.2.
OK, this is easily circumvented with -D ALLOW_OLD_GETTEXT=ON,
but still a bit unfortunate because openSUSE Leap 42.3 ships only
0.19.2 and openSUSE Leap 42.3 is the most recent stable openSUSE
distribution.

Next problem was GTEST. openSUSE Leap 42.3 has a package libgtest0,
but this does not help. So I downloaded googletest and set the
GTEST_ROOT and GMOCK_ROOT variables.

With this environment set cmake completes, but make aborts with this
error:

[ 30%] Built target scm-gnc-module
Scanning dependencies of target scm-core-utils
[ 30%] Generating ../../lib64/gnucash/scm/ccache/2.0/gnucash/core-utils.go
Backtrace:
In srfi/srfi-1.scm:
 619: 19 [for-each # #]
In scripts/compile.scm:
 182: 18 [# 
"/home/tma/gnucash/gnucash_cvs/gnucash/libgnucash/core-utils/core-utils.scm"]
In system/base/target.scm:
  59: 17 [with-target "x86_64-suse-linux-gnu" ...]
In system/base/compile.scm:
 150: 16 [compile-file 
"/home/tma/gnucash/gnucash_cvs/gnucash/libgnucash/core-utils/core-utils.scm" 
...]
  43: 15 [call-once #]
In ice-9/boot-9.scm:
 171: 14 [with-throw-handler #t ...]
In system/base/compile.scm:
  59: 13 [#]
 153: 12 [# #]
 216: 11 [read-and-compile # #:from ...]
 232: 10 [lp (# # # # ...) # #]
 180: 9 [lp # # # ...]
In ice-9/boot-9.scm:
2320: 8 [save-module-excursion #]
In language/scheme/compile-tree-il.scm:
  31: 7 [#]
In ice-9/psyntax.scm:
1091: 6 [expand-top-sequence ((re-export gnc-build-userdata-path)) () ...]
 976: 5 [scan ((re-export gnc-build-userdata-path)) () ...]
 270: 4 [scan ((# #)) () (()) ...]
In ice-9/boot-9.scm:
2015: 3 [call-with-deferred-observers #]
 700: 2 [for-each # #]
In unknown file:
   ?: 1 [scm-error misc-error #f ...]
In ice-9/boot-9.scm:
 106: 0 [# 
misc-error ...]

ice-9/boot-9.scm:106:20: In procedure #:
ice-9/boot-9.scm:106:20: Undefined variable: gnc-build-userdata-path
libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/build.make:61: recipe for 
target 'lib64/gnucash/scm/ccache/2.0/gnucash/core-utils.go' failed
make[2]: *** [lib64/gnucash/scm/ccache/2.0/gnucash/core-utils.go] Error 1
CMakeFiles/Makefile2:3773: recipe for target 
'libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/all' failed
make[1]: *** [libgnucash/core-utils/CMakeFiles/scm-core-utils.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

Any suggestions?

gcc --version
gcc (SUSE Linux) 4.8.5

guile --version
guile (GNU Guile) 2.0.9


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


Restarting the free accounting search

2017-08-08 Thread Herbert Thoma

Hi!

An interesting read: Linux Weekly News is trying to get away from
QuickBooks.

Restarting the free accounting search:
https://lwn.net/SubscriberLink/729088/3513f2cf8674fa1f/

Escape from QuickBooks (with data in hand):
https://lwn.net/SubscriberLink/729087/91644c624f6618ea/


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


Github Terms of service

2017-03-03 Thread Herbert Thoma

I just stumbled over this quote on LWN:

"Github recently drafted an update to their Terms Of Service. The new TOS is 
potentially
very bad for copylefted Free Software. It potentially neuters it entirely, so 
GPL licensed
software hosted on Github has an implicit BSD-like license. [...]

I am deleting my repositories from Github at this time."

The qoute links to here:
https://joeyh.name/blog/entry/removing_everything_from_github/

I am not a lawyer, but I guess we should discuss if this has
any consequences for the GnuCash github repository.

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


Re: Rounding in the price db.

2015-08-13 Thread Herbert Thoma

Am 13.08.2015 um 12:52 schrieb John Ralls:

Sigh. src/app-utils/gnc-euro.[ch]. Not only hard coded but not in engine where 
it obviously belongs. Yes, obviously it should be redone as a datafile; I can’t 
imagine why those currencies aren’t part of iso-4217-currencies.xml with a tag 
indicating their absorption with a date — and for future umm, disturbances, a 
de-absorption date. Whether that’s loaded or compiled probably makes no 
difference since we have no good way of distributing updates between releases. 
Regardless, it would give us a nice platform on which to expand for pegged 
currencies.


Yes, it's all my fault ... ;-)

I did this back in 1999 or 2000, when the EUR was introduced (as book money, 
not as cash. that was 2002).
There was an euro conversion wizard/druid/whatever by Christian Stimming that 
was in app-utils (or
may be gnome-utils) and so it ended up there. BTW, I am not sure if something 
like the price db even
existed back then ... For sure we did not have iso currencies back then but 
currency was an arbitrary
string. That's why multiple codes exist for some currencies.

I agree that having these fixed exchange rates in the price db would be much 
better. Unfortunately,
I can not commit to work on this now.

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


Re: Commodities initialization list

2015-08-11 Thread Herbert Thoma

Am 11.08.2015 um 16:18 schrieb Derek Atkins:

Phil Longstaff phil.longst...@gmail.com writes:


I recently found the need to add a new stock which is traded on the TSX
(Toronto Stock Exchange). Why do we hard-code commodity sources? I don't
want to have to recompile to use a new exchange.

You don't.. It's a user-defined field with a set of pre-defined initial
entries.  But it's a*free-form user-enterable text field*.  So just add
TSX in the field to create a new namespace.


Argh, please ignore my previous mail. I just looked for something like new 
commodity source.
It did not occur to me to just enter a new string to the drop-down list ...

 Herbert.


Phil

-derek


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


Re: Version Numbering

2015-03-29 Thread Herbert Thoma

Am 29.03.2015 um 00:02 schrieb Chris Good:

I think it is generally agreed, (from the small number of opinions
expressed so far), that level 2 should be Major and level 3 should be Minor.
Can everyone that has an opinion please let us know, particularly regarding
the level 1 name?


Well, IIRC, we bumped the first level from 1 to 2 when we switched from
Gnome 1 to Gnome 2. So historically it is may be a Framework version.

Gnome 2 support may end some time, so that we will be forced to change
the framework (like last time ...). This could trigger the next first
level version bump. However, this would not feel very good, to be forced
by external dependencies.

On the other hand, Linux recently decided that version number don't have
any meaning at all. They change the first level number when Linus feels
like changing it ...

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


Re: currency linked to a stock

2014-12-20 Thread Herbert Thoma

Am 17.12.2014 23:53, schrieb Sébastien de Menten:

On Yahoo! Finance, there are multiple symbols for Yahoo! Inc in function of
the exchange (YHOO for Nasdaq, YHOO.BA for buenos aires, YHO.DE. For
XETRA,...).


YHOO on Nasdaq would presumably by the original stock in USD. For
YHOO.BA you would get a price in Argentinian Pesos (?), for YHO.DE
a price in Euro. Right?


Should all these stocks be the same commodity in GnuCash (with then
multiples prices in function of the currency) ? Or should they be different
commodities (with different namespaces) ? And if I have a brokerage account
to trade stocks, can I buy the yahoo stock on Nasdaq and sell it back on
XETRA ? Or should I be a bank/trader to be able to do that ? (I haven't
gone farther than sell/buy stock to/from the same exchange for my personal
use)


In Germany we have not only Xetra but also regional stock exchanges (at least
Frankfurt, Munich, Stuttgart, Hamburg, Düsseldorf and Berlin). If I buy or sell
stocks with my broker I can choose which exchange to use. Of course in this
example all prices would be in Euro. I can select NYSE and a number of other
exchanges as well. I never tried this, but I expect it to work (at higher fees
than local exchanges ...).

For different international exchanges the treatment would depend on weather
it is really the same thing on the different exchanges. In some cases not the
real stock is traded on foreign exchanges, but so called GDRs
(http://en.wikipedia.org/wiki/Global_depository_receipt). These would be
different to the real shares, IMHO. But your YHO.DE example seems to be the
real stock.


I thought there would be different stocks in GnuCash and that a stock would
have a single currency. Now, the example of the Cheddar is a bit stretched
as it looks more similar to I buy a house in CAD and sell it back in USD
(ie it could be considered as an asset/account and not as a commodity).
If one was to manage import/export of goods in multiple currencies (ie not
through an exchange), would it use commodities to do so in GnuCash (one
commodity per type of cheese (or type of electronic material or type
of clothes) ?


Why do you make a distinction between commodity and asset? A commodity is a
subclass of asset, IMHO. (Even cash is a subclass of asset.) And it does not
have a fixed currency attached to it.

In Germany we switched from DEM to EUR. So from one day to the next all my
stocks had new prices in EUR. But they still were just the same stocks.
The same way I can buy a share of Intel for 30 EUR on Xetra and sell it
on Nasdaq for 35 USD.

 Herbert.


On Wednesday, December 17, 2014, John Ralls jra...@ceridwen.us wrote:




On Dec 17, 2014, at 1:28 PM, Sébastien de Menten sdemen...@gmail.com

javascript:; wrote:


Hello,

There is no currency explicitly linked to a given stock (is this

correct?).


As a result, one can attach to a given stock multiple prices in multiple
commodities.
For instance, YHOO (which is traded in USD) could have a price in CAD if
entered manually (in the price editor or through a transaction). When

using

the online download, one always get the correct currency.
Shouldn't each security (that is not a currency) have its currency (like
USD for YHOO) ? or is this a feature ?

On a related topic, if I have an account with YHOO stock as a commodity
(and so traded in USD), but that my default currency is CAD and that I

have

downloaded both the YHOO prices in USD and the exchange rate USD/CAD, can
Gnucash convert the YHOO stock in CAD when displaying the Grand Total ?



It’s a feature. While a particular stock exchange will price a stock
traded on that exchange in the national currency, stocks are traded on many
exchanges and privately, and those trades can be denominated in any
exchange mechanism the two traders agree on. Aside from online quotes,
there’s no difference to GnuCash between Yahoo Stock and a wheel of Cheddar
cheese. You can easily imagine buying a wheel of cheese in Wisconsin for
say $15 on behalf of a friend at home who pays you C$20 for it. It’s
actually possible (though not easy) to do the same with Yahoo stock.

ISTR there was a bug or a complaint here that stocks priced in foreign
currencies don’t roll up properly into top-level accounts. It *should*
work, but apparently doesn’t right now.

Regards,
John Ralls




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



--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Applications Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: herbert.th...@iis.fraunhofer.de
www: http://www.iis.fraunhofer.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Book-currency feature and cost accounting

2014-10-29 Thread Herbert Thoma

Am 28.10.2014 17:32, schrieb John Ralls:



On Oct 28, 2014, at 7:11 AM, Wm wm+...@tarrcity.demon.co.uk wrote:

Tue, 21 Oct 2014 16:25:55 2234422.7n09t1o...@legolas.kobaltwit.lan Geert Janssens 
geert.gnuc...@kobaltwit.be


On Thursday 09 October 2014 14:30:28 Alex Aycinena wrote:

Developers,

I am planning to add a feature to gnucash, primarily, but not
exclusively, related to currency accounting, and wanted to summarize
what I was thinking of. I would welcome feedback.

Since version 2.4.0, GnuCash supports trading accounts as described in
'Tutorial on multiple currency accounting' and 'Multiple currency
accounting in GnuCash' by P. Selinger (see
http://wiki.gnucash.org/wiki/Trading_Accounts). I believe Mike
Alexander added this feature.

In his tutorial, he (P. Selinger) mentions a 'reference currency
method' as an alternative to the use of trading accounts. This is
essentially the feature I wish to add.

Today, in file-properties-Accounts tab, you can turn trading
accounts on or off. I propose to change this to a selection of three
alternatives: use trading accounts, specify a 'book currency', or
neither trading accounts nor book currency. If trading accounts is
selected, it would work as implemented by Mike. If neither is
selected, it would work as gnucash does now without trading accounts
selected. So no one would be forced to use the new feature.


What benefit does the current situation (without trading accounts) have on its 
own compared
to your new proposal ?


That is part of what puzzles me, why would anyone, first moment that they 
encounter anything that isn't HomeCurrency or HomeUnit *not* turn on Trading 
accounts.  Shouldn't GnuCash be doing it *for* people when they
  buy shares,
  invest in a pension plan and
  other ordinary life stuff or
  even exchange some Euros for a family holiday just for the joy of currency or 
a
  teenager doing something on-line in a new-currency, etc (not my idea of fun 
but it happens and should be recorded).


In other words should we really keep the old way or can it be modeled
in your new proposal as well by for example assuming a default currency ?


I'm wondering if the formalisation of a book-currency isn't seen by some as 
governmental rather than natural accounting.  I'm in URP flox


Or a related question: how hard would it be to migrate an existing 
multi-currency book without
trading accounts to your proposal ?


That is something that interests me too.  I am running a book (I don't like 
that term, it sounds like gambling, but I'll use it) for a relative as well as 
myself, we know how much we owe each other by common agreement.   I think it 
would be quite difficult without Trading accounts, coz GnuCash doesn't do 
bunches of currency or shares naturally.


I've run a pretty sizable investment portfolio in GnuCash for many years with 
no need for trading accounts.


Me too.


Trading accounts aren't really necessary for non-currency transactions because 
the stock and fund account registers display amount, price, and value. Trading 
accounts are most useful, though not required, for users who maintain accounts 
in different currencies because currency accounts registers display only amount.


I largely agree. I live in Germany, so my currency is the Euro. Even if I buy 
or sell
stock that trades in USD or an other currency, in the end there will be a debit 
or credit
to my EUR bank account. There is an intermediate amount in USD, but frankly I 
don't care
about that. What matters is the EUR amount, even for the tax declaration (I 
track only
my private finances, it may be different for companies, I don't know).

If I travel abroad, I do most payments with a credit card. There as well I get 
a final
amount in EUR. I don't care about the amount in foreign currency, again. If I 
get
foreign cash, I note this as an expense (say I get 200 USD at an ATM, this will 
be
recorded as Description: 200 USD, 156 EUR expense). I do not track the USD cash
any further, I am just to lazy to do that. These are usually only small amounts,
so I don't care.

My bank offers accounts in foreign currencies. There I would need trading 
accounts,
but I never did this so far.


URP flox?

The way GnuCash does lots (the formal name for bunches of currency or shares) 
requires that one manually initiate it, which is a good thing because it doesn't work 
very well. In my view the best feature of Alex's proposal is that he'll have to fix that 
first.


Yes, if lot handling would be easier, this would be highly desirable.

 Herbert.


Regards,
John Ralls


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



--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Applications Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: herbert.th...@iis.fraunhofer.de
www: http

Re: GnuCash Budget Report

2014-07-14 Thread Herbert Thoma

Dear Peter,

although I did the cash-flow report, I don't know much scheme either.
It was mostly copying from other reports and lots of try and error ;-).

Please ask your questions on the gnucash-devel mailing list (CC'ed).
See http://wiki.gnucash.org/wiki/Mailing_Lists for how to subscribe.

Best,
 Herbert.

Am 13.07.2014 13:16, schrieb Peter:

Hi Chris,

I wonder if you could help me as I’m getting quite stuck! I’ve been using 
GnuCash for a few years now and am a Delphi/C# developer with a very small 
amount of Python and unix exposure. I am trying to create a Budget Period 
Report, based on your Budget Report in GnuCash, budget.scm, based on Herbert 
Thoma's cash-flow.scm.

My problem is that I have 12 periods in my budget, one for each month of the 
tax year. However, when I run the budget report, the columns go way off the 
edge of the screen, and I can’t see which accounts the figures are referring 
to, without having to export to OpenOffice spreadsheet and freeze the account 
name column (excel for mac doesn’t like the export for some reason).

So I created a budget-period.scm copied from budget.scm. Well I got as far as 
adding the report to the budget menu (putting it in the standard reports 
folder, changing the GUID and the report name), and adding the period option 
into the options general tab (by copying the option code from budget-flow.scm) 
- see screenshots below.

But I then got lost in the code, not really knowing Scheme (I did study LISP in 
varsity 20 years ago and can remember car cdr and cons, and have managed to get 
Scheme Petite going in a terminal window).

I think the easiest way would be to limit periodList to the period I am looking 
for somehow, but I can’t seem to figure it all out from the Scheme scripting no 
matter how many times I read it or do google searches. Any pointers?

Thanks in advance,
Peter Templin
Johannesburg, South Africa.


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


Re: Geting GnuCash to Recognise Localised tax report for UK

2014-05-22 Thread Herbert Thoma

Am 22.05.2014 16:11, schrieb Derek Atkins:

Clint Redwood cl...@screwtape.co.uk writes:


Hi Derek,

Good point - but what would your localisation setup be in that case? Ideally
you'd want en_DE, which I presume doesn't usually exist?


I have no idea what locale I would want.  Most likely I'd have to use
en_UK because, as you suggest, en_DE probably doesn't exist.  (I haven't
actually tested that to be sure, but I would suspect it doesn't exist).


Well, that would get you British Pound as default currency. May be you
would want en_IE. Then you would get the EURO, as this is the currency in
Ireland.

But John already proposed a better solution: LANG=en_US and LC_MONETARY=de_DE

Could it be possible that one has to do tax declarations for multiple
countries? If you move? May be then the tax report should not be coupled
to a locale at all? Or only the default selection but reports for other
countries are somehow available?

 Herbert.


You could set the tax jurisdition as a separate core option, or I guess you
could base it on the default report currency for the instance.

This is sufficiently important for me to try and figure out and fix in the
next few months, since I really can't be bothered doing all my tax returns
manually every year.


I'm sure people on this list would be happy to be a sounding board for you.


Yours,

Clint Redwood


-derek


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


Re: backend encryption / security

2014-05-07 Thread Herbert Thoma

We have a FAQ on this issue:

http://wiki.gnucash.org/wiki/FAQ#Security:_Encryption.2C_Password_Feature.2C_...

Am 07.05.2014 00:40, schrieb Michalis Kamprianis:

Hi,
I can see in uservoice, and I think frequently asked in lists, the request for 
encryption or password protection of the datafile.

Regarding database backends, I believe that database encryption should be used 
if required, (although I understand that dbi may not be up to the task).

Nevertheless, for xml backend, I think that I could try to implement an AES 
based encryption (on saving) and decryption (on opening), based on code from 
aescrypt.
Aescrypt is available for unix, windows, mac, so the implementation should 
probably be portable across platforms. The code is some gpl and some freeware.
Of course such a solution only protects data at rest (i.e. when data is read in 
memory it is not protected. Log files are not protected. User configuration 
files are not protected - at least initially, and so on) so it's not 
transforming gnucash to the most secure accounting software out there, but 
solves the problem with datafile misplacement or unwanted access.

The thing is, (a) I don't know if you're interested and / or agree in 
implementing something like that, and (b) although I will probably manage to 
code the open and save routines, I'm not sure I will not get stuck somewhere, 
in which case it will either remain as an unfinished project, or I will need 
some help from somebody more experienced.

Your thoughts?

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



--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Applications Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: herbert.th...@iis.fraunhofer.de
www: http://www.iis.fraunhofer.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Compile error current master

2014-04-26 Thread Herbert Thoma

Hi,

I get the following error when I try to build the current master branch:

make[5]: Entering directory 
`/home/tma/gnucash/gnucash_cvs/gnucash/src/libqof/qof'
/bin/sh ../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../..  
-I../../../lib/libc -I../../../src -pthread -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include   -DG_LOG_DOMAIN=\qof\  -xc++ -Werror 
-Wdeclaration-after-statement -g -O2 -Wall -Wunused -Wmissing-prototypes 
-Wmissing-declarations  -Wno-unused -MT libgnc_qof_la-gnc-date.lo -MD -MP -MF 
.deps/libgnc_qof_la-gnc-date.Tpo -c -o libgnc_qof_la-gnc-date.lo `test -f 'gnc-date.c' || 
echo './'`gnc-date.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/libc -I../../../src 
-pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include 
-DG_LOG_DOMAIN=\qof\ -xc++ -Werror -Wdeclaration-after-statement -g -O2 -Wall 
-Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -MT 
libgnc_qof_la-gnc-date.lo -MD -MP -MF .deps/libgnc_qof_la-gnc-date.Tpo -c gnc-date.c  
-fPIC -DPIC -o .libs/libgnc_qof_la-gnc-date.o
cc1plus: error: command line option '-Wdeclaration-after-statement' is valid 
for C/ObjC but not for C++ [-Werror]
cc1plus: error: command line option '-Wmissing-prototypes' is valid for C/ObjC 
but not for C++ [-Werror]
cc1plus: all warnings being treated as errors
make[5]: *** [libgnc_qof_la-gnc-date.lo] Fehler 1
make[5]: Leaving directory 
`/home/tma/gnucash/gnucash_cvs/gnucash/src/libqof/qof'

When did we start with C++?

gcc (SUSE Linux) 4.7.2 20130108 [gcc-4_7-branch revision 195012]

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


Crash when gettig online quotes with current maint branch

2014-04-26 Thread Herbert Thoma

Hi,

I am getting a crash when trying to fetch online quotes:

Backtrace:
In unknown file:
   ?: 0* [gnc:book-add-quotes # #]
   ?: 1* (letrec (# # # # ...) (let* # # #))
In /usr/local/share/gnucash/guile-modules/gnucash/price-quotes.scm:
 431: 2  (let* (# # # # ...) (cond # # # ...) (if keep-going? #))
 431: 3* [book-commodity-fq-call-data #swig-pointer QofBook * 1c669e0]
 218: 4  (let* ((ct #) (big-list #) (commodity-list #f) ...) (if (and # #) #f 
...))
 223: 5* [filter #procedure #f (a) ...
 225: 6*  [call-with-values #procedure #f () #procedure #f (a b)]
In unknown file:
   ?: 7   (@call-with-values (producer consumer))
   ?: 8*  [#procedure #f ()]
In /usr/local/share/gnucash/guile-modules/gnucash/price-quotes.scm:
 226: 9*  (partition! (lambda (cmd) (not (string=? # currency))) big-list)

/usr/local/share/gnucash/guile-modules/gnucash/price-quotes.scm:226:43: In 
expression (partition! (lambda # #) big-list):
/usr/local/share/gnucash/guile-modules/gnucash/price-quotes.scm:226:43: Unbound 
variable: partition!

This is the stable (maint) branch.

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


Re: Compile error current master

2014-04-26 Thread Herbert Thoma

Am 26.04.2014 11:13, schrieb Geert Janssens:

On Saturday 26 April 2014 11:07:50 Herbert Thoma wrote:

Hi,

I get the following error when I try to build the current master
branch:

make[5]: Entering directory
`/home/tma/gnucash/gnucash_cvs/gnucash/src/libqof/qof' /bin/sh

...

[-Werror] cc1plus: error: command line option '-Wmissing-prototypes'
is valid for C/ObjC but not for C++ [-Werror] cc1plus: all warnings
being treated as errors
make[5]: *** [libgnc_qof_la-gnc-date.lo] Fehler 1
make[5]: Leaving directory
`/home/tma/gnucash/gnucash_cvs/gnucash/src/libqof/qof'

When did we start with C++?


Yesterday.

John committed the first few patches to compile libqof as a c++ library.

But apparently there's an issue with gcc and these patches. See also bug
https://bugzilla.gnome.org/show_bug.cgi?id=729001


Ah I see.

BTW: if I supply --disable-error-on-warning to configure, it does not get much
further:

kvp_frame.c: In function 'KvpFrame* get_trailer_make(KvpFrame*, const char*, 
char**)':
kvp_frame.c:329:38: error: invalid conversion from 'const char*' to 'char*' 
[-fpermissive]
kvp_frame.c: In function 'const KvpFrame* get_trailer_or_null(const KvpFrame*, 
const char*, char**)':
kvp_frame.c:371:38: error: invalid conversion from 'const char*' to 'char*' 
[-fpermissive]
make[5]: *** [libgnc_qof_la-kvp_frame.lo] Error 1

C++ is much stricter with types than plain C ...

 Herbert.


Geert


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


Fwd: Crash when gettig online quotes with current maint branch

2014-04-26 Thread Herbert Thoma

Geert,

I think I can blame this on you. If I do a
git revert 25256c1ba7fa8fa4bbf3857812aa43db69a93909
(which is your Remove unused function yahoo-get-historical-quotes patch),
getting online quotes works again.

 Herbert.

 Original-Nachricht 
Betreff: Crash when gettig online quotes with current maint branch
Datum: Sat, 26 Apr 2014 11:10:06 +0200
Von: Herbert Thoma herbert.th...@iis.fraunhofer.de
An: gnucash-devel gnucash-devel@gnucash.org

Hi,

I am getting a crash when trying to fetch online quotes:

Backtrace:
In unknown file:
   ?: 0* [gnc:book-add-quotes # #]
   ?: 1* (letrec (# # # # ...) (let* # # #))
In /usr/local/share/gnucash/guile-modules/gnucash/price-quotes.scm:
 431: 2  (let* (# # # # ...) (cond # # # ...) (if keep-going? #))
 431: 3* [book-commodity-fq-call-data #swig-pointer QofBook * 1c669e0]
 218: 4  (let* ((ct #) (big-list #) (commodity-list #f) ...) (if (and # #) #f 
...))
 223: 5* [filter #procedure #f (a) ...
 225: 6*  [call-with-values #procedure #f () #procedure #f (a b)]
In unknown file:
   ?: 7   (@call-with-values (producer consumer))
   ?: 8*  [#procedure #f ()]
In /usr/local/share/gnucash/guile-modules/gnucash/price-quotes.scm:
 226: 9*  (partition! (lambda (cmd) (not (string=? # currency))) big-list)

/usr/local/share/gnucash/guile-modules/gnucash/price-quotes.scm:226:43: In 
expression (partition! (lambda # #) big-list):
/usr/local/share/gnucash/guile-modules/gnucash/price-quotes.scm:226:43: Unbound 
variable: partition!

This is the stable (maint) branch.

 Herbert.
___
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: Compile error current master

2014-04-26 Thread Herbert Thoma

Am 26.04.2014 16:25, schrieb John Ralls:


On Apr 26, 2014, at 3:25 AM, Herbert Thoma herbert.th...@iis.fraunhofer.de 
wrote:

BTW: if I supply --disable-error-on-warning to configure, it does not get much
further:

kvp_frame.c: In function 'KvpFrame* get_trailer_make(KvpFrame*, const char*, 
char**)':
kvp_frame.c:329:38: error: invalid conversion from 'const char*' to 'char*' 
[-fpermissive]
kvp_frame.c: In function 'const KvpFrame* get_trailer_or_null(const KvpFrame*, 
const char*, char**)':
kvp_frame.c:371:38: error: invalid conversion from 'const char*' to 'char*' 
[-fpermissive]
make[5]: *** [libgnc_qof_la-kvp_frame.lo] Error 1

C++ is much stricter with types than plain C ...


Indeed. One of its features.

Apparently you have a defective string.h: The lines in question are
   last_key = strrchr (key_path, '/');

and strrchr is declared as
   char* strrchr(const char *, int);
in the POSIX standard [1]. 'key_frame' is the 'const char*' argument in the 
function arguments.


Hmm, I would guess that I should have a pretty standard glibc
(version 2.17).

Anyway, this is the relevant section in my /usr/include/string.h:

/* Find the last occurrence of C in S.  */
#ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
extern C++
{
extern char *strrchr (char *__s, int __c)
 __THROW __asm (strrchr) __attribute_pure__ __nonnull ((1));
extern const char *strrchr (const char *__s, int __c)
 __THROW __asm (strrchr) __attribute_pure__ __nonnull ((1));

# ifdef __OPTIMIZE__
__extern_always_inline char *
strrchr (char *__s, int __c) __THROW
{
  return __builtin_strrchr (__s, __c);
}

__extern_always_inline const char *
strrchr (const char *__s, int __c) __THROW
{
  return __builtin_strrchr (__s, __c);
}
# endif
}
#else
extern char *strrchr (const char *__s, int __c)
 __THROW __attribute_pure__ __nonnull ((1));
#endif
__END_NAMESPACE_STD


Well, I do not understand all the preprocessor magic and I don't know
which macros are defined, but obviously there are some declarations
of strrchr with const and some without ...

But since this is standard glibc, it should simply work ...

 Herbert


I can const_castchar*(key_frame) in there, but I'd rather not.

Regards,
John Ralls


[1] http://pubs.opengroup.org/onlinepubs/009695299/functions/strrchr.html


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


Re: Cannot save

2014-01-26 Thread Herbert Thoma

Am 25.01.2014 21:53, schrieb John Ralls:


On Jan 25, 2014, at 12:47 PM, Christian Stimming christ...@cstimming.de wrote:


Am Samstag, 25. Januar 2014, 07:54:27 schrieb John Ralls:

I just noticed that with current HEAD I can not save.

It seems that the book does not get marked as dirty when
I make an edit in an register. Thus the save button remains
grayed out and there occurs no auto save either.

Adding a price in the price data base enables the save
button.

I noticed this only today, but this bug is there at least
since Wednesday because I compiled last time on Wednesday
and the bug was not there before.

I use XML file, not SQL.


That's a show-stopper. Thanks for flagging it. Try reverting 8be7d15
(r23733).


Same problem here.  When, as you said, reverting 8be7d15 (r23733), all works
fine again.

Should I commit this revert for now?


You can’t, because I just did, r23767.


Thanks, fixed here as well.

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


Cannot save

2014-01-25 Thread Herbert Thoma

Hi,

I just noticed that with current HEAD I can not save.

It seems that the book does not get marked as dirty when
I make an edit in an register. Thus the save button remains
grayed out and there occurs no auto save either.

Adding a price in the price data base enables the save
button.

I noticed this only today, but this bug is there at least
since Wednesday because I compiled last time on Wednesday
and the bug was not there before.

I use XML file, not SQL.

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


Re: r23740 - gnucash/trunk/src/register/ledger-core - Bug 722123 - Zero price entry added to price database on stock purchase

2014-01-22 Thread Herbert Thoma

Hi!

This gives me a may be used ininitialized warning.
Can be fixed by initializing PriceCell *cell with NULL
(first line of function gnc_split_register_auto_calc()),
see below.

 Herbert.


diff --git a/src/register/ledger-core/split-register.c 
b/src/register/ledger-core/split-register.c
index 5055994..d126297 100644
--- a/src/register/ledger-core/split-register.c
+++ b/src/register/ledger-core/split-register.c
@@ -2076,7 +2076,7 @@ record_price (SplitRegister *reg, Account *account, 
gnc_numeric value)
 static gboolean
 gnc_split_register_auto_calc (SplitRegister *reg, Split *split)
 {
-PriceCell *cell;
+PriceCell *cell = NULL;
 gboolean recalc_shares = FALSE;
 gboolean recalc_price = FALSE;
 gboolean recalc_value = FALSE;


Am 22.01.2014 02:53, schrieb John Ralls:

Author: jralls
Date: 2014-01-21 20:53:02 -0500 (Tue, 21 Jan 2014)
New Revision: 23740
Trac: http://svn.gnucash.org/trac/changeset/23740

Modified:
gnucash/trunk/src/register/ledger-core/split-register.c
Log:
Bug 722123 - Zero price entry added to price database on stock purchase

Just needed to get the new price back from the cell after it was
calculated.

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


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


Re: r23602 - gnucash/trunk/src - Fix some warnings while creating a new book

2013-12-26 Thread Herbert Thoma

Hi!

I think this introduced a might be used uninitialized warning in
src/gnome/top-level.c with my particular version of gcc.

Initializing *file_guid with NULL in gnc_restore_all_state() fixes
the warning, see below.

Merry Christmas,
 Herbert.


diff --git a/src/gnome/top-level.c b/src/gnome/top-level.c
index 948f875..f9043e4 100644
--- a/src/gnome/top-level.c
+++ b/src/gnome/top-level.c
@@ -241,7 +241,7 @@ static void
 gnc_restore_all_state (gpointer session, gpointer unused)
 {
 GKeyFile *keyfile = NULL;
-gchar *file_guid;
+gchar *file_guid = NULL;
 GError *error = NULL;

 keyfile = gnc_state_load (session);



Am 23.12.2013 21:33, schrieb Geert Janssens:

Author: gjanssens
Date: 2013-12-23 15:33:02 -0500 (Mon, 23 Dec 2013)
New Revision: 23602
Trac: http://svn.gnucash.org/trac/changeset/23602

Modified:
gnucash/trunk/src/gnome-utils/dialog-options.c
gnucash/trunk/src/gnome/top-level.c
Log:
Fix some warnings while creating a new book

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


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


Re: Bug 336843 - Attach files to Transactions

2013-11-16 Thread Herbert Thoma

Am 15.11.2013 15:55, schrieb John Ralls:

Would it be good to have thumbnails?


Where? I don't think you'd want them on the register. It's already pretty 
cluttered.


Well, it would probably be nice to have a small column in the register
that indicates if there is an attached document in a transaction. The
thumbnail could then be a mouse-over effect on that indicator.

 Herbert.


Regards,
John Ralls


___
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: Number to Words and licencing

2013-11-04 Thread Herbert Thoma

Am 04.11.2013 09:08, schrieb Martin Mainka:

Am 4.11.2013 05:54, schrieb John Ralls:

Actually, if the text and number disagree the bank is supposed to
reject the check. Anyway, the question isn't what's the right way to
write out the amount in words for each language, the question is
whether the Wikipedia article cited earlier in the thread is correct
that checks are used only in the US, UK, and Canada. If that's so, we
don't need to localize it at all. Regards, John Ralls
___ gnucash-devel mailing
list gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


for Germany i can confirm, that there are checks, but the usage is very
uncommon, because most of the transactions are done by transfer from
account to account. This is for wages, mortgages, fees, rent, bills etc.


Yes, I haven't written a check in 20 years. And I got may be three checks
in these 20 years. I Germany basically everything is direct bank transfer.

And in Germany eins-zwei-drei-Euro-fünf-sechs-Cent would be perfectly
acceptable.

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


Re: crash when opening price database

2013-10-26 Thread Herbert Thoma

Am 25.10.2013 22:36, schrieb Geert Janssens:

On Friday 25 October 2013 21:48:30 Herbert Thoma wrote:

  Hi,

  with latest HEAD I get a crash when I try to open the price database:

  * 21:35:55 OTHER GLib-GIO Settings schema
  'org.gnucash.dialogs.edit-prices' is not installed Trace/Breakpoint
  ausgelöst


...


Hi Herbert,

Thanks for reporting this. I had pushed some cleanups in the settings. 
Unfortunately I mixed up a few schemas due to their very similar names: 
price-editor, edit-prices, prices,...

I have just pushed a commit to clean this up: there are two schemas left: 
pricedb-editor (for the prices overview window) and price-editor (for the 
dialog that shows the details for one price).

Hopefully that fixes it.


Yes, the crash is fixed. Thanks a lot!

 Herbert.


Geert


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


crash when opening price database

2013-10-25 Thread Herbert Thoma

Hi,

with latest HEAD I get a crash when I try to open the price database:

* 21:35:55 OTHER GLib-GIO Settings schema 'org.gnucash.dialogs.edit-prices' 
is not installed
Trace/Breakpoint ausgelöst

I think I tried this about a week ago the last time, then it worked.

There is no org.gnucash.dialogs.edit-prices in
/opt/gnucash/test_install/cvs_head/share/glib-2.0/schemas/
where I have GnuCash HEAD installed.

find . -name *.gschema.xml in the source (I build in tree) directry
does not show this either.

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


Re: r23186 - gnucash/trunk - Bug 654196 - make check fails when built with --enable-dbi

2013-09-21 Thread Herbert Thoma

Am 21.09.2013 19:22, schrieb John Ralls:


On Sep 21, 2013, at 9:36 AM, Geert Janssens janssens-ge...@telenet.be wrote:



Yet I do have all three libraries installed. If I remove the test, I can build 
and run GnuCash just fine using any of the backends. For reference, the so 
files are here:
$ ls /usr/lib64/dbd/
libdbdmysql.solibdbdpgsql.solibdbdsqlite3.so



Ah. That's because Fedora has broken dlopen by creating the non-standard 
/usr/lib64 and not modifying dlopen's search accordingly. See dlopen (3).


I just found out that openSUSE (at least 12.3) has the same broken, 
non-standard behavior.


You can either call configure with --with-dbd-dir=/usr/lib64/dbd, add 
/usr/lib64/dbd to $LD_LIBRARY_PATH, or add it to /etc/ld.so.conf.d and run 
ldconfig as root.


OK, adding /usr/lib64/dbd to /etc/ld.so.conf.d and running ldconfig fixed the 
problem.


I'll add some detail about that to the not found message.


I'd rather prefer that the test would just work, even with the broken, 
non-standard
dlopen and /usr/lib64, since this seems to be quite common ...

 Herbert.


Regards,
John Ralls


___
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: Why no SQL Database Backend?

2013-09-11 Thread Herbert Thoma

Am 10.09.2013 20:32, schrieb David T.:

I believe the answer is history.


Yes, the answer definitively is history.

My GnuCash file starts Jan. 1st, 1999, and it still has the file
ending .xac because GnuCash was called XAccountant back then.
It used a binary file format for storage and and a motif UI.

This was later converted to XML storage and Gnome UI. The current
SQL backend came even later. And the development process of
GnuCash has never been particularly fast.

You (blfs) state: Also for any kind of real use of this program in
an endeavor of any size the user would need to be able to run SQL
programs on the data. That is probably true for any business
use case of any size larger than one or a few employees.
However, for my personal accounting I am perfectly happy (well mostly)
with the current capabilities of GnuCash. And personal finance
was the original use case for GnuCash.

That does not mean that a transition of GnuCash towards beeing a
real SQL application would not be a good thing (at least if
I can still run it in a file mode and don't need a SQL server).

So, if you are willing and able to help with such a transition,
I am sure that all GnuCash developers would welcome you.

 Herbert.



Quoting Wikipedia: Programming on GnuCash began in 1997, and its first stable 
release was in 1998.


At that time, MySQL was two years old, and I hazard the guess that the 
developers of Gnucash were not imagining the project needing that level of 
storage. And so, the program was built on other technologies.

The current database backend is an initial set of steps to transition to a more 
RDBMS friendly system, but as another user mentioned in a different thread a 
few hours ago, the data management in Gnucash is deeply embedded in all the 
code, and will require fundamental code rewriting. I honestly do hope that your 
inquiry means that you have skill and energy to help with the transition. Many 
of us wish for it.

David



  From: b...@comcast.net b...@comcast.net
To: gnucash-devel@gnucash.org
Sent: Tuesday, September 10, 2013 9:13 AM
Subject: Why no SQL Database Backend?


I have been puzzling over why GNUCASH was not written on top of an existing 
database engine.

There are several excellent GNU databases out there.

The natural design of a program such as GNUCASH would be the something like 
SQL-Ledger .

This would solve all kinds of problems with this program. I understand that the 
program is not
multi-user. If this program had been developed on top of existing excellent SQL 
DB this issue would
be easily solved.

Also for any kind of real use of this program in an endeavor of any size the 
user would
need to be able to run SQL programs on the data.


___
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: Building GnuCash on openSUSE 12.3

2013-07-22 Thread Herbert Thoma

Am 20.07.2013 01:17, schrieb John Ralls:

...


Do we want to have some auto-detection for this? Do other distributions
rename guile1 as well? Or can we expect that by the time 2.6 is ready
guile2 and swig 2.0.10 will be widespread enough?



No, they'll only fiddle the macro if they're trying to support both Guile1 and 
2, and Gnucash-2.5 supports Guile2 there's no real need for us to do anything, 
except that I need to get SWIG-2.0.10 on my various Linux VMs so that the 
release tarballs will work with Guile2. Since you're building from svn (or 
git), you should probably install SWIG-2.0.10 and use Guile2.


OK, did that, works fine.

Thank you,
 Herbert.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Building GnuCash on openSUSE 12.3

2013-07-19 Thread Herbert Thoma
Am 18.07.2013 18:06, schrieb John Ralls:
 
 On Jul 18, 2013, at 8:25 AM, Herbert Thoma herbert.th...@iis.fraunhofer.de 
 wrote:
 
 Hi,

 ./configure: line 21309: `GUILE_MODULE_AVAILABLE(gnc_have_guile_www,(www 
 main))'

 
 That macro is defined in /usr/aclocal/guile.m4 -- or maybe guile1.m4 in
 your case. Did you install the guile1-dev package?

I have a guile1.m4 in /usr/share/aclocal that was installed with the
libguile1-devel package.

I tried a symlink there (guile.m4 - guile1.m4) but I still get
the same error.

BTW: What is the status with guile2?

 Herbert.

 Regards,
 John Ralls
 
 

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


Re: Building GnuCash on openSUSE 12.3

2013-07-19 Thread Herbert Thoma

Am 19.07.2013 17:23, schrieb John Ralls:


On Jul 19, 2013, at 1:12 AM, Herbert Thoma herbert.th...@iis.fraunhofer.de 
wrote:


Am 18.07.2013 18:06, schrieb John Ralls:


On Jul 18, 2013, at 8:25 AM, Herbert Thoma herbert.th...@iis.fraunhofer.de 
wrote:


Hi,

./configure: line 21309: `GUILE_MODULE_AVAILABLE(gnc_have_guile_www,(www main))'



That macro is defined in /usr/aclocal/guile.m4 -- or maybe guile1.m4 in
your case. Did you install the guile1-dev package?


I have a guile1.m4 in /usr/share/aclocal that was installed with the
libguile1-devel package.

I tried a symlink there (guile.m4 - guile1.m4) but I still get
the same error.


Take a look in guile1.m4 to make sure the package maintainer didn't rename the 
macro to GUILE1_MODULE_AVAILABLE.
The symlink doesn't make any difference: Aclocal searches every file in it's 
path for macro definitions.


Yes, that did the trick.

Do we want to have some auto-detection for this? Do other distributions
rename guile1 as well? Or can we expect that by the time 2.6 is ready
guile2 and swig 2.0.10 will be widespread enough?

 Herbert.


Regards,
John Ralls



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


Re: Report system legacy

2013-06-29 Thread Herbert Thoma
Am 28.06.2013 22:22, schrieb Christian Stimming:
 I think we shouldn't add any suffix to the report name automatically. I also 
 think we shouldn't have multiple saved reports with the same name. To resolve 
 this, I think Derek's proposal works best: Saving the report requires a 
 unique 
 name among the saved custom reports (but which might be identical to the non-
 custom report). If the report with this name already exists as custom report, 
 the user gets a question Another report already exists with the name XX. 
 Overwrite? [Cancel] [Ok] and no additional options. If the user doesn't want 
 to overwrite, he/she always can guess to Cancel here and then change the 
 name to have it unique again.

I agree. We could add a third button [Choose different name] to open a
kind of save as dialog, if we want to get fancy.

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


Re: Content of gnucash-patches/gnucash-changes

2013-05-31 Thread Herbert Thoma
Am 31.05.2013 10:52, schrieb Geert Janssens:
 I decided to do a a little poll regarding these two lists, to determine how 
 to handle them in 
 the (git-only) future:
 
 1. Which lists are you subscribed to ?
   a. gnucash-changes
   b. gnucash-patches
   c. both
   d. none

Only gnucash-patches.

 2. If you're only subscribed to one, why that one ?

IIRC, back then when I joined (more than 10 years ago), there was
only gnucash-patches.

 3. Do you think gnucash needs two lists ? Why yes or why no ?

I personally need/want only the summaries. I can get the detailed
logs from the version control system (but I still have to get
used to git).

 4. For the future:
   a. We should keep the two list as they are now:
  gnucash-changes should have the detailed logs
  gnucash-patches should have the summaries
   b. We should keep two lists, but swap the contents:
  gnucash-patches should have the detailed logs
  gnucash-changes should have the summaries
   c. I think we only need one list with detailed logs
   d. I think we only need one list with summaries

Least hassle for me is to keep everything as it is ;-).

 Herbert.

 You may motivate your answers :)
 
 Geert
 ___
 gnucash-devel mailing list
 gnucash-devel@gnucash.org
 https://lists.gnucash.org/mailman/listinfo/gnucash-devel
 

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Recommend IDE for coding in C

2013-03-21 Thread Herbert Thoma
kind of off-topic, but I could not resist:

Am 20.03.2013 18:13, schrieb Buddha Buck:
 The old joke that the name
 means Eight Megabytes And Constantly Swapping is meaningless when your
 browser can take a gig of memory.

But the other old joke that the name means
Escape - Meta - Alt - Ctrl - Shift
remains still quite valid ;-)

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


Re: Beyond 2.6

2013-02-16 Thread Herbert Thoma
forgot CC list ...

Am 15.02.2013 21:06, schrieb John Ralls:
 Why hard to say? MVC isn't exactly cutting-edge design. It's been
 around since 1988 and 7 years later GoF thought it so well-understood
 that it's the how to use patterns example in the introduction.

 Well, the point is that every time the user leaves a field you need to
 parse all the input fields and process them in the controller/model as
 part of the validation, even if the user hasn't asked to 'save' yet.

 I guess it all depends on your controller APIs.  (In the RoR world this
 is harder to do, because the view is in the browser, but the model and
 controllers are on the server -- and there is no verify this model API
 in the controller.  At least not directly.  The client-side-validations
 gem adds some support for this).
 
 
 We already do that for the account type listbox: We connect to a signal
 (don't know offhand which one) in the parent accounts GtkTreeView that tells
 us that the user has selected a parent account, retrieve that account, run
 xaccAccountGetCompatibleTypes() on it, and populate the account type listbox
 with the result.  
 
 That's a pretty standard way for UI View objects to communicate with their
 controller objects, though there are others. Wx has a specific Validator
 class that lets you register a callback to test control input as it happens.
 It also has a signals mechanism (which they rather confusingly call Events)
 to support other interactivity needs. Qt is well-known for its signals and 
 slots
 feature, which I imagine is used for this purpose much like Gtk's signals 
 are, but
 I've never written anything for Qt so I don't actually know.

Yes, you can use signals and slots this way. I personally like Qt very much. 
For me
it is the best GUI toolkit I have ever worked with (I worked with Motif, MFC,
GTK and Qt, but always only small projects or patches to GnuCash).

However, I would still be hesitant to use signals and slots in the engine. 
Earlier
in this thread it was stated that the engine depends heavily on Glib and that 
this
is bad for portability. Do we want to replace the Glib dependency with a Qt
dependency?

 Herbert.

 Regards,
 John Ralls
 
 
 ___
 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: Beyond 2.6

2013-02-16 Thread Herbert Thoma


Am 16.02.2013 17:06, schrieb John Ralls:
 
 On Feb 16, 2013, at 5:06 AM, Herbert Thoma herbert.th...@iis.fraunhofer.de 
 wrote:
 
 forgot CC list ...

 Am 15.02.2013 21:06, schrieb John Ralls:
 Why hard to say? MVC isn't exactly cutting-edge design. It's been
 around since 1988 and 7 years later GoF thought it so well-understood
 that it's the how to use patterns example in the introduction.

 Well, the point is that every time the user leaves a field you need to
 parse all the input fields and process them in the controller/model as
 part of the validation, even if the user hasn't asked to 'save' yet.

 I guess it all depends on your controller APIs.  (In the RoR world this
 is harder to do, because the view is in the browser, but the model and
 controllers are on the server -- and there is no verify this model API
 in the controller.  At least not directly.  The client-side-validations
 gem adds some support for this).


 We already do that for the account type listbox: We connect to a signal
 (don't know offhand which one) in the parent accounts GtkTreeView that tells
 us that the user has selected a parent account, retrieve that account, run
 xaccAccountGetCompatibleTypes() on it, and populate the account type listbox
 with the result.  

 That's a pretty standard way for UI View objects to communicate with their
 controller objects, though there are others. Wx has a specific Validator
 class that lets you register a callback to test control input as it happens.
 It also has a signals mechanism (which they rather confusingly call Events)
 to support other interactivity needs. Qt is well-known for its signals and 
 slots
 feature, which I imagine is used for this purpose much like Gtk's signals 
 are, but
 I've never written anything for Qt so I don't actually know.

 Yes, you can use signals and slots this way. I personally like Qt very much. 
 For me
 it is the best GUI toolkit I have ever worked with (I worked with Motif, MFC,
 GTK and Qt, but always only small projects or patches to GnuCash).

 However, I would still be hesitant to use signals and slots in the engine. 
 Earlier
 in this thread it was stated that the engine depends heavily on Glib and 
 that this
 is bad for portability. Do we want to replace the Glib dependency with a Qt
 dependency?

 
 See Geert's and my responses about where the slots go.

OK, thanks. I think I got it. I only just know enough C++ to be dangerous ...

 Does Qt have another mechanism for validating user input as he types? How 
 does it handle spell checking? (Magic is a reasonable answer here: I know 
 in detail how Gtk handles spell checking because it's an add-on that I've 
 contributed to, but Apple handles it inside the toolkit so that application 
 devs needn't do anything about it.)

Qt has a QValidator class. http://qt-project.org/doc/qt-4.8/qvalidator.html
I don't think that this is used for spell checking, though.

 Herbert.

 Regards,
 John Ralls
 
 
 
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: complie error in current trunk

2012-12-21 Thread Herbert Thoma
Am 21.12.2012 10:43, schrieb Geert Janssens:
 On 21-12-12 07:45, Mike Alexander wrote:
 --On December 20, 2012 5:00:56 PM +0100 Geert Janssens 
 janssens-ge...@telenet.be wrote:

 This may be a side effect of my efforts to make GnuCash build and run
 with guile 2. I'm not sure why I didn't get these warnings on my
 system.

 Anyway, just to test, can you alter src/base-typemaps.i as follows:
 on line 19, there is
 %typemap (out) char * {

 Can you just below this line insert this:
$result = SCM_UNSPECIFIED;

 And then compile again ?

 I'll have to admit that I got this error too and didn't fix or report it.  I 
 just turned off the warning so I could finish what else I was doing and then 
 forgot about it.

 The error is probably dependent on exactly what compiler you are using since 
 it depends on the flow analysis done during optimization.  In my case I was 
 using gcc 4.6.3 when I got the error.

 I tried the fix you suggest above and it seems to solve, or at least avoid, 
 the problem.

  Mike

 Thanks for the feedback. I have committed the change.
 
 FWIW, my compiler is gcc 4.7.2 on Fedora 17. I'm compiling with -Werror but 
 it doesn't produce the warning reported. It think it's a valid warning in 
 this case though.

I confirm that the fix fixes the error on my system as well.

Thank you!

 Herbert.

 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


complie error in current trunk

2012-12-20 Thread Herbert Thoma
Hi!

I get the following errors:
(If I run configure with --disable-error-on-warning the build
completes successfully.)

cc1: warnings being treated as errors
swig-unittest-support-guile.c: In function 
‘_wrap_TestErrorStruct_log_domain_get’:
swig-unittest-support-guile.c:1367:7: error: ‘gswig_result’ may be used 
uninitialized in this function
swig-unittest-support-guile.c: In function ‘_wrap_TestErrorStruct_msg_get’:
swig-unittest-support-guile.c:1430:7: error: ‘gswig_result’ may be used 
uninitialized in this function
make[3]: *** [libtest_core_guile_la-swig-unittest-support-guile.lo] Fehler 1
make[3]: Leaving directory 
`/home/tma/gnucash/gnucash_cvs/gnucash_work/src/test-core'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/tma/gnucash/gnucash_cvs/gnucash_work/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/tma/gnucash/gnucash_cvs/gnucash_work'
make: *** [all] Fehler 2


cc1: warnings being treated as errors
swig-engine.c: In function ‘_wrap_gncTaxIncludedTypeToString’:
swig-engine.c:32596:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_gncAmountTypeToString’:
swig-engine.c:32541:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_gncEntryPaymentTypeToString’:
swig-engine.c:25533:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_gncEntryDiscountHowToString’:
swig-engine.c:25478:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_gnc_num_dbg_to_string’:
swig-engine.c:17125:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_gnc_numeric_to_string’:
swig-engine.c:17099:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_gnc_numeric_errorCode_to_string’:
swig-engine.c:17016:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_gnc_print_date’:
swig-engine.c:13247:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccAccountGetTypeStr’:
swig-engine.c:6643:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccAccountTypeEnumAsString’:
swig-engine.c:6563:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_gnc_get_account_separator_string’:
swig-engine.c:4333:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_gnc_build_book_path’:
swig-engine.c:17726:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_gnc_hook_create’:
swig-engine.c:20874:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccSplitGetMemo’:
swig-engine.c:2313:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccSplitGetAction’:
swig-engine.c:2368:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccSplitGetType’:
swig-engine.c:2888:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccSplitGetCorrAccountFullName’:
swig-engine.c:3104:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccSplitGetCorrAccountName’:
swig-engine.c:3132:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccSplitGetCorrAccountCode’:
swig-engine.c:3160:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_gnc_account_name_violations_errmsg’:
swig-engine.c:4477:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccAccountGetName’:
swig-engine.c:5030:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccAccountGetCode’:
swig-engine.c:5058:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccAccountGetDescription’:
swig-engine.c:5086:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccAccountGetColor’:
swig-engine.c:5114:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccAccountGetFilter’:
swig-engine.c:5142:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccAccountGetSortOrder’:
swig-engine.c:5170:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In function ‘_wrap_xaccAccountGetNotes’:
swig-engine.c:5198:7: error: ‘gswig_result’ may be used uninitialized in this 
function
swig-engine.c: In 

Re: complie error in current trunk

2012-12-20 Thread Herbert Thoma
Am 20.12.2012 16:01, schrieb John Ralls:
 
 On Dec 20, 2012, at 3:06 AM, Herbert Thoma herbert.th...@iis.fraunhofer.de 
 wrote:
 
 Hi!

 I get the following errors:
 (If I run configure with --disable-error-on-warning the build
 completes successfully.)

 cc1: warnings being treated as errors
 swig-unittest-support-guile.c: In function 
 ‘_wrap_TestErrorStruct_log_domain_get’:
 swig-unittest-support-guile.c:1367:7: error: ‘gswig_result’ may be used 
 uninitialized in this function
 swig-unittest-support-guile.c: In function ‘_wrap_TestErrorStruct_msg_get’:
 swig-unittest-support-guile.c:1430:7: error: ‘gswig_result’ may be used 
 uninitialized in this function


 cc1: warnings being treated as errors
 
 [SNIP]
 

 openSUSE 11.4 (x86_64)
 SWIG Version 1.3.40
 Guile 1.8.7
 gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585]
 
 Did you do a make maintainer-clean, autogen, and configure? That usually 
 fixes swig problems.

I used a fresh, clean checkout from SVN, so no leftovers from previous 
revisions should spoil the build.

I noticed that my version of swig is 1.3.40 which was released in 2009. The 
current
version seems to be 2.0.9. However, there is no native package of swig-2.0 
available
for openSUSE 11.4 (which was released early 2011). Which version of swig do yo 
use?

 Herbert.

 Regards,
 John Ralls
 
 
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


LWN article: The accounting quest: PostBooks

2012-09-20 Thread Herbert Thoma
http://lwn.net/SubscriberLink/516659/cb415fd96d79a044/

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


LWN Article: The accounting quest: Ledger

2012-06-16 Thread Herbert Thoma
http://lwn.net/SubscriberLink/501681/35a853295d0f5dee/

Well, not an accounting package, more a report generation tool.

It can even read GnuCash files, but may be not for ever:

For those who want a more graphical experience, Ledger can read (uncompressed)
GnuCash files, but there are a couple of caveats. One is that the Ledger 
developer
(John Wiegley seems to do almost all the work on Ledger) is somewhat 
unenthusiastic
about this approach; the manual asks: why would anyone use a Gnome-centric,
multi-megabyte behemoth to edit their data, and only a one megabyte binary to 
query
it? The other is that this support appears to be lacking from the 
in-development
3.0 release. So, while using GnuCash works for now, it's not clear that it will
continue to work in the future.


Gnome-centric, multi-megabyte behemoth is an interesting description ...
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


LWN: Accounting systems: a rant and a quest

2012-05-10 Thread Herbert Thoma
http://lwn.net/SubscriberLink/496158/298f4c1ec6376289/

Quote from the comments:
GnuCash after its guille-inflicted near death experience (how many volunteers 
you
find maintaining Scheme-based accounting package? The answer has been proven to 
be
zero) has now Python API ...

If only we could come of with a Python report system.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Major releases for two financial applications article on LWN

2011-10-13 Thread Herbert Thoma

Interesting article on LWN:

http://lwn.net/SubscriberLink/462625/9919bbf435a1457b/
--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Lost input in quickfill cells due to race

2011-07-18 Thread Herbert Thoma

On 18.07.2011 16:43, Christian Stimming wrote:

Reverting your patch from May (r20689) will make this behaviour go away again.
This is Ubuntu 10.10 with gtk-2.20.1. I don't want to revert your patch right
away as I'm sure you had some other bugs that went away by your patch, but
this particular other issue was introduced by it. (Unfortunately, it also went
into the stable 2.4.6 already, so it needs to be fixed there as well...)


I can confirm that this bug also occurs on openSUSE 11.4 with gtk-2.22.1


Do you have any ideas here?

Regards,

Christian


Am Dienstag, 24. Mai 2011 schrieb Jim Paris:

I've been looking at it some more and came up with the below fix,
which seems to work.  The keyboard input ends up in the commit_cb
which calls gtk_editable_insert_text then gtk_editable_set_position.
It's the call to _set_position that clears the selection!

I think this might be a bug in GTK+, because gtk_entry_real_set_position
does this:

   if (position != priv-current_pos ||
   position != priv-selection_bound)
 {
   _gtk_entry_reset_im_context (entry);
   gtk_entry_set_positions (entry, position, position);
 }

The test is basically always true.  I don't think that || was
intended: priv-current_pos is the start of the selection,
priv-selection_bound is the end of it.  If the test were, then
an attempt to position the cursor at either end of the selection
wouldn't have cleared it.

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



--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: RFC: Adding some management structure, particularly for decisions about our donation account

2011-06-10 Thread Herbert Thoma

On 09.06.2011 23:24, Geert Janssens wrote:
...

Judging from the very little reaction on this message here, it seems that
almost nobody really cares about the existence of the donation money and/or
what is being done with it. In that case we have to continue to live with
the unclear decision process about the donation account.

...

I may not have yelled loud enough, but I'm for a more formal decision
structure ;)

So far 3 people spoke in favor of it (Derek, Christian and me) and one stated
no interest (John) via a private conversation.

I count the silent voices to agree with whatever gets decided, otherwise they
could have spoken up.

Do you think 3 people is too few to get a decision structure set up ?

Also, perhaps many people have no interest in helping to create a decision
structure, but don't oppose to having one.


Well, I did respond to Christian's message to the German list, so we are 4 
people.

I am a bit hesitant to play a larger role in a potential GnuCash organization 
because
as Christian stated in his draft charter GnuCash is a Meritocracy. Although I 
have
some merits (I have been using GnuCash since 1999 (it was called X Accountant 
back then)
and my first patch was accepted more than 10 years ago.), I am not, and never 
was, a
core developer. I just feel that those who contribute most should have the 
most
influence. That group of people would obviously include Christian and Derek.

That said, and given the not too large amount of donations up to now, it would 
be
OK for me if Christian and Derek just decide about the money and announce it on
the list. If they feel that we need a more formal structure, I would be happy 
to help,
but I won't be the chairman/president/leader.

Best,
 Herbert.
--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


GNU Guile 2.0.0 released

2011-02-17 Thread Herbert Thoma

When distributions start to ship this, will GnuCash just work or
will there be problems? (Probably a rhetorical question ...)

http://lwn.net/Articles/428288/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


GTK+ 3.0.0 released, was Re: GNU Guile 2.0.0 released

2011-02-17 Thread Herbert Thoma

Oh, and GTK+ 3.0.0 as well:
http://lwn.net/Articles/427458/

Interesting times for developers.

On 17.02.2011 11:20, Herbert Thoma wrote:

When distributions start to ship this, will GnuCash just work or
will there be problems? (Probably a rhetorical question ...)

http://lwn.net/Articles/428288/
___
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: get quotes broken?

2011-01-19 Thread Herbert Thoma

On 19.01.2011 05:22, Mike Alexander wrote:

--On January 18, 2011 4:07:17 PM -0800 Russ Walasek kesa...@gmail.com wrote:


Price quotes work on 2.4, but don't work on the latest trunk release.

On OS X 10.6.6, building from source.


This should be fixed in revision 20126. The bug was introduced in revision 
20042.


Yes, I built r20126 and can confirm that it works again.

Thanks a lot!

 Herbert.


Mike




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


get quotes broken?

2011-01-18 Thread Herbert Thoma

Hi,

did anything change in the code that handles online retrieval of
stock prices with finance-quote? It does not work any more for me.

The last successful stock price download was on Jan. 7th, but I
don't do this every day so I don't know exactly when it stopped
working. My current GnuCash is built from SVN r20106.

gnc-fq-dump shows reasonable results.

Is there anybody else having problems? Any suggestions what might
have changed and how to debug this?

 Herbert.
--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: gnc-euro: non-ISO-symbols in gnc_euro_rate_struct gnc_euro_rates

2011-01-13 Thread Herbert Thoma

On 13.01.2011 03:01, Frank H. Ellenberger wrote:

Hi Herbert,

I am just adding EEK to the list and wondering about a bunch of
non-ISO-symbols there like S and SCH for ATS. Could you explain me the
intension?


Well, this code is quite old. In fact, it is older than the list of
ISO currencies in CnuCash. So back then it was likely that a user
would just use DM instead of DEM or S/SCH instead of ATS.


Special, if we extend the list for other frozen rates, I fear we will get
collisions.


I guess we can remove the non-ISO symbols now.

 Herbert.


TIA
Frank



--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


enhancement: averages for bar chart reports

2011-01-11 Thread Herbert Thoma

Matthias Gruhn suggested on the German GnuCash list:

Add averages to the income and expense bar chart reports just like it was
introduced for the income and expense pie chart reports in r19253

I created bug #639259 and added a patch that implements this.
The patch introduces one new string. Please add this to the
translations.

 Herbert.
--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


compiler warning in src/import-export/import-backend.c

2011-01-08 Thread Herbert Thoma

Hi!

I get a warning in src/import-export/import-backend.c line 1187
best_match may be used uninitialized. Since warnings are treated as
error the build stops there.

This is easily fixed by initializing best_match with NULL.
I won't create a bug or a patch for this trivial fix, but can
somebody with SVN access please commit this?

 Herbert.
--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


build failure r20035

2011-01-07 Thread Herbert Thoma


cc1: warnings being treated as errors
gnc-plugin-budget.c: In function ‘gnc_plugin_budget_cmd_copy_budget’:
gnc-plugin-budget.c:254: error: implicit declaration of function 
‘gnc_budget_clone’
gnc-plugin-budget.c:254: error: assignment makes pointer from integer without a 
cast
make[4]: *** [gnc-plugin-budget.lo] Fehler 1
make[4]: Leaving directory 
`/home/tma/gnucash/gnucash_cvs/gnucash_work/src/gnome'
make[3]: *** [all-recursive] Fehler 1
make[3]: Leaving directory 
`/home/tma/gnucash/gnucash_cvs/gnucash_work/src/gnome'


find src -name *.h -exec grep gnc_budget_clone {} \;
finds no function called gnc_budget clone, and
find src -name *.c -exec grep gnc_budget_clone {} \;
finds only the line that causes the compiler to complain ...

--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Future of Gnucash: Most productive platform (programming language and toolkit)?

2010-12-29 Thread Herbert Thoma

On 28.12.2010 22:27, Christian Stimming wrote:
...

Lots of good reasoning skipped.


PS: Gee, this message was too long. It should have been split into at least
three different messages. If you read until here, I'll give you a beer in case
we ever meet :-)


So I made it till the end. I'll remember that you owe me a beer ;-)

 Herbert.
--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Future of Gnucash (Javascript?)

2010-12-29 Thread Herbert Thoma

On 28.12.2010 22:35, Christian Stimming wrote:

Am Dienstag, 28. Dezember 2010 schrieb Jeff Warnica:

The question shouldn't be C++ or not, but what is the best
2nd/runtime/scripting language?

In 2010/2011, given that Gnucash isn't a game, there is really only one
choice: Javascript. While http://live.gnome.org/Gjs seems rather dead,
http://live.gnome.org/GnomeShell is obviously committed to Javascript (and
Gjs as the binding toolkit). The low-level infrastructure is there, Gnome
3.0/GnomeShell 1.0 time frame is shorter then Gnucash 2.6, at the very
least.


As I've written in my other message: Yes. A scripting language might be even
better than any compiled language such as C++. I would love to see an example
project which shows how something similar to gnucash can be build using
Javascript. I'm not familiar with GnomeShell so far, so I won't work on such
an experiment as a starter. But if someone can show to us how something
similar to gnucash would be started in Javascript, I would surely consider
this a very good option to choose.


Hmm, I just would like to point out that GnuCash was kind of a script once:
It was a guile script that called the C/gtk/gnome code (OK, the GUI code
was not directly scripted). It took us a long time to rework this back to
a C application that called guile for the reports ...

I am not that sure that an interpreted language is a good idea. But I am
an electrical engineer not a computer scientist. So I tend to prefer
languages that are closer to the hardware ...

 Herbert.


One minor issue against the language, though: IMHO the syntax sucks. Also, for
a newcomer it sucks that the syntax tricks you into thinking it were similar
to Java. It is not, not at all. In reality it is rather much more similar to
Scheme (heh), but the syntax tries its best to hide this from the programmer.
Ok, maybe that's just the beginner's learning curve, but currently I don't
like the language. You are heartly invited to prove me otherwise.

Best Regards,

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



--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Server problems?

2010-11-07 Thread Herbert Thoma

Hi Derek,

I can't access GnuCash SVN, I get a 504 Gateway Time-out.

The mailing lists seem to be down as well.

 Herbert.
--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Database locked after crash - python bindings

2010-11-07 Thread Herbert Thoma

On 05.11.2010 23:12, Christoph Holtermann wrote:
...

By gets stuck somewhere I trust that you mean that it hangs rather than 
segfaulting.

Yes, that´s it and that´s not it because it actually doesn´t get stuck. I was 
misled because the startup screen went away
after that Force open Dialogue ( in german : ) and I didn´t realize that it 
was still loading normally - I have a very long
loading report.

-  So gnucash actually starts normal, It´s just a bit surprising that the 
splash screen doesn´t continue after that window.


I just created bug #634252 (https://bugzilla.gnome.org/show_bug.cgi?id=634252)
stating this problem and attached a simple patch to fix it.

Note that this also relates to the discussion
Re: r19733 - gnucash/trunk/src - Preferences window improvements:
about removing the show splash screen option from preferences

 Herbert.
--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: r19733 - gnucash/trunk/src - Preferences window improvements:

2010-11-01 Thread Herbert Thoma

On 01.11.2010 10:43, Geert Janssens wrote:

On Monday 1 November 2010, Mike Evans wrote:

On Sunday October 31 2010 20:29:01 Mike Alexander wrote:

--On October 30, 2010 10:55:24 AM -0400 Geert Janssens

gjanss...@code.gnucash.org  wrote:

* General: remove Show splash screen option


I'm disappointed you removed this.  I find splash screens annoying
after the first 50 or so times I see them and generally turn them off
if possible.  Perhaps it's just me, but I suspect others might agree.

   Mike


I tend to agree, I turned off the splash screen many moons ago.
Mike E


That's interesting, thanks for your feedback.

I like a splash screen for slow loading applications as it is a fast feedback
that the application is effectively loading. I've seen many users click twice
or three times on for example firefox because there was no immediate response.
Particularly with GnuCash the time nothing seems to happen is very long
without the splash screen.


IMHO the splash screen is quite useful, especially because the status line
and progress indicator of the splash screen tell my what is going on (and
that there is something happening at all).

I have some reports open at startup and it takes about 2 min 15 sec from
hitting enter after gnucash in the shell until the main window shows up
(by the way, the reports could use some speed improvements). So I like
the splash screen.

Even from starting to finishing of loading data it takes about 8 sec, so I
agree with Geert that some feedback for the user is useful.

On the other hand, if an experienced user does not like the splash screen for
whatever reason, he should be able to turn it off. Disclaimer: I am an
engineer, not an UI designer, and I am quite fond of options. I usually
prefer configurability (is that an english word?) over simplicity.

 Herbert.


What is it you guys dislike about the splash screen ? I'm curious to
understand.

I have been looking at other applications with splash screens.
* Gimp has no GUI option to disable it, but you can start it with gimp -s to
disable the splash screen.
* OpenOffice doesn't have an option to disable the splash screen
* Scribus does have a GUI option to disable the splash screen.

So apparently all variants exist.

My main motivation to remove the option was simplification. Many applications
suffer from optionitis. With that in mind I figured an application either
has a splash screen or it has not, but adding an option for it only clutters
the GUI.

After your feedback and looking at the other applications, I realize my train
of thought may have been a little too.. well, simple...


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



--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Getting 2.4 Released - Yes!

2010-10-18 Thread Herbert Thoma

On 17.10.2010 20:08, Yawar Amin wrote:


On 2010-10-17, at 04:33, Christian Stimming wrote:

Alternatively, we can admit to ourselves there isn't too big of a point to
have the SQL backends as headline feature, and then we're almost done.


Agreed, SQL can always be a headliner for 2.5. We can iterate rapidly over 
version numbers;
there’s no punishment for that. And we can use the 2.4 series to enhance the 
report management
dialog box (maybe even turn it into a tab) and keep testing the SQL backend(s).


Well, if we stick to our even numbers are release, odd numbers are development 
scheme, then
it could be headline feature only for 2.6 (or 3.0 and there headline feature 
will be gnome 3
(or cutecash with Qt as GUI toolkit)). That is at least 2 years away, if I 
extrapolate past
experiences.

On the other hand: SQL as of now is only just another data storage, no real 
database
features like concurrent access from multiple GnuCash instances. So, IMHO, it's 
not that
big anyway (from a user perspective, I do appreciate the effort of the devs).

Personally, I have been using the 2.5 branch for my real financial data for at 
least
half a year now (with XML backend) and never experienced any problems. So I 
agree with
Christian to release 2.4.0 without SQL.

 Herbert.


FWIW,

Yawar




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


--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: What is the 2.5 branch?

2010-10-18 Thread Herbert Thoma

On 18.10.2010 19:19, Thomas Bullock wrote:

Hi Herbert,

snip

You said:

Personally, I have been using the 2.5 branch for my real financial data for at 
least half a year now (with XML backend) and never experienced any problems.


That's a typo. I meant the 2.3 branch (the current development in trunk).

2.5 will be the next development cycle after we release 2.4 stable.

Sorry for the confusion.

 Herbert.


   Herbert.

Please clarify the branch you are referring to.  If the debate is when to 
declare 2.4 the next official release, 2.5 confuses me.

Thanks for your patience with the uninitiated. :-)

Tom



--
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: error No rule to make target

2010-08-22 Thread Herbert Thoma
Hi,

just do a

rm -rf /home/jh/developement/gnucash/src/business/business-reports/

With r19454 Geert Janssens moved business-reports from
gnucash/trunk/src/business/business-reports/
to
gnucash/trunk/src/report/business-reports/
and the svn up obviously leaves some stale symlinks in
gnucash/trunk/src/business/business-reports/

I had the same problem this morning ...

 Herbert.

jh wrote:
 Hi, 
 when I try to compile the latest version, I get the following error:
 -
 *** No rule to make target
 `/home/jh/developement/gnucash/src/business/business-reports/gnucash/report/receivables.scm',
  needed by `guile-strings.c'.  Stop.
 -
 this was after doing cvs update and running automake again.
 
 Juergen
 
 Ubuntu 10.04, Gnome 2.30.2, Kernel 2.6.32-24-generic
 
 ___
 gnucash-devel mailing list
 gnucash-devel@gnucash.org
 https://lists.gnucash.org/mailman/listinfo/gnucash-devel
 

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


compile error r19409

2010-08-06 Thread Herbert Thoma
Hi!

I get a compiler error in r19409:

cc1: warnings being treated as errors
dialog-file-access.c: In function ‘gnc_ui_file_access’:
dialog-file-access.c:253: error: ‘gconf_section’ may be used uninitialized in 
this function
make[5]: *** [dialog-file-access.lo] Fehler 1
make[5]: Leaving directory 
`/home/tma/gnucash/gnucash_cvs/gnucash_work/src/gnome-utils'


Initializing gconf_section with NULL fixes the warning. I don't
know if this is a real problem and if the fix will fix the real problem, if any.
May be there should be a default section in the switch statement later on.

 Herbert.
-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: i need access to the gnucash source code and a recommendation of a good IDE

2010-07-05 Thread Herbert Thoma
Hi!

Looking at the main GnuCash website was good advice.

At the left side you can find the following links:

Source Docs: http://svn.gnucash.org/docs/HEAD/
Browse Source Code: http://svn.gnucash.org/trac/browser/
SVN Access: http://wiki.gnucash.org/wiki/Subversion

If you seriously want to hack on GnuCash, you most probably want to
get the HEAD branch (version 2.3.x), not the stable branch (2.2.x).

With regard to IDEs: Probably most developers edit the source
with emacs or vi or any other editor and just type make on the
shell prompt. Some developers have reported using eclipse.

Best,
 Herbert.

adekoya adekunle wrote:
 i would want to know of specific documentation that could help a
 developer that intends to extend the source code.
 
 i mean if i could get a link to download a documentation  that does
 proper explanation of the source code and how to extend.
 
 
 i would be glad that my questions are each and specifically treated so
 i could minimize iterations in resolving the issues of source code
 edits.
 
 thanks
 
 
 
 On Mon, Jul 5, 2010 at 3:21 PM, adekoya adekunle
 adekunleadek...@gmail.com wrote:
 i have just downloaded something from :
 http://www.gnucash.org/pub/gnucash/sources/stable/gnucash-2.2.9.tar.bz2

 i want to know if that link contains a valid source for windows platform ?

 i also want to know how to load the source code in any of the free
 open source IDE.


 i also have qt on my machine. can i use qt as my IDE ?


 i also want to know the file name that contains the entry-point
 function for the gnucash sofware ?

 knowing the entry-point function would help me in doing proper trace
 of the application execution path.

 please help on those specific questions.


 thanks

 'kunle


 On Mon, Jul 5, 2010 at 3:09 PM, Ankur Sinha sanjay.an...@gmail.com wrote:
 On Mon, 2010-07-05 at 15:01 +0200, adekoya adekunle wrote:
 hello,

 i have tried using gnucash in the last few  weeks.

 we plan to be able to make a few customizations/extensions to gnucash
 to fit our purpose.

 i want you guys to show me where i can download the source code for
 gnucash( to be run on Ms Windows  XP) .

 i also want you to show me where i can get a free IDE with compiler
 for compiling and executing the source.

 i hope to start making some customizations to the source code in the
 next few weeks.

 before then, i want to study the source and do some experimentation
 with source edits.

 any help ?

 thanks

 'kunle
 hello,

 Have you looked at the main website[1]??

 [1]
 http://www.gnucash.org/
 regards,
 Ankur

 ___
 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
 

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: piecharts borken r19279

2010-06-22 Thread Herbert Thoma
Christian Stimming wrote:
 Am Saturday 19 June 2010 schrieb Mike Alexander:
 --On June 19, 2010 10:07:46 PM +0200 Christian Stimming

 stimm...@tuhh.de wrote:
 Am Saturday 19 June 2010 schrieb Herbert Thoma:
 Hi,

 after updating from svn piecharts are broken for me.
 Piecharts worked before, the last update was about a week ago.
 
 Can you try again with r19283, please? I guess you have guile-1.8 and I have 
 guile-1.6 here, and apparently they react slightly differently on my previous 
 case-statement. But the syntax in r19283 was tested with both versions here, 
 so I hope it should be fine now.

Yes, r19283 works.

 Thanks!

Thank you!

 Herbert.

 Christian
 

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: piecharts borken r19279

2010-06-20 Thread Herbert Thoma
Herbert Thoma wrote:
 Now I have a more serious problem and I am not sure if it is
 realated. I updated from svn and was able to start GnuCash one
 time. Piecharts still did not work but I got a different backtrace,
 see below.
 
 Next time I tried to start GnuCash I got a message box:
 
 Ein Bericht hat eine Identifikationsnummer (»report-guid«), die doppelt 
 auftritt.
 Bitte prüfen Sie, ob folgende »report-guid« fälschlicherweise in den 
 gespeicherten
 Berichten mehr als ein Mal auftritt: e1bd09b8a1dd49dd85760db9d82b045c
 
 I get a total of 4 of these boxes with different report-guids.
 
 Most puzzling is, that I get these message boxes even if I start
 with the --nofile option.

OK, I found the causo of this problem: I tried to hack a little on
account-piecharts.scm directly in
/usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/.
This left me with account-piecharts.scm~ (the backup file) in the
standard-reports directory.

Obviously there is some for-each file in directory logic there which
got screwed up by the backup file. It might be a good idea to
explicitly list the files to load somewhere, wouldn't it?

 Where shall I look for this report-guid? I already deleted my .gnucash
 directory.
 
 Christian Stimming wrote:
 Am Saturday 19 June 2010 schrieb Herbert Thoma:
 Hi,

 after updating from svn piecharts are broken for me.
 Piecharts worked before, the last update was about a week ago.
 That one goes on me (r19253, r19252), sorry for that. I hope I have disabled 
 enough the new feature now (in r19280). Seems to me I might still have 
 messed 
 up the Scheme case-syntax in date-utilities.scm, 
 
 The first time I started GnuCash after the svn up I got this backtrace:
 
 ...
  650: 16  (let* (# # # #) (if # # #) (gnc:report-set-ctext! report html) ...)
  652: 17* [#procedure #f # #]
 In 
 /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm:
  538: 18  [piechart-renderer # Expense Accounts ...]
 ...
  257: 19  (let* (# # # # ...) (define # #) (define # #) ...)
  281: 20* (case averaging-selection (# #) (# #) ...)
 /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm:281:13:
  In procedure memoization in expression (case averaging-selection (# #) ...):
 /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm:281:13:
  In file 
 /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm,
  line 280: Bad case labels #...@else in expression (case averaging-selection 
 ((quote YearDelta) (string-append report-title   (_ Yearly Average))) 
 ((quote MonthDelta) (string-append report-title   (_ Monthly Average))) 
 ((quote WeekDelta) (string-append report-title   (_ Weekly Average))) 
 (#...@else report-title)).
 
 
 (define (gnc:date-get-fraction-func interval)
   (case interval
 ('YearDelta gnc:date-to-year-fraction)
 ('MonthDelta gnc:date-to-month-fraction)
 ('WeekDelta gnc:date-to-week-fraction)
 ('DayDelta gnc:date-to-day-fraction)
 (else #f)))

 and my intention was that if interval has the value #f or 'None, this 
 statement should return #f, but for the four other symbols it should return 
 the values of the other variables. However, the error message indicates this 
 isn't the correct syntax for the else-branch if interval had the value 
 'None 
 :

 In file
 /usr/local/share/gnucash/scm/date-utilities.scm, line 191: Bad case
 labels #...@else in expression (case interval ((quote YearDelta)
 gnc:date-to-year-fraction) ((quote MonthDelta) gnc:date-to-month-fraction)
 ((quote WeekDelta) gnc:date-to-week-fraction) ((quote DayDelta)
 gnc:date-to-day-fraction) (#...@else #f)). 
 Some Scheme help, anyone?

 Thanks!

 Christian

 

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: piecharts borken r19279

2010-06-20 Thread Herbert Thoma
Herbert Thoma wrote:
 Herbert Thoma wrote:
 Now I have a more serious problem and I am not sure if it is
 realated. I updated from svn and was able to start GnuCash one
 time. Piecharts still did not work but I got a different backtrace,
 see below.

 Next time I tried to start GnuCash I got a message box:

 Ein Bericht hat eine Identifikationsnummer (»report-guid«), die doppelt 
 auftritt.
 Bitte prüfen Sie, ob folgende »report-guid« fälschlicherweise in den 
 gespeicherten
 Berichten mehr als ein Mal auftritt: e1bd09b8a1dd49dd85760db9d82b045c

 I get a total of 4 of these boxes with different report-guids.

 Most puzzling is, that I get these message boxes even if I start
 with the --nofile option.
 
 OK, I found the causo of this problem: I tried to hack a little on
 account-piecharts.scm directly in
 /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/.
 This left me with account-piecharts.scm~ (the backup file) in the
 standard-reports directory.
 
 Obviously there is some for-each file in directory logic there which
 got screwed up by the backup file. It might be a good idea to
 explicitly list the files to load somewhere, wouldn't it?

Ok, here are the results of my hacking:

If I comment out line 280 - 285 in account-piecharts.scm then the
piechart reports work again.

 Where shall I look for this report-guid? I already deleted my .gnucash
 directory.

 Christian Stimming wrote:
 Am Saturday 19 June 2010 schrieb Herbert Thoma:
 Hi,

 after updating from svn piecharts are broken for me.
 Piecharts worked before, the last update was about a week ago.
 That one goes on me (r19253, r19252), sorry for that. I hope I have 
 disabled 
 enough the new feature now (in r19280). Seems to me I might still have 
 messed 
 up the Scheme case-syntax in date-utilities.scm, 
 The first time I started GnuCash after the svn up I got this backtrace:

 ...
  650: 16  (let* (# # # #) (if # # #) (gnc:report-set-ctext! report html) ...)
  652: 17* [#procedure #f # #]
 In 
 /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm:
  538: 18  [piechart-renderer # Expense Accounts ...]
 ...
  257: 19  (let* (# # # # ...) (define # #) (define # #) ...)
  281: 20* (case averaging-selection (# #) (# #) ...)
 /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm:281:13:
  In procedure memoization in expression (case averaging-selection (# #) ...):
 /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm:281:13:
  In file 
 /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm,
  line 280: Bad case labels #...@else in expression (case averaging-selection 
 ((quote YearDelta) (string-append report-title   (_ Yearly Average))) 
 ((quote MonthDelta) (string-append report-title   (_ Monthly Average))) 
 ((quote WeekDelta) (string-append report-title   (_ Weekly Average))) 
 (#...@else report-title)).


 (define (gnc:date-get-fraction-func interval)
   (case interval
 ('YearDelta gnc:date-to-year-fraction)
 ('MonthDelta gnc:date-to-month-fraction)
 ('WeekDelta gnc:date-to-week-fraction)
 ('DayDelta gnc:date-to-day-fraction)
 (else #f)))

 and my intention was that if interval has the value #f or 'None, this 
 statement should return #f, but for the four other symbols it should return 
 the values of the other variables. However, the error message indicates 
 this 
 isn't the correct syntax for the else-branch if interval had the value 
 'None 
 :

 In file
 /usr/local/share/gnucash/scm/date-utilities.scm, line 191: Bad case
 labels #...@else in expression (case interval ((quote YearDelta)
 gnc:date-to-year-fraction) ((quote MonthDelta) gnc:date-to-month-fraction)
 ((quote WeekDelta) gnc:date-to-week-fraction) ((quote DayDelta)
 gnc:date-to-day-fraction) (#...@else #f)). 
 Some Scheme help, anyone?

 Thanks!

 Christian

 

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


piecharts borken r19279

2010-06-19 Thread Herbert Thoma
Hi,

after updating from svn piecharts are broken for me.
Piecharts worked before, the last update was about a week ago.

SVN r19279

SuSE 11.0
guile 1.8.4
gtk 2.12.9
webkit 1.0.2

 Herbert.

In /usr/local/share/gnucash/scm/report.scm:
 671:  5* [gnc:backtrace-if-exception #procedure #f ()]
In unknown file:
   ?:  6  (letrec ((dumper #)) (catch (quote ignore) (lambda () #) (lambda # 
#f)))
In /usr/local/share/gnucash/guile-modules/gnucash/main.scm:
 139:  7  [catch ignore #procedure #f () #procedure #f (key . args)]
In unknown file:
   ?:  8* [#procedure #f ()]
In /usr/local/share/gnucash/guile-modules/gnucash/main.scm:
 142:  9* [lazy-catch #t #procedure #f () #procedure dumper (key . args)]
In unknown file:
   ?: 10* [#procedure #f ()]
In /usr/local/share/gnucash/guile-modules/gnucash/main.scm:
 143: 11* [apply #procedure #f () ()]
In unknown file:
   ?: 12  [#procedure #f ()]
In /usr/local/share/gnucash/scm/report.scm:
...
 675: 13  (set! html (gnc:report-render-html report #t))
 675: 14* [gnc:report-render-html # #t]
 638: 15  (if (and (not #) (gnc:report-ctext report)) (gnc:report-ctext report) 
...)
 646: 16  (let ((template #) (doc #f)) (set! doc (if template # #f)) doc)
 649: 17* (set! doc (if template (let* (# # # ...) (if # # ...) ...) ...))
 649: 18* (if template (let* (# # # ...) (if # # ...) ...) ...)
 650: 19  (let* (# # # #) (if # # #) (gnc:report-set-ctext! report html) ...)
 652: 20* [#procedure #f # #]
In 
/usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm:
 538: 21  [piechart-renderer # Assets 5c7fd8a1fe9a4cd38884ff54214aa88a ...]
...
 257: 22  (let* (# # # # ...) (define # #) (define # #) ...)
 262: 23* [gnc:date-get-fraction-func None]
In /usr/local/share/gnucash/scm/date-utilities.scm:
 192: 24  (case interval ((quote YearDelta) gnc:date-to-year-fraction) ...)
/usr/local/share/gnucash/scm/date-utilities.scm:192:3: In procedure memoization 
in expression (case interval (# gnc:date-to-year-fraction) ...):
/usr/local/share/gnucash/scm/date-utilities.scm:192:3: In file 
/usr/local/share/gnucash/scm/date-utilities.scm, line 191: Bad case labels 
#...@else in expression (case interval ((quote YearDelta) 
gnc:date-to-year-fraction) ((quote MonthDelta) gnc:date-to-month-fraction) 
((quote WeekDelta) gnc:date-to-week-fraction) ((quote DayDelta) 
gnc:date-to-day-fraction) (#...@else #f)).
In /usr/local/share/gnucash/scm/report.scm:
 671:  2* [gnc:backtrace-if-exception #procedure #f ()]
In unknown file:
   ?:  3  (letrec ((dumper #)) (catch (quote ignore) (lambda () #) (lambda # 
#f)))
In /usr/local/share/gnucash/guile-modules/gnucash/main.scm:
 139:  4  [catch ignore #procedure #f () #procedure #f (key . args)]
In unknown file:
   ?:  5* [#procedure #f ()]
In /usr/local/share/gnucash/guile-modules/gnucash/main.scm:
 142:  6* [lazy-catch #t #procedure #f () #procedure dumper (key . args)]
In unknown file:
   ?:  7* [#procedure #f ()]
In /usr/local/share/gnucash/guile-modules/gnucash/main.scm:
 143:  8* [apply #procedure #f () ()]
In unknown file:
   ?:  9  [#procedure #f ()]
In /usr/local/share/gnucash/scm/report.scm:
...
 675: 10  (set! html (gnc:report-render-html report #t))
 675: 11* [gnc:report-render-html # #t]
 638: 12  (if (and (not #) (gnc:report-ctext report)) (gnc:report-ctext report) 
...)
 646: 13  (let ((template #) (doc #f)) (set! doc (if template # #f)) doc)
 649: 14* (set! doc (if template (let* (# # # ...) (if # # ...) ...) ...))
 649: 15* (if template (let* (# # # ...) (if # # ...) ...) ...)
 650: 16  (let* (# # # #) (if # # #) (gnc:report-set-ctext! report html) ...)
 652: 17* [#procedure #f # #]
In 
/usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm:
 538: 18  [piechart-renderer # Assets 5c7fd8a1fe9a4cd38884ff54214aa88a ...]
...
 257: 19  (let* (# # # # ...) (define # #) (define # #) ...)
 262: 20* [gnc:date-get-fraction-func None]
In /usr/local/share/gnucash/scm/date-utilities.scm:
 192: 21  (case interval ((quote YearDelta) gnc:date-to-year-fraction) ...)
/usr/local/share/gnucash/scm/date-utilities.scm:192:3: In procedure memoization 
in expression (case interval (# gnc:date-to-year-fraction) ...):
/usr/local/share/gnucash/scm/date-utilities.scm:192:3: In file 
/usr/local/share/gnucash/scm/date-utilities.scm, line 191: Bad case labels 
#...@else in expression (case interval ((quote YearDelta) 
gnc:date-to-year-fraction) ((quote MonthDelta) gnc:date-to-month-fraction) 
((quote WeekDelta) gnc:date-to-week-fraction) ((quote DayDelta) 
gnc:date-to-day-fraction) (#...@else #f)).

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash

New GnuCash article on LWN

2010-05-19 Thread Herbert Thoma
http://lwn.net/SubscriberLink/387967/cc502c0dc33d97d3/
-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


cutecash linker error

2010-03-28 Thread Herbert Thoma
[ 99%] Building CXX object src/gnc/CMakeFiles/cutecash.dir/main.cpp.o
/home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp: In function ‘int 
main(int, char**)’:
/home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp:180: error: 
‘gnc_module_init_backend_dbi’ was not declared in this scope
/home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp:201: error: 
‘gnc_module_finalize_backend_dbi’ was not declared in this scope
make[2]: *** [src/gnc/CMakeFiles/cutecash.dir/main.cpp.o] Fehler 1
make[1]: *** [src/gnc/CMakeFiles/cutecash.dir/all] Fehler 2
make: *** [all] Fehler 2

r18972

GnuCash of the same revision builds fine. I don't use --enable-dbi there, 
though.

 Herbert.
-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: cutecash linker error

2010-03-28 Thread Herbert Thoma
Christian Stimming wrote:
 Am Sonntag, 28. März 2010 schrieb Herbert Thoma:
 [ 99%] Building CXX object src/gnc/CMakeFiles/cutecash.dir/main.cpp.o
 /home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp: In function ‘int
  main(int, char**)’:
  /home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp:180: error:
  ‘gnc_module_init_backend_dbi’ was not declared in this scope
  /home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp:201: error:
  ‘gnc_module_finalize_backend_dbi’ was not declared in this scope make[2]:
  *** [src/gnc/CMakeFiles/cutecash.dir/main.cpp.o] Fehler 1 make[1]: ***
  [src/gnc/CMakeFiles/cutecash.dir/all] Fehler 2
 make: *** [all] Fehler 2
 
 I forgot to enclose the init_backend_dbi() functions by #ifdef WITH_SQL.
 
 Minor nitpicking: This is a compiler error, not a linker error, though :-)

Yes, you're right. I probably was still a bit asleep due to the
switch to DST ;-)

Thanks for the quick fix.

 Herbert.

 I'll commit a fix later today.
 
 Regards,
 
 Christian
 
 

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Required Cutecash dependencies

2010-03-06 Thread Herbert Thoma
Christian Stimming schrieb:
 The problem are some section like this:
 #ifndef HAVE_GUILE18
 --scm_block_gc;
 #endif
 in src/engine/engine-helpers.c

 Do you know how to check for the guile version and how to set the
  HAVE_GUILE18 if required in cmake?
 
 I've added this as well. Thanks for pointing this out.

Does not seem to work :-(

The check works. I added
MESSAGE (Found Guile ${GUILE_VERSION_MAJOR}.${GUILE_VERSION_MINOR})
to CMakeLists.txt and it reports 1.8.

However, when I do make VERBOSE=1 I get:
[ 27%] Building C object src/engine/CMakeFiles/engine.dir/engine-helpers.c.o
cd /home/tma/gnucash/gnucash_cvs/cutecash/build-cutecash/src/engine  
/usr/bin/gcc  -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\gnc.engine\ -Werror 
-Wdeclaration-after-statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -Wall 
-Wunused -Wmissing-prototypes -Wmissing-declarations  -Wno-unused 
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include 
-I/home/tma/gnucash/gnucash_cvs/cutecash/build-cutecash/src 
-I/home/tma/gnucash/gnucash_cvs/cutecash/src 
-I/home/tma/gnucash/gnucash_cvs/cutecash/src/libqof/qof 
-I/home/tma/gnucash/gnucash_cvs/cutecash/src/gnc-module 
-I/home/tma/gnucash/gnucash_cvs/cutecash/src/core-utils 
-I/home/tma/gnucash/gnucash_cvs/cutecash/src/engine 
-I/home/tma/gnucash/gnucash_cvs/cutecash/build-cutecash/src/engine   -o 
CMakeFiles/engine.dir/engine-helpers.c.o   -c 
/home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c
/home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c: In function 
‘gnc_query2scm’:
/home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c:1712: error: 
‘scm_block_gc’ undeclared (first use in this function)
...

There is no -DHAVE_GUILE18 in the gcc command line. Is it possible that
ADD_DEFINITIONS (foobar) is not propagated to subdirs?

 Herbert.
-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Required Cutecash dependencies

2010-03-06 Thread Herbert Thoma
Christian Stimming schrieb:
 Am Samstag, 6. März 2010 schrieb Herbert Thoma:
 Do you know how to check for the guile version and how to set the
  HAVE_GUILE18 if required in cmake?
 Does not seem to work :-(

 The check works. I added
 MESSAGE (Found Guile ${GUILE_VERSION_MAJOR}.${GUILE_VERSION_MINOR})
 to CMakeLists.txt and it reports 1.8.

 However, when I do make VERBOSE=1 I get: (...)

 There is no -DHAVE_GUILE18 in the gcc command line. Is it possible that
 ADD_DEFINITIONS (foobar) is not propagated to subdirs?
 
 According to the documentation of ADD_DEFINITIONS (run cmake --help-command 
 add_definitions), this command should specifically add this to the current 
 directory *and below*. ALso, for HAVE_CONFIG_H in src/CMakeLists.txt this 
 seems to work fine. It is weird if make VERBOSE=1 confirms it didn't arrive 
 in the command line.

Yes, if I add ADD_DEFINITIONS (-DHAVE_GUILE18) outside of the test everything
compiles just fine.

The if clause
  IF (Guile_FIND_VERSION_MAJOR AND ${GUILE_VERSION_MAJOR} EQUAL 1
  AND Guile_FIND_VERSION_MINOR AND ${GUILE_VERSION_MINOR} GREATER 7)
does not work. Removing Guile_FIND_VERSION_MAJOR and Guile_FIND_VERSION_MINOR
from the test fixes it for me. See attached patch.
I am not familiar with cmake at all, this is pure trial and error. So I don't
know if this has any undesired side effects.

 Herbert.

 However, you can experiment with copying the IF(...) clause from the 
 top-level 
 CMakeLists.txt to the src/engine/CMakeLists.txt and see whether this fixes it.
 
 Regards,
 
 Christian
 

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/


cutecash.patch.gz
Description: GNU Zip compressed data
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Announcing a new sub-project in gnucash: GUI in C++, Qt, CMake.

2010-03-05 Thread Herbert Thoma
Hi Christian,

cool project! I tried to build cutecash and ran into some problems:

I run SuSE 11.0 on this computer. SuSE 11.0 is not so old, however, it
lacks your required minimum versions of glib and Qt.
You require glib (and gobject, gmodule, gthread) 2.20.0 but GnuCash
only requires 2.12.0.
You require Qt 4.5.0 but I have only 4.4.0.
I changed the minimum requirements in CMakeLists.txt to glib 2.12.0
and Qt 4.4.0 and cmake completed successfully.

Compiling fails with the following error:
[ 62%] Building C object src/engine/CMakeFiles/engine.dir/engine-helpers.c.o
/home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c: In function 
‘gnc_query2scm’:
/home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c:1712: error: 
‘scm_block_gc’ undeclared (first use in this function)
/home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c:1712: error: 
(Each undeclared identifier is reported only once
/home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c:1712: error: 
for each function it appears in.)
/home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c: In function 
‘gnc_scm2query_v2’:
/home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c:2013: error: 
‘scm_block_gc’ undeclared (first use in this function)
make[2]: *** [src/engine/CMakeFiles/engine.dir/engine-helpers.c.o] Fehler 1
make[1]: *** [src/engine/CMakeFiles/engine.dir/all] Fehler 2
make: *** [all] Fehler 2

The problem are some section like this:
#ifndef HAVE_GUILE18
--scm_block_gc;
#endif
in src/engine/engine-helpers.c

Do you know how to check for the guile version and how to set the HAVE_GUILE18 
if required
in cmake?

Keep up this interesting work!

 Herbert.

Christian Stimming schrieb:
 I'd like to explain my recent experiments with C++ and cmake: I was tired of 
 the amount of code one has to write in the C language to achieve seemingly 
 trivial tasks. In my day-time projects with other, more GUI-suited, 
 programming languages, the simple tasks can be written sooo much simpler, 
 leaving much more time for the actual challenging tasks. In gnucash, over and 
 over again I thought couldn't the GUI be written in any of the more modern 
 languages and/or toolkits. I mean, can we get the fun into gnucash coding 
 again?
 
 Actually, we can.
 
 Announcing a new sub-project in gnucash: The non-GUI parts are re-used in the 
 state they are, in the C language. This means the double-entry principles and 
 all of the other achievments in the engine and xml-backend and eventually 
 other backends can be re-used. But the GUI is rewritten completely new, from 
 scratch, in C++ and using the Qt toolkit. Fun again. The build system is 
 CMake 
 because its configuration runs magnitudes faster. Fun again. And as a final 
 bonus, for MS windows more compiler than before are supported, namely this 
 whole new project can be compiled by MS Visual Studio as well. So here it is:
 
   Cutecash
   Free Finance Software. Easy to develop, easy to use.
 
 Currently this is only a proof-of-concept for developers: You can load an 
 existing gnucash XML file, and it will show the list of accounts as a flat 
 table in a QTableView. The fun part is how easy it was to add this display of 
 all accounts, so it will probably take only another 1-2 hours until the 
 account list is a tree to be viewed in a QTreeView. And a QTableView with the 
 splits of an account can't be far...
 
 To give this a try, have qt4 (=4.5.0) and cmake (= 2.6.0) installed and:
 
   mkdir build-cutecash
   cd build-cutecash
   cmake ..
   make
   ./src/gnc/cutecash
 
 Have fun (again)!
 
 Christian
 ___
 gnucash-devel mailing list
 gnucash-devel@gnucash.org
 https://lists.gnucash.org/mailman/listinfo/gnucash-devel
 

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Announcing a new sub-project in gnucash: GUI in C++, Qt, CMake.

2010-03-05 Thread Herbert Thoma
Some more experiments:

Qt 4.4.0 is not sufficient because it does not provide QSharedPointer,
so I installed Qt 4.6.2 and I inserted a #define HAVE_GUILE18 in
src/engine/engine-helpers.c. This way everything compiles but the very
final main.cpp.

I do not really understand the error:

[ 99%] Building CXX object src/gnc/CMakeFiles/cutecash.dir/main.cpp.o
In file included from /usr/include/c++/4.3/iosfwd:46,
 from /usr/include/gmp.h:24,
 from /usr/include/libguile.h:24,
 from 
/home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp:31:
/usr/include/c++/4.3/bits/stringfwd.h:48: error: template with C linkage
/usr/include/c++/4.3/bits/stringfwd.h:51: error: template with C linkage
/usr/include/c++/4.3/bits/stringfwd.h:54: error: template with C linkage
/usr/include/c++/4.3/bits/stringfwd.h:58: error: template specialization with C 
linkage
/usr/include/c++/4.3/bits/stringfwd.h:63: error: template specialization with C 
linkage
In file included from /usr/include/c++/4.3/iosfwd:47,
 from /usr/include/gmp.h:24,
 from /usr/include/libguile.h:24,
 from 
/home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp:31:
/usr/include/c++/4.3/bits/postypes.h:90: error: template with C linkage
/usr/include/c++/4.3/bits/postypes.h:193: error: template with C linkage
/usr/include/c++/4.3/bits/postypes.h:198: error: template with C linkage
In file included from /usr/include/gmp.h:24,
 from /usr/include/libguile.h:24,
 from 
/home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp:31:
/usr/include/c++/4.3/iosfwd:51: error: template with C linkage
/usr/include/c++/4.3/iosfwd:54: error: template with C linkage
/usr/include/c++/4.3/iosfwd:57: error: template with C linkage
/usr/include/c++/4.3/iosfwd:60: error: template with C linkage
/usr/include/c++/4.3/iosfwd:63: error: template with C linkage
/usr/include/c++/4.3/iosfwd:66: error: template with C linkage
/usr/include/c++/4.3/iosfwd:70: error: template with C linkage
/usr/include/c++/4.3/iosfwd:74: error: template with C linkage
/usr/include/c++/4.3/iosfwd:78: error: template with C linkage
/usr/include/c++/4.3/iosfwd:82: error: template with C linkage
/usr/include/c++/4.3/iosfwd:85: error: template with C linkage
/usr/include/c++/4.3/iosfwd:88: error: template with C linkage
/usr/include/c++/4.3/iosfwd:91: error: template with C linkage
/usr/include/c++/4.3/iosfwd:94: error: template with C linkage
/usr/include/c++/4.3/iosfwd:97: error: template with C linkage
In file included from /usr/include/libguile.h:24,
 from 
/home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp:31:
/usr/include/gmp.h:2136: error: declaration of C function ‘std::ostream 
operator(std::ostream, const __mpq_struct*)’ conflicts with
/usr/include/gmp.h:2135: error: previous declaration ‘std::ostream 
operator(std::ostream, const __mpz_struct*)’ here
/usr/include/gmp.h:2137: error: declaration of C function ‘std::ostream 
operator(std::ostream, const __mpf_struct*)’ conflicts with
/usr/include/gmp.h:2136: error: previous declaration ‘std::ostream 
operator(std::ostream, const __mpq_struct*)’ here
/usr/include/gmp.h:2139: error: declaration of C function ‘std::istream 
operator(std::istream, __mpq_struct*)’ conflicts with
/usr/include/gmp.h:2138: error: previous declaration ‘std::istream 
operator(std::istream, __mpz_struct*)’ here
/usr/include/gmp.h:2140: error: declaration of C function ‘std::istream 
operator(std::istream, __mpf_struct*)’ conflicts with
/usr/include/gmp.h:2139: error: previous declaration ‘std::istream 
operator(std::istream, __mpq_struct*)’ here
make[2]: *** [src/gnc/CMakeFiles/cutecash.dir/main.cpp.o] Fehler 1
make[1]: *** [src/gnc/CMakeFiles/cutecash.dir/all] Fehler 2
make: *** [all] Fehler 2

 Herbert.

Herbert Thoma schrieb:
 Hi Christian,
 
 cool project! I tried to build cutecash and ran into some problems:
 
 I run SuSE 11.0 on this computer. SuSE 11.0 is not so old, however, it
 lacks your required minimum versions of glib and Qt.
 You require glib (and gobject, gmodule, gthread) 2.20.0 but GnuCash
 only requires 2.12.0.
 You require Qt 4.5.0 but I have only 4.4.0.
 I changed the minimum requirements in CMakeLists.txt to glib 2.12.0
 and Qt 4.4.0 and cmake completed successfully.
 
 Compiling fails with the following error:
 [ 62%] Building C object src/engine/CMakeFiles/engine.dir/engine-helpers.c.o
 /home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c: In 
 function ‘gnc_query2scm’:
 /home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c:1712: 
 error: ‘scm_block_gc’ undeclared (first use in this function)
 /home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c:1712: 
 error: (Each undeclared identifier is reported only once
 /home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c:1712: 
 error: for each function it appears in.)
 /home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine

Re: Announcing a new sub-project in gnucash: GUI in C++, Qt, CMake.

2010-03-05 Thread Herbert Thoma
I appologize for continually replying to my own mails
but I finally made it.

The extern C block in main.cpp should not include system includes.

A patch with my changes to make it work is attached.

 Herbert.

Herbert Thoma schrieb:
 Some more experiments:
 
 Qt 4.4.0 is not sufficient because it does not provide QSharedPointer,
 so I installed Qt 4.6.2 and I inserted a #define HAVE_GUILE18 in
 src/engine/engine-helpers.c. This way everything compiles but the very
 final main.cpp.
 
 I do not really understand the error:
 
 [ 99%] Building CXX object src/gnc/CMakeFiles/cutecash.dir/main.cpp.o
 In file included from /usr/include/c++/4.3/iosfwd:46,
  from /usr/include/gmp.h:24,
  from /usr/include/libguile.h:24,
  from 
 /home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp:31:
 /usr/include/c++/4.3/bits/stringfwd.h:48: error: template with C linkage
 /usr/include/c++/4.3/bits/stringfwd.h:51: error: template with C linkage
 /usr/include/c++/4.3/bits/stringfwd.h:54: error: template with C linkage
 /usr/include/c++/4.3/bits/stringfwd.h:58: error: template specialization with 
 C linkage
 /usr/include/c++/4.3/bits/stringfwd.h:63: error: template specialization with 
 C linkage
 In file included from /usr/include/c++/4.3/iosfwd:47,
  from /usr/include/gmp.h:24,
  from /usr/include/libguile.h:24,
  from 
 /home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp:31:
 /usr/include/c++/4.3/bits/postypes.h:90: error: template with C linkage
 /usr/include/c++/4.3/bits/postypes.h:193: error: template with C linkage
 /usr/include/c++/4.3/bits/postypes.h:198: error: template with C linkage
 In file included from /usr/include/gmp.h:24,
  from /usr/include/libguile.h:24,
  from 
 /home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp:31:
 /usr/include/c++/4.3/iosfwd:51: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:54: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:57: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:60: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:63: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:66: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:70: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:74: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:78: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:82: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:85: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:88: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:91: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:94: error: template with C linkage
 /usr/include/c++/4.3/iosfwd:97: error: template with C linkage
 In file included from /usr/include/libguile.h:24,
  from 
 /home/tma/gnucash/gnucash_cvs/cutecash/src/gnc/main.cpp:31:
 /usr/include/gmp.h:2136: error: declaration of C function ‘std::ostream 
 operator(std::ostream, const __mpq_struct*)’ conflicts with
 /usr/include/gmp.h:2135: error: previous declaration ‘std::ostream 
 operator(std::ostream, const __mpz_struct*)’ here
 /usr/include/gmp.h:2137: error: declaration of C function ‘std::ostream 
 operator(std::ostream, const __mpf_struct*)’ conflicts with
 /usr/include/gmp.h:2136: error: previous declaration ‘std::ostream 
 operator(std::ostream, const __mpq_struct*)’ here
 /usr/include/gmp.h:2139: error: declaration of C function ‘std::istream 
 operator(std::istream, __mpq_struct*)’ conflicts with
 /usr/include/gmp.h:2138: error: previous declaration ‘std::istream 
 operator(std::istream, __mpz_struct*)’ here
 /usr/include/gmp.h:2140: error: declaration of C function ‘std::istream 
 operator(std::istream, __mpf_struct*)’ conflicts with
 /usr/include/gmp.h:2139: error: previous declaration ‘std::istream 
 operator(std::istream, __mpq_struct*)’ here
 make[2]: *** [src/gnc/CMakeFiles/cutecash.dir/main.cpp.o] Fehler 1
 make[1]: *** [src/gnc/CMakeFiles/cutecash.dir/all] Fehler 2
 make: *** [all] Fehler 2
 
  Herbert.
 
 Herbert Thoma schrieb:
 Hi Christian,

 cool project! I tried to build cutecash and ran into some problems:

 I run SuSE 11.0 on this computer. SuSE 11.0 is not so old, however, it
 lacks your required minimum versions of glib and Qt.
 You require glib (and gobject, gmodule, gthread) 2.20.0 but GnuCash
 only requires 2.12.0.
 You require Qt 4.5.0 but I have only 4.4.0.
 I changed the minimum requirements in CMakeLists.txt to glib 2.12.0
 and Qt 4.4.0 and cmake completed successfully.

 Compiling fails with the following error:
 [ 62%] Building C object src/engine/CMakeFiles/engine.dir/engine-helpers.c.o
 /home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c: In 
 function ‘gnc_query2scm’:
 /home/tma/gnucash/gnucash_cvs/cutecash/src/engine/engine-helpers.c:1712: 
 error: ‘scm_block_gc’ undeclared (first use in this function

Re: complie error latest trunk - patch attached

2009-11-19 Thread Herbert Thoma
J. Alex Aycinena schrieb:
 I get the following error when compiling r18419:

 ...
 cc1: warnings being treated as errors
 dialog-tax-info.c: In function ‘identity_edit_clicked_cb’:
 dialog-tax-info.c:1083: error: implicit declaration of function 
 ‘gtk_dialog_get_content_area’
 dialog-tax-info.c:1083: error: assignment makes pointer from integer 
 without a cast
 make[4]: *** [dialog-tax-info.lo] Fehler 1
 make[4]: Leaving directory 
 `/home/tma/gnucash/gnucash_cvs/gnucash_work/src/gnome
 ...

 OS: openSUSE 11.0 (X86-64)
 GTK: 2.12.9
 I did a `grep gtk_dialog_get_content_area` in /usr/include/gtk-2.0/gtk
 and did not find gtk_dialog_get_content_area.

 So I guess the simple answer is: upgrade to a newer gtk, but I would like
 to avoid this, openSUSE 11.0 is not _that_ old after all ...
...
 ‘gtk_dialog_get_content_area’ is from GTK version 2.14. The attached
 patch uses the prior '(GTK_DIALOG(dialog)-vbox)' in place of
 'gtk_dialog_get_content_area (GTK_DIALOG (dialog))' and compiled
 successfully on my GTK version 2.16 and the application operated
 properly. I would be grateful if someone would apply it to trunk for
 me.

I applied your patch to my local copy and it fixed my problem.
So it should be applied to SVN trunk.

Thanks a lot!

 Herbert.

 Regards,
 
 Alex

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: complie error latest trunk

2009-11-18 Thread Herbert Thoma
Herbert Thoma schrieb:
 Hi!
 
 I get the following error when compiling r18419:
 
 ...
 cc1: warnings being treated as errors
 dialog-tax-info.c: In function ‘identity_edit_clicked_cb’:
 dialog-tax-info.c:1083: error: implicit declaration of function 
 ‘gtk_dialog_get_content_area’
 dialog-tax-info.c:1083: error: assignment makes pointer from integer without 
 a cast
 make[4]: *** [dialog-tax-info.lo] Fehler 1
 make[4]: Leaving directory 
 `/home/tma/gnucash/gnucash_cvs/gnucash_work/src/gnome
 ...
 
 OS: openSUSE 11.0 (X86-64)
 GTK: 2.12.9

I did a `grep gtk_dialog_get_content_area` in /usr/include/gtk-2.0/gtk
and did not find gtk_dialog_get_content_area.

So I guess the simple answer is: upgrade to a newer gtk, but I would like
to avoid this, openSUSE 11.0 is not _that_ old after all ...

 Herbert.
-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


complie error latest trunk

2009-11-17 Thread Herbert Thoma
Hi!

I get the following error when compiling r18419:

...
cc1: warnings being treated as errors
dialog-tax-info.c: In function ‘identity_edit_clicked_cb’:
dialog-tax-info.c:1083: error: implicit declaration of function 
‘gtk_dialog_get_content_area’
dialog-tax-info.c:1083: error: assignment makes pointer from integer without a 
cast
make[4]: *** [dialog-tax-info.lo] Fehler 1
make[4]: Leaving directory `/home/tma/gnucash/gnucash_cvs/gnucash_work/src/gnome
...

OS: openSUSE 11.0 (X86-64)
GTK: 2.12.9

 Herbert.
-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Some thoughts and questions about iso-4217-currencies.*

2009-10-27 Thread Herbert Thoma
Christian Stimming schrieb:
 - There was a Euro converter in 1.x, which until now was not ported. But,
 what is the meaning of src/app-utils/gnc-euro.c? Is it in use? If yes,
 where? If I understood it right, currencies used there, must still be
 defined in iso-4217-currencies?
 Well I was responsible for this code (gnc-euro.c, not the Euro converter,
 which was done by Christian Stimming). gnc-euro.c does the correct Euro
 conversion with proper rounding as defined by the European Central Bank. I
 was most useful in the time between 1999 and 2001 when you could have
 accounts in EUR and e.g DEM. In the account windows the status line will
 show you the value of a DEM account in EUR and in the account tree window
 you could have a column with the EUR value of your DEM accounts. This
 functionality still works and tracks my stash of retained DEM coins quite
 nicely.
 
 Errr... in other words, today in 2009 the gnc-euro.c code is virtually 
 useless. Basically the app-util/gnc-euro.c is a second price data base which 
 happens to contain only the officially fixed rates for the euro.

You can view it this way. I don't think that it is totally useless,
because I still have all my pre-2001 DEM transactions in my .xac file
(yes, gnucash was called X-accountant back then ;-)) and the Euro rates
are not in the normal price-db by default.

I agree that app-util/gnc-euro.c is a second price-db and that this is
not a nice design.

 IIRC it was 
 introduced at a time when the real price data base didn't yet work well 
 enough. Now that the normal price data base works fine, it can and probably 
 should be removed rather soon. Or did I miss something here?

What I would like to see then in the normal price-db would be like this:
- the official exchange rates should be present by default
- there should be a way to specify that a currency was superseeded by
  another

This way we could handle non EURO cases, too. E.g. Turkish Lira was
replaced by New Turkish Lira with some fixed rate.

I might find time to look into this during the Christmas break, but I
can't promise anything now.

 Herbert.

 Regards,
 
 Christian
 

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Some thoughts and questions about iso-4217-currencies.*

2009-10-20 Thread Herbert Thoma
Frank H. Ellenberger schrieb:
 b) Until now I added a comment to the replaced currency, but I think at 
 least, 
 I could add a flag expired or still_in_use, what fits better from the logic?

I think we once said (may be in another context) that the default value
of a boolean option should be FALSE, so I would argue for expired on the
basis that most currencies in the list will be still in use.

 - There was a Euro converter in 1.x, which until now was not ported. But, 
 what 
 is the meaning of src/app-utils/gnc-euro.c? Is it in use? If yes, where?
 If I understood it right, currencies used there, must still be defined in 
 iso-4217-currencies?

Well I was responsible for this code (gnc-euro.c, not the Euro converter, which
was done by Christian Stimming). gnc-euro.c does the correct Euro conversion
with proper rounding as defined by the European Central Bank. I was most useful
in the time between 1999 and 2001 when you could have accounts in EUR and
e.g DEM. In the account windows the status line will show you the value of a
DEM account in EUR and in the account tree window you could have a column
with the EUR value of your DEM accounts. This functionality still works and
tracks my stash of retained DEM coins quite nicely.

 Herbert.
-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Webkit dependencies

2009-10-12 Thread Herbert Thoma
Phil Longstaff schrieb:
 Gnucash on win32 currently uses webkit 1.1.5 from April which I pulled down 
 from the net.  I've been working lately on trying to use a more recent 
 version 
 (the webkitgtk team is trying to stabilize, and are at 1.1.15.2).  
 Unfortunately, webkit now depends on libsoup and enchant, and on win32, 
 libsoup includes windows .h files which define GUID, so there's a definition 
 clash.  I've hacked around that, for now, but I'm not sure what the best 
 solution will be.

Well, I guess the long term save way is to replace our GUID by GNCGUID (or 
QOFGUID).

 Herbert.

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

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Compile error

2009-09-07 Thread Herbert Thoma
Hi!

gcc -DHAVE_CONFIG_H -I. -I../.. -DG_LOG_DOMAIN=\gnc.app-utils\ 
-I../../lib/libc -I../../src -I../../src -I../../src/gnc-module 
-I../../src/calculation -I../../src/core-utils -I../../src/engine 
-I../../src/libqof/qof -pthread -pthread -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include -DORBIT2=1 -pthread -I/usr/include/gconf/2 
-I/usr/include/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include 
-I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 
-Werror -Wdeclaration-after-statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2 -g 
-O2 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -MT 
gnc-ui-util.lo -MD -MP -MF .deps/gnc-ui-util.Tpo -c gnc-ui-util.c  -fPIC -DPIC 
-o .libs/gnc-ui-util.o
cc1: warnings being treated as errors
gnc-ui-util.c: In function ‘gnc_account_get_full_name’:
gnc-ui-util.c:760: error: array subscript is above array bounds

The following patch fixes this problem:

Index: src/app-utils/gnc-ui-util.c
===
--- src/app-utils/gnc-ui-util.c (Revision 18298)
+++ src/app-utils/gnc-ui-util.c (Arbeitskopie)
@@ -756,8 +756,8 @@
   if (!account) return NULL;

   name = xaccAccountGetFullName (account);
-  strncpy( result, name, sizeof(result)-1 );
-  result[sizeof(result)] = '\0';
+  strncpy( result, name, sizeof(result)-2 );
+  result[sizeof(result)-1] = '\0';

   return result;
 }

 Herbert
-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


LWN: Coming soon: KMyMoney 1.0

2009-08-20 Thread Herbert Thoma
Interesting article:

http://lwn.net/SubscriberLink/347546/26b21f3f97183f17/

 Herbert.
-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: r18254 - gnucash/trunk/src/backend/sql - Fix CRIT messages when loading budgets

2009-08-17 Thread Herbert Thoma
Hi Phil,

I don't know if it is caused by this change, but I get a
compiler error:

gnc-budget-sql.c: In function ‘set_period_num’:
gnc-budget-sql.c:156: error: cast from pointer to integer of different size

The offending line is:

info-period_num = (guint)val;

Perhaps you meant something like this:

info-period_num = *((guint *)val);

 Herbert.

Phil Longstaff schrieb:
 Author: plongstaff
 Date: 2009-08-16 13:09:28 -0400 (Sun, 16 Aug 2009)
 New Revision: 18254
 Trac: http://svn.gnucash.org/trac/changeset/18254
 
 Modified:
gnucash/trunk/src/backend/sql/gnc-budget-sql.c
 Log:
 Fix CRIT messages when loading budgets
 
 
 ___
 gnucash-patches mailing list
 gnucash-patc...@gnucash.org
 https://lists.gnucash.org/mailman/listinfo/gnucash-patches
 

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: r18254 - gnucash/trunk/src/backend/sql - Fix CRIT messages when loading budgets

2009-08-17 Thread Herbert Thoma
Phil Longstaff schrieb:
 No, it should be info-period_num = GPOINTER_TO_UINT(val).  It is passed
 by value, not reference.

OK, that fixed the compiler error.

I guess you will commit the fix to svn.

Thanks,
 Herbert.

 Phil
 
 
 *From:* Herbert Thoma herbert.th...@iis.fraunhofer.de
 *To:* gnucash-devel@gnucash.org; Phil Longstaff plongst...@rogers.com
 *Sent:* Monday, August 17, 2009 10:49:11 AM
 *Subject:* Re: r18254 - gnucash/trunk/src/backend/sql - Fix CRIT
 messages when loading budgets
 
 Hi Phil,
 
 I don't know if it is caused by this change, but I get a
 compiler error:
 
 gnc-budget-sql.c: In function ‘set_period_num’:
 gnc-budget-sql.c:156: error: cast from pointer to integer of different size
 
 The offending line is:
 
 info-period_num = (guint)val;
 
 Perhaps you meant something like this:
 
 info-period_num = *((guint *)val);
 
 Herbert.
 
 Phil Longstaff schrieb:
 Author: plongstaff
 Date: 2009-08-16 13:09:28 -0400 (Sun, 16 Aug 2009)
 New Revision: 18254
 Trac: http://svn.gnucash.org/trac/changeset/18254

 Modified:
gnucash/trunk/src/backend/sql/gnc-budget-sql.c
 Log:
 Fix CRIT messages when loading budgets


 ___
 gnucash-patches mailing list
 gnucash-patc...@gnucash.org mailto:gnucash-patc...@gnucash.org
 https://lists.gnucash.org/mailman/listinfo/gnucash-patches

 
 -- 
 Herbert Thoma
 Dipl.-Ing., MBA
 Head of Video Group
 Multimedia Realtime Systems Department
 Fraunhofer IIS
 Am Wolfsmantel 33, 91058 Erlangen, Germany
 Phone: +49-9131-776-6130
 Fax:  +49-9131-776-6099
 email: t...@iis.fhg.de mailto:t...@iis.fhg.de
 www: http://www.iis.fhg.de/

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: r18254 - gnucash/trunk/src/backend/sql - Fix CRIT messages when loading budgets

2009-08-17 Thread Herbert Thoma
One more (may be stupid) question:

Herbert Thoma schrieb:
 Phil Longstaff schrieb:
 No, it should be info-period_num = GPOINTER_TO_UINT(val).  It is passed
 by value, not reference.

Why is val a gpointer then? Why can't the type just be uint?

static void
set_period_num( gpointer pObj, gpointer val )
{
budget_amount_info_t* info = (budget_amount_info_t*)pObj;

g_return_if_fail( pObj != NULL );

info-period_num = GPOINTER_TO_UINT(val);
}

 OK, that fixed the compiler error.
 
 I guess you will commit the fix to svn.
 
 Thanks,
  Herbert.
 
 Phil

 
 *From:* Herbert Thoma herbert.th...@iis.fraunhofer.de
 *To:* gnucash-devel@gnucash.org; Phil Longstaff plongst...@rogers.com
 *Sent:* Monday, August 17, 2009 10:49:11 AM
 *Subject:* Re: r18254 - gnucash/trunk/src/backend/sql - Fix CRIT
 messages when loading budgets

 Hi Phil,

 I don't know if it is caused by this change, but I get a
 compiler error:

 gnc-budget-sql.c: In function ‘set_period_num’:
 gnc-budget-sql.c:156: error: cast from pointer to integer of different size

 The offending line is:

 info-period_num = (guint)val;

 Perhaps you meant something like this:

 info-period_num = *((guint *)val);

 Herbert.

 Phil Longstaff schrieb:
 Author: plongstaff
 Date: 2009-08-16 13:09:28 -0400 (Sun, 16 Aug 2009)
 New Revision: 18254
 Trac: http://svn.gnucash.org/trac/changeset/18254

 Modified:
gnucash/trunk/src/backend/sql/gnc-budget-sql.c
 Log:
 Fix CRIT messages when loading budgets


 ___
 gnucash-patches mailing list
 gnucash-patc...@gnucash.org mailto:gnucash-patc...@gnucash.org
 https://lists.gnucash.org/mailman/listinfo/gnucash-patches

 -- 
 Herbert Thoma
 Dipl.-Ing., MBA
 Head of Video Group
 Multimedia Realtime Systems Department
 Fraunhofer IIS
 Am Wolfsmantel 33, 91058 Erlangen, Germany
 Phone: +49-9131-776-6130
 Fax:  +49-9131-776-6099
 email: t...@iis.fhg.de mailto:t...@iis.fhg.de
 www: http://www.iis.fhg.de/
 

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: t...@iis.fhg.de
www: http://www.iis.fhg.de/
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


  1   2   3   >