/**
* @brief Creates on&off check without callbacks.
- * @param[in] parent parent object.
+ * @param[in] parent parent object.
+ * @param[in] style object style.
* @return created check.
*/
-Evas_Object *create_on_off_check(Evas_Object *parent);
+Evas_Object *create_check(Evas_Object *parent, char *style);
/**
* @brief Creates a layout based on specified parent object and applies specified style to it.
switch (item) {
case APP_DETAILS_ALLOW_NOTI:
if (!strcmp(part, "elm.swallow.end")) {
- check = create_on_off_check(obj);
+ check = create_check(obj, "on&off");
elm_check_state_set(check, allow_noti_status_get());
evas_object_smart_callback_add(check, "changed", allow_noti_check_changed_cb, NULL);
return check;
break;
case APP_DETAILS_POPUP_NOTI:
if (!strcmp(part, "elm.swallow.end")) {
- check = create_on_off_check(obj);
+ check = create_check(obj, "on&off");
elm_check_state_set(check, popup_noti_status_get());
evas_object_smart_callback_add(check, "changed", popup_noti_check_changed_cb, NULL);
return check;
break;
case APP_DETAILS_APP_BADGE:
if (!strcmp(part, "elm.swallow.end")) {
- check = create_on_off_check(obj);
+ check = create_check(obj, "on&off");
elm_check_state_set(check, app_badge_status_get());
evas_object_smart_callback_add(check, "changed", app_badge_check_changed_cb, NULL);
return check;
}
-Evas_Object *create_on_off_check(Evas_Object *parent)
+Evas_Object *create_check(Evas_Object *parent, char *style)
{
Evas_Object *check = elm_check_add(parent);
- elm_object_style_set(check, "on&off");
+ elm_object_style_set(check, style);
evas_object_show(check);
evas_object_pass_events_set(check, 1);
evas_object_propagate_events_set(check, 0);
if (data_list->item_style == ITEM_STYLE_TYPE_ONE) {
return NULL;
} else if (data_list->item_style == ITEM_STYLE_DEFAULT) {
- content = create_on_off_check(obj);
+ content = create_check(obj, "default");
elm_check_state_set(content, data_list->do_not_disturb_except);
evas_object_smart_callback_add(content, "changed", _excepted_check_changed_cb, data_list);
return content;
if (!strcmp(data, "do-not-disturb") && !strcmp(part, "elm.swallow.end")) {
Evas_Object *check = NULL;
- check = create_on_off_check(obj);
+ check = create_check(obj, "on&off");
elm_check_state_set(check, get_do_not_disturb());
evas_object_smart_callback_add(check, "changed", _do_not_disturb_check_changed_cb, NULL);
return check;
}
if (!strcmp(data, "set-schedule") && !strcmp("elm.swallow.end", part)) {
- Evas_Object *check = create_on_off_check(obj);
+ Evas_Object *check = create_check(obj, "on&off");
elm_check_state_set(check, get_schedule());
evas_object_smart_callback_add(check, "changed", set_schedule_check_changed_cb, NULL);
return check;