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 > > <[email protected]> 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 <[email protected]> > >> > >> _______________________________________________ > >> gnucash-patches mailing list > >> [email protected] > >> 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 > > [email protected] > > https://lists.gnucash.org/mailman/listinfo/gnucash-devel _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
