Fixed Music Widget Flicker issue 16/125716/1
authorbhutani.92 <bhutani.92@samsung.com>
Wed, 28 Dec 2016 09:57:49 +0000 (15:27 +0530)
committerbhutani.92 <bhutani.92@samsung.com>
Tue, 18 Apr 2017 12:15:35 +0000 (17:45 +0530)
Change-Id: Ic7f8c835fb69adc5871ec5023c9f45d02120e08a
Signed-off-by: bhutani.92 <bhutani.92@samsung.com>
widget/src/mp-widget-create.c

index 031c027..e28e540 100644 (file)
@@ -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;
        }