r15345 - gnucash/trunk/src/import-export/hbci - For win32, ifdef out the fork() calls and show error dialog until g_spawn is implemented for the child process.

Christian Stimming cstim at cvs.gnucash.org
Fri Jan 12 11:37:14 EST 2007


Author: cstim
Date: 2007-01-12 11:37:13 -0500 (Fri, 12 Jan 2007)
New Revision: 15345
Trac: http://svn.gnucash.org/trac/changeset/15345

Modified:
   gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
Log:
For win32, ifdef out the fork() calls and show error dialog until g_spawn is implemented for the child process.

Modified: gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
===================================================================
--- gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c	2007-01-12 16:36:34 UTC (rev 15344)
+++ gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c	2007-01-12 16:37:13 UTC (rev 15345)
@@ -27,7 +27,9 @@
 #include <glib/gi18n.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <sys/wait.h>
+#ifdef HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#endif
 #include <fcntl.h>
 #include <unistd.h>
 
@@ -540,6 +542,20 @@
   druid_disable_next_button(info);
   /* AB_Banking_DeactivateProvider(banking, backend_name); */
   if (wizard_exists) {
+#ifdef G_OS_WIN32
+    /* FIXME: Use something different than fork() for the child
+       process here. See src/backend/file/io-gncxml-v2.c that has
+       the same problem. */
+    gnc_error_dialog
+      (info->window,
+       _("The Windows version of GnuCash does not (yet) have the "
+	 "capability to start the external program \"%s Setup Wizard\". "
+	 "Please start it yourself from the location \"%s\" "
+	 "before you continue."),
+       backend_name, wizard_path);
+    res = 0;
+#else
+    /* Normal non-Windows operating system */
     int wait_status;
     int wait_result = 0;
 
@@ -579,6 +595,7 @@
 	AB_Banking_Init (info->api);
       }
     }
+#endif /* G_OS_WIN32 */
 
     if (res == 0) {
 #ifndef AQBANKING_WIZARD_ALLBACKENDS



More information about the gnucash-changes mailing list