/*
- * Copyright (c) 2009 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
+ * Copyright 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stdint.h>
#include "allowed-calls.h"
#include <Evas.h>
static char *gl_text_get_cb(void *data, Evas_Object *obj, const char *part)
{
- if(!strcmp(part, "elm.text"))
- {
- int index = (uintptr_t)data;
- return strdup(APP_STRING(items[index]));
- }
- return NULL;
+ if (!strcmp(part, "elm.text")) {
- int index = (int)data;
++ int index = (uintptr_t)data;
+ return strdup(APP_STRING(items[index]));
+ }
+ return NULL;
}
static void popup_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
static void gl_sel_cb(void *data, Evas_Object *obj, void *event_info)
{
- Evas_Object *popup = data;
- int index = 0;
- Elm_Object_Item *item = event_info;
-
- index = (uintptr_t)elm_object_item_data_get(item);
- switch (index)
- {
- case 0:
- everyone_item_clicked();
- break;
- case 1:
- contacts_only_clicked();
- break;
- case 2:
- favorite_contacts_only_clicked();
- break;
- case 3:
- nobody_item_clicked();
- break;
- }
- update_system_settings();
- evas_object_del(popup);
+ Evas_Object *popup = data;
+ int index = 0;
+ Elm_Object_Item *item = event_info;
+
- index = (int)elm_object_item_data_get(item);
++ index = (uintptr_t)elm_object_item_data_get(item);
+ switch (index) {
+ case 0:
+ everyone_item_clicked();
+ break;
+ case 1:
+ contacts_only_clicked();
+ break;
+ case 2:
+ favorite_contacts_only_clicked();
+ break;
+ case 3:
+ nobody_item_clicked();
+ break;
+ }
+ update_system_settings();
+ evas_object_del(popup);
}
static void create_allow_calls_from_popup()
{
- NOTISET_TRACE_BEGIN;
- static Elm_Genlist_Item_Class itc;
- Evas_Object *popup;
- Evas_Object *box;
- Evas_Object *genlist;
- int i;
- Evas_Object *win;
- ug_data *ug_main = get_app_ui_data();
- ret_if(ug_main == NULL);
-
- win = ug_main->win;
-
- popup = elm_popup_add(win);
- elm_popup_orient_set(popup, ELM_POPUP_ORIENT_BOTTOM);
- elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
- elm_object_part_text_set(popup, "title,text", APP_STRING("IDS_ST_HEADER_ALLOW_CALLS_FROM_ABB"));
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(popup, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, popup_hide_cb, NULL);
- evas_object_smart_callback_add(popup, "dismissed", popup_hide_cb, NULL);
- evas_object_smart_callback_add(popup, "block,clicked", popup_hide_cb, NULL);
-
- /* box */
- box = elm_box_add(popup);
- elm_box_homogeneous_set(box, EINA_FALSE);
- evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(box);
- elm_object_content_set(popup, box);
-
- /* genlist */
- genlist = elm_genlist_add(box);
-
- itc.item_style = "type1";
- itc.func.text_get = gl_text_get_cb;
- itc.func.content_get = NULL;
- itc.func.state_get = NULL;
- itc.func.del = NULL;
-
- for (i = 0; i < 4; i++) {
- elm_genlist_item_append(genlist, &itc, (void *)(uintptr_t)i, NULL, ELM_GENLIST_ITEM_NONE, gl_sel_cb, popup);
- }
-
- evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_genlist_mode_set(genlist, ELM_LIST_EXPAND);
- evas_object_show(genlist);
- elm_box_pack_end(box, genlist);
-
- evas_object_show(popup);
+ NOTISET_TRACE_BEGIN;
+ static Elm_Genlist_Item_Class itc;
+ Evas_Object *popup;
+ Evas_Object *box;
+ Evas_Object *genlist;
+ int i;
+ Evas_Object *win;
+ ug_data *ug_main = get_app_ui_data();
+ ret_if(ug_main == NULL);
+
+ win = ug_main->win;
+
+ popup = elm_popup_add(win);
+ elm_popup_orient_set(popup, ELM_POPUP_ORIENT_BOTTOM);
+ elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
+ elm_object_part_text_set(popup, "title,text", APP_STRING("IDS_ST_HEADER_ALLOW_CALLS_FROM_ABB"));
+ evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(popup, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, popup_hide_cb, NULL);
+ evas_object_smart_callback_add(popup, "dismissed", popup_hide_cb, NULL);
+ evas_object_smart_callback_add(popup, "block,clicked", popup_hide_cb, NULL);
+
+ /* box */
+ box = elm_box_add(popup);
+ elm_box_homogeneous_set(box, EINA_FALSE);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_show(box);
+ elm_object_content_set(popup, box);
+
+ /* genlist */
+ genlist = elm_genlist_add(box);
+
+ itc.item_style = "type1";
+ itc.func.text_get = gl_text_get_cb;
+ itc.func.content_get = NULL;
+ itc.func.state_get = NULL;
+ itc.func.del = NULL;
+
+ for (i = 0; i < 4; i++) {
- elm_genlist_item_append(genlist, &itc, (void *)i, NULL, ELM_GENLIST_ITEM_NONE, gl_sel_cb, popup);
++ elm_genlist_item_append(genlist, &itc, (void *)(uintptr_t)i, NULL, ELM_GENLIST_ITEM_NONE, gl_sel_cb, popup);
+ }
+
+ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_genlist_mode_set(genlist, ELM_LIST_EXPAND);
+ evas_object_show(genlist);
+ elm_box_pack_end(box, genlist);
+
+ evas_object_show(popup);
}
void gl_allowed_calls_selected()
/*
- * Copyright (c) 2009 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
+ * Copyright 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stdint.h>
#include "app-details.h"
#include <badge.h>
#include <badge_internal.h>
static char *gl_text_get_cb(void *data, Evas_Object *obj, const char *part)
{
- if(!strcmp(part, "elm.text"))
- {
- int index = (uintptr_t)data;
- return strdup(APP_STRING(items[index]));
- }
- return NULL;
+ if (!strcmp(part, "elm.text")) {
- int index = (int)data;
++ int index = (uintptr_t)data;
+ return strdup(APP_STRING(items[index]));
+ }
+ return NULL;
}
static Evas_Object *gl_content_get_cb(void *data, Evas_Object *obj, const char *part)
{
- if(!strcmp(part, "elm.swallow.end"))
- {
- int index = (uintptr_t)data;
- Evas_Object *radio = NULL;
- Evas_Object *radio_main = evas_object_data_get(obj, "radio");
- radio = elm_radio_add(obj);
- elm_radio_group_add(radio, radio_main);
- elm_radio_state_value_set(radio, index);
- evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
- return radio;
- }
-
- return NULL;
+ if (!strcmp(part, "elm.swallow.end")) {
- int index = (int)data;
++ int index = (uintptr_t)data;
+ Evas_Object *radio = NULL;
+ Evas_Object *radio_main = evas_object_data_get(obj, "radio");
+ radio = elm_radio_add(obj);
+ elm_radio_group_add(radio, radio_main);
+ elm_radio_state_value_set(radio, index);
+ evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ return radio;
+ }
+
+ return NULL;
}
static void gl_radio_sel_cb(void *data, Evas_Object *obj, void *event_info)
{
- NOTISET_TRACE_BEGIN;
-
- notification_setting_h setting = NULL;
- lock_screen_content_level_e level = SHOW_ALL_CONTENT;
- Elm_Object_Item *it = event_info;
-
- Evas_Object *radio = NULL;
-
- elm_genlist_item_selected_set(it, EINA_FALSE);
- radio = elm_object_item_part_content_get(it, "elm.swallow.end");
- int index = (uintptr_t)elm_object_item_data_get(it);
- elm_radio_value_set(radio, index);
-
- int err = notification_setting_get_setting_by_package_name(g_app_info->appid, &setting);
- if(err != NOTIFICATION_ERROR_NONE)
- {
- NOTISET_ERR("notification_setting_get_setting_by_package_name [%d]\n", err);
- }
- else if(setting == NULL)
- {
- NOTISET_ERR("Notification setting is NULL\n");
- }
- else
- {
- switch (index)
- {
- case 0:
- level = SHOW_ALL_CONTENT;
- break;
- case 1:
- level = HIDE_SENSITIVE_CONTENT;
- break;
- case 2:
- level = DO_NOT_SHOW_NOTIFICATIONS;
- break;
- default:
- NOTISET_ERR("Incorrect index");
- break;
- }
-
- notification_setting_set_lock_screen_content(setting, level);
- NOTISET_DBG("notification_setting_set_lock_screen_content [%d]\n", level);
-
- err = notification_setting_update_setting(setting);
- if(err != NOTIFICATION_ERROR_NONE)
- NOTISET_ERR("notification_setting_update_setting err[%d]\n", err);
- }
-
- if(setting)
- notification_setting_free_notification(setting);
-
- elm_genlist_item_update(elm_genlist_last_item_get(get_app_ui_data()->list_sub));
- evas_object_del(data);
+ NOTISET_TRACE_BEGIN;
+
+ notification_setting_h setting = NULL;
+ lock_screen_content_level_e level = SHOW_ALL_CONTENT;
+ Elm_Object_Item *it = event_info;
+
+ Evas_Object *radio = NULL;
+
+ elm_genlist_item_selected_set(it, EINA_FALSE);
+ radio = elm_object_item_part_content_get(it, "elm.swallow.end");
- int index = (int)elm_object_item_data_get(it);
++ int index = (uintptr_t)elm_object_item_data_get(it);
+ elm_radio_value_set(radio, index);
+
+ int err = notification_setting_get_setting_by_package_name(g_app_info->appid, &setting);
+ if (err != NOTIFICATION_ERROR_NONE) {
+ NOTISET_ERR("notification_setting_get_setting_by_package_name [%d]\n", err);
+ } else if (setting == NULL) {
+ NOTISET_ERR("Notification setting is NULL\n");
+ } else {
+ switch (index) {
+ case 0:
+ level = SHOW_ALL_CONTENT;
+ break;
+ case 1:
+ level = HIDE_SENSITIVE_CONTENT;
+ break;
+ case 2:
+ level = DO_NOT_SHOW_NOTIFICATIONS;
+ break;
+ default:
+ NOTISET_ERR("Incorrect index");
+ break;
+ }
+
+ notification_setting_set_lock_screen_content(setting, level);
+ NOTISET_DBG("notification_setting_set_lock_screen_content [%d]\n", level);
+
+ err = notification_setting_update_setting(setting);
+ if (err != NOTIFICATION_ERROR_NONE)
+ NOTISET_ERR("notification_setting_update_setting err[%d]\n", err);
+ }
+
+ if (setting)
+ notification_setting_free_notification(setting);
+
+ elm_genlist_item_update(elm_genlist_last_item_get(get_app_ui_data()->list_sub));
+ evas_object_del(data);
}
static void show_noti_on_lock_popup()
{
- NOTISET_TRACE_BEGIN;
- static Elm_Genlist_Item_Class itc;
- Evas_Object *popup = NULL;
- Evas_Object *genlist = NULL;
- ug_data *ug_main = get_app_ui_data();
- ret_if(ug_main == NULL);
-
- popup = elm_popup_add(ug_main->win);
- elm_popup_orient_set(popup, ELM_POPUP_ORIENT_BOTTOM);
- elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
- elm_object_part_text_set(popup, "title,text", APP_STRING("IDS_QP_TMBODY_NOTIFICATIONS_ON_LOCK_SCREEN"));
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(popup, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, popup_hide_cb, NULL);
- evas_object_smart_callback_add(popup, "dismissed", popup_hide_cb, NULL);
- evas_object_smart_callback_add(popup, "block,clicked", popup_hide_cb, NULL);
-
- /* genlist */
- genlist = elm_genlist_add(popup);
- elm_scroller_content_min_limit(genlist, EINA_FALSE, EINA_TRUE);
- elm_object_content_set(popup, genlist);
-
- Evas_Object *radio = elm_radio_add(genlist);
- evas_object_data_set(genlist, "radio", radio);
-
- itc.item_style = "type1";
- itc.func.text_get = gl_text_get_cb;
- itc.func.content_get = gl_content_get_cb;
- itc.func.state_get = NULL;
- itc.func.del = NULL;
-
- int i = 0;
- for (; i < AMOUNT_OF_CONTENT_ITEMS; i++)
- {
- elm_genlist_item_append(genlist, &itc, (void *)(uintptr_t)i, NULL, ELM_GENLIST_ITEM_NONE, gl_radio_sel_cb, popup);
- }
-
- evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_genlist_mode_set(genlist, ELM_LIST_EXPAND);
- evas_object_show(genlist);
-
- int index = noti_on_lock_screen_status_get();
- elm_radio_value_set(radio, index);
-
- evas_object_show(popup);
+ NOTISET_TRACE_BEGIN;
+ static Elm_Genlist_Item_Class itc;
+ Evas_Object *popup = NULL;
+ Evas_Object *genlist = NULL;
+ ug_data *ug_main = get_app_ui_data();
+ ret_if(ug_main == NULL);
+
+ popup = elm_popup_add(ug_main->win);
+ elm_popup_orient_set(popup, ELM_POPUP_ORIENT_BOTTOM);
+ elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
+ elm_object_part_text_set(popup, "title,text", APP_STRING("IDS_QP_TMBODY_NOTIFICATIONS_ON_LOCK_SCREEN"));
+ evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(popup, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, popup_hide_cb, NULL);
+ evas_object_smart_callback_add(popup, "dismissed", popup_hide_cb, NULL);
+ evas_object_smart_callback_add(popup, "block,clicked", popup_hide_cb, NULL);
+
+ /* genlist */
+ genlist = elm_genlist_add(popup);
+ elm_scroller_content_min_limit(genlist, EINA_FALSE, EINA_TRUE);
+ elm_object_content_set(popup, genlist);
+
+ Evas_Object *radio = elm_radio_add(genlist);
+ evas_object_data_set(genlist, "radio", radio);
+
+ itc.item_style = "type1";
+ itc.func.text_get = gl_text_get_cb;
+ itc.func.content_get = gl_content_get_cb;
+ itc.func.state_get = NULL;
+ itc.func.del = NULL;
+
+ int i = 0;
+ for (; i < AMOUNT_OF_CONTENT_ITEMS; i++) {
- elm_genlist_item_append(genlist, &itc, (void *)i, NULL, ELM_GENLIST_ITEM_NONE, gl_radio_sel_cb, popup);
++ elm_genlist_item_append(genlist, &itc, (void *)(uintptr_t)i, NULL, ELM_GENLIST_ITEM_NONE, gl_radio_sel_cb, popup);
+ }
+
+ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_genlist_mode_set(genlist, ELM_LIST_EXPAND);
+ evas_object_show(genlist);
+
+ int index = noti_on_lock_screen_status_get();
+ elm_radio_value_set(radio, index);
+
+ evas_object_show(popup);
}
static void app_details_gl_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
/*
- * Copyright (c) 2009 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
+ * Copyright 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+ #include "app-setting-info.h"
+
- #include <stdint.h>
- #include "pkgmgr-setting-info.h"
#include "common-efl.h"
#include "set-schedule-info.h"
#include "allowed-calls.h"
static void gl_radio_sel_cb(void *data, Evas_Object *obj, void *event_info)
{
- NOTISET_TRACE_BEGIN;
- Elm_Object_Item *it = event_info;
- int index = (uintptr_t)data;
-
- Evas_Object *radio = NULL;
-
- elm_genlist_item_selected_set(it, EINA_FALSE);
- radio = elm_object_item_part_content_get(it, "elm.swallow.end");
- elm_radio_value_set(radio, index);
-
- switch (index)
- {
- case 0:
- show_all_content_clicked();
- break;
- case 1:
- hide_sensitive_content_clicked();
- break;
- case 2:
- do_not_show_notifications_clicked();
- break;
- }
+ NOTISET_TRACE_BEGIN;
+ Elm_Object_Item *it = event_info;
- int index = (int)data;
++ int index = (uintptr_t)data;
+
+ Evas_Object *radio = NULL;
+
+ elm_genlist_item_selected_set(it, EINA_FALSE);
+ radio = elm_object_item_part_content_get(it, "elm.swallow.end");
+ elm_radio_value_set(radio, index);
+
+ switch (index) {
+ case 0:
+ show_all_content_clicked();
+ break;
+ case 1:
+ hide_sensitive_content_clicked();
+ break;
+ case 2:
+ do_not_show_notifications_clicked();
+ break;
+ }
}
void append_gl_radio_item_list(Evas_Object *genlist, Eina_List* list, char *style)
{
- NOTISET_TRACE_BEGIN;
- Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
- ret_if(!itc);
-
- item_info_s *item;
- int count = 0;
-
- Evas_Object *radio = elm_radio_add(genlist);
- evas_object_data_set(genlist, "radio", radio);
-
- itc->item_style = style;
- itc->func.text_get = gl_text_get_cb;
- itc->func.content_get = gl_content_get_cb;
- itc->func.del = gl_del_cb;
-
- while(list)
- {
- item = (item_info_s*)eina_list_data_get(list);
- item->index = count;
- item->item_style = ITEM_STYLE_RADIO;
- elm_genlist_item_append(genlist, /* genlist object */
- itc, /* item class */
- item, /* item class user data */
- NULL, /* parent item */
- ELM_GENLIST_ITEM_NONE, /* item type */
- gl_radio_sel_cb, /* select smart callback */
- (void *)(uintptr_t)count); /* smart callback user data */
- list = eina_list_next(list);
- ++count;
- }
- elm_genlist_item_class_free(itc);
-
- int index = get_lock_screen_content_setting();
- elm_radio_value_set(radio, index);
- gl_radio_sel_cb((void *)(uintptr_t)index, genlist, NULL);
+ NOTISET_TRACE_BEGIN;
+ Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
+ ret_if(!itc);
+
+ item_info_s *item;
+ int count = 0;
+
+ Evas_Object *radio = elm_radio_add(genlist);
+ evas_object_data_set(genlist, "radio", radio);
+
+ itc->item_style = style;
+ itc->func.text_get = gl_text_get_cb;
+ itc->func.content_get = gl_content_get_cb;
+ itc->func.del = gl_del_cb;
+
+ while (list) {
+ item = (item_info_s *)eina_list_data_get(list);
+ item->index = count;
+ item->item_style = ITEM_STYLE_RADIO;
+ elm_genlist_item_append(genlist, /* genlist object */
- itc, /* item class */
- item, /* item class user data */
- NULL, /* parent item */
- ELM_GENLIST_ITEM_NONE, /* item type */
- gl_radio_sel_cb, /* select smart callback */
- (void *)count); /* smart callback user data */
++ itc, /* item class */
++ item, /* item class user data */
++ NULL, /* parent item */
++ ELM_GENLIST_ITEM_NONE, /* item type */
++ gl_radio_sel_cb, /* select smart callback */
++ (void *)(uintptr_t)count); /* smart callback user data */
+ list = eina_list_next(list);
+ ++count;
+ }
+ elm_genlist_item_class_free(itc);
+
+ int index = get_lock_screen_content_setting();
+ elm_radio_value_set(radio, index);
- gl_radio_sel_cb((void *)index, genlist, NULL);
++ gl_radio_sel_cb((void *)(uintptr_t)index, genlist, NULL);
}
- void append_gl_item_list(Evas_Object *genlist, Eina_List* list, int style, char *ugName)
+ void append_gl_item_list(Evas_Object *genlist, Eina_List *list, int style, char *ugName)
{
- NOTISET_TRACE_BEGIN;
+ NOTISET_TRACE_BEGIN;
- Elm_Object_Item *gen_item = NULL;
+ Elm_Object_Item *gen_item = NULL;
Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
ret_if(!itc);