mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Add some missing log Macros for the price model
Add some missing LEAVE macro statements so the log entries do not get longer and longer.
This commit is contained in:
parent
af96c746a1
commit
9f0558ffb5
@ -219,6 +219,8 @@ gnc_tree_model_price_new (QofBook *book, GNCPriceDB *price_db)
|
|||||||
GncTreeModelPricePrivate *priv;
|
GncTreeModelPricePrivate *priv;
|
||||||
const GList *item;
|
const GList *item;
|
||||||
|
|
||||||
|
ENTER(" ");
|
||||||
|
|
||||||
item = gnc_gobject_tracking_get_list(GNC_TREE_MODEL_PRICE_NAME);
|
item = gnc_gobject_tracking_get_list(GNC_TREE_MODEL_PRICE_NAME);
|
||||||
for ( ; item; item = g_list_next(item))
|
for ( ; item; item = g_list_next(item))
|
||||||
{
|
{
|
||||||
@ -232,8 +234,7 @@ gnc_tree_model_price_new (QofBook *book, GNCPriceDB *price_db)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
model = g_object_new (GNC_TYPE_TREE_MODEL_PRICE,
|
model = g_object_new (GNC_TYPE_TREE_MODEL_PRICE, NULL);
|
||||||
NULL);
|
|
||||||
|
|
||||||
priv = GNC_TREE_MODEL_PRICE_GET_PRIVATE(model);
|
priv = GNC_TREE_MODEL_PRICE_GET_PRIVATE(model);
|
||||||
priv->book = book;
|
priv->book = book;
|
||||||
@ -242,6 +243,7 @@ gnc_tree_model_price_new (QofBook *book, GNCPriceDB *price_db)
|
|||||||
priv->event_handler_id =
|
priv->event_handler_id =
|
||||||
qof_event_register_handler (gnc_tree_model_price_event_handler, model);
|
qof_event_register_handler (gnc_tree_model_price_event_handler, model);
|
||||||
|
|
||||||
|
LEAVE("returning new model %p", model);
|
||||||
return GTK_TREE_MODEL (model);
|
return GTK_TREE_MODEL (model);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1244,7 +1246,7 @@ gnc_tree_model_price_get_iter_from_commodity (GncTreeModelPrice *model,
|
|||||||
n = g_list_index(list, commodity);
|
n = g_list_index(list, commodity);
|
||||||
if (n == -1)
|
if (n == -1)
|
||||||
{
|
{
|
||||||
LEAVE("not in list");
|
LEAVE("commodity not in list");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1280,11 +1282,17 @@ gnc_tree_model_price_get_iter_from_namespace (GncTreeModelPrice *model,
|
|||||||
ct = qof_book_get_data (priv->book, GNC_COMMODITY_TABLE);
|
ct = qof_book_get_data (priv->book, GNC_COMMODITY_TABLE);
|
||||||
list = gnc_commodity_table_get_namespaces_list(ct);
|
list = gnc_commodity_table_get_namespaces_list(ct);
|
||||||
if (list == NULL)
|
if (list == NULL)
|
||||||
|
{
|
||||||
|
LEAVE("namespace list empty");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
n = g_list_index(list, name_space);
|
n = g_list_index(list, name_space);
|
||||||
if (n == -1)
|
if (n == -1)
|
||||||
|
{
|
||||||
|
LEAVE("namespace not found");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
iter->stamp = model->stamp;
|
iter->stamp = model->stamp;
|
||||||
iter->user_data = ITER_IS_NAMESPACE;
|
iter->user_data = ITER_IS_NAMESPACE;
|
||||||
@ -1596,6 +1604,7 @@ gnc_tree_model_price_event_handler (QofInstance *entity,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
LEAVE(" ");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,18 +309,19 @@ gnc_price_create (QofBook *book)
|
|||||||
|
|
||||||
g_return_val_if_fail (book, NULL);
|
g_return_val_if_fail (book, NULL);
|
||||||
|
|
||||||
|
ENTER(" ");
|
||||||
p = g_object_new(GNC_TYPE_PRICE, NULL);
|
p = g_object_new(GNC_TYPE_PRICE, NULL);
|
||||||
|
|
||||||
qof_instance_init_data (&p->inst, GNC_ID_PRICE, book);
|
qof_instance_init_data (&p->inst, GNC_ID_PRICE, book);
|
||||||
qof_event_gen (&p->inst, QOF_EVENT_CREATE, NULL);
|
qof_event_gen (&p->inst, QOF_EVENT_CREATE, NULL);
|
||||||
|
LEAVE ("price created %p", p);
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gnc_price_destroy (GNCPrice *p)
|
gnc_price_destroy (GNCPrice *p)
|
||||||
{
|
{
|
||||||
ENTER(" ");
|
ENTER("destroy price %p", p);
|
||||||
qof_event_gen (&p->inst, QOF_EVENT_DESTROY, NULL);
|
qof_event_gen (&p->inst, QOF_EVENT_DESTROY, NULL);
|
||||||
|
|
||||||
if (p->type) CACHE_REMOVE(p->type);
|
if (p->type) CACHE_REMOVE(p->type);
|
||||||
@ -372,14 +373,14 @@ gnc_price_clone (GNCPrice* p, QofBook *book)
|
|||||||
|
|
||||||
if (!p)
|
if (!p)
|
||||||
{
|
{
|
||||||
LEAVE (" ");
|
LEAVE ("return NULL");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
new_p = gnc_price_create(book);
|
new_p = gnc_price_create(book);
|
||||||
if (!new_p)
|
if (!new_p)
|
||||||
{
|
{
|
||||||
LEAVE (" ");
|
LEAVE ("return NULL");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -394,7 +395,7 @@ gnc_price_clone (GNCPrice* p, QofBook *book)
|
|||||||
gnc_price_set_value(new_p, gnc_price_get_value(p));
|
gnc_price_set_value(new_p, gnc_price_get_value(p));
|
||||||
gnc_price_set_currency(new_p, gnc_price_get_currency(p));
|
gnc_price_set_currency(new_p, gnc_price_get_currency(p));
|
||||||
gnc_price_commit_edit(new_p);
|
gnc_price_commit_edit(new_p);
|
||||||
LEAVE (" ");
|
LEAVE ("return cloned price %p", new_p);
|
||||||
return(new_p);
|
return(new_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1801,7 +1802,7 @@ GNCPrice *gnc_pricedb_lookup_latest(GNCPriceDB *db,
|
|||||||
result = price_list->data;
|
result = price_list->data;
|
||||||
gnc_price_ref(result);
|
gnc_price_ref(result);
|
||||||
g_list_free (price_list);
|
g_list_free (price_list);
|
||||||
LEAVE(" ");
|
LEAVE("price is %p", result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2202,7 +2203,11 @@ gnc_pricedb_nth_price (GNCPriceDB *db,
|
|||||||
ENTER ("db=%p commodity=%s index=%d", db, gnc_commodity_get_mnemonic(c), n);
|
ENTER ("db=%p commodity=%s index=%d", db, gnc_commodity_get_mnemonic(c), n);
|
||||||
|
|
||||||
if (last_c && prices && last_c == c)
|
if (last_c && prices && last_c == c)
|
||||||
return g_list_nth_data (prices, n);
|
{
|
||||||
|
result = g_list_nth_data (prices, n);
|
||||||
|
LEAVE ("price=%p", result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
last_c = c;
|
last_c = c;
|
||||||
|
|
||||||
@ -2255,6 +2260,7 @@ gnc_pricedb_lookup_at_time64(GNCPriceDB *db,
|
|||||||
{
|
{
|
||||||
gnc_price_ref(p);
|
gnc_price_ref(p);
|
||||||
g_list_free (price_list);
|
g_list_free (price_list);
|
||||||
|
LEAVE("price is %p", p);
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
item = item->next;
|
item = item->next;
|
||||||
|
Loading…
Reference in New Issue
Block a user