Add a new cell type for Transaction associations that

supports the use of glyphs
This commit is contained in:
Robert Fewell
2020-05-18 16:07:28 +01:00
parent 260c7b32dc
commit 785a6a8fa6
8 changed files with 450 additions and 1 deletions

View File

@@ -902,6 +902,36 @@ gnc_get_reconcile_flag_order (void)
return flags;
}
const char *
gnc_get_association_str (char association_flag)
{
switch (association_flag)
{
case WASSOC:
return C_("Association flag for 'web'", "w");
case FASSOC:
return C_("Association flag for 'file'", "f");
case ' ':
return " ";
default:
PERR("Bad association flag");
return NULL;
}
}
const char *
gnc_get_association_valid_flags (void)
{
static const char flags[] = { FASSOC, WASSOC, ' ', 0 };
return flags;
}
const char *
gnc_get_association_flag_order (void)
{
static const char flags[] = { FASSOC, WASSOC, ' ', 0 };
return flags;
}
static const char *
equity_base_name (GNCEquityType equity_type)
@@ -1522,7 +1552,7 @@ PrintAmountInternal(char *buf, gnc_numeric val, const GNCPrintAmountInfo *info)
}
min_dp = info->min_decimal_places;
max_dp = info->max_decimal_places;
/* Don to limit the number of decimal places _UNLESS_ force_fit is
* true. */
if (!info->force_fit)

View File

@@ -189,6 +189,29 @@ const char * gnc_get_reconcile_str (char reconciled_flag);
const char * gnc_get_reconcile_valid_flags (void);
const char * gnc_get_reconcile_flag_order (void);
#define WASSOC 'w'
#define FASSOC 'f'
/** Get a string containing association valid flags
*
* @return a string containing the list of associated flags
*/
const char *gnc_get_association_valid_flags (void);
/** Get a string containing association flag order
*
* @return a string containing the association flag change order
*/
const char *gnc_get_association_flag_order (void);
/** Get a string representing the association type
*
* @param association_flag The flag to convert into a string
*
* @return the i18n'd association string
*/
const char *gnc_get_association_str (char association_flag);
typedef enum
{
EQUITY_OPENING_BALANCE,