From: bhutani.92 Date: Wed, 28 Dec 2016 09:57:49 +0000 (+0530) Subject: Fixed Music Widget Flicker issue X-Git-Tag: submit/tizen/20170524.061254~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ecc5a3812cded4e2cd394817da4ea92be1f4df9b;p=profile%2Fmobile%2Fapps%2Fnative%2Fmusic-player.git Fixed Music Widget Flicker issue Change-Id: Ic7f8c835fb69adc5871ec5023c9f45d02120e08a Signed-off-by: bhutani.92 --- diff --git a/widget/src/mp-widget-create.c b/widget/src/mp-widget-create.c index 031c027..e28e540 100644 --- a/widget/src/mp-widget-create.c +++ b/widget/src/mp-widget-create.c @@ -99,6 +99,13 @@ static void mp_widget_read_ini_file_ecore(void *data, char *path) key = strtok_r(str, "=", &sptr); value = strtok_r(NULL, "=", &sptr); DEBUG_TRACE("key is: %s and value is: %s", key, value); + + if (!strcmp(key, " \n")) { + ERROR_TRACE("Current File is removed. No contents."); + line_count++; + continue; + } + if (value != NULL) { value[strlen(value) - 1] = '\0'; } else { @@ -115,6 +122,7 @@ static void mp_widget_read_ini_file_ecore(void *data, char *path) fclose(file); return; } + if (!strcmp(key, "status")) { if (!strcmp(value, "playing")) { elm_object_signal_emit(layout, "music_present", "elm"); @@ -170,7 +178,7 @@ static void mp_widget_read_ini_file_ecore(void *data, char *path) line_count++; } - if (line_count <= 1) { + if (line_count == 1) { elm_object_signal_emit(layout, "no_music", "elm"); is_play = EINA_FALSE; }