From b35b04b1c85e20f1499cb9434b4c2ae6b4c8b448 Mon Sep 17 00:00:00 2001 From: junkyu han Date: Mon, 31 Oct 2016 15:17:00 +0900 Subject: [PATCH] Remove unneccessary LOG for page indicator Change-Id: Ie299d013c6ff2aedcf82da439257796c2e247250 --- src/page_indicator.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/page_indicator.c b/src/page_indicator.c index d3dd3da..41e5c8a 100755 --- a/src/page_indicator.c +++ b/src/page_indicator.c @@ -259,7 +259,9 @@ static void __page_indicator_set_current_page(page_indicator_t *page_indicator) Evas_Object *edje = NULL; edje = elm_layout_edje_get(page_indicator->unit[i]); snprintf(cur_page_num, sizeof(cur_page_num), "%d", page_indicator->current_page + 1); - LOGD("Current page is %s, set the number to the page indicator", cur_page_num); + if (i < page_indicator->page_count) { + LOGD("Current page is %s, set the number to the page indicator", cur_page_num); + } if (i == cur_indicator_unit) { edje_object_signal_emit(edje, SIGNAL_PAGE_INDICATOR_CURRENT, SIGNAL_SOURCE); @@ -268,8 +270,10 @@ static void __page_indicator_set_current_page(page_indicator_t *page_indicator) edje_object_signal_emit(edje, SIGNAL_PAGE_INDICATOR_DEFAULT, SIGNAL_SOURCE); } - if (edje_object_part_text_set(elm_layout_edje_get(page_indicator->unit[PAGE_INDICATOR_CENTER_PAGE_INDEX]), CENTER_UNIT_TEXT, cur_page_num) == EINA_FALSE) { - LOGE("Failed to set text on the page indicator"); + if (page_indicator->page_count > PAGE_INDICATOR_MAX_PAGE_COUNT && i == PAGE_INDICATOR_CENTER_PAGE_INDEX) { + if (edje_object_part_text_set(elm_layout_edje_get(page_indicator->unit[PAGE_INDICATOR_CENTER_PAGE_INDEX]), CENTER_UNIT_TEXT, cur_page_num) == EINA_FALSE) { + LOGE("Failed to set text on the page indicator"); + } } } } -- 2.7.4