Apply all settings matching the filename

master
Yevgen Muntyan 2007-01-05 18:08:29 -06:00
parent 5c6a6ba8ed
commit 17b9d8e3f1
1 changed files with 11 additions and 5 deletions

View File

@ -225,18 +225,24 @@ filter_settings_store_get_setting (FilterSettingsStore *store,
const char *filename)
{
GSList *l;
GString *result = NULL;
for (l = store->settings; l != NULL; l = l->next)
{
const char *result;
const char *match;
result = filter_setting_match (l->data, filename);
match = filter_setting_match (l->data, filename);
if (result)
return result;
if (match)
{
if (!result)
result = g_string_new (match);
else
g_string_append_printf (result, ";%s", match);
}
}
return NULL;
return result ? g_string_free (result, FALSE) : NULL;
}