[3/3][gnc-ui-util.c] Remove unused functions

These functions were used to (optionally) reverse amounts according to
whether the feature GNC_FEATURE_BUDGET_UNREVERSED was set. They are
now obsolete because code will now assume feature is set for all
loaded datafiles.
This commit is contained in:
Christopher Lam 2021-12-02 22:28:49 +08:00
parent 972fd45202
commit 91b1d291a5
3 changed files with 0 additions and 29 deletions

View File

@ -108,8 +108,6 @@ const char * xaccPrintAmount (gnc_numeric val, GNCPrintAmountInfo info);
gchar *number_to_words(gdouble val, gint64 denom); gchar *number_to_words(gdouble val, gint64 denom);
const gchar *printable_value (gdouble val, gint denom); const gchar *printable_value (gdouble val, gint denom);
gboolean gnc_using_unreversed_budgets (QofBook* book);
gboolean gnc_reverse_budget_balance (const Account *account, gboolean unreversed);
gboolean gnc_reverse_balance (const Account *account); gboolean gnc_reverse_balance (const Account *account);
gboolean gnc_is_euro_currency(const gnc_commodity * currency); gboolean gnc_is_euro_currency(const gnc_commodity * currency);

View File

@ -177,23 +177,6 @@ gnc_reverse_balance (const Account *account)
return reverse_type[type]; return reverse_type[type];
} }
gboolean gnc_using_unreversed_budgets (QofBook* book)
{
return gnc_features_check_used (book, GNC_FEATURE_BUDGET_UNREVERSED);
}
/* similar to gnc_reverse_balance but also accepts a gboolean
unreversed which specifies the reversal strategy - FALSE = pre-4.x
always-assume-credit-accounts, TRUE = all amounts unreversed */
gboolean
gnc_reverse_budget_balance (const Account *account, gboolean unreversed)
{
if (unreversed == gnc_using_unreversed_budgets(gnc_account_get_book(account)))
return gnc_reverse_balance (account);
return FALSE;
}
gboolean gnc_using_equity_type_opening_balance_account (QofBook* book) gboolean gnc_using_equity_type_opening_balance_account (QofBook* book)
{ {
return gnc_features_check_used (book, GNC_FEATURE_EQUITY_TYPE_OPENING_BALANCE); return gnc_features_check_used (book, GNC_FEATURE_EQUITY_TYPE_OPENING_BALANCE);

View File

@ -46,16 +46,6 @@ typedef QofSession * (*QofSessionCB) (void);
gchar *gnc_normalize_account_separator (const gchar* separator); gchar *gnc_normalize_account_separator (const gchar* separator);
gboolean gnc_reverse_balance(const Account *account); gboolean gnc_reverse_balance(const Account *account);
/* Backward compatibility *******************************************
* Return book's UNREVERSED_BUDGET feature check. */
gboolean gnc_using_unreversed_budgets (QofBook* book);
/* Backward compatibility *******************************************
* Compare book's UNREVERSED_BUDGET with unreverse_check. If they
* match, return account reversal according to global pref. If they
* don't match, return FALSE. */
gboolean gnc_reverse_budget_balance (const Account *account, gboolean unreversed);
/* Backward compatibility ******************************************* /* Backward compatibility *******************************************
* Return that book's support opening balance accounts by equity type slot */ * Return that book's support opening balance accounts by equity type slot */
void gnc_set_use_equity_type_opening_balance_account (QofBook* book); void gnc_set_use_equity_type_opening_balance_account (QofBook* book);