GNOME Bugzilla – Bug 634504
emblemed-icon: allow passing a NULL emblem to g_emblemed_icon_new()
Last modified: 2010-11-10 18:10:21 UTC
This is useful when you already have a list of emblems you know you want to attach to a GEmblemedIcon. If we don't allow NULL in the constructor you have to write this code: GList *emblems, l; GIcon *emblemed, *original; icon = g_emblemed_icon_new (original, emblems->data); for (l = emblems->next; l != NULL; l = l->next) g_emblemed_icon_add_emblem (icon, l->data); which is less clear and more subtle than icon = g_emblemed_icon_new (original, NULL); for (l = emblems; l != NULL; l = l->next) g_emblemed_icon_add_emblem (icon, l->data);
Created attachment 174185 [details] [review] emblemed-icon: allow passing a NULL emblem to g_emblemed_icon_new() So that if we already have a list of emblems we know we want to add to the icon, we can use e.g. a for loop to add them all, without picking the first and looping from the second.
Review of attachment 174185 [details] [review]: Makes sense to me. Please add an ", or %NULL" to the human-readable docs for the argument as well.
Attachment 174185 [details] pushed as d28bce0 - emblemed-icon: allow passing a NULL emblem to g_emblemed_icon_new()