mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
Implement this function by moving bits from glocalfileinfo.c
2008-02-21 David Zeuthen <davidz@redhat.com> * glocalfileinfo.c: (_g_local_file_info_get): * gcontenttype.c: (g_content_type_get_icon): Implement this function by moving bits from glocalfileinfo.c (g_content_type_get_description): Unalias before getting description (#517687) * gfile.c: (g_file_class_init), (g_file_query_filesystem_info_async), (g_file_query_filesystem_info_finish), (query_filesystem_info_data_free), (query_filesystem_info_async_thread), (g_file_real_query_filesystem_info_async), (g_file_real_query_filesystem_info_finish): * gfile.h: Implement async version of g_file_query_filesystem_info() * gfileinfo.h: Add new attributes for filesystem::use-preview * gio.symbols: Update * gthemedicon.c: (g_themed_icon_append_name): * gthemedicon.h: Add new new convenience function. * gunionvolumemonitor.c: (g_union_volume_monitor_dispose), (get_mounts), (get_volumes), (get_connected_drives), (get_volume_for_uuid), (get_mount_for_uuid), (g_union_volume_monitor_init), (populate_union_monitor), (g_volume_monitor_get), (_g_mount_get_for_mount_path), (g_volume_monitor_adopt_orphan_mount): * gvolumemonitor.c: * gvolumemonitor.h: Use recursive locks so it's safe for volume monitor implementations to call into the main volume monitor. Also separate object initialization and volume monitor initialization such that non-native volume monitors can properly adopt their mounts away. svn path=/trunk/; revision=6550
This commit is contained in:
committed by
Alexander Larsson
parent
bed0b36546
commit
bfda430eff
@@ -215,6 +215,28 @@ g_themed_icon_get_names (GThemedIcon *icon)
|
||||
return (const char * const *)icon->names;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_themed_icon_append_name:
|
||||
* @icon: a #GThemedIcon
|
||||
* @iconname: name of icon to append to list of icons from within @icon.
|
||||
*
|
||||
* Append a name to the list of icons from within @icon.
|
||||
*/
|
||||
void
|
||||
g_themed_icon_append_name (GThemedIcon *icon, const char *iconname)
|
||||
{
|
||||
guint num_names;
|
||||
char **new_names;
|
||||
|
||||
g_return_if_fail (G_IS_THEMED_ICON (icon));
|
||||
g_return_if_fail (iconname != NULL);
|
||||
|
||||
num_names = g_strv_length (icon->names);
|
||||
icon->names = g_realloc (icon->names, sizeof (char*) * (num_names + 2));
|
||||
icon->names[num_names] = g_strdup (iconname);
|
||||
icon->names[num_names + 1] = NULL;
|
||||
}
|
||||
|
||||
static guint
|
||||
g_themed_icon_hash (GIcon *icon)
|
||||
{
|
||||
|
Reference in New Issue
Block a user