mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge branch 'maint'
This commit is contained in:
@@ -240,35 +240,6 @@ gnc_option_db_new(SCM guile_options)
|
||||
return odb;
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GNCOptionDB *odb;
|
||||
SCM guile_options;
|
||||
} ODBFindInfo;
|
||||
|
||||
static void
|
||||
option_db_finder (gpointer key, gpointer value, gpointer data)
|
||||
{
|
||||
ODBFindInfo *find_info = data;
|
||||
GNCOptionDB *odb = value;
|
||||
|
||||
if (odb && (odb->guile_options == find_info->guile_options))
|
||||
find_info->odb = odb;
|
||||
}
|
||||
|
||||
static GNCOptionDB *
|
||||
gnc_option_db_find (SCM guile_options)
|
||||
{
|
||||
ODBFindInfo find_info;
|
||||
|
||||
find_info.odb = NULL;
|
||||
find_info.guile_options = guile_options;
|
||||
|
||||
g_hash_table_foreach (option_dbs, option_db_finder, &find_info);
|
||||
|
||||
return find_info.odb;
|
||||
}
|
||||
|
||||
/* Create an option DB for a particular data type */
|
||||
/* For now, this is global, just like when it was in guile.
|
||||
But, it should be make per-book. */
|
||||
@@ -2870,6 +2841,27 @@ gnc_currency_accounting_option_value_get_default_account (SCM option_value)
|
||||
option_value);
|
||||
}
|
||||
|
||||
static int
|
||||
find_option_db_with_selectable_pred (gpointer key, gpointer value, gpointer data)
|
||||
{
|
||||
SCM guile_options = data;
|
||||
GNCOptionDB *odb = value;
|
||||
|
||||
if (odb && (odb->guile_options == guile_options)
|
||||
&& odb->set_selectable )
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
|
||||
}
|
||||
|
||||
static GNCOptionDB *
|
||||
find_option_db_with_selectable (SCM guile_options)
|
||||
{
|
||||
return g_hash_table_find (option_dbs, find_option_db_with_selectable_pred,
|
||||
guile_options);
|
||||
}
|
||||
|
||||
/*******************************************************************\
|
||||
* gnc_option_db_set_option_selectable_by_name *
|
||||
* set the sensitivity of the option widget *
|
||||
@@ -2881,7 +2873,7 @@ gnc_currency_accounting_option_value_get_default_account (SCM option_value)
|
||||
* Return: SCM value *
|
||||
\*******************************************************************/
|
||||
void
|
||||
gnc_option_db_set_option_selectable_by_name(SCM guile_option,
|
||||
gnc_option_db_set_option_selectable_by_name(SCM guile_options,
|
||||
const char *section,
|
||||
const char *name,
|
||||
gboolean selectable)
|
||||
@@ -2889,7 +2881,7 @@ gnc_option_db_set_option_selectable_by_name(SCM guile_option,
|
||||
GNCOptionDB *odb;
|
||||
GNCOption *option;
|
||||
|
||||
odb = gnc_option_db_find (guile_option);
|
||||
odb = find_option_db_with_selectable (guile_options);
|
||||
if (!odb)
|
||||
return;
|
||||
|
||||
|
||||
@@ -1310,7 +1310,7 @@
|
||||
exchange-code="364"
|
||||
parts-per-unit="1"
|
||||
smallest-fraction="1"
|
||||
local-symbol="﷼﷼"
|
||||
local-symbol="﷼"
|
||||
/>
|
||||
<!-- "ISK" - "Iceland Krona"
|
||||
-->
|
||||
|
||||
Reference in New Issue
Block a user