Fix JIRA issue (N_SE-45372) submit/tizen_2.2/20130714.154515
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 9 Jul 2013 09:44:30 +0000 (18:44 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 9 Jul 2013 09:44:30 +0000 (18:44 +0900)
[Problem] Genlist item style was not updated

[Cause] Item was not updated

[Solution] Send the signal to update the item style

Change-Id: I24ef319df7a49f1c2b6c64b02e031f1faf649c59

src/ui/bt-main-view.c

index 651a467..4940a5f 100644 (file)
@@ -4166,24 +4166,62 @@ void _bt_main_add_searched_title(bt_ug_data *ugd)
        ugd->bottom_padding = git;
 }
 
+static void __bt_main_emit_signal(bt_dev_t *dev)
+{
+       FN_START;
+
+       ret_if(dev == NULL);
+
+       switch (dev->item_type) {
+       case BT_ITEM_TOP:
+               elm_object_item_signal_emit(dev->genlist_item,
+                                       "elm,state,top", "");
+               break;
+       case BT_ITEM_CENTER:
+               elm_object_item_signal_emit(dev->genlist_item,
+                                       "elm,state,center", "");
+               break;
+       case BT_ITEM_BOTTOM:
+               elm_object_item_signal_emit(dev->genlist_item,
+                                       "elm,state,bottom", "");
+               break;
+       default:
+               elm_object_item_signal_emit(dev->genlist_item,
+                                       "elm,state,default", "");
+               break;
+       }
+
+        FN_END;
+}
+
 void _bt_update_device_list(bt_ug_data *ugd)
 {
+       FN_START;
+
        Eina_List *l = NULL;
        bt_dev_t *dev = NULL;
 
        ret_if(ugd == NULL);
 
        EINA_LIST_FOREACH(ugd->paired_device, l, dev) {
-               if (dev)
+               if (dev) {
                        elm_genlist_item_update(
                                (Elm_Object_Item *)dev->genlist_item);
+
+                       __bt_main_emit_signal(dev);
+               }
        }
 
        EINA_LIST_FOREACH(ugd->searched_device, l, dev) {
-               if (dev)
+               if (dev) {
                        elm_genlist_item_update(
                                (Elm_Object_Item *)dev->genlist_item);
+
+                       __bt_main_emit_signal(dev);
+               }
        }
+
+       FN_END;
 }
 
 void _bt_update_paired_item_style(bt_ug_data *ugd)