r19445 - gnucash/trunk/src/import-export/aqbanking - Add instantiation of gwengui-gtk2 object in gnucash, which enables the setup wizard again, but it doesn't fully work yet.

Christian Stimming cstim at code.gnucash.org
Tue Aug 17 17:05:40 EDT 2010


Author: cstim
Date: 2010-08-17 17:05:40 -0400 (Tue, 17 Aug 2010)
New Revision: 19445
Trac: http://svn.gnucash.org/trac/changeset/19445

Modified:
   gnucash/trunk/src/import-export/aqbanking/gnc-ab-utils.h
   gnucash/trunk/src/import-export/aqbanking/gnc-gwen-gui.c
Log:
Add instantiation of gwengui-gtk2 object in gnucash, which enables the setup wizard again, but it doesn't fully work yet.

In particular, a quick test runs into significant UI work which is
still needed, and also occasional crashes might occur. Hence, the
gwengui-gtk2 parts have to be enabled manually by un-commenting
USING_GWENHYWFAR_GTK2_GUI.

Modified: gnucash/trunk/src/import-export/aqbanking/gnc-ab-utils.h
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/gnc-ab-utils.h	2010-08-17 20:16:32 UTC (rev 19444)
+++ gnucash/trunk/src/import-export/aqbanking/gnc-ab-utils.h	2010-08-17 21:05:40 UTC (rev 19445)
@@ -36,16 +36,22 @@
 #include <glib.h>
 #include <gtk/gtk.h>
 #include <aqbanking/banking.h>
+#include <gwenhywfar/version.h>
 
 #include "Account.h"
 
 G_BEGIN_DECLS
 
 /** A define that combines the aqbanking version number into one single
- * integer number. Assumption: Both MINOR nor PATCHLEVEL numbers are
+ * integer number. Assumption: Both MINOR and PATCHLEVEL numbers are
  * in the interval [0..99]. */
 #define AQBANKING_VERSION_INT (10000 * AQBANKING_VERSION_MAJOR + 100 * AQBANKING_VERSION_MINOR + AQBANKING_VERSION_PATCHLEVEL)
 
+/** A define that combines the gwenhywfar version number into one single
+ * integer number. Assumption: Both MINOR and PATCHLEVEL numbers are
+ * in the interval [0..99]. */
+#define GWENHYWFAR_VERSION_INT (10000 * GWENHYWFAR_VERSION_MAJOR + 100 * GWENHYWFAR_VERSION_MINOR + GWENHYWFAR_VERSION_PATCHLEVEL)
+
 #if AQBANKING_VERSION_INT >= 39900
 /** Defined if libaqbanking4 as opposed to libaqbanking3 or earlier is
  * being used */

Modified: gnucash/trunk/src/import-export/aqbanking/gnc-gwen-gui.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/gnc-gwen-gui.c	2010-08-17 20:16:32 UTC (rev 19444)
+++ gnucash/trunk/src/import-export/aqbanking/gnc-gwen-gui.c	2010-08-17 21:05:40 UTC (rev 19445)
@@ -45,6 +45,22 @@
 #include "md5.h"
 #include "qof.h"
 
+#if GWENHYWFAR_VERSION_INT > 39913
+/* Only for the brave: You can enable the gwenhywfar gtk2 gui object
+ * by un-commenting this here. Note: Also need to add "-lgwengui-gtk2"
+ * to the LIBADD section in Makefile.am because that library can't be
+ * looked up automatically so far! */
+/*# define USING_GWENHYWFAR_GTK2_GUI*/
+#endif
+
+#ifdef USING_GWENHYWFAR_GTK2_GUI
+# if GWENHYWFAR_VERSION_INT < 39920
+#  include <../gwen-gui-gtk2/gtk2_gui.h>
+# else
+#  include <gwen-gui-gtk2/gtk2_gui.h>
+# endif
+#endif
+
 /* This static indicates the debugging module that this .o belongs to.  */
 static QofLogModule log_module = G_LOG_DOMAIN;
 
@@ -218,7 +234,13 @@
 {
     if (!log_gwen_gui)
     {
-        log_gwen_gui = GWEN_Gui_new();
+        log_gwen_gui =
+#ifdef USING_GWENHYWFAR_GTK2_GUI
+        Gtk2_Gui_new()
+#else
+        GWEN_Gui_new()
+#endif
+            ;
 
         /* Always use our own logging */
         GWEN_Gui_SetLogHookFn(log_gwen_gui, loghook_cb);
@@ -318,7 +340,14 @@
 
     ENTER("gui=%p", gui);
 
-    gui->gwen_gui = gwen_gui = GWEN_Gui_new();
+    gwen_gui =
+#ifdef USING_GWENHYWFAR_GTK2_GUI
+        Gtk2_Gui_new()
+#else
+        GWEN_Gui_new()
+#endif
+        ;
+    gui->gwen_gui = gwen_gui;
 
     GWEN_Gui_SetMessageBoxFn(gwen_gui, messagebox_cb);
     GWEN_Gui_SetInputBoxFn(gwen_gui, inputbox_cb);



More information about the gnucash-changes mailing list