Skip non-strings when loading or saving search engines
This commit is contained in:
parent
8ad5649422
commit
3a9071a761
1 changed files with 4 additions and 0 deletions
|
@ -305,6 +305,8 @@ search_engines_new_from_file (const gchar* filename,
|
||||||
item = katze_item_new ();
|
item = katze_item_new ();
|
||||||
for (j = 0; j < n_properties; j++)
|
for (j = 0; j < n_properties; j++)
|
||||||
{
|
{
|
||||||
|
if (!G_IS_PARAM_SPEC_STRING (pspecs[j]))
|
||||||
|
continue;
|
||||||
property = g_param_spec_get_name (pspecs[j]);
|
property = g_param_spec_get_name (pspecs[j]);
|
||||||
value = g_key_file_get_string (key_file, engines[i],
|
value = g_key_file_get_string (key_file, engines[i],
|
||||||
property, NULL);
|
property, NULL);
|
||||||
|
@ -342,6 +344,8 @@ search_engines_save_to_file (KatzeArray* search_engines,
|
||||||
name = katze_item_get_name (item);
|
name = katze_item_get_name (item);
|
||||||
for (j = 0; j < n_properties; j++)
|
for (j = 0; j < n_properties; j++)
|
||||||
{
|
{
|
||||||
|
if (!G_IS_PARAM_SPEC_STRING (pspecs[j]))
|
||||||
|
continue;
|
||||||
property = g_param_spec_get_name (pspecs[j]);
|
property = g_param_spec_get_name (pspecs[j]);
|
||||||
g_object_get (item, property, &value, NULL);
|
g_object_get (item, property, &value, NULL);
|
||||||
if (value)
|
if (value)
|
||||||
|
|
Loading…
Reference in a new issue