aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-10-20 15:00:58 -0200
committerSangHyeon Jade Lee <dltkdgus1764@gmail.com>2017-11-15 17:06:45 +0900
commit61eb9f5badfd7c5f7b007a426ed5e46420d4840e (patch)
tree312e61cec42972d1d12848e64a6fb69d0eee6d3c
parentelm: WIP efl_ui_list more work (diff)
downloadefl-61eb9f5badfd7c5f7b007a426ed5e46420d4840e.tar.gz
elm: Remove postfix because of bug
-rw-r--r--src/lib/elementary/efl_ui_list_precise_layouter.c9
-rw-r--r--src/lib/elementary/efl_ui_list_segarray.c50
2 files changed, 45 insertions, 14 deletions
diff --git a/src/lib/elementary/efl_ui_list_precise_layouter.c b/src/lib/elementary/efl_ui_list_precise_layouter.c
index f8710880e4..44ebc14a2f 100644
--- a/src/lib/elementary/efl_ui_list_precise_layouter.c
+++ b/src/lib/elementary/efl_ui_list_precise_layouter.c
@@ -8,6 +8,13 @@
#include "elm_priv.h"
+#undef DBG
+#define DBG(...) do { \
+ fprintf(stderr, __FILE__ ":" "%d %s ", __LINE__, __PRETTY_FUNCTION__); \
+ fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, "\n"); fflush(stderr); \
+ } while(0)
+
#define MY_CLASS EFL_UI_LIST_PRECISE_LAYOUTER_CLASS
typedef struct _Efl_Ui_List_Precise_Layouter_Data
@@ -95,6 +102,8 @@ _efl_ui_list_precise_layouter_efl_ui_list_relayout_layout_do
Eina_List *order = NULL;
int pad[4];
+ DBG("layout_do");
+
EINA_SAFETY_ON_NULL_RETURN(items);
if(!pd->initialized)
diff --git a/src/lib/elementary/efl_ui_list_segarray.c b/src/lib/elementary/efl_ui_list_segarray.c
index cdb33d8757..711ff4dc2b 100644
--- a/src/lib/elementary/efl_ui_list_segarray.c
+++ b/src/lib/elementary/efl_ui_list_segarray.c
@@ -9,6 +9,13 @@
#include <assert.h>
+#undef DBG
+#define DBG(...) do { \
+ fprintf(stderr, __FILE__ ":" "%d %s ", __LINE__, __PRETTY_FUNCTION__); \
+ fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, "\n"); fflush(stderr); \
+ } while(0)
+
static Eina_Rbtree_Direction _rbtree_compare(Eina_Rbtree const* left, Eina_Rbtree const* right, void* data EINA_UNUSED)
{
Efl_Ui_List_SegArray_Node const *nl = (void const*)left, *nr = (void const*)right;
@@ -64,12 +71,14 @@ void efl_ui_list_segarray_insert_accessor(Efl_Ui_List_SegArray* segarray, int fi
first_node = NULL;
else
array_first = first_node->first;
+ eina_iterator_free(pre_iterator);
}
- {
- Eina_Iterator* post_iterator = eina_rbtree_iterator_postfix(segarray->root);
- if(!eina_iterator_next(post_iterator, (void**)&last_node))
- last_node = NULL;
- }
+ /* { */
+ /* Eina_Iterator* post_iterator = eina_rbtree_iterator_postfix(segarray->root); */
+ /* if(!eina_iterator_next(post_iterator, (void**)&last_node)) */
+ /* last_node = NULL; */
+ /* eina_iterator_free(post_iterator); */
+ /* } */
}
EINA_ACCESSOR_FOREACH(accessor, i, children)
@@ -77,11 +86,19 @@ void efl_ui_list_segarray_insert_accessor(Efl_Ui_List_SegArray* segarray, int fi
// if prefix'ing
if((first + i < array_first) || !efl_ui_list_segarray_count(segarray))
{
+ // count is zero
+ DBG("prefixing count: %d", efl_ui_list_segarray_count(segarray));
// if no first_node
if(!first_node)
{
first_node = _alloc_node(segarray, i + first, segarray->array_initial_size);
first_node->pointers[0] = _create_item(children, first + i);
+ first_node->length++;
+ segarray->count++;
+ }
+ else
+ {
+ DBG("there is a first node");
}
/* else if() */
/* { */
@@ -90,16 +107,21 @@ void efl_ui_list_segarray_insert_accessor(Efl_Ui_List_SegArray* segarray, int fi
}
else if(first + i < array_first + efl_ui_list_segarray_count(segarray))
{
-
- }
- else // suffix'ing
- {
- assert(last_node);
- if(last_node->max < last_node->length)
- {
- last_node->pointers[last_node->length++] = _create_item(children, first + i);
- }
+ DBG("insert is in the middle");
+
+
}
+ /* else // suffix'ing */
+ /* { */
+ /* DBG("suffixing"); */
+ /* assert(!!last_node == !!first_node); */
+ /* if(last_node->max < last_node->length) */
+ /* { */
+ /* last_node->pointers[last_node->length++] = _create_item(children, first + i); */
+ /* ++last_node->length; */
+ /* segarray->count++; */
+ /* } */
+ /* } */
}
}