mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
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
1 changed files with 2 additions and 2 deletions
|
@ -613,7 +613,7 @@ gimp_gp_param_to_value (gpointer gimp,
|
||||||
{
|
{
|
||||||
g_value_set_boxed (value, param->data.d_bytes);
|
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_value_take_object (value, (param->data.d_string ?
|
||||||
g_file_new_for_uri (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
|
else
|
||||||
param->data.d_string = (gchar *) g_value_get_string (value);
|
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);
|
GFile *file = g_value_get_object (value);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue