r14615 - gnucash/trunk/src - More comments, spelling fixes, line-wraps, whitespace cleanups.
Chris Shoemaker
chris at cvs.gnucash.org
Tue Aug 8 19:16:55 EDT 2006
Author: chris
Date: 2006-08-08 19:16:54 -0400 (Tue, 08 Aug 2006)
New Revision: 14615
Trac: http://svn.gnucash.org/trac/changeset/14615
Modified:
gnucash/trunk/src/core-utils/gnc-gconf-utils.h
gnucash/trunk/src/engine/cap-gains.c
gnucash/trunk/src/gnome-utils/gnc-main-window.c
gnucash/trunk/src/gnome-utils/gnc-plugin.c
gnucash/trunk/src/gnome-utils/gnc-window.c
gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c
gnucash/trunk/src/gnome/top-level.c
gnucash/trunk/src/register/ledger-core/gnc-ledger-display.h
gnucash/trunk/src/register/register-core/table-allgui.h
gnucash/trunk/src/register/register-gnome/table-gnome.c
gnucash/trunk/src/test-core/test-stuff.c
Log:
More comments, spelling fixes, line-wraps, whitespace cleanups.
Modified: gnucash/trunk/src/core-utils/gnc-gconf-utils.h
===================================================================
--- gnucash/trunk/src/core-utils/gnc-gconf-utils.h 2006-08-08 22:55:02 UTC (rev 14614)
+++ gnucash/trunk/src/core-utils/gnc-gconf-utils.h 2006-08-08 23:16:54 UTC (rev 14615)
@@ -167,7 +167,7 @@
/** Register a callback for when a specific key in the general section
* of Gnucash's gconf data is changed. Any time the key's value
- * chagnes, the routine will be invoked and will be passed both the
+ * changes, the routine will be invoked and will be passed both the
* changes gconf entry and the user data passed to this function.
*
* @param key This value contains the name of the key within the
Modified: gnucash/trunk/src/engine/cap-gains.c
===================================================================
--- gnucash/trunk/src/engine/cap-gains.c 2006-08-08 22:55:02 UTC (rev 14614)
+++ gnucash/trunk/src/engine/cap-gains.c 2006-08-08 23:16:54 UTC (rev 14615)
@@ -193,7 +193,8 @@
gnc_commodity *currency)
{
GNCLot *lot;
- ENTER (" sign=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, sign.num, sign.denom);
+ ENTER (" sign=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, sign.num,
+ sign.denom);
lot = xaccAccountFindOpenLot (acc, sign, currency,
G_MAXUINT64, earliest_pred);
@@ -683,8 +684,8 @@
if (!source_guid) return NULL;
/* Both splits will be in the same collection, so search there. */
- source_split = (Split*) qof_collection_lookup_entity (split->inst.entity.collection,
- source_guid);
+ source_split = (Split*) qof_collection_lookup_entity(
+ split->inst.entity.collection, source_guid);
PINFO ("split=%p has source-split=%p", split, source_split);
return source_split;
}
@@ -848,7 +849,7 @@
gnc_numeric_abs(split->amount)))
{
GList *n;
- for (n=lot->splits; n; n=n->next)
+ for (n = lot->splits; n; n = n->next)
{
Split *s = n->data;
PINFO ("split amt=%s", gnc_num_dbg_to_string(s->amount));
@@ -867,7 +868,7 @@
gnc_numeric_negative_p(split->amount)))
{
GList *n;
- for (n=lot->splits; n; n=n->next)
+ for (n = lot->splits; n; n = n->next)
{
Split *s = n->data;
PINFO ("split amt=%s", gnc_num_dbg_to_string(s->amount));
@@ -1061,9 +1062,11 @@
if (!split) return gnc_numeric_zero();
ENTER("(split=%p)", split);
- if (GAINS_STATUS_UNKNOWN == split->gains) xaccSplitDetermineGainStatus(split);
+ if (GAINS_STATUS_UNKNOWN == split->gains)
+ xaccSplitDetermineGainStatus(split);
if ((split->gains & GAINS_STATUS_A_VDIRTY) ||
- (split->gains_split && (split->gains_split->gains & GAINS_STATUS_A_VDIRTY)))
+ (split->gains_split &&
+ (split->gains_split->gains & GAINS_STATUS_A_VDIRTY)))
{
xaccSplitComputeCapGains (split, NULL);
}
@@ -1098,12 +1101,13 @@
ENTER("(lot=%p)", lot);
pcy = lot->account->policy;
- for (node=lot->splits; node; node=node->next)
+ for (node = lot->splits; node; node = node->next)
{
Split *s = node->data;
if (pcy->PolicyIsOpeningSplit(pcy,lot,s))
{
- if (GAINS_STATUS_UNKNOWN == s->gains) xaccSplitDetermineGainStatus (s);
+ if (GAINS_STATUS_UNKNOWN == s->gains)
+ xaccSplitDetermineGainStatus(s);
if (s->gains & GAINS_STATUS_VDIRTY)
{
is_dirty = TRUE;
@@ -1114,14 +1118,14 @@
if (is_dirty)
{
- for (node=lot->splits; node; node=node->next)
+ for (node = lot->splits; node; node = node->next)
{
Split *s = node->data;
s->gains |= GAINS_STATUS_VDIRTY;
}
}
- for (node=lot->splits; node; node=node->next)
+ for (node = lot->splits; node; node = node->next)
{
Split *s = node->data;
xaccSplitComputeCapGains (s, gain_acc);
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c 2006-08-08 22:55:02 UTC (rev 14614)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c 2006-08-08 23:16:54 UTC (rev 14615)
@@ -578,7 +578,7 @@
account_page = GNC_PLUGIN_PAGE_ACCOUNT_TREE(page);
priv = GNC_PLUGIN_PAGE_ACCOUNT_TREE_GET_PRIVATE(account_page);
- /* Install it now so we can them manipulate the created widget */
+ /* Install it now so we can then manipulate the created widget */
gnc_main_window_open_page(GNC_MAIN_WINDOW(window), page);
gnc_tree_view_account_restore(GNC_TREE_VIEW_ACCOUNT(priv->tree_view),
Modified: gnucash/trunk/src/gnome/top-level.c
===================================================================
--- gnucash/trunk/src/gnome/top-level.c 2006-08-08 22:55:02 UTC (rev 14614)
+++ gnucash/trunk/src/gnome/top-level.c 2006-08-08 23:16:54 UTC (rev 14615)
@@ -93,7 +93,8 @@
entity = qof_collection_lookup_entity (col, &guid); \
if (NULL == entity) \
{ \
- result->error_message = g_strdup_printf (_("Entity Not Found: %s"), location); \
+ result->error_message = g_strdup_printf (_("Entity Not Found: %s"), \
+ location); \
return FALSE; \
} \
@@ -247,8 +248,8 @@
#if (GNUCASH_MAJOR_VERSION < 2) || ((GNUCASH_MAJOR_VERSION == 2) && (GNUCASH_MINOR_VERSION == 0))
/* See if there's an old style state file to be found */
scm_call_1(scm_c_eval_string("gnc:main-window-book-open-handler"),
- (session ?
- gw_wcp_assimilate_ptr (session, scm_c_eval_string("<gnc:Session*>")) :
+ (session ? gw_wcp_assimilate_ptr(
+ session, scm_c_eval_string("<gnc:Session*>")) :
SCM_BOOL_F));
/* At this point the reports have only been loaded into
memory. Now we create their ui component. */
Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c 2006-08-08 22:55:02 UTC (rev 14614)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c 2006-08-08 23:16:54 UTC (rev 14615)
@@ -427,7 +427,8 @@
* @param data A data structure containing state about the
* window/page restoration process. */
static void
-gnc_main_window_restore_page (GncMainWindow *window, GncMainWindowSaveData *data)
+gnc_main_window_restore_page (GncMainWindow *window,
+ GncMainWindowSaveData *data)
{
GncMainWindowPrivate *priv;
GncPluginPage *page;
@@ -436,10 +437,12 @@
GError *error = NULL;
ENTER("window %p, data %p (key file %p, window %d, page start %d, page num %d)",
- window, data, data->key_file, data->window_num, data->page_offset, data->page_num);
+ window, data, data->key_file, data->window_num, data->page_offset,
+ data->page_num);
priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
- page_group = g_strdup_printf(PAGE_STRING, data->page_offset + data->page_num);
+ page_group = g_strdup_printf(PAGE_STRING,
+ data->page_offset + data->page_num);
page_type = g_key_file_get_string(data->key_file, page_group,
PAGE_TYPE, &error);
if (error) {
Modified: gnucash/trunk/src/gnome-utils/gnc-plugin.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-plugin.c 2006-08-08 22:55:02 UTC (rev 14614)
+++ gnucash/trunk/src/gnome-utils/gnc-plugin.c 2006-08-08 23:16:54 UTC (rev 14615)
@@ -313,7 +313,7 @@
}
/* If this trips, you've got too many "important" actions. That
- * can't *all* me that important, can they? */
+ * can't *all* be that important, can they? */
g_assert(i <= 3);
}
Modified: gnucash/trunk/src/gnome-utils/gnc-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-window.c 2006-08-08 22:55:02 UTC (rev 14614)
+++ gnucash/trunk/src/gnome-utils/gnc-window.c 2006-08-08 23:16:54 UTC (rev 14615)
@@ -116,7 +116,8 @@
}
void
-gnc_window_set_status (GncWindow *window, GncPluginPage *page, const gchar *message)
+gnc_window_set_status (GncWindow *window, GncPluginPage *page,
+ const gchar *message)
{
g_return_if_fail(GNC_WINDOW (window));
g_return_if_fail(GNC_PLUGIN_PAGE (page));
@@ -185,7 +186,8 @@
(GNC_WINDOW_GET_IFACE(window)->ui_set_sensitive != NULL))
GNC_WINDOW_GET_IFACE(window)->ui_set_sensitive(window, FALSE);
if (percentage <= 100) {
- gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progressbar), percentage/100);
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progressbar),
+ percentage/100);
} else {
gtk_progress_bar_pulse(GTK_PROGRESS_BAR(progressbar));
}
Modified: gnucash/trunk/src/register/ledger-core/gnc-ledger-display.h
===================================================================
--- gnucash/trunk/src/register/ledger-core/gnc-ledger-display.h 2006-08-08 22:55:02 UTC (rev 14614)
+++ gnucash/trunk/src/register/ledger-core/gnc-ledger-display.h 2006-08-08 23:16:54 UTC (rev 14615)
@@ -36,14 +36,15 @@
/** Definitions *****************************************************/
-/* The xaccLedgerDisplay struct describes a single register/ledger
- * instance. */
+/* The GNCLedgerDisplay struct describes a single register/ledger
+ * instance. It has a SplitRegister specially configured for
+ * displaying the results of a Query. It also stores the Query. */
typedef struct gnc_ledger_display GNCLedgerDisplay;
typedef void (*GNCLedgerDisplayDestroy) (GNCLedgerDisplay *ld);
typedef gncUIWidget (*GNCLedgerDisplayGetParent) (GNCLedgerDisplay *ld);
typedef void (*GNCLedgerDisplaySetHelp) (GNCLedgerDisplay *ld,
- const char *help_str);
+ const char *help_str);
typedef enum
{
@@ -70,7 +71,7 @@
GNCLedgerDisplayDestroy destroy,
GNCLedgerDisplayGetParent get_parent);
-/** Returns the parent of a given */
+/** Returns the parent of a given ledger display */
gncUIWidget gnc_ledger_display_get_parent( GNCLedgerDisplay *ld );
/* return the split register associated with a ledger display */
Modified: gnucash/trunk/src/register/register-core/table-allgui.h
===================================================================
--- gnucash/trunk/src/register/register-core/table-allgui.h 2006-08-08 22:55:02 UTC (rev 14614)
+++ gnucash/trunk/src/register/register-core/table-allgui.h 2006-08-08 23:16:54 UTC (rev 14615)
@@ -42,7 +42,6 @@
*
* CONCEPTS:
* The following apply to the rows in a table:
- * -- a phys row can belong to only one virt row at a time.
* -- a cursor is always the same size as the virt row its on,
* -- there is only one cursor for a given virt row.
* -- there is no overlap; a phys row can only belong to one virt row.
Modified: gnucash/trunk/src/register/register-gnome/table-gnome.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/table-gnome.c 2006-08-08 22:55:02 UTC (rev 14614)
+++ gnucash/trunk/src/register/register-gnome/table-gnome.c 2006-08-08 23:16:54 UTC (rev 14615)
@@ -132,6 +132,10 @@
table->ui_data = NULL;
}
+
+/* Um, this function checks that data is not null but never uses it.
+ Weird. Also, since this function only works with a GnucashRegister
+ widget, maybe some of it should be moved to gnucash-sheet.c. */
void
gnc_table_init_gui (gncUIWidget widget, void *data)
{
Modified: gnucash/trunk/src/test-core/test-stuff.c
===================================================================
--- gnucash/trunk/src/test-core/test-stuff.c 2006-08-08 22:55:02 UTC (rev 14614)
+++ gnucash/trunk/src/test-core/test-stuff.c 2006-08-08 23:16:54 UTC (rev 14615)
@@ -124,17 +124,13 @@
}
gboolean
-do_test_call(
- gboolean result,
- const char* test_title,
- const char* filename,
- int line )
+do_test_call(gboolean result, const char* test_title, const char* filename,
+ int line )
{
- if( result ) {
+ if (result)
success_args( test_title, filename, line, "" );
- } else {
+ else
failure_args( test_title, filename, line, "" );
- }
return result;
}
More information about the gnucash-changes
mailing list