Fixed compiler warnings (TizenRefApp-5174) 12/53412/4
authorMykola Alieksieiev <m.alieksieie@samsung.com>
Fri, 4 Dec 2015 13:48:04 +0000 (15:48 +0200)
committerMykola Alieksieiev <m.alieksieie@samsung.com>
Fri, 4 Dec 2015 15:55:44 +0000 (17:55 +0200)
Change-Id: Ibfb2823d2f9ed8b10b497388433ca329b35b96b5
Signed-off-by: Mykola Alieksieiev <m.alieksieie@samsung.com>
ug-setting-notification-app-notifications-efl/src/app-notificatons-efl.c
ug-setting-notification-do-not-disturb-efl/inc/do-not-disturb-efl.h
ug-setting-notification-do-not-disturb-efl/src/do-not-disturb-efl.c
ug-setting-notification-do-not-disturb-efl/src/excepted-apps-efl.c
ug-setting-notification-efl/src/notification-setting-info.c

index e1ef7cf97fa1591b1fe55e18adb3587912bb6c37..6397bd8374f0688bdc0a6c862896a23f9a3f4d23 100755 (executable)
@@ -28,7 +28,6 @@
  * @{
  */
 
-ug_data *g_ug_data = NULL;
 
 static Eina_Bool _notifiacation_setting_main_pop_cb(void *data, Elm_Object_Item * it)
 {
@@ -71,10 +70,8 @@ static void _create_main_view(void *data)
        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);
@@ -82,8 +79,8 @@ static void _create_main_view(void *data)
        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);
 
 }
 
index d5dae01516286cd756fc0da9844dbe31dee30000..631ae790aa8d09880b33cdc97f51230dacb519d1 100755 (executable)
@@ -30,7 +30,6 @@
 #include "common-efl.h"
 
 
-ug_data* get_ug_data(_);
 
 
 
index 1e8b1861d9b0a9201037816f1bae85e483766e82..0426a9011ce3505913559cc517e031dd9fd199ae 100755 (executable)
  * @{
  */
 
-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)
@@ -99,8 +82,7 @@ static void _create_main_view(void *data)
        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);
@@ -108,8 +90,8 @@ static void _create_main_view(void *data)
        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);
@@ -124,8 +106,8 @@ static void _create_main_view(void *data)
        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);
 }
 
index 498b6697f7bd366ce72bb603eeff573f553f6f56..f7885594064fbe0b6ecc8c610eab854152888f93 100755 (executable)
@@ -23,6 +23,7 @@
 #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)
 {
index 5ca31c91f89c2d99360e6d760c526666d9c658e2..d8e12da34f4b469bfe59127c08de5b636614b721 100755 (executable)
@@ -34,7 +34,7 @@ void create_app_notification_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;
        item_info_s *item_info = NULL;
 
        remove_all_apps_list();
@@ -87,7 +87,7 @@ void create_do_not_disturb_application_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));
@@ -212,31 +212,30 @@ bool set_allow_to_nofity(char *pkg_name, bool state)
        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;
 
 }
@@ -247,29 +246,29 @@ bool set_excepted_apps(char *pkg_name, bool state)
 
        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;