The more panel should be changed when the theme is changed.
[framework/uifw/elementary.git] / src / lib / elm_list.c
index f06bfe1..d370baa 100644 (file)
@@ -133,7 +133,9 @@ _elm_list_item_free(Elm_List_Item *it)
    eina_stringshare_del(it->label);
 
    if (it->swipe_timer) ecore_timer_del(it->swipe_timer);
+   it->swipe_timer = NULL;
    if (it->long_timer) ecore_timer_del(it->long_timer);
+   it->long_timer = NULL;
    if (it->icon) evas_object_del(it->icon);
    if (it->end) evas_object_del(it->end);
 }
@@ -166,7 +168,7 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
 
    /* TODO: fix logic for horizontal mode */
    if ((!strcmp(ev->keyname, "Left")) ||
-       (!strcmp(ev->keyname, "KP_Left")))
+       ((!strcmp(ev->keyname, "KP_Left")) && !ev->string))
      {
         if ((wd->h_mode) &&
             (((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
@@ -180,7 +182,7 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
           x -= step_x;
      }
    else if ((!strcmp(ev->keyname, "Right")) ||
-            (!strcmp(ev->keyname, "KP_Right")))
+            ((!strcmp(ev->keyname, "KP_Right")) && !ev->string))
      {
         if ((wd->h_mode) &&
             (((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
@@ -194,7 +196,7 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
           x += step_x;
      }
    else if ((!strcmp(ev->keyname, "Up"))  ||
-            (!strcmp(ev->keyname, "KP_Up")))
+            ((!strcmp(ev->keyname, "KP_Up")) && !ev->string))
      {
         if ((!wd->h_mode) &&
             (((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
@@ -208,7 +210,7 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
           y -= step_y;
      }
    else if ((!strcmp(ev->keyname, "Down")) ||
-            (!strcmp(ev->keyname, "KP_Down")))
+            ((!strcmp(ev->keyname, "KP_Down")) && !ev->string))
      {
         if ((!wd->h_mode) &&
             (((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
@@ -222,7 +224,7 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
           y += step_y;
      }
    else if ((!strcmp(ev->keyname, "Home")) ||
-            (!strcmp(ev->keyname, "KP_Home")))
+            ((!strcmp(ev->keyname, "KP_Home")) && !ev->string))
      {
         it = eina_list_data_get(wd->items);
         elm_list_item_bring_in((Elm_Object_Item *)it);
@@ -230,7 +232,7 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
         return EINA_TRUE;
      }
    else if ((!strcmp(ev->keyname, "End")) ||
-            (!strcmp(ev->keyname, "KP_End")))
+            ((!strcmp(ev->keyname, "KP_End")) && !ev->string))
      {
         it = eina_list_data_get(eina_list_last(wd->items));
         elm_list_item_bring_in((Elm_Object_Item *)it);
@@ -238,7 +240,7 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
         return EINA_TRUE;
      }
    else if ((!strcmp(ev->keyname, "Prior")) ||
-            (!strcmp(ev->keyname, "KP_Prior")))
+            ((!strcmp(ev->keyname, "KP_Prior")) && !ev->string))
      {
         if (wd->h_mode)
           {
@@ -256,7 +258,7 @@ _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type ty
           }
      }
    else if ((!strcmp(ev->keyname, "Next")) ||
-            (!strcmp(ev->keyname, "KP_Next")))
+            ((!strcmp(ev->keyname, "KP_Next")) && !ev->string))
      {
         if (wd->h_mode)
           {
@@ -1050,7 +1052,7 @@ _item_disable(Elm_Object_Item *it)
 }
 
 static void
-_item_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content)
+_item_content_set_hook(Elm_Object_Item *it, const char *part, Evas_Object *content)
 {
    Elm_List_Item *item = (Elm_List_Item *)it;
    Evas_Object **icon_p = NULL;
@@ -1092,7 +1094,7 @@ _item_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content)
 }
 
 static Evas_Object *
-_item_content_get(const Elm_Object_Item *it, const char *part)
+_item_content_get_hook(const Elm_Object_Item *it, const char *part)
 {
    Elm_List_Item *item = (Elm_List_Item *)it;
 
@@ -1110,37 +1112,37 @@ _item_content_get(const Elm_Object_Item *it, const char *part)
 }
 
 static Evas_Object *
-_item_content_unset(const Elm_Object_Item *it, const char *part)
+_item_content_unset_hook(const Elm_Object_Item *it, const char *part)
 {
    Elm_List_Item *item = (Elm_List_Item *)it;
 
    if ((!part) || (!strcmp(part, "start")))
      {
         Evas_Object *obj = item->icon;
-        _item_content_set((Elm_Object_Item *)it, part, NULL);
+        _item_content_set_hook((Elm_Object_Item *)it, part, NULL);
         return obj;
      }
    else if (!strcmp(part, "end"))
      {
         Evas_Object *obj = item->end;
-        _item_content_set((Elm_Object_Item *)it, part, NULL);
+        _item_content_set_hook((Elm_Object_Item *)it, part, NULL);
         return obj;
      }
    return NULL;
 }
 
 static void
-_item_text_set(Elm_Object_Item *it, const char *part, const char *text)
+_item_text_set_hook(Elm_Object_Item *it, const char *part, const char *text)
 {
    Elm_List_Item *list_it = (Elm_List_Item *)it;
    if (part && strcmp(part, "default")) return;
    if (!eina_stringshare_replace(&list_it->label, text)) return;
    if (VIEW(list_it))
-     edje_object_part_text_set(VIEW(list_it), "elm.text", text);
+     edje_object_part_text_escaped_set(VIEW(list_it), "elm.text", text);
 }
 
 static const char *
-_item_text_get(const Elm_Object_Item *it, const char *part)
+_item_text_get_hook(const Elm_Object_Item *it, const char *part)
 {
    if (part && strcmp(part, "default")) return NULL;
    return ((Elm_List_Item *)it)->label;
@@ -1214,11 +1216,11 @@ _item_new(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *e
                                        _changed_size_hints, obj);
      }
    elm_widget_item_disable_hook_set(it, _item_disable);
-   elm_widget_item_content_set_hook_set(it, _item_content_set);
-   elm_widget_item_content_get_hook_set(it, _item_content_get);
-   elm_widget_item_content_unset_hook_set(it, _item_content_unset);
-   elm_widget_item_text_set_hook_set(it, _item_text_set);
-   elm_widget_item_text_get_hook_set(it, _item_text_get);
+   elm_widget_item_content_set_hook_set(it, _item_content_set_hook);
+   elm_widget_item_content_get_hook_set(it, _item_content_get_hook);
+   elm_widget_item_content_unset_hook_set(it, _item_content_unset_hook);
+   elm_widget_item_text_set_hook_set(it, _item_text_set_hook);
+   elm_widget_item_text_get_hook_set(it, _item_text_get_hook);
    elm_widget_item_del_pre_hook_set(it, _item_del_pre_hook);
    return it;
 }
@@ -1349,7 +1351,7 @@ _fix_items(Evas_Object *obj)
                   else if (!strcmp(stacking, "above"))
                     evas_object_raise(VIEW(it));
                }
-             edje_object_part_text_set(VIEW(it), "elm.text", it->label);
+             edje_object_part_text_escaped_set(VIEW(it), "elm.text", it->label);
 
              if ((!it->icon) && (minh[0] > 0))
                {