elm genlist: Reverted Hyoyoung's first patch. He sent another patch
authorseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 2 Apr 2012 02:36:55 +0000 (02:36 +0000)
committerseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 2 Apr 2012 02:36:55 +0000 (02:36 +0000)
for this change.
Revert "After edit mode naming is changed, some legacy naming is remained."

This reverts commit 5e1aa3c8b0382a0ca471150f4c219cd32dbdbe22.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69835 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

data/themes/widgets/genlist.edc
src/bin/test_genlist.c
src/lib/elm_gen_common.h
src/lib/elm_genlist.c

index a831d9f..ac2ee06 100644 (file)
@@ -9367,7 +9367,7 @@ group { name: "elm/genlist/item/edit/default";
             rel2.to_x: "elm.edit.icon.1";
          }
       }
-      part { name: "elm.swallow.decorate.content";
+      part { name: "elm.swallow.edit.content";
          clip_to: "disclip";
          type: SWALLOW;
          mouse_events: 1;
@@ -9505,7 +9505,7 @@ group { name: "elm/genlist/item/edit/default";
       }
       // edit mode signal
       program { name: "edit_mode_enabled_effect";
-         signal: "elm,state,decorate,enabled,effect";
+         signal: "elm,state,edit,enabled,effect";
          source: "elm";
          action: STATE_SET "enabled" 0.0;
          transition: DECELERATE 0.7;
@@ -9513,7 +9513,7 @@ group { name: "elm/genlist/item/edit/default";
          target: "elm.edit.icon.2";
       }
       program { name: "edit_mode_disabled_effect";
-         signal: "elm,state,decorate,disabled,effect";
+         signal: "elm,state,edit,disabled,effect";
          source: "elm";
          action: STATE_SET "default" 0.0;
          transition: DECELERATE 0.7;
@@ -9521,14 +9521,14 @@ group { name: "elm/genlist/item/edit/default";
          target: "elm.edit.icon.2";
       }
       program { name: "edit_mode_enabled";
-         signal: "elm,state,decorate,enabled";
+         signal: "elm,state,edit,enabled";
          source: "elm";
          action: STATE_SET "enabled" 0.0;
          target: "elm.edit.icon.1";
          target: "elm.edit.icon.2";
       }
       program { name: "edit_mode_disabled";
-         signal: "elm,state,decorate,disabled";
+         signal: "elm,state,edit,disabled";
          source: "elm";
          action: STATE_SET "default" 0.0;
          target: "elm.edit.icon.1";
@@ -9547,7 +9547,7 @@ group { name: "elm/genlist/item/edit/default";
          name:    "enable_flip_mode_next";
          action:  STATE_SET "flipped" 0.0;
          transition: DECELERATE 0.5;
-         target:  "elm.swallow.decorate.content";
+         target:  "elm.swallow.edit.content";
       }
       program {
          name:    "disable_flip_mode";
@@ -9555,7 +9555,7 @@ group { name: "elm/genlist/item/edit/default";
          source:  "elm";
          action:  STATE_SET "default" 0.0;
          transition: DECELERATE 0.5;
-         target:  "elm.swallow.decorate.content";
+         target:  "elm.swallow.edit.content";
          target:  "elm.edit.icon.1";
          target:  "elm.edit.icon.2";
       }
index 6f71689..cc9986e 100644 (file)
@@ -2387,9 +2387,9 @@ Evas_Object *gl15_content_get(void *data, Evas_Object *obj, const char *part)
 
    // "edit_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.decorate.content | elm.edit.icon,2 |
-   // --------------------------------------------------------------------
+   // ----------------------------------------------------------------
+   // | elm.edit.icon.1 | elm.swallow.edit.content | elm.edit.icon,2 |
+   // ----------------------------------------------------------------
 
    if (!strcmp(part, "elm.swallow.end"))
      {
@@ -2434,7 +2434,7 @@ gl15_sel(void *data, Evas_Object *obj, void *event_info __UNUSED__)
 }
 
 static void
-gl15_deco_mode(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+gl15_edit_mode(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    elm_genlist_decorate_mode_set(data, EINA_TRUE);
    elm_genlist_select_mode_set(data, ELM_OBJECT_SELECT_MODE_ALWAYS);
@@ -2460,7 +2460,7 @@ test_genlist15(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    int i;
    static Testitem tit[100];
 
-   win = elm_win_util_standard_add("genlist-decorate-mode", "Genlist Decorate Mode");
+   win = elm_win_util_standard_add("genlist-edit-mode", "Genlist Edit Mode");
    elm_win_autodel_set(win, EINA_TRUE);
 
    bx = elm_box_add(win);
@@ -2503,7 +2503,7 @@ test_genlist15(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
 
    bt = elm_button_add(win);
    elm_object_text_set(bt, "Edit mode");
-   evas_object_smart_callback_add(bt, "clicked", gl15_deco_mode, gl);
+   evas_object_smart_callback_add(bt, "clicked", gl15_edit_mode, gl);
    evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
    elm_box_pack_end(bx2, bt);
index 2c91bc1..748b27d 100644 (file)
@@ -31,7 +31,7 @@ struct Elm_Gen_Item
    Elm_Gen_Item_Type        *item;
    const Elm_Gen_Item_Class *itc;
    Evas_Coord                x, y, dx, dy;
-   Evas_Object              *spacer, *deco_obj;
+   Evas_Object              *spacer, *edit_obj;
    Elm_Gen_Item             *parent;
    Eina_List                *texts, *contents, *states, *content_objs;
    Ecore_Timer              *long_timer;
index 13dcd4b..5f19be0 100644 (file)
@@ -53,7 +53,7 @@ struct Elm_Gen_Item_Type
    Elm_Gen_Item                 *group_item;
    Elm_Genlist_Item_Type        type;
    Eina_List                    *mode_texts, *mode_contents, *mode_states, *mode_content_objs;
-   Eina_List                    *deco_texts, *deco_contents, *deco_states, *deco_content_objs;
+   Eina_List                    *edit_texts, *edit_contents, *edit_states, *edit_content_objs;
    Ecore_Timer                  *swipe_timer;
    Evas_Coord                    scrl_x, scrl_y, old_scrl_y;
 
@@ -700,11 +700,11 @@ _item_highlight(Elm_Gen_Item *it)
        (it->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY))
      return;
    edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm");
-   if (it->deco_obj) edje_object_signal_emit(it->deco_obj, "elm,state,selected", "elm");
+   if (it->edit_obj) edje_object_signal_emit(it->edit_obj, "elm,state,selected", "elm");
    selectraise = edje_object_data_get(VIEW(it), "selectraise");
    if ((selectraise) && (!strcmp(selectraise, "on")))
      {
-        if (it->deco_obj) evas_object_raise(it->deco_obj);
+        if (it->edit_obj) evas_object_raise(it->edit_obj);
         else evas_object_raise(VIEW(it));
         if ((it->item->group_item) && (it->item->group_item->realized))
           evas_object_raise(it->item->VIEW(group_item));
@@ -717,17 +717,17 @@ _item_unhighlight(Elm_Gen_Item *it)
 {
    if ((it->generation < it->wd->generation) || (!it->highlighted)) return;
    edje_object_signal_emit(VIEW(it), "elm,state,unselected", "elm");
-   if (it->deco_obj) edje_object_signal_emit(it->deco_obj, "elm,state,unselected", "elm");
+   if (it->edit_obj) edje_object_signal_emit(it->edit_obj, "elm,state,unselected", "elm");
    if (!it->item->nostacking)
      {
        if ((it->item->order_num_in & 0x1) ^ it->item->stacking_even)
          {
-             if (it->deco_obj) evas_object_lower(it->deco_obj);
+             if (it->edit_obj) evas_object_lower(it->edit_obj);
              else evas_object_lower(VIEW(it));
          }
        else
          {
-             if (it->deco_obj) evas_object_raise(it->deco_obj);
+             if (it->edit_obj) evas_object_raise(it->edit_obj);
              else evas_object_raise(VIEW(it));
          }
      }
@@ -991,8 +991,8 @@ _mouse_move(void        *data,
              else
                y_pos = it_scrl_y;
 
-             if (it->deco_obj)
-               _item_position(it, it->deco_obj, it->item->scrl_x, y_pos);
+             if (it->edit_obj)
+               _item_position(it, it->edit_obj, it->item->scrl_x, y_pos);
              else
              _item_position(it, VIEW(it), it->item->scrl_x, y_pos);
 
@@ -1076,8 +1076,8 @@ _long_press(void *data)
      {
         it->wd->reorder_it = it;
         it->wd->reorder_start_y = 0;
-        if (it->deco_obj)
-          evas_object_raise(it->deco_obj);
+        if (it->edit_obj)
+          evas_object_raise(it->edit_obj);
         else
           evas_object_raise(VIEW(it));
 
@@ -1722,12 +1722,12 @@ _elm_genlist_item_odd_even_update(Elm_Gen_Item *it)
      {
         if ((it->item->order_num_in & 0x1) ^ it->item->stacking_even)
           {
-             if (it->deco_obj) evas_object_lower(it->deco_obj);
+             if (it->edit_obj) evas_object_lower(it->edit_obj);
              else evas_object_lower(VIEW(it));
           }
         else
           {
-             if (it->deco_obj) evas_object_raise(it->deco_obj);
+             if (it->edit_obj) evas_object_raise(it->edit_obj);
              else evas_object_raise(VIEW(it));
           }
      }
@@ -1735,12 +1735,12 @@ _elm_genlist_item_odd_even_update(Elm_Gen_Item *it)
    if (it->item->order_num_in & 0x1)
      {
         edje_object_signal_emit(VIEW(it), "elm,state,odd", "elm");
-        if (it->deco_obj) edje_object_signal_emit(it->deco_obj, "elm,state,odd", "elm");
+        if (it->edit_obj) edje_object_signal_emit(it->edit_obj, "elm,state,odd", "elm");
      }
    else
      {
         edje_object_signal_emit(VIEW(it), "elm,state,even", "elm");
-        if (it->deco_obj) edje_object_signal_emit(it->deco_obj, "elm,state,even", "elm");
+        if (it->edit_obj) edje_object_signal_emit(it->edit_obj, "elm,state,even", "elm");
      }
 }
 
@@ -1756,8 +1756,8 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it, Item_Cache *itc)
                   edje_object_signal_emit(VIEW(it),
                                           "elm,state,selected", "elm");
 
-                  if (it->deco_obj)
-                    edje_object_signal_emit(it->deco_obj,
+                  if (it->edit_obj)
+                    edje_object_signal_emit(it->edit_obj,
                                             "elm,state,selected", "elm");
                }
           }
@@ -1766,8 +1766,8 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it, Item_Cache *itc)
              if (elm_widget_item_disabled_get(it))
                edje_object_signal_emit(VIEW(it),
                                        "elm,state,disabled", "elm");
-             if (it->deco_obj)
-               edje_object_signal_emit(it->deco_obj,
+             if (it->edit_obj)
+               edje_object_signal_emit(it->edit_obj,
                                        "elm,state,disabled", "elm");
           }
         if (it->item->expanded != itc->expanded)
@@ -1775,8 +1775,8 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it, Item_Cache *itc)
              if (it->item->expanded)
                edje_object_signal_emit(VIEW(it),
                                        "elm,state,expanded", "elm");
-             if (it->deco_obj)
-               edje_object_signal_emit(it->deco_obj,
+             if (it->edit_obj)
+               edje_object_signal_emit(it->edit_obj,
                                        "elm,state,expanded", "elm");
           }
      }
@@ -1786,8 +1786,8 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it, Item_Cache *itc)
           {
              edje_object_signal_emit(VIEW(it),
                                      "elm,state,selected", "elm");
-             if (it->deco_obj)
-               edje_object_signal_emit(it->deco_obj,
+             if (it->edit_obj)
+               edje_object_signal_emit(it->edit_obj,
                                        "elm,state,selected", "elm");
           }
 
@@ -1795,16 +1795,16 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it, Item_Cache *itc)
           {
              edje_object_signal_emit(VIEW(it),
                                      "elm,state,disabled", "elm");
-             if (it->deco_obj)
-               edje_object_signal_emit(it->deco_obj,
+             if (it->edit_obj)
+               edje_object_signal_emit(it->edit_obj,
                                        "elm,state,disabled", "elm");
           }
         if (it->item->expanded)
           {
              edje_object_signal_emit(VIEW(it),
                                      "elm,state,expanded", "elm");
-             if (it->deco_obj)
-               edje_object_signal_emit(it->deco_obj,
+             if (it->edit_obj)
+               edje_object_signal_emit(it->edit_obj,
                                        "elm,state,expanded", "elm");
           }
      }
@@ -2098,7 +2098,7 @@ _item_realize(Elm_Gen_Item *it,
                                         "elm", _signal_contract, it);
         _item_mouse_callbacks_add(it, VIEW(it));
 
-        if ((it->wd->decorate_mode) && (!it->deco_obj) &&
+        if ((it->wd->decorate_mode) && (!it->edit_obj) &&
             (it->item->type != ELM_GENLIST_ITEM_GROUP) && (it->itc->decorate_all_item_style))
           _decorate_mode_item_realize(it, EINA_FALSE);
 
@@ -2203,8 +2203,8 @@ _item_realize(Elm_Gen_Item *it,
      {
         if (it->itc->decorate_all_item_style)
           {
-             if (!it->deco_obj) _decorate_mode_item_realize(it, EINA_FALSE);
-             edje_object_message_signal_process(it->deco_obj);
+             if (!it->edit_obj) _decorate_mode_item_realize(it, EINA_FALSE);
+             edje_object_message_signal_process(it->edit_obj);
           }
      }
    edje_object_message_signal_process(VIEW(it));
@@ -2404,8 +2404,8 @@ _reorder_move_animator_cb(void *data)
         down = EINA_FALSE;
      }
 
-   if (it->deco_obj)
-     _item_position(it, it->deco_obj, it->item->scrl_x, it->item->old_scrl_y);
+   if (it->edit_obj)
+     _item_position(it, it->edit_obj, it->item->scrl_x, it->item->old_scrl_y);
    else
      _item_position(it, VIEW(it), it->item->scrl_x, it->item->old_scrl_y);
    _group_items_recalc(it->wd);
@@ -3330,8 +3330,8 @@ static void
 _decorate_mode_item_position(Elm_Gen_Item *it, int itx, int ity)
 {
    if ((!it) || (!it->wd->decorate_mode)) return;
-   evas_object_resize(it->deco_obj, it->item->w, it->item->h);
-   evas_object_move(it->deco_obj, itx, ity);
+   evas_object_resize(it->edit_obj, it->item->w, it->item->h);
+   evas_object_move(it->edit_obj, itx, ity);
 }
 
 static void
@@ -3345,11 +3345,11 @@ _decorate_mode_item_realize(Elm_Gen_Item *it, Eina_Bool effect_on)
        (it->generation < it->wd->generation))
      return;
 
-   it->deco_obj = edje_object_add(evas_object_evas_get(WIDGET(it)));
-   edje_object_scale_set(it->deco_obj, elm_widget_scale_get(WIDGET(it)) *
+   it->edit_obj = edje_object_add(evas_object_evas_get(WIDGET(it)));
+   edje_object_scale_set(it->edit_obj, elm_widget_scale_get(WIDGET(it)) *
                          _elm_config->scale);
-   evas_object_smart_member_add(it->deco_obj, it->wd->pan_smart);
-   elm_widget_sub_object_add(WIDGET(it), it->deco_obj);
+   evas_object_smart_member_add(it->edit_obj, it->wd->pan_smart);
+   elm_widget_sub_object_add(WIDGET(it), it->edit_obj);
 
    if (it->item->type & ELM_GENLIST_ITEM_TREE)
       strncpy(buf, "tree", sizeof(buf));
@@ -3360,7 +3360,7 @@ _decorate_mode_item_realize(Elm_Gen_Item *it, Eina_Bool effect_on)
    strncat(buf, "/", sizeof(buf) - strlen(buf));
    strncat(buf, it->itc->decorate_all_item_style, sizeof(buf) - strlen(buf));
 
-   _elm_theme_object_set(WIDGET(it),  it->deco_obj, "genlist", buf,
+   _elm_theme_object_set(WIDGET(it),  it->edit_obj, "genlist", buf,
                          elm_widget_style_get(WIDGET(it)));
 
    stacking_even = edje_object_data_get(VIEW(it), "stacking_even");
@@ -3371,27 +3371,27 @@ _decorate_mode_item_realize(Elm_Gen_Item *it, Eina_Bool effect_on)
    if (!stacking) stacking = "yes";
    it->item->nostacking = !!strcmp("yes", stacking);
 
-   edje_object_mirrored_set(it->deco_obj,
+   edje_object_mirrored_set(it->edit_obj,
                             elm_widget_mirrored_get(WIDGET(it)));
 
    _elm_genlist_item_odd_even_update(it);
    _elm_genlist_item_state_update(it, NULL);
 
-   if (effect_on) edje_object_signal_emit(it->deco_obj, "elm,state,decorate,enabled,effect", "elm");
-   else edje_object_signal_emit(it->deco_obj, "elm,state,decorate,enabled", "elm");
+   if (effect_on) edje_object_signal_emit(it->edit_obj, "elm,state,edit,enabled,effect", "elm");
+   else edje_object_signal_emit(it->edit_obj, "elm,state,edit,enabled", "elm");
 
    _item_mouse_callbacks_del(it, VIEW(it));
-   _item_mouse_callbacks_add(it, it->deco_obj);
+   _item_mouse_callbacks_add(it, it->edit_obj);
 
-   _item_text_realize(it, it->deco_obj, &it->item->deco_texts, NULL);
-   if (it->flipped)  edje_object_signal_emit(it->deco_obj, "elm,state,flip,enabled", "elm");
-   it->item->deco_content_objs =
-     _item_content_realize(it, it->deco_obj, &it->item->deco_contents, NULL);
-   _item_state_realize(it, it->deco_obj, &it->item->deco_states, NULL);
-   edje_object_part_swallow(it->deco_obj, "elm.swallow.decorate.content", VIEW(it));
+   _item_text_realize(it, it->edit_obj, &it->item->edit_texts, NULL);
+   if (it->flipped)  edje_object_signal_emit(it->edit_obj, "elm,state,flip,enabled", "elm");
+   it->item->edit_content_objs =
+     _item_content_realize(it, it->edit_obj, &it->item->edit_contents, NULL);
+   _item_state_realize(it, it->edit_obj, &it->item->edit_states, NULL);
+   edje_object_part_swallow(it->edit_obj, "elm.swallow.edit.content", VIEW(it));
 
    _decorate_mode_item_position(it, it->item->scrl_x, it->item->scrl_y);
-   evas_object_show(it->deco_obj);
+   evas_object_show(it->edit_obj);
 
    it->item->decorate_mode_item_realized = EINA_TRUE;
    it->want_unrealize = EINA_FALSE;
@@ -3403,24 +3403,24 @@ _decorate_mode_item_unrealize(Elm_Gen_Item *it)
    Evas_Object *icon;
    if ((!it) || (!it->item->decorate_mode_item_realized)) return;
 
-   edje_object_part_unswallow(it->deco_obj, VIEW(it));
+   edje_object_part_unswallow(it->edit_obj, VIEW(it));
    evas_object_smart_member_add(VIEW(it), it->wd->pan_smart);
    elm_widget_sub_object_add(WIDGET(it), VIEW(it));
    _elm_genlist_item_odd_even_update(it);
    _elm_genlist_item_state_update(it, NULL);
 
-   evas_object_del(it->deco_obj);
-   it->deco_obj = NULL;
-   elm_widget_stringlist_free(it->item->deco_texts);
-   it->item->deco_texts = NULL;
-   elm_widget_stringlist_free(it->item->deco_contents);
-   it->item->deco_contents = NULL;
-   elm_widget_stringlist_free(it->item->deco_states);
-   it->item->deco_states = NULL;
-   EINA_LIST_FREE(it->item->deco_content_objs, icon)
+   evas_object_del(it->edit_obj);
+   it->edit_obj = NULL;
+   elm_widget_stringlist_free(it->item->edit_texts);
+   it->item->edit_texts = NULL;
+   elm_widget_stringlist_free(it->item->edit_contents);
+   it->item->edit_contents = NULL;
+   elm_widget_stringlist_free(it->item->edit_states);
+   it->item->edit_states = NULL;
+   EINA_LIST_FREE(it->item->edit_content_objs, icon)
      evas_object_del(icon);
-   edje_object_message_signal_process(it->deco_obj);
-   _item_mouse_callbacks_del(it, it->deco_obj);
+   edje_object_message_signal_process(it->edit_obj);
+   _item_mouse_callbacks_del(it, it->edit_obj);
    _item_mouse_callbacks_add(it, VIEW(it));
 
    it->item->decorate_mode_item_realized = EINA_FALSE;
@@ -3638,14 +3638,14 @@ _item_disable_hook(Elm_Object_Item *it)
         if (elm_widget_item_disabled_get(it))
           {
              edje_object_signal_emit(VIEW(_it), "elm,state,disabled", "elm");
-             if (_it->deco_obj)
-               edje_object_signal_emit(_it->deco_obj, "elm,state,disabled", "elm");
+             if (_it->edit_obj)
+               edje_object_signal_emit(_it->edit_obj, "elm,state,disabled", "elm");
           }
         else
           {
              edje_object_signal_emit(VIEW(_it), "elm,state,enabled", "elm");
-             if (_it->deco_obj)
-               edje_object_signal_emit(_it->deco_obj, "elm,state,enabled", "elm");
+             if (_it->edit_obj)
+               edje_object_signal_emit(_it->edit_obj, "elm,state,enabled", "elm");
           }
         EINA_LIST_FOREACH(_it->content_objs, l, obj)
           elm_widget_disabled_set(obj, elm_widget_item_disabled_get(_it));