Related to Indicator UI Guide.
New group: Connection/System
Icons moved to the group:
Bluetooth
Call divert
Change-Id: I8bf0796613a847f443d95adf2317b4034fb15cf5
Signed-off-by: Radoslaw Czerski <r.czerski@samsung.com>
LAND_SYSTEM_ICON_COUNT = 6,
PORT_MINICTRL_ICON_COUNT = 2, // MIN : (1), MAX : (3)
LAND_MINICTRL_ICON_COUNT = 2,
+ PORT_CONNECTION_SYSTEM_ICON_COUNT = 2, // MIN : (1), MAX : (2)
+ LAND_CONNECTION_SYSTEM_ICON_COUNT = 2,
} Icon_Display_Count;
typedef enum Box_List {
FIXED_LIST = 0,
SYSTEM_LIST,
MINICTRL_LIST,
- NOTI_LIST
+ NOTI_LIST,
+ CONNECTION_SYSTEM_LIST
} Box_List;
extern int box_pack(icon_s *icon);
extern int box_check_more_icon_area(win_info *win, Evas_Coord curr_x, Evas_Coord curr_y);
extern void box_update_display(win_info *win);
extern int box_get_enabled_system_count(void);
+int box_get_enabled_connection_system_count(void);
+
extern int box_get_minictrl_list(void);
#endif /*__INDICATOR_BOX_UTIL_H__*/
INDICATOR_PRIORITY_NOTI_MIN,
INDICATOR_PRIORITY_NOTI_1 = INDICATOR_PRIORITY_NOTI_MIN,
INDICATOR_PRIORITY_NOTI_2, /* Ongoing/Normal notification */
- INDICATOR_PRIORITY_NOTI_MAX = INDICATOR_PRIORITY_NOTI_2
+ INDICATOR_PRIORITY_NOTI_MAX = INDICATOR_PRIORITY_NOTI_2,
+
+ INDICATOR_PRIORITY_CONNECTION_SYSTEM_MIN,
+ INDICATOR_PRIORITY_CONNECTION_SYSTEM_1, /* CONNECTION/SYSTEM - Bluetooth */
+ INDICATOR_PRIORITY_CONNECTION_SYSTEM_2, /* CONNECTION/SYSTEM - Call divert*/
+ INDICATOR_PRIORITY_CONNECTION_SYSTEM_MAX = INDICATOR_PRIORITY_CONNECTION_SYSTEM_2
};
enum indicator_icon_type {
INDICATOR_ICON_AREA_SYSTEM,
INDICATOR_ICON_AREA_MINICTRL,
INDICATOR_ICON_AREA_NOTI,
- INDICATOR_ICON_AREA_ALARM
+ INDICATOR_ICON_AREA_ALARM,
+ INDICATOR_ICON_AREA_CONNECTION_SYSTEM
};
typedef enum indicator_icon_ani {
Evas_Object *_non_fixed_box;
Evas_Object *_minictrl_box;
Evas_Object *_noti_box;
+ Evas_Object *_connection_system_box;
Evas_Object *_dynamic_box;
Evas_Object *_dynamic_box_noti;
Evas_Object *_alarm_box;
state: "default" 0.0;
visible: 0;
rel1 { relative: 1.0 0.0; to_x: padding.left; to_y: elm.rect.bg; }
- rel2 { relative: 0.0 1.0; to_x: elm.swallow.fixed6; to_y: elm.rect.bg; }
+ rel2 { relative: 0.0 1.0; to_x: elm.swallow.connection/system; to_y: elm.rect.bg; }
align: 0.0 0.0;
}
}
min: 0 0;
#endif
fixed: 1 0;
- rel1 { relative: 0.0 0.0; to_x: elm.swallow.fixed6; to_y: elm.rect.right_con; }
- rel2 { relative: 0.0 1.0; to_x: elm.swallow.fixed6; to_y: elm.rect.right_con; }
+ rel1 { relative: 0.0 0.0; to_x: elm.swallow.connection/system; to_y: elm.rect.right_con; }
+ rel2 { relative: 0.0 1.0; to_x: elm.swallow.connection/system; to_y: elm.rect.right_con; }
align: 1.0 0.5;
}
description {
}
}
- /* Connection1 (NON_FIXED) (BT) */
- FIXED_RECT_FROM_LEFT( "elm.rect.bt", "elm.swallow.fixed5", "elm.rect.bg", DEFAULT_ICON_PADDING, 0 255 0 255, 0)
- SWALLOW_PART_FROM_LEFT_WITH_SPACE( "elm.swallow.fixed6", "elm.rect.bt", "elm.rect.bg", DEFAULT_ICON_WIDTH, DEFAULT_ICON_HEIGHT )
+ /* Connection/System (Bluetooth, Call divert) */
+ FIXED_RECT_FROM_LEFT( "elm.rect.connection/system", "elm.swallow.fixed5", "elm.rect.bg", DEFAULT_ICON_PADDING, 255 0 0 255, 0)
+ SWALLOW_PART_FROM_LEFT_WITH_SPACE( "elm.swallow.connection/system", "elm.rect.connection/system", "elm.rect.bg", DEFAULT_ICON_WIDTH, DEFAULT_ICON_HEIGHT )
+
/* Connection2 (NON_FIXED) (WiFi-direct) */
- FIXED_RECT_FROM_LEFT( "elm.rect.wifidirect", "elm.swallow.fixed6", "elm.rect.bg", DEFAULT_ICON_PADDING, 0 0 255 255, 0)
+ FIXED_RECT_FROM_LEFT( "elm.rect.wifidirect", "elm.swallow.connection/system", "elm.rect.bg", DEFAULT_ICON_PADDING, 0 0 255 255, 0)
SWALLOW_PART_FROM_LEFT_WITH_SPACE( "elm.swallow.fixed7", "elm.rect.wifidirect", "elm.rect.bg", DEFAULT_ICON_WIDTH, DEFAULT_ICON_HEIGHT )
///////// RIGHT SIDE /////////////////////
//////////////////////////////////////////
- /* System (Sound Profile, Call divert, Alarm, GPS) */
+ /* System (Sound Profile, Alarm, GPS) */
FIXED_RECT_FROM_RIGHT( "elm.rect.system", "elm.swallow.fixed8", "elm.rect.bg", DEFAULT_ICON_PADDING, 255 0 0 255, 0)
SWALLOW_PART_FROM_RIGHT_WITH_SPACE( "elm.swallow.system", "elm.rect.system", "elm.rect.bg", DEFAULT_ICON_WIDTH, DEFAULT_ICON_HEIGHT )
action: STATE_SET "hide" 0.0;
signal: "indicator.lock.on";
source: "indicator.prog";
- target: "elm.swallow.fixed6";
+ target: "elm.swallow.connection/system";
target: "seperator.image";
target: "padding.separator";
target: "padding.separator2";
action: STATE_SET "default" 0.0;
signal: "indicator.lock.off";
source: "indicator.prog";
- target: "elm.swallow.fixed6";
+ target: "elm.swallow.connection/system";
target: "seperator.image";
target: "padding.separator";
target: "padding.separator2";
target: "elm.swallow.fixed5";
target: "elm.rect.wifi";
}
- // BLUETOOTH
- program {
- name: "indicator.bluetooth.show";
- action: STATE_SET "default" 0.0;
- signal: "indicator.bluetooth.show";
- source: "indicator.prog";
- target: "elm.swallow.fixed6";
- target: "elm.rect.bt";
- }
-
- program {
- name: "indicator.bluetooth.hide";
- action: STATE_SET "hide" 0.0;
- signal: "indicator.bluetooth.hide";
- source: "indicator.prog";
- target: "elm.swallow.fixed6";
- target: "elm.rect.bt";
- }
// WIFI-Direct
program {
name: "indicator.wifidirect.show";
target: "elm.swallow.minictrl";
target: "elm.rect.minictrl";
}
+ // Connection/System box
+ program {
+ name: "indicator.connection/system.show";
+ action: STATE_SET "default" 0.0;
+ signal: "indicator.connection/system.show";
+ source: "indicator.prog";
+ target: "elm.swallow.connection/system";
+ target: "elm.rect.connection/system";
+ }
+
+ program {
+ name: "indicator.connection/system.hide";
+ action: STATE_SET "hide" 0.0;
+ signal: "indicator.connection/system.hide";
+ source: "indicator.prog";
+ target: "elm.swallow.connection/system";
+ target: "elm.rect.connection/system";
+ }
// Noti box
program {
name: "indicator.noti.show";
#include "log.h"
#define FIXED_BOX_PART_NAME "elm.swallow.fixed"
+#define CONNECTION_SYSTEM_BOX_PART_NAME "elm.swallow.connection/system"
#define SYSTEM_BOX_PART_NAME "elm.swallow.system"
#define MINICTRL_BOX_PART_NAME "elm.swallow.minictrl"
#define NOTI_BOX_PART_NAME "elm.swallow.noti"
Eina_List *_view_minictrl_list;
Eina_List *_view_noti_list;
Eina_List *_view_alarm_list;
+Eina_List *_view_connection_system_list;
/* FIXME */
#if 0
_create_img_obj(icon);
_box_pack_icon(icon, win->_minictrl_box);
}
+ if (icon->area == INDICATOR_ICON_AREA_CONNECTION_SYSTEM
+ && icon->priority >= INDICATOR_PRIORITY_CONNECTION_SYSTEM_MIN
+ && icon->priority <= INDICATOR_PRIORITY_CONNECTION_SYSTEM_MAX) {
+ _create_img_obj(icon);
+ _box_pack_icon(icon, win->_connection_system_box);
+ }
if (icon->area == INDICATOR_ICON_AREA_NOTI) {
_create_img_obj(icon);
_box_pack_icon(icon, win->_noti_box);
case MINICTRL_LIST:
count = eina_list_count(_view_minictrl_list);
break;
+ case CONNECTION_SYSTEM_LIST:
+ count = eina_list_count(_view_connection_system_list);
+ break;
case NOTI_LIST:
count = eina_list_count(_view_noti_list);
break;
} else {
util_signal_emit(win->data, "indicator.minictrl.hide", "indicator.prog");
}
+ if
+ (box_get_count(CONNECTION_SYSTEM_LIST)) {
+ util_signal_emit(win->data, "indicator.connection/system.show", "indicator.prog");
+ } else {
+ util_signal_emit(win->data, "indicator.connection/system.hide", "indicator.prog");
+ }
if (box_get_count(NOTI_LIST)) {
util_signal_emit(win->data, "indicator.noti.show", "indicator.prog");
elm_box_unpack_all(win->_non_fixed_box);
elm_box_unpack_all(win->_minictrl_box);
+ elm_box_unpack_all(win->_connection_system_box);
elm_box_unpack_all(win->_noti_box);
elm_box_unpack_all(win->_alarm_box);
elm_box_unpack_all(win->_digit_box);
_update_icon(win, _view_fixed_list);
+ _update_icon(win, _view_connection_system_list);
_update_icon(win, _view_system_list);
_update_icon(win, _view_minictrl_list);
_update_icon(win, _view_noti_list);
icon->exist_in_view = EINA_TRUE;
_view_system_list = eina_list_prepend(_view_system_list, icon);
_D("System prepend (Priority low) : %s",icon->name);
+
} else if(INDICATOR_ICON_AREA_MINICTRL == icon->area) {
_D("Pack to MINICTRL list : %s", icon->name);
icon_s *data;
/* 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);
+
} else if(INDICATOR_ICON_AREA_NOTI == icon->area) {
if(strncmp(icon->name, MORE_NOTI, strlen(MORE_NOTI))==0)
{
/* 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);
+
+ } else if(INDICATOR_ICON_AREA_CONNECTION_SYSTEM == icon->area) {
+ _D("Pack to Connection/System list : %s", icon->name);
+ icon_s *data;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(_view_connection_system_list, l, data) {
+ if (data->priority <= icon->priority) {
+ icon->exist_in_view = EINA_TRUE;
+ _view_connection_system_list = eina_list_append_relative_list(_view_connection_system_list, icon, l);
+ goto __CATCH;
+ }
+ }
+
+ /* if finding condition is failed, append it at tail */
+ icon->exist_in_view = EINA_TRUE;
+ _view_connection_system_list = eina_list_append(_view_connection_system_list, icon);
+
} else {
icon->exist_in_view = EINA_TRUE;
_view_alarm_list = eina_list_append(_view_alarm_list, icon);
previous_noti_count = noti_count;
if (icon->area == INDICATOR_ICON_AREA_NOTI
|| icon->area == INDICATOR_ICON_AREA_SYSTEM
- || icon->area == INDICATOR_ICON_AREA_MINICTRL) {
+ || icon->area == INDICATOR_ICON_AREA_MINICTRL
+ || icon->area == INDICATOR_ICON_AREA_CONNECTION_SYSTEM) {
int bDisplay = 0;
bDisplay = 1;
icon->exist_in_view = EINA_TRUE;
_view_minictrl_list = eina_list_append(_view_minictrl_list, icon);
break;
+ case INDICATOR_ICON_AREA_CONNECTION_SYSTEM:
+ icon->exist_in_view = EINA_TRUE;
+ _view_connection_system_list = eina_list_append(_view_connection_system_list, icon);
+ break;
case INDICATOR_ICON_AREA_NOTI:
EINA_LIST_FOREACH(_view_noti_list, l, data) {
if (strncmp(data->name, MORE_NOTI, strlen(MORE_NOTI)) == 0) {
icon->exist_in_view = EINA_FALSE;
_view_noti_list = eina_list_remove(_view_noti_list, icon);
break;
+ case INDICATOR_ICON_AREA_CONNECTION_SYSTEM:
+ icon->exist_in_view = EINA_FALSE;
+ _view_connection_system_list = eina_list_remove(_view_connection_system_list, icon);
+ break;
case INDICATOR_ICON_AREA_ALARM:
icon->exist_in_view = EINA_FALSE;
_view_alarm_list = eina_list_remove(_view_alarm_list, icon);
free(str_text);
}
}
+ /* Make Non Fixed Box(CONNECTION/SYSTEM) Object */
+ win->_connection_system_box = _box_add(win->layout);
+ ret_if(!(win->_connection_system_box));
+
+ evas_object_size_hint_align_set(win->_connection_system_box, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ edje_object_part_swallow(elm_layout_edje_get(win->layout), CONNECTION_SYSTEM_BOX_PART_NAME, win->_connection_system_box);
/* Make Non Fixed Box(SYSTEM) Object */
win->_non_fixed_box = _box_add(win->layout);
win->_non_fixed_box = NULL;
}
+ if (win->_connection_system_box != NULL) {
+ edje_object_part_unswallow(elm_layout_edje_get(win->layout), win->_connection_system_box);
+ elm_box_unpack_all(win->_connection_system_box);
+ evas_object_del(win->_connection_system_box);
+ win->_connection_system_box = NULL;
+ }
+
if (win->_minictrl_box != NULL) {
edje_object_part_unswallow(elm_layout_edje_get(win->layout), win->_minictrl_box);
elm_box_unpack_all(win->_minictrl_box);
}
-
-unsigned int box_get_count_in_noti_list_except_minictrl(void)
-{
- icon_s *data;
- Eina_List *l;
- int count = 0;
-
- EINA_LIST_FOREACH(_view_noti_list, l, data) {
- if (data->priority != INDICATOR_PRIORITY_NOTI_1) {
- count++;
- }
- }
- return count;
-
-}
-
-
-
int box_get_enabled_noti_count(void)
{
int enabled_noti_cnt = 0;
}
+int box_get_enabled_connection_system_count(void)
+{
+ _D("box_get_enabled_connection_system_count");
+
+ return PORT_CONNECTION_SYSTEM_ICON_COUNT; /* MAX = 2 */
+}
int box_get_minictrl_list(void)
{
} else {
return EINA_FALSE;
}
+ case INDICATOR_ICON_AREA_CONNECTION_SYSTEM:
+ if (eina_list_data_find(_view_connection_system_list, obj)) {
+ return EINA_TRUE;
+ } else {
+ return EINA_FALSE;
+ }
case INDICATOR_ICON_AREA_NOTI:
if (eina_list_data_find(_view_noti_list, obj)) {
return EINA_TRUE;
}
}
}
+
+
+ int cs_cnt = box_get_count(CONNECTION_SYSTEM_LIST);
+
+ while (cs_cnt > box_get_enabled_connection_system_count()) {
+ icon_s *wish_remove_icon = NULL;
+ wish_remove_icon = list_try_to_find_icon_to_remove(INDICATOR_ICON_AREA_CONNECTION_SYSTEM, 0);
+
+ if (wish_remove_icon == NULL) {
+ break;
+ }
+
+ box_unpack(wish_remove_icon);
+ cs_cnt = box_get_count(CONNECTION_SYSTEM_LIST);
+
+ while (cs_cnt < box_get_enabled_connection_system_count()) {
+ icon_s *wish_add_icon = NULL;
+ wish_add_icon = list_try_to_find_icon_to_show(INDICATOR_ICON_AREA_CONNECTION_SYSTEM, 0);
+ if (wish_add_icon == NULL) {
+ break;
+ }
+
+ if (box_exist_icon(wish_add_icon)) {
+ break;
+ }
+
+ box_pack_append(wish_add_icon);
+ cs_cnt = box_get_count(CONNECTION_SYSTEM_LIST);
+ if(cs_cnt == box_get_enabled_connection_system_count()) {
+ break;
+ }
+ }
+ }
}
static Eina_List *system_icon_list = NULL;
static Eina_List *noti_icon_list = NULL;
static Eina_List *alarm_icon_list = NULL;
+static Eina_List *connection_system_icon_list = NULL;
_list_free(system_icon_list);
_list_free(noti_icon_list);
_list_free(alarm_icon_list);
+ _list_free(connection_system_icon_list);
return true;
}
alarm_icon_list = eina_list_remove(alarm_icon_list, icon);
alarm_icon_list = _insert_icon_to_list(alarm_icon_list, icon);
break;
+ case INDICATOR_ICON_AREA_CONNECTION_SYSTEM:
+ connection_system_icon_list = eina_list_remove(connection_system_icon_list, icon);
+ connection_system_icon_list = _insert_icon_to_list(connection_system_icon_list, icon);
+ break;
default:
break;
}
icon->wish_to_show = EINA_FALSE;
alarm_icon_list = eina_list_append(alarm_icon_list, icon);
break;
+ case INDICATOR_ICON_AREA_CONNECTION_SYSTEM:
+ if (INDICATOR_ERROR_NONE != _icon_exist_in_list(connection_system_icon_list, icon)) return;
+
+ /* Set internal data */
+ icon->wish_to_show = EINA_FALSE;
+ connection_system_icon_list = eina_list_append(connection_system_icon_list, icon);
+ break;
default:
break;
}
ret_if(!alarm_icon_list);
alarm_icon_list = eina_list_remove(alarm_icon_list, icon);
break;
+ case INDICATOR_ICON_AREA_CONNECTION_SYSTEM:
+ ret_if(!connection_system_icon_list);
+ connection_system_icon_list = eina_list_remove(connection_system_icon_list, icon);
+ break;
default:
_E("default");
break;
}
}
break;
+
+ case INDICATOR_ICON_AREA_CONNECTION_SYSTEM:
+ EINA_LIST_REVERSE_FOREACH(connection_system_icon_list, l, data) {
+ if (data->wish_to_show == EINA_TRUE
+ && data->exist_in_view == EINA_FALSE) {
+ icon = data;
+ break;
+ }
+ }
+ break;
default:
_E("default");
break;
}
}
break;
+ case INDICATOR_ICON_AREA_CONNECTION_SYSTEM:
+ /* Find lowest priority of icon */
+ EINA_LIST_FOREACH(connection_system_icon_list, l, data) {
+ if (data->wish_to_show == EINA_TRUE
+ && data->always_top == EINA_FALSE
+ && data->exist_in_view == EINA_TRUE) {
+ icon = data;
+ break;
+ }
+ }
+ break;
default:
_E("default");
break;
#include "log.h"
#include "util.h"
-#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_2
+#define ICON_PRIORITY INDICATOR_PRIORITY_CONNECTION_SYSTEM_2
#define MODULE_NAME "call_divert"
static int register_call_divert_module(void *data);
.obj_exist = EINA_FALSE,
.init = register_call_divert_module,
.fini = unregister_call_divert_module,
- .area = INDICATOR_ICON_AREA_SYSTEM,
+ .area = INDICATOR_ICON_AREA_CONNECTION_SYSTEM,
#ifdef _SUPPORT_SCREEN_READER
.tts_enable = EINA_TRUE,
.access_cb = access_info_cb
#include "util.h"
#include "log.h"
-#define ICON_PRIORITY INDICATOR_PRIORITY_FIXED7
+#define ICON_PRIORITY INDICATOR_PRIORITY_CONNECTION_SYSTEM_1
#define MODULE_NAME "bluetooth"
#define TIMER_INTERVAL 0.5
.exist_in_view = EINA_FALSE,
.img_obj = {0,},
.obj_exist = EINA_FALSE,
- .area = INDICATOR_ICON_AREA_FIXED,
+ .area = INDICATOR_ICON_AREA_CONNECTION_SYSTEM,
.init = register_bluetooth_module,
.fini = unregister_bluetooth_module,
.wake_up = wake_up_cb,
icon_show(&bluetooth);
prevIndex = index;
- util_signal_emit(bluetooth.ad,"indicator.bluetooth.show","indicator.prog");
}
static void hide_image_icon(void)