list: fixed list to emit elm,state,list,single signal when there is only
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Mon, 24 Feb 2014 15:58:28 +0000 (00:58 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Mon, 24 Feb 2014 15:58:54 +0000 (00:58 +0900)
one item.

This is a fix of a commit 44495f6431cdc5dbe6e8cb257cf73a69563ec67c.

src/lib/elm_list.c

index b441def43e479259e0d0fb794a2d5bbb0e2eeb7a..c91497808df8ac4335b07ac4a0977bbadf9224ae 100644 (file)
@@ -741,7 +741,12 @@ _items_fix(Evas_Object *obj)
                        edje_object_part_swallow
                           (VIEW(it), "elm.swallow.end", it->end);
                     }
-                  if (l == sd->items) //1st item
+                  if (eina_list_count(sd->items) == 1)
+                    {
+                       edje_object_signal_emit
+                           (VIEW(it), "elm,state,list,single", "elm");
+                    }
+                  else if (l == sd->items) //1st item
                     {
                        edje_object_signal_emit
                            (VIEW(it), "elm,state,list,first", "elm");