* @{
*/
-ug_data *g_ug_data = NULL;
static Eina_Bool _notifiacation_setting_main_pop_cb(void *data, Elm_Object_Item * it)
{
ug_data *ugd = (ug_data *) data;
ret_if(!ugd);
- g_ug_data = ugd;
-
/* Create genlist */
- g_ug_data->list_main = _create_app_notification_gl(ugd);
+ ugd->list_main = _create_app_notification_gl(ugd);
/* back Button */
Evas_Object *back_btn = elm_button_add(ugd->naviframe);
evas_object_smart_callback_add(back_btn, "clicked", back_button_cb, ugd->naviframe);
/* Push to naviframe */
- g_ug_data->navi_item = elm_naviframe_item_push(ugd->naviframe, APP_STRING("IDS_ST_HEADER_APP_NOTIFICATIONS_ABB"), back_btn, NULL, g_ug_data->list_main, NULL);
- elm_naviframe_item_pop_cb_set(g_ug_data->navi_item, _notifiacation_setting_main_pop_cb, ugd);
+ ugd->navi_item = elm_naviframe_item_push(ugd->naviframe, APP_STRING("IDS_ST_HEADER_APP_NOTIFICATIONS_ABB"), back_btn, NULL, ugd->list_main, NULL);
+ elm_naviframe_item_pop_cb_set(ugd->navi_item, _notifiacation_setting_main_pop_cb, ugd);
}
#include "common-efl.h"
-ug_data* get_ug_data(_);
* @{
*/
-ug_data *g_ug_data = NULL;
static Evas_Object* _create_do_not_disturb_gl(ug_data *ugd);
-static void _append_item_in_list(Evas_Object* genlist);
-
-ug_data* get_ug_data(_)
-{
- return g_ug_data;
-}
-
-static void _do_not_disturb_check_changed_cb(void *data, Evas_Object *obj, void *event_info)
-{
- NOTISET_DBG("");
- char *appid = (char*)data;
-
- Eina_Bool state = elm_check_state_get(obj);
- set_do_not_disturb(state);
- NOTISET_DBG("do_not_disturb check value = %s", state==false ? "FALSE":"TRUE");
-}
static Eina_Bool _notifiacation_setting_main_pop_cb(void *data, Elm_Object_Item * it)
ug_data *ugd = (ug_data *) data;
ret_if(!ugd);
- g_ug_data = ugd;
- g_ug_data->list_main = _create_do_not_disturb_gl(ugd);
+ ugd->list_main = _create_do_not_disturb_gl(ugd);
/* back Button */
Evas_Object *back_btn = elm_button_add(ugd->naviframe);
evas_object_smart_callback_add(back_btn, "clicked", back_button_cb, ugd->naviframe);
/* Push to naviframe */
- g_ug_data->navi_item = elm_naviframe_item_push(ugd->naviframe, APP_STRING("IDS_ST_HEADER_DO_NOT_DISTURB_ABB"), back_btn, NULL, g_ug_data->list_main, NULL);
- elm_naviframe_item_pop_cb_set(g_ug_data->navi_item, _notifiacation_setting_main_pop_cb, ugd);
+ ugd->navi_item = elm_naviframe_item_push(ugd->naviframe, APP_STRING("IDS_ST_HEADER_DO_NOT_DISTURB_ABB"), back_btn, NULL, ugd->list_main, NULL);
+ elm_naviframe_item_pop_cb_set(ugd->navi_item, _notifiacation_setting_main_pop_cb, ugd);
/* Bottom Button */
Evas_Object *bottom_box = elm_box_add(ugd->naviframe);
evas_object_size_hint_weight_set(bottom_button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bottom_button, EVAS_HINT_FILL, 0.5);
elm_object_translatable_text_set(bottom_button, APP_STRING("IDS_ST_BUTTON_MANAGE_EXCLUDED_APPS_ABB"));
- evas_object_smart_callback_add(bottom_button, "clicked", exception_application_clicked_cb, g_ug_data);
- elm_object_item_part_content_set(g_ug_data->navi_item, "toolbar", bottom_box);
+ evas_object_smart_callback_add(bottom_button, "clicked", exception_application_clicked_cb, ugd);
+ elm_object_item_part_content_set(ugd->navi_item, "toolbar", bottom_box);
elm_box_pack_start(bottom_box, bottom_button);
}
#include "log.h"
#include "notification-setting-info.h"
#include "common-efl.h"
+#include "do-not-disturb-efl.h"
static Evas_Object* _create_edit_exception_apps_list(ug_data *ugd)
{
bool allow_to_notify = false;
bool do_not_disturb_except = false;
notification_setting_h setting_array = NULL;
- notification_setting_h *temp = NULL;
+ notification_setting_h temp = NULL;
item_info_s *item_info = NULL;
remove_all_apps_list();
bool allow_to_notify = false;
bool do_not_disturb_except = false;
notification_setting_h setting_array = NULL;
- notification_setting_h *temp = NULL;
+ notification_setting_h temp = NULL;
remove_excepted_apps_list();
setting_info = calloc(1, sizeof(setting_info_s));
NOTISET_DBG("");
int err = NOTIFICATION_ERROR_NONE;
- notification_system_setting_h system_setting = NULL;
+ notification_setting_h setting = NULL;
- err = notification_setting_get_setting_by_package_name(pkg_name, &system_setting);
- if (err != NOTIFICATION_ERROR_NONE || system_setting == NULL) {
+ err = notification_setting_get_setting_by_package_name(pkg_name, &setting);
+ if (err != NOTIFICATION_ERROR_NONE || setting == NULL) {
NOTISET_ERR("notification_setting_get_setting_by_package_name [%d]\n", err);
goto out;
}
- notification_setting_set_allow_to_notify(system_setting, state);
+ notification_setting_set_allow_to_notify(setting, state);
NOTISET_DBG("notification_setting_set_allow_to_notify [%d]\n", state);
- err = notification_setting_update_setting(system_setting);
- if (err != NOTIFICATION_ERROR_NONE) {
+ err = notification_setting_update_setting(setting);
+ if (err != NOTIFICATION_ERROR_NONE) {
NOTISET_ERR("notification_setting_update_setting [%d]\n", err);
goto out;
}
- if (system_setting)
- notification_system_setting_free_system_setting(system_setting);
+ if (setting)
+ notification_setting_free_notification(setting);
return true;
out:
- if (system_setting)
- notification_system_setting_free_system_setting(system_setting);
-
+ if (setting)
+ notification_setting_free_notification(setting);
return false;
}
int err = NOTIFICATION_ERROR_NONE;
- notification_system_setting_h system_setting = NULL;
+ notification_setting_h setting = NULL;
- err = notification_setting_get_setting_by_package_name(pkg_name, &system_setting);
- if (err != NOTIFICATION_ERROR_NONE || system_setting == NULL) {
+ err = notification_setting_get_setting_by_package_name(pkg_name, &setting);
+ if (err != NOTIFICATION_ERROR_NONE || setting == NULL) {
NOTISET_ERR("notification_setting_get_setting_by_package_name [%d]\n", err);
goto out;
}
- notification_setting_set_do_not_disturb_except(system_setting, state);
+ notification_setting_set_do_not_disturb_except(setting, state);
NOTISET_DBG("notification_setting_set_do_not_disturb_except [%s] [%d]\n", pkg_name, state);
- err = notification_setting_update_setting(system_setting);
+ err = notification_setting_update_setting(setting);
if (err != NOTIFICATION_ERROR_NONE) {
NOTISET_ERR("notification_setting_update_setting err[%d]\n", err);
}
- if (system_setting)
- notification_system_setting_free_system_setting(system_setting);
+ if (setting)
+ notification_setting_free_notification(setting);
return true;
out:
- if (system_setting)
- notification_system_setting_free_system_setting(system_setting);
+ if (setting)
+ notification_setting_free_notification(setting);
return false;