summaryrefslogtreecommitdiff
path: root/gio/gemblemedicon.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2010-12-09 18:16:17 +0100
committerCosimo Cecchi <cosimoc@gnome.org>2010-12-15 11:45:20 +0100
commitf53d518a3de99eb8418a35b8f1e163026130687b (patch)
tree224c266c3978a2cb7f8bd21c9a6c439606eaafa6 /gio/gemblemedicon.c
parent056a5d753d14b505c3250ccb4a5de92dbdc67a58 (diff)
emblemedicon: add g_emblemed_icon_clear_emblems()
https://bugzilla.gnome.org/show_bug.cgi?id=637171
Diffstat (limited to 'gio/gemblemedicon.c')
-rw-r--r--gio/gemblemedicon.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gio/gemblemedicon.c b/gio/gemblemedicon.c
index 0364cbaa0..331f35de7 100644
--- a/gio/gemblemedicon.c
+++ b/gio/gemblemedicon.c
@@ -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)