mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-17 12:58:48 +02:00
Implement GFileIface.set_display_name() for resource files
Resource files cannot be renamed, and GFileIface.set_display_name() is mandatory. Fixes: #2705
This commit is contained in:
parent
a775578b96
commit
a9394bd68e
@ -646,6 +646,19 @@ g_resource_file_monitor_file (GFile *file,
|
|||||||
return g_object_new (g_resource_file_monitor_get_type (), NULL);
|
return g_object_new (g_resource_file_monitor_get_type (), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GFile *
|
||||||
|
g_resource_file_set_display_name (GFile *file,
|
||||||
|
const char *display_name,
|
||||||
|
GCancellable *cancellable,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
g_set_error_literal (error,
|
||||||
|
G_IO_ERROR,
|
||||||
|
G_IO_ERROR_NOT_SUPPORTED,
|
||||||
|
_("Resource files cannot be renamed"));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
g_resource_file_file_iface_init (GFileIface *iface)
|
g_resource_file_file_iface_init (GFileIface *iface)
|
||||||
{
|
{
|
||||||
@ -664,6 +677,7 @@ g_resource_file_file_iface_init (GFileIface *iface)
|
|||||||
iface->get_relative_path = g_resource_file_get_relative_path;
|
iface->get_relative_path = g_resource_file_get_relative_path;
|
||||||
iface->resolve_relative_path = g_resource_file_resolve_relative_path;
|
iface->resolve_relative_path = g_resource_file_resolve_relative_path;
|
||||||
iface->get_child_for_display_name = g_resource_file_get_child_for_display_name;
|
iface->get_child_for_display_name = g_resource_file_get_child_for_display_name;
|
||||||
|
iface->set_display_name = g_resource_file_set_display_name;
|
||||||
iface->enumerate_children = g_resource_file_enumerate_children;
|
iface->enumerate_children = g_resource_file_enumerate_children;
|
||||||
iface->query_info = g_resource_file_query_info;
|
iface->query_info = g_resource_file_query_info;
|
||||||
iface->query_filesystem_info = g_resource_file_query_filesystem_info;
|
iface->query_filesystem_info = g_resource_file_query_filesystem_info;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user