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