mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[aqb] Restore compilation checks for AQBanking 6.4
We require only 6.1.
This commit is contained in:
parent
06612b8434
commit
68dabea199
@ -33,9 +33,11 @@
|
|||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include "gnc-ab-utils.h"
|
#include "gnc-ab-utils.h"
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
#include <aqbanking/types/transaction.h>
|
#include <aqbanking/types/transaction.h>
|
||||||
|
|
||||||
#include <gnc-aqbanking-templates.h>
|
#include <gnc-aqbanking-templates.h>
|
||||||
|
#endif
|
||||||
#include "dialog-ab-trans.h"
|
#include "dialog-ab-trans.h"
|
||||||
#include "dialog-transfer.h"
|
#include "dialog-transfer.h"
|
||||||
#include "dialog-utils.h"
|
#include "dialog-utils.h"
|
||||||
@ -45,6 +47,7 @@
|
|||||||
/* This static indicates the debugging module that this .o belongs to. */
|
/* This static indicates the debugging module that this .o belongs to. */
|
||||||
static QofLogModule log_module = G_LOG_DOMAIN;
|
static QofLogModule log_module = G_LOG_DOMAIN;
|
||||||
|
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
/* Template handling */
|
/* Template handling */
|
||||||
static void gnc_ab_trans_dialog_fill_templ_helper(gpointer data, gpointer user_data);
|
static void gnc_ab_trans_dialog_fill_templ_helper(gpointer data, gpointer user_data);
|
||||||
static gboolean gnc_ab_trans_dialog_clear_templ_helper(GtkTreeModel *model,
|
static gboolean gnc_ab_trans_dialog_clear_templ_helper(GtkTreeModel *model,
|
||||||
@ -55,7 +58,7 @@ static gboolean gnc_ab_trans_dialog_get_templ_helper(GtkTreeModel *model,
|
|||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
#endif
|
||||||
static AB_TRANSACTION *gnc_ab_trans_dialog_fill_values(GncABTransDialog *td);
|
static AB_TRANSACTION *gnc_ab_trans_dialog_fill_values(GncABTransDialog *td);
|
||||||
static GNC_AB_JOB *gnc_ab_trans_dialog_get_available_empty_job(GNC_AB_ACCOUNT_SPEC *ab_acc,
|
static GNC_AB_JOB *gnc_ab_trans_dialog_get_available_empty_job(GNC_AB_ACCOUNT_SPEC *ab_acc,
|
||||||
GncABTransType trans_type);
|
GncABTransType trans_type);
|
||||||
@ -155,6 +158,7 @@ gboolean gnc_ab_trans_isSEPA(GncABTransType t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
static void
|
static void
|
||||||
gnc_ab_trans_dialog_fill_templ_helper(gpointer data, gpointer user_data)
|
gnc_ab_trans_dialog_fill_templ_helper(gpointer data, gpointer user_data)
|
||||||
{
|
{
|
||||||
@ -169,7 +173,7 @@ gnc_ab_trans_dialog_fill_templ_helper(gpointer data, gpointer user_data)
|
|||||||
TEMPLATE_POINTER, templ,
|
TEMPLATE_POINTER, templ,
|
||||||
-1);
|
-1);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* Create a new AB_TRANSACTION, fill the values from the entry fields into it
|
* Create a new AB_TRANSACTION, fill the values from the entry fields into it
|
||||||
* and return it. The caller must AB_TRANSACTION_free() it when finished.
|
* and return it. The caller must AB_TRANSACTION_free() it when finished.
|
||||||
@ -449,6 +453,7 @@ gnc_ab_trans_dialog_new(GtkWidget *parent, GNC_AB_ACCOUNT_SPEC *ab_acc,
|
|||||||
gtk_label_set_text (GTK_LABEL (orig_bankcode_label), ab_bankcode);
|
gtk_label_set_text (GTK_LABEL (orig_bankcode_label), ab_bankcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
/* Fill list for choosing a transaction template */
|
/* Fill list for choosing a transaction template */
|
||||||
td->template_list_store = gtk_list_store_new(TEMPLATE_NUM_COLUMNS,
|
td->template_list_store = gtk_list_store_new(TEMPLATE_NUM_COLUMNS,
|
||||||
G_TYPE_STRING, G_TYPE_POINTER);
|
G_TYPE_STRING, G_TYPE_POINTER);
|
||||||
@ -457,7 +462,7 @@ gnc_ab_trans_dialog_new(GtkWidget *parent, GNC_AB_ACCOUNT_SPEC *ab_acc,
|
|||||||
GTK_TREE_MODEL(td->template_list_store));
|
GTK_TREE_MODEL(td->template_list_store));
|
||||||
td->templ_changed = FALSE;
|
td->templ_changed = FALSE;
|
||||||
/* Keep a reference to the store */
|
/* Keep a reference to the store */
|
||||||
|
#endif
|
||||||
/* Show this list */
|
/* Show this list */
|
||||||
renderer = gtk_cell_renderer_text_new();
|
renderer = gtk_cell_renderer_text_new();
|
||||||
column = gtk_tree_view_column_new_with_attributes(
|
column = gtk_tree_view_column_new_with_attributes(
|
||||||
@ -723,6 +728,7 @@ gnc_ab_trans_dialog_run_until_ok(GncABTransDialog *td)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
static gboolean
|
static gboolean
|
||||||
gnc_ab_trans_dialog_clear_templ_helper(GtkTreeModel *model,
|
gnc_ab_trans_dialog_clear_templ_helper(GtkTreeModel *model,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
@ -737,7 +743,7 @@ gnc_ab_trans_dialog_clear_templ_helper(GtkTreeModel *model,
|
|||||||
gnc_ab_trans_templ_free(templ);
|
gnc_ab_trans_templ_free(templ);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
gnc_ab_trans_dialog_free(GncABTransDialog *td)
|
gnc_ab_trans_dialog_free(GncABTransDialog *td)
|
||||||
{
|
{
|
||||||
@ -746,15 +752,19 @@ gnc_ab_trans_dialog_free(GncABTransDialog *td)
|
|||||||
AB_Transaction_free(td->ab_trans);
|
AB_Transaction_free(td->ab_trans);
|
||||||
if (td->dialog)
|
if (td->dialog)
|
||||||
gtk_widget_destroy(td->dialog);
|
gtk_widget_destroy(td->dialog);
|
||||||
|
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
if (td->template_list_store)
|
if (td->template_list_store)
|
||||||
{
|
{
|
||||||
gtk_tree_model_foreach(GTK_TREE_MODEL(td->template_list_store),
|
gtk_tree_model_foreach(GTK_TREE_MODEL(td->template_list_store),
|
||||||
gnc_ab_trans_dialog_clear_templ_helper, NULL);
|
gnc_ab_trans_dialog_clear_templ_helper, NULL);
|
||||||
g_object_unref(td->template_list_store);
|
g_object_unref(td->template_list_store);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
g_free(td);
|
g_free(td);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
static gboolean
|
static gboolean
|
||||||
gnc_ab_trans_dialog_get_templ_helper(GtkTreeModel *model,
|
gnc_ab_trans_dialog_get_templ_helper(GtkTreeModel *model,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
@ -790,6 +800,7 @@ gnc_ab_trans_dialog_get_templ(const GncABTransDialog *td, gboolean *changed)
|
|||||||
list = g_list_reverse(list);
|
list = g_list_reverse(list);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gnc_ab_trans_dialog_get_parent(const GncABTransDialog *td)
|
gnc_ab_trans_dialog_get_parent(const GncABTransDialog *td)
|
||||||
@ -822,9 +833,11 @@ gnc_ab_trans_dialog_get_available_empty_job(GNC_AB_ACCOUNT_SPEC *ab_acc, GncABTr
|
|||||||
case SEPA_TRANSFER:
|
case SEPA_TRANSFER:
|
||||||
cmd=AB_Transaction_CommandSepaTransfer;
|
cmd=AB_Transaction_CommandSepaTransfer;
|
||||||
break;
|
break;
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
case SEPA_INTERNAL_TRANSFER:
|
case SEPA_INTERNAL_TRANSFER:
|
||||||
cmd=AB_Transaction_CommandSepaInternalTransfer;
|
cmd=AB_Transaction_CommandSepaInternalTransfer;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case SEPA_DEBITNOTE:
|
case SEPA_DEBITNOTE:
|
||||||
cmd=AB_Transaction_CommandSepaDebitNote;
|
cmd=AB_Transaction_CommandSepaDebitNote;
|
||||||
break;
|
break;
|
||||||
@ -875,6 +888,7 @@ gnc_ab_get_trans_job(GNC_AB_ACCOUNT_SPEC *ab_acc,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
void
|
void
|
||||||
gnc_ab_trans_dialog_templ_list_row_activated_cb(GtkTreeView *view,
|
gnc_ab_trans_dialog_templ_list_row_activated_cb(GtkTreeView *view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
@ -1053,6 +1067,7 @@ gnc_ab_trans_dialog_add_templ_cb(GtkButton *button, gpointer user_data)
|
|||||||
|
|
||||||
LEAVE(" ");
|
LEAVE(" ");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
gnc_ab_trans_dialog_moveup_templ_cb(GtkButton *button, gpointer user_data)
|
gnc_ab_trans_dialog_moveup_templ_cb(GtkButton *button, gpointer user_data)
|
||||||
|
@ -106,6 +106,7 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
if (trans_type == SEPA_INTERNAL_TRANSFER)
|
if (trans_type == SEPA_INTERNAL_TRANSFER)
|
||||||
{
|
{
|
||||||
/* Generate list of template transactions from the reference accounts*/
|
/* Generate list of template transactions from the reference accounts*/
|
||||||
@ -118,6 +119,7 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
/* Get list of template transactions */
|
/* Get list of template transactions */
|
||||||
templates = gnc_ab_trans_templ_list_new_from_book(
|
templates = gnc_ab_trans_templ_list_new_from_book(
|
||||||
@ -153,7 +155,11 @@ gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc,
|
|||||||
result = gnc_ab_trans_dialog_run_until_ok(td);
|
result = gnc_ab_trans_dialog_run_until_ok(td);
|
||||||
|
|
||||||
templates = gnc_ab_trans_dialog_get_templ(td, &changed);
|
templates = gnc_ab_trans_dialog_get_templ(td, &changed);
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
if (trans_type != SEPA_INTERNAL_TRANSFER && changed)
|
if (trans_type != SEPA_INTERNAL_TRANSFER && changed)
|
||||||
|
#else
|
||||||
|
if (changed)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
/* Save the templates */
|
/* Save the templates */
|
||||||
save_templates(parent, gnc_acc, templates,
|
save_templates(parent, gnc_acc, templates,
|
||||||
|
@ -35,8 +35,10 @@
|
|||||||
#include <gwenhywfar/gwenhywfar.h>
|
#include <gwenhywfar/gwenhywfar.h>
|
||||||
#include <aqbanking/banking.h>
|
#include <aqbanking/banking.h>
|
||||||
#include <aqbanking/types/balance.h>
|
#include <aqbanking/types/balance.h>
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
#include <aqbanking/types/refaccount.h>
|
#include <aqbanking/types/refaccount.h>
|
||||||
#include <gnc-aqbanking-templates.h>
|
#include <gnc-aqbanking-templates.h>
|
||||||
|
#endif
|
||||||
#include "window-reconcile.h"
|
#include "window-reconcile.h"
|
||||||
#include "Transaction.h"
|
#include "Transaction.h"
|
||||||
#include "dialog-ab-trans.h"
|
#include "dialog-ab-trans.h"
|
||||||
@ -1172,6 +1174,7 @@ gnc_ab_get_permanent_certs (void)
|
|||||||
return perm_certs;
|
return perm_certs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
GList*
|
GList*
|
||||||
gnc_ab_trans_templ_list_new_from_ref_accounts (GNC_AB_ACCOUNT_SPEC *ab_acc)
|
gnc_ab_trans_templ_list_new_from_ref_accounts (GNC_AB_ACCOUNT_SPEC *ab_acc)
|
||||||
{
|
{
|
||||||
@ -1212,6 +1215,7 @@ gnc_ab_trans_templ_list_new_from_ref_accounts (GNC_AB_ACCOUNT_SPEC *ab_acc)
|
|||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
static int
|
static int
|
||||||
ab_node_pair_compare (AB_Node_Pair* left, AB_Node_Pair* right)
|
ab_node_pair_compare (AB_Node_Pair* left, AB_Node_Pair* right)
|
||||||
{
|
{
|
||||||
|
@ -281,7 +281,7 @@ GWEN_DB_NODE *gnc_ab_get_permanent_certs (void);
|
|||||||
*/
|
*/
|
||||||
gchar* gnc_ab_create_online_id (const gchar *bankcode, const gchar *accountnumber);
|
gchar* gnc_ab_create_online_id (const gchar *bankcode, const gchar *accountnumber);
|
||||||
|
|
||||||
|
#if (AQBANKING_VERSION_INT >= 60400)
|
||||||
/**
|
/**
|
||||||
* Obtain the list of templates based on the aqbanking account spec's target accounts.
|
* Obtain the list of templates based on the aqbanking account spec's target accounts.
|
||||||
*
|
*
|
||||||
@ -290,7 +290,7 @@ gchar* gnc_ab_create_online_id (const gchar *bankcode, const gchar *accountnumbe
|
|||||||
*/
|
*/
|
||||||
GList*
|
GList*
|
||||||
gnc_ab_trans_templ_list_new_from_ref_accounts (GNC_AB_ACCOUNT_SPEC *ab_acc);
|
gnc_ab_trans_templ_list_new_from_ref_accounts (GNC_AB_ACCOUNT_SPEC *ab_acc);
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* Retrieve the available AQBanking importers.
|
* Retrieve the available AQBanking importers.
|
||||||
* @param abi The AQBanking instance.
|
* @param abi The AQBanking instance.
|
||||||
|
Loading…
Reference in New Issue
Block a user