[genlist] change old item style to current naming
authorHyoyoung Chang <hyoyoung.chang@samsung.com>
Mon, 12 Mar 2012 04:26:38 +0000 (13:26 +0900)
committerHyoyoung Chang <hyoyoung.chang@samsung.com>
Mon, 12 Mar 2012 04:26:38 +0000 (13:26 +0900)
src/bin/test_genlist.c
src/lib/elm_gen.h
src/lib/elm_genlist.c

index 30603d0..aad093a 100644 (file)
@@ -2351,10 +2351,10 @@ Evas_Object *gl15_content_get(void *data, Evas_Object *obj, const char *part)
    Testitem *tit = data;
    char buf[PATH_MAX];
 
-   // "edit_default" EDC layout is like below. each part is swallow part.
+   // "decorate_default" EDC layout is like below. each part is swallow part.
    // the existing item is swllowed to elm.swallow.edit.content part.
    // ----------------------------------------------------------------
-   // | elm.edit.icon.1 | elm.swallow.edit.content | elm.edit.icon,2 |
+   // | elm.decorate.icon.1 | elm.swallow.decorate.content | elm.decorate.icon,2 |
    // ----------------------------------------------------------------
 
    if (!strcmp(part, "elm.swallow.end"))
@@ -2365,7 +2365,7 @@ Evas_Object *gl15_content_get(void *data, Evas_Object *obj, const char *part)
         evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
         return ic;
      }
-   else if (!strcmp(part, "elm.edit.icon.1"))
+   else if (!strcmp(part, "elm.decorate.icon.1"))
      {
         Evas_Object *ck;
         ck = elm_check_add(obj);
@@ -2374,7 +2374,7 @@ Evas_Object *gl15_content_get(void *data, Evas_Object *obj, const char *part)
         evas_object_show(ck);
         return ck;
      }
-   else if (!strcmp(part, "elm.edit.icon.2"))
+   else if (!strcmp(part, "elm.decorate.icon.2"))
      {
         Evas_Object *icn = elm_icon_add(obj);
         snprintf(buf, sizeof(buf), "%s/images/icon_06.png", PACKAGE_DATA_DIR);
@@ -2444,7 +2444,7 @@ test_genlist15(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    itc15->func.content_get  = gl15_content_get;
    itc15->func.state_get = gl_state_get;
    itc15->func.del       = gl15_del;
-   itc15->edit_item_style = "edit";
+   itc15->decorate_item_style = "edit";
 
    for (i = 0; i < 100; i++)
      {
@@ -2522,7 +2522,7 @@ Evas_Object *gl16_content_get(void *data, Evas_Object *obj, const char *part)
         evas_object_show(btn);
         return btn;
      }
-   else if (!strcmp(part, "elm.edit.icon.1"))
+   else if (!strcmp(part, "elm.decorate.icon.1"))
      {
         Evas_Object *icn = elm_icon_add(obj);
         snprintf(buf, sizeof(buf), "%s/images/icon_04.png", PACKAGE_DATA_DIR);
@@ -2531,7 +2531,7 @@ Evas_Object *gl16_content_get(void *data, Evas_Object *obj, const char *part)
         evas_object_size_hint_aspect_set(icn, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
         return icn;
      }
-   else if (!strcmp(part, "elm.edit.icon.2"))
+   else if (!strcmp(part, "elm.decorate.icon.2"))
      {
         Evas_Object *icn = elm_icon_add(obj);
         snprintf(buf, sizeof(buf), "%s/images/icon_09.png", PACKAGE_DATA_DIR);
@@ -2574,7 +2574,7 @@ test_genlist16(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    itc15->func.content_get = gl16_content_get;
    itc15->func.state_get = gl_state_get;
    itc15->func.del       = NULL;
-   itc15->edit_item_style = "edit";
+   itc15->decorate_item_style = "decorate";
 
    for (i = 0; i < 100; i++)
      {
index 88dd877..f1adcf4 100644 (file)
@@ -48,8 +48,8 @@ struct _Elm_Gen_Item_Class
    unsigned int  refcount; /**< Set it to 0 if you use your own const class, or its managed for you by class ref/unref calls */
    Eina_Bool     delete_me : 1; /**< Leave this alone - set it to 0 if you have a const class of your own */
    const char   *item_style; /**< Name of the visual style to use for this item. If you don't know use "default" */
-   const char   *mode_item_style; /**< Style used if item is set to a specific mode. @see elm_genlist_item_mode_set() or NULL if you don't care. currently it's used only in genlist. */
-   const char   *decorate_item_style; /**< Style to use when in decorate mode, or NULL if you don't care. currently it's used only in genlist. */
+   const char   *decorate_item_style; /**< Style used if item is set to a specific mode. @see elm_genlist_item_mode_set() or NULL if you don't care. currently it's used only in genlist. */
+   const char   *decorate_all_item_style; /**< Style to use when in decorate mode, or NULL if you don't care. currently it's used only in genlist. */
    struct {
       Elm_Gen_Item_Text_Get_Cb    text_get; /**< Text fetching class function for gengrid/list item classes.*/
       Elm_Gen_Item_Content_Get_Cb content_get; /**< Content fetching class function for gengrid/list item classes. */
index 433070a..ad5de7e 100644 (file)
@@ -2288,7 +2288,7 @@ _item_realize(Elm_Gen_Item *it,
                                        _multi_move, it);
 
         if ((it->wd->decorate_mode) && (!it->decorate_obj) &&
-            (it->item->type != ELM_GENLIST_ITEM_GROUP) && (it->itc->decorate_item_style))
+            (it->item->type != ELM_GENLIST_ITEM_GROUP) && (it->itc->decorate_all_item_style))
           _decorate_mode_item_realize(it, EINA_FALSE);
 
         _elm_genlist_item_state_update(it, itc);
@@ -2382,7 +2382,7 @@ _item_realize(Elm_Gen_Item *it,
 
    if ((!calc) && (it->wd->decorate_mode) && (it->item->type != ELM_GENLIST_ITEM_GROUP))
      {
-        if (it->itc->decorate_item_style)
+        if (it->itc->decorate_all_item_style)
           {
              if (!it->decorate_obj) _decorate_mode_item_realize(it, EINA_FALSE);
              edje_object_message_signal_process(it->decorate_obj);
@@ -2682,7 +2682,7 @@ _item_block_position(Item_Block *itb,
                          }
                        if (!it->item->move_effect_enabled)
                          {
-                            if ((it->wd->decorate_mode) && (it->itc->decorate_item_style))
+                            if ((it->wd->decorate_mode) && (it->itc->decorate_all_item_style))
                               _decorate_mode_item_position(it, it->item->scrl_x,
                                                        it->item->scrl_y);
                             else
@@ -3532,7 +3532,7 @@ _mode_item_realize(Elm_Gen_Item *it)
 
    if (it->item->order_num_in & 0x1) strncat(buf, "_odd", sizeof(buf) - strlen(buf));
    strncat(buf, "/", sizeof(buf) - strlen(buf));
-   strncat(buf, it->itc->mode_item_style, sizeof(buf) - strlen(buf));
+   strncat(buf, it->itc->decorate_item_style, sizeof(buf) - strlen(buf));
 
    _elm_theme_object_set(WIDGET(it), it->item->mode_view, "genlist", buf,
                          elm_widget_style_get(WIDGET(it)));
@@ -3678,7 +3678,7 @@ _decorate_mode_item_realize(Elm_Gen_Item *it, Eina_Bool effect_on)
       strncat(buf, "_compress", sizeof(buf) - strlen(buf));
 
    strncat(buf, "/", sizeof(buf) - strlen(buf));
-   strncat(buf, it->itc->decorate_item_style, sizeof(buf) - strlen(buf));
+   strncat(buf, it->itc->decorate_all_item_style, sizeof(buf) - strlen(buf));
 
    _elm_theme_object_set(WIDGET(it),  it->decorate_obj, "genlist", buf,
                          elm_widget_style_get(WIDGET(it)));
@@ -5894,7 +5894,7 @@ elm_genlist_item_decorate_mode_set(Elm_Object_Item  *it,
        (!strcmp(mode_type, wd->mode_type)) &&
        (mode_set))
       return;
-   if (!_it->itc->mode_item_style) return;
+   if (!_it->itc->decorate_item_style) return;
    _it->mode_set = mode_set;
 
    if (wd->multi)
@@ -5977,7 +5977,7 @@ elm_genlist_decorate_mode_set(Evas_Object *obj, Eina_Bool decorated)
              if (it->item->type != ELM_GENLIST_ITEM_GROUP)
                {
                   if (it->selected) _item_unselect(it);
-                  if (it->itc->decorate_item_style)
+                  if (it->itc->decorate_all_item_style)
                      _decorate_mode_item_realize(it, EINA_TRUE);
                }
           }