gnucash c++
Aaron Laws
dartme18 at gmail.com
Wed Aug 6 16:16:17 EDT 2014
I tried to follow the directions at
http://wiki.gnucash.org/wiki/Contributing_to_GnuCash, but I couldn't find a
Bugzilla issue encapsulating the Great C++ Refactor. Should I create one so
there is a place to put patches?
I learned on IRC that it is generally a goal not to have C++ keywords in
the Gnucash code base, and this patch is along those ends. I think I got
all the C++11 keywords that would interfere with a C++11 compile. If this
is an inappropriate patch to submit, please let me know. After my
signature, you can find the patch prepared using `git format-patch` (as
specified in http://wiki.gnucash.org/wiki/Git#Patches). Also, I followed
the advice of http://wiki.gnucash.org/wiki/Development_Process ("All
development should target the *master* branch."). Please let me know if
anything looks amiss (the amount of context, using unified diff format,
perhaps I should be attaching instead of in-line quotation, etc.). Thanks!
In Christ,
Aaron Laws
>From c58457879496a26031e7a412deb429c9ef572fb9 Mon Sep 17 00:00:00 2001
From: lmat <dartme18 at gmail.com>
Date: Wed, 23 Jul 2014 17:47:02 -0400
Subject: [PATCH] Replacing c++ reserved keywords with clean alternatives
---
src/app-utils/gnc-component-manager.h | 2 +-
src/app-utils/test/test-option-util.c | 2 +-
src/engine/gnc-commodity.c | 152
++++++++++++------------
src/engine/test-core/test-engine-stuff.c | 6 +-
src/engine/test/utest-Account.c | 22 ++--
src/engine/test/utest-Transaction.c | 62 +++++-----
src/gnome-utils/assistant-xml-encoding.c | 10 +-
src/gnome-utils/dialog-commodity.c | 96 +++++++--------
src/gnome-utils/dialog-commodity.h | 4 +-
src/gnome-utils/dialog-preferences.c | 4 +-
src/gnome-utils/dialog-reset-warnings.c | 4 +-
src/gnome-utils/dialog-totd.c | 14 +--
src/gnome-utils/gnc-amount-edit.c | 2 +-
src/gnome-utils/gnc-cell-renderer-date.c | 12 +-
src/gnome-utils/gnc-cell-renderer-popup-entry.c | 2 +-
src/gnome-utils/gnc-cell-renderer-popup.c | 16 +--
src/gnome-utils/gnc-combott.c | 14 +--
src/gnome-utils/gnc-currency-edit.c | 2 +-
src/gnome-utils/gnc-date-delta.c | 2 +-
src/gnome-utils/gnc-date-format.c | 2 +-
src/gnome-utils/gnc-dense-cal.c | 2 +-
src/gnome-utils/gnc-general-select.c | 2 +-
src/gnome-utils/gnc-period-select.c | 2 +-
src/gnome-utils/gnc-plugin.c | 32 ++---
src/gnome-utils/gnc-tree-model-commodity.c | 92 +++++++-------
src/gnome-utils/gnc-tree-model-commodity.h | 2 +-
src/gnome-utils/gnc-tree-model-price.c | 102 ++++++++--------
src/gnome-utils/gnc-tree-model-price.h | 2 +-
src/gnome-utils/gnc-tree-view-commodity.c | 6 +-
src/gnome-utils/gnc-tree-view-price.c | 6 +-
src/gnome-utils/search-param.c | 2 +-
31 files changed, 340 insertions(+), 340 deletions(-)
diff --git a/src/app-utils/gnc-component-manager.h
b/src/app-utils/gnc-component-manager.h
index 7de280f..45fc187 100644
--- a/src/app-utils/gnc-component-manager.h
+++ b/src/app-utils/gnc-component-manager.h
@@ -104,7 +104,7 @@ typedef gboolean (*GNCComponentFindHandler) (gpointer
find_data,
*
* Return: TRUE if the callback did something
*/
-typedef gboolean (*GNCComponentHandler) (const char *class,
+typedef gboolean (*GNCComponentHandler) (const char *component_class,
gint component_id,
gpointer user_data,
gpointer iter_data);
diff --git a/src/app-utils/test/test-option-util.c
b/src/app-utils/test/test-option-util.c
index dc99f32..8fef4c0 100644
--- a/src/app-utils/test/test-option-util.c
+++ b/src/app-utils/test/test-option-util.c
@@ -41,7 +41,7 @@ typedef struct
/* Expose a mostly-private QofInstance function to load options into
* the Book.
*/
-extern KvpFrame *qof_instance_get_slots (QofInstance*);
+extern KvpFrame *qof_instance_get_slots (const QofInstance*);
static void
setup (Fixture *fixture, gconstpointer pData)
diff --git a/src/engine/gnc-commodity.c b/src/engine/gnc-commodity.c
index d5f6eb0..554cbf6 100644
--- a/src/engine/gnc-commodity.c
+++ b/src/engine/gnc-commodity.c
@@ -68,7 +68,7 @@ struct gnc_commodity_s
typedef struct CommodityPrivate
{
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *nmspace;
char * fullname;
char * mnemonic;
@@ -592,7 +592,7 @@ reset_unique_name(CommodityPrivate *priv)
gnc_commodity_namespace *ns;
g_free(priv->unique_name);
- ns = priv->namespace;
+ ns = priv->nmspace;
priv->unique_name = g_strdup_printf("%s::%s",
ns ? ns->name : "",
priv->mnemonic ? priv->mnemonic :
"");
@@ -608,7 +608,7 @@ gnc_commodity_init(gnc_commodity* com)
priv = GET_PRIVATE(com);
- priv->namespace = NULL;
+ priv->nmspace = NULL;
priv->fullname = CACHE_INSERT("");
priv->mnemonic = CACHE_INSERT("");
priv->cusip = CACHE_INSERT("");
@@ -654,7 +654,7 @@ gnc_commodity_get_property (GObject *object,
switch (prop_id)
{
case PROP_NAMESPACE:
- g_value_take_object(value, priv->namespace);
+ g_value_take_object(value, priv->nmspace);
break;
case PROP_FULL_NAME:
g_value_set_string(value, priv->fullname);
@@ -827,7 +827,7 @@ gnc_commodity_class_init(struct _GncCommodityClass*
klass)
gnc_commodity *
gnc_commodity_new(QofBook *book, const char * fullname,
- const char * namespace, const char * mnemonic,
+ const char * nmspace, const char * mnemonic,
const char * cusip, int fraction)
{
gnc_commodity * retval = g_object_new(GNC_TYPE_COMMODITY, NULL);
@@ -835,18 +835,18 @@ gnc_commodity_new(QofBook *book, const char *
fullname,
qof_instance_init_data (&retval->inst, GNC_ID_COMMODITY, book);
gnc_commodity_begin_edit(retval);
- if ( namespace != NULL )
+ if ( nmspace != NULL )
{
/* Prevent setting anything except template in namespace template. */
- if (g_strcmp0 (namespace, "template") == 0 &&
+ if (g_strcmp0 (nmspace, "template") == 0 &&
g_strcmp0 (mnemonic, "template") != 0)
{
PWARN("Converting commodity %s from namespace template to "
"namespace User", mnemonic);
- namespace = "User";
+ nmspace = "User";
}
- gnc_commodity_set_namespace(retval, namespace);
- if (gnc_commodity_namespace_is_iso(namespace))
+ gnc_commodity_set_namespace(retval, nmspace);
+ if (gnc_commodity_namespace_is_iso(nmspace))
{
gnc_commodity_set_quote_source(retval,
gnc_quote_source_lookup_by_internal("currency") );
@@ -889,7 +889,7 @@ commodity_free(gnc_commodity * cm)
CACHE_REMOVE (priv->cusip);
CACHE_REMOVE (priv->mnemonic);
CACHE_REMOVE (priv->quote_tz);
- priv->namespace = NULL;
+ priv->nmspace = NULL;
/* Set through accessor functions */
priv->quote_source = NULL;
@@ -933,7 +933,7 @@ gnc_commodity_copy(gnc_commodity * dest, const
gnc_commodity *src)
gnc_commodity_set_fullname (dest, src_priv->fullname);
gnc_commodity_set_mnemonic (dest, src_priv->mnemonic);
- dest_priv->namespace = src_priv->namespace;
+ dest_priv->nmspace = src_priv->nmspace;
gnc_commodity_set_fraction (dest, src_priv->fraction);
gnc_commodity_set_cusip (dest, src_priv->cusip);
gnc_commodity_set_quote_flag (dest, src_priv->quote_flag);
@@ -959,7 +959,7 @@ gnc_commodity_clone(const gnc_commodity *src, QofBook
*dest_book)
dest_priv->cusip = CACHE_INSERT(src_priv->cusip);
dest_priv->quote_tz = CACHE_INSERT(src_priv->quote_tz);
- dest_priv->namespace = src_priv->namespace;
+ dest_priv->nmspace = src_priv->nmspace;
dest_priv->fraction = src_priv->fraction;
dest_priv->quote_flag = src_priv->quote_flag;
@@ -1006,7 +1006,7 @@ const char *
gnc_commodity_get_namespace(const gnc_commodity * cm)
{
if (!cm) return NULL;
- return gnc_commodity_namespace_get_name(GET_PRIVATE(cm)->namespace);
+ return gnc_commodity_namespace_get_name(GET_PRIVATE(cm)->nmspace);
}
const char *
@@ -1016,20 +1016,20 @@ gnc_commodity_get_namespace_compat(const
gnc_commodity * cm)
if (!cm) return NULL;
priv = GET_PRIVATE(cm);
- if (!priv->namespace) return NULL;
- if (priv->namespace->iso4217)
+ if (!priv->nmspace) return NULL;
+ if (priv->nmspace->iso4217)
{
/* Data files are still written with ISO4217. */
return GNC_COMMODITY_NS_ISO;
}
- return gnc_commodity_namespace_get_name(priv->namespace);
+ return gnc_commodity_namespace_get_name(priv->nmspace);
}
gnc_commodity_namespace *
gnc_commodity_get_namespace_ds(const gnc_commodity * cm)
{
if (!cm) return NULL;
- return GET_PRIVATE(cm)->namespace;
+ return GET_PRIVATE(cm)->nmspace;
}
/********************************************************************
@@ -1216,7 +1216,7 @@ gnc_commodity_set_mnemonic(gnc_commodity * cm, const
char * mnemonic)
********************************************************************/
void
-gnc_commodity_set_namespace(gnc_commodity * cm, const char * namespace)
+gnc_commodity_set_namespace(gnc_commodity * cm, const char * nmspace)
{
QofBook *book;
gnc_commodity_table *table;
@@ -1227,12 +1227,12 @@ gnc_commodity_set_namespace(gnc_commodity * cm,
const char * namespace)
priv = GET_PRIVATE(cm);
book = qof_instance_get_book (&cm->inst);
table = gnc_commodity_table_get_table(book);
- nsp = gnc_commodity_table_add_namespace(table, namespace, book);
- if (priv->namespace == nsp)
+ nsp = gnc_commodity_table_add_namespace(table, nmspace, book);
+ if (priv->nmspace == nsp)
return;
gnc_commodity_begin_edit(cm);
- priv->namespace = nsp;
+ priv->nmspace = nsp;
if (nsp->iso4217)
priv->quote_source =
gnc_quote_source_lookup_by_internal("currency");
mark_commodity_dirty(cm);
@@ -1560,7 +1560,7 @@ gnc_commodity_equiv(const gnc_commodity * a, const
gnc_commodity * b)
priv_a = GET_PRIVATE(a);
priv_b = GET_PRIVATE(b);
- if (priv_a->namespace != priv_b->namespace) return FALSE;
+ if (priv_a->nmspace != priv_b->nmspace) return FALSE;
if (g_strcmp0(priv_a->mnemonic, priv_b->mnemonic) != 0) return FALSE;
return TRUE;
}
@@ -1584,13 +1584,13 @@ gnc_commodity_equal(const gnc_commodity * a, const
gnc_commodity * b)
priv_b = GET_PRIVATE(b);
same_book = qof_instance_get_book(QOF_INSTANCE(a)) ==
qof_instance_get_book(QOF_INSTANCE(b));
- if ((same_book && priv_a->namespace != priv_b->namespace)
- || (!same_book && g_strcmp0(
gnc_commodity_namespace_get_name(priv_a->namespace),
-
gnc_commodity_namespace_get_name(priv_b->namespace)) != 0))
+ if ((same_book && priv_a->nmspace != priv_b->nmspace)
+ || (!same_book && g_strcmp0(
gnc_commodity_namespace_get_name(priv_a->nmspace),
+
gnc_commodity_namespace_get_name(priv_b->nmspace)) != 0))
{
DEBUG ("namespaces differ: %p(%s) vs %p(%s)",
- priv_a->namespace,
gnc_commodity_namespace_get_name(priv_a->namespace),
- priv_b->namespace,
gnc_commodity_namespace_get_name(priv_b->namespace));
+ priv_a->nmspace,
gnc_commodity_namespace_get_name(priv_a->nmspace),
+ priv_b->nmspace,
gnc_commodity_namespace_get_name(priv_b->nmspace));
return FALSE;
}
@@ -1650,27 +1650,27 @@ gnc_commodity_namespace_get_name (const
gnc_commodity_namespace *ns)
}
GList *
-gnc_commodity_namespace_get_commodity_list(const gnc_commodity_namespace
*namespace)
+gnc_commodity_namespace_get_commodity_list(const gnc_commodity_namespace
*nmspace)
{
- if (!namespace)
+ if (!nmspace)
return NULL;
- return namespace->cm_list;
+ return nmspace->cm_list;
}
gboolean
-gnc_commodity_namespace_is_iso(const char *namespace)
+gnc_commodity_namespace_is_iso(const char *nmspace)
{
- return ((g_strcmp0(namespace, GNC_COMMODITY_NS_ISO) == 0) ||
- (g_strcmp0(namespace, GNC_COMMODITY_NS_CURRENCY) == 0));
+ return ((g_strcmp0(nmspace, GNC_COMMODITY_NS_ISO) == 0) ||
+ (g_strcmp0(nmspace, GNC_COMMODITY_NS_CURRENCY) == 0));
}
static const gchar *
-gnc_commodity_table_map_namespace(const char * namespace)
+gnc_commodity_table_map_namespace(const char * nmspace)
{
- if (g_strcmp0(namespace, GNC_COMMODITY_NS_ISO) == 0)
+ if (g_strcmp0(nmspace, GNC_COMMODITY_NS_ISO) == 0)
return GNC_COMMODITY_NS_CURRENCY;
- return namespace;
+ return nmspace;
}
/********************************************************************
@@ -1760,14 +1760,14 @@ gnc_commodity_table_get_size(const
gnc_commodity_table* tbl)
gnc_commodity *
gnc_commodity_table_lookup(const gnc_commodity_table * table,
- const char * namespace, const char * mnemonic)
+ const char * nmspace, const char * mnemonic)
{
gnc_commodity_namespace * nsp = NULL;
unsigned int i;
- if (!table || !namespace || !mnemonic) return NULL;
+ if (!table || !nmspace || !mnemonic) return NULL;
- nsp = gnc_commodity_table_find_namespace(table, namespace);
+ nsp = gnc_commodity_table_find_namespace(table, nmspace);
if (nsp)
{
@@ -1803,26 +1803,26 @@ gnc_commodity *
gnc_commodity_table_lookup_unique(const gnc_commodity_table *table,
const char * unique_name)
{
- char *namespace;
+ char *nmspace;
char *mnemonic;
gnc_commodity *commodity;
if (!table || !unique_name) return NULL;
- namespace = g_strdup (unique_name);
- mnemonic = strstr (namespace, "::");
+ nmspace = g_strdup (unique_name);
+ mnemonic = strstr (nmspace, "::");
if (!mnemonic)
{
- g_free (namespace);
+ g_free (nmspace);
return NULL;
}
*mnemonic = '\0';
mnemonic += 2;
- commodity = gnc_commodity_table_lookup (table, namespace, mnemonic);
+ commodity = gnc_commodity_table_lookup (table, nmspace, mnemonic);
- g_free (namespace);
+ g_free (nmspace);
return commodity;
}
@@ -1834,7 +1834,7 @@ gnc_commodity_table_lookup_unique(const
gnc_commodity_table *table,
gnc_commodity *
gnc_commodity_table_find_full(const gnc_commodity_table * table,
- const char * namespace,
+ const char * nmspace,
const char * fullname)
{
gnc_commodity * retval = NULL;
@@ -1844,7 +1844,7 @@ gnc_commodity_table_find_full(const
gnc_commodity_table * table,
if (!fullname || (fullname[0] == '\0'))
return NULL;
- all = gnc_commodity_table_get_commodities(table, namespace);
+ all = gnc_commodity_table_get_commodities(table, nmspace);
for (iterator = all; iterator; iterator = iterator->next)
{
@@ -1885,7 +1885,7 @@ gnc_commodity_table_insert(gnc_commodity_table *
table,
ENTER ("(table=%p, comm=%p) %s %s", table, comm,
(priv->mnemonic == NULL ? "(null)" : priv->mnemonic),
(priv->fullname == NULL ? "(null)" : priv->fullname));
- ns_name = gnc_commodity_namespace_get_name(priv->namespace);
+ ns_name = gnc_commodity_namespace_get_name(priv->nmspace);
c = gnc_commodity_table_lookup (table, ns_name, priv->mnemonic);
if (c)
@@ -1898,7 +1898,7 @@ gnc_commodity_table_insert(gnc_commodity_table *
table,
/* Backward compatability support for currencies that have
* recently changed. */
- if (priv->namespace->iso4217)
+ if (priv->nmspace->iso4217)
{
guint i;
for (i = 0; i < GNC_NEW_ISO_CODES; i++)
@@ -1960,7 +1960,7 @@ gnc_commodity_table_remove(gnc_commodity_table *
table,
if (!comm) return;
priv = GET_PRIVATE(comm);
- ns_name = gnc_commodity_namespace_get_name(priv->namespace);
+ ns_name = gnc_commodity_namespace_get_name(priv->nmspace);
c = gnc_commodity_table_lookup (table, ns_name, priv->mnemonic);
if (c != comm) return;
@@ -1981,16 +1981,16 @@ gnc_commodity_table_remove(gnc_commodity_table *
table,
int
gnc_commodity_table_has_namespace(const gnc_commodity_table * table,
- const char * namespace)
+ const char * nmspace)
{
gnc_commodity_namespace * nsp = NULL;
- if (!table || !namespace)
+ if (!table || !nmspace)
{
return 0;
}
- nsp = gnc_commodity_table_find_namespace(table, namespace);
+ nsp = gnc_commodity_table_find_namespace(table, nmspace);
if (nsp)
{
return 1;
@@ -2068,8 +2068,8 @@ gnc_commodity_is_iso(const gnc_commodity * cm)
if (!cm) return FALSE;
priv = GET_PRIVATE(cm);
- if ( !priv->namespace) return FALSE;
- return priv->namespace->iso4217;
+ if ( !priv->nmspace) return FALSE;
+ return priv->nmspace->iso4217;
}
gboolean
@@ -2078,7 +2078,7 @@ gnc_commodity_is_currency(const gnc_commodity *cm)
const char *ns_name;
if (!cm) return FALSE;
- ns_name = gnc_commodity_namespace_get_name(GET_PRIVATE(cm)->namespace);
+ ns_name = gnc_commodity_namespace_get_name(GET_PRIVATE(cm)->nmspace);
return (!g_strcmp0(ns_name, GNC_COMMODITY_NS_LEGACY) ||
!g_strcmp0(ns_name, GNC_COMMODITY_NS_CURRENCY));
}
@@ -2090,14 +2090,14 @@ gnc_commodity_is_currency(const gnc_commodity *cm)
CommodityList *
gnc_commodity_table_get_commodities(const gnc_commodity_table * table,
- const char * namespace)
+ const char * nmspace)
{
gnc_commodity_namespace * ns = NULL;
if (!table)
return NULL;
- ns = gnc_commodity_table_find_namespace(table, namespace);
+ ns = gnc_commodity_table_find_namespace(table, nmspace);
if (!ns)
return NULL;
@@ -2139,7 +2139,7 @@ CommodityList *
gnc_commodity_table_get_quotable_commodities(const gnc_commodity_table *
table)
{
gnc_commodity_namespace * ns = NULL;
- const char *namespace;
+ const char *nmspace;
GList * nslist, * tmp;
GList * l = NULL;
regex_t pattern;
@@ -2160,11 +2160,11 @@ gnc_commodity_table_get_quotable_commodities(const
gnc_commodity_table * table)
nslist = gnc_commodity_table_get_namespaces(table);
for (tmp = nslist; tmp; tmp = tmp->next)
{
- namespace = tmp->data;
- if (regexec(&pattern, namespace, 0, NULL, 0) == 0)
+ nmspace = tmp->data;
+ if (regexec(&pattern, nmspace, 0, NULL, 0) == 0)
{
- DEBUG("Running list of %s commodities", namespace);
- ns = gnc_commodity_table_find_namespace(table, namespace);
+ DEBUG("Running list of %s commodities", nmspace);
+ ns = gnc_commodity_table_find_namespace(table, nmspace);
if (ns)
{
g_hash_table_foreach(ns->cm_table,
&get_quotables_helper1, (gpointer) &l);
@@ -2208,21 +2208,21 @@ gnc_commodity_namespace_finalize_real(GObject* nsp)
gnc_commodity_namespace *
gnc_commodity_table_add_namespace(gnc_commodity_table * table,
- const char * namespace,
+ const char * nmspace,
QofBook *book)
{
gnc_commodity_namespace * ns = NULL;
if (!table) return NULL;
- namespace = gnc_commodity_table_map_namespace(namespace);
- ns = gnc_commodity_table_find_namespace(table, namespace);
+ nmspace = gnc_commodity_table_map_namespace(nmspace);
+ ns = gnc_commodity_table_find_namespace(table, nmspace);
if (!ns)
{
ns = g_object_new(GNC_TYPE_COMMODITY_NAMESPACE, NULL);
ns->cm_table = g_hash_table_new(g_str_hash, g_str_equal);
- ns->name = CACHE_INSERT((gpointer)namespace);
- ns->iso4217 = gnc_commodity_namespace_is_iso(namespace);
+ ns->name = CACHE_INSERT((gpointer)nmspace);
+ ns->iso4217 = gnc_commodity_namespace_is_iso(nmspace);
qof_instance_init_data (&ns->inst, GNC_ID_COMMODITY_NAMESPACE,
book);
qof_event_gen (&ns->inst, QOF_EVENT_CREATE, NULL);
@@ -2238,13 +2238,13 @@
gnc_commodity_table_add_namespace(gnc_commodity_table * table,
gnc_commodity_namespace *
gnc_commodity_table_find_namespace(const gnc_commodity_table * table,
- const char * namespace)
+ const char * nmspace)
{
- if (!table || !namespace)
+ if (!table || !nmspace)
return NULL;
- namespace = gnc_commodity_table_map_namespace(namespace);
- return g_hash_table_lookup(table->ns_table, (gpointer)namespace);
+ nmspace = gnc_commodity_table_map_namespace(nmspace);
+ return g_hash_table_lookup(table->ns_table, (gpointer)nmspace);
}
@@ -2273,18 +2273,18 @@ ns_helper(gpointer key, gpointer value, gpointer
user_data)
void
gnc_commodity_table_delete_namespace(gnc_commodity_table * table,
- const char * namespace)
+ const char * nmspace)
{
gnc_commodity_namespace * ns;
if (!table) return;
- ns = gnc_commodity_table_find_namespace(table, namespace);
+ ns = gnc_commodity_table_find_namespace(table, nmspace);
if (!ns)
return;
qof_event_gen (&ns->inst, QOF_EVENT_REMOVE, NULL);
- g_hash_table_remove(table->ns_table, namespace);
+ g_hash_table_remove(table->ns_table, nmspace);
table->ns_list = g_list_remove(table->ns_list, ns);
g_list_free(ns->cm_list);
diff --git a/src/engine/test-core/test-engine-stuff.c
b/src/engine/test-core/test-engine-stuff.c
index 77086f0..53287de 100644
--- a/src/engine/test-core/test-engine-stuff.c
+++ b/src/engine/test-core/test-engine-stuff.c
@@ -517,11 +517,11 @@ get_random_commodity_from_table (gnc_commodity_table
*table)
do
{
GList *commodities;
- char *namespace;
+ char *nmspace;
- namespace = get_random_list_element (namespaces);
+ nmspace = get_random_list_element (namespaces);
- commodities = gnc_commodity_table_get_commodities (table,
namespace);
+ commodities = gnc_commodity_table_get_commodities (table, nmspace);
if (!commodities)
continue;
diff --git a/src/engine/test/utest-Account.c
b/src/engine/test/utest-Account.c
index f96abf3..33dd8dc 100644
--- a/src/engine/test/utest-Account.c
+++ b/src/engine/test/utest-Account.c
@@ -2127,14 +2127,14 @@ test_xaccAccountType_Stuff (void)
TestErrorStruct check3 = { loglevel, logdomain, msg3, 0 };
Account *acc = g_object_new (GNC_TYPE_ACCOUNT, NULL);
- for (type = ACCT_TYPE_NONE; type < ACCT_TYPE_LAST; type++)
+ for (type = ACCT_TYPE_NONE; type < ACCT_TYPE_LAST; type = type + 1)
{
- const gchar *typename = xaccAccountTypeEnumAsString (type);
+ const gchar *typenm = xaccAccountTypeEnumAsString (type);
const gchar *typestr;
gchar *typestr_uc;
- g_assert (typename);
- g_assert_cmpint (xaccAccountStringToEnum (typename), == , type);
+ g_assert (typenm);
+ g_assert_cmpint (xaccAccountStringToEnum (typenm), == , type);
if (type < 0 || type >= NUM_ACCOUNT_TYPES)
continue;
@@ -2142,24 +2142,24 @@ test_xaccAccountType_Stuff (void)
typestr_uc = g_ascii_strup (typestr, strlen (typestr));
if (type == ACCT_TYPE_PAYABLE || type == ACCT_TYPE_RECEIVABLE)
{
- gchar *cmpstr = g_strconcat ("A/", typename, NULL);
+ gchar *cmpstr = g_strconcat ("A/", typenm, NULL);
g_assert_cmpstr (typestr_uc, == , cmpstr);
g_free (cmpstr);
}
else if (type == ACCT_TYPE_CREDIT)
{
- gchar *cmpstr = g_strconcat (typename, " CARD", NULL);
+ gchar *cmpstr = g_strconcat (typenm, " CARD", NULL);
g_assert_cmpstr (typestr_uc, == , cmpstr);
g_free (cmpstr);
}
else if (type == ACCT_TYPE_MUTUAL)
{
- gchar *cmpstr = g_strconcat (typename, " FUND", NULL);
+ gchar *cmpstr = g_strconcat (typenm, " FUND", NULL);
g_assert_cmpstr (typestr_uc, == , cmpstr);
g_free (cmpstr);
}
else
- g_assert_cmpstr (typestr_uc, == , typename);
+ g_assert_cmpstr (typestr_uc, == , typenm);
g_free (typestr_uc);
qof_instance_increase_editlevel (acc);
@@ -2232,7 +2232,7 @@ test_xaccAccountType_Compatibility (void)
TestErrorStruct check2 = { loglevel, logdomain, msg2, 0 };
gint loghandler;
- for (type = ACCT_TYPE_BANK; type < NUM_ACCOUNT_TYPES; type++)
+ for (type = ACCT_TYPE_BANK; type < NUM_ACCOUNT_TYPES; type = type + 1)
{
GNCAccountType child;
if (type == ACCT_TYPE_ROOT)
@@ -2259,7 +2259,7 @@ test_xaccAccountType_Compatibility (void)
g_assert_cmpint (compat, == , equity_compat);
else if (type == ACCT_TYPE_TRADING)
g_assert_cmpint (compat, == , trading_compat);
- for (child = ACCT_TYPE_NONE; child < ACCT_TYPE_LAST; child++)
+ for (child = ACCT_TYPE_NONE; child < ACCT_TYPE_LAST; child = child
+ 1)
if (1 << child & compat)
g_assert (xaccAccountTypesCompatible (type, child));
else
@@ -2269,7 +2269,7 @@ test_xaccAccountType_Compatibility (void)
loghandler = g_log_set_handler (logdomain, loglevel,
(GLogFunc)test_null_handler, &check2);
g_test_log_set_fatal_handler ((GTestLogFatalFunc)test_checked_handler,
&check2);
- compat = xaccParentAccountTypesCompatibleWith (++type);
+ compat = xaccParentAccountTypesCompatibleWith (type = type + 1);
g_log_remove_handler (logdomain, loghandler);
g_assert_cmpint (compat, == , 0);
g_assert_cmpint (check2.hits, ==, 1);
diff --git a/src/engine/test/utest-Transaction.c
b/src/engine/test/utest-Transaction.c
index c2a963f..07c9ec5 100644
--- a/src/engine/test/utest-Transaction.c
+++ b/src/engine/test/utest-Transaction.c
@@ -577,7 +577,7 @@ test_dupe_trans (Fixture *fixture, gconstpointer pData)
{
Timespec posted = gnc_dmy2timespec (12, 7, 2011);
Timespec entered = gnc_dmy2timespec (14, 7, 2011);
- Transaction *new = NULL, *old = fixture->txn;
+ Transaction *newtx = NULL, *old = fixture->txn;
QofBook *old_book = qof_instance_get_book (QOF_INSTANCE (old));
GList *newnode, *oldnode = old->splits;
@@ -586,11 +586,11 @@ test_dupe_trans (Fixture *fixture, gconstpointer
pData)
kvp_frame_set_string (old->inst.kvp_data, "/foo/bar/baz",
"The Great Waldo Pepper");
- new = fixture->func->dupe_trans (old);
+ newtx = fixture->func->dupe_trans (old);
- g_assert_cmpstr (new->num, ==, old->num);
- g_assert_cmpstr (new->description, ==, old->description);
- for (newnode = new->splits; newnode && oldnode;
+ g_assert_cmpstr (newtx->num, ==, old->num);
+ g_assert_cmpstr (newtx->description, ==, old->description);
+ for (newnode = newtx->splits; newnode && oldnode;
newnode = g_list_next (newnode))
{
g_assert (xaccSplitEqual (newnode->data, oldnode->data,
@@ -599,19 +599,19 @@ test_dupe_trans (Fixture *fixture, gconstpointer
pData)
}
g_assert (newnode == NULL);
g_assert (oldnode == NULL);
- g_assert (timespec_equal (&(new->date_posted), &posted));
- g_assert (timespec_equal (&(new->date_entered), &entered));
- g_assert (qof_instance_version_cmp (QOF_INSTANCE (new),
+ g_assert (timespec_equal (&(newtx->date_posted), &posted));
+ g_assert (timespec_equal (&(newtx->date_entered), &entered));
+ g_assert (qof_instance_version_cmp (QOF_INSTANCE (newtx),
QOF_INSTANCE (old)) == 0);
- g_assert (new->orig == NULL);
- g_assert (new->common_currency == fixture->curr);
- g_assert (new->inst.e_type == NULL);
- g_assert (guid_equal (qof_instance_get_guid (QOF_INSTANCE (new)),
+ g_assert (newtx->orig == NULL);
+ g_assert (newtx->common_currency == fixture->curr);
+ g_assert (newtx->inst.e_type == NULL);
+ g_assert (guid_equal (qof_instance_get_guid (QOF_INSTANCE (newtx)),
guid_null ()));
- g_assert (qof_instance_get_book (QOF_INSTANCE (new)) == old_book);
- g_assert (kvp_frame_compare (old->inst.kvp_data, new->inst.kvp_data)
== 0);
+ g_assert (qof_instance_get_book (QOF_INSTANCE (newtx)) == old_book);
+ g_assert (kvp_frame_compare (old->inst.kvp_data, newtx->inst.kvp_data)
== 0);
- test_destroy (new);
+ test_destroy (newtx);
}
/* xaccTransClone
Transaction *
@@ -622,26 +622,26 @@ test_xaccTransClone (Fixture *fixture, gconstpointer
pData)
{
Timespec posted = gnc_dmy2timespec (12, 7, 2011);
Timespec entered = gnc_dmy2timespec (14, 7, 2011);
- Transaction *new = NULL, *old = fixture->txn;
+ Transaction *newtx = NULL, *old = fixture->txn;
QofBook *old_book = qof_instance_get_book (QOF_INSTANCE (old));
GList *newnode, *oldnode;
int foo, bar;
old->date_posted = posted;
old->date_entered = entered;
- new = xaccTransClone (old);
+ newtx = xaccTransClone (old);
- g_assert_cmpstr (new->num, ==, old->num);
- g_assert_cmpstr (new->description, ==, old->description);
+ g_assert_cmpstr (newtx->num, ==, old->num);
+ g_assert_cmpstr (newtx->description, ==, old->description);
g_assert_cmpint (xaccTransCountSplits (old), ==,
- xaccTransCountSplits (new));
+ xaccTransCountSplits (newtx));
- xaccTransSortSplits (new);
+ xaccTransSortSplits (newtx);
xaccTransSortSplits (old);
oldnode = old->splits;
- for (newnode = new->splits; newnode && oldnode;
+ for (newnode = newtx->splits; newnode && oldnode;
newnode = g_list_next (newnode))
{
g_assert (xaccSplitEqual (newnode->data, oldnode->data,
@@ -650,19 +650,19 @@ test_xaccTransClone (Fixture *fixture, gconstpointer
pData)
}
g_assert (newnode == NULL);
g_assert (oldnode == NULL);
- g_assert (timespec_equal (&(new->date_posted), &posted));
- g_assert (timespec_equal (&(new->date_entered), &entered));
- g_assert (qof_instance_version_cmp (QOF_INSTANCE (new),
+ g_assert (timespec_equal (&(newtx->date_posted), &posted));
+ g_assert (timespec_equal (&(newtx->date_entered), &entered));
+ g_assert (qof_instance_version_cmp (QOF_INSTANCE (newtx),
QOF_INSTANCE (old)) == 0);
- g_assert_cmpint (qof_instance_get_version_check (new), ==,
+ g_assert_cmpint (qof_instance_get_version_check (newtx), ==,
qof_instance_get_version_check (old));
- g_assert (new->orig == NULL);
- g_assert (new->common_currency == fixture->curr);
+ g_assert (newtx->orig == NULL);
+ g_assert (newtx->common_currency == fixture->curr);
- g_assert (qof_instance_get_book (QOF_INSTANCE (new)) == old_book);
- g_assert (kvp_frame_compare (old->inst.kvp_data, new->inst.kvp_data)
== 0);
+ g_assert (qof_instance_get_book (QOF_INSTANCE (newtx)) == old_book);
+ g_assert (kvp_frame_compare (old->inst.kvp_data, newtx->inst.kvp_data)
== 0);
- test_destroy (new);
+ test_destroy (newtx);
}
/* xaccTransCopyOnto
diff --git a/src/gnome-utils/assistant-xml-encoding.c
b/src/gnome-utils/assistant-xml-encoding.c
index 7d03042..558e2e5 100644
--- a/src/gnome-utils/assistant-xml-encoding.c
+++ b/src/gnome-utils/assistant-xml-encoding.c
@@ -408,14 +408,14 @@ conv_free (conv_type *conv)
static conv_type *
conv_copy (const conv_type *conv)
{
- conv_type *new = NULL;
+ conv_type *new_type = NULL;
if (conv)
{
- new = g_new(conv_type, 1);
- new->encoding = conv->encoding;
- new->utf8_string = g_strdup (conv->utf8_string);
+ new_type = g_new(conv_type, 1);
+ new_type->encoding = conv->encoding;
+ new_type->utf8_string = g_strdup (conv->utf8_string);
}
- return new;
+ return new_type;
}
static gint
diff --git a/src/gnome-utils/dialog-commodity.c
b/src/gnome-utils/dialog-commodity.c
index 86f01e0..6aed72a 100644
--- a/src/gnome-utils/dialog-commodity.c
+++ b/src/gnome-utils/dialog-commodity.c
@@ -249,7 +249,7 @@ gnc_ui_select_commodity_create(const gnc_commodity *
orig_sel,
SelectCommodityWindow * retval = g_new0(SelectCommodityWindow, 1);
GtkBuilder *builder;
const char *title, *text;
- gchar *namespace;
+ gchar *name_space;
GtkWidget *button, *label;
builder = gtk_builder_new();
@@ -303,13 +303,13 @@ gnc_ui_select_commodity_create(const gnc_commodity *
orig_sel,
gnc_ui_update_namespace_picker(retval->namespace_combo,
gnc_commodity_get_namespace(orig_sel),
mode);
- namespace = gnc_ui_namespace_picker_ns(retval->namespace_combo);
- gnc_ui_update_commodity_picker(retval->commodity_combo, namespace,
+ name_space = gnc_ui_namespace_picker_ns(retval->namespace_combo);
+ gnc_ui_update_commodity_picker(retval->commodity_combo, name_space,
gnc_commodity_get_printname(orig_sel));
g_object_unref(G_OBJECT(builder));
- g_free(namespace);
+ g_free(name_space);
return retval;
}
@@ -334,10 +334,10 @@ gnc_ui_select_commodity_new_cb(GtkButton * button,
{
SelectCommodityWindow * w = user_data;
- gchar * namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
+ gchar * name_space = gnc_ui_namespace_picker_ns (w->namespace_combo);
const gnc_commodity * new_commodity =
- gnc_ui_new_commodity_modal_full(namespace,
+ gnc_ui_new_commodity_modal_full(name_space,
w->dialog,
w->default_cusip,
w->default_fullname,
@@ -353,7 +353,7 @@ gnc_ui_select_commodity_new_cb(GtkButton * button,
gnc_commodity_get_namespace(new_commodity),
gnc_commodity_get_printname(new_commodity));
}
- g_free(namespace);
+ g_free(name_space);
}
@@ -377,18 +377,18 @@ gnc_ui_select_commodity_changed_cb (GtkComboBox *cbwe,
gpointer user_data)
{
SelectCommodityWindow * w = user_data;
- gchar *namespace;
+ gchar *name_space;
const gchar *fullname;
gboolean ok;
ENTER("cbwe=%p, user_data=%p", cbwe, user_data);
- namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
+ name_space = gnc_ui_namespace_picker_ns (w->namespace_combo);
fullname = gtk_entry_get_text(GTK_ENTRY (gtk_bin_get_child(GTK_BIN
(GTK_COMBO_BOX(w->commodity_combo)))));
- DEBUG("namespace=%s, name=%s", namespace, fullname);
+ DEBUG("namespace=%s, name=%s", name_space, fullname);
w->selection =
gnc_commodity_table_find_full(gnc_get_current_commodities(),
- namespace, fullname);
- g_free(namespace);
+ name_space, fullname);
+ g_free(name_space);
ok = (w->selection != NULL);
gtk_widget_set_sensitive(w->ok_button, ok);
@@ -418,13 +418,13 @@ gnc_ui_select_commodity_namespace_changed_cb
(GtkComboBox *cbwe,
gpointer user_data)
{
SelectCommodityWindow * w = user_data;
- gchar *namespace;
+ gchar *name_space;
ENTER("cbwe=%p, user_data=%p", cbwe, user_data);
- namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
- DEBUG("namespace=%s", namespace);
- gnc_ui_update_commodity_picker(w->commodity_combo, namespace, NULL);
- g_free(namespace);
+ name_space = gnc_ui_namespace_picker_ns (w->namespace_combo);
+ DEBUG("name_space=%s", name_space);
+ gnc_ui_update_commodity_picker(w->commodity_combo, name_space, NULL);
+ g_free(name_space);
LEAVE(" ");
}
@@ -445,7 +445,7 @@ collate(gconstpointer a, gconstpointer b)
void
gnc_ui_update_commodity_picker (GtkWidget *cbwe,
- const gchar * namespace,
+ const gchar * name_space,
const gchar * init_string)
{
GList * commodities;
@@ -460,7 +460,7 @@ gnc_ui_update_commodity_picker (GtkWidget *cbwe,
gchar *name;
g_return_if_fail(GTK_IS_COMBO_BOX(cbwe));
- g_return_if_fail(namespace);
+ g_return_if_fail(name_space);
/* Erase the old entries */
combo_box = GTK_COMBO_BOX(cbwe);
@@ -474,7 +474,7 @@ gnc_ui_update_commodity_picker (GtkWidget *cbwe,
gtk_combo_box_set_active(combo_box, -1);
table = gnc_commodity_table_get_table (gnc_get_current_book ());
- commodities = gnc_commodity_table_get_commodities(table, namespace);
+ commodities = gnc_commodity_table_get_commodities(table, name_space);
for (iterator = commodities; iterator; iterator = iterator->next)
{
commodity_items =
@@ -710,19 +710,19 @@ gnc_ui_update_namespace_picker (GtkWidget *cbwe,
gchar *
gnc_ui_namespace_picker_ns (GtkWidget *cbwe)
{
- const gchar *namespace;
+ const gchar *name_space;
g_return_val_if_fail(GTK_IS_COMBO_BOX (cbwe), NULL);
- namespace = gtk_entry_get_text( GTK_ENTRY( gtk_bin_get_child( GTK_BIN(
GTK_COMBO_BOX(cbwe)))));
+ name_space = gtk_entry_get_text( GTK_ENTRY( gtk_bin_get_child(
GTK_BIN( GTK_COMBO_BOX(cbwe)))));
- if (g_strcmp0 (namespace, GNC_COMMODITY_NS_ISO) == 0)
+ if (g_strcmp0 (name_space, GNC_COMMODITY_NS_ISO) == 0)
{
/* In case the user types in ISO4217, map it to CURRENCY. */
return g_strdup(GNC_COMMODITY_NS_CURRENCY);
}
else
- return g_strdup(namespace);
+ return g_strdup(name_space);
}
@@ -765,7 +765,7 @@ void
gnc_ui_commodity_changed_cb(GtkWidget * dummy, gpointer user_data)
{
CommodityWindow * w = user_data;
- gchar *namespace;
+ gchar *name_space;
const char * fullname;
const char * mnemonic;
gboolean ok;
@@ -773,13 +773,13 @@ gnc_ui_commodity_changed_cb(GtkWidget * dummy,
gpointer user_data)
ENTER("widget=%p, user_data=%p", dummy, user_data);
if (!w->is_currency)
{
- namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
+ name_space = gnc_ui_namespace_picker_ns (w->namespace_combo);
fullname = gtk_entry_get_text(GTK_ENTRY(w->fullname_entry));
mnemonic = gtk_entry_get_text(GTK_ENTRY(w->mnemonic_entry));
- DEBUG("namespace=%s, name=%s, mnemonic=%s", namespace, fullname,
mnemonic);
- ok = (fullname && namespace && mnemonic &&
- fullname[0] && namespace[0] && mnemonic[0]);
- g_free(namespace);
+ DEBUG("namespace=%s, name=%s, mnemonic=%s", name_space, fullname,
mnemonic);
+ ok = (fullname && name_space && mnemonic &&
+ fullname[0] && name_space[0] && mnemonic[0]);
+ g_free(name_space);
}
else
{
@@ -1137,7 +1137,7 @@ gnc_ui_commodity_update_quote_info(CommodityWindow
*win,
static gnc_commodity *
gnc_ui_common_commodity_modal(gnc_commodity *commodity,
GtkWidget * parent,
- const char * namespace,
+ const char * name_space,
const char * cusip,
const char * fullname,
const char * mnemonic,
@@ -1154,7 +1154,7 @@ gnc_ui_common_commodity_modal(gnc_commodity
*commodity,
/* If a commodity was provided, copy out the existing info */
if (commodity)
{
- namespace = gnc_commodity_get_namespace (commodity);
+ name_space = gnc_commodity_get_namespace (commodity);
fullname = gnc_commodity_get_fullname (commodity);
mnemonic = gnc_commodity_get_mnemonic (commodity);
user_symbol = gnc_commodity_get_nice_symbol (commodity);
@@ -1164,13 +1164,13 @@ gnc_ui_common_commodity_modal(gnc_commodity
*commodity,
else
{
/* Not allowed to create new currencies */
- if (gnc_commodity_namespace_is_iso(namespace))
+ if (gnc_commodity_namespace_is_iso(name_space))
{
- namespace = NULL;
+ name_space = NULL;
}
}
- win = gnc_ui_build_commodity_dialog(namespace, parent, fullname,
+ win = gnc_ui_build_commodity_dialog(name_space, parent, fullname,
mnemonic, user_symbol, cusip,
fraction, (commodity != NULL));
@@ -1217,7 +1217,7 @@ gnc_ui_common_commodity_modal(gnc_commodity
*commodity,
* Create and run the new/edit commodity dialog. *
********************************************************/
gnc_commodity *
-gnc_ui_new_commodity_modal_full(const char * namespace,
+gnc_ui_new_commodity_modal_full(const char * name_space,
GtkWidget * parent,
const char * cusip,
const char * fullname,
@@ -1228,7 +1228,7 @@ gnc_ui_new_commodity_modal_full(const char *
namespace,
gnc_commodity *result;
ENTER(" ");
- result = gnc_ui_common_commodity_modal(NULL, parent, namespace, cusip,
+ result = gnc_ui_common_commodity_modal(NULL, parent, name_space, cusip,
fullname, mnemonic, user_symbol,
10000);
LEAVE(" ");
@@ -1284,7 +1284,7 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow * w)
gnc_quote_source *source;
QuoteSourceType type;
const char * fullname =
gtk_entry_get_text(GTK_ENTRY(w->fullname_entry));
- gchar *namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
+ gchar *name_space = gnc_ui_namespace_picker_ns (w->namespace_combo);
const char * mnemonic =
gtk_entry_get_text(GTK_ENTRY(w->mnemonic_entry));
const char * user_symbol =
gtk_entry_get_text(GTK_ENTRY(w->user_symbol_entry));
const char * code = gtk_entry_get_text(GTK_ENTRY(w->code_entry));
@@ -1297,7 +1297,7 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow * w)
ENTER(" ");
/* Special case currencies */
- if (gnc_commodity_namespace_is_iso (namespace))
+ if (gnc_commodity_namespace_is_iso (name_space))
{
if (w->edit_commodity)
{
@@ -1329,7 +1329,7 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow * w)
/* Don't allow user to create commodities in namespace
* "template". That's reserved for scheduled transaction use.
*/
- if (g_utf8_collate(namespace, "template") == 0)
+ if (g_utf8_collate(name_space, "template") == 0)
{
gnc_warning_dialog (w->dialog,
_("%s is a reserved commodity type."
@@ -1338,23 +1338,23 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow *
w)
}
if (fullname && fullname[0] &&
- namespace && namespace[0] &&
+ name_space && name_space[0] &&
mnemonic && mnemonic[0])
{
c = gnc_commodity_table_lookup (gnc_get_current_commodities(),
- namespace, mnemonic);
+ name_space, mnemonic);
if ((!w->edit_commodity && c) ||
(w->edit_commodity && c && (c != w->edit_commodity)))
{
gnc_warning_dialog (w->dialog, "%s", _("That commodity
already exists."));
- g_free(namespace);
+ g_free(name_space);
return FALSE;
}
if (!w->edit_commodity)
{
- c = gnc_commodity_new(book, fullname, namespace, mnemonic,
code, fraction);
+ c = gnc_commodity_new(book, fullname, name_space, mnemonic,
code, fraction);
w->edit_commodity = c;
gnc_commodity_begin_edit(c);
}
@@ -1367,7 +1367,7 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow * w)
gnc_commodity_set_fullname (c, fullname);
gnc_commodity_set_mnemonic (c, mnemonic);
- gnc_commodity_set_namespace (c, namespace);
+ gnc_commodity_set_namespace (c, name_space);
gnc_commodity_set_cusip (c, code);
gnc_commodity_set_fraction (c, fraction);
}
@@ -1375,7 +1375,7 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow * w)
gnc_commodity_user_set_quote_flag (c, gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON
(w->get_quote_check)));
- for (type = SOURCE_SINGLE; type < SOURCE_MAX; type++)
+ for (type = SOURCE_SINGLE; type < SOURCE_MAX; type=type+1)
{
if
(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w->source_button[type])))
break;
@@ -1398,10 +1398,10 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow *
w)
_("You must enter a non-empty \"Full name\", "
"\"Symbol/abbreviation\", "
"and \"Type\" for the commodity."));
- g_free(namespace);
+ g_free(name_space);
return FALSE;
}
- g_free(namespace);
+ g_free(name_space);
LEAVE(" ");
return TRUE;
}
diff --git a/src/gnome-utils/dialog-commodity.h
b/src/gnome-utils/dialog-commodity.h
index 3fab415..a1d4c00 100644
--- a/src/gnome-utils/dialog-commodity.h
+++ b/src/gnome-utils/dialog-commodity.h
@@ -167,7 +167,7 @@ gnc_ui_select_commodity_modal(gnc_commodity * orig_sel,
* @return The newly created commodity, or NULL if the user cancelled.
*/
gnc_commodity *
-gnc_ui_new_commodity_modal_full(const char * namespace,
+gnc_ui_new_commodity_modal_full(const char * name_space,
GtkWidget * parent,
const char * cusip,
const char * fullname,
@@ -255,7 +255,7 @@ gchar *gnc_ui_namespace_picker_ns (GtkWidget *cbwe);
* the combo box appears.
*/
void gnc_ui_update_commodity_picker(GtkWidget *cbwe,
- const gchar *namespace,
+ const gchar *name_space,
const gchar *sel);
/** @} */
diff --git a/src/gnome-utils/dialog-preferences.c
b/src/gnome-utils/dialog-preferences.c
index 4e371be..96f9159 100644
--- a/src/gnome-utils/dialog-preferences.c
+++ b/src/gnome-utils/dialog-preferences.c
@@ -1215,7 +1215,7 @@ gnc_preferences_dialog_create(void)
*
* @internal
*
- * @param class Unused.
+ * @param class_name Unused.
*
* @param component_id Unused.
*
@@ -1224,7 +1224,7 @@ gnc_preferences_dialog_create(void)
* @param iter_data Unused.
*/
static gboolean
-show_handler (const char *class, gint component_id,
+show_handler (const char *class_name, gint component_id,
gpointer user_data, gpointer iter_data)
{
GtkWidget *dialog;
diff --git a/src/gnome-utils/dialog-reset-warnings.c
b/src/gnome-utils/dialog-reset-warnings.c
index e61fc08..eb45d28 100644
--- a/src/gnome-utils/dialog-reset-warnings.c
+++ b/src/gnome-utils/dialog-reset-warnings.c
@@ -313,13 +313,13 @@ gnc_reset_warnings_add_section (RWDialog *rw_dialog,
const gchar *prefs_group, G
* dialog.
*
* @internal
- * @param class Unused.
+ * @param class_name Unused.
* @param component_id Unused.
* @param user_data A pointer to the rw structure.
* @param iter_data Unused.
***********************************************************************/
static gboolean
-show_handler (const char *class, gint component_id,
+show_handler (const char *class_name, gint component_id,
gpointer user_data, gpointer iter_data)
{
RWDialog *rw_dialog = user_data;
diff --git a/src/gnome-utils/dialog-totd.c b/src/gnome-utils/dialog-totd.c
index b26e77d..af4ebf8 100644
--- a/src/gnome-utils/dialog-totd.c
+++ b/src/gnome-utils/dialog-totd.c
@@ -174,7 +174,7 @@ gnc_totd_dialog_startup_toggled_cb (GtkToggleButton
*button,
static gboolean
gnc_totd_initialize (void)
{
- gchar *filename, *contents, *new;
+ gchar *filename, *contents, *new_one;
gsize length;
GError *error;
@@ -209,9 +209,9 @@ gnc_totd_initialize (void)
contents = g_strdup (tip_list[tip_count]);
else
{
- new = g_strjoin ("\n", contents, tip_list[tip_count],
NULL);
+ new_one = g_strjoin ("\n", contents, tip_list[tip_count],
NULL);
g_free (contents);
- contents = new;
+ contents = new_one;
}
}
}
@@ -223,9 +223,9 @@ gnc_totd_initialize (void)
/* Convert any escaped characters while counting the strings */
for (tip_count = 0; tip_list[tip_count] != NULL; tip_count++)
{
- new = g_strcompress(tip_list[tip_count]);
+ new_one = g_strcompress(tip_list[tip_count]);
g_free(tip_list[tip_count]);
- tip_list[tip_count] = new;
+ tip_list[tip_count] = new_one;
}
@@ -250,7 +250,7 @@ gnc_totd_initialize (void)
*
* @internal
*
- * @param class Unused.
+ * @param class_name Unused.
*
* @param component_id Unused.
*
@@ -259,7 +259,7 @@ gnc_totd_initialize (void)
* @param iter_data Unused.
***********************************************************************/
static gboolean
-show_handler (const char *class, gint component_id,
+show_handler (const char *class_name, gint component_id,
gpointer user_data, gpointer iter_data)
{
TotdDialog *totd_dialog = user_data;
diff --git a/src/gnome-utils/gnc-amount-edit.c
b/src/gnome-utils/gnc-amount-edit.c
index 5edc823..1ea9093 100644
--- a/src/gnome-utils/gnc-amount-edit.c
+++ b/src/gnome-utils/gnc-amount-edit.c
@@ -59,7 +59,7 @@ static guint amount_edit_signals [LAST_SIGNAL] = { 0 };
static void gnc_amount_edit_init (GNCAmountEdit *gae);
-static void gnc_amount_edit_class_init (GNCAmountEditClass *class);
+static void gnc_amount_edit_class_init (GNCAmountEditClass *clas);
static void gnc_amount_edit_changed (GtkEditable *gae,
gpointer data);
static gint gnc_amount_edit_key_press (GtkWidget *widget,
GdkEventKey *event);
diff --git a/src/gnome-utils/gnc-cell-renderer-date.c
b/src/gnome-utils/gnc-cell-renderer-date.c
index dbc3fba..617a2f7 100644
--- a/src/gnome-utils/gnc-cell-renderer-date.c
+++ b/src/gnome-utils/gnc-cell-renderer-date.c
@@ -46,7 +46,7 @@ enum {
static void gcrd_init (GncCellRendererDate
*date);
-static void gcrd_class_init (GncCellRendererDateClass
*class);
+static void gcrd_class_init (GncCellRendererDateClass
*clas);
static void gcrd_set_property (GObject
*object,
guint param_id,
@@ -187,16 +187,16 @@ gcrd_init (GncCellRendererDate *date)
}
static void
-gcrd_class_init (GncCellRendererDateClass *class)
+gcrd_class_init (GncCellRendererDateClass *clas)
{
GncCellRendererPopupClass *popup_class;
GtkCellRendererClass *cell_class;
GObjectClass *gobject_class;
- popup_class = GNC_CELL_RENDERER_POPUP_CLASS (class);
- cell_class = GTK_CELL_RENDERER_CLASS (class);
- parent_class = GNC_CELL_RENDERER_POPUP_CLASS (g_type_class_peek_parent
(class));
- gobject_class = G_OBJECT_CLASS (class);
+ popup_class = GNC_CELL_RENDERER_POPUP_CLASS (clas);
+ cell_class = GTK_CELL_RENDERER_CLASS (clas);
+ parent_class = GNC_CELL_RENDERER_POPUP_CLASS (g_type_class_peek_parent
(clas));
+ gobject_class = G_OBJECT_CLASS (clas);
gobject_class->set_property = gcrd_set_property;
gobject_class->get_property = gcrd_get_property;
diff --git a/src/gnome-utils/gnc-cell-renderer-popup-entry.c
b/src/gnome-utils/gnc-cell-renderer-popup-entry.c
index 054028f..1413bc6 100644
--- a/src/gnome-utils/gnc-cell-renderer-popup-entry.c
+++ b/src/gnome-utils/gnc-cell-renderer-popup-entry.c
@@ -38,7 +38,7 @@
#include "gnc-date.h"
static void gnc_popup_entry_init (GncPopupEntry *entry);
-static void gnc_popup_entry_class_init (GncPopupEntryClass *class);
+static void gnc_popup_entry_class_init (GncPopupEntryClass *clas);
static void gpw_cell_editable_init (GtkCellEditableIface *iface);
static gboolean gpw_key_press_event (GtkWidget *box,
GdkEventKey *key_event);
diff --git a/src/gnome-utils/gnc-cell-renderer-popup.c
b/src/gnome-utils/gnc-cell-renderer-popup.c
index f025cfe..d420f2e 100644
--- a/src/gnome-utils/gnc-cell-renderer-popup.c
+++ b/src/gnome-utils/gnc-cell-renderer-popup.c
@@ -42,7 +42,7 @@ enum {
};
static void gcrp_init (GncCellRendererPopup
*popup);
-static void gcrp_class_init (GncCellRendererPopupClass
*class);
+static void gcrp_class_init (GncCellRendererPopupClass *clas);
static GtkCellEditable *
gcrp_start_editing (GtkCellRenderer *cell,
@@ -141,21 +141,21 @@ gcrp_init (GncCellRendererPopup *popup)
}
static void
-gcrp_class_init (GncCellRendererPopupClass *class)
+gcrp_class_init (GncCellRendererPopupClass *clas)
{
- GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class);
+ GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (clas);
- parent_class = GTK_CELL_RENDERER_TEXT_CLASS (g_type_class_peek_parent
(class));
+ parent_class = GTK_CELL_RENDERER_TEXT_CLASS (g_type_class_peek_parent
(clas));
cell_class->start_editing = gcrp_start_editing;
cell_class->get_size = gcrp_get_size;
- class->show_popup = gcrp_show_popup;
- class->hide_popup = gcrp_hide_popup;
+ clas->show_popup = gcrp_show_popup;
+ clas->hide_popup = gcrp_hide_popup;
signals[SHOW_POPUP] = g_signal_new (
"show-popup",
- G_TYPE_FROM_CLASS (class),
+ G_TYPE_FROM_CLASS (clas),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GncCellRendererPopupClass, show_popup),
NULL, NULL,
@@ -169,7 +169,7 @@ gcrp_class_init (GncCellRendererPopupClass *class)
signals[HIDE_POPUP] = g_signal_new (
"hide-popup",
- G_TYPE_FROM_CLASS (class),
+ G_TYPE_FROM_CLASS (clas),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GncCellRendererPopupClass, hide_popup),
NULL, NULL,
diff --git a/src/gnome-utils/gnc-combott.c b/src/gnome-utils/gnc-combott.c
index b747d77..5e7ca9d 100644
--- a/src/gnome-utils/gnc-combott.c
+++ b/src/gnome-utils/gnc-combott.c
@@ -76,7 +76,7 @@ typedef struct GncCombottPrivate
/** Declarations *********************************************************/
static void gctt_init (GncCombott *combott);
-static void gctt_class_init (GncCombottClass *class);
+static void gctt_class_init (GncCombottClass *clas);
static void gctt_set_property (GObject *object,
guint param_id,
@@ -143,22 +143,22 @@ gnc_combott_get_type (void)
static void
-gctt_class_init (GncCombottClass *class)
+gctt_class_init (GncCombottClass *clas)
{
GObjectClass *gobject_class;
- parent_class = g_type_class_peek_parent (class);
- gobject_class = G_OBJECT_CLASS (class);
+ parent_class = g_type_class_peek_parent (clas);
+ gobject_class = G_OBJECT_CLASS (clas);
gobject_class->set_property = gctt_set_property;
gobject_class->get_property = gctt_get_property;
gobject_class->finalize = gctt_finalize;
- class->changed = gctt_changed;
+ clas->changed = gctt_changed;
combott_signals[CHANGED] =
g_signal_new ("changed",
- G_OBJECT_CLASS_TYPE (class),
+ G_OBJECT_CLASS_TYPE (clas),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GncCombottClass, changed),
NULL, NULL,
@@ -196,7 +196,7 @@ gctt_class_init (GncCombottClass *class)
1,
G_PARAM_READWRITE));
- g_type_class_add_private(class, sizeof(GncCombottPrivate));
+ g_type_class_add_private(clas, sizeof(GncCombottPrivate));
}
diff --git a/src/gnome-utils/gnc-currency-edit.c
b/src/gnome-utils/gnc-currency-edit.c
index ac7654f..63338c9 100644
--- a/src/gnome-utils/gnc-currency-edit.c
+++ b/src/gnome-utils/gnc-currency-edit.c
@@ -72,7 +72,7 @@
static QofLogModule log_module = GNC_MOD_GUI;
static void gnc_currency_edit_init (GNCCurrencyEdit *gce);
-static void gnc_currency_edit_class_init (GNCCurrencyEditClass *class);
+static void gnc_currency_edit_class_init (GNCCurrencyEditClass *clas);
static void gnc_currency_edit_finalize (GObject *object);
static void gnc_currency_edit_mnemonic_changed (GObject *gobject,
GParamSpec *pspec,
diff --git a/src/gnome-utils/gnc-date-delta.c
b/src/gnome-utils/gnc-date-delta.c
index 7f3b517..973375a 100644
--- a/src/gnome-utils/gnc-date-delta.c
+++ b/src/gnome-utils/gnc-date-delta.c
@@ -59,7 +59,7 @@ static guint date_delta_signals [LAST_SIGNAL] = { 0 };
static void gnc_date_delta_init (GNCDateDelta *gdd);
-static void gnc_date_delta_class_init (GNCDateDeltaClass *class);
+static void gnc_date_delta_class_init (GNCDateDeltaClass *clas);
static void gnc_date_delta_forall (GtkContainer *container,
gboolean
include_internals,
GtkCallback callback,
diff --git a/src/gnome-utils/gnc-date-format.c
b/src/gnome-utils/gnc-date-format.c
index 7db92e2..0702126 100644
--- a/src/gnome-utils/gnc-date-format.c
+++ b/src/gnome-utils/gnc-date-format.c
@@ -85,7 +85,7 @@ struct _GNCDateFormatPriv
static guint date_format_signals [LAST_SIGNAL] = { 0 };
static void gnc_date_format_init (GNCDateFormat *gdf);
-static void gnc_date_format_class_init (GNCDateFormatClass *class);
+static void gnc_date_format_class_init (GNCDateFormatClass *clas);
static void gnc_date_format_finalize (GObject *object);
static void gnc_date_format_compute_format(GNCDateFormat *gdf);
diff --git a/src/gnome-utils/gnc-dense-cal.c
b/src/gnome-utils/gnc-dense-cal.c
index 8275c7f..40c0eb8 100644
--- a/src/gnome-utils/gnc-dense-cal.c
+++ b/src/gnome-utils/gnc-dense-cal.c
@@ -76,7 +76,7 @@ static const gchar* MARK_COLOR = "Yellow";
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "gnc.gui.dense-cal"
-static void gnc_dense_cal_class_init(GncDenseCalClass *class);
+static void gnc_dense_cal_class_init(GncDenseCalClass *clas);
static void gnc_dense_cal_init(GncDenseCal *dcal);
static void gnc_dense_cal_finalize(GObject *object);
static void gnc_dense_cal_dispose(GObject *object);
diff --git a/src/gnome-utils/gnc-general-select.c
b/src/gnome-utils/gnc-general-select.c
index 02f72e9..a1033af 100644
--- a/src/gnome-utils/gnc-general-select.c
+++ b/src/gnome-utils/gnc-general-select.c
@@ -47,7 +47,7 @@ enum
static void gnc_general_select_init (GNCGeneralSelect *gsl);
-static void gnc_general_select_class_init (GNCGeneralSelectClass *class);
+static void gnc_general_select_class_init (GNCGeneralSelectClass *clas);
static void gnc_general_select_dispose (GObject
*object);
static void gnc_general_select_finalize (GObject
*object);
diff --git a/src/gnome-utils/gnc-period-select.c
b/src/gnome-utils/gnc-period-select.c
index 064d876..4f76ebd 100644
--- a/src/gnome-utils/gnc-period-select.c
+++ b/src/gnome-utils/gnc-period-select.c
@@ -58,7 +58,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
/** Declarations *********************************************************/
static void gnc_period_select_init (GncPeriodSelect *gce);
-static void gnc_period_select_class_init (GncPeriodSelectClass *class);
+static void gnc_period_select_class_init (GncPeriodSelectClass *clas);
static void gnc_period_select_finalize (GObject *object);
static GtkComboBoxClass *parent_class;
diff --git a/src/gnome-utils/gnc-plugin.c b/src/gnome-utils/gnc-plugin.c
index 3351295..b78be6c 100644
--- a/src/gnome-utils/gnc-plugin.c
+++ b/src/gnome-utils/gnc-plugin.c
@@ -158,33 +158,33 @@ gnc_plugin_add_to_window (GncPlugin *plugin,
GncMainWindow *window,
GQuark type)
{
- GncPluginClass *class;
+ GncPluginClass *clas;
GtkActionGroup *action_group;
g_return_if_fail (GNC_IS_PLUGIN (plugin));
- class = GNC_PLUGIN_GET_CLASS (plugin);
+ clas = GNC_PLUGIN_GET_CLASS (plugin);
ENTER (": plugin %s(%p), window %p", gnc_plugin_get_name(plugin),
plugin, window);
/*
* Update window with additional UI items
*/
- if (class->actions_name)
+ if (clas->actions_name)
{
DEBUG ("%s: %d actions to merge with gui from %s",
- class->actions_name, (class->n_actions +
class->n_toggle_actions), class->ui_filename);
- gnc_main_window_merge_actions (window, class->actions_name,
- class->actions, class->n_actions,
- class->toggle_actions,
class->n_toggle_actions,
- class->ui_filename, plugin);
+ clas->actions_name, (clas->n_actions +
clas->n_toggle_actions), clas->ui_filename);
+ gnc_main_window_merge_actions (window, clas->actions_name,
+ clas->actions, clas->n_actions,
+ clas->toggle_actions,
clas->n_toggle_actions,
+ clas->ui_filename, plugin);
- if (class->important_actions)
+ if (clas->important_actions)
{
action_group =
- gnc_main_window_get_action_group(window,
class->actions_name);
+ gnc_main_window_get_action_group(window,
clas->actions_name);
gnc_plugin_set_important_actions(action_group,
- class->important_actions);
+ clas->important_actions);
}
}
@@ -210,10 +210,10 @@ gnc_plugin_remove_from_window (GncPlugin *plugin,
GncMainWindow *window,
GQuark type)
{
- GncPluginClass *class;
+ GncPluginClass *clas;
g_return_if_fail (GNC_IS_PLUGIN (plugin));
- class = GNC_PLUGIN_GET_CLASS (plugin);
+ clas = GNC_PLUGIN_GET_CLASS (plugin);
ENTER (": plugin %s(%p), window %p", gnc_plugin_get_name(plugin),
plugin, window);
@@ -230,11 +230,11 @@ gnc_plugin_remove_from_window (GncPlugin *plugin,
/*
* Update window to remove UI items
*/
- if (class->actions_name)
+ if (clas->actions_name)
{
DEBUG ("%s: %d actions to unmerge",
- class->actions_name, (class->n_actions +
class->n_toggle_actions));
- gnc_main_window_unmerge_actions (window, class->actions_name);
+ clas->actions_name, (clas->n_actions +
clas->n_toggle_actions));
+ gnc_main_window_unmerge_actions (window, clas->actions_name);
}
LEAVE ("");
}
diff --git a/src/gnome-utils/gnc-tree-model-commodity.c
b/src/gnome-utils/gnc-tree-model-commodity.c
index a3a8934..c11e7b1 100644
--- a/src/gnome-utils/gnc-tree-model-commodity.c
+++ b/src/gnome-utils/gnc-tree-model-commodity.c
@@ -312,7 +312,7 @@ gnc_tree_model_commodity_get_commodity
(GncTreeModelCommodity *model,
static const gchar *
iter_to_string (GtkTreeIter *iter)
{
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
gnc_commodity *commodity = NULL;
#ifdef G_THREADS_ENABLED
#ifndef HAVE_GLIB_2_32
@@ -344,11 +344,11 @@ iter_to_string (GtkTreeIter *iter)
switch (GPOINTER_TO_INT(iter->user_data))
{
case GPOINTER_TO_INT(ITER_IS_NAMESPACE):
- namespace = (gnc_commodity_namespace *) iter->user_data2;
+ name_space = (gnc_commodity_namespace *) iter->user_data2;
snprintf(string, ITER_STRING_LEN,
"[stamp:%x data:%d (NAMESPACE), %p (%s), %d]",
iter->stamp, GPOINTER_TO_INT(iter->user_data),
- iter->user_data2, gnc_commodity_namespace_get_name
(namespace),
+ iter->user_data2, gnc_commodity_namespace_get_name
(name_space),
GPOINTER_TO_INT(iter->user_data3));
break;
@@ -446,7 +446,7 @@ gnc_tree_model_commodity_get_iter (GtkTreeModel
*tree_model,
GncTreeModelCommodity *model;
GncTreeModelCommodityPrivate *priv;
gnc_commodity_table *ct;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
gnc_commodity *commodity = NULL;
GList *list;
guint i, depth;
@@ -485,8 +485,8 @@ gnc_tree_model_commodity_get_iter (GtkTreeModel
*tree_model,
/* Verify the first part of the path: the namespace. */
list = gnc_commodity_table_get_namespaces_list(ct);
i = gtk_tree_path_get_indices (path)[0];
- namespace = g_list_nth_data (list, i);
- if (!namespace)
+ name_space = g_list_nth_data (list, i);
+ if (!name_space)
{
LEAVE("invalid path at namespace");
return FALSE;
@@ -497,14 +497,14 @@ gnc_tree_model_commodity_get_iter (GtkTreeModel
*tree_model,
/* Return an iterator for the namespace. */
iter->stamp = model->stamp;
iter->user_data = ITER_IS_NAMESPACE;
- iter->user_data2 = namespace;
+ iter->user_data2 = name_space;
iter->user_data3 = GINT_TO_POINTER(i);
LEAVE("iter (ns) %s", iter_to_string(iter));
return TRUE;
}
/* Verify the second part of the path: the commodity. */
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
i = gtk_tree_path_get_indices (path)[1];
commodity = g_list_nth_data (list, i);
if (!commodity)
@@ -530,7 +530,7 @@ gnc_tree_model_commodity_get_path (GtkTreeModel
*tree_model,
GncTreeModelCommodityPrivate *priv;
GtkTreePath *path;
gnc_commodity_table *ct;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
GList *ns_list;
g_return_val_if_fail (GNC_IS_TREE_MODEL_COMMODITY (tree_model), NULL);
@@ -562,11 +562,11 @@ gnc_tree_model_commodity_get_path (GtkTreeModel
*tree_model,
/* Get the namespaces list. */
ns_list = gnc_commodity_table_get_namespaces_list(ct);
- namespace =
gnc_commodity_get_namespace_ds((gnc_commodity*)iter->user_data2);
+ name_space =
gnc_commodity_get_namespace_ds((gnc_commodity*)iter->user_data2);
/* Create a path to the commodity. */
path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, g_list_index (ns_list, namespace));
+ gtk_tree_path_append_index (path, g_list_index (ns_list, name_space));
gtk_tree_path_append_index (path, GPOINTER_TO_INT(iter->user_data3));
debug_path(LEAVE, path);
return path;
@@ -579,7 +579,7 @@ gnc_tree_model_commodity_get_value (GtkTreeModel
*tree_model,
GValue *value)
{
GncTreeModelCommodity *model = GNC_TREE_MODEL_COMMODITY (tree_model);
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
gnc_commodity *commodity;
gnc_quote_source *source;
@@ -591,12 +591,12 @@ gnc_tree_model_commodity_get_value (GtkTreeModel
*tree_model,
if (iter->user_data == ITER_IS_NAMESPACE)
{
- namespace = (gnc_commodity_namespace *)iter->user_data2;
+ name_space = (gnc_commodity_namespace *)iter->user_data2;
switch (column)
{
case GNC_TREE_MODEL_COMMODITY_COL_NAMESPACE:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, gnc_commodity_namespace_get_name
(namespace));
+ g_value_set_string (value, gnc_commodity_namespace_get_name
(name_space));
break;
default:
g_value_init (value, G_TYPE_STRING);
@@ -708,7 +708,7 @@ gnc_tree_model_commodity_iter_next (GtkTreeModel
*tree_model,
GncTreeModelCommodity *model;
GncTreeModelCommodityPrivate *priv;
gnc_commodity_table *ct;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
GList *list;
int n;
@@ -728,8 +728,8 @@ gnc_tree_model_commodity_iter_next (GtkTreeModel
*tree_model,
}
else if (iter->user_data == ITER_IS_COMMODITY)
{
- namespace = gnc_commodity_get_namespace_ds((gnc_commodity
*)iter->user_data2);
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ name_space = gnc_commodity_get_namespace_ds((gnc_commodity
*)iter->user_data2);
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
}
else
{
@@ -758,7 +758,7 @@ gnc_tree_model_commodity_iter_children (GtkTreeModel
*tree_model,
GncTreeModelCommodity *model;
GncTreeModelCommodityPrivate *priv;
gnc_commodity_table *ct;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
GList *list;
g_return_val_if_fail (GNC_IS_TREE_MODEL_COMMODITY (tree_model), FALSE);
@@ -788,8 +788,8 @@ gnc_tree_model_commodity_iter_children (GtkTreeModel
*tree_model,
if (parent->user_data == ITER_IS_NAMESPACE)
{
- namespace = (gnc_commodity_namespace *)parent->user_data2;
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ name_space = (gnc_commodity_namespace *)parent->user_data2;
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
if (list == NULL)
{
LEAVE("no commodities");
@@ -812,7 +812,7 @@ static gboolean
gnc_tree_model_commodity_iter_has_child (GtkTreeModel *tree_model,
GtkTreeIter *iter)
{
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
GList *list;
g_return_val_if_fail (iter != NULL, FALSE);
@@ -825,8 +825,8 @@ gnc_tree_model_commodity_iter_has_child (GtkTreeModel
*tree_model,
return FALSE;
}
- namespace = (gnc_commodity_namespace *)iter->user_data2;
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ name_space = (gnc_commodity_namespace *)iter->user_data2;
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
LEAVE("%s children", list ? "has" : "no");
return list != NULL;
}
@@ -838,7 +838,7 @@ gnc_tree_model_commodity_iter_n_children (GtkTreeModel
*tree_model,
GncTreeModelCommodity *model;
GncTreeModelCommodityPrivate *priv;
gnc_commodity_table *ct;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
GList *list;
g_return_val_if_fail (GNC_IS_TREE_MODEL_COMMODITY (tree_model), -1);
@@ -857,8 +857,8 @@ gnc_tree_model_commodity_iter_n_children (GtkTreeModel
*tree_model,
if (iter->user_data == ITER_IS_NAMESPACE)
{
- namespace = (gnc_commodity_namespace *)iter->user_data2;
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ name_space = (gnc_commodity_namespace *)iter->user_data2;
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
LEAVE("cm list length %d", g_list_length(list));
return g_list_length (list);
}
@@ -876,7 +876,7 @@ gnc_tree_model_commodity_iter_nth_child (GtkTreeModel
*tree_model,
GncTreeModelCommodity *model;
GncTreeModelCommodityPrivate *priv;
gnc_commodity_table *ct;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
GList *list;
g_return_val_if_fail (GNC_IS_TREE_MODEL_COMMODITY (tree_model), FALSE);
@@ -902,8 +902,8 @@ gnc_tree_model_commodity_iter_nth_child (GtkTreeModel
*tree_model,
if (parent->user_data == ITER_IS_NAMESPACE)
{
- namespace = (gnc_commodity_namespace *)parent->user_data2;
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ name_space = (gnc_commodity_namespace *)parent->user_data2;
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
iter->stamp = model->stamp;
iter->user_data = ITER_IS_COMMODITY;
@@ -926,7 +926,7 @@ gnc_tree_model_commodity_iter_parent (GtkTreeModel
*tree_model,
GncTreeModelCommodity *model;
GncTreeModelCommodityPrivate *priv;
gnc_commodity_table *ct;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
GList *list;
g_return_val_if_fail (GNC_IS_TREE_MODEL_COMMODITY (tree_model), FALSE);
@@ -946,12 +946,12 @@ gnc_tree_model_commodity_iter_parent (GtkTreeModel
*tree_model,
ct = priv->commodity_table;
list = gnc_commodity_table_get_namespaces_list(ct);
- namespace =
gnc_commodity_get_namespace_ds((gnc_commodity*)child->user_data2);
+ name_space =
gnc_commodity_get_namespace_ds((gnc_commodity*)child->user_data2);
iter->stamp = model->stamp;
iter->user_data = ITER_IS_NAMESPACE;
- iter->user_data2 = namespace;
- iter->user_data3 = GINT_TO_POINTER(g_list_index(list, namespace));
+ iter->user_data2 = name_space;
+ iter->user_data3 = GINT_TO_POINTER(g_list_index(list, name_space));
LEAVE("ns iter %p (%s)", iter, iter_to_string(iter));
return TRUE;
}
@@ -970,7 +970,7 @@ gnc_tree_model_commodity_get_iter_from_commodity
(GncTreeModelCommodity *model,
gnc_commodity *commodity,
GtkTreeIter *iter)
{
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
GList *list;
gint n;
@@ -980,14 +980,14 @@ gnc_tree_model_commodity_get_iter_from_commodity
(GncTreeModelCommodity *model,
ENTER("model %p, commodity %p, iter %p", model, commodity, iter);
- namespace = gnc_commodity_get_namespace_ds(commodity);
- if (namespace == NULL)
+ name_space = gnc_commodity_get_namespace_ds(commodity);
+ if (name_space == NULL)
{
LEAVE("no namespace");
return FALSE;
}
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
if (list == NULL)
{
LEAVE("empty list");
@@ -1052,7 +1052,7 @@ gnc_tree_model_commodity_get_path_from_commodity
(GncTreeModelCommodity *model,
*/
gboolean
gnc_tree_model_commodity_get_iter_from_namespace (GncTreeModelCommodity
*model,
- gnc_commodity_namespace *namespace,
+ gnc_commodity_namespace *name_space,
GtkTreeIter *iter)
{
GncTreeModelCommodityPrivate *priv;
@@ -1060,10 +1060,10 @@ gnc_tree_model_commodity_get_iter_from_namespace
(GncTreeModelCommodity *model,
gint n;
g_return_val_if_fail (GNC_IS_TREE_MODEL_COMMODITY (model), FALSE);
- g_return_val_if_fail ((namespace != NULL), FALSE);
+ g_return_val_if_fail ((name_space != NULL), FALSE);
g_return_val_if_fail ((iter != NULL), FALSE);
- ENTER("model %p, namespace %p, iter %p", model, namespace, iter);
+ ENTER("model %p, namespace %p, iter %p", model, name_space, iter);
priv = GNC_TREE_MODEL_COMMODITY_GET_PRIVATE(model);
list = gnc_commodity_table_get_namespaces_list(priv->commodity_table);
@@ -1073,7 +1073,7 @@ gnc_tree_model_commodity_get_iter_from_namespace
(GncTreeModelCommodity *model,
return FALSE;
}
- n = g_list_index(list, namespace);
+ n = g_list_index(list, name_space);
if (n == -1)
{
LEAVE("");
@@ -1082,7 +1082,7 @@ gnc_tree_model_commodity_get_iter_from_namespace
(GncTreeModelCommodity *model,
iter->stamp = model->stamp;
iter->user_data = ITER_IS_NAMESPACE;
- iter->user_data2 = namespace;
+ iter->user_data2 = name_space;
iter->user_data3 = GINT_TO_POINTER(n);
LEAVE("iter %s", iter_to_string(iter));
return TRUE;
@@ -1348,13 +1348,13 @@ gnc_tree_model_commodity_event_handler (QofInstance
*entity,
}
else if (GNC_IS_COMMODITY_NAMESPACE(entity))
{
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
- namespace = GNC_COMMODITY_NAMESPACE(entity);
- name = gnc_commodity_namespace_get_name(namespace);
+ name_space = GNC_COMMODITY_NAMESPACE(entity);
+ name = gnc_commodity_namespace_get_name(name_space);
if (event_type != QOF_EVENT_DESTROY)
{
- if (!gnc_tree_model_commodity_get_iter_from_namespace (model,
namespace, &iter))
+ if (!gnc_tree_model_commodity_get_iter_from_namespace (model,
name_space, &iter))
{
LEAVE("no iter");
return;
diff --git a/src/gnome-utils/gnc-tree-model-commodity.h
b/src/gnome-utils/gnc-tree-model-commodity.h
index aa01bcd..dc9b88a 100644
--- a/src/gnome-utils/gnc-tree-model-commodity.h
+++ b/src/gnome-utils/gnc-tree-model-commodity.h
@@ -193,7 +193,7 @@ gnc_commodity *gnc_tree_model_commodity_get_commodity
(GncTreeModelCommodity *mo
*
* @return TRUE if the returned iter is valid, FALSE otherwise. */
gboolean gnc_tree_model_commodity_get_iter_from_namespace
(GncTreeModelCommodity *model,
- gnc_commodity_namespace *namespace,
+ gnc_commodity_namespace *name_space,
GtkTreeIter *iter);
/** Convert a commodity pointer into a GtkTreeIter.
diff --git a/src/gnome-utils/gnc-tree-model-price.c
b/src/gnome-utils/gnc-tree-model-price.c
index e133d1e..c62b749 100644
--- a/src/gnome-utils/gnc-tree-model-price.c
+++ b/src/gnome-utils/gnc-tree-model-price.c
@@ -375,7 +375,7 @@ static const gchar *
iter_to_string (GncTreeModelPrice *model, GtkTreeIter *iter)
{
GncTreeModelPricePrivate *priv;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
gnc_commodity *commodity;
GNCPrice *price;
#ifdef G_THREADS_ENABLED
@@ -410,11 +410,11 @@ iter_to_string (GncTreeModelPrice *model, GtkTreeIter
*iter)
switch (GPOINTER_TO_INT(iter->user_data))
{
case GPOINTER_TO_INT(ITER_IS_NAMESPACE):
- namespace = (gnc_commodity_namespace *) iter->user_data2;
+ name_space = (gnc_commodity_namespace *) iter->user_data2;
snprintf(string, ITER_STRING_LEN,
"[stamp:%x data:%d (NAMESPACE), %p (%s), %d]",
iter->stamp, GPOINTER_TO_INT(iter->user_data),
- iter->user_data2, gnc_commodity_namespace_get_name
(namespace),
+ iter->user_data2, gnc_commodity_namespace_get_name
(name_space),
GPOINTER_TO_INT(iter->user_data3));
break;
@@ -517,7 +517,7 @@ gnc_tree_model_price_get_iter (GtkTreeModel *tree_model,
GncTreeModelPrice *model;
GncTreeModelPricePrivate *priv;
gnc_commodity_table *ct;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
gnc_commodity *commodity = NULL;
GNCPrice *price;
GList *ns_list, *cm_list, *price_list;
@@ -554,8 +554,8 @@ gnc_tree_model_price_get_iter (GtkTreeModel *tree_model,
ct = qof_book_get_data (priv->book, GNC_COMMODITY_TABLE);
ns_list = gnc_commodity_table_get_namespaces_list(ct);
i = gtk_tree_path_get_indices (path)[0];
- namespace = g_list_nth_data (ns_list, i);
- if (!namespace)
+ name_space = g_list_nth_data (ns_list, i);
+ if (!name_space)
{
LEAVE("invalid path at namespace");
return FALSE;
@@ -566,14 +566,14 @@ gnc_tree_model_price_get_iter (GtkTreeModel
*tree_model,
/* Return an iterator for the namespace. */
iter->stamp = model->stamp;
iter->user_data = ITER_IS_NAMESPACE;
- iter->user_data2 = namespace;
+ iter->user_data2 = name_space;
iter->user_data3 = GINT_TO_POINTER(i);
LEAVE("iter (ns) %s", iter_to_string(model, iter));
return TRUE;
}
/* Verify the second part of the path: the commodity. */
- cm_list = gnc_commodity_namespace_get_commodity_list(namespace);
+ cm_list = gnc_commodity_namespace_get_commodity_list(name_space);
i = gtk_tree_path_get_indices (path)[1];
commodity = g_list_nth_data (cm_list, i);
if (!commodity)
@@ -625,7 +625,7 @@ gnc_tree_model_price_get_path (GtkTreeModel *tree_model,
GncTreeModelPrice *model = GNC_TREE_MODEL_PRICE (tree_model);
GncTreeModelPricePrivate *priv;
gnc_commodity_table *ct;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
gnc_commodity *commodity;
GList *ns_list, *cm_list;
GtkTreePath *path;
@@ -662,9 +662,9 @@ gnc_tree_model_price_get_path (GtkTreeModel *tree_model,
{
/* Create a path to the commodity. */
commodity = (gnc_commodity*)iter->user_data2;
- namespace = gnc_commodity_get_namespace_ds(commodity);
+ name_space = gnc_commodity_get_namespace_ds(commodity);
path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, g_list_index (ns_list,
namespace));
+ gtk_tree_path_append_index (path, g_list_index (ns_list,
name_space));
gtk_tree_path_append_index (path,
GPOINTER_TO_INT(iter->user_data3));
debug_path(LEAVE, path);
return path;
@@ -672,10 +672,10 @@ gnc_tree_model_price_get_path (GtkTreeModel
*tree_model,
/* Create a path to the price. */
commodity = gnc_price_get_commodity((GNCPrice*)iter->user_data2);
- namespace = gnc_commodity_get_namespace_ds(commodity);
- cm_list = gnc_commodity_namespace_get_commodity_list(namespace);
+ name_space = gnc_commodity_get_namespace_ds(commodity);
+ cm_list = gnc_commodity_namespace_get_commodity_list(name_space);
path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, g_list_index (ns_list, namespace));
+ gtk_tree_path_append_index (path, g_list_index (ns_list, name_space));
gtk_tree_path_append_index (path, g_list_index (cm_list, commodity));
gtk_tree_path_append_index (path, GPOINTER_TO_INT(iter->user_data3));
debug_path(LEAVE, path);
@@ -690,7 +690,7 @@ gnc_tree_model_price_get_value (GtkTreeModel
*tree_model,
{
GncTreeModelPrice *model = GNC_TREE_MODEL_PRICE (tree_model);
GncTreeModelPricePrivate *priv;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
gnc_commodity *commodity;
GNCPrice *price;
@@ -703,12 +703,12 @@ gnc_tree_model_price_get_value (GtkTreeModel
*tree_model,
if (iter->user_data == ITER_IS_NAMESPACE)
{
- namespace = (gnc_commodity_namespace *)iter->user_data2;
+ name_space = (gnc_commodity_namespace *)iter->user_data2;
switch (column)
{
case GNC_TREE_MODEL_PRICE_COL_COMMODITY:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, gnc_commodity_namespace_get_name
(namespace));
+ g_value_set_string (value, gnc_commodity_namespace_get_name
(name_space));
break;
case GNC_TREE_MODEL_PRICE_COL_VISIBILITY:
g_value_init (value, G_TYPE_BOOLEAN);
@@ -815,7 +815,7 @@ gnc_tree_model_price_iter_next (GtkTreeModel
*tree_model,
GncTreeModelPricePrivate *priv;
gnc_commodity_table *ct;
gnc_commodity *commodity;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
GList *list;
gint n;
@@ -843,8 +843,8 @@ gnc_tree_model_price_iter_next (GtkTreeModel
*tree_model,
}
else if (iter->user_data == ITER_IS_COMMODITY)
{
- namespace = gnc_commodity_get_namespace_ds((gnc_commodity
*)iter->user_data2);
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ name_space = gnc_commodity_get_namespace_ds((gnc_commodity
*)iter->user_data2);
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
n = GPOINTER_TO_INT(iter->user_data3) + 1;
iter->user_data2 = g_list_nth_data(list, n);
if (iter->user_data2 == NULL)
@@ -887,7 +887,7 @@ gnc_tree_model_price_iter_children (GtkTreeModel
*tree_model,
GncTreeModelPrice *model;
GncTreeModelPricePrivate *priv;
gnc_commodity_table *ct;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
gnc_commodity *commodity;
GList *list;
@@ -918,8 +918,8 @@ gnc_tree_model_price_iter_children (GtkTreeModel
*tree_model,
if (parent->user_data == ITER_IS_NAMESPACE)
{
- namespace = (gnc_commodity_namespace *)parent->user_data2;
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ name_space = (gnc_commodity_namespace *)parent->user_data2;
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
if (list == NULL)
{
LEAVE("no commodities");
@@ -962,7 +962,7 @@ gnc_tree_model_price_iter_has_child (GtkTreeModel
*tree_model,
{
GncTreeModelPrice *model;
GncTreeModelPricePrivate *priv;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
gnc_commodity *commodity;
gboolean result;
GList *list;
@@ -982,8 +982,8 @@ gnc_tree_model_price_iter_has_child (GtkTreeModel
*tree_model,
if (iter->user_data == ITER_IS_NAMESPACE)
{
- namespace = (gnc_commodity_namespace *)iter->user_data2;
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ name_space = (gnc_commodity_namespace *)iter->user_data2;
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
LEAVE("%s children", list ? "has" : "no");
return list != NULL;
}
@@ -1007,7 +1007,7 @@ gnc_tree_model_price_iter_n_children (GtkTreeModel
*tree_model,
GncTreeModelPrice *model;
GncTreeModelPricePrivate *priv;
gnc_commodity_table *ct;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
gnc_commodity *commodity;
GList *list;
gint n;
@@ -1029,8 +1029,8 @@ gnc_tree_model_price_iter_n_children (GtkTreeModel
*tree_model,
if (iter->user_data == ITER_IS_NAMESPACE)
{
- namespace = (gnc_commodity_namespace *)iter->user_data2;
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ name_space = (gnc_commodity_namespace *)iter->user_data2;
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
LEAVE("cm list length %d", g_list_length(list));
return g_list_length (list);
}
@@ -1058,7 +1058,7 @@ gnc_tree_model_price_iter_nth_child (GtkTreeModel
*tree_model,
GncTreeModelPrice *model;
GncTreeModelPricePrivate *priv;
gnc_commodity_table *ct;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
gnc_commodity *commodity;
GList *list;
@@ -1085,8 +1085,8 @@ gnc_tree_model_price_iter_nth_child (GtkTreeModel
*tree_model,
if (parent->user_data == ITER_IS_NAMESPACE)
{
- namespace = (gnc_commodity_namespace *)parent->user_data2;
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ name_space = (gnc_commodity_namespace *)parent->user_data2;
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
iter->stamp = model->stamp;
iter->user_data = ITER_IS_COMMODITY;
@@ -1124,7 +1124,7 @@ gnc_tree_model_price_iter_parent (GtkTreeModel
*tree_model,
GncTreeModelPricePrivate *priv;
gnc_commodity_table *ct;
gnc_commodity * commodity;
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
GList *list;
g_return_val_if_fail (GNC_IS_TREE_MODEL_PRICE (tree_model), FALSE);
@@ -1146,19 +1146,19 @@ gnc_tree_model_price_iter_parent (GtkTreeModel
*tree_model,
{
ct = qof_book_get_data (priv->book, GNC_COMMODITY_TABLE);
list = gnc_commodity_table_get_namespaces_list(ct);
- namespace =
gnc_commodity_get_namespace_ds((gnc_commodity*)child->user_data2);
+ name_space =
gnc_commodity_get_namespace_ds((gnc_commodity*)child->user_data2);
iter->stamp = model->stamp;
iter->user_data = ITER_IS_NAMESPACE;
- iter->user_data2 = namespace;
- iter->user_data3 = GINT_TO_POINTER(g_list_index(list, namespace));
+ iter->user_data2 = name_space;
+ iter->user_data3 = GINT_TO_POINTER(g_list_index(list, name_space));
LEAVE("ns iter %p (%s)", iter, iter_to_string(model, iter));
return TRUE;
}
commodity = gnc_price_get_commodity ((GNCPrice*)child->user_data2);
- namespace = gnc_commodity_get_namespace_ds(commodity);
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ name_space = gnc_commodity_get_namespace_ds(commodity);
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
iter->stamp = model->stamp;
iter->user_data = ITER_IS_COMMODITY;
@@ -1270,7 +1270,7 @@ gnc_tree_model_price_get_iter_from_commodity
(GncTreeModelPrice *model,
gnc_commodity *commodity,
GtkTreeIter *iter)
{
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
GList *list;
gint n;
@@ -1279,14 +1279,14 @@ gnc_tree_model_price_get_iter_from_commodity
(GncTreeModelPrice *model,
g_return_val_if_fail ((commodity != NULL), FALSE);
g_return_val_if_fail ((iter != NULL), FALSE);
- namespace = gnc_commodity_get_namespace_ds(commodity);
- if (namespace == NULL)
+ name_space = gnc_commodity_get_namespace_ds(commodity);
+ if (name_space == NULL)
{
LEAVE("no namespace");
return FALSE;
}
- list = gnc_commodity_namespace_get_commodity_list(namespace);
+ list = gnc_commodity_namespace_get_commodity_list(name_space);
if (list == NULL)
{
LEAVE("empty list");
@@ -1315,7 +1315,7 @@ gnc_tree_model_price_get_iter_from_commodity
(GncTreeModelPrice *model,
*/
gboolean
gnc_tree_model_price_get_iter_from_namespace (GncTreeModelPrice *model,
- gnc_commodity_namespace *namespace,
+ gnc_commodity_namespace *name_space,
GtkTreeIter *iter)
{
GncTreeModelPricePrivate *priv;
@@ -1323,9 +1323,9 @@ gnc_tree_model_price_get_iter_from_namespace
(GncTreeModelPrice *model,
GList *list;
gint n;
- ENTER("model %p, namespace %p, iter %p", model, namespace, iter);
+ ENTER("model %p, namespace %p, iter %p", model, name_space, iter);
g_return_val_if_fail (GNC_IS_TREE_MODEL_PRICE (model), FALSE);
- g_return_val_if_fail ((namespace != NULL), FALSE);
+ g_return_val_if_fail ((name_space != NULL), FALSE);
g_return_val_if_fail ((iter != NULL), FALSE);
priv = GNC_TREE_MODEL_PRICE_GET_PRIVATE(model);
@@ -1334,13 +1334,13 @@ gnc_tree_model_price_get_iter_from_namespace
(GncTreeModelPrice *model,
if (list == NULL)
return FALSE;
- n = g_list_index(list, namespace);
+ n = g_list_index(list, name_space);
if (n == -1)
return FALSE;
iter->stamp = model->stamp;
iter->user_data = ITER_IS_NAMESPACE;
- iter->user_data2 = namespace;
+ iter->user_data2 = name_space;
iter->user_data3 = GINT_TO_POINTER(n);
LEAVE("iter %s", iter_to_string(model, iter));
return TRUE;
@@ -1618,13 +1618,13 @@ gnc_tree_model_price_event_handler (QofInstance
*entity,
}
else if (GNC_IS_COMMODITY_NAMESPACE(entity))
{
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
- namespace = GNC_COMMODITY_NAMESPACE(entity);
- name = gnc_commodity_namespace_get_name(namespace);
+ name_space = GNC_COMMODITY_NAMESPACE(entity);
+ name = gnc_commodity_namespace_get_name(name_space);
if (event_type != QOF_EVENT_DESTROY)
{
- if (!gnc_tree_model_price_get_iter_from_namespace (model,
namespace, &iter))
+ if (!gnc_tree_model_price_get_iter_from_namespace (model,
name_space, &iter))
{
LEAVE("no iter");
return;
diff --git a/src/gnome-utils/gnc-tree-model-price.h
b/src/gnome-utils/gnc-tree-model-price.h
index 91edb31..6a89d03 100644
--- a/src/gnome-utils/gnc-tree-model-price.h
+++ b/src/gnome-utils/gnc-tree-model-price.h
@@ -220,7 +220,7 @@ GNCPrice *gnc_tree_model_price_get_price
(GncTreeModelPrice *model,
*
* @return TRUE if the returned iter is valid, FALSE otherwise. */
gboolean gnc_tree_model_price_get_iter_from_namespace (GncTreeModelPrice
*model,
- gnc_commodity_namespace *namespace,
+ gnc_commodity_namespace *name_space,
GtkTreeIter *iter);
/** Convert a commodity pointer into a GtkTreeIter.
diff --git a/src/gnome-utils/gnc-tree-view-commodity.c
b/src/gnome-utils/gnc-tree-view-commodity.c
index fc0ee00..eb9a9c2 100644
--- a/src/gnome-utils/gnc-tree-view-commodity.c
+++ b/src/gnome-utils/gnc-tree-view-commodity.c
@@ -545,7 +545,7 @@ gnc_tree_view_commodity_filter_helper (GtkTreeModel
*model,
GtkTreeIter *iter,
gpointer data)
{
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
gnc_commodity *commodity;
filter_user_data *fd = data;
@@ -556,8 +556,8 @@ gnc_tree_view_commodity_filter_helper (GtkTreeModel
*model,
{
if (fd->user_ns_fn)
{
- namespace = gnc_tree_model_commodity_get_namespace
(GNC_TREE_MODEL_COMMODITY(model), iter);
- return fd->user_ns_fn(namespace, fd->user_data);
+ name_space = gnc_tree_model_commodity_get_namespace
(GNC_TREE_MODEL_COMMODITY(model), iter);
+ return fd->user_ns_fn(name_space, fd->user_data);
}
return TRUE;
}
diff --git a/src/gnome-utils/gnc-tree-view-price.c
b/src/gnome-utils/gnc-tree-view-price.c
index f42715d..7f3113d 100644
--- a/src/gnome-utils/gnc-tree-view-price.c
+++ b/src/gnome-utils/gnc-tree-view-price.c
@@ -558,7 +558,7 @@ gnc_tree_view_price_filter_helper (GtkTreeModel *model,
GtkTreeIter *iter,
gpointer data)
{
- gnc_commodity_namespace *namespace;
+ gnc_commodity_namespace *name_space;
gnc_commodity *commodity;
GNCPrice *price;
filter_user_data *fd = data;
@@ -570,8 +570,8 @@ gnc_tree_view_price_filter_helper (GtkTreeModel *model,
{
if (fd->user_ns_fn)
{
- namespace = gnc_tree_model_price_get_namespace
(GNC_TREE_MODEL_PRICE(model), iter);
- return fd->user_ns_fn(namespace, fd->user_data);
+ name_space = gnc_tree_model_price_get_namespace
(GNC_TREE_MODEL_PRICE(model), iter);
+ return fd->user_ns_fn(name_space, fd->user_data);
}
return TRUE;
}
diff --git a/src/gnome-utils/search-param.c b/src/gnome-utils/search-param.c
index 65f66a6..3910ca6 100644
--- a/src/gnome-utils/search-param.c
+++ b/src/gnome-utils/search-param.c
@@ -33,7 +33,7 @@
#include "search-param.h"
-static void gnc_search_param_class_init (GNCSearchParamClass *class);
+static void gnc_search_param_class_init (GNCSearchParamClass *clas);
static void gnc_search_param_init (GNCSearchParam *gspaper);
static void gnc_search_param_finalize (GObject *obj);
--
1.9.1
More information about the gnucash-devel
mailing list