From 105cf24222189f666aa8fbc6245de019cc2f63af Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sun, 20 Mar 2011 19:17:11 +0000 Subject: [PATCH] Whitespace and spelling corrections git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20432 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/engine/gnc-lot.h | 12 +++--- src/engine/gncCustomer.h | 16 ++++---- src/engine/gncEmployee.h | 16 ++++---- src/engine/gncInvoice.h | 34 ++++++++--------- src/engine/gncJob.h | 14 +++---- src/engine/gncOwner.c | 48 ++++++++++++------------ src/engine/gncVendor.h | 16 ++++---- src/gnome-utils/gnc-tree-model-account.c | 18 ++++----- src/gnome-utils/gnc-tree-model-account.h | 6 +-- 9 files changed, 90 insertions(+), 90 deletions(-) diff --git a/src/engine/gnc-lot.h b/src/engine/gnc-lot.h index a264dfc274..70a448fc98 100644 --- a/src/engine/gnc-lot.h +++ b/src/engine/gnc-lot.h @@ -42,7 +42,7 @@ * Lots are nothing more than a collection or grouping of splits in an * account. All of the splits in a lot must belong to the same account; * there's no mix-n-match. Thus, in this sense, a lot belongs to an - * accunt as well. + * account as well. * * Lots have an implicit "opening date": the date of the earliest split in * the lot. The "close date" is the date of the split that brought the lot @@ -109,7 +109,7 @@ void gnc_lot_remove_split (GNCLot *, Split *); /** The gnc_lot_get_split_list() routine returns a GList of all the * splits in this lot. Do *not* not free this list when done; - * it is a pointer straight into the lots intenal list. Do + * it is a pointer straight into the lots internal list. Do * *not* add to or remove from this list directly. Calling * either gnc_lot_add_split() or gnc_lot_remove_split() will * invalidate the returned pointer. @@ -177,10 +177,10 @@ GNCLot * gnc_lot_make_default (Account * acc); #define gnc_lot_get_guid(X) qof_entity_get_guid(QOF_INSTANCE(X)) -#define LOT_IS_CLOSED "is-closed?" -#define LOT_BALANCE "balance" -#define LOT_TITLE "lot-title" -#define LOT_NOTES "notes" +#define LOT_IS_CLOSED "is-closed?" +#define LOT_BALANCE "balance" +#define LOT_TITLE "lot-title" +#define LOT_NOTES "notes" #endif /* GNC_LOT_H */ /** @} */ /** @} */ diff --git a/src/engine/gncCustomer.h b/src/engine/gncCustomer.h index 8e04cba18f..1c40d25f91 100644 --- a/src/engine/gncCustomer.h +++ b/src/engine/gncCustomer.h @@ -142,14 +142,14 @@ gboolean gncCustomerIsDirty (GncCustomer *customer); int gncCustomerCompare (const GncCustomer *a, const GncCustomer *b); gboolean gncCustomerEqual(const GncCustomer *a, const GncCustomer *b); -#define CUSTOMER_ID "id" -#define CUSTOMER_NAME "name" -#define CUSTOMER_ADDR "addr" -#define CUSTOMER_SHIPADDR "shipaddr" -#define CUSTOMER_NOTES "notes" -#define CUSTOMER_DISCOUNT "amount of discount" -#define CUSTOMER_CREDIT "amount of credit" -#define CUSTOMER_TT_OVER "tax table override" +#define CUSTOMER_ID "id" +#define CUSTOMER_NAME "name" +#define CUSTOMER_ADDR "addr" +#define CUSTOMER_SHIPADDR "shipaddr" +#define CUSTOMER_NOTES "notes" +#define CUSTOMER_DISCOUNT "amount of discount" +#define CUSTOMER_CREDIT "amount of credit" +#define CUSTOMER_TT_OVER "tax table override" #define CUSTOMER_TAX_INC "customer_tax_included" #define CUSTOMER_TERMS "customer_terms" #define CUSTOMER_ACTIVE "customer_is_active" diff --git a/src/engine/gncEmployee.h b/src/engine/gncEmployee.h index 494f0ec9f0..7139200565 100644 --- a/src/engine/gncEmployee.h +++ b/src/engine/gncEmployee.h @@ -107,14 +107,14 @@ static inline GncEmployee * gncEmployeeLookup (const QofBook *book, const GncGUI gboolean gncEmployeeIsDirty (const GncEmployee *employee); gboolean gncEmployeeEqual(const GncEmployee* e1, const GncEmployee* e2); -#define EMPLOYEE_ID "id" -#define EMPLOYEE_USERNAME "username" -#define EMPLOYEE_ADDR "addr" -#define EMPLOYEE_LANGUAGE "native language" -#define EMPLOYEE_ACL "acl" -#define EMPLOYEE_WORKDAY "workday" -#define EMPLOYEE_RATE "rate" -#define EMPLOYEE_CC "credit_card_account" +#define EMPLOYEE_ID "id" +#define EMPLOYEE_USERNAME "username" +#define EMPLOYEE_ADDR "addr" +#define EMPLOYEE_LANGUAGE "native language" +#define EMPLOYEE_ACL "acl" +#define EMPLOYEE_WORKDAY "workday" +#define EMPLOYEE_RATE "rate" +#define EMPLOYEE_CC "credit_card_account" /** deprecated routines */ #define gncEmployeeGetGUID(E) qof_entity_get_guid(QOF_INSTANCE(E)) diff --git a/src/engine/gncInvoice.h b/src/engine/gncInvoice.h index b442e7f423..ec3989ca61 100644 --- a/src/engine/gncInvoice.h +++ b/src/engine/gncInvoice.h @@ -208,26 +208,26 @@ gboolean gncInvoiceEqual(const GncInvoice *a, const GncInvoice *b); gboolean gncInvoiceIsPosted (const GncInvoice *invoice); gboolean gncInvoiceIsPaid (const GncInvoice *invoice); -#define INVOICE_ID "id" -#define INVOICE_OWNER "owner" -#define INVOICE_OPENED "date_opened" -#define INVOICE_POSTED "date_posted" -#define INVOICE_DUE "date_due" -#define INVOICE_IS_POSTED "is_posted?" -#define INVOICE_IS_PAID "is_paid?" -#define INVOICE_TERMS "terms" -#define INVOICE_BILLINGID "billing_id" -#define INVOICE_NOTES "notes" -#define INVOICE_ACC "account" -#define INVOICE_POST_TXN "posted_txn" -#define INVOICE_POST_LOT "posted_lot" -#define INVOICE_TYPE "type" -#define INVOICE_BILLTO "bill-to" +#define INVOICE_ID "id" +#define INVOICE_OWNER "owner" +#define INVOICE_OPENED "date_opened" +#define INVOICE_POSTED "date_posted" +#define INVOICE_DUE "date_due" +#define INVOICE_IS_POSTED "is_posted?" +#define INVOICE_IS_PAID "is_paid?" +#define INVOICE_TERMS "terms" +#define INVOICE_BILLINGID "billing_id" +#define INVOICE_NOTES "notes" +#define INVOICE_ACC "account" +#define INVOICE_POST_TXN "posted_txn" +#define INVOICE_POST_LOT "posted_lot" +#define INVOICE_TYPE "type" +#define INVOICE_BILLTO "bill-to" #define INVOICE_ENTRIES "list_of_entries" #define INVOICE_JOB "invoice_job" -#define INVOICE_FROM_LOT "invoice-from-lot" -#define INVOICE_FROM_TXN "invoice-from-txn" +#define INVOICE_FROM_LOT "invoice-from-lot" +#define INVOICE_FROM_TXN "invoice-from-txn" QofBook *gncInvoiceGetBook(GncInvoice *x); diff --git a/src/engine/gncJob.h b/src/engine/gncJob.h index 775c3ec984..c1008ae0ef 100644 --- a/src/engine/gncJob.h +++ b/src/engine/gncJob.h @@ -79,7 +79,7 @@ void gncJobCommitEdit (GncJob *job); const char * gncJobGetID (const GncJob *job); const char * gncJobGetName (const GncJob *job); const char * gncJobGetReference (const GncJob *job); -GncOwner * gncJobGetOwner (GncJob *job); +GncOwner * gncJobGetOwner (GncJob *job); /** @} */ gboolean gncJobGetActive (const GncJob *job); @@ -100,12 +100,12 @@ static inline GncJob * gncJobLookup (const QofBook *book, const GncGUID *guid) int gncJobCompare (const GncJob *a, const GncJob *b); gboolean gncJobEqual(const GncJob *a, const GncJob *b); -#define JOB_ID "id" -#define JOB_NAME "name" -#define JOB_REFERENCE "reference" -#define JOB_OWNER "owner" -#define Q_JOB_OWNER "owner_collection" -#define JOB_ACTIVE "active" +#define JOB_ID "id" +#define JOB_NAME "name" +#define JOB_REFERENCE "reference" +#define JOB_OWNER "owner" +#define Q_JOB_OWNER "owner_collection" +#define JOB_ACTIVE "active" /** deprecated functions */ #define gncJobGetBook(x) qof_instance_get_book(QOF_INSTANCE(x)) diff --git a/src/engine/gncOwner.c b/src/engine/gncOwner.c index 96fa29a9e7..fbe9c60eea 100644 --- a/src/engine/gncOwner.c +++ b/src/engine/gncOwner.c @@ -40,11 +40,11 @@ #include "gncOwnerP.h" #include "gncVendorP.h" -#define _GNC_MOD_NAME GNC_ID_OWNER +#define _GNC_MOD_NAME GNC_ID_OWNER -#define GNC_OWNER_ID "gncOwner" -#define GNC_OWNER_TYPE "owner-type" -#define GNC_OWNER_GUID "owner-guid" +#define GNC_OWNER_ID "gncOwner" +#define GNC_OWNER_TYPE "owner-type" +#define GNC_OWNER_GUID "owner-guid" GncOwner * gncOwnerCreate (void) { @@ -255,26 +255,6 @@ GncEmployee * gncOwnerGetEmployee (const GncOwner *owner) return owner->owner.employee; } -gnc_commodity * gncOwnerGetCurrency (const GncOwner *owner) -{ - if (!owner) return NULL; - switch (owner->type) - { - case GNC_OWNER_NONE: - case GNC_OWNER_UNDEFINED: - default: - return NULL; - case GNC_OWNER_CUSTOMER: - return gncCustomerGetCurrency (owner->owner.customer); - case GNC_OWNER_VENDOR: - return gncVendorGetCurrency (owner->owner.vendor); - case GNC_OWNER_EMPLOYEE: - return gncEmployeeGetCurrency (owner->owner.employee); - case GNC_OWNER_JOB: - return gncOwnerGetCurrency (gncJobGetOwner (owner->owner.job)); - } -} - void gncOwnerCopy (const GncOwner *src, GncOwner *dest) { if (!src || !dest) return; @@ -339,6 +319,26 @@ const char * gncOwnerGetName (const GncOwner *owner) } } +gnc_commodity * gncOwnerGetCurrency (const GncOwner *owner) +{ + if (!owner) return NULL; + switch (owner->type) + { + case GNC_OWNER_NONE: + case GNC_OWNER_UNDEFINED: + default: + return NULL; + case GNC_OWNER_CUSTOMER: + return gncCustomerGetCurrency (owner->owner.customer); + case GNC_OWNER_VENDOR: + return gncVendorGetCurrency (owner->owner.vendor); + case GNC_OWNER_EMPLOYEE: + return gncEmployeeGetCurrency (owner->owner.employee); + case GNC_OWNER_JOB: + return gncOwnerGetCurrency (gncJobGetOwner (owner->owner.job)); + } +} + const GncGUID * gncOwnerGetGUID (const GncOwner *owner) { if (!owner) return NULL; diff --git a/src/engine/gncVendor.h b/src/engine/gncVendor.h index 1319bf5ae9..2e775047e2 100644 --- a/src/engine/gncVendor.h +++ b/src/engine/gncVendor.h @@ -118,15 +118,15 @@ static inline GncVendor * gncVendorLookup (const QofBook *book, const GncGUID *g QOF_BOOK_RETURN_ENTITY(book, guid, GNC_ID_VENDOR, GncVendor); } -#define VENDOR_ID "id" -#define VENDOR_NAME "name" -#define VENDOR_ADDR "addr" -#define VENDOR_NOTES "vendor_notes" -#define VENDOR_TERMS "vendor_terms" -#define VENDOR_TAX_INC "vendor_tax_included" -#define VENDOR_ACTIVE "vendor_is_active" +#define VENDOR_ID "id" +#define VENDOR_NAME "name" +#define VENDOR_ADDR "addr" +#define VENDOR_NOTES "vendor_notes" +#define VENDOR_TERMS "vendor_terms" +#define VENDOR_TAX_INC "vendor_tax_included" +#define VENDOR_ACTIVE "vendor_is_active" #define VENDOR_TAX_OVERRIDE "override_tax_table" -#define VENDOR_TAX_TABLE "vendor_tax_table" +#define VENDOR_TAX_TABLE "vendor_tax_table" /** deprecated functions */ #define gncVendorGetBook(X) qof_instance_get_book (QOF_INSTANCE(X)) diff --git a/src/gnome-utils/gnc-tree-model-account.c b/src/gnome-utils/gnc-tree-model-account.c index 3969861546..9678ca6bac 100644 --- a/src/gnome-utils/gnc-tree-model-account.c +++ b/src/gnome-utils/gnc-tree-model-account.c @@ -89,7 +89,7 @@ static void gnc_tree_model_account_event_handler (QofInstance *entity, GncTreeModelAccount *model, GncEventData *ed); -/** The instance private data for a account tree model. */ +/** The instance private data for an account tree model. */ typedef struct GncTreeModelAccountPrivate { QofBook *book; @@ -131,7 +131,7 @@ gnc_tree_model_account_update_color (GConfEntry *entry, gpointer user_data) /* g_object required functions */ /************************************************************/ -/** A pointer to the parent class of a account tree model. */ +/** A pointer to the parent class of an account tree model. */ static GtkObjectClass *parent_class = NULL; GType @@ -144,13 +144,13 @@ gnc_tree_model_account_get_type (void) static const GTypeInfo our_info = { sizeof (GncTreeModelAccountClass), /* class_size */ - NULL, /* base_init */ - NULL, /* base_finalize */ + NULL, /* base_init */ + NULL, /* base_finalize */ (GClassInitFunc) gnc_tree_model_account_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (GncTreeModelAccount), /* */ - 0, /* n_preallocs */ + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GncTreeModelAccount), /* */ + 0, /* n_preallocs */ (GInstanceInitFunc) gnc_tree_model_account_init }; @@ -599,7 +599,7 @@ gnc_tree_model_account_get_value (GtkTreeModel *tree_model, GncTreeModelAccount *model = GNC_TREE_MODEL_ACCOUNT (tree_model); GncTreeModelAccountPrivate *priv; Account *account; - gboolean negative; /* used to set "deficit style" aka red numbers */ + gboolean negative; /* used to set "deficit style" also known as red numbers */ gchar *string; time_t last_date; diff --git a/src/gnome-utils/gnc-tree-model-account.h b/src/gnome-utils/gnc-tree-model-account.h index f93c1c838b..e91b55d190 100644 --- a/src/gnome-utils/gnc-tree-model-account.h +++ b/src/gnome-utils/gnc-tree-model-account.h @@ -101,9 +101,9 @@ typedef enum /** The instance data structure for an account tree model. */ typedef struct { - GncTreeModel gnc_tree_model; /**< The parent object data. */ - int stamp; /**< The state of the model. Any state - * change increments this number. */ + GncTreeModel gnc_tree_model; /**< The parent object data. */ + int stamp; /**< The state of the model. Any state + * change increments this number. */ } GncTreeModelAccount;