mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
More comments, spelling fixes, line-wraps, whitespace cleanups.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14615 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -167,7 +167,7 @@ void gnc_gconf_suggest_sync (void);
|
||||
|
||||
/** 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
|
||||
|
||||
@@ -193,7 +193,8 @@ xaccAccountFindEarliestOpenLot (Account *acc, gnc_numeric sign,
|
||||
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 @@ xaccSplitGetGainsSourceSplit (const Split *split)
|
||||
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 @@ xaccSplitComputeCapGains(Split *split, Account *gain_acc)
|
||||
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 @@ xaccSplitComputeCapGains(Split *split, Account *gain_acc)
|
||||
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 @@ xaccSplitGetCapGains(Split * split)
|
||||
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 @@ xaccLotComputeCapGains (GNCLot *lot, Account *gain_acc)
|
||||
|
||||
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 @@ xaccLotComputeCapGains (GNCLot *lot, Account *gain_acc)
|
||||
|
||||
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);
|
||||
|
||||
@@ -427,7 +427,8 @@ typedef struct {
|
||||
* @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 @@ gnc_main_window_restore_page (GncMainWindow *window, GncMainWindowSaveData *data
|
||||
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) {
|
||||
|
||||
@@ -313,7 +313,7 @@ gnc_plugin_set_important_actions (GtkActionGroup *action_group,
|
||||
}
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,8 @@ gnc_window_update_status (GncWindow *window, GncPluginPage *page)
|
||||
}
|
||||
|
||||
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_show_progress (const char *message, double percentage)
|
||||
(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));
|
||||
}
|
||||
|
||||
@@ -578,7 +578,7 @@ gnc_plugin_page_account_tree_recreate_page (GtkWidget *window,
|
||||
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),
|
||||
|
||||
@@ -93,7 +93,8 @@ static QofLogModule log_module = GNC_MOD_GUI;
|
||||
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 @@ gnc_restore_all_state (gpointer session, gpointer unused)
|
||||
#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. */
|
||||
|
||||
@@ -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 @@ void gnc_ledger_display_set_handlers (GNCLedgerDisplay *ld,
|
||||
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 */
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -132,6 +132,10 @@ table_destroy_cb (Table *table)
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -124,17 +124,13 @@ get_rv(void)
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user