From caa6094c4e0b358454238f9406a5d562c5b6193d Mon Sep 17 00:00:00 2001 From: "bhutani.92" Date: Tue, 17 Jan 2017 16:46:48 +0530 Subject: [PATCH] MVC Code changes [Removed Unused Headers] Change-Id: Ib43cc6181b46664f5ec32ab03e935d7b41668617 Signed-off-by: bhutani.92 --- music-chooser/src/music-chooser.c | 2 - project_def.prop | 2 +- src/setting/CMakeLists.txt | 2 - src/setting/src/include/ms-auto-off.h | 25 -- src/setting/src/include/ms-effect-view.h | 41 ---- src/setting/src/include/ms-eq-view.h | 30 --- src/setting/src/include/ms-key-ctrl.h | 2 +- src/setting/src/include/ms-play-speed.h | 28 --- src/setting/src/include/ms-playlist.h | 1 - src/setting/src/include/ms-util.h | 60 ----- src/setting/src/ms-auto-off.c | 281 ----------------------- src/setting/src/ms-key-ctrl.c | 1 - src/setting/src/ms-play-speed.c | 23 -- src/setting/src/ms-playlist.c | 1 - src/setting/src/ms-util.c | 87 ------- src/view/mp-player-view.c | 1 - src/view/mp-setting-view.c | 5 - 17 files changed, 2 insertions(+), 590 deletions(-) delete mode 100644 src/setting/src/include/ms-auto-off.h delete mode 100644 src/setting/src/include/ms-effect-view.h delete mode 100644 src/setting/src/include/ms-eq-view.h delete mode 100644 src/setting/src/include/ms-play-speed.h delete mode 100644 src/setting/src/include/ms-util.h delete mode 100644 src/setting/src/ms-auto-off.c delete mode 100644 src/setting/src/ms-play-speed.c delete mode 100644 src/setting/src/ms-util.c diff --git a/music-chooser/src/music-chooser.c b/music-chooser/src/music-chooser.c index 9841c8e..f0205f8 100644 --- a/music-chooser/src/music-chooser.c +++ b/music-chooser/src/music-chooser.c @@ -29,8 +29,6 @@ #include "mp-media-info.h" #include "mc-list-play.h" -extern Evas_Object *mc_tabbar; - #define MC_SELECT_URI_KEY "select_uri" #define THEME_NAME "mp-custom-winset-style.edj" diff --git a/project_def.prop b/project_def.prop index 904304b..13dc21a 100644 --- a/project_def.prop +++ b/project_def.prop @@ -9,7 +9,7 @@ type = app profile = mobile-3.0 # C Sources -USER_SRCS = src/widget/mp-now-playing.c src/widget/mp-index.c src/view/mp-edit-view.c src/view/mp-genre-detail-view.c src/widget/mp-artist-detail-list.c src/setting/src/ms-playlist.c src/widget/mp-track-list.c src/core/mp-file-tag-info.c src/widget/mp-player-volume-widget.c src/widget/mp-notification.c src/view/mp-add-track-view.c src/core/mp-lyric-mgr.c src/common/mp-media-info.c src/widget/mp-genre-list.c src/common/mp-ta.c src/view/mp-create-playlist-view.c src/view/mp-all-view.c src/common/mp-util.c src/common/mp-edit-callback.c src/view/mp-player-view.c src/common/mp-file-util.c src/widget/mp-album-detail-list.c src/widget/mp-ctxpopup.c src/common/mp-menu.c src/core/mp-view-mgr.c src/core/mp-player-mgr.c src/common/mp-app.c src/widget/mp-album-list.c src/widget/mp-artist-list.c src/view/mp-search-view.c src/mp-main.c src/view/mp-album-detail-view.c src/widget/mp-lyric.c src/view/mp-list-view.c src/setting/src/ms-util.c src/view/mp-now-playing-list-view.c src/common/mp-widget.c src/view/mp-artist-detail-view.c src/widget/mp-lockscreenmini.c src/view/mp-playlist-detail-view.c src/view/mp-select-track-view.c src/widget/mp-smart-event-box.c src/common/mp-ug-launch.c src/common/mp-common.c src/widget/mp-search.c src/view/mp-set-as-view.c src/setting/src/ms-key-ctrl.c src/view/mp-setting-view.c src/widget/mp-popup.c src/core/mp-setting-ctrl.c src/core/mp-playlist-mgr.c src/view/mp-detail-view.c src/widget/mp-now-playing-list.c src/core/mp-volume.c src/setting/src/ms-auto-off.c src/setting/src/ms-play-speed.c src/view/mp-view.c src/widget/mp-edit-playlist.c src/widget/mp-list.c src/core/mp-language-mgr.c src/core/mp-player-control.c src/common/mp-item.c src/widget/mp-playlist-list.c src/widget/mp-minicontroller.c src/common/mp-play.c src/widget/mp-search-list.c +USER_SRCS = src/widget/mp-now-playing.c src/widget/mp-index.c src/view/mp-edit-view.c src/view/mp-genre-detail-view.c src/widget/mp-artist-detail-list.c src/setting/src/ms-playlist.c src/widget/mp-track-list.c src/core/mp-file-tag-info.c src/widget/mp-player-volume-widget.c src/widget/mp-notification.c src/view/mp-add-track-view.c src/core/mp-lyric-mgr.c src/common/mp-media-info.c src/widget/mp-genre-list.c src/common/mp-ta.c src/view/mp-create-playlist-view.c src/view/mp-all-view.c src/common/mp-util.c src/common/mp-edit-callback.c src/view/mp-player-view.c src/common/mp-file-util.c src/widget/mp-album-detail-list.c src/widget/mp-ctxpopup.c src/common/mp-menu.c src/core/mp-view-mgr.c src/core/mp-player-mgr.c src/common/mp-app.c src/widget/mp-album-list.c src/widget/mp-artist-list.c src/view/mp-search-view.c src/mp-main.c src/view/mp-album-detail-view.c src/widget/mp-lyric.c src/view/mp-list-view.c src/view/mp-now-playing-list-view.c src/common/mp-widget.c src/view/mp-artist-detail-view.c src/widget/mp-lockscreenmini.c src/view/mp-playlist-detail-view.c src/view/mp-select-track-view.c src/widget/mp-smart-event-box.c src/common/mp-ug-launch.c src/common/mp-common.c src/widget/mp-search.c src/view/mp-set-as-view.c src/setting/src/ms-key-ctrl.c src/view/mp-setting-view.c src/widget/mp-popup.c src/core/mp-setting-ctrl.c src/core/mp-playlist-mgr.c src/view/mp-detail-view.c src/widget/mp-now-playing-list.c src/core/mp-volume.c src/view/mp-view.c src/widget/mp-edit-playlist.c src/widget/mp-list.c src/core/mp-language-mgr.c src/core/mp-player-control.c src/common/mp-item.c src/widget/mp-playlist-list.c src/widget/mp-minicontroller.c src/common/mp-play.c src/widget/mp-search-list.c # EDC Sources USER_EDCS = diff --git a/src/setting/CMakeLists.txt b/src/setting/CMakeLists.txt index a28403d..21c24d1 100644 --- a/src/setting/CMakeLists.txt +++ b/src/setting/CMakeLists.txt @@ -6,9 +6,7 @@ SET(LIBDIR "\${prefix}/lib") SET(SRCS src/ms-key-ctrl.c - src/ms-util.c src/ms-playlist.c - src/ms-auto-off.c ) INCLUDE_DIRECTORIES( diff --git a/src/setting/src/include/ms-auto-off.h b/src/setting/src/include/ms-auto-off.h deleted file mode 100644 index 056bb72..0000000 --- a/src/setting/src/include/ms-auto-off.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2015 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. - */ - - -#ifndef __ms_auto_off_H__ -#define __ms_auto_off_H__ -#include -#include "ms-util.h" - -EXPORT_API void ms_auto_off_list_create(Elm_Object_Item * parent_item); - -#endif //__ms_effect_view_H__ diff --git a/src/setting/src/include/ms-effect-view.h b/src/setting/src/include/ms-effect-view.h deleted file mode 100644 index 0e2c0d8..0000000 --- a/src/setting/src/include/ms-effect-view.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2015 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. - */ - -#ifndef __ms_effect_view_H__ -#define __ms_effect_view_H__ -#include -#include "ms-util.h" -#include "mp-setting-view.h" - -typedef struct { - - Elm_Object_Item *selected_item; - Evas_Object *layout; - -} MsEffectView_t; - -EXPORT_API Evas_Object *ms_effect_view_create(Evas_Object * parent, - MpSettingView_t * view, - Elm_Object_Item * - parent_item); -EXPORT_API void ms_effect_view_update_option(MpSettingView_t * view); -EXPORT_API void ms_effect_view_cancel_btn_cb(void *data, Evas_Object * obj, - void *event_info); -EXPORT_API void ms_effect_view_save_btn_cb(void *data, Evas_Object * obj, - void *event_info); -EXPORT_API void ms_auto_check_refresh(MpSettingView_t * view); -EXPORT_API void ms_effect_view_refresh(MpSettingView_t * data); -#endif //__ms_effect_view_H__ diff --git a/src/setting/src/include/ms-eq-view.h b/src/setting/src/include/ms-eq-view.h deleted file mode 100644 index 8ad6798..0000000 --- a/src/setting/src/include/ms-eq-view.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2015 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. - */ - - -#ifndef __ms_eq_view_H__ -#define __ms_eq_view_H__ -#include -#include "ms-util.h" -#include "mp-widget.h" - -EXPORT_API void ms_eq_view_extended_layout_check_earjack(void *data); -EXPORT_API void _mp_eq_view_reset_btn_cb(void *data, Evas_Object * obj, - void *event_info); -EXPORT_API Ecore_Idler *ms_eq_view_get_idler(void); - - -#endif //__ms_eq_view_H__ diff --git a/src/setting/src/include/ms-key-ctrl.h b/src/setting/src/include/ms-key-ctrl.h index de44c25..b333b5e 100644 --- a/src/setting/src/include/ms-key-ctrl.h +++ b/src/setting/src/include/ms-key-ctrl.h @@ -19,7 +19,7 @@ #define __ms_key_ctrl_H__ #include "mp-vconf-private-keys.h" -#include "ms-util.h" +#include "mp-util.h" enum { MS_MENU_ALBUMS = 0, diff --git a/src/setting/src/include/ms-play-speed.h b/src/setting/src/include/ms-play-speed.h deleted file mode 100644 index 55056ae..0000000 --- a/src/setting/src/include/ms-play-speed.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2015 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. - */ - -#ifndef __MS_PLAY_SPEED_H__ -#define __MS_PLAY_SPEED_H__ - -#include -#include "ms-util.h" - -typedef enum { - MS_PLAY_SPEED_PLUS, - MS_PLAY_SPEED_MINUS, -} MsSpeedOption_e; - -#endif diff --git a/src/setting/src/include/ms-playlist.h b/src/setting/src/include/ms-playlist.h index 330652f..b01f4e9 100644 --- a/src/setting/src/include/ms-playlist.h +++ b/src/setting/src/include/ms-playlist.h @@ -18,7 +18,6 @@ #define __MS_PLAYLIST_H__ #include -#include "ms-util.h" #include "mp-setting-view.h" diff --git a/src/setting/src/include/ms-util.h b/src/setting/src/include/ms-util.h deleted file mode 100644 index 2d64912..0000000 --- a/src/setting/src/include/ms-util.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2015 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. - */ - - -#ifndef __ms_utils_H__ -#define __ms_utils_H__ -#include -#include -#include "mp-player-debug.h" -#include "mp-util.h" - -#ifndef EXPORT_API -#define EXPORT_API __attribute__((__visibility__("default"))) -#endif - -#ifndef DOMAIN_NAME -#define DOMAIN_NAME "music-player" -#endif - -#ifndef GET_SYS_STR -#define GET_SYS_STR(str) dgettext(DOMAIN_NAME, str) -#endif - - -Eina_Bool ms_util_is_earjack_connected(void); -bool ms_util_is_sound_device_connected(void); -void ms_util_domain_translatable_part_text_set(Evas_Object * obj, - const char *part, - const char *text); -void ms_util_object_item_translate_set(Elm_Object_Item * item, - const char *ID); -void ms_util_domain_translatable_text_set(Evas_Object * obj, - const char *text); -Evas_Object *ms_screen_reader_set_sub_obj_info_full(Evas_Object * parent, - Evas_Object * obj, - const char *part, - const char *info, - const char *type, - const char *context, - Elm_Access_Activate_Cb - activate_callback, - void *activate_data, - Elm_Access_Info_Cb - info_callback, - void *info_data); - -#endif //__ms_utils_H__ diff --git a/src/setting/src/ms-auto-off.c b/src/setting/src/ms-auto-off.c deleted file mode 100644 index 642f5d5..0000000 --- a/src/setting/src/ms-auto-off.c +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright (c) 2015 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 -#include "ms-effect-view.h" -#include "ms-key-ctrl.h" -#include "ms-util.h" -#include "ms-eq-view.h" -#include - -int _g_auto_off_time[KEY_MUSIC_AUTO_OFF_TIME_MAX] = { - 0, - 15, - 30, - 60, - 90, - 120, - -1, -}; - -static Evas_Object *g_radio_grp; -static Elm_Object_Item *g_auto_off_gl_it; -static int g_hour, g_min; - -static void -_ms_auto_off_radio_del_cb(void *data, Evas * evas, Evas_Object * obj, - void *event_info) -{ - DEBUG_TRACE("radio group delected"); - g_radio_grp = NULL; - return; -} - -static void -_ms_auto_off_radio_change_cb(void *data, Evas_Object * obj, - void *event_info) -{ - DEBUG_TRACE(""); - mp_retm_if(!g_radio_grp, "radio group is null"); - - int type = elm_radio_value_get(g_radio_grp); - DEBUG_TRACE("selected radio val : %d type, %d min", type, - _g_auto_off_time[type]); - - ms_key_set_auto_off_val(type); - - if (type == KEY_MUSIC_AUTO_OFF_TIME_CUSTOM) { - ms_key_set_auto_off_time(60 * g_hour + g_min); - } else { - ms_key_set_auto_off_time(_g_auto_off_time[type]); - } - - if (g_auto_off_gl_it) { - elm_genlist_item_update(g_auto_off_gl_it); - } - - elm_genlist_item_selected_set(g_auto_off_gl_it, EINA_FALSE); - bool status = !elm_genlist_item_expanded_get(g_auto_off_gl_it); - elm_genlist_item_expanded_set(g_auto_off_gl_it, status); - elm_genlist_item_subitems_clear(g_auto_off_gl_it); - elm_genlist_realized_items_update(obj); -} - -static char *_ms_auto_off_gl_label_get(void *data, Evas_Object * obj, - const char *part) -{ - int param = (int) data; - - char *txt = ms_key_get_auto_off_time_text(param); - return (txt) ? strdup(txt) : NULL; -} - -static inline void _picker_back_cb(void *data, Evas_Object * obj, - const char *emission, - const char *source) -{ - elm_object_signal_emit(data, "picker,hide", ""); -} - -static void _ms_auto_off_customize_edit_start_cb(void *data, - Evas_Object * obj, - void *event_info) -{ - Evas_Object *genlist = (Evas_Object *) data; - MP_CHECK(genlist); - eext_object_event_callback_add(genlist, EEXT_CALLBACK_BACK, - (Eext_Event_Cb) _picker_back_cb, obj); - evas_object_data_set(genlist, "customized_on", (void *) 1); -} - -static void _ms_auto_off_customize_edit_end_cb(void *data, - Evas_Object * obj, - void *event_info) -{ - Evas_Object *genlist = (Evas_Object *) data; - MP_CHECK(genlist); - eext_object_event_callback_del(genlist, EEXT_CALLBACK_BACK, - (Eext_Event_Cb) _picker_back_cb); - evas_object_data_set(genlist, "customized_on", (void *) 0); - - elm_genlist_item_selected_set(g_auto_off_gl_it, EINA_FALSE); - bool status = !elm_genlist_item_expanded_get(g_auto_off_gl_it); - elm_genlist_item_expanded_set(g_auto_off_gl_it, status); - elm_genlist_item_subitems_clear(g_auto_off_gl_it); - elm_genlist_realized_items_update(genlist); - endfunc; -} - -static void _set_clicked_cb(void *data, Evas_Object * obj, - void *event_info) -{ - DEBUG_TRACE("Set clicked"); - Evas_Object *genlist = (Evas_Object *) data; - struct tm time1; - - elm_datetime_value_get(obj, &time1); - DEBUG_TRACE("hour: %d, min: %d", time1.tm_hour, time1.tm_min); - - int min = time1.tm_hour * 60 + time1.tm_min; - ms_key_set_auto_off_custom_time(min); - - g_hour = time1.tm_hour; - g_min = time1.tm_min; - - if (60 * g_hour + g_min == 0) { - ms_key_set_auto_off_val(KEY_MUSIC_AUTO_OFF_TIME_OFF); - elm_radio_value_set(g_radio_grp, KEY_MUSIC_AUTO_OFF_TIME_OFF); - } else { - ms_key_set_auto_off_val(KEY_MUSIC_AUTO_OFF_TIME_CUSTOM); - elm_radio_value_set(g_radio_grp, KEY_MUSIC_AUTO_OFF_TIME_CUSTOM); - } - - ms_key_set_auto_off_time(60 * g_hour + g_min); - - if (g_auto_off_gl_it) { - elm_genlist_item_update(g_auto_off_gl_it); - } - - elm_genlist_realized_items_update(genlist); -} - -static Evas_Object *_ms_auto_off_gl_content_get(void *data, - Evas_Object * obj, - const char *part) -{ - int param = (int) data; - - mp_retvm_if(param >= KEY_MUSIC_AUTO_OFF_TIME_MAX, NULL, - "invalid param: %d", param); - - if (!g_strcmp0(part, "elm.icon") || !g_strcmp0(part, "elm.icon.1")) { - Evas_Object *radio_btn = elm_radio_add(obj); - evas_object_propagate_events_set(radio_btn, FALSE); - - elm_radio_state_value_set(radio_btn, param); - - elm_radio_group_add(radio_btn, g_radio_grp); - - int type = ms_key_get_auto_off_val(); - if (g_radio_grp) { - elm_radio_value_set(g_radio_grp, type); - } - - evas_object_smart_callback_add(radio_btn, "changed", - _ms_auto_off_radio_change_cb, NULL); - evas_object_show(radio_btn); - return radio_btn; - } - return NULL; -} - -static void -_ms_auto_off_gl_sel_cb(void *data, Evas_Object * obj, void *event_info) -{ - int param = (int) data; - DEBUG_TRACE("data: %d", param); - - Elm_Object_Item *item = (Elm_Object_Item *) event_info; - - elm_genlist_item_selected_set(item, EINA_FALSE); - - if (param != KEY_MUSIC_AUTO_OFF_TIME_CUSTOM) { - elm_radio_value_set(g_radio_grp, param); - evas_object_smart_callback_call(g_radio_grp, "changed", NULL); - } else { - Evas_Object *datetime = elm_datetime_add(obj); - if (datetime != NULL) { - elm_object_style_set(datetime, "pickerstyle"); - elm_datetime_format_set(datetime, "%H:%M"); - - struct tm time1; - memset(&time1, 0, sizeof(time1)); - time1.tm_year = 2; - time1.tm_mon = 1; - time1.tm_mday = 1; - - int min = ms_key_get_auto_off_custom_time(); - DEBUG_TRACE("min: %d", min); - time1.tm_hour = min / 60; - time1.tm_min = min % 60; - elm_datetime_value_set(datetime, &time1); - - //evas_object_smart_callback_add(datetime, "changed", _ms_auto_off_time_changed_cb, NULL); - evas_object_smart_callback_add(datetime, "picker,value,set", - _set_clicked_cb, obj); - evas_object_smart_callback_add(datetime, "edit,start", - _ms_auto_off_customize_edit_start_cb, - obj); - evas_object_smart_callback_add(datetime, "edit,end", - _ms_auto_off_customize_edit_end_cb, - obj); - elm_object_signal_emit(datetime, "timepicker,show", ""); - } - } - -} - -EXPORT_API void ms_auto_off_list_create(Elm_Object_Item * parent_item) -{ - mp_retm_if(parent_item == NULL, "parent_item is null"); - - Evas_Object *genlist = elm_object_item_widget_get(parent_item); - - g_auto_off_gl_it = parent_item; - - //elm_genlist_tree_effect_enabled_set(genlist, EINA_TRUE); - - g_radio_grp = elm_radio_add(genlist); - elm_radio_state_value_set(g_radio_grp, -1); - evas_object_smart_callback_add(g_radio_grp, "changed", - _ms_auto_off_radio_change_cb, NULL); - evas_object_event_callback_add(g_radio_grp, EVAS_CALLBACK_DEL, - _ms_auto_off_radio_del_cb, NULL); - evas_object_hide(g_radio_grp); - - static Elm_Genlist_Item_Class itc, custom_itc; - - itc.func.text_get = _ms_auto_off_gl_label_get; - itc.func.content_get = _ms_auto_off_gl_content_get; - itc.item_style = "dialogue/1text.1icon.3"; - itc.version = ELM_GENGRID_ITEM_CLASS_VERSION; - itc.refcount = 0; - itc.delete_me = EINA_FALSE; - - custom_itc.func.text_get = _ms_auto_off_gl_label_get; - custom_itc.func.content_get = _ms_auto_off_gl_content_get; - custom_itc.item_style = "dialogue/1text.1icon.3"; - custom_itc.version = ELM_GENGRID_ITEM_CLASS_VERSION; - custom_itc.refcount = 0; - custom_itc.delete_me = EINA_FALSE; - - int type = KEY_MUSIC_AUTO_OFF_TIME_OFF; - while (type < KEY_MUSIC_AUTO_OFF_TIME_CUSTOM) { - elm_genlist_item_append(genlist, &itc, (void *) type, parent_item, - ELM_GENLIST_ITEM_NONE, - _ms_auto_off_gl_sel_cb, (void *) type); - type++; - } - - //custom - Elm_Object_Item *item = - elm_genlist_item_append(genlist, &custom_itc, (void *) type, - parent_item, - ELM_GENLIST_ITEM_NONE, - _ms_auto_off_gl_sel_cb, (void *) type); - evas_object_data_set(genlist, "customized_item", (void *) item); -} diff --git a/src/setting/src/ms-key-ctrl.c b/src/setting/src/ms-key-ctrl.c index 7965bf2..4f09ed2 100644 --- a/src/setting/src/ms-key-ctrl.c +++ b/src/setting/src/ms-key-ctrl.c @@ -18,7 +18,6 @@ #include #include "ms-key-ctrl.h" -#include "ms-util.h" #include "mp-player-mgr.h" #ifndef EXPORT_API diff --git a/src/setting/src/ms-play-speed.c b/src/setting/src/ms-play-speed.c deleted file mode 100644 index 031d65a..0000000 --- a/src/setting/src/ms-play-speed.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2015 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 "ms-play-speed.h" -#include "ms-key-ctrl.h" -#include "ms-util.h" -#include "mp-widget.h" - -Elm_Object_Item *g_parent_it; -Evas_Object *g_layout; diff --git a/src/setting/src/ms-playlist.c b/src/setting/src/ms-playlist.c index 1acab35..da30e44 100644 --- a/src/setting/src/ms-playlist.c +++ b/src/setting/src/ms-playlist.c @@ -16,7 +16,6 @@ #include "ms-playlist.h" #include "ms-key-ctrl.h" -#include "ms-util.h" enum { MS_PLAYLIST_QUICK_LIST, diff --git a/src/setting/src/ms-util.c b/src/setting/src/ms-util.c deleted file mode 100644 index 47a8e8b..0000000 --- a/src/setting/src/ms-util.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2015 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 -#include "ms-util.h" -#include "mp-vconf-private-keys.h" -#include "mp-common.h" -#include "mp-widget.h" -#include - -Eina_Bool ms_util_is_earjack_connected(void) -{ - int ear_jack; - if (runtime_info_get_value_int - (RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, &ear_jack)) { - DEBUG_TRACE("Failed to get ear jack status"); - return FALSE; - } - - if (ear_jack == RUNTIME_INFO_AUDIO_JACK_STATUS_UNCONNECTED) { - return FALSE; - } else { - return TRUE; - } -} - -bool ms_util_is_sound_device_connected(void) -{ - //Replaced for _prod dependency - sound_device_list_h g_device_list = NULL; - sound_device_mask_e g_device_mask = SOUND_DEVICE_IO_DIRECTION_OUT_MASK; - WARN_TRACE("Enter sound_manager_get_active_device"); - int ret; - if (! - (ret = - sound_manager_get_current_device_list(g_device_mask, - &g_device_list))) { - return true; - } else { - return false; - } - //Replaced for _prod dependency end -} - -static inline const char *_ms_util_get_text_domain(const char *string_id) -{ - const char *domain = "music-player"; - - return domain; -} - -void ms_util_domain_translatable_part_text_set(Evas_Object * obj, - const char *part, - const char *text) -{ - const char *domain = _ms_util_get_text_domain(text); - elm_object_domain_translatable_part_text_set(obj, part, domain, text); -} - -void ms_util_domain_translatable_text_set(Evas_Object * obj, - const char *text) -{ - const char *domain = _ms_util_get_text_domain(text); - elm_object_domain_translatable_text_set(obj, domain, text); -} - -void ms_util_object_item_translate_set(Elm_Object_Item * item, - const char *ID) -{ - MP_CHECK(ID); - MP_CHECK(item); - const char *domain = _ms_util_get_text_domain(ID); - elm_object_item_domain_text_translatable_set(item, domain, EINA_TRUE); -} diff --git a/src/view/mp-player-view.c b/src/view/mp-player-view.c index 0253219..a578b06 100644 --- a/src/view/mp-player-view.c +++ b/src/view/mp-player-view.c @@ -42,7 +42,6 @@ #include #ifndef MP_SOUND_PLAYER #include "mp-now-playing-list-view.h" -#include "ms-effect-view.h" #include "mp-resource.h" #endif diff --git a/src/view/mp-setting-view.c b/src/view/mp-setting-view.c index 8995340..fdc9d61 100644 --- a/src/view/mp-setting-view.c +++ b/src/view/mp-setting-view.c @@ -15,17 +15,12 @@ */ #include "mp-setting-view.h" -#include "ms-eq-view.h" -#include "ms-effect-view.h" #include "music.h" -#include "ms-util.h" -#include "ms-auto-off.h" #include "mp-player-debug.h" #include "mp-player-mgr.h" #include "app_manager.h" #include "mp-popup.h" #include "mp-ctxpopup.h" -#include "ms-play-speed.h" #include "ms-playlist.h" #include "mp-util.h" #include "mp-list.h" -- 2.34.1