Change some spacing in source files account-quickfill.*

This commit is contained in:
Robert Fewell 2020-01-09 14:49:25 +00:00
parent 936e2bf371
commit 5bfef54d6d
2 changed files with 73 additions and 75 deletions

View File

@ -108,7 +108,6 @@ shared_quickfill_find_accounts (GtkTreeModel *model,
return (data->accounts == NULL); return (data->accounts == NULL);
} }
} }
return FALSE; return FALSE;
} }
@ -124,11 +123,13 @@ load_shared_qf_cb (Account *account, gpointer data)
if (qfb->dont_add_cb) if (qfb->dont_add_cb)
{ {
gboolean skip = (qfb->dont_add_cb) (account, qfb->dont_add_data); gboolean skip = (qfb->dont_add_cb) (account, qfb->dont_add_data);
if (skip) return; if (skip)
return;
} }
name = gnc_get_account_name_for_register (account); name = gnc_get_account_name_for_register (account);
if (NULL == name) return; if (NULL == name)
return;
gnc_quickfill_insert (qfb->qf, name, QUICKFILL_ALPHA); gnc_quickfill_insert (qfb->qf, name, QUICKFILL_ALPHA);
if (qfb->load_list_store) if (qfb->load_list_store)
{ {
@ -173,8 +174,8 @@ build_shared_quickfill (QofBook *book, Account *root, const char * key,
qfb->dont_add_cb = cb; qfb->dont_add_cb = cb;
qfb->dont_add_data = data; qfb->dont_add_data = data;
qfb->load_list_store = TRUE; qfb->load_list_store = TRUE;
qfb->list_store = qfb->list_store = gtk_list_store_new (NUM_ACCOUNT_COLUMNS,
gtk_list_store_new (NUM_ACCOUNT_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER); G_TYPE_STRING, G_TYPE_POINTER);
gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL, gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
GNC_PREF_ACCOUNT_SEPARATOR, GNC_PREF_ACCOUNT_SEPARATOR,
@ -189,8 +190,7 @@ build_shared_quickfill (QofBook *book, Account *root, const char * key,
gnc_account_foreach_descendant (root, load_shared_qf_cb, qfb); gnc_account_foreach_descendant (root, load_shared_qf_cb, qfb);
qfb->load_list_store = FALSE; qfb->load_list_store = FALSE;
qfb->listener = qfb->listener = qof_event_register_handler (listen_for_account_events, qfb);
qof_event_register_handler (listen_for_account_events, qfb);
qof_book_set_data_fin (book, key, qfb, shared_quickfill_destroy); qof_book_set_data_fin (book, key, qfb, shared_quickfill_destroy);
@ -198,8 +198,7 @@ build_shared_quickfill (QofBook *book, Account *root, const char * key,
} }
QuickFill * QuickFill *
gnc_get_shared_account_name_quickfill (Account *root, gnc_get_shared_account_name_quickfill (Account *root, const char * key,
const char * key,
AccountBoolCB cb, gpointer cb_data) AccountBoolCB cb, gpointer cb_data)
{ {
QFB *qfb; QFB *qfb;
@ -208,15 +207,15 @@ gnc_get_shared_account_name_quickfill (Account *root,
book = gnc_account_get_book (root); book = gnc_account_get_book (root);
qfb = qof_book_get_data (book, key); qfb = qof_book_get_data (book, key);
if (qfb) return qfb->qf; if (qfb)
return qfb->qf;
qfb = build_shared_quickfill (book, root, key, cb, cb_data); qfb = build_shared_quickfill (book, root, key, cb, cb_data);
return qfb->qf; return qfb->qf;
} }
GtkListStore * GtkListStore *
gnc_get_shared_account_name_list_store (Account *root, gnc_get_shared_account_name_list_store (Account *root, const char * key,
const char * key,
AccountBoolCB cb, gpointer cb_data) AccountBoolCB cb, gpointer cb_data)
{ {
QFB *qfb; QFB *qfb;
@ -225,7 +224,8 @@ gnc_get_shared_account_name_list_store (Account *root,
book = gnc_account_get_book (root); book = gnc_account_get_book (root);
qfb = qof_book_get_data (book, key); qfb = qof_book_get_data (book, key);
if (qfb) return qfb->list_store; if (qfb)
return qfb->list_store;
qfb = build_shared_quickfill (book, root, key, cb, cb_data); qfb = build_shared_quickfill (book, root, key, cb, cb_data);
return qfb->list_store; return qfb->list_store;

View File

@ -68,13 +68,11 @@ typedef gboolean (*AccountBoolCB) (Account *, gpointer);
* it). This code does not currently listen to account-destroy * it). This code does not currently listen to account-destroy
* events. * events.
*/ */
QuickFill * gnc_get_shared_account_name_quickfill (Account *root, QuickFill *
const char * key, gnc_get_shared_account_name_quickfill (Account *root, const char * key,
AccountBoolCB skip_cb, AccountBoolCB skip_cb, gpointer cb_data);
gpointer cb_data);
GtkListStore * GtkListStore *
gnc_get_shared_account_name_list_store (Account *root, gnc_get_shared_account_name_list_store (Account *root, const char * key,
const char * key,
AccountBoolCB cb, gpointer cb_data); AccountBoolCB cb, gpointer cb_data);
#endif #endif