Re: r23402 - gnucash/trunk/src/scm - Turn off the scheme compiler's possibly unbound variable warnings.

2013-11-17 Thread Geert Janssens
On Saturday 16 November 2013 17:59:01 Mike Alexander wrote:
 Author: mta
 Date: 2013-11-16 17:59:00 -0500 (Sat, 16 Nov 2013)
 New Revision: 23402
 Trac: http://svn.gnucash.org/trac/changeset/23402
 
 Modified:
gnucash/trunk/src/scm/main.scm
 Log:
 Turn off the scheme compiler's possibly unbound variable warnings.
 In guile 2.0 we get nearly 7500 of them loading the scheme files.
 
 ___
 gnucash-patches mailing list
 gnucash-patc...@gnucash.org
 https://lists.gnucash.org/mailman/listinfo/gnucash-patches

Great! That's an issue that has bothered me ever since I ported gnucash to 
guile 2. 
Thanks a lot for figuring this out!

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


Re: Fwd: Error parsing compressed file but reads uncompressed ok

2013-11-17 Thread Colin Law
On 17 November 2013 04:38, Mike Alexander m...@umich.edu wrote:
 [snip]
 The patch to libxml2 to fix this is easy.  I'll submit it to the MacPorts
 maintainer for libxml2 who will presumably submit it upstream.

Is there a link for the bug?  If so I will also report a bug on Ubuntu libxml2.

 However, it
 will take a while for this to propagate to all the platforms that matter for
 GnuCash.  GnuCash is also quite capable of decompressing the file itself.  I
 suggest that we change it so that it never passes a compressed file to
 libxml2 and instead decompresses it itself.  This isn't a difficult change
 and unless you think it is a bad idea, I'll do it.

Would that be just on 2.5 or would it be backported to 2.4?

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


Re: r23397 - gnucash/trunk/src - Bug 336843: Attach images/files/urls to transactions.

2013-11-17 Thread Geert Janssens
On Saturday 16 November 2013 13:53:50 Patrick wrote:
 Geert,
 
 Can you try adding:
 
 #include basetsd.h up in the W32 includes?
 
 diff --git a/src/gnome-utils/gnc-gnome-utils.c
 b/src/gnome-utils/gnc-gnome-utils index a9ccb79..bec5a04 100644
 --- a/src/gnome-utils/gnc-gnome-utils.c
 +++ b/src/gnome-utils/gnc-gnome-utils.c
 @@ -51,6 +51,7 @@
  #include gnc-session.h
  #include qofbookslots.h
  #ifdef G_OS_WIN32
 +#include basetsd.h
  #include gnc-help-utils.h
  #endif
  #ifdef MAC_INTEGRATION
 
 I had wondered if I'd messed the W32 code up. I don't have VC++, so I
 couldn't test compile and debug.
 
 Sorry!
 
 Patrick

Hi Patrick,

Don't worry. You don't have to test your changes on all platforms. That's why 
we are a 
community. (It's nice if you *can* of course, to help lighten the burden for 
the others).

I only really looked at your code just now.

In this case, there's no need to handle file loading differently on each 
platform. The function 
gtk_show_uri should work on each platform we support (with caveats - more on 
that later).

So for now I have removed all but the last implementation.

Caveat: you have chosen to allow the user to link to non-local files (using 
gtk_file_chooser_set_local_only). And you save a full uri. This doesn't work by 
default on 
Windows, because the URI is improperly parsed. For example:
file:///c:/somefile.pdf
gtk_show_uri will first strip the file:// protocol. What is left 
(/c:/somefile.pdf) still contains a :/. 
gtk_show_uri erroneously thinks this is still a protocol specifier and bails 
out.
Since I want to get the 2.5.8 release out of the door as soon as possible, I'm 
thinking of leaving 
it like that for now and deal with the issue in a couple of days.

The improper parsing may be because GnuCash doesn't ship gio-gvfs on Windows, 
which is 
needed to parse uris. We will have to see if this can be added in the Windows 
build and if it 
does fix the problem.

As a workaround, I am now amending your changes in gnc-split-reg.c to use 
local-only 
filenames on Windows.

The test is building now (usually takes the better part of an hour).

Geert

 
 On Sat, Nov 16, 2013 at 1:16 PM, Geert Janssens
 
 janssens-ge...@telenet.be wrote:
  On Friday 15 November 2013 17:02:43 John Ralls wrote:
  Author: jralls
  Date: 2013-11-15 17:02:34 -0500 (Fri, 15 Nov 2013)
  New Revision: 23397
  Trac: http://svn.gnucash.org/trac/changeset/23397
  
  Modified:
 gnucash/trunk/src/engine/Transaction.c
 gnucash/trunk/src/engine/Transaction.h
 gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
 gnucash/trunk/src/gnome-utils/gnc-gnome-utils.h
 gnucash/trunk/src/gnome-utils/gnc-tree-view.c
 gnucash/trunk/src/gnome/gnc-plugin-page-register.c
 gnucash/trunk/src/gnome/gnc-split-reg.c
 gnucash/trunk/src/gnome/gnc-split-reg.h
 gnucash/trunk/src/gnome/ui/gnc-plugin-page-register-ui.xml
  
  Log:
  Bug 336843: Attach images/files/urls to transactions.
  
  Author: Patrick patr...@setsuid.net
  
  ___
  gnucash-patches mailing list
  gnucash-patc...@gnucash.org
  https://lists.gnucash.org/mailman/listinfo/gnucash-patches
  
  This patch causes the Windows build to fail with error:
  c:/GCDevel/GC-Native/gnucash-git-janssege/src/gnome-utils/gnc-gnome-
  utils.c: In function 'gnc_launch_assoc':
  c:/GCDevel/GC-Native/gnucash-git-janssege/src/gnome-utils/gnc-gnome-
  utils.c:436:14: error: 'INT_PTR' undeclared (first use in this
  function)
  c:/GCDevel/GC-Native/gnucash-git-janssege/src/gnome-utils/gnc-gnome-
  utils.c:436:14: note: each undeclared identifier is reported only
  once for each function it appears in
  c:/GCDevel/GC-Native/gnucash-git-janssege/src/gnome-utils/gnc-gnome
  -utils.c:436:22: error: expected ')' before 'ShellExecuteW'
  
  Geert
  ___
  gnucash-devel mailing list
  gnucash-devel@gnucash.org
  https://lists.gnucash.org/mailman/listinfo/gnucash-devel

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


Re: Error parsing compressed file but reads uncompressed ok

2013-11-17 Thread John Ralls

On Nov 16, 2013, at 8:38 PM, Mike Alexander m...@umich.edu wrote:

 --On 5 November 2013 14:57, John Ralls jra...@ceridwen.us wrote:
 
 On Nov 5, 2013, at 6:46 AM, Colin Law clan...@googlemail.com wrote:
 
 On 5 November 2013 12:39, Colin Law clan...@googlemail.com wrote:
 I find today that I cannot open my compressed xml accounts file, I
 get a parse error opening the file.  I am using version 2.4.13 (on
 Ubuntu 13.10).  If I uncompress the file with gunzip it will open
 ok, but if I I save it compressed again then again it will not
 reopen. I can read the same compressed file ok with version 2.4.10
 (on Ubuntu 12.04), and if I save it with version 2.4.10 then I can
 re-open it with version 2.4.13.
 
 In fact I see that even if I make a new trivial file and save it
 compressed then I cannot re-open it.  Either something has got
 messed up in my system or an update has introduced a bug.
 
 There haven't been any updates to Gnucash-2.4.13. The fact that you
 can
 fix the problem by unzipping by hand suggests that there's a problem
 either with libz on Ubuntu 13-10 or with GC's linkage to it.
 
 In fact I see I was wrong about it failing with a trivial file.  I
 have gone back through the backups and find that I can still open the
 file from earlier today but cannot open ones after a certain point, so
 it does seem to be related to this particular file.  I have tried on
 another Ubuntu system running ubuntu Trusty daily build and see the
 same problem, so it is not related to user settings.
 
 I had a vague recollection of a similar problem reported on the forum
 a few weeks ago, but can't find it now.
 
 I guess you must be right, for some reason gnucash is unable to
 correctly unzip this particular file.  Any suggestions on how to
 progress this further?  I could send the file privately to someone if
 they wanted to have a look at it.
 
 This happened to me a few days ago so I was able to look into the cause.  As 
 you suspected, it's not a bug in GnuCash.  Instead it's a bug in libxml2.  It 
 is able to decompress zipped XML files itself so GnuCash just gives it the 
 compressed file and let's it do it's thing. Rather than just calling gzread 
 to do this, libxml2 contains slightly modified code copied from libz and it's 
 this code that contains the bug.
 
 After the compressed data in a zipped file there is a trailer which contains 
 in the first two words a CRC checksum and byte length for the uncompressed 
 data.  The code in libxml2 reads the compressed file in 1024 byte chunks and 
 if that trailer overlaps two chunks then the part in the second chunk isn't 
 read.  Instead it reads the first part and then declares a premature EOF.  
 I'll be that if you look at the file that failed it will be slightly longer 
 than a multiple of 1024.
 
 The patch to libxml2 to fix this is easy.  I'll submit it to the MacPorts 
 maintainer for libxml2 who will presumably submit it upstream. However, it 
 will take a while for this to propagate to all the platforms that matter for 
 GnuCash.  GnuCash is also quite capable of decompressing the file itself.  I 
 suggest that we change it so that it never passes a compressed file to 
 libxml2 and instead decompresses it itself.  This isn't a difficult change 
 and unless you think it is a bad idea, I'll do it.

Good job, but file the bug directly to libxml2:
https://bugzilla.gnome.org/enter_bug.cgi?product=libxml2

Why wait for a distro maintainer to push it upstream, especially if you have a 
patch?

That aside, I agree that it would be better for us to do the unzipping, so by 
all means make that change and backport it to 2.4.

Regards,
John Ralls



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


Re: r23397 - gnucash/trunk/src - Bug 336843: Attach images/files/urls to transactions.

2013-11-17 Thread John Ralls

On Nov 17, 2013, at 7:53 AM, Geert Janssens janssens-ge...@telenet.be wrote:

 On Saturday 16 November 2013 13:53:50 Patrick wrote:
 Geert,
 
 Can you try adding:
 
 #include basetsd.h up in the W32 includes?
 
 diff --git a/src/gnome-utils/gnc-gnome-utils.c
 b/src/gnome-utils/gnc-gnome-utils index a9ccb79..bec5a04 100644
 --- a/src/gnome-utils/gnc-gnome-utils.c
 +++ b/src/gnome-utils/gnc-gnome-utils.c
 @@ -51,6 +51,7 @@
 #include gnc-session.h
 #include qofbookslots.h
 #ifdef G_OS_WIN32
 +#include basetsd.h
 #include gnc-help-utils.h
 #endif
 #ifdef MAC_INTEGRATION
 
 I had wondered if I'd messed the W32 code up. I don't have VC++, so I
 couldn't test compile and debug.
 
 Sorry!
 
 Patrick
 
 Hi Patrick,
 
 Don't worry. You don't have to test your changes on all platforms. That's why 
 we are a 
 community. (It's nice if you *can* of course, to help lighten the burden for 
 the others).
 
 I only really looked at your code just now.
 
 In this case, there's no need to handle file loading differently on each 
 platform. The function 
 gtk_show_uri should work on each platform we support (with caveats - more on 
 that later).
 
 So for now I have removed all but the last implementation.
 
 Caveat: you have chosen to allow the user to link to non-local files (using 
 gtk_file_chooser_set_local_only). And you save a full uri. This doesn't work 
 by default on 
 Windows, because the URI is improperly parsed. For example:
 file:///c:/somefile.pdf
 gtk_show_uri will first strip the file:// protocol. What is left 
 (/c:/somefile.pdf) still contains a :/. 
 gtk_show_uri erroneously thinks this is still a protocol specifier and bails 
 out.
 Since I want to get the 2.5.8 release out of the door as soon as possible, 
 I'm thinking of leaving 
 it like that for now and deal with the issue in a couple of days.
 
 The improper parsing may be because GnuCash doesn't ship gio-gvfs on Windows, 
 which is 
 needed to parse uris. We will have to see if this can be added in the Windows 
 build and if it 
 does fix the problem.
 
 As a workaround, I am now amending your changes in gnc-split-reg.c to use 
 local-only 
 filenames on Windows.
 
 The test is building now (usually takes the better part of an hour).

Geert,

When I tested it on a Mac, gtk_show_uri failed because it depends on gvfs which 
isn't at present a GC dependency, so please at least put back the Mac bit -- 
which I'd already fixed so that it works.

If you can get it to build and work on Win32 without resorting to Win32 calls, 
great, but let's not add any new Gnome dependencies.

Regards,
John Ralls
 


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


Re: r23397 - gnucash/trunk/src - Bug 336843: Attach images/files/urls to transactions.

2013-11-17 Thread Geert Janssens
On Sunday 17 November 2013 08:13:21 John Ralls wrote:
 On Nov 17, 2013, at 7:53 AM, Geert Janssens janssens-ge...@telenet.be wrote:
  On Saturday 16 November 2013 13:53:50 Patrick wrote:
  Geert,
  
  Can you try adding:
  
  #include basetsd.h up in the W32 includes?
  
  diff --git a/src/gnome-utils/gnc-gnome-utils.c
  b/src/gnome-utils/gnc-gnome-utils index a9ccb79..bec5a04 100644
  --- a/src/gnome-utils/gnc-gnome-utils.c
  +++ b/src/gnome-utils/gnc-gnome-utils.c
  @@ -51,6 +51,7 @@
  #include gnc-session.h
  #include qofbookslots.h
  #ifdef G_OS_WIN32
  +#include basetsd.h
  #include gnc-help-utils.h
  #endif
  #ifdef MAC_INTEGRATION
  
  I had wondered if I'd messed the W32 code up. I don't have VC++, so
  I
  couldn't test compile and debug.
  
  Sorry!
  
  Patrick
  
  Hi Patrick,
  
  Don't worry. You don't have to test your changes on all platforms.
  That's why we are a community. (It's nice if you *can* of course,
  to help lighten the burden for the others).
  
  I only really looked at your code just now.
  
  In this case, there's no need to handle file loading differently on
  each platform. The function gtk_show_uri should work on each
  platform we support (with caveats - more on that later).
  
  So for now I have removed all but the last implementation.
  
  Caveat: you have chosen to allow the user to link to non-local files
  (using gtk_file_chooser_set_local_only). And you save a full uri.
  This doesn't work by default on Windows, because the URI is
  improperly parsed. For example:
  file:///c:/somefile.pdf
  gtk_show_uri will first strip the file:// protocol. What is left
  (/c:/somefile.pdf) still contains a :/. gtk_show_uri erroneously
  thinks this is still a protocol specifier and bails out. Since I
  want to get the 2.5.8 release out of the door as soon as possible,
  I'm thinking of leaving it like that for now and deal with the
  issue in a couple of days.
  
  The improper parsing may be because GnuCash doesn't ship gio-gvfs on
  Windows, which is needed to parse uris. We will have to see if this
  can be added in the Windows build and if it does fix the problem.
  
  As a workaround, I am now amending your changes in gnc-split-reg.c
  to use local-only filenames on Windows.
  
  The test is building now (usually takes the better part of an hour).
 
 Geert,
 
 When I tested it on a Mac, gtk_show_uri failed because it depends on
 gvfs which isn't at present a GC dependency, so please at least put
 back the Mac bit -- which I'd already fixed so that it works.
 
 If you can get it to build and work on Win32 without resorting to
 Win32 calls, great, but let's not add any new Gnome dependencies.
 
If I understand this correctly, gvfs is only required for non-local uris. What 
I did for Windows 
was enforcing local-only uris and then using gtk_file_chooser_get_filename 
instead of 
gtk_file_chooser_get_uri.


But my test box is taking too long to complete the build. I'm out of time for 
today.

John, if you want to do a release, the quickest solution is to replace INT_PTR 
with int in gnc-
gnome-utils.c.

I have seen several examples like this on the net. I'll push my changes for 
2.5.9 if/when I get it 
sorted out. These changes shouldn't conflict with the string/feature freeze.

Geert

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


Re: r23397 - gnucash/trunk/src - Bug 336843: Attach images/files/urls to transactions.

2013-11-17 Thread John Ralls

On Nov 17, 2013, at 9:02 AM, Geert Janssens janssens-ge...@telenet.be wrote:

 On Sunday 17 November 2013 08:13:21 John Ralls wrote:
 
  Geert,
  
  When I tested it on a Mac, gtk_show_uri failed because it depends on
  gvfs which isn't at present a GC dependency, so please at least put
  back the Mac bit -- which I'd already fixed so that it works.
  
  If you can get it to build and work on Win32 without resorting to
  Win32 calls, great, but let's not add any new Gnome dependencies.
  
 If I understand this correctly, gvfs is only required for non-local uris. 
 What I did for Windows was enforcing local-only uris and then using 
 gtk_file_chooser_get_filename instead of gtk_file_chooser_get_uri.
  
  
 But my test box is taking too long to complete the build. I'm out of time for 
 today.
  
 John, if you want to do a release, the quickest solution is to replace 
 INT_PTR with int in gnc-gnome-utils.c.
  
 I have seen several examples like this on the net. I'll push my changes for 
 2.5.9 if/when I get it sorted out. These changes shouldn't conflict with the 
 string/feature freeze.

Geert,

The error message implied that gvfs was required to figure out what type of 
file was being opened, but that's actually not material because Patrick's UI 
includes an associate URL menu item that presents a dialog to enter an 
unrestricted URL.

I'll fix the win32 case and do the release; we can figure out what to do next 
when you have time.

Regards,
John Ralls

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


Re: Error parsing compressed file but reads uncompressed ok

2013-11-17 Thread Mike Alexander
On Nov 17, 2013, at 11:09 AM, John Ralls jra...@ceridwen.us wrote:
 
 Good job, but file the bug directly to libxml2:
 https://bugzilla.gnome.org/enter_bug.cgi?product=libxml2
 
 Why wait for a distro maintainer to push it upstream, especially if you have 
 a patch

You're right.  I did this last night:  
https://bugzilla.gnome.org/show_bug.cgi?id=712528

 That aside, I agree that it would be better for us to do the unzipping, so by 
 all means make that change and backport it to 2.4.

OK, I'll work on that today.

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


Translation into French

2013-11-17 Thread Didier Féminier

Hi,
I am a professional translator and I use Linux as the standard OS on my 
computers.


I wish to translate GnuCash Tutorial and Concepts Guide into French. I 
foresee no major problem overwriting the English with French the xml 
files. And of course, what I don't know, I will learn along the way! 
However, in order to avoid wasting time and energy, I want to make sure 
that nobody else is working on the same project. Could you please 
confirm that I would be, as far as you know, the only one working on 
this translation into French?


If someone is already working on it, I am also willing to collaborate, 
as long as this person is a qualified/experienced translator.


Regards.

--
Didier Féminier
159, rue de Morency Apt. 402
Gatineau  QC
J8V 2E7
819.930.4767 (mobile)
819.931 4800 (fixe)

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