tizen 2.3 release
[apps/home/settings.git] / setting-phone / src / setting-phone-ticker-notification-details.c
1 /*
2  * setting
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
5  *
6  * Contact: MyoungJune Park <mj2004.park@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 #include <setting-phone-ticker-notification-details.h>
22 #include <ail.h>
23 #include <badge.h>
24 //#include <badge_error.h>
25
26 #define NOTIFICATION_STR "IDS_ST_BODY_NOTIFICATION"
27 #define DISPLAY_CONTENT_STR "IDS_ST_BODY_DISPLAY_CONTENTS"
28 #define BADGE_STR "IDS_COM_BODY_BADGE_ABB"
29
30 #define STR_NOTIFICATION_DETAILS_HELP3 "IDS_ST_BODY_IF_YOU_DONT_WANT_TO_SEE_A_NUMBER_APPEAR_ON_THE_APP_ICON_FOR_EACH_NEW_EVENT_DISABLE_BADGE"
31
32 #define STR_NOTIFICATION_DETAILS_NOTI_HELP "You can turn off notification of this application."
33 #define STR_NOTIFICATION_DETAILS_DISPLAY_HELP "If you don't want to see contents in notification popup, turn off the display contents."
34 #define STR_NOTIFICATION_DETAILS_BADGE_HELP "If you don't want to display badge on app icon with a new event number, turn off the Badge."
35
36 //---------------
37 static char* pkg_list[] = {"org.tizen.email", "org.tizen.message", "xnq5eh9vop.ChatON"};
38 //---------------
39
40 static int setting_phone_ticker_notification_details_create(void *cb);
41 static int setting_phone_ticker_notification_details_destroy(void *cb);
42 static int setting_phone_ticker_notification_details_update(void *cb);
43 static int setting_phone_ticker_notification_details_cleanup(void *cb);
44
45 static void setting_phone_noti_details_chk_btn_cb(void *data, Evas_Object *obj, void *event_info);
46 static void setting_phone_noti_details_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info);
47
48 static int __status_get_notification_str(char* title);
49 static int __status_get_sound_str(char* title);
50 static int __status_get_display_contents_str(char* title);
51 static int __status_get_badge_str(char* title);
52 static void __status_set_display_contents_str(void* data);
53
54 setting_view setting_view_phone_ticker_notification_details = {
55         .create = setting_phone_ticker_notification_details_create,
56         .destroy = setting_phone_ticker_notification_details_destroy,
57         .update = setting_phone_ticker_notification_details_update,
58         .cleanup = setting_phone_ticker_notification_details_cleanup,
59 };
60
61 /* ***************************************************
62  *
63  *basic func
64  *
65  ***************************************************/
66 char* g_sel_string = NULL;
67 SettingPhoneUG *g_phone_ad = NULL;
68
69 static int setting_phone_ticker_notification_details_create(void *cb)
70 {
71         SETTING_TRACE_BEGIN;
72         /* error check */
73         retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
74         SettingPhoneUG *ad = (SettingPhoneUG *) cb;
75         g_phone_ad = ad;
76
77         Evas_Object *scroller;
78
79         /* scroller is a genlist */
80         const char *title = NULL;
81         if ( 0== safeStrCmp (ad->sel_string, "IDS_COM_BODY_INSTANT_MESSENGER")) {
82                 title = "IDS_COM_BODY_INSTANT_MESSENGER";
83         } else if ( 0== safeStrCmp (ad->sel_string, "IDS_ST_BODY_MESSAGE")) {
84                 title = "IDS_ST_BODY_MESSAGE";
85         } else if ( 0== safeStrCmp (ad->sel_string, "IDS_ST_BODY_EMAIL")) {
86                 title = "IDS_ST_BODY_EMAIL";
87         }
88         else {
89                 title = ad->sel_string;
90         }
91         SETTING_TRACE("title:%s", title);
92         setting_push_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get,
93                                                    _(title),
94                                                    dgettext("sys_string", "IDS_COM_BODY_BACK"),
95                                                    NULL,
96                                                    setting_phone_noti_details_click_softkey_back_cb,
97                                                    NULL, ad, &scroller,
98                                                    ad->navi_bar);
99
100         Elm_Object_Item *item;
101
102         g_sel_string = ad->sel_string;
103
104         // [UI] Separator
105         item =
106             elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL,
107                                     ELM_GENLIST_ITEM_NONE, NULL, NULL);
108         elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
109
110         // [UI] Notification
111         int noti_val = __status_get_notification_str(ad->sel_string);
112         ad->data_details_notification =
113             setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon),
114                                              setting_phone_noti_details_mouse_up_Gendial_list_cb,
115                                              ad, SWALLOW_Type_1TOGGLE, NULL,
116                                              NULL, noti_val,
117                                              NOTIFICATION_STR, NULL,
118                                              setting_phone_noti_details_chk_btn_cb);
119         if (ad->data_details_notification) {
120                 ad->data_details_notification->userdata = ad;
121                 ad->data_details_notification->group_style = SETTING_GROUP_STYLE_TOP;
122         } else {
123                 SETTING_TRACE_ERROR("ad->data_launch_effect is NULL");
124         }
125
126         // [UI] Sound
127         int sound_val = __status_get_sound_str(ad->sel_string);
128         ad->data_details_sound =
129             setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon),
130                                              setting_phone_noti_details_mouse_up_Gendial_list_cb,
131                                              ad, SWALLOW_Type_1TOGGLE, NULL,
132                                              NULL, sound_val,
133                                              KeyStr_Sounds, NULL,
134                                              setting_phone_noti_details_chk_btn_cb);
135         if (ad->data_details_sound) {
136                 ad->data_details_sound->userdata = ad;
137                 ad->data_details_sound->group_style = SETTING_GROUP_STYLE_CENTER;
138         } else {
139                 SETTING_TRACE_ERROR("ad->data_launch_effect is NULL");
140         }
141
142         // [UI] Display contents
143         int display_val = __status_get_display_contents_str(ad->sel_string);
144         ad->data_details_display_content =
145             setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon),
146                                              setting_phone_noti_details_mouse_up_Gendial_list_cb,
147                                              ad, SWALLOW_Type_1TOGGLE, NULL,
148                                              NULL, display_val,
149                                              DISPLAY_CONTENT_STR, NULL,
150                                              setting_phone_noti_details_chk_btn_cb);
151         if (ad->data_details_display_content) {
152                 ad->data_details_display_content->userdata = ad;
153                 ad->data_details_display_content->group_style = SETTING_GROUP_STYLE_CENTER;
154         } else {
155                 SETTING_TRACE_ERROR("ad->data_launch_effect is NULL");
156         }
157         // [UI] Badge
158         int badge_val = __status_get_badge_str(ad->sel_string);
159         ad->data_details_badge =
160             setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon),
161                                              setting_phone_noti_details_mouse_up_Gendial_list_cb,
162                                              ad, SWALLOW_Type_1TOGGLE, NULL,
163                                              NULL, badge_val,
164                                              BADGE_STR, NULL,
165                                              setting_phone_noti_details_chk_btn_cb);
166         if (ad->data_details_badge) {
167                 ad->data_details_badge->userdata = ad;
168                 ad->data_details_badge->group_style = SETTING_GROUP_STYLE_BOTTOM;
169         } else {
170                 SETTING_TRACE_ERROR("ad->data_launch_effect is NULL");
171         }
172         setting_view_phone_ticker_notification_details.is_create = 1;
173         return SETTING_RETURN_SUCCESS;
174
175 }
176
177 static int setting_phone_ticker_notification_details_destroy(void *cb)
178 {
179         SETTING_TRACE_BEGIN;
180         /* error check */
181         retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
182
183         SettingPhoneUG *ad = (SettingPhoneUG *) cb;
184
185         elm_naviframe_item_pop(ad->navi_bar);
186         setting_view_phone_ticker_notification_details.is_create = 0;
187
188         return SETTING_RETURN_SUCCESS;
189 }
190
191 static int setting_phone_ticker_notification_details_update(void *cb)
192 {
193         SETTING_TRACE_BEGIN;
194         return SETTING_RETURN_SUCCESS;
195 }
196
197 static int setting_phone_ticker_notification_details_cleanup(void *cb)
198 {
199         SETTING_TRACE_BEGIN;
200         retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
201         setting_phone_ticker_notification_details_destroy(cb);
202         return SETTING_RETURN_SUCCESS;
203 }
204
205 /* ***************************************************
206  *
207  *general func
208  *
209  ***************************************************/
210
211 /* ***************************************************
212  *
213  *call back func
214  *
215  ***************************************************/
216
217 static void
218 setting_phone_noti_details_click_softkey_back_cb(void *data, Evas_Object *obj,
219                                          void *event_info)
220 {
221         SETTING_TRACE_BEGIN;
222         /* error check */
223         retm_if(data == NULL, "Data parameter is NULL");
224         SettingPhoneUG *ad = (SettingPhoneUG *) data;
225
226         setting_view_change(&setting_view_phone_ticker_notification_details, &setting_view_phone_ticker_notification, ad);
227 }
228
229
230 // -1  : failed
231 //  0  : off
232 //  1  : on
233 static int __status_get_notification_str(char* title)
234 {
235         SETTING_TRACE_BEGIN;
236         int val = -1;
237         const char *vconf_key = NULL;
238
239         if ( 0== safeStrCmp (title, "IDS_ST_BODY_MESSAGE")) {
240                 vconf_key = VCONFKEY_SETAPPL_STATE_TICKER_NOTI_MESSAGES_BOOL;
241         } else if ( 0== safeStrCmp (title, "IDS_ST_BODY_EMAIL")) {
242                 vconf_key = VCONFKEY_SETAPPL_STATE_TICKER_NOTI_EMAIL_BOOL;
243         }
244         /* add new menu */
245         else if ( 0== safeStrCmp (title, "IDS_COM_BODY_INSTANT_MESSENGER")) {
246                 vconf_key = VCONFKEY_SETAPPL_STATE_TICKER_NOTI_IM_BOOL;
247         } else if ( 0== safeStrCmp (title, KeyStr_Twitter)) {
248                 vconf_key = VCONFKEY_SETAPPL_STATE_TICKER_NOTI_TWITTER_BOOL;
249         } else if ( 0== safeStrCmp (title, KeyStr_Facebook)) {
250                 vconf_key = VCONFKEY_SETAPPL_STATE_TICKER_NOTI_FACEBOOK_BOOL;
251         }
252
253         SETTING_TRACE("vconf_key:%s", vconf_key);
254         vconf_get_bool(vconf_key, &val);
255         SETTING_TRACE_DEBUG("title : %s, value : %d", title, val);
256         return val;
257 }
258
259 static int __status_get_sound_str(char* title)
260 {
261         SETTING_TRACE_BEGIN;
262         int val = -1;
263         const char *vconf_key = NULL;
264         if ( 0== safeStrCmp (title, "IDS_ST_BODY_MESSAGE")) {
265                 vconf_key = VCONFKEY_TICKER_NOTI_SOUND_MESSAGES;
266
267         } else if ( 0== safeStrCmp (title, "IDS_ST_BODY_EMAIL")) {
268                 vconf_key = VCONFKEY_TICKER_NOTI_SOUND_EMAIL;
269
270         } else if ( 0== safeStrCmp (title, "IDS_COM_BODY_INSTANT_MESSENGER")) {
271                 vconf_key = VCONFKEY_TICKER_NOTI_SOUND_IM;
272
273         } else if ( 0== safeStrCmp (title, KeyStr_Twitter)) {
274                 //vconf_key = VCONFKEY_TICKER_NOTI_BADGE_TWITTER;
275
276         } else if ( 0== safeStrCmp (title, KeyStr_Facebook)) {
277                 //vconf_key = VCONFKEY_TICKER_NOTI_BADGE_FACEBOOK;
278
279         }
280         SETTING_TRACE("vconf_key:%s", vconf_key);
281         vconf_get_bool(vconf_key, &val);
282         SETTING_TRACE_DEBUG("title : %s, value : %d", title, val);
283         return val;
284 }
285
286 // -1  : failed
287 //  0  : off
288 //  1  : on
289 static int __status_get_display_contents_str(char* title)
290 {
291         SETTING_TRACE_BEGIN;
292         int val = -1;
293         const char *vconf_key = NULL;
294
295         if ( 0== safeStrCmp (title, "IDS_ST_BODY_MESSAGE")) {
296                 vconf_key = VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_MESSASGES;
297         } else if ( 0== safeStrCmp (title, "IDS_ST_BODY_EMAIL")) {
298                 vconf_key = VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_EMAIL;
299         }
300         /* add new menu */
301         else if ( 0== safeStrCmp (title, "IDS_COM_BODY_INSTANT_MESSENGER")) {
302                 vconf_key = VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_IM;
303         } else if ( 0== safeStrCmp (title, KeyStr_Twitter)) {
304                 vconf_key = VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_TWITTER;
305         } else if ( 0== safeStrCmp (title, KeyStr_Facebook)) {
306                 vconf_key = VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_FACEBOOK;
307         }
308
309         SETTING_TRACE("vconf_key:%s", vconf_key);
310         vconf_get_bool(vconf_key, &val);
311         SETTING_TRACE_DEBUG("title : %s, value : %d", title, val);
312         return val;
313 }
314 static int __status_get_badge_str(char* title)
315 {
316         SETTING_TRACE_BEGIN;
317         int val = -1;
318         const char *vconf_key = NULL;
319         if ( 0== safeStrCmp (title, "IDS_ST_BODY_MESSAGE")) {
320                 vconf_key = VCONFKEY_TICKER_NOTI_BADGE_MESSAGES;
321         } else if ( 0== safeStrCmp (title, "IDS_ST_BODY_EMAIL")) {
322                 vconf_key = VCONFKEY_TICKER_NOTI_BADGE_EMAIL;
323         }
324         /* add new menu */
325         else if ( 0== safeStrCmp (title, "IDS_COM_BODY_INSTANT_MESSENGER")) {
326                 vconf_key = VCONFKEY_TICKER_NOTI_BADGE_IM;
327         } else if ( 0== safeStrCmp (title, KeyStr_Twitter)) {
328                 vconf_key = VCONFKEY_TICKER_NOTI_BADGE_TWITTER;
329         } else if ( 0== safeStrCmp (title, KeyStr_Facebook)) {
330                 vconf_key = VCONFKEY_TICKER_NOTI_BADGE_FACEBOOK;
331         }
332         SETTING_TRACE("vconf_key:%s", vconf_key);
333         vconf_get_bool(vconf_key, &val);
334         SETTING_TRACE_DEBUG("title : %s, value : %d", title, val);
335         return val;
336 }
337
338 static void __status_set_notification_str(void* data)
339 {
340         SETTING_TRACE_BEGIN;
341         Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)data;
342
343         // message update in previos page
344         Setting_GenGroupItem_Data* item_to_update = NULL;
345
346         char* status;
347
348         if (list_item->chk_status == 1) {
349                 status = setting_gettext("IDS_COM_BODY_ON_M_STATUS");
350         } else {
351                 status = setting_gettext("IDS_COM_BODY_OFF_M_STATUS");
352         }
353
354         SETTING_TRACE("g_sel_string:%s", g_sel_string);
355         const char *vconf_key = NULL;
356
357         if ( 0== safeStrCmp (g_sel_string, "IDS_ST_BODY_MESSAGE")) {
358                 vconf_key = VCONFKEY_SETAPPL_STATE_TICKER_NOTI_MESSAGES_BOOL;
359                 item_to_update = g_phone_ad->data_n_msg;
360         } else if ( 0== safeStrCmp (g_sel_string, "IDS_ST_BODY_EMAIL")) {
361                 vconf_key = VCONFKEY_SETAPPL_STATE_TICKER_NOTI_EMAIL_BOOL;
362                 item_to_update = g_phone_ad->data_n_email;
363         }
364         /* add new menu */
365         else if ( 0== safeStrCmp (g_sel_string, "IDS_COM_BODY_INSTANT_MESSENGER")) {
366                 vconf_key = VCONFKEY_SETAPPL_STATE_TICKER_NOTI_IM_BOOL;
367                 item_to_update = g_phone_ad->data_n_im;
368         } else if ( 0== safeStrCmp (g_sel_string, KeyStr_Twitter)) {
369                 vconf_key = VCONFKEY_SETAPPL_STATE_TICKER_NOTI_TWITTER_BOOL;
370                 item_to_update = g_phone_ad->data_n_twt;
371         } else if ( 0== safeStrCmp (g_sel_string, KeyStr_Facebook)) {
372                 vconf_key = VCONFKEY_SETAPPL_STATE_TICKER_NOTI_FACEBOOK_BOOL;
373                 item_to_update = g_phone_ad->data_n_fb;
374         }
375
376         SETTING_TRACE("vconf_key:%s", vconf_key);
377         int ret = vconf_set_bool(vconf_key, list_item->chk_status);
378         setting_retm_if(ret != 0, "fail to set vconf");
379
380         // update UI
381         if (item_to_update) {
382                 item_to_update->sub_desc = strdup(status);
383                 elm_object_item_data_set(item_to_update->item,item_to_update);
384                 elm_genlist_item_update(item_to_update->item);
385         }
386 }
387
388 static void __status_set_sound_str(void* data)
389 {
390         SETTING_TRACE_BEGIN;
391         setting_retm_if(data == NULL, "Data parameter is NULL");
392         Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)data;
393
394         /* since the status is never used, so comment it.
395         char *status = NULL;
396
397         if (list_item->chk_status == 1) {
398                 status = setting_gettext("IDS_COM_BODY_ON_M_STATUS");
399         } else {
400                 status = setting_gettext("IDS_COM_BODY_OFF_M_STATUS");
401         }*/
402
403         SETTING_TRACE("g_sel_string:%s", g_sel_string);
404         const char *vconf_key = NULL;
405
406         if ( 0== safeStrCmp (g_sel_string, "IDS_ST_BODY_MESSAGE")) {
407                 vconf_key = VCONFKEY_TICKER_NOTI_SOUND_MESSAGES;
408
409         } else if ( 0== safeStrCmp (g_sel_string, "IDS_ST_BODY_EMAIL")) {
410                 vconf_key = VCONFKEY_TICKER_NOTI_SOUND_EMAIL;
411
412         } else if ( 0== safeStrCmp (g_sel_string, "IDS_COM_BODY_INSTANT_MESSENGER")) {
413                 vconf_key = VCONFKEY_TICKER_NOTI_SOUND_IM;
414
415         } else if ( 0== safeStrCmp (g_sel_string, KeyStr_Twitter)) {
416                 //vconf_key = VCONFKEY_TICKER_NOTI_BADGE_TWITTER;
417
418         } else if ( 0== safeStrCmp (g_sel_string, KeyStr_Facebook)) {
419                 //vconf_key = VCONFKEY_TICKER_NOTI_BADGE_FACEBOOK;
420
421         }
422
423         SETTING_TRACE("vconf_key:%s", vconf_key);
424         int ret = vconf_set_bool(vconf_key, list_item->chk_status);
425         setting_retm_if(ret != 0, "fail to set vconf");
426 }
427
428 static void __status_set_display_contents_str(void* data)
429 {
430         SETTING_TRACE_BEGIN;
431
432         Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)data;
433
434         SETTING_TRACE("g_sel_string:%s", g_sel_string);
435         const char *vconf_key = NULL;
436
437         if ( 0== safeStrCmp (g_sel_string, "IDS_ST_BODY_MESSAGE")) {
438                 vconf_key = VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_MESSASGES;
439         } else if ( 0== safeStrCmp (g_sel_string, "IDS_ST_BODY_EMAIL")) {
440                 vconf_key = VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_EMAIL;
441         }
442         /* add new menu */
443         else if ( 0== safeStrCmp (g_sel_string, "IDS_COM_BODY_INSTANT_MESSENGER")) {
444                 vconf_key = VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_IM;
445         } else if ( 0== safeStrCmp (g_sel_string, KeyStr_Twitter)) {
446                 vconf_key = VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_TWITTER;
447         } else if ( 0== safeStrCmp (g_sel_string, KeyStr_Facebook)) {
448                 vconf_key = VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_FACEBOOK;
449         }
450         SETTING_TRACE("vconf_key:%s", vconf_key);
451         int ret = vconf_set_bool(vconf_key, list_item->chk_status);
452         setting_retm_if(ret != 0, "fail to set vconf");
453 }
454
455
456 static void __status_set_badge_str(void* data)
457 {
458         SETTING_TRACE_BEGIN;
459         setting_retm_if(data == NULL, "Data parameter is NULL");
460         Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)data;
461
462         SETTING_TRACE("g_sel_string:%s", g_sel_string);
463         const char *vconf_key = NULL;
464         char* pkgname = NULL;
465         if ( 0== safeStrCmp (g_sel_string, "IDS_ST_BODY_MESSAGE")) {
466                 vconf_key = VCONFKEY_TICKER_NOTI_BADGE_MESSAGES;
467                 pkgname = pkg_list[1]; /* message */
468         } else if ( 0== safeStrCmp (g_sel_string, "IDS_ST_BODY_EMAIL")) {
469                 vconf_key = VCONFKEY_TICKER_NOTI_BADGE_EMAIL;
470                 pkgname = pkg_list[0]; /* email */
471         }
472         /* add new menu */
473         else if ( 0== safeStrCmp (g_sel_string, "IDS_COM_BODY_INSTANT_MESSENGER")) {
474                 vconf_key = VCONFKEY_TICKER_NOTI_BADGE_IM;
475                 pkgname = pkg_list[2]; /* email */
476         }
477
478         #if 0
479         else if ( 0== safeStrCmp (g_sel_string, KeyStr_Twitter)) {
480                 vconf_key = VCONFKEY_TICKER_NOTI_BADGE_TWITTER;
481         } else if ( 0== safeStrCmp (g_sel_string, KeyStr_Facebook)) {
482                 vconf_key = VCONFKEY_TICKER_NOTI_BADGE_FACEBOOK;
483         }
484         #endif
485
486         SETTING_TRACE("vconf_key:%s", vconf_key);
487         int ret = vconf_set_bool(vconf_key, list_item->chk_status);
488
489         if (ret != 0)
490         {
491                 // error
492         } else {
493                 //BADGE_ERROR_NONE = 0,                 /**< Success */
494                 badge_error_e badge_ret = badge_set_display(pkgname, list_item->chk_status);
495                 if (badge_ret == BADGE_ERROR_NONE)
496                 {
497                         SETTING_TRACE("pkg name : %s -- badge : %d \n", pkgname, list_item->chk_status);
498                 } else {
499                         SETTING_TRACE_ERROR("badge_set_display ERROR : %d \n", badge_ret);
500                 }
501         }
502 }
503
504 /**
505  * genlist click
506  */
507 static void setting_phone_noti_details_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info)
508 {
509         SETTING_TRACE_BEGIN;
510         /* error check */
511         setting_retm_if(data == NULL, "Data parameter is NULL");
512
513         retm_if(event_info == NULL, "Invalid argument: event info is NULL");
514         Elm_Object_Item *item = (Elm_Object_Item *) event_info;
515         elm_genlist_item_selected_set(item, 0);
516         Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item);
517
518
519         setting_update_gl_item_chk_status(list_item, !(list_item->chk_status));
520
521         if ( 0== safeStrCmp (list_item->keyStr, NOTIFICATION_STR)) {
522                 __status_set_notification_str(list_item);
523         } else if ( 0== safeStrCmp (list_item->keyStr, KeyStr_Sounds)) {
524                 __status_set_sound_str(list_item);
525         } else if ( 0== safeStrCmp (list_item->keyStr, DISPLAY_CONTENT_STR)) {
526                 // vconf setting by g_sel_string
527                 __status_set_display_contents_str(list_item);
528         }  else if ( 0== safeStrCmp (list_item->keyStr, BADGE_STR)) {
529                 __status_set_badge_str(list_item);
530         }
531 }
532
533
534 /**
535  * check box
536  */
537 static void setting_phone_noti_details_chk_btn_cb(void *data, Evas_Object *obj, void *event_info)
538  {
539         SETTING_TRACE_BEGIN;
540         /* error check */
541         retm_if(data == NULL, "Data parameter is NULL");
542         Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data;
543         list_item->chk_status = elm_check_state_get(obj);       /*  for genlist update status */
544
545         if ( 0== safeStrCmp (list_item->keyStr, NOTIFICATION_STR)) {
546                 __status_set_notification_str(list_item);
547         } else if ( 0== safeStrCmp (list_item->keyStr, KeyStr_Sounds)) {
548                 __status_set_sound_str(list_item);
549         } else if ( 0== safeStrCmp (list_item->keyStr, DISPLAY_CONTENT_STR)) {
550                 __status_set_display_contents_str(list_item);
551         } else if ( 0== safeStrCmp (list_item->keyStr, BADGE_STR)) {
552                 __status_set_badge_str(list_item);
553         }
554  }
555