Ejemplo n.º 1
0
static gboolean
billterm_invisible_handler (xmlNodePtr node, gpointer billterm_pdata)
{
    struct billterm_pdata *pdata = billterm_pdata;
    gint64 val;

    dom_tree_to_integer(node, &val);
    if (val)
        gncBillTermMakeInvisible (pdata->term);
    return TRUE;
}
Ejemplo n.º 2
0
static void
set_invisible (gpointer data, gboolean value)
{
    GncBillTerm* term = GNC_BILLTERM (data);

    g_return_if_fail (term != NULL);

    if (value)
    {
        gncBillTermMakeInvisible (term);
    }
}
Ejemplo n.º 3
0
/* XXX this doesn't seem right. If the parent/child relationship
 * is a doubly-linked list, then there shouldn't be separate set-parent,
 * set-child routines, else misuse of the routines will goof up
 * relationships.  These ops should be atomic, I think.
 */
void gncBillTermSetParent (GncBillTerm *term, GncBillTerm *parent)
{
    if (!term) return;
    gncBillTermBeginEdit (term);
    if (term->parent)
        gncBillTermRemoveChild(term->parent, term);
    term->parent = parent;
    if (parent)
        gncBillTermAddChild(parent, term);
    term->refcount = 0;
    if ( parent != NULL )
    {
        gncBillTermMakeInvisible (term);
    }
    gncBillTermCommitEdit (term);
}