#include "hb-tag.h"
#include "hb-split.h"
+#include "ext.h"
+#include "refcount.h"
+
/****************************************************************************/
/* Debug macro */
/****************************************************************************/
void
da_transaction_free(Transaction *item)
{
- if(item != NULL)
+ if(rc_unref(item))
{
da_transaction_clean(item);
- g_free(item);
+ rc_free(item);
}
}
Transaction *
da_transaction_malloc(void)
{
- return g_malloc0(sizeof(Transaction));
+ return rc_alloc(sizeof(Transaction));
}
Transaction *da_transaction_clone(Transaction *src_item)
{
-Transaction *new_item = g_memdup(src_item, sizeof(Transaction));
+Transaction *new_item = rc_dup(src_item, sizeof(Transaction));
DB( g_print("da_transaction_clone\n") );
account_balances_add (child);
+ GValue txn_value = G_VALUE_INIT;
+ ext_hook("transaction_inserted", EXT_TRANSACTION(&txn_value, child), NULL);
+
}
}
result = ui_dialog_transaction_xfer_select_child(parent, ope, matchlist, &child);
if( result == GTK_RESPONSE_ACCEPT )
{
- transaction_xfer_change_to_child(ope, child);
+ //#1827193 child can be null...
+ DB( g_print(" child %p\n", child) );
+ if( child != NULL )
+ transaction_xfer_change_to_child(ope, child);
+ else
+ transaction_xfer_create_child(ope);
}
else //GTK_RESPONSE_CANCEL
{
{
transaction_xfer_search_or_add_child(parent, newope, newope->kxferacc);
}
+
+ GValue txn_value = G_VALUE_INIT;
+ ext_hook("transaction_inserted", EXT_TRANSACTION(&txn_value, newope), NULL);
}
return newope;