not sure how this insanity made it in, spank spank to someone
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 2 Mar 2012 01:12:43 +0000 (01:12 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 2 Mar 2012 01:12:43 +0000 (01:12 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68608 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_genlist.c

index b1fefb8..84a8188 100644 (file)
@@ -1942,13 +1942,9 @@ _item_realize(Elm_Gen_Item *it,
         elm_widget_sub_object_add(WIDGET(it), VIEW(it));
 
         if (it->item->flags & ELM_GENLIST_ITEM_SUBITEMS)
-          strncpy(buf, "tree", sizeof(buf));
-        else strncpy(buf, "item", sizeof(buf));
-        if (it->wd->compress)
-          strncat(buf, "_compress", sizeof(buf) - strlen(buf));
-
-        strncat(buf, "/", sizeof(buf) - strlen(buf));
-        strncat(buf, it->itc->item_style, sizeof(buf) - strlen(buf));
+          snprintf(buf, sizeof(buf), "tree%s/%s", it->wd->compress ? "_compress" : "", it->itc->item_style);
+        else
+          snprintf(buf, sizeof(buf), "item%s/%s", it->wd->compress ? "_compress" : "", it->itc->item_style);
 
         _elm_theme_object_set(WIDGET(it), VIEW(it), "genlist", buf,
                               elm_widget_style_get(WIDGET(it)));