static void gnc_taxtable_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GncTaxTable *tt; g_return_if_fail(GNC_IS_TAXTABLE(object)); tt = GNC_TAXTABLE(object); switch (prop_id) { case PROP_NAME: gncTaxTableSetName(tt, g_value_get_string(value)); break; case PROP_INVISIBLE: if (g_value_get_boolean(value)) { gncTaxTableMakeInvisible(tt); } break; case PROP_REFCOUNT: gncTaxTableSetRefcount(tt, g_value_get_uint64(value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } }
static gboolean taxtable_invisible_handler (xmlNodePtr node, gpointer taxtable_pdata) { struct taxtable_pdata *pdata = taxtable_pdata; gint64 val; dom_tree_to_integer(node, &val); if (val) gncTaxTableMakeInvisible (pdata->table); return TRUE; }
static void set_invisible( gpointer data, gboolean value ) { GncTaxTable* tt = GNC_TAXTABLE(data); g_return_if_fail( data != NULL ); g_return_if_fail( GNC_IS_TAXTABLE(data) ); if ( value ) { gncTaxTableMakeInvisible( tt ); } }
void gncTaxTableSetParent (GncTaxTable *table, GncTaxTable *parent) { if (!table) return; gncTaxTableBeginEdit (table); if (table->parent) gncTaxTableRemoveChild(table->parent, table); table->parent = parent; if (parent) gncTaxTableAddChild(parent, table); table->refcount = 0; gncTaxTableMakeInvisible (table); mark_table (table); gncTaxTableCommitEdit (table); }