27 #include <glib/gi18n.h> 35 #include "completioncell.h" 36 #include "gnc-component-manager.h" 39 #include "gnc-gui-query.h" 46 #include "engine-helpers.h" 52 static QofLogModule log_module = GNC_MOD_LEDGER;
55 static void gnc_split_register_load_xfer_cells (SplitRegister* reg,
59 gnc_split_register_load_recn_cells (SplitRegister* reg)
67 gnc_table_layout_get_cell (reg->table->layout, RECN_CELL);
71 s = gnc_get_reconcile_valid_flags();
73 gnc_recn_cell_set_flag_order (cell, gnc_get_reconcile_flag_order());
74 gnc_recn_cell_set_string_getter (cell, gnc_get_reconcile_str);
78 gnc_split_register_load_doclink_cells (SplitRegister* reg)
86 gnc_table_layout_get_cell (reg->table->layout, DOCLINK_CELL);
95 gnc_doclink_cell_set_read_only (cell, TRUE);
99 gnc_split_register_load_type_cells (SplitRegister* reg)
106 gnc_table_layout_get_cell (reg->table->layout, TYPE_CELL);
112 gnc_recn_cell_set_flag_order (cell,
"IP");
113 gnc_recn_cell_set_read_only (cell, TRUE);
117 gnc_split_register_load_desc_cells (SplitRegister* reg)
124 gnc_table_layout_get_cell (reg->table->layout, DESC_CELL);
194 gnc_split_register_add_transaction (SplitRegister* reg,
199 gboolean visible_splits,
200 gboolean start_primary_color,
202 Transaction* find_trans,
206 VirtualCellLocation* vcell_loc)
210 g_return_if_fail (reg);
211 g_return_if_fail (vcell_loc);
213 if (split == find_split)
214 *new_split_row = vcell_loc->virt_row;
218 TRUE, start_primary_color, *vcell_loc);
219 vcell_loc->virt_row++;
225 Split* secondary = node->data;
227 if (!xaccTransStillHasSplit (trans, secondary))
continue;
228 if (secondary == find_split && find_class == CURSOR_CLASS_SPLIT)
229 *new_split_row = vcell_loc->virt_row;
233 visible_splits, TRUE, *vcell_loc);
234 vcell_loc->virt_row++;
240 if (find_trans == trans && find_split == NULL &&
241 find_class == CURSOR_CLASS_SPLIT)
242 *new_split_row = vcell_loc->virt_row;
245 FALSE, TRUE, *vcell_loc);
246 vcell_loc->virt_row++;
251 _find_split_with_parent_txn (gconstpointer a, gconstpointer b)
253 Split* split = (Split*)a;
254 Transaction* txn = (Transaction*)b;
260 add_quickfill_completions (TableLayout* layout, Transaction* trans,
261 Split* split, gboolean has_last_num)
263 gnc_quickfill_cell_add_completion (
264 (
QuickFillCell*) gnc_table_layout_get_cell (layout, NOTES_CELL),
268 gnc_num_cell_set_last_num (
269 (
NumCell*) gnc_table_layout_get_cell (layout, NUM_CELL),
270 gnc_get_num_action (trans, split));
276 if (!xaccTransStillHasSplit (trans, s))
279 gnc_quickfill_cell_add_completion (
280 (
QuickFillCell*) gnc_table_layout_get_cell (layout, MEMO_CELL),
286 create_blank_split (
Account* default_account, SRInfo* info)
288 gboolean currency_from_account = TRUE;
289 Split* blank_split = NULL;
295 ¤cy_from_account);
297 if (default_account != NULL && !currency_from_account)
300 gnc_info_dialog (NULL,
"%s",
301 _ (
"Could not determine the account currency. " 302 "Using the default currency provided by your system."));
305 gnc_suspend_gui_refresh();
306 Transaction *pending_trans =
xaccTransLookup (&info->pending_trans_guid,
307 gnc_get_current_book());
315 info->last_date_entered);
320 xaccSplitSetParent (blank_split, pending_trans);
330 info->blank_split_edited = FALSE;
331 info->auto_complete = FALSE;
332 DEBUG (
"created new blank_split=%p", blank_split);
334 gnc_resume_gui_refresh();
339 change_account_separator (SRInfo* info, Table*
table, SplitRegister* reg)
341 info->separator_changed = FALSE;
345 (
ComboCell*) gnc_table_layout_get_cell (
table->layout, MXFRM_CELL),
346 gnc_get_account_separator());
349 (
ComboCell*) gnc_table_layout_get_cell (
table->layout, XFRM_CELL),
350 gnc_get_account_separator());
353 gnc_recn_cell_set_confirm_cb (
354 (
RecnCell*) gnc_table_layout_get_cell (
table->layout, RECN_CELL),
355 gnc_split_register_recn_cell_confirm, reg);
359 update_info (SRInfo* info, SplitRegister* reg)
364 info->cursor_hint_trans_split =
366 info->cursor_hint_cursor_class =
369 if (!info->first_pass && !info->quickfill_setup)
370 info->quickfill_setup = TRUE;
372 info->hint_set_by_traverse = FALSE;
373 info->traverse_to_new = FALSE;
374 info->exact_traversal = FALSE;
375 info->first_pass = FALSE;
376 info->reg_loaded = TRUE;
380 add_completions_from_pre_filter_slist (TableLayout* layout, GList *pre_filter_slist,
381 gboolean first_pass, gboolean quickfill_setup,
382 gboolean has_last_num)
386 for (node = pre_filter_slist; node; node = node->next)
388 Split *split = node->data;
395 if (!first_pass && !quickfill_setup)
396 add_quickfill_completions (layout, trans, split, has_last_num);
402 GList* pre_filter_slist,
Account* default_account)
405 Transaction* pending_trans;
406 CursorBuffer* cursor_buffer;
407 GHashTable* trans_table = NULL;
411 Transaction* blank_trans;
412 Transaction* find_trans;
415 Split* find_trans_split;
421 gnc_commodity *account_comm = NULL;
423 gboolean start_primary_color = TRUE;
424 gboolean found_pending = FALSE;
425 gboolean need_divider_upper = FALSE;
426 gboolean found_divider_upper = FALSE;
427 gboolean found_divider = FALSE;
428 gboolean has_last_num = FALSE;
431 gboolean we_own_slist = FALSE;
433 gnc_get_current_book());
435 GNC_PREFS_GROUP_GENERAL_REGISTER,
436 GNC_PREF_FUTURE_AFTER_BLANK);
437 gboolean added_blank_trans = FALSE;
439 VirtualCellLocation vcell_loc;
440 VirtualLocation save_loc;
442 int new_trans_split_row = -1;
443 int new_trans_row = -1;
444 int new_split_row = -1;
445 time64 present, autoreadonly_time = 0;
447 g_return_if_fail (reg);
449 g_return_if_fail (
table);
450 info = gnc_split_register_get_info (reg);
451 g_return_if_fail (info);
453 ENTER (
"reg=%p, slist=%p, default_account=%p", reg, slist, default_account);
456 gnc_get_current_book());
459 gnc_get_current_book());
469 ((
PriceCell*) gnc_table_layout_get_cell (
table->layout, DEBT_CELL),
470 gnc_commodity_print_info (account_comm, FALSE));
473 ((
PriceCell*) gnc_table_layout_get_cell (
table->layout, CRED_CELL),
474 gnc_commodity_print_info (account_comm, FALSE));
477 ((
PriceCell*) gnc_table_layout_get_cell (reg->table->layout, PRIC_CELL),
478 gnc_commodity_print_info (account_comm, FALSE));
481 if (info->first_pass)
483 gnc_doclink_cell_set_use_glyphs
488 if (blank_split == NULL)
489 blank_split = create_blank_split (default_account, info);
493 DEBUG (
"blank_split=%p, blank_trans=%p, pending_trans=%p",
494 blank_split, blank_trans, pending_trans);
500 multi_line = (reg->style == REG_STYLE_JOURNAL);
501 dynamic = (reg->style == REG_STYLE_AUTO_LEDGER);
503 lead_cursor = gnc_split_register_get_passive_cursor (reg);
504 split_cursor = gnc_table_layout_get_cursor (
table->layout, CURSOR_SPLIT);
507 if (info->traverse_to_new)
509 find_trans = blank_trans;
511 find_trans_split = blank_split;
512 find_class = CURSOR_CLASS_SPLIT;
516 find_trans = info->cursor_hint_trans;
517 find_split = info->cursor_hint_split;
518 find_trans_split = info->cursor_hint_trans_split;
519 find_class = info->cursor_hint_cursor_class;
522 save_loc =
table->current_cursor_loc;
526 if (gnc_table_current_cursor_changed (
table, TRUE) &&
529 cursor_buffer = gnc_cursor_buffer_new();
530 gnc_table_save_current_cursor (
table, cursor_buffer);
533 cursor_buffer = NULL;
537 gnc_table_control_allow_move (
table->control, FALSE);
541 VirtualLocation virt_loc;
543 gnc_virtual_location_init (&virt_loc);
548 vcell_loc.virt_row = 0;
549 vcell_loc.virt_col = 0;
552 vcell_loc.virt_row++;
556 if (use_autoreadonly)
564 if (info->first_pass)
574 cell = (
NumCell*) gnc_table_layout_get_cell (
table->layout, NUM_CELL);
575 gnc_num_cell_set_last_num (cell, last_num);
581 gnc_split_register_load_xfer_cells (reg, default_account);
582 gnc_split_register_load_desc_cells (reg);
583 gnc_split_register_load_doclink_cells (reg);
584 gnc_split_register_load_recn_cells (reg);
585 gnc_split_register_load_type_cells (reg);
588 if (info->separator_changed)
589 change_account_separator (info,
table, reg);
591 table->model->dividing_row_upper = -1;
592 table->model->dividing_row = -1;
593 table->model->dividing_row_lower = -1;
597 if (pending_trans != NULL)
601 Split* pending_split = (Split*)node->data;
602 if (!xaccTransStillHasSplit (pending_trans, pending_split))
continue;
603 if (g_list_find (slist, pending_split) != NULL)
606 if (g_list_find_custom (slist, pending_trans,
607 _find_split_with_parent_txn) != NULL)
613 slist = g_list_copy (slist);
616 slist = g_list_append (slist, pending_split);
621 trans_table = g_hash_table_new (g_direct_hash, g_direct_equal);
624 if (
table->model->reverse_sort && !future_after_blank)
626 if (blank_trans == find_trans)
627 new_trans_row = vcell_loc.virt_row;
629 if (blank_split == find_trans_split)
630 new_trans_split_row = vcell_loc.virt_row;
633 if (info->first_pass)
635 save_loc.vcell_loc = vcell_loc;
636 save_loc.phys_row_offset = 0;
637 save_loc.phys_col_offset = 0;
641 table->model->blank_trans_row = vcell_loc.virt_row;
643 gnc_split_register_add_transaction (reg,
644 blank_trans, blank_split,
645 lead_cursor, split_cursor,
646 multi_line, start_primary_color,
647 info->blank_split_edited,
648 find_trans, find_split,
649 find_class, &new_split_row,
653 start_primary_color = !start_primary_color;
655 added_blank_trans = TRUE;
658 gnc_completion_cell_clear_menu (
659 (
CompletionCell*) gnc_table_layout_get_cell (reg->table->layout, DESC_CELL));
662 (
CompletionCell*) gnc_table_layout_get_cell (reg->table->layout, DESC_CELL),
663 table->model->reverse_sort);
665 if (!info->first_pass && pre_filter_slist)
667 add_completions_from_pre_filter_slist (reg->table->layout, pre_filter_slist,
668 info->first_pass, info->quickfill_setup,
673 for (node = slist; node; node = node->next)
678 if (!xaccTransStillHasSplit (trans, split))
681 if (pending_trans == trans)
682 found_pending = TRUE;
692 if (trans == blank_trans)
698 if (g_hash_table_lookup (trans_table, trans))
701 g_hash_table_insert (trans_table, trans, trans);
704 if (info->show_present_divider &&
706 !found_divider_upper)
711 table->model->dividing_row_upper = vcell_loc.virt_row;
712 found_divider_upper = TRUE;
716 need_divider_upper = TRUE;
720 if (info->show_present_divider && !found_divider &&
724 gint count_blank_splits = 1;
725 gint virt_row_offset = 2;
726 gboolean show_lower_divider = FALSE;
728 if (
table->model->reverse_sort)
732 if (count_blank_splits > 1)
733 count_blank_splits ++;
735 if (
table->model->reverse_sort && future_after_blank)
739 if ((
table->model->reverse_sort && vcell_loc.virt_row != count_blank_splits + virt_row_offset) ||
740 !
table->model->reverse_sort)
742 table->model->dividing_row = vcell_loc.virt_row;
743 show_lower_divider = TRUE;
746 found_divider = TRUE;
748 if (future_after_blank)
750 if (blank_trans == find_trans)
751 new_trans_row = vcell_loc.virt_row;
753 if (blank_split == find_trans_split)
754 new_trans_split_row = vcell_loc.virt_row;
757 if (info->first_pass)
759 save_loc.vcell_loc = vcell_loc;
760 save_loc.phys_row_offset = 0;
761 save_loc.phys_col_offset = 0;
765 table->model->blank_trans_row = vcell_loc.virt_row;
767 gnc_split_register_add_transaction (reg,
768 blank_trans, blank_split,
769 lead_cursor, split_cursor,
770 multi_line, start_primary_color,
771 info->blank_split_edited,
772 find_trans, find_split,
773 find_class, &new_split_row,
777 if (show_lower_divider)
778 table->model->dividing_row_lower = vcell_loc.virt_row;
781 start_primary_color = !start_primary_color;
783 added_blank_trans = TRUE;
789 if (!info->first_pass && !pre_filter_slist && !info->quickfill_setup)
790 add_quickfill_completions (reg->table->layout, trans, split, has_last_num);
792 if (!info->first_pass && !pre_filter_slist)
795 (
CompletionCell*) gnc_table_layout_get_cell (reg->table->layout, DESC_CELL),
799 if (trans == find_trans)
800 new_trans_row = vcell_loc.virt_row;
802 if (split == find_trans_split)
803 new_trans_split_row = vcell_loc.virt_row;
805 gnc_split_register_add_transaction (reg, trans, split,
806 lead_cursor, split_cursor,
807 multi_line, start_primary_color,
809 find_trans, find_split, find_class,
810 &new_split_row, &vcell_loc);
813 start_primary_color = !start_primary_color;
817 g_hash_table_destroy (trans_table);
820 if (pending_trans == blank_trans)
821 found_pending = TRUE;
824 if (info->show_present_divider &&
826 !found_divider_upper && need_divider_upper)
828 table->model->dividing_row_upper = vcell_loc.virt_row;
838 else if (pending_trans)
839 g_assert_not_reached();
841 pending_trans = NULL;
844 if (!added_blank_trans)
846 if (blank_trans == find_trans)
847 new_trans_row = vcell_loc.virt_row;
849 if (blank_split == find_trans_split)
850 new_trans_split_row = vcell_loc.virt_row;
853 if (info->first_pass)
855 save_loc.vcell_loc = vcell_loc;
856 save_loc.phys_row_offset = 0;
857 save_loc.phys_col_offset = 0;
861 table->model->blank_trans_row = vcell_loc.virt_row;
863 gnc_split_register_add_transaction (reg, blank_trans, blank_split,
864 lead_cursor, split_cursor,
865 multi_line, start_primary_color,
866 info->blank_split_edited,
867 find_trans, find_split,
868 find_class, &new_split_row,
871 if (future_after_blank)
873 table->model->dividing_row_lower = vcell_loc.virt_row;
878 if (info->first_pass)
881 new_trans_split_row = -1;
891 VirtualLocation trans_split_loc;
893 if (new_split_row > 0)
894 save_loc.vcell_loc.virt_row = new_split_row;
895 else if (new_trans_split_row > 0)
896 save_loc.vcell_loc.virt_row = new_trans_split_row;
897 else if (new_trans_row > 0)
898 save_loc.vcell_loc.virt_row = new_trans_row;
900 trans_split_loc = save_loc;
902 gnc_split_register_get_trans_split (reg, save_loc.vcell_loc,
903 &trans_split_loc.vcell_loc);
905 if (dynamic || multi_line || info->trans_expanded)
908 table, trans_split_loc.vcell_loc,
909 gnc_split_register_get_active_cursor (reg));
913 info->trans_expanded = (reg->style == REG_STYLE_LEDGER);
917 save_loc = trans_split_loc;
918 info->trans_expanded = FALSE;
924 new_split_row = save_loc.vcell_loc.virt_row;
927 gnc_table_restore_current_cursor (
table, cursor_buffer);
930 gnc_cursor_buffer_destroy (cursor_buffer);
931 cursor_buffer = NULL;
933 update_info (info, reg);
935 gnc_split_register_set_cell_fractions (
941 if (
table->model->reverse_sort)
943 VirtualCellLocation vc_loc;
946 gnc_split_register_show_trans (reg, vc_loc);
949 gnc_split_register_show_trans (reg,
table->current_cursor_loc.vcell_loc);
952 gnc_table_control_allow_move (
table->control, TRUE);
962 #define QKEY "split_reg_shared_quickfill" 965 skip_cb (
Account* account, gpointer x)
975 gnc_split_register_load_xfer_cells (SplitRegister* reg,
Account* base_account)
985 root = gnc_get_current_root_account();
990 store = gnc_get_shared_account_name_list_store (root, QKEY, skip_cb, NULL);
993 gnc_table_layout_get_cell (reg->table->layout, XFRM_CELL);
995 gnc_combo_cell_use_list_store_cache (cell, store);
998 gnc_table_layout_get_cell (reg->table->layout, MXFRM_CELL);
1000 gnc_combo_cell_use_list_store_cache (cell, store);
CursorClass gnc_split_register_get_current_cursor_class(SplitRegister *reg)
Returns the class of a register's current cursor.
Split * gnc_split_register_get_current_trans_split(SplitRegister *reg, VirtualCellLocation *trans_split_loc)
Gets the anchoring split of the transaction at the current cursor location, which may be on the trans...
void gnc_recn_cell_set_valid_flags(RecnCell *cell, const char *flags, char default_flag)
note that chars is copied into the RecnCell directly, but remains the "property" of the caller...
The RecnCell object implements a cell handler that will cycle through a series of single-character va...
Transaction * xaccMallocTransaction(QofBook *book)
The xaccMallocTransaction() will malloc memory and initialize it.
The CompletionCell object implements a cell handler with a "combination-box" pull-down menu in it...
const char * xaccAccountGetLastNum(const Account *acc)
Get the last num field of an Account.
void xaccTransSetDatePostedSecsNormalized(Transaction *trans, time64 time)
This function sets the posted date of the transaction, specified by a time64 (see ctime(3))...
time64 xaccTransGetDate(const Transaction *trans)
Retrieve the posted date of the transaction.
void gnc_completion_cell_reverse_sort(CompletionCell *cell, gboolean is_reversed)
Register the sort direction.
void gnc_completion_cell_set_sort_enabled(CompletionCell *cell, gboolean enabled)
Enable sorting of the menu item's contents.
gboolean xaccTransIsOpen(const Transaction *trans)
The xaccTransIsOpen() method returns TRUE if the transaction is open for editing. ...
utility functions for the GnuCash UI
The QuickFillCell implements a text cell with quick-fill capabilities.
void gnc_split_register_set_trans_visible(SplitRegister *reg, VirtualCellLocation vcell_loc, gboolean visible, gboolean only_blank_split)
Set the visibility of the split rows belonging to a transaction located at vcell_loc.
Transaction * gnc_split_register_get_current_trans(SplitRegister *reg)
Gets the transaction at the current cursor location, which may be on the transaction itself or on any...
#define DEBUG(format, args...)
Print a debugging message.
Create an account-name quick-fill.
void gnc_table_move_cursor_gui(Table *table, VirtualLocation new_virt_loc)
will move the cursor and its GUI to the indicated location.
gboolean gnc_table_find_close_valid_cell(Table *table, VirtualLocation *virt_loc, gboolean exact_pointer)
Find a close valid cell.
void gnc_table_set_size(Table *table, int virt_rows, int virt_cols)
The gnc_table_set_size() method will resize the table to the indicated dimensions.
Transaction * xaccSplitGetParent(const Split *split)
Returns the parent transaction of the split.
The Doclinkcell object implements a cell handler that will cycle through a series of single-character...
void gnc_split_register_load(SplitRegister *reg, GList *slist, GList *pre_filter_slist, Account *default_account)
Populates the rows of a register.
#define ENTER(format, args...)
Print a function entry debugging message.
void gnc_combo_cell_set_complete_char(ComboCell *cell, gunichar complete_char)
Sets a character used for special completion processing.
QuickFill * gnc_get_shared_account_name_quickfill(Account *root, const char *key, AccountBoolCB cb, gpointer cb_data)
Create/fetch a quickfill of account names.
void xaccTransSetCurrency(Transaction *trans, gnc_commodity *curr)
Set a new currency on a transaction.
gnc_commodity * gnc_default_currency(void)
Return the default currency set by the user.
const char * xaccTransGetNotes(const Transaction *trans)
Gets the transaction Notes.
Transaction * xaccTransLookup(const GncGUID *guid, QofBook *book)
The xaccTransLookup() subroutine will return the transaction associated with the given id...
int xaccTransCountSplits(const Transaction *trans)
Returns the number of splits in this transaction.
#define xaccAccountGetGUID(X)
GDate * qof_book_get_autoreadonly_gdate(const QofBook *book)
Returns the GDate that is the threshold for auto-read-only.
Split * xaccSplitLookup(const GncGUID *guid, QofBook *book)
The xaccSplitLookup() subroutine will return the split associated with the given id, or NULL if there is no such split.
void gnc_table_refresh_gui(Table *table, gboolean do_scroll)
Refresh the whole GUI from the table.
Account handling public routines.
The ComboCell object implements a cell handler with a "combination-box" pull-down menu in it...
void gnc_doclink_cell_set_valid_flags(Doclinkcell *cell, const char *flags, char default_flag)
note that
CursorClass
Types of cursors.
The PriceCell object implements a cell handler that stores a single double-precision value...
const char * gnc_get_doclink_flag_order(void)
Get a string containing document link flag order.
#define CURSOR_HEADER
Standard Cursor Names.
private declarations for SplitRegister
const char * xaccTransGetDescription(const Transaction *trans)
Gets the transaction Description.
time64 gdate_to_time64(GDate d)
Turns a GDate into a time64, returning the first second of the day.
void gnc_table_set_vcell(Table *table, CellBlock *cursor, gconstpointer vcell_data, gboolean visible, gboolean start_primary_color, VirtualCellLocation vcell_loc)
Indicate what handler should be used for a given virtual block.
void xaccTransCommitEdit(Transaction *trans)
The xaccTransCommitEdit() method indicates that the changes to the transaction and its splits are com...
#define xaccSplitGetGUID(X)
void xaccTransBeginEdit(Transaction *trans)
The xaccTransBeginEdit() method must be called before any changes are made to a transaction or any of...
API for checkbook register display area.
gnc_commodity * gnc_account_get_currency_or_parent(const Account *account)
Returns a gnc_commodity that is a currency, suitable for being a Transaction's currency.
Split * xaccMallocSplit(QofBook *book)
Constructor.
#define xaccTransGetGUID(X)
Generic api to store and retrieve preferences.
void gnc_completion_cell_add_menu_item(CompletionCell *cell, const char *menustr)
Add a menu item to the hash table list.
gnc_commodity * gnc_account_or_default_currency(const Account *account, gboolean *currency_from_account_found)
Returns a gnc_commodity that is a currency, suitable for being a Transaction's currency.
The NumCell object implements a number handling cell.
void gnc_price_cell_set_print_info(PriceCell *cell, GNCPrintAmountInfo print_info)
set the printing context of the price cell
Account * xaccSplitGetAccount(const Split *split)
Returns the account of this split, which was set through xaccAccountInsertSplit().
const GncGUID * guid_null(void)
Returns a GncGUID which is guaranteed to never reference any entity.
gboolean xaccAccountGetPlaceholder(const Account *acc)
Get the "placeholder" flag for an account.
void gnc_table_set_virt_cell_cursor(Table *table, VirtualCellLocation vcell_loc, CellBlock *cursor)
Set the cellblock handler for a virtual cell.
time64 gnc_time64_get_today_end(void)
The gnc_time64_get_today_end() routine returns a time64 value corresponding to the last second of tod...
gboolean gnc_prefs_get_bool(const gchar *group, const gchar *pref_name)
Get a boolean value from the preferences backend.
#define LEAVE(format, args...)
Print a function exit debugging message.
void gnc_combo_cell_use_quickfill_cache(ComboCell *cell, QuickFill *shared_qf)
Tell the combocell to use a shared QuickFill object.
const char * gnc_get_doclink_str(char link_flag)
Get a string representing the document link type.
const char * xaccSplitGetMemo(const Split *split)
Returns the memo string.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
const char * gnc_get_doclink_valid_flags(void)
Get a string containing documentation link valid flags.
gboolean qof_book_uses_autoreadonly(const QofBook *book)
Returns TRUE if the auto-read-only feature should be used, otherwise FALSE.
Account * gnc_account_get_root(Account *acc)
This routine returns the root account of the account tree that the specified account belongs to...
API for Transactions and Splits (journal entries)
Split * gnc_split_register_get_current_split(SplitRegister *reg)
Returns the split at which the cursor is currently located.
SplitList * xaccTransGetSplitList(const Transaction *trans)
The xaccTransGetSplitList() method returns a GList of the splits in a transaction.