mirror of https://github.com/GNOME/gimp.git
libgimp: support all subtypes of GFile.
In particular if a GFile is created with g_file_new_for_path(), it will be a GLocalFile. We need this to be supported too.
This commit is contained in:
parent
3c53d5f38e
commit
1dc5635d32
|
@ -613,7 +613,7 @@ gimp_gp_param_to_value (gpointer gimp,
|
|||
{
|
||||
g_value_set_boxed (value, param->data.d_bytes);
|
||||
}
|
||||
else if (G_VALUE_TYPE (value) == G_TYPE_FILE)
|
||||
else if (g_type_is_a (G_VALUE_TYPE (value), G_TYPE_FILE))
|
||||
{
|
||||
g_value_take_object (value, (param->data.d_string ?
|
||||
g_file_new_for_uri (param->data.d_string) :
|
||||
|
@ -860,7 +860,7 @@ gimp_value_to_gp_param (const GValue *value,
|
|||
else
|
||||
param->data.d_string = (gchar *) g_value_get_string (value);
|
||||
}
|
||||
else if (G_VALUE_TYPE (value) == G_TYPE_FILE)
|
||||
else if (g_type_is_a (G_VALUE_TYPE (value), G_TYPE_FILE))
|
||||
{
|
||||
GFile *file = g_value_get_object (value);
|
||||
|
||||
|
|
Loading…
Reference in New Issue