mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[gnc-report.cpp] hide gnc_reports impl, expose gnc_reports_foreach
Instead of retrieving the GHashTable and iterating through the key/values, expose gnc_reports_foreach which does the same job.
This commit is contained in:
parent
d3e8712b30
commit
818c7dc797
@ -110,13 +110,9 @@ gnc_style_sheet_options_apply_cb (GncOptionsDialog * propertybox,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
ss_info * ssi = (ss_info *)user_data;
|
ss_info * ssi = (ss_info *)user_data;
|
||||||
GHashTable *reports = NULL;
|
|
||||||
GList *results = NULL, *iter;
|
GList *results = NULL, *iter;
|
||||||
|
|
||||||
/* FIXME: shouldn't be global */
|
gnc_reports_foreach (dirty_same_stylesheet, ssi->stylesheet);
|
||||||
reports = gnc_reports_get_global ();
|
|
||||||
if (reports)
|
|
||||||
g_hash_table_foreach (reports, dirty_same_stylesheet, ssi->stylesheet);
|
|
||||||
|
|
||||||
results = gnc_option_db_commit (ssi->odb);
|
results = gnc_option_db_commit (ssi->odb);
|
||||||
for (iter = results; iter; iter = iter->next)
|
for (iter = results; iter; iter = iter->next)
|
||||||
|
@ -200,11 +200,12 @@ gnc_reports_flush_global(void)
|
|||||||
g_hash_table_foreach_remove(reports, yes_remove, NULL);
|
g_hash_table_foreach_remove(reports, yes_remove, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
GHashTable *
|
void
|
||||||
gnc_reports_get_global(void)
|
gnc_reports_foreach (GHFunc func, gpointer user_data)
|
||||||
{
|
{
|
||||||
gnc_report_init_table();
|
gnc_report_init_table();
|
||||||
return reports;
|
if (reports)
|
||||||
|
g_hash_table_foreach (reports, func, user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
@ -66,7 +66,7 @@ gint gnc_report_add(SCM report);
|
|||||||
|
|
||||||
void gnc_reports_flush_global(void);
|
void gnc_reports_flush_global(void);
|
||||||
|
|
||||||
GHashTable* gnc_reports_get_global(void);
|
void gnc_reports_foreach (GHFunc func, gpointer user_data);
|
||||||
|
|
||||||
gchar* gnc_get_default_report_font_family(void);
|
gchar* gnc_get_default_report_font_family(void);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user