diff options
author | Nikias Bassen | 2010-07-12 14:02:57 +0200 |
---|---|---|
committer | Nikias Bassen | 2010-07-12 14:02:57 +0200 |
commit | b73b77f43a7dcb9d6f28806bf2c3cba0fc6f7aa2 (patch) | |
tree | cf402d329a69a48e76ac46cef1f6ace7408c6db7 /src/sbitem.c | |
parent | f389f8266f9b338f412f62768d7e02a99b1d5cc0 (diff) | |
download | sbmanager-b73b77f43a7dcb9d6f28806bf2c3cba0fc6f7aa2.tar.gz sbmanager-b73b77f43a7dcb9d6f28806bf2c3cba0fc6f7aa2.tar.bz2 |
Add support for new iconstate format and displaying folder icons
Diffstat (limited to 'src/sbitem.c')
-rw-r--r-- | src/sbitem.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/sbitem.c b/src/sbitem.c index a53949e..b49a98f 100644 --- a/src/sbitem.c +++ b/src/sbitem.c @@ -63,11 +63,24 @@ SBItem *sbitem_new(plist_t icon_info) item = g_new0(SBItem, 1); item->node = plist_copy(icon_info); item->texture = NULL; + item->drawn = FALSE; item->is_dock_item = FALSE; + item->is_folder = FALSE; + item->subitems = NULL; return item; } +SBItem *sbitem_new_with_subitems(plist_t icon_info, GList *subitems) +{ + SBItem *item = sbitem_new(icon_info); + if (item) { + item->subitems = subitems; + item->is_folder = TRUE; + } + return item; +} + void sbitem_free(SBItem *item) { if (item) { @@ -85,6 +98,10 @@ void sbitem_free(SBItem *item) item->texture = NULL; } } + if (item->subitems) { + g_list_foreach(item->subitems, (GFunc)(g_func_sbitem_free), NULL); + g_list_free(item->subitems); + } if (item->label && CLUTTER_IS_ACTOR(item->label)) { clutter_actor_destroy(item->label); item->label = NULL; |