#define __QUICKPANEL_VI_MANAGER_H__
-typedef Eina_Bool (*vi_cb)(void *data);
+typedef Eina_Bool(*vi_cb)(void *data);
typedef enum _qp_vim_state_type {
VIM_STATE_NOT_READY = 0,
text_len = strlen(src);
- for (i = 0, j= 0; i < text_len; i++) {
+ for (i = 0, j = 0; i < text_len; i++) {
if (no_op == 1) {
_char_set(dst, *(src + i), j++, size);
} else {
Evas_Object *popup = data;
retif(popup == NULL, , "invalid argument");
- if (popup!= NULL) {
+ if (popup != NULL) {
evas_object_del(popup);
popup = NULL;
}
if (app_id != NULL) {
app_control_set_app_id(service, app_id);
} else {
- DBG("Implicit app_control, %s", operation?operation:"-");
+ DBG("Implicit app_control, %s", operation ? operation : "-");
}
if (operation != NULL) {
return NULL;
}
size_t res = eina_file_path_join(buf, sizeof(buf), prefix, relative);
- snprintf(buf, sizeof(buf), "%s%s",prefix, relative);
+ snprintf(buf, sizeof(buf), "%s%s", prefix, relative);
DBG("%s", buf);
free(prefix);
int ret = 0;
ret = tzsh_quickpanel_service_hide(ad->quickpanel_service);
- if(ret != 0) {
+ if (ret != 0) {
ERR("failed tzsh_quickpanel_service_hide");
}
ret = appcore_flush_memory();
- if(ret != 0) {
+ if (ret != 0) {
ERR("failed appcore_flush_memory");
}
return ECORE_CALLBACK_CANCEL;
}
-HAPI void quickpanel_uic_close_quickpanel(bool is_check_lock, int is_delay_needed) {
+HAPI void quickpanel_uic_close_quickpanel(bool is_check_lock, int is_delay_needed)
+{
int ret = 0;
int is_lock_launched = VCONFKEY_IDLE_UNLOCK;
}
if (is_delay_needed) {
- if( _close_timer == NULL ) {
+ if (_close_timer == NULL) {
_close_timer = ecore_timer_add(DEL_TIMER_VALUE, _quickpanel_close_timer_cb, NULL);
}
} else {
return view;
}
-static Evas_Object *_datetime_view_get(void) {
+static Evas_Object *_datetime_view_get(void)
+{
struct appdata *ad = quickpanel_get_app_data();
retif(ad == NULL, NULL, "invalid argument");
retif(ad->view_root == NULL, NULL, "invalid argument");
{
Evas_Object *view = NULL;
struct appdata *ad = data;
- retif(ad == NULL, ,"invalid parameter");
- retif(ad->view_root == NULL, ,"invalid parameter");
+ retif(ad == NULL, , "Invalid parameter");
+ retif(ad->view_root == NULL, , "Invalid parameter");
view = _datetime_view_create(ad->view_root);
if (view != NULL) {
{
Evas_Object *view = NULL;
struct appdata *ad = data;
- retif(ad == NULL, ,"invalid parameter");
- retif(ad->view_root == NULL, ,"invalid parameter");
+ retif(ad == NULL, , "Invalid parameter");
+ retif(ad->view_root == NULL, , "Invalid parameter");
view = elm_object_part_content_unset(ad->view_root, "qp.base.datetime.swallow");
if (view != NULL) {
static int _init(void *data)
{
struct appdata *ad = data;
- retif(ad == NULL, QP_FAIL,"invalid parameter");
+ retif(ad == NULL, QP_FAIL, "Invalid parameter");
_datetime_view_attach(ad);
}
strbuf_date = eina_strbuf_new();
- if(!strbuf_date) {
+ if (!strbuf_date) {
ERR("strbuf_date == NULL");
return;
}
strbuf_time = eina_strbuf_new();
- if(!strbuf_time) {
+ if (!strbuf_time) {
ERR("strbuf_time == NULL");
eina_strbuf_free(strbuf_date);
return;
}
strbuf_access = eina_strbuf_new();
- if(!strbuf_access) {
+ if (!strbuf_access) {
ERR("strbuf_access == NULL");
eina_strbuf_free(strbuf_date);
eina_strbuf_free(strbuf_time);
return;
}
-
DBG("update time: %s %s %s", date, time, meridiem);
if (date != NULL) {
static void _util_time_formatters_create(void *data)
{
struct appdata *ad = data;
- retif_nomsg(ad == NULL, );
+ retif(ad == NULL, , "Invalid parameter!");
if (s_info.generator == NULL) {
s_info.generator = __util_time_generator_get(ad);
static void _util_time_formatters_destroy(void *data)
{
struct appdata *ad = data;
- retif_nomsg(ad == NULL, );
+ retif(ad == NULL, , "Invalid parameter!");
if (s_info.date_generator) {
udat_close(s_info.date_generator);
{
char *szTimezone = NULL;
szTimezone = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_ID);
- if (szTimezone == NULL || strlen(szTimezone) == 0)
- {
+ if (szTimezone == NULL || strlen(szTimezone) == 0) {
ERR("QUICKPANEL TIMEZONE - Cannot get time zone.");
return strdup("N/A");
}
{
int ret = 0;
struct appdata *ad = data;
- retif_nomsg(ad == NULL, );
+ retif(ad == NULL, , "Invalid parameter!");
bool status = false;
ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &status);
msgif(ret != SYSTEM_SETTINGS_ERROR_NONE, "failed to ignore key(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR) : %d", ret);
- if (status == true){
+ if (status == true) {
s_info.timeformat = QP_TIME_FORMAT_24;
- }else{
+ } else {
s_info.timeformat = QP_TIME_FORMAT_12;
}
static void _formatter_destory(void *data)
{
struct appdata *ad = data;
- retif_nomsg(ad == NULL, );
+ retif(ad == NULL, , "Invalid parameter!");
if (s_info.timeregion_format) {
free(s_info.timeregion_format);
{
int ret = 0;
struct appdata *ad = data;
- retif_nomsg(ad == NULL, );
+ retif(ad == NULL, , "Invalid parameter!");
/* unregister vconf cbs */
ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_TIMEZONE_INT, _util_time_vconf_changed_cb);
{
int ret = 0;
struct appdata *ad = data;
- retif_nomsg(ad == NULL, );
+ retif(ad == NULL, , "Invalid parameter!");
/* register vconf cbs */
ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_TIMEZONE_INT, _util_time_vconf_changed_cb, data);
*str_meridiem = strdup(buf_ampm);
}
- if (convert_formatted_str)
- {
+ if (convert_formatted_str) {
if (str_time != NULL) {
*str_time = strdup(convert_formatted_str);
}
{
_util_time_heartbeat_do();
- if (s_info.is_timer_enabled ==1) {
+ if (s_info.is_timer_enabled == 1) {
_timer_del();
_timer_add();
}
return level;
}
-static int _brightness_get_level(void) {
-
+static int _brightness_get_level(void)
+{
int level = 0;
if (vconf_get_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, &level) == 0) {
}
}
-Evas_Object *_slider_get(Evas_Object *view, brightness_ctrl_obj *ctrl_obj) {
-
+Evas_Object *_slider_get(Evas_Object *view, brightness_ctrl_obj *ctrl_obj)
+{
retif(view == NULL, NULL, "Data parameter is NULL");
Evas_Object *obj = elm_object_part_content_get(view, "elm.swallow.slider");
_brightness_set_image(value);
}
- if(!ctrl_obj->is_changing) {
+ if (!ctrl_obj->is_changing) {
ctrl_obj->is_changing = true;
if (ctrl_obj->changing_transit != NULL) {
mapped_level = 0;
} else if (level >= 100) {
mapped_level = 11;
- } else if (level > 1 && level <= 9){
+ } else if (level > 1 && level <= 9) {
mapped_level = 1;
} else {
mapped_level = (level / 10);
}
- if (g_ctrl_obj->level_before != mapped_level ) {
+ if (g_ctrl_obj->level_before != mapped_level) {
char buf[128] = {0,};
Evas_Object *view;
{
if (!qid) {
return;
- }
+ }
qid->data = data;
}
|| item_type == QP_ITEM_TYPE_NOTI) {
list_tmp = elm_box_children_get(obj);
if (list_tmp != NULL) {
- if (eina_list_count(list_tmp) != 0 ) {
+ if (eina_list_count(list_tmp) != 0) {
evas_object_geometry_get(obj, NULL, NULL, NULL, &h);
}
eina_list_free(list_tmp);
Evas_Object *item = NULL;
Evas_Object *first = NULL;
- retif(vi == NULL, , "invalid parameter");
- retif(vi->container == NULL, , "invalid parameter");
- retif(vi->target == NULL, , "invalid parameter");
+ retif(vi == NULL, , "Invalid parameter");
+ retif(vi->container == NULL, , "Invalid parameter");
+ retif(vi->target == NULL, , "Invalid parameter");
container = vi->container;
item = vi->target;
evas_object_geometry_get(item, NULL, NULL, &item_width, &item_height);
if (item_width == 0 && item_height == 0) {
- ERR("failed to get a size of item %d %d", item_width, item_height);
- evas_object_size_hint_min_get (item, &item_width, &item_height);
+ ERR("Failed to get a size of item %d %d", item_width, item_height);
+ evas_object_size_hint_min_get(item, &item_width, &item_height);
}
if (vi->item_type == QP_ITEM_TYPE_ONGOING_NOTI) {
Evas_Object *container = NULL;
Evas_Object *item = NULL;
- retif(vi == NULL, , "invalid parameter");
- retif(vi->container == NULL, , "invalid parameter");
- retif(vi->target == NULL, , "invalid parameter");
+ retif(vi == NULL, , "Invalid parameter");
+ retif(vi->container == NULL, , "Invalid parameter");
+ retif(vi->target == NULL, , "Invalid parameter");
container = vi->container;
item = vi->target;
evas_object_geometry_get(item, NULL, NULL, &item_width, &item_height);
if (item_width == 0 && item_height == 0) {
- ERR("failed to get a size of item %d %d", item_width, item_height);
- evas_object_size_hint_min_get (item, &item_width, &item_height);
+ ERR("Failed to get a size of item %d %d", item_width, item_height);
+ evas_object_size_hint_min_get(item, &item_width, &item_height);
}
transit_fadeout = elm_transit_add();
return ret;
}
- if(value && g_strcmp0(value, "0")) {
+ if (value && g_strcmp0(value, "0")) {
ret = EINA_TRUE;
}
if (transit_flick != NULL) {
elm_transit_effect_translation_add(transit_flick, x, 0, 480, 0);
elm_transit_object_add(transit_flick, obj);
- elm_transit_duration_set(transit_flick, 0.25 * (480 - x ) / 480);
+ elm_transit_duration_set(transit_flick, 0.25 * (480 - x) / 480);
elm_transit_tween_mode_set(transit_flick, ELM_TRANSIT_TWEEN_MODE_LINEAR);
elm_transit_objects_final_state_keep_set(transit_flick, EINA_TRUE);
elm_transit_go(transit_flick);
if (transit_flick != NULL) {
elm_transit_effect_translation_add(transit_flick, -x, 0, -480, 0);
elm_transit_object_add(transit_flick, obj);
- elm_transit_duration_set(transit_flick, 0.25 * ( 480 - x ) / 480);
+ elm_transit_duration_set(transit_flick, 0.25 * (480 - x) / 480);
elm_transit_tween_mode_set(transit_flick, ELM_TRANSIT_TWEEN_MODE_LINEAR);
elm_transit_objects_final_state_keep_set(transit_flick, EINA_TRUE);
elm_transit_go(transit_flick);
GHashTableIter iter;
gpointer key, value;
- g_hash_table_iter_init (&iter, s_info.prov_table);
- while (g_hash_table_iter_next (&iter, &key, &value))
- {
+ g_hash_table_iter_init(&iter, s_info.prov_table);
+ while (g_hash_table_iter_next(&iter, &key, &value)) {
SINFO("minicontrol name:%s rotation:%d", key, angle);
event_arg_bundle = bundle_create();
if (event_arg_bundle) {
int is_idle_lock = 0;
ret = vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &is_idle_lock);
- retif(ret != 0, 0,"failed to get VCONFKEY_IDLE_LOCK_STATE %d %d", ret, is_idle_lock);
+ retif(ret != 0, 0, "Failed to get VCONFKEY_IDLE_LOCK_STATE %d %d", ret, is_idle_lock);
- if (is_idle_lock == VCONFKEY_IDLE_LOCK ) {
+ if (is_idle_lock == VCONFKEY_IDLE_LOCK) {
DBG("Lock screen is launched");
return 1; //don't show on lock screen
}
Evas_Object *gesture_layer = NULL;
gesture_layer = elm_gesture_layer_add(layout);
- retif(!gesture_layer, NULL,);
+ retif(!gesture_layer, NULL, "Invalid parameter!");
elm_gesture_layer_attach(gesture_layer, layout);
evas_object_show(gesture_layer);
static inline void _activenoti_only_noti_del(notification_h noti)
{
- retif(noti == NULL, ,"Invalid parameter!");
+ retif(noti == NULL, , "Invalid parameter!");
int applist = NOTIFICATION_DISPLAY_APP_ALL;
notification_get_display_applist(noti, &applist);
int ret;
time_t noti_time = 0;
- ret = notification_get_auto_remove( noti, &auto_remove);
+ ret = notification_get_auto_remove(noti, &auto_remove);
if (ret != NOTIFICATION_ERROR_NONE) {
DBG("notification_get_auto_remove return [%d]", ret);
return false;
if (auto_remove == true) {
ret = notification_get_time(info->noti, ¬i_time);
- if (ret!=NOTIFICATION_ERROR_NONE || noti_time == 0) {
+ if (ret != NOTIFICATION_ERROR_NONE || noti_time == 0) {
ret = notification_get_insert_time(info->noti, ¬i_time);
if (ret != NOTIFICATION_ERROR_NONE || noti_time == 0) {
DBG("notification_get_insert_time failed. time is 0 ret %d", ret);
} else {
info->timer = ecore_timer_add(8.0f - noti_time, _delete_timer_cb, info);
DBG("timer add");
- if(!info->timer) {
+ if (!info->timer) {
DBG("ecore_timer_add failed");
}
/**
Evas_Object *box;
box = elm_box_add(obj);
- if(box == NULL) {
+ if (box == NULL) {
ERR("box is null");
return 0;
}
app_control = NULL;
ret = notification_get_event_handler(noti, btn_cnt + NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1, &app_control);
DBG("appcontrol %p", app_control);
- if(ret != NOTIFICATION_ERROR_NONE || app_control == NULL) {
+ if (ret != NOTIFICATION_ERROR_NONE || app_control == NULL) {
INFO("no more button, button count is %d", btn_cnt);
INFO("ret is %d", ret);
Evas_Object *image;
bt_layout = elm_layout_add(s_info.btnbox);
- if(bt_layout == NULL) {
+ if (bt_layout == NULL) {
ERR("bt_layout is null");
evas_object_del(s_info.btnbox);
app_control_destroy(app_control);
}
elm_layout_file_set(bt_layout, util_get_res_file_path(ACTIVENOTI_EDJ), "button_layout");
- evas_object_size_hint_weight_set (bt_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_weight_set(bt_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
image = _get_btn_img(bt_layout, noti, btn_cnt);
evas_object_event_callback_add(bt_layout, EVAS_CALLBACK_DEL, _app_control_del_cb, app_control);
evas_object_show(bt_layout);
- elm_box_pack_end(s_info.btnbox,bt_layout);
+ elm_box_pack_end(s_info.btnbox, bt_layout);
}
}
bg_img = elm_object_part_content_unset(s_info.layout, "bg_img");
DBG("bg_img %p", bg_img);
- if(bg_img != NULL) {
+ if (bg_img != NULL) {
evas_object_del(bg_img);
bg_img = NULL;
}
icon = elm_object_part_content_unset(s_info.layout, "icon_big");
DBG("icon %p", icon);
- if(icon != NULL) {
+ if (icon != NULL) {
evas_object_del(icon);
icon = NULL;
}
badge = elm_object_part_content_unset(s_info.layout, "icon_badge");
DBG("badget %p", badge);
- if(badge != NULL) {
+ if (badge != NULL) {
evas_object_del(badge);
}
static void _activenoti_destroy_activenoti(void)
{
- retif(!s_info.activenoti,,"s_info->activenoti is null");
+ retif(!s_info.activenoti, , "s_info->activenoti is null");
_gesture_destroy();
static void _activenoti_win_rotated(void *data, int need_hide)
{
- retif(data == NULL, ,"data is NULL");
+ retif(data == NULL, , "data is NULL");
int angle = 0;
struct appdata *ad = data;
static void _media_feedback_sound(notification_h noti)
{
- retif(noti == NULL, ,"op_list is NULL");
+ retif(noti == NULL, , "op_list is NULL");
int ret = 0, priv_id = 0;
const char *nsound_path = NULL;
notification_sound_type_e nsound_type = NOTIFICATION_SOUND_TYPE_NONE;
static void _activenoti_noti_detailed_changed_cb(void *data, notification_type_e type, notification_op *op_list, int num_op)
{
DBG("");
- retif(op_list == NULL, ,"op_list is NULL");
+ retif(op_list == NULL, , "op_list is NULL");
notification_h noti = NULL;
int flags = 0;
DBG("op_priv_id:%d", priv_id);
DBG("noti:%p", noti);
- if( op_type == NOTIFICATION_OP_DELETE) {
+ if (op_type == NOTIFICATION_OP_DELETE) {
DBG("NOTIFICATION_OP_DELETE");
int priv_id_current = 0;
return;
} else if (op_type == NOTIFICATION_OP_DELETE_ALL) {
- if(s_info.current_noti) {
+ if (s_info.current_noti) {
_activenoti_hide(NULL, 0);
}
_activenoti_remove_list();
}
- retif(noti == NULL, ,"noti is NULL");
+ retif(noti == NULL, , "noti is NULL");
if (op_type == NOTIFICATION_OP_INSERT || op_type == NOTIFICATION_OP_UPDATE) {
if (_is_sound_playable() == 1) {
}
notification_get_display_applist(noti, &applist);
- DBG("applist : %x" ,applist);
+ DBG("applist : %x", applist);
/* Check activenoti flag */
notification_get_property(noti, &flags);
if (applist & NOTIFICATION_DISPLAY_APP_ACTIVE) {
- if (_is_security_lockscreen_launched() || _check_sound_off(noti) == 1 ) {
+ if (_is_security_lockscreen_launched() || _check_sound_off(noti) == 1) {
INFO("lock screen is launched");
return;
}
- if (quickpanel_uic_is_opened() && (applist & NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY) ) {
+ if (quickpanel_uic_is_opened() && (applist & NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY)) {
ERR("quickpanel is opened, activenoti will be not displayed");
return;
}
static void _animated_image_list_add(Evas_Object *image)
{
- retif(image == NULL, ,"invalid parameter");
+ retif(image == NULL, , "Invalid parameter");
g_animated_image_list = eina_list_append(g_animated_image_list, image);
}
const Eina_List *ln = NULL;
Evas_Object *entry_obj = NULL;
- retif_nomsg(g_animated_image_list == NULL, );
+ retif(g_animated_image_list == NULL, , "Invalid parameter");
EINA_LIST_FOREACH_SAFE(g_animated_image_list, l, ln, entry_obj) {
if (entry_obj == NULL) {
notification_get_layout(noti, &ly_type);
notification_get_ongoing_flag(noti, &ongoing_flag);
- if( (type == NOTIFICATION_TYPE_ONGOING && ongoing_flag) ||
+ if ((type == NOTIFICATION_TYPE_ONGOING && ongoing_flag) ||
(type == NOTIFICATION_TYPE_ONGOING && ly_type == NOTIFICATION_LY_ONGOING_PROGRESS)) {
return 0;
}
noti_list_item_h *handler = _item_handler_get(item);
noti_node_item *noti_node = _get_noti_node(item);
if (handler != NULL && noti_node != NULL) {
- if (strncmp(emission,"selected", strlen("selected")) == 0) {
+ if (strncmp(emission, "selected", strlen("selected")) == 0) {
if (handler->need_to_cancel_press > 0) {
handler->need_to_cancel_press = 0;
return;
cb(noti_node, item);
}
}
- if (strncmp(emission,"button_1", strlen("button_1")) == 0) {
+ if (strncmp(emission, "button_1", strlen("button_1")) == 0) {
if (handler->need_to_cancel_press > 0) {
handler->need_to_cancel_press = 0;
return;
cb(noti_node, item);
}
}
- if (strncmp(emission,"deleted", strlen("deleted")) == 0) {
+ if (strncmp(emission, "deleted", strlen("deleted")) == 0) {
cb = handler->deleted_cb;
if (cb != NULL) {
cb(noti_node, item);
if (transit_flick != NULL) {
elm_transit_effect_translation_add(transit_flick, x, 0, 480, 0);
elm_transit_object_add(transit_flick, obj);
- elm_transit_duration_set(transit_flick, 0.25 * (480 - x ) / 480);
+ elm_transit_duration_set(transit_flick, 0.25 * (480 - x) / 480);
elm_transit_tween_mode_set(transit_flick, ELM_TRANSIT_TWEEN_MODE_LINEAR);
elm_transit_objects_final_state_keep_set(transit_flick, EINA_TRUE);
elm_transit_go(transit_flick);
if (transit_flick != NULL) {
elm_transit_effect_translation_add(transit_flick, -x, 0, -480, 0);
elm_transit_object_add(transit_flick, obj);
- elm_transit_duration_set(transit_flick, 0.25 * ( 480 - x ) / 480);
+ elm_transit_duration_set(transit_flick, 0.25 * (480 - x) / 480);
elm_transit_tween_mode_set(transit_flick, ELM_TRANSIT_TWEEN_MODE_LINEAR);
elm_transit_objects_final_state_keep_set(transit_flick, EINA_TRUE);
elm_transit_go(transit_flick);
if (transit_flick != NULL) {
elm_transit_effect_translation_add(transit_flick, x, 0, 480, 0);
elm_transit_object_add(transit_flick, view);
- elm_transit_duration_set(transit_flick, 0.25 * (480 - x ) /480);
+ elm_transit_duration_set(transit_flick, 0.25 * (480 - x) /480);
elm_transit_tween_mode_set(transit_flick, ELM_TRANSIT_TWEEN_MODE_LINEAR);
elm_transit_objects_final_state_keep_set(transit_flick, EINA_TRUE);
elm_transit_go(transit_flick);
if (transit_flick != NULL) {
elm_transit_effect_translation_add(transit_flick, -x, 0, -480, 0);
elm_transit_object_add(transit_flick, view);
- elm_transit_duration_set(transit_flick, 0.25 * ( 480 - x ) / 480);
+ elm_transit_duration_set(transit_flick, 0.25 * (480 - x) / 480);
elm_transit_tween_mode_set(transit_flick, ELM_TRANSIT_TWEEN_MODE_LINEAR);
elm_transit_objects_final_state_keep_set(transit_flick, EINA_TRUE);
elm_transit_go(transit_flick);
if (item_list != NULL) {
eina_list_free(item_list);
}
- }
- else if (insert_position == 1) {
+ } else if (insert_position == 1) {
Eina_List *l;
Eina_List *l_next;
Evas_Object *obj = NULL;
noti_node_item *node = NULL;
notification_type_e type = NOTIFICATION_TYPE_NONE;
- retif(vi == NULL, , "invalid parameter");
- retif(vi->container == NULL, , "invalid parameter");
- retif(vi->target == NULL, , "invalid parameter");
+ retif(vi == NULL, , "Invalid parameter");
+ retif(vi->container == NULL, , "Invalid parameter");
+ retif(vi->target == NULL, , "Invalid parameter");
container = vi->container;
item = vi->target;
evas_object_geometry_get(item, NULL, NULL, &item_width, &item_height);
if (item_width == 0 && item_height == 0) {
- ERR("failed to get a size of item %d %d", item_width, item_height);
- evas_object_size_hint_min_get (item, &item_width, &item_height);
+ ERR("Failed to get a size of item %d %d", item_width, item_height);
+ evas_object_size_hint_min_get(item, &item_width, &item_height);
}
transit_layout_parent = quickpanel_list_util_get_reorder_transit(container, NULL, item_height);
EINA_LIST_FOREACH_SAFE(item_list, l, l_next, obj) {
if (obj == (Evas_Object *)vi->extra_data_2) {
flag = 1;
- }
- else if (flag == 1) {
+ } else if (flag == 1) {
transit_layout = elm_transit_add();
if (transit_layout != NULL) {
elm_transit_effect_translation_add(transit_layout, 0, 0, 0, item_height);
}
}
}
- }
- else if (insert_position == 0) {
+ } else if (insert_position == 0) {
EINA_LIST_FOREACH_SAFE(item_list, l, l_next, obj) {
node = quickpanel_noti_list_item_node_get(obj);
if (node) {
return;
}
- Evas_Object *before = eina_list_nth (items, ongoing_count - 1);
+ Evas_Object *before = eina_list_nth(items, ongoing_count - 1);
if (!before) {
ERR("Failed to recieve preceding item, adding new notification to end of the list");
elm_box_pack_end(container, item);
evas_object_geometry_get(item, NULL, NULL, &item_width, &item_height);
if (item_width == 0 && item_height == 0) {
ERR("failed to get a size of item %d %d", item_width, item_height);
- evas_object_size_hint_min_get (item, &item_width, &item_height);
+ evas_object_size_hint_min_get(item, &item_width, &item_height);
}
transit_fadeout = elm_transit_add();
}
Noti_View_H noti_view_h = {
- .name = "noti_view",
+ .name = "noti_view",
.create = _create,
.update = _update,
.remove = _remove,
notification_get_pkgname(noti, &pkgname);
notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL, &thumbnail_path);
- if (thumbnail_path) { /* thumbnail type */
+ if (thumbnail_path) { /* thumbnail type */
main_icon_path = strdup(thumbnail_path);
old_ic = _check_duplicated_image_loading(item, "elm.swallow.thumbnail", main_icon_path);
}
Noti_View_H noti_view_listtype_h = {
- .name = "noti_view_listtype",
+ .name = "noti_view_listtype",
.create = _create,
.update = _update,
.remove = NULL,
notification_get_progress(noti, &percentage);
if (percentage > 0) {
- if (percentage < 1.0 ) {
+ if (percentage < 1.0) {
if (snprintf(buf, buf_len, "%d%%", (int)(percentage * 100.0 + 0.5)) <= 0) {
return NULL;
}
elm_progressbar_value_set(ic, percentage);
elm_progressbar_horizontal_set(ic, EINA_TRUE);
elm_progressbar_pulse(ic, EINA_FALSE);
- } else if ((size >= 0.0 && percentage == 0.0) || ((size < 0.0 && percentage == 0.0)|| (size == 0.0 && percentage < 0.0))) {
+ } else if ((size >= 0.0 && percentage == 0.0) || ((size < 0.0 && percentage == 0.0) || (size == 0.0 && percentage < 0.0))) {
old_ic = _check_duplicated_progress_loading(item, "elm.swallow.progress", "pending");
if (old_ic == NULL) {
ic = elm_progressbar_add(item);
notification_get_pkgname(noti, &pkgname);
notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL, &thumbnail_path);
- if (thumbnail_path) { /* thumbnail type */
+ if (thumbnail_path) { /* thumbnail type */
main_icon_path = strdup(thumbnail_path);
old_ic = _check_duplicated_image_loading(item, "elm.swallow.thumbnail", main_icon_path);
ret = notification_get_text(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &text_count);
if (ret != NOTIFICATION_ERROR_NONE) {
ERR("Unable to get event_count");
- }
+ }
SDBG("percentage:%f size:%f", percentage, size);
}
Noti_View_H ongoing_noti_view_h = {
- .name = "ongoing_noti_view",
+ .name = "ongoing_noti_view",
.create = _create,
.update = _update,
.remove = NULL,
_win_rotated(obj);
}
-static void _resize_cb (void *data, Evas *e, Evas_Object *eo, void *event_info)
+static void _resize_cb(void *data, Evas *e, Evas_Object *eo, void *event_info)
{
int x, y, w, h;
evas_object_geometry_get(eo, &x, &y, &w, &h);
quickpanel_page_editing_icon_visible_status_update();
}
-static void _refresh(void *data) {
+static void _refresh(void *data)
+{
struct appdata *ad = data;
retif(ad == NULL, , "Invalid parameter!");
retif(s_info.view_box == NULL, , "Invalid parameter!");
elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_fill_set(scroller, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_scroller_page_relative_set (scroller, 1.0, 0.0);
+ elm_scroller_page_relative_set(scroller, 1.0, 0.0);
box = elm_box_add(scroller);
if (!box) {
{
if (strcmp(key, PREF_BRIGHTNESS) == 0) {
return 1;
- } else if (strcmp(key, PREF_QUICKSETTING_ORDER) == 0){
+ } else if (strcmp(key, PREF_QUICKSETTING_ORDER) == 0) {
return 1;
- } else if (strcmp(key, PREF_QUICKSETTING_FEATURED_NUM) == 0){
+ } else if (strcmp(key, PREF_QUICKSETTING_FEATURED_NUM) == 0) {
return 1;
- } else if (strcmp(key, PREF_SHORTCUT_ENABLE) == 0){
+ } else if (strcmp(key, PREF_SHORTCUT_ENABLE) == 0) {
return 1;
- } else if (strcmp(key, PREF_SHORTCUT_EARPHONE_ORDER) == 0){
+ } else if (strcmp(key, PREF_SHORTCUT_EARPHONE_ORDER) == 0) {
return 1;
}
}
}
- if ( preference_get_string(key, value) != PREFERENCE_ERROR_NONE) {
+ if (preference_get_string(key, value) != PREFERENCE_ERROR_NONE) {
DBG("preference_get_string error : key(%s)", key);
return QP_FAIL;
}
HAPI qp_secured_lock_state_e quickpanel_get_secured_lock_state(void)
{
- return secured_lock;
+ return secured_lock;
}
HAPI void *quickpanel_get_app_data(void)
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
return -1;
}
-
+
#if defined(WINSYS_X11)
/* NEED TO CHANGE */
ret = package_manager_filter_add_bool(handle, PMINFO_APPINFO_PROP_APP_SUPPORT_MODE, 1);
retif(ad == NULL, , "Invalid parameter!");
ret = _register_permitted_apps();
- msgif(ret !=0, "failed to register permitted apps");
+ msgif(ret != 0, "failed to register permitted apps");
ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_PSMODE,
_vconf_cb, ad);
retif(ad == NULL, , "Invalid parameter!");
ret = _delete_permitted_apps();
- msgif(ret !=0, "failed to delete permitted apps");
+ msgif(ret != 0, "failed to delete permitted apps");
ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_PSMODE, _vconf_cb);
msgif(ret != 0, "failed to ignore key(VCONFKEY_SETAPPL_PSMODE) : %d", ret);
retif(appid == NULL, 0, "Invalid parameter!");
count = eina_list_count(s_info.permitted_apps);
- for(i = 0; i < count; i++) {
+ for (i = 0; i < count; i++) {
permitted_app = (char *)eina_list_nth(s_info.permitted_apps, i);
if (permitted_app != NULL && strcmp(permitted_app, appid) == 0) {
return 1;
static void _led_entry_del(QP_LED_T *led_entry)
{
- retif(led_entry == NULL, ,"invalid parameter");
+ retif(led_entry == NULL, , "invalid parameter");
free(led_entry);
}
static void _led_list_add(QP_LED_T *led_entry)
{
- retif(led_entry == NULL, ,"invalid parameter");
+ retif(led_entry == NULL, , "invalid parameter");
s_led_info.list = eina_list_sorted_insert(s_led_info.list, _led_list_sort_cb, led_entry);
}
static void _led_list_del(QP_LED_T *led_entry)
{
- retif(led_entry == NULL, ,"invalid parameter");
+ retif(led_entry == NULL, , "invalid parameter");
s_led_info.list = eina_list_remove(s_led_info.list, led_entry);
}
static void _led_list_sort(void)
{
- retif(s_led_info.list == NULL, ,"invalid parameter");
+ retif(s_led_info.list == NULL, , "invalid parameter");
s_led_info.list = eina_list_sort(s_led_info.list, 0, _led_list_sort_cb);
}
Eina_List *n;
QP_LED_T *led_entry = NULL;
- retif(s_led_info.list == NULL, NULL,"invalid parameter");
+ retif(s_led_info.list == NULL, NULL, "invalid parameter");
EINA_LIST_FOREACH_SAFE(s_led_info.list, l, n, led_entry) {
if (led_entry != NULL) {
QP_LED_T *led_entry = NULL;
Eina_List *list_temp = NULL;
- retif(s_led_info.list == NULL, ,"invalid parameter");
+ retif(s_led_info.list == NULL, , "invalid parameter");
list_temp = s_led_info.list;
s_led_info.list = NULL;
static void _noti_led_on(QP_LED_T *led_entry)
{
int ret = 0;
- retif(led_entry == NULL, , "invalid data");
+ retif(led_entry == NULL, , "Invalid data");
DBG("turn on LED with OP:%d ARGB:%x ON:%d OFF:%d",
led_entry->op, led_entry->argb, led_entry->time_on, led_entry->time_off);
struct appdata *ad = data;
retif(ad == NULL, , "Invalid parameter!");
- ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_LED_INDICATOR_NOTIFICATIONS,_led_option_vconf_cb, ad);
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_LED_INDICATOR_NOTIFICATIONS, _led_option_vconf_cb, ad);
if (ret != 0) {
ERR("failed to notify key[%s] : %d",
struct appdata *ad = data;
retif(ad == NULL, , "Invalid parameter!");
- ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_LED_INDICATOR_NOTIFICATIONS,_led_option_vconf_cb);
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_LED_INDICATOR_NOTIFICATIONS, _led_option_vconf_cb);
if (ret != 0) {
ERR("failed to ignore key[%s] : %d", VCONFKEY_SETAPPL_LED_INDICATOR_NOTIFICATIONS, ret);
}
retif(ret != 0, 0, "failed to get vconf VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT");
switch (key) {
- case 1:
- min = 2;
- break;
- case 2:
- min = 5;
- break;
- case 3:
- min = 10;
- break;
+ case 1:
+ min = 2;
+ break;
+ case 2:
+ min = 5;
+ break;
+ case 3:
+ min = 10;
+ break;
}
DBG("interval:%d", min);
{
int ret = ALARMMGR_RESULT_SUCCESS;
- if (s_info.alarm_id != -1){
+ if (s_info.alarm_id != -1) {
ERR("try to delete alarm_id(%d)", s_info.alarm_id);
ret = alarmmgr_remove_alarm(s_info.alarm_id);
if (ret != ALARMMGR_RESULT_SUCCESS) {
}
QP_Module_Setting gps = {
- .name = "gps",
+ .name = "gps",
.init = _init,
- .fini = _fini,
- .lang_changed = _lang_changed,
- .refresh = _refresh,
- .icon_get = _icon_get,
- .label_get = _label_get,
+ .fini = _fini,
+ .lang_changed = _lang_changed,
+ .refresh = _refresh,
+ .icon_get = _icon_get,
+ .label_get = _label_get,
.view_update = _view_update,
.status_update = _status_update,
.state_change = _state_change,
quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_OFF);
}
- quickpanel_setting_module_icon_view_update(module, quickpanel_setting_module_icon_state_get(module),FLAG_VALUE_VOID);
+ quickpanel_setting_module_icon_view_update(module, quickpanel_setting_module_icon_state_get(module), FLAG_VALUE_VOID);
}
static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, &status);
msgif(ret != SYSTEM_SETTINGS_ERROR_NONE, "failed to notify key SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO : %d", ret);
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, !status );
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, !status);
msgif(ret != SYSTEM_SETTINGS_ERROR_NONE, "failed to notify key SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO : %d", ret);
}
}
QP_Module_Setting rotate = {
- .name = "rotate",
+ .name = "rotate",
.init = _init,
- .fini = _fini,
- .lang_changed = _lang_changed,
- .refresh = _refresh,
- .icon_get = _icon_get,
- .label_get = _label_get,
+ .fini = _fini,
+ .lang_changed = _lang_changed,
+ .refresh = _refresh,
+ .icon_get = _icon_get,
+ .label_get = _label_get,
.view_update = _view_update,
.status_update = _status_update,
.handler_longpress = _long_press_cb,
}
}
-static void _reset_icon(QP_Module_Setting *module) {
+static void _reset_icon(QP_Module_Setting *module)
+{
retif(module == NULL, , "Invalid parameter!");
quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_VALUE_VOID);
}
QP_Module_Setting wifi = {
- .name = "wifi",
+ .name = "wifi",
.init = _init,
- .fini = _fini,
- .lang_changed = _lang_changed,
- .refresh = _refresh,
- .icon_get = _icon_get,
- .label_get = _label_get,
+ .fini = _fini,
+ .lang_changed = _lang_changed,
+ .refresh = _refresh,
+ .icon_get = _icon_get,
+ .label_get = _label_get,
.view_update = _view_update,
.status_update = _status_update,
.state_change = _state_change,
seq_count = g_strv_length(params);
for (i = 0; i < seq_count; i++) {
- if (seq_added_count >= num_featured){
+ if (seq_added_count >= num_featured) {
break;
}
module = _module_get_by_name(params[i]);
if (module != NULL) {
if (_module_is_enabled(module) == EINA_TRUE) {
- *list = eina_list_append (*list, module);
+ *list = eina_list_append(*list, module);
seq_added_count++;
}
}
module = _module_get_by_name(params[i]);
if (module != NULL) {
if (_module_is_enabled(module) == EINA_TRUE) {
- *list = eina_list_append (*list, module);
+ *list = eina_list_append(*list, module);
}
}
}
char *temp = NULL;
EINA_LIST_FOREACH_SAFE(list, l, l_next, module) {
- if (module == NULL){
+ if (module == NULL) {
continue;
}
if (module->name == NULL) {
quickpanel_page_get_touched_pos(&(s_info.down_x), NULL);
s_info.is_longpressed = EINA_FALSE;
- s_info.timer_longpress = ecore_timer_add(TAP_AND_DELAY_LONG,_icon_handler_longpress, obj);
+ s_info.timer_longpress = ecore_timer_add(TAP_AND_DELAY_LONG, _icon_handler_longpress, obj);
}
#ifdef QP_SCREENREADER_ENABLE
{
int ret;
- ret = quickpanel_common_send_message_to_app (pkgname, NULL, key, value);
+ ret = quickpanel_common_send_message_to_app(pkgname, NULL, key, value);
quickpanel_common_inform_launch_app_result(pkgname, ret);
quickpanel_uic_close_quickpanel(true, 1);
}
return 0;
}
-static Evas_Object *_icon_create(QP_Module_Setting *module, Evas_Object *parent) {
+static Evas_Object *_icon_create(QP_Module_Setting *module, Evas_Object *parent)
+{
retif(module == NULL, NULL, "Invalid parameter!");
retif(parent == NULL, NULL, "Invalid parameter!");
return quickpanel_setting_module_icon_create(module, parent);
}
-static Evas_Object *_divider_create(Evas_Object *parent) {
+static Evas_Object *_divider_create(Evas_Object *parent)
+{
Evas_Object *divider = NULL;
retif(parent == NULL, NULL, "invalid parameter");
retif(ad == NULL, , "Invalid parameter!");
}
-static void _refresh(void *data) {
+static void _refresh(void *data)
+{
struct appdata *ad = data;
retif(ad == NULL, , "Invalid parameter!");
}
}
-static void _refresh(void *data) {
+static void _refresh(void *data)
+{
struct appdata *ad = data;
retif(ad == NULL, , "Invalid parameter!");
container = quickpanel_setting_layout_get(ad->ly, QP_SETTING_BASE_PART);
- retif(container == NULL, ,"Failed to get container");
+ retif(container == NULL, , "Failed to get container");
elm_object_part_content_set(container, QP_SETTING_BRIGHTNESS_PART_WVGA, brightness_view);
}
int call_state; // 0:none, 1:call
}
-sim_state_info =
-{
+
+sim_state_info = {
.handle[0] = NULL,
.handle[1] = NULL,
.handle[2] = NULL,
/* Reading Network (PLMN) name - ‘string’ type Property */
ret = tel_get_property_string(handle,
TAPI_PROP_NETWORK_NETWORK_NAME, &network_name);
- if(ret == TAPI_API_SUCCESS)
- {
+ if (ret == TAPI_API_SUCCESS) {
/* ‘network_name’ contains valid Network name based on Display condition */
return network_name;
- }
- else
- {
+ } else {
ERR("Sim = %p PLMN = ERROR[%d]", handle, ret);
/* get property failed */
}
/* Reading SPN name - ‘string’ type Property */
ret = tel_get_property_string(handle,
TAPI_PROP_NETWORK_SPN_NAME, &spn_name);
- if(ret == TAPI_API_SUCCESS)
- {
+ if (ret == TAPI_API_SUCCESS) {
/* ‘spn_name’ contains valid Service provider name */
return spn_name;
- }
- else
- {
+ } else {
ERR("Sim = %p SPN = ERROR[%d]", handle, ret);
/* get property failed */
return NULL;
// --------------------------------------------------------------------------------------------
static void print_sim_status(TelSimCardStatus_t sim_status, int card_changed)
{
- switch(sim_status) {
+ switch (sim_status) {
case TAPI_SIM_STATUS_CARD_ERROR:
INFO("Sim card status: TAPI_SIM_STATUS_CARD_ERROR");
break;
-
case TAPI_SIM_STATUS_CARD_NOT_PRESENT:
INFO("Sim card status: TAPI_SIM_STATUS_CARD_NOT_PRESENT");
break;
-
case TAPI_SIM_STATUS_SIM_INITIALIZING:
INFO("Sim card status: TAPI_SIM_STATUS_SIM_INITIALIZING");
break;
-
case TAPI_SIM_STATUS_SIM_INIT_COMPLETED:
INFO("Sim card status: TAPI_SIM_STATUS_SIM_INIT_COMPLETED");
break;
-
case TAPI_SIM_STATUS_SIM_PIN_REQUIRED:
INFO("Sim card status: TAPI_SIM_STATUS_SIM_PIN_REQUIRED");
break;
-
case TAPI_SIM_STATUS_SIM_PUK_REQUIRED:
INFO("Sim card status: TAPI_SIM_STATUS_SIM_PUK_REQUIRED");
break;
-
case TAPI_SIM_STATUS_CARD_BLOCKED:
INFO("Sim card status: TAPI_SIM_STATUS_CARD_BLOCKED");
break;
-
case TAPI_SIM_STATUS_SIM_NCK_REQUIRED:
INFO("Sim card status: TAPI_SIM_STATUS_SIM_NCK_REQUIRED");
break;
-
case TAPI_SIM_STATUS_SIM_NSCK_REQUIRED:
INFO("Sim card status: TAPI_SIM_STATUS_SIM_NSCK_REQUIRED");
break;
-
case TAPI_SIM_STATUS_SIM_SPCK_REQUIRED:
INFO("Sim card status: TAPI_SIM_STATUS_SIM_SPCK_REQUIRED");
break;
-
case TAPI_SIM_STATUS_SIM_CCK_REQUIRED:
INFO("Sim card status: TAPI_SIM_STATUS_SIM_CCK_REQUIRED");
break;
-
case TAPI_SIM_STATUS_CARD_REMOVED:
INFO("Sim card status: TAPI_SIM_STATUS_CARD_REMOVED");
break;
-
case TAPI_SIM_STATUS_SIM_LOCK_REQUIRED:
INFO("Sim card status: TAPI_SIM_STATUS_SIM_LOCK_REQUIRED");
break;
-
case TAPI_SIM_STATUS_CARD_CRASHED:
INFO("Sim card status: TAPI_SIM_STATUS_CARD_CRASHED");
break;
-
case TAPI_SIM_STATUS_CARD_POWEROFF:
INFO("Sim card status: TAPI_SIM_STATUS_CARD_POWEROFF");
break;
-
case TAPI_SIM_STATUS_UNKNOWN:
INFO("Sim card status: TAPI_SIM_STATUS_UNKNOWN");
break;
for (i = 0; i < TAPI_HANDLE_MAX + 1; ++i) {
if (sim_state_info.handle[i]) {
- ret = tel_get_sim_init_info (sim_state_info.handle[i], &sim_status, &card_changed);
- if(ret == 0) {
+ ret = tel_get_sim_init_info(sim_state_info.handle[i], &sim_status, &card_changed);
+ if (ret == 0) {
print_sim_status(sim_status, card_changed);
- if(sim_status == TAPI_SIM_STATUS_SIM_INIT_COMPLETED || sim_status == TAPI_SIM_STATUS_SIM_PIN_REQUIRED) {
+ if (sim_status == TAPI_SIM_STATUS_SIM_INIT_COMPLETED || sim_status == TAPI_SIM_STATUS_SIM_PIN_REQUIRED) {
if (i < TAPI_HANDLE_MAX) {
sim_state_info.sim_card_ready[i] = EINA_TRUE;
}
}
} else {
ERR("Could not get sim[%d] status[%d]", i, ret);
- } // if ret == 0
- } // if sim_state_info
- } // for
+ }
+ }
+ }
}
static void sim_handler_text_set(Eina_Bool flight_mode)
quickpanel_handler_text_set(_("IDS_IDLE_BODY_NO_SERVICE"));
} else if (sim_state_info.sim_card_ready[0] && sim_state_info.sim_card_ready[1]) {
quickpanel_handler_text_set(NULL);
- } else if(sim_state_info.sim_card_ready[0]) {
+ } else if (sim_state_info.sim_card_ready[0]) {
char *plmn_spn1 = get_plmn_spn_network(0, sim_state_info.handle[0]);
quickpanel_handler_text_set(plmn_spn1);
if (plmn_spn1) {
free(plmn_spn1);
}
- } else if(sim_state_info.sim_card_ready[1]) {
+ } else if (sim_state_info.sim_card_ready[1]) {
char *plmn_spn1 = get_plmn_spn_network(1, sim_state_info.handle[1]);
quickpanel_handler_text_set(plmn_spn1);
if (plmn_spn1) {
int flight_mode_state = EINA_FALSE;
int ret = vconf_get_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &flight_mode_state);
- if(ret != 0) {
+ if (ret != 0) {
ERR("Could not get 'VCONFKEY_TELEPHONY_FLIGHT_MODE' value");
}
/* Get CP name list – cp_list */
cp_list = tel_get_cp_name_list();
- if(cp_list == NULL) {
+ if (cp_list == NULL) {
ERR("Could not get the cp_name_list");
return;
}
ERR("SIM[%p][%d] status[%d], [%d][%d]", handle, handle_num, *sim_status, sim_state_info.sim_card_ready[0], sim_state_info.sim_card_ready[1]);
- if(*sim_status == TAPI_SIM_STATUS_SIM_INIT_COMPLETED || *sim_status == TAPI_SIM_STATUS_SIM_PIN_REQUIRED) {
+ if (*sim_status == TAPI_SIM_STATUS_SIM_INIT_COMPLETED || *sim_status == TAPI_SIM_STATUS_SIM_PIN_REQUIRED) {
sim_state_info.sim_card_ready[handle_num] = EINA_TRUE;
} else {
sim_state_info.sim_card_ready[handle_num] = EINA_FALSE;
{
int i;
int ret;
- for(i = 0; i < TAPI_HANDLE_MAX; ++i) {
- if(sim_state_info.handle[i]) {
+ for (i = 0; i < TAPI_HANDLE_MAX; ++i) {
+ if (sim_state_info.handle[i]) {
ret = tel_deregister_noti_event(sim_state_info.handle[i], TAPI_NOTI_SIM_STATUS);
if (ret != TAPI_API_SUCCESS) {
ERR("Failed to dereregister TAPI_NOTI_SIM_STATUS callback from handle: %i", i);
ERR("Failed to deregister network name option[%d][%d]", ret, i);
}
- if(i == 0) {
+ if (i == 0) {
ret = tel_deregister_noti_event(sim_state_info.handle[i], TAPI_NOTI_CALL_PREFERRED_VOICE_SUBSCRIPTION);
if (ret != TAPI_API_SUCCESS) {
ERR("Failed to dereregister callback to handle: %d", i);
/* Register for Telephony state change */
ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_READY, tel_ready_cb, master_layout);
- if(ret != 0) {
+ if (ret != 0) {
ERR("Failed to register VCONFKEY_TELEPHONY_READY key changed callback");
}
ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, tel_flight_mode_cb, master_layout);
- if(ret != 0) {
+ if (ret != 0) {
ERR("Failed to register VCONFKEY_TELEPHONY_FLIGHT_MODE key changed callback");
}
}
}
}
} else if (_vim_get_state() == VIM_STATE_SUSPENDED
- || _vim_get_state() == VIM_STATE_NOT_READY){
+ || _vim_get_state() == VIM_STATE_NOT_READY) {
while ((next_vi = _vi_list_get_first()) != NULL) {
quickpanel_vi_done(next_vi);
}
static void _vi_list_add(QP_VI *new_vi)
{
- retif(new_vi == NULL, ,"invalid parameter");
+ retif(new_vi == NULL, , "Invalid parameter");
s_info.vi_list = eina_list_append(s_info.vi_list, new_vi);
}
static void _vi_list_del(QP_VI *vi)
{
- retif(vi == NULL, ,"invalid parameter");
+ retif(vi == NULL, , "Invalid parameter");
s_info.vi_list = eina_list_remove(s_info.vi_list, vi);
}
case VI_OP_REORDER:
duration = VIM_DURATION_REORDER;
break;
- default :
+ default:
duration = VIM_DURATION_INSERT;
break;
}
Elm_Transit_Tween_Mode mode = ELM_TRANSIT_TWEEN_MODE_LINEAR;
switch (op_type) {
- case VI_OP_INSERT:
- mode = ELM_TRANSIT_TWEEN_MODE_DECELERATE;
- break;
- case VI_OP_UPDATE:
- mode = ELM_TRANSIT_TWEEN_MODE_DECELERATE;
- break;
- case VI_OP_DELETE:
- mode = ELM_TRANSIT_TWEEN_MODE_ACCELERATE;
- break;
- case VI_OP_REORDER:
- mode = ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL;
- break;
- default :
- mode = ELM_TRANSIT_TWEEN_MODE_LINEAR;
- break;
+ case VI_OP_INSERT:
+ mode = ELM_TRANSIT_TWEEN_MODE_DECELERATE;
+ break;
+ case VI_OP_UPDATE:
+ mode = ELM_TRANSIT_TWEEN_MODE_DECELERATE;
+ break;
+ case VI_OP_DELETE:
+ mode = ELM_TRANSIT_TWEEN_MODE_ACCELERATE;
+ break;
+ case VI_OP_REORDER:
+ mode = ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL;
+ break;
+ default:
+ mode = ELM_TRANSIT_TWEEN_MODE_LINEAR;
+ break;
}
return mode;
HAPI void quickpanel_vi_user_event_add(QP_VI *new_vi)
{
- retif(new_vi == NULL, ,"invalid parameter");
+ retif(new_vi == NULL, , "Invalid parameter");
s_info.vi_user_event_list = eina_list_append(s_info.vi_user_event_list, new_vi);
}
HAPI void quickpanel_vi_user_event_del(QP_VI *vi)
{
- retif(vi == NULL, ,"invalid parameter");
+ retif(vi == NULL, , "Invalid parameter");
if (eina_list_data_find(s_info.vi_user_event_list, vi) != NULL) {
s_info.vi_user_event_list = eina_list_remove(s_info.vi_user_event_list, vi);
HAPI void quickpanel_vi_object_event_freeze_set(Evas_Object *obj, Eina_Bool freeze)
{
- retif(obj == NULL, ,"invalid parameter");
+ retif(obj == NULL, , "Invalid parameter");
evas_object_freeze_events_set(obj, freeze);
}
DBG("_voice_control_view_destroy");
struct appdata *ad = data;
- if (ad == NULL)
- {
+ if (ad == NULL) {
ERR("invalid data");
return;
}
- if (g_layout == NULL)
- {
+ if (g_layout == NULL) {
ERR("g_layout is not exist");
return;
}
DBG("_vc_enabled_changed_cb");
struct appdata *ad = user_data;
- if( !enabled ) { //deactivated voice controller
+ if (!enabled) { //deactivated voice controller
_voice_control_view_destroy(ad);
} else {
_voice_control_view_create(ad);
if (0 != vc_setting_get_enabled(&enabled)) {
ERR("Fail to get enabled");
}
- DBG("_check_voice_control_enabled enabled %d",enabled);
+ DBG("_check_voice_control_enabled enabled %d", enabled);
return enabled;
}
ERR("voice control is not enabled.");
return layout;
}
- if (ad->win == NULL)
- {
+ if (ad->win == NULL) {
ERR("invalid parent");
return layout;
}
- if (g_layout)
- {
+ if (g_layout) {
ERR("voice control view is already created.");
return g_layout;
}
layout = elm_layout_add(ad->win);
- if (layout == NULL)
- {
+ if (layout == NULL) {
ERR("Failed to create voice control layout");
return layout;
}
g_layout = layout;
ret = elm_layout_file_set(layout, VOICE_CONTOL_EDJ, "quickpanel/voice_control/default");
- if (ret == EINA_FALSE)
- {
+ if (ret == EINA_FALSE) {
ERR("Failed to set layout file[%d]", ret);
evas_object_del(layout);
return NULL;
return layout;
}
#endif
-