Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
emblemedicon: add g_emblemed_icon_clear_emblems()
Browse files Browse the repository at this point in the history
  • Loading branch information
cosimoc committed Dec 15, 2010
1 parent 056a5d7 commit f53d518
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions gio/gemblemedicon.c
Expand Up @@ -160,6 +160,18 @@ g_emblemed_icon_get_emblems (GEmblemedIcon *emblemed)
return emblemed->emblems;
}

void
g_emblemed_icon_clear_emblems (GEmblemedIcon *emblemed)
{
g_return_if_fail (G_IS_EMBLEMED_ICON (emblemed));

if (emblemed->emblems == NULL)
return;

g_list_free_full (emblemed->emblems, g_object_unref);
emblemed->emblems = NULL;
}

static gint
g_emblem_comp (GEmblem *a,
GEmblem *b)
Expand Down
1 change: 1 addition & 0 deletions gio/gemblemedicon.h
Expand Up @@ -56,6 +56,7 @@ GIcon *g_emblemed_icon_get_icon (GEmblemedIcon *emblemed);
GList *g_emblemed_icon_get_emblems (GEmblemedIcon *emblemed);
void g_emblemed_icon_add_emblem (GEmblemedIcon *emblemed,
GEmblem *emblem);
void g_emblemed_icon_clear_emblems (GEmblemedIcon *emblemed);

G_END_DECLS

Expand Down

0 comments on commit f53d518

Please sign in to comment.