elementary/genlist - killed elm_genlist_item_sorted_insert.
authorChunEon Park <hermet@hermet.pe.kr>
Tue, 28 Feb 2012 07:17:00 +0000 (07:17 +0000)
committerChunEon Park <hermet@hermet.pe.kr>
Tue, 28 Feb 2012 07:17:00 +0000 (07:17 +0000)
renamed elm_genlist_item_direct_sorted_insert to elm_genlist_item_sorted_insert

SVN revision: 68496

src/bin/test_eio.c
src/bin/test_genlist.c
src/lib/elc_fileselector.c
src/lib/elm_genlist.c
src/lib/elm_genlist.h

index 5030ddc..865b912 100644 (file)
@@ -37,6 +37,15 @@ _ls_filter_cb(void *data __UNUSED__, Eio_File *handler __UNUSED__, const char *f
   return EINA_TRUE;
 }
 
+static int
+_compare_cb(const void *data1, const void *data2)
+{
+   Elm_Object_Item *it = (Elm_Object_Item *)data1;
+   Elm_Object_Item *it2 = (Elm_Object_Item *)data2;
+   return strcoll(elm_object_item_data_get(it),
+                  elm_object_item_data_get(it2));
+}
+
 static void
 _ls_main_cb(void *data, Eio_File *handler __UNUSED__, const char *file)
 {
@@ -45,7 +54,7 @@ _ls_main_cb(void *data, Eio_File *handler __UNUSED__, const char *file)
                                   eina_stringshare_add(file),
                                   NULL,
                                   ELM_GENLIST_ITEM_NONE,
-                                  (Eina_Compare_Cb) strcoll,
+                                  _compare_cb,
                                   _sel_file,
                                   NULL);
 }
index 5a55cd0..b0c6897 100644 (file)
@@ -2060,7 +2060,7 @@ test_genlist13(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
 
    for (i = 0; i < 3; i++)
      {
-        pi[i] = elm_genlist_item_direct_sorted_insert
+        pi[i] = elm_genlist_item_sorted_insert
           (gl, &itc4, (void *)(long)idx[i]/* item data */, NULL/* parent */,
            ELM_GENLIST_ITEM_SUBITEMS, gl13_cmp/* cmp */,
            NULL/* func */, NULL/* func data */);
@@ -2071,7 +2071,7 @@ test_genlist13(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
         int j;
         for (j = 0; j < 3; j++)
           {
-             elm_genlist_item_direct_sorted_insert
+             elm_genlist_item_sorted_insert
                (gl, &itc4, (void *)(long)(idx[j] + base)/* item data */,
                 pi[i]/* parent */, ELM_GENLIST_ITEM_NONE,
                 gl13_cmp/* cmp */, NULL/* func */, NULL/* func data */);
@@ -2080,7 +2080,7 @@ test_genlist13(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
 
    for (i = 0; i < 3; i++)
      {
-        pi[i + 3] = elm_genlist_item_direct_sorted_insert
+        pi[i + 3] = elm_genlist_item_sorted_insert
           (gl, &itc4, (void *)(long)(idx[i] * 2)/* item data */, NULL/* parent */,
            ELM_GENLIST_ITEM_SUBITEMS, gl13_cmp/* cmp */, NULL/* func */,
            NULL/* func data */);
@@ -2092,7 +2092,7 @@ test_genlist13(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
         int j;
         for (j = 0; j < 3; j++)
           {
-             elm_genlist_item_direct_sorted_insert
+             elm_genlist_item_sorted_insert
                (gl, &itc4, (void *)(long)(idx[j] + base)/* item data */,
                 pi[i + 3]/* parent */, ELM_GENLIST_ITEM_NONE,
                 gl13_cmp/* cmp */, NULL/* func */, NULL/* func data */);
index 9240013..5d305aa 100644 (file)
@@ -659,10 +659,10 @@ _main_cb(void *data, Eio_File *handler, const Eina_File_Direct_Info *info __UNUS
      {
         Eina_Bool is_dir = (eio_file_associate_find(handler, "type/list") == list_itc[ELM_DIRECTORY]);
 
-        elm_genlist_item_direct_sorted_insert(wr->wd->files_list, eio_file_associate_find(handler, "type/list"),
-                                              eina_stringshare_ref(eio_file_associate_find(handler, "filename")),
-                                              wr->parent, wr->wd->expand && is_dir ? ELM_GENLIST_ITEM_SUBITEMS : ELM_GENLIST_ITEM_NONE,
-                                              _file_list_cmp, NULL, NULL);
+        elm_genlist_item_sorted_insert(wr->wd->files_list, eio_file_associate_find(handler, "type/list"),
+                                       eina_stringshare_ref(eio_file_associate_find(handler, "filename")),
+                                       wr->parent, wr->wd->expand && is_dir ? ELM_GENLIST_ITEM_SUBITEMS : ELM_GENLIST_ITEM_NONE,
+                                       _file_list_cmp, NULL, NULL);
      }
    else if (wr->wd->mode == ELM_FILESELECTOR_GRID)
      elm_gengrid_item_direct_sorted_insert(wr->wd->files_grid, eio_file_associate_find(handler, "type/grid"),
index 98f00ad..921fab9 100644 (file)
@@ -3980,15 +3980,6 @@ _item_queue(Widget_Data *wd,
 }
 
 static int
-_elm_genlist_item_compare_data(const void *data, const void *data1)
-{
-   const Elm_Gen_Item *it = data;
-   const Elm_Gen_Item *item1 = data1;
-
-   return it->wd->item_compare_data_cb(it->base.data, item1->base.data);
-}
-
-static int
 _elm_genlist_item_compare(const void *data, const void *data1)
 {
    const Elm_Gen_Item *it, *item1;
@@ -4214,14 +4205,14 @@ elm_genlist_item_insert_before(Evas_Object                  *obj,
 }
 
 EAPI Elm_Object_Item *
-elm_genlist_item_direct_sorted_insert(Evas_Object                  *obj,
-                                      const Elm_Genlist_Item_Class *itc,
-                                      const void                   *data,
-                                      Elm_Object_Item              *parent,
-                                      Elm_Genlist_Item_Flags        flags,
-                                      Eina_Compare_Cb               comp,
-                                      Evas_Smart_Cb                 func,
-                                      const void                   *func_data)
+elm_genlist_item_sorted_insert(Evas_Object                  *obj,
+                               const Elm_Genlist_Item_Class *itc,
+                               const void                   *data,
+                               Elm_Object_Item              *parent,
+                               Elm_Genlist_Item_Flags        flags,
+                               Eina_Compare_Cb               comp,
+                               Evas_Smart_Cb                 func,
+                               const void                   *func_data)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -4298,24 +4289,6 @@ elm_genlist_item_direct_sorted_insert(Evas_Object                  *obj,
    return (Elm_Object_Item *) it;
 }
 
-EAPI Elm_Object_Item *
-elm_genlist_item_sorted_insert(Evas_Object                  *obj,
-                               const Elm_Genlist_Item_Class *itc,
-                               const void                   *data,
-                               Elm_Object_Item              *parent,
-                               Elm_Genlist_Item_Flags        flags,
-                               Eina_Compare_Cb               comp,
-                               Evas_Smart_Cb                 func,
-                               const void                   *func_data)
-{
-   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   wd->item_compare_data_cb = comp;
-   return elm_genlist_item_direct_sorted_insert(obj, itc, data, parent, flags,
-                                                _elm_genlist_item_compare_data,
-                                                func, func_data);
-}
-
 static void
 _elm_genlist_clear(Evas_Object *obj, Eina_Bool standby)
 {
index ae5958d..952c608 100644 (file)
@@ -903,11 +903,7 @@ EAPI Elm_Object_Item             *elm_genlist_item_insert_after(Evas_Object *obj
  *
  * @ingroup Genlist
  */
-// XXX: deprecate elm_genlist_item_sorted_insert() and rename
-// elm_genlist_item_direct_sorted_insert()
-// XXX: direct_sorted?? how about deprecating elm_genlist_item_direct_sorted_insert insetead?
 EAPI Elm_Object_Item             *elm_genlist_item_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
-EAPI Elm_Object_Item             *elm_genlist_item_direct_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
 
 /* operations to retrieve existing items */
 /**