r16247 - gnucash/trunk/src/import-export/hbci - Add extra Qt error checking on Windows. #452741.

Christian Stimming cstim at cvs.gnucash.org
Mon Jul 2 16:39:57 EDT 2007


Author: cstim
Date: 2007-07-02 16:39:56 -0400 (Mon, 02 Jul 2007)
New Revision: 16247
Trac: http://svn.gnucash.org/trac/changeset/16247

Modified:
   gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
Log:
Add extra Qt error checking on Windows. #452741.


Modified: gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c
===================================================================
--- gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c	2007-07-02 20:26:26 UTC (rev 16246)
+++ gnucash/trunk/src/import-export/hbci/druid-hbci-initial.c	2007-07-02 20:39:56 UTC (rev 16247)
@@ -455,6 +455,7 @@
      https://lists.gnucash.org/pipermail/gnucash-devel/2004-December/012351.html
   */
   gboolean wizard_exists;
+  gboolean qt_probably_unavailable = FALSE;
   const char *wizard_path;
   AB_BANKING *banking = info->api;
   g_assert(info->druid);
@@ -568,6 +569,20 @@
       close( fd );
   }
 
+#ifdef G_OS_WIN32
+  {
+    const char *check_file = "qtdemo.exe";
+    gchar *found_program = g_find_program_in_path(check_file);
+    if (found_program) {
+      g_debug("Yes, we found the Qt demo program in %s\n", found_program);
+      g_free(found_program);
+    } else {
+      g_warning("Ouch, no Qt demo program was found. Qt not installed?\n");
+      qt_probably_unavailable = TRUE;
+    }
+  }
+#endif
+
   druid_disable_next_button(info);
   /* AB_Banking_DeactivateProvider(banking, backend_name); */
   if (wizard_exists) {
@@ -600,6 +615,11 @@
 			       NULL, NULL, &pid, &error);
       g_free (argv[0]);
 
+      if (error)
+	g_critical("Error on starting AqBanking setup wizard: Code %d: %s",
+		   error->code,
+		   error->message ? error->message : "(null)");
+
       if (!spawned) {
 	g_critical("Could not start AqBanking setup wizard: %s",
 		   error->message ? error->message : "(null)");
@@ -631,6 +651,24 @@
       }
     }
     else {
+      if (qt_probably_unavailable) {
+	g_warning("on_aqhbci_button: Oops, aqhbci wizard return nonzero value: %d. The called program was \"%s\".\n", res, wizard_path);
+	gnc_error_dialog
+	  (info->window,
+	   _("The external program \"AqBanking Setup Wizard\" failed "
+	     "to run successfully because the "
+	     "additional software \"Qt\" was not found.  "
+	     "Please install the \"Qt/Windows Open Source Edition\" "
+	     "from Trolltech by downloading it from www.trolltech.com"
+	     "\n\n"
+	     "If you have installed Qt already, you will have to adapt "
+	     "the PATH variable of your system appropriately.  "
+	     "Contact the GnuCash developers if you need further "
+	     "assistance on how to install Qt correctly."
+	     "\n\n"
+	     "Online Banking cannot be setup without Qt.  Press \"Close\" "
+	     "now, then \"Cancel\" to cancel the Online Banking setup."));
+      } else {
       g_warning("on_aqhbci_button: Oops, aqhbci wizard return nonzero value: %d. The called program was \"%s\".\n", res, wizard_path);
       gnc_error_dialog
 	(info->window,
@@ -638,6 +676,7 @@
 	   "to run successfully.  Online Banking can only be setup "
 	   "if this wizard has run successfully.  "
 	   "Please try running the \"AqBanking Setup Wizard\" again."));
+      }
       druid_disable_next_button(info);
     }
   } else {



More information about the gnucash-changes mailing list