From: JuWan Kim Date: Tue, 3 Mar 2015 08:37:55 +0000 (+0900) Subject: Fix ctxpopup y position bug for speaker setup. X-Git-Tag: accepted/tizen/tv/20150304.011859^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F79%2F36179%2F1;p=profile%2Ftv%2Fapps%2Fnative%2Fsettings.git Fix ctxpopup y position bug for speaker setup. Change-Id: If28a5cedc48fac66acfb95732a6e91f5ff880970 Signed-off-by: JuWan Kim --- diff --git a/src/parser.c b/src/parser.c index 7bcd2c9..a5df745 100644 --- a/src/parser.c +++ b/src/parser.c @@ -43,7 +43,6 @@ static void _restore_json_reader_location(struct json_parser *jparser, } while (cnt > 0) { - _DBG("[cnt = %d] json_reader_end_member",cnt); json_reader_end_member(jparser->reader); cnt--; } @@ -257,28 +256,22 @@ char **parser_get_itemlist_from_json(struct json_parser *jparser, cursor = 0; // For Debugging - _DBG("==================================================================================="); - _DBG("[START][ name = %s ][Parser = %x][Reader = %x]",name, jparser, jparser->reader); - _DBG("Member cnt = %d", json_reader_count_members(jparser->reader)); - _DBG("Current Member = %s", json_reader_get_member_name(jparser->reader)); + //_DBG("[START][ name = %s ][Parser = %x][Reader = %x]",name, jparser, jparser->reader); + //_DBG("Member cnt = %d", json_reader_count_members(jparser->reader)); + //_DBG("Current Member = %s", json_reader_get_member_name(jparser->reader)); if (flag == DRAWING_INFO) { - _DBG("[%s] flag is DRAWING_INFO", JSONSTR_SETTING_ITEMS); if (!json_reader_read_member(jparser->reader, JSONSTR_SETTING_ITEMS)) { cursor++; - _DBG("[%s] Fail to read member from json", JSONSTR_SETTING_ITEMS); goto error; } } else if (flag == SUBMENU_INFO) { - _DBG("[%s] flag is SUBMENU_INFO", JSONSTR_SETTING_TREE); if (!json_reader_read_member(jparser->reader, JSONSTR_SETTING_TREE)) { cursor++; - _DBG("[%s] Fail to read member from json", JSONSTR_SETTING_TREE); goto error; } } else { - _DBG("flag is invalid. flag = %d", flag); goto error; } @@ -287,11 +280,8 @@ char **parser_get_itemlist_from_json(struct json_parser *jparser, if (!json_reader_read_member(jparser->reader, name)) { cursor++; - _DBG("[%s] Fail to read member from json", name); goto error; } - _DBG("[END][ name = %s ]",name); - _DBG("==================================================================================="); cursor++; @@ -302,8 +292,6 @@ char **parser_get_itemlist_from_json(struct json_parser *jparser, return list; error: - _DBG("[END-ERROR][ name = %s ]",name); - _DBG("==================================================================================="); _restore_json_reader_location(jparser, cursor); *cnt = 0; diff --git a/src/utils.c b/src/utils.c index 3184ddf..20c2378 100644 --- a/src/utils.c +++ b/src/utils.c @@ -249,9 +249,6 @@ Evas_Object *utils_add_ctxpopup(Evas_Object *base, char *style) return NULL; } - if (style) - elm_object_style_set(ctxpopup, style); - return ctxpopup; } diff --git a/src/view_sublist.c b/src/view_sublist.c index 79ab5b9..a5110f2 100644 --- a/src/view_sublist.c +++ b/src/view_sublist.c @@ -592,9 +592,13 @@ static int _draw_sublist(struct _sublist_data *data) height = MAX_ITEMS * ITEM_HEIGHT + ITEM_OFFSET; if (y > screen_h) + { y = y - height; + _DBG("y > screen_h !!!!!! y = %d", y); + } - evas_object_move(data->ctxpopup, x * ELM_SCALE, y * ELM_SCALE); + _DBG("x : %d , y : %d, ELM_SCALE = %f, height = %d", x , y , ELM_SCALE, height); + evas_object_move(data->ctxpopup, x * ELM_SCALE, (y * ELM_SCALE) + height); utils_set_focus_directions(data->sub_btn_array, data->sub_items_count); diff --git a/src/viewmgr.c b/src/viewmgr.c index cb2872a..4bd4f6e 100644 --- a/src/viewmgr.c +++ b/src/viewmgr.c @@ -411,13 +411,11 @@ int settingmgr_view_push(struct setting_mgr *mgr, goto error; } - _DBG("START sclass->create ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); base = sclass->create(mgr, view, data); if (!base) { _ERR("failed to create base layout."); goto error; } - _DBG("END sclass->create ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); _frozen_view_in_list(mgr);