Fix icons priority according to Guide. submit/tizen/20160610.074310
authorRadoslaw Czerski <r.czerski@samsung.com>
Thu, 9 Jun 2016 14:58:48 +0000 (16:58 +0200)
committerRadoslaw Czerski <r.czerski@samsung.com>
Fri, 10 Jun 2016 07:43:07 +0000 (09:43 +0200)
Before changes icons with highest priority were treated as with lowest priority.

Change-Id: Iec450a4713008c81874e40b405b2996a5f50db96
Signed-off-by: Radoslaw Czerski <r.czerski@samsung.com>
inc/indicator.h
src/box.c
src/icon.c

index 6f489c3c5c8151f8ae1eb65edc04ae9bbace75e3..b2999258ee06e5b1089a274295ec544e8bb22002 100644 (file)
@@ -73,10 +73,11 @@ enum {
        INDICATOR_PRIORITY_SYSTEM_MAX = INDICATOR_PRIORITY_SYSTEM_6,
 
        INDICATOR_PRIORITY_MINICTRL_MIN,
-       INDICATOR_PRIORITY_MINICTRL1 = INDICATOR_PRIORITY_MINICTRL_MIN, /* MINICTRL - Voice recorder */
-       INDICATOR_PRIORITY_MINICTRL2, /* MINICTRL - Music/FM Radio */
-       INDICATOR_PRIORITY_MINICTRL3, /* MINICTRL - Call *//* MINICTRL - Voice recorder */
-       INDICATOR_PRIORITY_MINICTRL_MAX = INDICATOR_PRIORITY_MINICTRL3,
+       INDICATOR_PRIORITY_MINICTRL1 = INDICATOR_PRIORITY_MINICTRL_MIN, /* MINICTRL - Call-incoming/during call */
+       INDICATOR_PRIORITY_MINICTRL2, /* MINICTRL - Call - Call Settings - Mute */
+       INDICATOR_PRIORITY_MINICTRL3, /* MINICTRL - Call - Call Settings - Speaker on*/
+       INDICATOR_PRIORITY_MINICTRL4, /* MINICTRL - 3rd Party app icon*/
+       INDICATOR_PRIORITY_MINICTRL_MAX = INDICATOR_PRIORITY_MINICTRL4,
 
        INDICATOR_PRIORITY_NOTI_MIN,
        INDICATOR_PRIORITY_NOTI_1 = INDICATOR_PRIORITY_NOTI_MIN,
index 8346641d3e4201519c0aadd4b2a2514386a597e7..da39f3856edc1d6ffc49417f618f99be3704482f 100644 (file)
--- a/src/box.c
+++ b/src/box.c
@@ -395,15 +395,14 @@ extern int box_pack(icon_s *icon)
                EINA_LIST_FOREACH(_view_system_list, l, data) {
                        if (data->priority <= icon->priority) {
                                icon->exist_in_view = EINA_TRUE;
-                               _view_system_list = eina_list_append_relative_list(_view_system_list, icon, l);
+                               _view_system_list = eina_list_prepend_relative_list(_view_system_list, icon, l);
                                _D("System (eina_list_append_relative_list) %s",icon->name);
                                goto __CATCH;
                        }
                }
-
                /* if finding condition is failed, append it at tail */
                icon->exist_in_view = EINA_TRUE;
-               _view_system_list = eina_list_prepend(_view_system_list, icon);
+               _view_system_list = eina_list_append(_view_system_list, icon);
                _D("System prepend (Priority low) : %s",icon->name);
 
        } else if(INDICATOR_ICON_AREA_MINICTRL == icon->area) {
@@ -414,11 +413,10 @@ extern int box_pack(icon_s *icon)
                EINA_LIST_FOREACH(_view_minictrl_list, l, data) {
                        if (data->priority <= icon->priority) {
                                icon->exist_in_view = EINA_TRUE;
-                               _view_minictrl_list = eina_list_append_relative_list(_view_minictrl_list, icon, l);
+                               _view_minictrl_list = eina_list_prepend_relative_list(_view_minictrl_list, icon, l);
                                goto __CATCH;
                        }
                }
-
                /* if finding condition is failed, append it at tail */
                icon->exist_in_view = EINA_TRUE;
                _view_minictrl_list = eina_list_append(_view_minictrl_list, icon);
@@ -431,6 +429,7 @@ extern int box_pack(icon_s *icon)
                        goto __CATCH;
                }
 
+
                /* if finding condition is failed, append it at tail */
                icon->exist_in_view = EINA_TRUE;
                _view_noti_list = eina_list_append(_view_noti_list, icon);
index 528073551725906ab7a9541698d513b316bba877..ea6b31f98b5cd92ad2b9054e76a3b6e15daa0e3d 100644 (file)
@@ -670,9 +670,7 @@ void icon_reset_list(void)
        int minictrl_cnt = box_get_count(MINICTRL_LIST);
 
        if (minictrl_cnt > box_get_minictrl_list()) {
-               _D("11 minictrl_cnt : %d //  box_get_minictrl_list : %d", minictrl_cnt, box_get_minictrl_list());
                while (minictrl_cnt > box_get_minictrl_list()) {
-                       _D("22 minictrl_cnt : %d //  box_get_minictrl_list : %d", minictrl_cnt, box_get_minictrl_list());
                        icon_s *wish_remove_icon = NULL;
                        wish_remove_icon = list_try_to_find_icon_to_remove(INDICATOR_ICON_AREA_MINICTRL,0);