gnucash maint: [gnc-plugin-page-register] retrieve filter from .gcm properly
Christopher Lam
clam at code.gnucash.org
Tue May 18 07:12:04 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/48f7e33c (commit)
from https://github.com/Gnucash/gnucash/commit/c1cb29df (commit)
commit 48f7e33cbefccf59de93d072b937b33b8049ce58
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Tue May 18 19:09:08 2021 +0800
[gnc-plugin-page-register] retrieve filter from .gcm properly
ce34d0a4b had bug -- filter was retrieved but not returned.
diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index 80772c5c5..797b2959d 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -2124,7 +2124,6 @@ gnc_plugin_page_register_get_filter_gcm (Account* leader)
{
GKeyFile* state_file = gnc_state_get_current();
gchar* state_section;
- gchar* filter_text;
gchar acct_guid[GUID_ENCODING_LENGTH + 1];
GError* error = NULL;
char* filter = NULL;
@@ -2132,13 +2131,13 @@ gnc_plugin_page_register_get_filter_gcm (Account* leader)
// get the filter from the .gcm file
guid_to_string_buff (xaccAccountGetGUID (leader), acct_guid);
state_section = g_strconcat (STATE_SECTION_REG_PREFIX, " ", acct_guid, NULL);
- filter_text = g_key_file_get_string (state_file, state_section,
- KEY_PAGE_FILTER, &error);
+ filter = g_key_file_get_string (state_file, state_section,
+ KEY_PAGE_FILTER, &error);
if (error)
g_clear_error (&error);
else
- g_strdelimit (filter_text, ";", ',');
+ g_strdelimit (filter, ";", ',');
g_free (state_section);
return filter;
Summary of changes:
gnucash/gnome/gnc-plugin-page-register.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
More information about the gnucash-changes
mailing list