Remove unneccessary LOG for page indicator 78/94478/1
authorjunkyu han <junkyu.han@samsung.com>
Mon, 31 Oct 2016 06:17:00 +0000 (15:17 +0900)
committerjunkyu han <junkyu.han@samsung.com>
Mon, 31 Oct 2016 06:17:00 +0000 (15:17 +0900)
Change-Id: Ie299d013c6ff2aedcf82da439257796c2e247250

src/page_indicator.c

index d3dd3da..41e5c8a 100755 (executable)
@@ -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");
+                       }
                }
        }
 }