From: seungho Date: Tue, 21 Aug 2012 13:22:12 +0000 (+0900) Subject: new release for RSA X-Git-Tag: 2.0_alpha~103 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92ff175c17b6875b96ef82de5096b6928f9c5df8;p=apps%2Fhome%2Fsettings.git new release for RSA --- diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100644 new mode 100755 index 7458207..5096b4a --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,14 +1,14 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(setting) - -SET(SETTING_PKG_NAME org.tizen.setting) -SET(PREFIX "/opt/apps/org.tizen.setting") +SET(SETTING_PKG_NAME com.samsung.setting) + +SET(PREFIX "/opt/apps/com.samsung.setting") SET(BINDIR "${PREFIX}/bin") SET(RESDIR "${PREFIX}/res") SET(DATADIR "${PREFIX}/data") SET(LOCALEDIR "${RESDIR}/locale") -SET(ICONDIR "${RESDIR}/icons/default/small") +SET(ICONDIR "/opt/share/icons/default/small") SET(EDJDIR "${RESDIR}/edje") SET(IMAGEDIR "${RESDIR}/images") @@ -25,9 +25,21 @@ SET(SETTING_PASSWORD setting-password) SET(SETTING_COMMON setting-common) SET(SETTING_NETWORK setting-network) SET(SETTING_ABOUT setting-about) +#SET(SETTING_VIEWTYPE setting-viewtype) +#SET(SETTING_MOTION setting-motion) +#SET(SETTING_ACCESSIBILITY setting-accessibility) +SET(SETTING_MENUSCREEN setting-menuscreen) +SET(SETTING_POWERSAVING setting-powersaving) +SET(SETTING_FONT setting-font) +SET(SETTING_STORAGE setting-storage) +SET(SETTING_FILEVIEW setting-fileview) +SET(SETTING_LIVEBOX setting-livebox) +SET(SETTING_SHORTCUT setting-shortcut) +SET(SETTING_DATAUSAGE setting-datausage) +#SET(SETTING_DRIVINGMODE setting-drivingmode) SET(SETTING_PROFILE_UG ug-setting-profile-efl) -SET(SETTING_CONNECTIVITY_UG ug-setting-connectivity-efl) +SET(SETTING_DEVELOPEROPTION_UG ug-setting-developeroption-efl) SET(SETTING_MEMORY_UG ug-setting-memory-efl) SET(SETTING_SECURITY_UG ug-setting-security-efl) SET(SETTING_DISPLAY_UG ug-setting-display-efl) @@ -36,8 +48,21 @@ SET(SETTING_PHONE_UG ug-setting-phone-efl) SET(SETTING_RESET_UG ug-setting-reset-efl) SET(SETTING_NETWORK_UG ug-setting-network-efl) SET(SETTING_ABOUT_UG ug-setting-about-efl) +SET(SETTING_FILEVIEW_UG ug-setting-fileview-efl) +SET(SETTING_LIVEBOX_UG ug-setting-livebox-efl) +SET(SETTING_SHORTCUT_UG ug-setting-shortcut-efl) SET(SETTING_PASSWORD_UG ug-setting-password-efl) +#SET(SETTING_VIEWTYPE_UG ug-setting-viewtype-efl) +#SET(SETTING_MOTION_UG ug-setting-motion-efl) +#SET(SETTING_ACCESSIBILITY_UG ug-setting-accessibility-efl) +SET(SETTING_MENUSCREEN_UG ug-setting-menuscreen-sel-efl) +SET(SETTING_POWERSAVING_UG ug-setting-powersaving-efl) +SET(SETTING_FONT_UG ug-setting-font-efl) +SET(SETTING_STORAGE_UG ug-setting-storage-efl) +SET(SETTING_DATAUSAGE_UG ug-setting-datausage-efl) +#SET(SETTING_DRIVINGMODE_UG ug-setting-drivingmode-efl) + SET(LIB_SETTING_COMMON setting-common) @@ -46,6 +71,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_STORAGE}) ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_PHONE}) ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_CONNECTIVITY}) ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_DISPLAY}) @@ -57,6 +83,16 @@ ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_SECURITY}) ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_TIME}) ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_ABOUT}) ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_PASSWORD}) +#ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_VIEWTYPE}) +#ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_MOTION}) +#ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_ACCESSIBILITY}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_MENUSCREEN}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_POWERSAVING}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_FONT}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_FILEVIEW}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_LIVEBOX}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_SHORTCUT}) +ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_DATAUSAGE}) +#ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_DRIVINGMODE}) ADD_SUBDIRECTORY(src) - diff --git a/LICENSE b/LICENSE index 7ccb5b5..9c13a9b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,75 +1,204 @@ -Flora License - -Version 1.0, May, 2012 - -http://www.tizenopensource.org/license - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -"Tizen Certified Platform" shall mean a software platform that complies with the standards set forth in the Compatibility Definition Document and passes the Compatibility Test Suite as defined from time to time by the Tizen Technical Steering Group and certified by the Tizen Association or its designated agent. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work solely as incorporated into a Tizen Certified Platform, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work solely as incorporated into a Tizen Certified Platform to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof pursuant to the copyright license above, in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - - 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and - - 2. You must cause any modified files to carry prominent notices stating that You changed the files; and - - 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - - 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Flora License to your work - -To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Flora License, Version 1.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.tizenopensource.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. +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. + diff --git a/org.tizen.setting.desktop.in b/com.samsung.setting.desktop.in similarity index 73% rename from org.tizen.setting.desktop.in rename to com.samsung.setting.desktop.in index e5a2dcf..035e478 100755 --- a/org.tizen.setting.desktop.in +++ b/com.samsung.setting.desktop.in @@ -7,16 +7,20 @@ Name[en_GB]=Settings Name[es_ES]=Ajustes Name[fr_FR]=Paramètres Name[it_IT]=Impostazioni +Name[ja_JP]=設定 Name[nl_NL]=Instellingen Name[pt_PT]=Definições Name[ru_RU]=Настройки Name[tk]=Ayarlar +Name[zh_CN]=設定 +Name[zh_HK]=設定 +Name[zh_TW]=設定 Type=Application Exec=${PREFIX}/bin/setting -Icon=org.tizen.setting.png -Comment=Setting application +Icon=com.samsung.setting.png +Comment=Beat Setting application NoDisplay=False -Version=0.9.0 +Version=0.9.5 X-TIZEN-TaskManage=True X-TIZEN-Multiple=False X-TIZEN-Removable=False diff --git a/com.samsung.setting.png b/com.samsung.setting.png new file mode 100755 index 0000000..6a92d15 Binary files /dev/null and b/com.samsung.setting.png differ diff --git a/com.samsung.setting.xml b/com.samsung.setting.xml new file mode 100644 index 0000000..1efbf7b --- /dev/null +++ b/com.samsung.setting.xml @@ -0,0 +1,36 @@ + + + + MyoungJune Park + Setting Application + + com.samsung.setting.png + + + + + + + + + + + + + + + + + + + ug-setting-font-efl.png + + + + + ug-setting-accessibility-efl.png + + + + + diff --git a/debian/changelog b/debian/changelog index 6194f68..43fb807 100755 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,7918 @@ +setting (0.1.88-67) unstable; urgency=low + + * removed menuscreen vconf 2 + + -- mjpark Tue, 21 Aug 2012 15:13:32 +0900 + +setting (0.1.88-66) precise; urgency=low + + * removed menuscreen vconf + + -- mjpark Tue, 21 Aug 2012 14:45:02 +0900 + +setting (0.1.88-65) unstable; urgency=low + + * release + + -- mjpark Sat, 18 Aug 2012 16:50:49 +0900 + +setting (0.1.88-64) precise; urgency=low + + * release + + -- mjpark Fri, 17 Aug 2012 18:04:32 +0900 + +setting (0.1.88-63) unstable; urgency=low + + * updated Tizen UI + + -- MyoungJune Park Fri, 17 Aug 2012 12:34:16 +0900 + +setting (0.1.88-62) unstable; urgency=low + + * removed mobileap-api dependency + + -- MyoungJune Park Thu, 16 Aug 2012 19:59:39 +0900 + +setting (0.1.88-61) unstable; urgency=low + + * remove mdm dependency 2 + + -- MyoungJune Park Wed, 15 Aug 2012 15:14:52 +0900 + +setting (0.1.88-60) unstable; urgency=low + + * release + + -- MyoungJune Park Tue, 14 Aug 2012 16:14:34 +0900 + +setting (0.1.88-59) unstable; urgency=low + + * enabled menu-screen, certificate, the driving mode + * bug fix on Network UG, Reset, Sound + * adjust maximum datetime value + * applied new STMS strings + + -- MyoungJune Park Mon, 13 Aug 2012 19:39:32 +0900 + +setting (0.1.88-58) unstable; urgency=low + + * added app-control + * fixed some B/S issue on Setting About + * adjust UI layout for guide texts + + -- MyoungJune Park Sat, 11 Aug 2012 17:10:17 +0900 + +setting (0.1.88-57) unstable; urgency=low + + * release setting.cfg in statical way + + -- MyoungJune Park Mon, 06 Aug 2012 14:26:55 +0900 + +setting (0.1.88-56) unstable; urgency=low + + * applied static icon path for Application group + * Fixed some tizendev/bugs issues + * added code to draw after checking UG existence + + -- MyoungJune Park Sat, 04 Aug 2012 19:37:21 +0900 + +setting (0.1.88-55) unstable; urgency=low + + * applied getting cityname, GMT string in dynamic, not hard-coded (fixed issues - S1-3837) + + -- MyoungJune Park Wed, 01 Aug 2012 17:14:03 +0900 + +setting (0.1.88-54) unstable; urgency=low + + * added Driving mode UG + * updated Motion UI + * added XML manifest code + * added Display > Screen mode + * bug fix on Developer options > Usb-debugging toggle when put the jack in, pull it out. + + -- MyoungJune Park Tue, 31 Jul 2012 19:38:55 +0900 + +setting (0.1.88-53) unstable; urgency=low + + * release + + -- hyejin kim Fri, 27 Jul 2012 14:01:44 +0900 + +setting (0.1.88-52) unstable; urgency=low + + * release + + -- hyejin kim Thu, 26 Jul 2012 19:28:36 +0900 + +setting (0.1.88-51) unstable; urgency=low + + * release + * fixed PLM issue + * added Allshare cast Icon + * removed parential mode + + -- MyoungJune Park Wed, 25 Jul 2012 18:20:56 +0900 + +setting (0.1.88-50) unstable; urgency=low + + * release + * [security] add seperator and popup patchset2. add one more popup. + + -- MyoungJune Park Mon, 23 Jul 2012 13:35:12 +0900 + +setting (0.1.88-49) unstable; urgency=low + + * fix P120718-5242 + * add Nearby device + + -- MyoungJune Park Sat, 21 Jul 2012 18:17:44 +0900 + +setting (0.1.88-48) unstable; urgency=low + + * fix P120718-5242 + * add Nearby device + + -- MyoungJune Park Sat, 21 Jul 2012 14:10:47 +0900 + +setting (0.1.88-47) unstable; urgency=low + + * fixed bug of ui gadget migration issues. + * temp solution for Date/Time lockup issue. + + -- MyoungJune Park Fri, 20 Jul 2012 12:12:45 +0900 + +setting (0.1.88-46) unstable; urgency=low + + * release + + -- hyejin kim Wed, 18 Jul 2012 19:53:15 +0900 + +setting (0.1.88-45) unstable; urgency=low + + * change ui-gadget to ui-gadget-1 + + -- hyejin kim Wed, 18 Jul 2012 19:08:07 +0900 + +setting (0.1.88-44) unstable; urgency=low + + * added Factory Reset code (complete). + + -- MyoungJune Park Tue, 17 Jul 2012 13:19:20 +0900 + +setting (0.1.88-43) unstable; urgency=low + + * fixed Sound ug Issue - in regarding with Volume app crash. + + -- MyoungJune Park Mon, 16 Jul 2012 14:19:14 +0900 + +setting (0.1.88-42) unstable; urgency=low + + * added new UI + + -- MyoungJune Park Wed, 11 Jul 2012 13:21:14 +0900 + +setting (0.1.88-41) unstable; urgency=low + + * fix syntax error in postinst + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-41 + + -- hyejin kim Mon, 04 Jun 2012 17:45:18 +0900 + +setting (0.1.88-40) unstable; urgency=low + + * fix syntax error in postinst + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-40 + + -- hyejin kim Mon, 04 Jun 2012 16:31:34 +0900 + +setting (0.1.88-39) unstable; urgency=low + + * change vconfkey name of lcd timeout + * removed the unused vconf key that is unregistered. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-39 + + -- hyejin kim Mon, 04 Jun 2012 15:12:46 +0900 + +setting (0.1.88-38) quantal; urgency=low + + * modified menu-screen to add password view on selecting cluster-home. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-38 + + -- myoungjune park Fri, 01 Jun 2012 11:22:19 +0900 + +setting (0.1.88-37) unstable; urgency=low + + * removed the app termination code on language change + * modified the app icon path + * removed unused code of font change with X attributes + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-37 + + -- MyoungJune Park Thu, 31 May 2012 21:35:28 +0900 + +setting (0.1.88-36) unstable; urgency=low + + * release + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-36 + + -- Taeyoung Kim Wed, 30 May 2012 18:11:28 +0900 + +setting (0.1.88-35) unstable; urgency=low + + * Upload + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-35 + + -- Jing Yigang Mon, 28 May 2012 16:55:19 -0700 + +setting (0.1.88-34) unstable; urgency=low + + * Remove redefined vconf keys + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-34 + + -- Taeyoung Kim Fri, 25 May 2012 18:45:56 +0900 + +setting (0.1.88-32) unstable; urgency=low + + * Upload + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-32 + + -- Yin Kairong Thu, 24 May 2012 03:36:19 -0700 + +setting (0.1.88-31) unstable; urgency=low + + * change automatic brightness key + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-31 + + -- hyejin kim Wed, 23 May 2012 19:27:08 +0900 + +setting (0.1.88-30) unstable; urgency=low + + * release + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-30 + + -- MyoungJune Park Tue, 22 May 2012 21:44:35 +0900 + +setting (0.1.88-28) unstable; urgency=low + + * applied drm-client, drm-trusted, in place of drm-server. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-28 + + -- MyoungJune Park Tue, 22 May 2012 20:07:20 +0900 + +setting (0.1.88-27) unstable; urgency=low + + * enabled Wi-Fi Direct + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-27 + + -- MyoungJune Park Mon, 21 May 2012 20:41:50 +0900 + +setting (0.1.88-26) unstable; urgency=low + + * enabled Diagnostics and Usage in Setting About. + * enabled Setting > Font + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-26 + + -- MyoungJune Park Mon, 21 May 2012 19:37:17 +0900 + +setting (0.1.88-25) unstable; urgency=low + + * Fix Developer option in setting.cfg + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-25 + + -- Taeyoung Kim Mon, 21 May 2012 15:56:55 +0900 + +setting (0.1.88-24) unstable; urgency=low + + * Fix menu title error of Developer option + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-24 + + -- Taeyoung Kim Mon, 21 May 2012 13:46:34 +0900 + +setting (0.1.88-23) unstable; urgency=low + + * fixed the bugs for menutree tests. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-23 + + -- MyoungJune Park Mon, 21 May 2012 11:53:52 +0900 + +setting (0.1.88-22) unstable; urgency=low + + * updated postinst file, as vconf key string for Backlighttime changed. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-22 + + -- MyoungJune Park Fri, 18 May 2012 20:48:41 +0900 + +setting (0.1.88-21) unstable; urgency=low + + * Upload pkg.. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-21 + + -- Yin Kairong Fri, 18 May 2012 02:39:15 -0700 + +setting (0.1.88-20) unstable; urgency=low + + * remove TVOUT related keys + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-20 + + -- hyejin kim Thu, 17 May 2012 19:10:14 +0900 + +setting (0.1.88-19) unstable; urgency=low + + * Repackage. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-19 + + -- Yin Kairong Wed, 16 May 2012 05:49:06 -0700 + +setting (0.1.88-18) unstable; urgency=low + + * Upload pkg to apply new changes. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-18 + + -- Yin Kairong Wed, 16 May 2012 03:32:19 -0700 + +setting (0.1.88-17) unstable; urgency=low + + * support mdm + * fix nfc related issue + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-17 + + -- hyejin kim Wed, 16 May 2012 10:57:21 +0900 + +setting (0.1.88-16) unstable; urgency=low + + * rolled back the previous change, because of uploading media-data pkgs that has proper changes + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-16 + + -- MyoungJune Park Mon, 14 May 2012 10:31:51 +0900 + +setting (0.1.88-15) unstable; urgency=low + + * release + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-15 + + -- MyoungJune Park Mon, 14 May 2012 09:22:32 +0900 + +setting (0.1.88-13) unstable; urgency=low + + * fixed bug on auto-rotation screen menu, toggling the state which is not matched with other modules (quick panel, indicator) + * Implemented the 'Powersaving' menu according to Power saving UI V0.4 + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-13 + + -- MyoungJune Park Thu, 10 May 2012 17:17:37 +0900 + +setting (0.1.88-12) unstable; urgency=low + + * release + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-12 + + -- hyejin kim Fri, 04 May 2012 14:02:21 +0900 + +setting (0.1.88-11) unstable; urgency=low + + * remove unused vconfkey + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-11 + + -- hyejin kim Fri, 04 May 2012 11:08:20 +0900 + +setting (0.1.88-10) unstable; urgency=low + + * support setupwizard in language display view + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-10 + + -- hyejin kim Wed, 02 May 2012 17:51:20 +0900 + +setting (0.1.88-9) unstable; urgency=low + + * Change a term, rotation lock to auto-rotate screen + * Fix tizenbug : N_SE-646 + * Change event notification view + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-9 + + -- Taeyoung Kim Fri, 27 Apr 2012 17:23:56 +0900 + +setting (0.1.88-8) unstable; urgency=low + + * Change main view (support All, Requent menu option) + * Add Font menu + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-8 + + -- Taesoo Jun Sat, 21 Apr 2012 18:09:13 +0900 + +setting (0.1.88-7) unstable; urgency=low + + * Support languages of 40 countries + * Move heynoti publish to alarm-manager + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-7 + + -- Taeyoung Kim Thu, 19 Apr 2012 19:07:21 +0900 + +setting (0.1.88-6) unstable; urgency=low + + * Remove the usage of theme 'layout/application/searchbar' + * [wallpaper] remove build warnings + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-6 + + -- Taeyoung Kim Wed, 18 Apr 2012 11:57:43 +0900 + +setting (0.1.88-5) unstable; urgency=low + + * Remove unused vconf key + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-5 + + -- Taeyoung Kim Thu, 12 Apr 2012 17:32:17 +0900 + +setting (0.1.88-4) unstable; urgency=low + + * Remove definition of vconfkeys in a local header, they already exist in vconf-keys.h + * Fix codes when SDcard policy of MDM is restricted + * Fix a time problem in which time is not changed when time is changed manually and time difference is within one minute + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-4 + + -- Taeyoung Kim Mon, 09 Apr 2012 21:16:11 +0900 + +setting (0.1.88-3) unstable; urgency=low + + * upload pkg + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-3 + + -- hyejin kim Fri, 30 Mar 2012 15:32:48 +0900 + +setting (0.1.88-2) unstable; urgency=low + + * Upload pkg + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-2 + + -- Yin Kairong Thu, 29 Mar 2012 02:35:42 -0700 + +setting (0.1.88-1) unstable; urgency=low + + * Upload pkg to apply new changes + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.88-1 + + -- Yin Kairong Wed, 28 Mar 2012 05:35:07 -0700 + +setting (0.1.87-99) unstable; urgency=low + + * Upload pkg to fix password BS issue + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-99 + + -- Yin Kairong Thu, 22 Mar 2012 00:56:07 -0700 + +setting (0.1.87-98) unstable; urgency=low + + * Enable display bluetooth address in about phone + * Fix deprecated APIs of elm_web + * Process guidetext of entry unifiedly + * Change param of elm_win_indicator + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-98 + + -- Taeyoung Kim Wed, 21 Mar 2012 15:50:36 +0900 + +setting (0.1.87-97) unstable; urgency=low + + * aul_open_content() is replaced by appsvc APIs + * [About] fix unexpacted char of wifi address + * Fix to show sub items of security ug + * Fix to calculate timezone + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-97 + + -- Taeyoung Kim Mon, 19 Mar 2012 19:27:44 +0900 + +setting (0.1.87-96) unstable; urgency=low + + * SLP prefix in desktop file is changed to TIZEN + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-96 + + -- Taeyoung Kim Fri, 16 Mar 2012 14:33:31 +0900 + +setting (0.1.87-95) unstable; urgency=low + + * Upload pkg. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-95 + + -- Yin Kairong Wed, 14 Mar 2012 23:18:30 -0700 + +setting (0.1.87-94) unstable; urgency=low + + * Apply EFL 1.0 migration + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-94 + + -- Yin Kairong Wed, 14 Mar 2012 07:07:26 -0700 + +setting (0.1.87-93) unstable; urgency=low + + * spec file is updated to build using OBS + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-93 + + -- Taeyoung Kim Tue, 13 Mar 2012 09:48:07 +0900 + +setting (0.1.87-92) unstable; urgency=low + + * retrieve menuscreen item + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-92 + + -- hyejin kim Sun, 11 Mar 2012 15:24:46 +0900 + +setting (0.1.87-91) unstable; urgency=low + + * support FOTA + * fix BOT-750 in JIRA : lock up when came back from network ug + * fix issue of device name requested by Mr.Shin + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-91 + + -- hyejin Kim Sun, 11 Mar 2012 09:38:41 +0900 + +setting (0.1.87-90) unstable; urgency=low + + * Fix STMS issues + * Support MDM enforce_password function + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-90 + + -- hyejin kim Tue, 06 Mar 2012 14:24:18 +0900 + +setting (0.1.87-89) unstable; urgency=low + + * Fix the miss-typing for the FM_Radio icon + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-89 + + -- Taeyoung Kim Fri, 02 Mar 2012 13:23:04 +0900 + +setting (0.1.87-88) unstable; urgency=low + + * Change elm_editfield* and elm_searchbar* APIs + * Fix NFC icon path and text + * Apply multi-national language of IDS_ST_BODY_REGIONAL_EXAMPLE + * Multilanguage of USB utilities help window is applied + * With [Use tilt]&[Use panning] [off], [sensitivity setting] group gets disable + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-88 + + -- Taeyoung Kim Fri, 02 Mar 2012 09:57:06 +0900 + +setting (0.1.87-87) unstable; urgency=low + + * Fix bluetooth API + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-87 + + -- Taesoo Jun Mon, 27 Feb 2012 17:59:48 +0900 + +setting (0.1.87-86) unstable; urgency=low + + * [Temp] Walk around the crash due to bluetooth_get_local_address() + * Check the popup text for [Learn about pick up] in Motions menu + * Change the default value for all the kinds of Motions + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-86 + + -- Taeyoung Kim Mon, 27 Feb 2012 17:12:16 +0900 + +setting (0.1.87-85) unstable; urgency=low + + * Multilanguage is supported when changing Timezone + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-85 + + -- Taeyoung Kim Fri, 24 Feb 2012 13:25:26 +0900 + +setting (0.1.87-84) unstable; urgency=low + + * remove "Menu Screen" item + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-84 + + -- hyejin kim Thu, 23 Feb 2012 10:25:10 +0900 + +setting (0.1.87-83) unstable; urgency=low + + * Fixing unchanged time problem when changing timezone manually + * The callback function for double tap(motion sensor) is blocked + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-83 + + -- Taeyoung Kim Mon, 20 Feb 2012 17:21:13 +0900 + +setting (0.1.87-82) unstable; urgency=low + + * Add missed changes for EFL-migration + * Add Allshare menu + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-82 + + -- hyejin kim Thu, 16 Feb 2012 14:35:40 +0900 + +setting (0.1.87-81) unstable; urgency=low + + * Apply EFL migration + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-81 + + -- Taeyoung Kim Thu, 16 Feb 2012 11:06:37 +0900 + +setting (0.1.87-80) unstable; urgency=low + + * Revive menuscreen item + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-80 + + -- Taeyoung Kim Wed, 15 Feb 2012 21:28:40 +0900 + +setting (0.1.87-79) unstable; urgency=low + + * Hide power-saving menu + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-79 + + -- Taesoo Jun Thu, 09 Feb 2012 11:23:56 +0900 + +setting (0.1.87-78) unstable; urgency=low + + * hide menu-screen menu temporarily for Orange binary + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-78 + + -- Taesoo Jun Wed, 08 Feb 2012 10:55:27 +0900 + +setting (0.1.87-77) unstable; urgency=low + + * Add NFC setting + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-77 + + -- Taesoo Jun Mon, 06 Feb 2012 19:54:38 +0900 + setting (0.1.87-76) unstable; urgency=low - * Modify SW version and mode - * Remove Security menu - * Fix that setting stops unexpectedly - * Git: pkgs/s/settings - * Tag: setting_0.1.87-76 + * Default value of data roaming is 'on' + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-76 + + -- Taeyoung Kim Fri, 03 Feb 2012 21:03:36 +0900 + +setting (0.1.87-75) unstable; urgency=low + + * Fix S1-1046 and so on. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-75 + + -- hyejin Kim Thu, 02 Feb 2012 23:27:32 +0900 + +setting (0.1.87-74) unstable; urgency=low + + * Release 0.1.87-74: MDM applied to network/password/memory/usb, JIRA issues(key grab during a reset) + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-74 + + -- Taesoo Jun Mon, 30 Jan 2012 22:17:04 +0900 + +setting (0.1.87-73) unstable; urgency=low + + * set the default menu-screen as the normal menu-screen, requested by HG Shin + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-73 + + -- Taesoo Jun Thu, 26 Jan 2012 14:53:58 +0900 + +setting (0.1.87-72) unstable; urgency=low + + * fixed menuscreen bug. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-72 + + -- MyoungJune Park Wed, 25 Jan 2012 11:23:38 +0900 + +setting (0.1.87-71) unstable; urgency=low + + * added STMS strings in Network & Main - 2 + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-71 + + -- MyoungJune Park Fri, 20 Jan 2012 16:56:47 +0900 + +setting (0.1.87-70) unstable; urgency=low + + * added STMS strings in Network & Main + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-70 + + -- MyoungJune Park Fri, 20 Jan 2012 15:04:02 +0900 + +setting (0.1.87-69) unstable; urgency=low + + * modified Wifi-Direct ug name + * fixed B/S issue on terminating app itself + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-69 + + -- MyoungJune Park Thu, 19 Jan 2012 19:42:58 +0900 + +setting (0.1.87-68) unstable; urgency=low + + * added STMS strings in Accessibility settings + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-68 + + -- MyoungJune Park Wed, 18 Jan 2012 11:00:19 +0900 + +setting (0.1.87-67) unstable; urgency=low + + * added Wifi-Direct + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-67 + + -- MyoungJune Park Tue, 17 Jan 2012 19:33:24 +0900 + +setting (0.1.87-66) unstable; urgency=low + + * applied new STMS strings + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-66 + + -- MyoungJune Park Tue, 17 Jan 2012 13:12:53 +0900 + +setting (0.1.87-65) unstable; urgency=low + + * enabled Motion setting and deploy setting.cfg at installation + * add dependency pkg + * [passwordUG] apply changes of security-server version up + * Fixed bug on language change in Setting > Brightness + * Apply 'Double tap' event on genlist in 'main view' 'More settings' view and 'Motions' views + * Fix S1-742 + * optimized slider_value_change_cb to speed up + * Fixed: S1-332 Reset description strings i18n issue + * enabled Menu screen again + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-65 + + -- MyoungJune Park Fri, 13 Jan 2012 17:08:08 +0900 + +setting (0.1.87-64) unstable; urgency=low + + * updated STMS strings - usb setting + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-64 + + -- MyoungJune Park Mon, 09 Jan 2012 19:52:51 +0900 + +setting (0.1.87-63) unstable; urgency=low + + * Add listening for 'Brightness' + * updated STMS strings for i18n + * applied security-server APIs + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-63 + + -- MyoungJune Park Mon, 09 Jan 2012 15:58:34 +0900 + +setting (0.1.87-62) unstable; urgency=low + + * FIXED: S1-383 [SDK][Language]While boot up in date screen option is displayed in code + * usb-setting : fixed STMS string issue + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-62 + + -- MyoungJune Park Sat, 07 Jan 2012 16:23:22 +0900 + +setting (0.1.87-61) unstable; urgency=low + + * Clean the unused code about 'UG animation' + * Add low battery process of 'Brightness' menu + * rename Mobile hotspot Ththering and portable hotspots + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-61 + + -- MyoungJune Park Fri, 06 Jan 2012 10:38:01 +0900 + +setting (0.1.87-60) unstable; urgency=low + + * removed Menu-screen as it's only for Demo + * fixed elm_datefield was invisible + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-60 + + -- MyoungJune Park Thu, 05 Jan 2012 13:51:44 +0900 + +setting (0.1.87-59) unstable; urgency=low + + * code clean (About, Accessibility) + * applied STMS string 'Reset all' + * added webview in Setting > About > License + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-59 + + -- MyoungJune Park Wed, 04 Jan 2012 17:05:11 +0900 + +setting (0.1.87-58) unstable; urgency=low + + * apply STMS texts for flight mode + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-58 + + -- Hyejin Kim Wed, 28 Dec 2011 17:48:14 +0900 + +setting (0.1.87-57) unstable; urgency=low + + * added Diagnostics & Info in About. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-57 + + -- MyoungJune Park Fri, 16 Dec 2011 14:20:48 +0900 + +setting (0.1.87-56) unstable; urgency=low + + * removed appcore_set_i18n. + * Git: slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-56 + + -- MyoungJune Park Mon, 12 Dec 2011 17:23:44 +0900 + +setting (0.1.87-55) unstable; urgency=low + + * applied is_slp_binary on master. + * [Sound ug] change system tone + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-55 + + -- MyoungJune Park Sat, 10 Dec 2011 16:33:07 +0900 + +setting (0.1.87-54) unstable; urgency=low + + * added vconf null checker. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-54 + + -- MyoungJune Park Thu, 08 Dec 2011 20:30:28 +0900 + +setting (0.1.87-53) unstable; urgency=low + + * revert after Tzen updates + * fixed branch code & master branch. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-53 + + -- MyoungJune Park Thu, 08 Dec 2011 14:14:15 +0900 + +setting (0.1.87-52) unstable; urgency=low + + * Mass storage is blocked in Emulator ( Fixed H0100137718(CQ) and SLP001-81(JIRA) ) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-52 + + -- Taeyoung Kim Wed, 07 Dec 2011 11:27:07 +0900 + +setting (0.1.87-51) unstable; urgency=low + + * Upload pkg to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-51 + + -- Yin Kairong Mon, 05 Dec 2011 12:06:26 -0800 + +setting (0.1.87-50) unstable; urgency=low + + * fixed : H0100137769, H0100137767. + * [SecurityUG] fix wrong function name. + * Callback, which is called when radio btn is selected, is deleted. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-50 + + -- MyoungJune Park Mon, 05 Dec 2011 18:08:35 +0900 + +setting (0.1.87-49) unstable; urgency=low + + * fixed : H0100137768 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-49 + + -- MyoungJune Park Sun, 04 Dec 2011 22:17:11 +0900 + +setting (0.1.87-48) unstable; urgency=low + + * updated boiler plates. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-48 + + -- MyoungJune Park Fri, 02 Dec 2011 18:14:36 +0900 + +setting (0.1.87-47) unstable; urgency=low + + * Upload package for these changes: + 1.Fix the BS issue caused by elm_genlist_clear + 2.Apply new 'Motion' UI + 3.Apply 'Power saving mode' with macro closed + 4.Apply new main view with macro SUPPORT_MORE_ITEM_FUNCTION + 5.Upload for EFL APIs depricated + 6.Use new API for mmc mount/unmount/format. + 7.Apply some multi-language supporting strings. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-47 + + -- Yin Kairong Fri, 02 Dec 2011 00:03:44 -0800 + +setting (0.1.87-46) unstable; urgency=low + + * bug fix on Reset operation : H0100137383 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-46 + + -- MyoungJune Park Fri, 02 Dec 2011 12:19:36 +0900 + +setting (0.1.87-45) unstable; urgency=low + + * roll back to original mmc mount/unmount code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-45 + + -- MyoungJune Park Thu, 01 Dec 2011 21:57:26 +0900 + +setting (0.1.87-44) unstable; urgency=low + + * applied new Connman library. 2 - due to build server issue. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-44 + + -- MyoungJune Park Tue, 29 Nov 2011 16:53:37 +0900 + +setting (0.1.87-43) unstable; urgency=low + + * applied new Connman library. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-43 + + -- MyoungJune Park Tue, 29 Nov 2011 13:50:41 +0900 + +setting (0.1.87-42) unstable; urgency=low + + * removed Facebook menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-42 + + -- MyoungJune Park Tue, 29 Nov 2011 12:59:10 +0900 + +setting (0.1.87-41) unstable; urgency=low + + * added new menuscreen UG. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-41 + + -- MyoungJune Park Tue, 29 Nov 2011 10:24:28 +0900 + +setting (0.1.87-40) unstable; urgency=low + + * bug fix when choosing language & region. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-40 + + -- MyoungJune Park Mon, 28 Nov 2011 16:01:38 +0900 + +setting (0.1.87-39) unstable; urgency=low + + * Delete Winset menu in SLP binary & I9200 binary. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-39 + + -- MyoungJune Park Mon, 28 Nov 2011 12:01:31 +0900 + +setting (0.1.87-38) unstable; urgency=low + + * Delete Winset menu in SLP binary + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-38 + + -- Taesoo Jun Sat, 26 Nov 2011 17:48:20 +0900 + +setting (0.1.87-37) unstable; urgency=low + + * Delete BT menu in SLP bin, Rollback flight mode UX scenario, Apply model name policy from HG Shin + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-37 + + -- Taesoo Jun Sat, 26 Nov 2011 17:04:36 +0900 + +setting (0.1.87-36) unstable; urgency=low + + * release. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-36 + + -- MyoungJune Park Fri, 25 Nov 2011 17:51:37 +0900 + +setting (0.1.87-35) unstable; urgency=low + + * updated popup-message ("Unspported function"), if ug is not loaded. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-35 + + -- MyoungJune Park Fri, 25 Nov 2011 11:30:33 +0900 + +setting (0.1.87-34) unstable; urgency=low + + * disabled Motion menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-34 + + -- MyoungJune Park Fri, 25 Nov 2011 10:25:25 +0900 + +setting (0.1.87-33) unstable; urgency=low + + * USB_NONE_MODE is added when USB cable is disconnected + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-33 + + -- Taeyoung Kim Thu, 24 Nov 2011 22:06:15 +0900 + +setting (0.1.87-32) unstable; urgency=low + + * release. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-32 + + -- MyoungJune Park Thu, 24 Nov 2011 20:38:32 +0900 + +setting (0.1.87-31) unstable; urgency=low + + * disabled Music player on SLP. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-31 + + -- MyoungJune Park Thu, 24 Nov 2011 20:26:18 +0900 +>>>>>>> efecc24059662b2cc87d0cf5813fd3ff5adb3d0e + +setting (0.1.87-30) unstable; urgency=low + + * disable Facebook, Twitter, Account, kies via wifi on SLP binary. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-30 + + -- MyoungJune Park Thu, 24 Nov 2011 18:31:12 +0900 + +setting (0.1.87-29) unstable; urgency=low + + * Upload pkg + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-29 + + -- Yin Kairong Thu, 24 Nov 2011 02:43:04 -0800 + +setting (0.1.87-28) unstable; urgency=low + + * disabled Menu screen. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-28 + + -- MyoungJune Park Thu, 24 Nov 2011 11:35:22 +0900 + +setting (0.1.87-27) unstable; urgency=low + + * enabled effect in Display setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-27 + + -- MyoungJune Park Thu, 24 Nov 2011 10:03:27 +0900 + +setting (0.1.87-26) unstable; urgency=low + + * fixed : H0100137336, H0100137322, H0100137326 :update code for genlist entry. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-26 + + -- MyoungJune Park Tue, 22 Nov 2011 22:07:48 +0900 + +setting (0.1.87-25) unstable; urgency=low + + * elm_naviframe_item_pop is used for view change. + * fixed : H0100137245 Manual brightness bar show automatic brightness level after reopening brightness; Display settings. + * Fix CQ, H0100137240,H0100137241,H0100137242: set word wrap mode in the label of popup. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-25 + + -- MyoungJune Park Tue, 22 Nov 2011 20:44:49 +0900 + +setting (0.1.87-24) unstable; urgency=low + + * Merge "fix CQ #H0100137170 : add to call elm_object_focus() on ug_start" + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-24 + + -- MyoungJune Park Mon, 21 Nov 2011 20:59:45 +0900 + +setting (0.1.87-23) unstable; urgency=low + + * release. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-23 + + -- Hyejin Kim Mon, 21 Nov 2011 17:52:39 +0900 + +setting (0.1.87-22) unstable; urgency=low + + * release3. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-22 + + -- MyoungJune Park Thu, 17 Nov 2011 20:30:58 +0900 + +setting (0.1.87-21) unstable; urgency=low + + * release2. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-21 + + -- Hyejin Kim Thu, 17 Nov 2011 18:43:36 +0900 + +setting (0.1.87-20) unstable; urgency=low + + * release. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-20 + + -- MyoungJune Park Thu, 17 Nov 2011 18:30:43 +0900 +>>>>>>> e7242e9d83c14c6c4d63fbf3247a517ee3458448 + +setting (0.1.87-19) unstable; urgency=low + + * updated slider control in setting-common. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-19 + + -- MyoungJune Park Wed, 16 Nov 2011 19:21:31 +0900 + +setting (0.1.87-18) unstable; urgency=low + + * Merge "set used pointers to NULL for UGs". + * In about phone, model name is shown in case of I9500 binary. + * update name of ringtone on resuming ug, after other apps change or remove it. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-18 + + -- MyoungJune Park Wed, 16 Nov 2011 19:21:31 +0900 + +setting (0.1.87-17) unstable; urgency=low + + * assign NULL to ug pointer when ug is destroyed + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-17 + + -- Hyejin Kim Wed, 16 Nov 2011 15:04:35 +0900 + +setting (0.1.87-16) unstable; urgency=low + + * fix animation effect. + * removed the unused code. + * Merge "Apply new 'Reset' UI according to the newest UI guildline". + * Merge "When time is automatically updated, disable 'Timezone' and 'Date and Time' menu". + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-16 + + -- MyoungJune Park Wed, 16 Nov 2011 11:10:40 +0900 + +setting (0.1.87-15) unstable; urgency=low + + * Disabled animation effect by caller, as UG supports it by callee + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-15 + + -- Taeyoung Kim Tue, 15 Nov 2011 20:09:41 +0900 + +setting (0.1.87-14) unstable; urgency=low + + * updated accessiblity icon. + * fix H0100136698 : modify operation of slider in sound ug. + * change style of controlbar in sound ug. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-14 + + -- MyoungJune Park Tue, 15 Nov 2011 17:16:39 +0900 + +setting (0.1.87-13) unstable; urgency=low + + * removed launch effect/image in display setting, it's feature for demo not release. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-13 + + -- MyoungJune Park Mon, 14 Nov 2011 19:50:16 +0900 + +setting (0.1.87-12) unstable; urgency=low + + * fix lockup when pre-listening removed tone file. + * fix H0100136550 : modify isEmptyStr() function. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-12 + + -- MyoungJune Park Fri, 11 Nov 2011 18:24:21 +0900 + +setting (0.1.87-11) unstable; urgency=low + + * modified bg image path (.png --> .jpg) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-11 + + -- MyoungJune Park Fri, 11 Nov 2011 13:05:16 +0900 + +setting (0.1.87-10) unstable; urgency=low + + * fixed : H0100136428, removed Chiness language in case of SLP binary. + * fixed H0100136431 : popup window occurs in case of SLP binary instead of actual UG. + * add to check that ug is already loaded ( in Sound UG ) + * delete existing pointers before new entries are created in simple password mode. + * improve performance of sliderbars. + * Make lables on controlbar more operate-able. + * Fix view updating issues after language reset. + * Replacing buttons on controllbar with lables. + * Adding ICU timezone set. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-10 + + -- MyoungJune Park Thu, 10 Nov 2011 20:19:30 +0900 + +setting (0.1.87-9) unstable; urgency=low + + * removed duplicated vconf call on Flight mode. + * bug fix on accessibinity settings. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-9 + + -- MyoungJune Park Wed, 09 Nov 2011 22:22:50 +0900 + +setting (0.1.87-8) unstable; urgency=low + + * Update main genlist in UG unload or App resume without UG + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-8 + + -- Taesoo Jun Wed, 09 Nov 2011 00:59:38 +0900 + +setting (0.1.87-7) unstable; urgency=low + + * Apply new usage of the Naviframe. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-7 + + -- Yin Kairong Tue, 08 Nov 2011 02:32:47 -0800 + +setting (0.1.87-6) unstable; urgency=low + + * release + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-6 + + -- MyoungJune Park Tue, 08 Nov 2011 14:14:08 +0900 + +setting (0.1.87-5) unstable; urgency=low + + * Accessibility updates. + * added db/setting/timezone_id key. + * fix H0100136398 : fix that IME removes quickly in password ug. + * fixed STMS DB issues, some strings are ommited. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-5 + + -- MyoungJune Park Mon, 07 Nov 2011 20:28:12 +0900 + +setting (0.1.87-4) unstable; urgency=low + + * fixed compile error. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-4 + + -- MyoungJune Park Fri, 04 Nov 2011 16:26:56 +0900 + +setting (0.1.87-3) unstable; urgency=low + + * profile reset function in Network menu: CQ H0100135933. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-3 + + -- MyoungJune Park Fri, 04 Nov 2011 14:50:46 +0900 + +setting (0.1.87-2) unstable; urgency=low + + * profile reset function in Network menu: CQ H0100135933. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-2 + + -- MyoungJune Park Fri, 04 Nov 2011 07:51:09 +0900 + +setting (0.1.87-1) unstable; urgency=low + + * Release. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.87-1 + + -- Yin Kairong Thu, 03 Nov 2011 02:02:26 -0700 + +setting (0.1.86-101) unstable; urgency=low + + * fix H0100136263 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-101 + + -- Hyejin Kim Thu, 03 Nov 2011 17:01:47 +0900 + +setting (0.1.86-100) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-100 + + -- Yin Kairong Wed, 02 Nov 2011 01:07:07 -0700 + +setting (0.1.86-99) unstable; urgency=low + + * Merge "Apply new GUI of Motions." + * fix H0100135740 + * add to handle RESET type in password ug when simple password option is on. + * fix H0100135906. + * fix H0100135876 and split callback function into each entry. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-99 + + -- MyoungJune Park Thu, 27 Oct 2011 18:31:21 +0900 + +setting (0.1.86-98) unstable; urgency=low + + * fixed : H0100135754. + * Make segment buttons bigger. + * Fix H0100135908: Line on the bottom of the screen in Events notifications screen. + * For device name, disable input space character and apply changes when entry lost the focus. + * Listen smart event 'maxlength,reached' to check the max lenght limitation. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-98 + + -- MyoungJune Park Thu, 27 Oct 2011 17:21:54 +0900 + +setting (0.1.86-97) unstable; urgency=low + + * Customize Lock screen -> Cusomi*s*e Lock screen - string update. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-97 + + -- MyoungJune Park Tue, 25 Oct 2011 13:35:15 +0900 + +setting (0.1.86-96) unstable; urgency=low + + * modified default brightness value. + * add default icon on error condition. + * replaced static icon path with AIL function to get icon paths. + * fixed bug on low battery. + * fix animation effect when creating mobile tracker ug. + * fix to set vconfkey of phonelock in case of phonelock view only. + * enabled GL engine. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-96 + + -- MyoungJune Park Mon, 24 Oct 2011 17:46:21 +0900 + +setting (0.1.86-95) unstable; urgency=low + + * dupload + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-95 + + -- MyoungJune Park Thu, 20 Oct 2011 20:12:47 +0900 + +setting (0.1.86-94) unstable; urgency=low + + * updated LANG_ --> SETTING_LANG_xxx. + * Fixed CQ:H0100135171. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-94 + + -- MyoungJune Park Thu, 20 Oct 2011 19:49:03 +0900 + +setting (0.1.86-93) unstable; urgency=low + + * added icons. + * apply SUPPORT_RCS_FOR_DEMO macro additionally. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-93 + + -- MyoungJune Park Wed, 19 Oct 2011 17:45:17 +0900 + +setting (0.1.86-92) unstable; urgency=low + + * disable 'Display' menu on low battery. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-92 + + -- MyoungJune Park Wed, 19 Oct 2011 10:34:10 +0900 + +setting (0.1.86-91) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-91 + + -- Yin Kairong Mon, 17 Oct 2011 23:22:28 -0700 + +setting (0.1.86-90) unstable; urgency=low + + * update image. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-90 + + -- MyoungJune Park Sat, 15 Oct 2011 13:33:40 +0900 + +setting (0.1.86-89) unstable; urgency=low + + * update image for motion setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-89 + + -- MyoungJune Park Fri, 14 Oct 2011 21:30:41 +0900 + +setting (0.1.86-88) unstable; urgency=low + + * Upload pkg.. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-88 + + -- Yin Kairong Fri, 14 Oct 2011 02:16:15 -0700 + +setting (0.1.86-87) unstable; urgency=low + + * updated theme string from vconf, so UI code in setting also has been updated. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-87 + + -- MyoungJune Park Fri, 14 Oct 2011 17:40:34 +0900 + +setting (0.1.86-86) unstable; urgency=low + + * avoid B/S, in setting > sound. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-86 + + -- MyoungJune Park Thu, 13 Oct 2011 20:02:04 +0900 + +setting (0.1.86-85) unstable; urgency=low + + * enabled motion setting as default. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-85 + + -- MyoungJune Park Thu, 13 Oct 2011 18:14:04 +0900 + +setting (0.1.86-84) unstable; urgency=low + + * tested if new libicu has no issue in setting app. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-84 + + -- MyoungJune Park Thu, 13 Oct 2011 10:48:31 +0900 + +setting (0.1.86-83) unstable; urgency=low + + * apply black theme to simple password view. + * Enhance max character number in Device Name. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-83 + + -- MyoungJune Park Wed, 12 Oct 2011 21:37:58 +0900 + +setting (0.1.86-82) unstable; urgency=low + + * Upload pkg to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-82 + + -- Yin Kairong Tue, 11 Oct 2011 23:38:59 -0700 + +setting (0.1.86-81) unstable; urgency=low + + * fixed Prevent issues. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-81 + + -- MyoungJune Park Mon, 10 Oct 2011 19:48:09 +0900 + +setting (0.1.86-80) unstable; urgency=low + + * Continue making adjustions on UI to meet with new HD resolution. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-80 + + -- Yin Kairong Sun, 09 Oct 2011 00:20:20 -0700 + +setting (0.1.86-79) unstable; urgency=low + + * Upload pkg to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-79 + + -- Yin Kairong Sat, 08 Oct 2011 08:16:00 -0700 + +setting (0.1.86-78) unstable; urgency=low + + * Make a bit adjustion on UI to meet with new resolution. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-78 + + -- Yin Kairong Sat, 08 Oct 2011 08:13:32 -0700 + +setting (0.1.86-77) unstable; urgency=low + + * Adjust the text description of 'Licence->DivX@VOD->DivX de/registration', Add underline in URL, Add URL openning operation when clicking the URL. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-77 + + -- Yin Kairong Sat, 08 Oct 2011 07:10:40 -0700 + +setting (0.1.86-76) unstable; urgency=low + + * Replace navigationbar with naviframe. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-76 + + -- Yin Kairong Sat, 08 Oct 2011 06:56:48 -0700 + +setting (0.1.86-75) unstable; urgency=low + + * Referring to tester's opinion, immediately apply the motion sensitivity and fix H0100133022,H0100133023 ,H0100133027 and H0100133028. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-75 + + -- Yin Kairong Fri, 07 Oct 2011 19:38:40 -0700 + +setting (0.1.86-74) unstable; urgency=low + + * fixed Prevent issues. + * fixed DST time issue. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-74 + + -- MyoungJune Park Fri, 07 Oct 2011 17:51:32 +0900 + +setting (0.1.86-73) unstable; urgency=low + + * added NFC setting in application category. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-73 + + -- MyoungJune Park Thu, 06 Oct 2011 23:02:31 +0900 + +setting (0.1.86-72) unstable; urgency=low + + * modified usb-setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-72 + + -- MyoungJune Park Thu, 06 Oct 2011 22:49:53 +0900 + +setting (0.1.86-71) unstable; urgency=low + + * release + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-71 + + -- MyoungJune Park Thu, 06 Oct 2011 21:14:39 +0900 + +setting (0.1.86-70) unstable; urgency=low + + * fixed H0100133972. (Locations/Network/USB help contents headlines are not bold) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-70 + + -- MyoungJune Park Thu, 06 Oct 2011 21:06:42 +0900 + +setting (0.1.86-69) unstable; urgency=low + + * In About phone > Version, the display format changed. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-69 + + -- Taesoo Jun Wed, 05 Oct 2011 13:38:40 +0900 + +setting (0.1.86-68) unstable; urgency=low + + * fixed DST time issue, preventing from infinite loop. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-68 + + -- MyoungJune Park Tue, 04 Oct 2011 15:38:02 +0900 + +setting (0.1.86-67) unstable; urgency=low + + * updated STMS strings. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-67 + + -- MyoungJune Park Sat, 01 Oct 2011 21:32:39 +0900 + +setting (0.1.86-66) unstable; urgency=low + + * on Reset, fixed mismatch language & index. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-66 + + -- MyoungJune Park Sat, 01 Oct 2011 20:37:03 +0900 + +setting (0.1.86-65) unstable; urgency=low + + * applied i18n Strings : 'All'. + * implemented "High Contrast" menu. + * implemented "Automatic answering" mode in connection with CISS. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-65 + + -- MyoungJune Park Sat, 01 Oct 2011 15:44:14 +0900 + +setting (0.1.86-64) unstable; urgency=low + + * fixed timezone error when user set a timezone to specific zone with DST(Daylight Saving Time). it may set the hour to 1 hour above correct time. + * Fix BS after activate 'Select all' in Settings + * fixed H0100134114, replaced "Locations" -> "Location" + * Fix the Crash occured when selecting GSM 900/1800 network band in settings + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-64 + + -- MyoungJune Park Fri, 30 Sep 2011 20:50:32 +0900 + +setting (0.1.86-63) unstable; urgency=low + + * Fix the Crash occured when selecting GSM 900/1800 network band in settings. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-63 + + -- Yin Kairong Thu, 29 Sep 2011 23:52:47 -0700 + +setting (0.1.86-62) unstable; urgency=low + + * USB-utilities is recovered to setting_0.1.86-59 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-62 + + -- Taeyoung Kim Fri, 30 Sep 2011 09:42:04 +0900 + +setting (0.1.86-61) unstable; urgency=low + + * remove tapi-priv dependency + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-61 + + -- Taesoo Jun Thu, 29 Sep 2011 21:37:22 +0900 + +setting (0.1.86-60) unstable; urgency=low + + * revert 'revert TAPI priv dep.' + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-60 + + -- MyoungJune Park Thu, 29 Sep 2011 18:02:42 +0900 + +setting (0.1.86-59) unstable; urgency=low + + * revert TAPI priv dep. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-59 + + -- MyoungJune Park Thu, 29 Sep 2011 14:50:54 +0900 + +setting (0.1.86-58) unstable; urgency=low + + * add sensor checking. + * delete timer when password ug is destroyed (H0100134173, H0100134174). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-58 + + -- MyoungJune Park Thu, 29 Sep 2011 11:24:14 +0900 + +setting (0.1.86-57) unstable; urgency=low + + * apply design ID for text. + * reupload by git tag fail. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-57 + + -- MyoungJune Park Tue, 27 Sep 2011 15:33:25 +0900 + +setting (0.1.86-56) unstable; urgency=low + + * updated CMakeLists.txt, to put images for Settting > Motion. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-56 + + -- MyoungJune Park Tue, 27 Sep 2011 11:53:53 +0900 + +setting (0.1.86-55) unstable; urgency=low + + * fixed H0100133409. + * moved DEVICE_NAME to vconf, to share the name with other modules. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-55 + + -- MyoungJune Park Tue, 27 Sep 2011 08:51:29 +0900 + +setting (0.1.86-54) unstable; urgency=low + + * Remove the temp code for Event Propropagation Issue in NavigationBar. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-54 + + -- Yin Kairong Sun, 25 Sep 2011 23:12:45 -0700 + +setting (0.1.86-53) unstable; urgency=low + + * change eng String with STMS string. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-53 + + -- MyoungJune Park Sat, 24 Sep 2011 18:05:38 +0900 + +setting (0.1.86-52) unstable; urgency=low + + * added Certificated menu in setting > about. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-52 + + -- MyoungJune Park Fri, 23 Sep 2011 14:59:23 +0900 + +setting (0.1.86-51) unstable; urgency=low + + * diabled SMC test code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-51 + + -- MyoungJune Park Thu, 22 Sep 2011 14:15:13 +0900 + +setting (0.1.86-50) unstable; urgency=low + + * diabled accessibility settings. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-50 + + -- MyoungJune Park Tue, 20 Sep 2011 19:14:47 +0900 + +setting (0.1.86-49) unstable; urgency=low + + * prevent vtmain & call from being terminated if language changes. + * removed vonf kyes after regstering them in libslp-setting(motion setting). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-49 + + -- MyoungJune Park Mon, 19 Sep 2011 11:15:32 +0900 + +setting (0.1.86-48) unstable; urgency=low + + * Uplaod pkg to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-48 + + -- Yin Kairong Sat, 17 Sep 2011 01:02:21 -0700 + +setting (0.1.86-47) unstable; urgency=low + + * fixed compile error. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-47 + + -- MyoungJune Park Fri, 16 Sep 2011 20:12:35 +0900 + +setting (0.1.86-46) unstable; urgency=low + + * db/setting/usb_mode is changed to memory/setting/usb_mode + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-46 + + -- Taeyoung Kim Fri, 16 Sep 2011 18:10:52 +0900 + +setting (0.1.86-45) unstable; urgency=low + + * removed HARDKEY(Back) handler. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-45 + + -- MyoungJune Park Fri, 16 Sep 2011 14:02:56 +0900 + +setting (0.1.86-44) unstable; urgency=low + + * removed HARDKEY(Back) handler. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-44 + + -- MyoungJune Park Thu, 15 Sep 2011 21:43:37 +0900 + +setting (0.1.86-43) unstable; urgency=low + + * disabled Internet menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-43 + + -- MyoungJune Park Wed, 14 Sep 2011 13:12:00 +0900 + +setting (0.1.86-42) unstable; urgency=low + + * Upload pkg to fix the gallery password lock issue. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-42 + + -- Yin Kairong Mon, 12 Sep 2011 18:26:12 -0700 + +setting (0.1.86-41) unstable; urgency=low + + * updated i18n strings from STMS. + * Help window of USB utilities is modified to apply an improved function(elm_genlist_height_for_width_mode_set()) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-41 + + -- MyoungJune Park Fri, 09 Sep 2011 16:43:57 +0900 + +setting (0.1.86-40) unstable; urgency=low + + * updated i18n strings from STMS. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-40 + + -- MyoungJune Park Fri, 09 Sep 2011 11:47:18 +0900 + +setting (0.1.86-39) unstable; urgency=low + + * naming rules. + * fixed entry issue of simple password. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-39 + + -- MyoungJune Park Thu, 08 Sep 2011 11:47:17 +0900 + +setting (0.1.86-38) unstable; urgency=low + + * refactoring code. + * fixed entry issue of simple password. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-38 + + -- MyoungJune Park Thu, 08 Sep 2011 09:32:58 +0900 + +setting (0.1.86-37) unstable; urgency=low + + * Add special processes for 'Winset' theme resetting. + * Fix some mistake usage of g_strlcat. + * removed #if 0 ~ #if 1 and return -1. + * Add vconf listener in 'setting->memory->memory status'. + * Adjust the UI of 'Accessibility->Font style' according to UI document. + * Adjust the UI of 'Accessibility->Font size' according to UI document. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-37 + + -- MyoungJune Park Tue, 06 Sep 2011 19:42:22 +0900 + +setting (0.1.86-36) unstable; urgency=low + + * replaced strncat with g_strlcat. + * added Manage Applications menu(UG). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-36 + + -- MyoungJune Park Mon, 05 Sep 2011 20:24:17 +0900 + +setting (0.1.86-35) unstable; urgency=low + + * fixed Douch string error at Setting/Rotation. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-35 + + -- MyoungJune Park Mon, 05 Sep 2011 17:33:09 +0900 + +setting (0.1.86-34) unstable; urgency=low + + * removed fms-util-dev + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-34 + + -- MyoungJune Park Fri, 02 Sep 2011 09:49:56 +0900 + +setting (0.1.86-33) unstable; urgency=low + + * Mobile hotspot mode is added to USB utilities and back button is disabled during mode change + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-33 + + -- Taeyoung Kim Thu, 01 Sep 2011 21:02:44 +0900 + +setting (0.1.86-32) unstable; urgency=low + + * disabled aul_listen_app_dead_signal call(because when setting app is deactivated,LANG changes.) + * Fix popup info display issue when changing language. + * replaced strncat with g_strlcat,as it's more secure. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-32 + + -- MyoungJune Park Thu, 01 Sep 2011 10:39:06 +0900 + +setting (0.1.86-31) unstable; urgency=low + + * Default USB connection mode is changed to KIES mode + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-31 + + -- Taeyoung Kim Wed, 31 Aug 2011 17:28:21 +0900 + +setting (0.1.86-30) unstable; urgency=low + + * removed 'LANG_CHANGED' heynoti, because of not in use. + * Fixed H0100133016. + * Fixed H0100133042: Option is named: 'Font style' but title inside is: 'Font selection' + * Added ug_send_event code to bypass the event to UG. + * Replaced old separator style with newer one. + * Added prefix 'pa(pointer of allocated ..) to alloced string, inorder to free. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-30 + + -- MyoungJune Park Wed, 31 Aug 2011 09:03:38 +0900 + +setting (0.1.86-29) unstable; urgency=low + + * Fix the vconf listening issue and remove the unused code in setting-network + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-29 + + -- MyoungJune Park Mon, 29 Aug 2011 15:28:42 +0900 + +setting (0.1.86-28) unstable; urgency=low + + * Fix the vconf listening issue and remove the unused code in setting-network + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-28 + + -- Yin Kairong Sun, 28 Aug 2011 22:07:07 -0700 + +setting (0.1.86-27) unstable; urgency=low + + * Re-implement 'Network mode' using expandable list + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-27 + + -- Yin Kairong Sun, 28 Aug 2011 22:04:51 -0700 + +setting (0.1.86-26) unstable; urgency=low + + * Fix the GUI checking issue of 'Wallpaper'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-26 + + -- Yin Kairong Sun, 28 Aug 2011 21:58:38 -0700 + +setting (0.1.86-25) unstable; urgency=low + + * added to moving to one-level up view after changing language + * added an additional filter by PID for setting app. after changing language + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-25 + + -- Taesoo Jun Mon, 29 Aug 2011 08:03:37 +0900 + +setting (0.1.86-24) unstable; urgency=low + + * fixed B/S issues on Reset settings. + * added i18n strings. + * remove icons on controlbar. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-24 + + -- MyoungJune Park Sat, 27 Aug 2011 17:52:08 +0900 + +setting (0.1.86-23) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-23 + + -- Yin Kairong Fri, 26 Aug 2011 20:23:11 -0700 + +setting (0.1.86-22) unstable; urgency=low + + * added i18n string from STMS 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-22 + + -- MyoungJune Park Fri, 26 Aug 2011 18:02:21 +0900 + +setting (0.1.86-21) unstable; urgency=low + + * added i18n string from STMS. + * fixed password UG - workflow. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-21 + + -- MyoungJune Park Fri, 26 Aug 2011 13:29:19 +0900 + +setting (0.1.86-20) unstable; urgency=low + + * added i18n string from STMS. + * removed build warnings. + * added Facebook & Twitter UGs. + * changed icons of sound sliders. + * updated postinst file. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-20 + + -- MyoungJune Park Thu, 25 Aug 2011 19:29:27 +0900 + +setting (0.1.86-19) unstable; urgency=low + + * Apply 'Resetting' function for all UGs and Setting app itself. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-19 + + -- Yin Kairong Wed, 24 Aug 2011 19:09:20 -0700 + +setting (0.1.86-18) unstable; urgency=low + + * enabled Accessiblity setting. + * refined Reset setting (UI). + * applied 'Back' button guided by UX. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-18 + + -- MyoungJune Park Wed, 24 Aug 2011 17:57:29 +0900 + +setting (0.1.86-17) unstable; urgency=low + + * enabled Accessiblity setting. + * replaced LGPL header with Apache header. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-17 + + -- MyoungJune Park Wed, 24 Aug 2011 13:47:46 +0900 + +setting (0.1.86-16) unstable; urgency=low + + * Fix the BS issue when language being changed. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-16 + + -- MyoungJune Park Mon, 22 Aug 2011 18:12:02 +0900 + +setting (0.1.86-15) unstable; urgency=low + + * enabled Accessibility setting - vconf. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-15 + + -- MyoungJune Park Mon, 22 Aug 2011 11:16:27 +0900 + +setting (0.1.86-14) unstable; urgency=low + + * enabled Motion Setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-14 + + -- MyoungJune Park Sat, 20 Aug 2011 17:35:53 +0900 + +setting (0.1.86-13) unstable; urgency=low + + * disabled Exchange Server menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-13 + + -- MyoungJune Park Fri, 19 Aug 2011 11:37:53 +0900 + +setting (0.1.86-12) unstable; urgency=low + + * Upload package to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-12 + + -- Yin Kairong Thu, 18 Aug 2011 02:28:58 -0700 + +setting (0.1.86-11) unstable; urgency=low + + * Change the View Managing strategy to improve Setting response speed and fix CQ H0100131629. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-11 + + -- Yin Kairong Wed, 17 Aug 2011 21:52:11 -0700 + +setting (0.1.86-10) unstable; urgency=low + + * Apply new 'Select network' UI to fix CQ H0100129289,H0100129846. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-10 + + -- Yin Kairong Wed, 17 Aug 2011 21:49:23 -0700 + +setting (0.1.86-9) unstable; urgency=low + + * Remove the Non-Const Global Variables and clear unused code in setting-memory. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-9 + + -- Yin Kairong Wed, 17 Aug 2011 01:04:25 -0700 + +setting (0.1.86-8) unstable; urgency=low + + * enabled 'Back' button (arrow) in main view. + * disabled the features of 'Motion settings' until UX team provides imgs. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-8 + + -- MyoungJune Park Fri, 12 Aug 2011 20:05:28 +0900 + +setting (0.1.86-7) unstable; urgency=low + + * applied battery percentage in Indicator. + * removed unused dir (wallpaper, lockscreen) in /opt/data/setting. + * enabled the features of 'Motion settings'. + * added setting_plugin_reset caller to all UGs. + * Add processbar after change language and killed all other apps. + * apply simple password. + * optimize on creating sound ug. + * .UTF8 -> .UTF-8 in region format vconf. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-7 + + -- MyoungJune Park Fri, 12 Aug 2011 17:19:44 +0900 + +setting (0.1.86-6) unstable; urgency=low + + * To perfect the features of 'Motion settings'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-6 + + -- Yin Kairong Thu, 11 Aug 2011 18:47:46 -0700 + +setting (0.1.86-5) unstable; urgency=low + + * Modify the usage of 'Nbeat Layout Style & elm_bg Usage Guide' + * added .UTF8 suffix at regionformat vconf value + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-5 + + -- Yin Kairong Thu, 11 Aug 2011 02:53:42 -0700 + +setting (0.1.86-4) unstable; urgency=low + + * applied new AIL library in place of old one + * added .UTF8 suffix at regionformat vconf value + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-4 + + -- MyoungJune Park Wed, 10 Aug 2011 14:36:03 +0900 + +setting (0.1.86-3) unstable; urgency=low + + * fixed Prevent issues. + * set new vconf initial value in .postinst (setting > Brightness). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-3 + + -- MyoungJune Park Mon, 08 Aug 2011 20:38:13 +0900 + +setting (0.1.86-2) unstable; urgency=low + + * release + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-2 + + -- MyoungJune Park Mon, 08 Aug 2011 11:22:23 +0900 + +setting (0.1.86-1) stable; urgency=low + + * fixed Prevent issues. CID:45897, 55764 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.86-1 + + -- MyoungJune Park Thu, 04 Aug 2011 20:17:37 +0900 + +setting (0.1.85-99) unstable; urgency=low + + * sound > ringtone > ex_genlist & vconf set problem fix. + * Remove the WARRINGs and ERRORs reported by the indent tool. + * fixed Prevent issues. CID:45897, 55764 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-99 + + -- MyoungJune Park Wed, 03 Aug 2011 19:05:57 +0900 + +setting (0.1.85-98) unstable; urgency=low + + * Remove the WARRINGs and ERRORs reported by the indent tool. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-98 + + -- Yin Kairong Tue, 02 Aug 2011 20:15:23 -0700 + +setting (0.1.85-97) unstable; urgency=low + + * down-height of genlist entries, containing sliderbars. + * re-upload by tag-mismatch. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-97 + + -- MyoungJune Park Tue, 02 Aug 2011 21:03:36 +0900 + +setting (0.1.85-95) unstable; urgency=low + + * On simulator, brightness value is sometimes negative value. - exception handler. + * fixed Prevent issues. + * refined Setting > Reset by plugin-model with the libdl. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-95 + + -- MyoungJune Park Tue, 02 Aug 2011 11:09:43 +0900 + +setting (0.1.85-94) unstable; urgency=low + + * fixed the vconf pair for listen/unlisten in mobile hotspot. + * Redefine the exception handle when access /opt/data/setting/setting.cfg failed. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-94 + + -- MyoungJune Park Fri, 29 Jul 2011 09:35:04 +0900 + +setting (0.1.85-93) unstable; urgency=low + + * Remove the deprecated APIs. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-92 + + -- Yin Kairong Tue, 26 Jul 2011 22:24:49 -0700 + +setting (0.1.85-92) unstable; urgency=low + + * Make specialization words line feed automatically and fix the issue in 'Sound->Back'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-92 + + -- MyoungJune Park Tue, 26 Jul 2011 17:56:15 -0700 + +setting (0.1.85-91) unstable; urgency=low + + * Add a new UG called ug-motion-efl, and load it in 'Setting->Display->Motions'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-91 + + -- MyoungJune Park Mon, 25 Jul 2011 20:10:40 -0700 + +setting (0.1.85-90) unstable; urgency=low + + * To do formatting customizition of 'Help' diloge style in one place. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-90 + + -- Yin Kairong Mon, 25 Jul 2011 19:06:40 -0700 + +setting (0.1.85-89) unstable; urgency=low + + * Adjust the alignment of POPUP content. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-89 + + -- Yin Kairong Mon, 25 Jul 2011 19:01:42 -0700 + +setting (0.1.85-88) unstable; urgency=low + + * Optimize the code relate to ICU. + * Changing UI of usb utilities and solving a migration problem on the help page + * Fixed Battery, CPU usage - dispaly wrong values. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-88 + + -- MyoungJune Park Thu, 21 Jul 2011 17:43:30 +0900 + +setting (0.1.85-87) unstable; urgency=low + + * Fix the blunt issue during 'Sound' Tabs switching. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-87 + + -- Yin Kairong Tue, 19 Jul 2011 23:17:49 -0700 + +setting (0.1.85-86) unstable; urgency=low + + * Fixing emulator issue that application exits on changing volume of incoming call + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-86 + + -- Taeyoung Kim Tue, 19 Jul 2011 15:30:56 +0900 + +setting (0.1.85-85) unstable; urgency=low + + * enabled DLOG. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-85 + + -- MyoungJune Park Mon, 18 Jul 2011 20:29:51 +0900 + +setting (0.1.85-84) unstable; urgency=low + + * Re-define 'bool' type to be 'Eina_Bool'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-84 + + -- Yin Kairong Sun, 17 Jul 2011 21:35:32 -0700 + +setting (0.1.85-83) unstable; urgency=low + + * fixed vconf creation error for db/setting/lang. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-83 + + -- MyoungJune Park Mon, 18 Jul 2011 15:21:40 +0900 + +setting (0.1.85-82) unstable; urgency=low + + * Trival change to upload PKG + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-82 + + -- Taesoo Jun Sun, 17 Jul 2011 15:51:47 +0900 + +setting (0.1.85-81) unstable; urgency=low + + * Applying new UI of USB utilities + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-81 + + -- Taeyoung Kim Tue, 12 Jul 2011 17:48:06 +0900 + +setting (0.1.85-80) unstable; urgency=low + + * added ICU code in setting-time & code clean. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-80 + + -- MyoungJune Park Sun, 10 Jul 2011 17:44:47 +0900 + +setting (0.1.85-79) unstable; urgency=low + + * Fix the slider indicator-popup coverd issue(eg, Setting->Display->Brightness->flick the slider). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-79 + + -- Yin Kairong Fri, 08 Jul 2011 00:32:48 -0700 + +setting (0.1.85-78) unstable; urgency=low + + * Apply ' language / region change / REDRAW all views instead of terminating app itself.'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-78 + + -- Yin Kairong Tue, 05 Jul 2011 18:09:18 -0700 + +setting (0.1.85-77) unstable; urgency=low + + * Upload package to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-77 + + -- Yin Kairong Tue, 05 Jul 2011 01:29:22 -0700 + +setting (0.1.85-76) unstable; urgency=low + + * Apply animation effect when a UG loading ug-setting-password-efl or ug-mobile-tracker-efl + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-76 + + -- Yin Kairong Mon, 04 Jul 2011 23:15:14 -0700 + +setting (0.1.85-75) unstable; urgency=low + + * Fix the issue 'Not able to see what is written when more then 8 line of text is inputed in Device name; About phone'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-75 + + -- Yin Kairong Mon, 04 Jul 2011 19:39:19 -0700 + +setting (0.1.85-74) unstable; urgency=low + + * Re-arrange the API setting_layout_navi_bar_add_buttons ..etc + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-74 + + -- Yin Kairong Mon, 04 Jul 2011 19:30:28 -0700 + +setting (0.1.85-73) unstable; urgency=low + + * Fix the black screen issue when loading ug-gallery-efl. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-73 + + -- Yin Kairong Mon, 04 Jul 2011 19:13:06 -0700 + +setting (0.1.85-72) unstable; urgency=low + + * Add animation effect when loading UGs in 'Wallpaper'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-72 + + -- Yin Kairong Mon, 04 Jul 2011 19:04:28 -0700 + +setting (0.1.85-71) unstable; urgency=low + + * Abstract animation API for Setting APP and its UGs. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-71 + + -- Yin Kairong Mon, 04 Jul 2011 19:01:09 -0700 + +setting (0.1.85-70) unstable; urgency=low + + * Fix H0100123573 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-70 + + -- Tang Feng Fri, 02 Jul 2011 9:03:06 +0900 + +setting (0.1.85-69) unstable; urgency=low + + * added Customized lock screen menu in wallpaper UG. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-69 + + -- MyoungJune Park Fri, 01 Jul 2011 21:03:06 +0900 + +setting (0.1.85-68) unstable; urgency=low + + * refactoring code in setting-common. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-68 + + -- MyoungJune Park Fri, 01 Jul 2011 20:06:49 +0900 + +setting (0.1.85-67) unstable; urgency=low + + * To make Setting App well supportted black-skin. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-67 + + -- MyoungJune Park Tue, 28 Jun 2011 16:08:03 -0700 + +setting (0.1.85-66) unstable; urgency=low + + * Fix 'Navigation bar back key & option header & text alignment' + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-66 + + -- Yin Kairong Sun, 26 Jun 2011 22:14:51 -0700 + +setting (0.1.85-65) unstable; urgency=low + + * Apply 'Battery percentage'menu in 'Setting->Display' . + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-65 + + -- MyoungJune Park Thu, 23 Jun 2011 01:11:30 -0700 + +setting (0.1.85-64) unstable; urgency=low + + * Apply expandable list for Internet/MMS Auth type. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-64 + + -- Yin Kairong Tue, 21 Jun 2011 02:37:58 -0700 + +setting (0.1.85-63) unstable; urgency=low + + * Rename 'Theme' 'Skin color'. + * Recover Mobile app from removing it (mistake). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-63 + + -- MyoungJune Park Mon, 20 Jun 2011 20:11:00 +0900 + +setting (0.1.85-62) unstable; urgency=low + + * choose 10 menus as default preffered menu. + * replaced ug_get_window() with ug_get_parent_layout(). + * AUI music source replacement. + * fix H0100128438. + * code clean & added doxygen @todo comment for futher work. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-62 + + -- MyoungJune Park Mon, 20 Jun 2011 17:12:00 +0900 + +setting (0.1.85-61) unstable; urgency=low + + * Fix ' Date/Time > Change Time forat 12<->24, it shows flickering at datefield above it ' + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-61 + -- Yin Kairong Thu, 16 Jun 2011 23:20:56 -0700 + +setting (0.1.85-60) unstable; urgency=low + + * removed the unused code (regarding old sound ui). + * added Launch Effect, Launch Image. + * fixed Svace code issues. + * avoid double touch issue by edc updates. + * corrected words, sentenses. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-60 + + -- MyoungJune Park Fri, 17 Jun 2011 09:43:25 +0900 + +setting (0.1.85-59) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-59 + + -- Yin Kairong Wed, 15 Jun 2011 17:47:38 -0700 + +setting (0.1.85-58) unstable; urgency=low + + * Network > Auth type -> apply Expandable list. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-58 + + -- Yin Kairong Wed, 15 Jun 2011 08:41:51 -0700 + +setting (0.1.85-57) unstable; urgency=low + + * Fix the display issues in 'Setting->About phone'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-57 + + -- Yin Kairong Wed, 15 Jun 2011 08:39:09 -0700 + +setting (0.1.85-56) unstable; urgency=low + + * Add auto-hide operation of input pannel when genlist is pressed in 'ug-about' and 'ug-password'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-56 + + -- Yin Kairong Wed, 15 Jun 2011 04:15:23 -0700 + +setting (0.1.85-55) unstable; urgency=low + + * Fix the BS issue of network connection. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-55 + + -- Yin Kairong Wed, 15 Jun 2011 04:01:16 -0700 + +setting (0.1.85-54) unstable; urgency=low + + * Add process of constructing the first view of ringtone . + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-54 + + -- Yin Kairong Tue, 14 Jun 2011 01:15:05 -0700 + +setting (0.1.85-53) unstable; urgency=low + + * fix UX mismatches. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-53 + + -- MyoungJune Park Mon, 13 Jun 2011 11:20:18 +0900 + +setting (0.1.85-52) unstable; urgency=low + + * Fix [Setting] Password Hashing + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-52 + + -- Yin Kairong Fri, 10 Jun 2011 14:38:53 -0700 + +setting (0.1.85-51) unstable; urgency=low + + * release + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-51 + + -- MyoungJune Park Fri, 10 Jun 2011 17:18:26 +0900 + +setting (0.1.85-50) unstable; urgency=low + + * FIXED H0100125255 - No sound when changing level of Notification volume bar; + * FIXED H0100125264 - No preview of Touch sound level in Sounds touch feedback. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-50 + + -- MyoungJune Park Fri, 10 Jun 2011 13:58:35 +0900 + +setting (0.1.85-49) unstable; urgency=low + + * fix edc file build error + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-49 + + -- Yin Kairong Fri, 10 Jun 2011 03:55:48 -0700 + +setting (0.1.85-48) unstable; urgency=low + + * Add preview operation of vibration. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-48 + + -- Yin Kairong Thu, 09 Jun 2011 08:29:32 -0700 + +setting (0.1.85-47) unstable; urgency=low + + * Fix two UI display issues. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-47 + + -- Yin Kairong Thu, 09 Jun 2011 08:20:45 -0700 + +setting (0.1.85-46) unstable; urgency=low + + * added isInUGMode guard to avoid double execution of callback. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-46 + + -- MyoungJune Park Wed, 08 Jun 2011 20:25:05 +0900 + +setting (0.1.85-45) unstable; urgency=low + + * Fix SVace issues + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-45 + + -- Yin Kairong Tue, 07 Jun 2011 21:44:27 -0700 + +setting (0.1.85-44) unstable; urgency=low + + * Remove code warring info. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-44 + + -- Yin Kairong Tue, 07 Jun 2011 20:14:38 -0700 + +setting (0.1.85-43) unstable; urgency=low + + * Add the missed intialization of vconf 'db/setting/device_name'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-43 + + -- Yin Kairong Tue, 07 Jun 2011 19:16:34 -0700 + +setting (0.1.85-42) unstable; urgency=low + + * Fix the abnormal size of specilization words in network. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-42 + + -- Yin Kairong Tue, 07 Jun 2011 19:12:29 -0700 + +setting (0.1.85-41) unstable; urgency=low + + * Remove unused code in ug-about-efl. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-41 + + -- Yin Kairong Mon, 06 Jun 2011 23:24:55 -0700 + +setting (0.1.85-40) unstable; urgency=low + + * Add hiding operation of all entry-boxes in Setting(eg, about, network, password..etc).. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-40 + + -- Yin Kairong Mon, 06 Jun 2011 23:22:56 -0700 + +setting (0.1.85-39) unstable; urgency=low + + * modified menu name. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-39 + + -- MyoungJune Park Tue, 07 Jun 2011 13:45:03 +0900 + +setting (0.1.85-38) unstable; urgency=low + + * remove old codes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-38 + + -- mjpark Tue, 07 Jun 2011 13:39:29 +0900 + +setting (0.1.85-37) unstable; urgency=low + + * enabled new Sound UI (it was old style UI by mistake). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-37 + + -- MyoungJune Park Tue, 07 Jun 2011 10:19:52 +0900 + +setting (0.1.85-36) unstable; urgency=low + + * enabled new Sound UI (it was old style UI by mistake). + * FIXED - H0100125264 No preview of Touch sound level in Sounds touch feedback + * FIXED - H0100125255 No sound when changing level of Notification volume bar; Sounds settings + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-36 + + -- MyoungJune Park Sat, 04 Jun 2011 21:37:50 +0900 + +setting (0.1.85-35) unstable; urgency=low + + * disabled GL engine. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-35 + + -- MyoungJune Park Fri, 03 Jun 2011 22:00:59 +0900 + +setting (0.1.85-34) unstable; urgency=low + + * choose default 10 menus. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-34 + + -- MyoungJune Park Fri, 03 Jun 2011 19:36:42 +0900 + +setting (0.1.85-33) unstable; urgency=low + + * Apply new 'About phone' UI. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-33 + + -- Yin Kairong Fri, 03 Jun 2011 03:44:00 -0700 + +setting (0.1.85-32) unstable; urgency=low + + * Fix 'Coverity Prevent'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-32 + + -- MyoungJune Park Thu, 02 Jun 2011 20:01:58 -0700 + +setting (0.1.85-31) unstable; urgency=low + + * Remove unused code and build warring. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-31 + + -- Yin Kairong Thu, 02 Jun 2011 19:59:15 -0700 + +setting (0.1.85-30) unstable; urgency=low + + * Do redundent code clearring and to decrease memory alloc. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-30 + + -- Yin Kairong Tue, 07 Jun 2011 07:56:14 -0700 + +setting (0.1.85-29) unstable; urgency=low + + * Modify the wrong title of 'language'setting view in SetupWizard. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-29 + + -- MyoungJune Park Sat, 04 Jun 2011 13:14:07 -0700 + +setting (0.1.85-28) unstable; urgency=low + + * replace "db/wifi/connected_ap_name" and VCONFKEY_WIFI_DEVICE with VCONFKEY_WIFI_CONNECTED_AP_NAME + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-28 + + -- Yin Kairong Sat, 04 Jun 2011 12:46:03 -0700 + +setting (0.1.85-27) unstable; urgency=low + + * Remove rundent operation in ug-time-efl and improve the loading speed of time main view. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-27 + + -- Yin Kairong Sat, 04 Jun 2011 11:44:31 -0700 + +setting (0.1.85-26) unstable; urgency=low + + * fixed CQ (H0100127593,H0100127545). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-26 + + -- MyoungJune Park Wed, 01 Jun 2011 15:09:19 +0900 + +setting (0.1.85-25) unstable; urgency=low + + * rollback to avoding killing quickpanel when changing language. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-25 + + -- MyoungJune Park Tue, 31 May 2011 09:34:12 +0900 + +setting (0.1.85-24) unstable; urgency=low + + * enabled New Sound menu + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-24 + + -- MyoungJune Park Mon, 30 May 2011 10:52:51 +0900 + +setting (0.1.85-23) unstable; urgency=low + + * enabled 'New exchange' menu + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-23 + + -- MyoungJune Park Thu, 26 May 2011 13:33:50 +0900 + +setting (0.1.85-22) unstable; urgency=low + + * Change the new Sound menu with controlbar strategy changeing. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-22 + + -- MyoungJune Park Sat, 04 Jun 2011 07:47:06 -0700 + +setting (0.1.85-21) unstable; urgency=low + + * Fix H0100127328.. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-21 + + -- Yin Kairong Sun, 29 May 2011 19:50:12 -0700 + +setting (0.1.85-20) unstable; urgency=low + + * Fix the loading speed issue of 'Network->internet/MMS connection'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-20 + + -- Yin Kairong Sun, 29 May 2011 12:51:43 -0700 + +setting (0.1.85-19) unstable; urgency=low + + * Upload package. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-19 + + -- Yin Kairong Tue, 24 May 2011 15:24:31 -0700 + +setting (0.1.85-18) unstable; urgency=low + + * Change two resource strings according new UI temply. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-18 + + -- Yin Kairong Tue, 24 May 2011 04:01:53 -0700 + +setting (0.1.85-17) unstable; urgency=low + + * added scrolling support for First Day of Week. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-17 + + -- MyoungJune Park Mon, 23 May 2011 18:56:16 +0900 + +setting (0.1.85-16) unstable; urgency=low + + * Re-implement the expandable style genist item and Fix H0100126957 ,H0100126988 ,and H0100127069.. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-16 + + -- Yin Kairong Mon, 23 May 2011 04:27:15 -0700 + +setting (0.1.85-15) unstable; urgency=low + + * Clear the struct of setting_main_appdata, remove two unused Macros and their relative code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-15 + + -- Yin Kairong Mon, 23 May 2011 00:15:47 -0700 + +setting (0.1.85-14) unstable; urgency=low + + * Pass ringtone path to myfile-ug in 'Sound' menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-14 + + -- Yin Kairong Fri, 20 May 2011 18:38:31 -0700 + +setting (0.1.85-13) unstable; urgency=low + + * Fix the refreshing issue of mmc formating and clear the setting-cfg.c + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-13 + + -- Yin Kairong Thu, 19 May 2011 08:46:54 -0700 + +setting (0.1.85-12) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-12 + + -- Feng Kai Tue, 17 May 2011 22:28:03 -0700 + +setting (0.1.85-11) unstable; urgency=low + + * Do code Clearing in Setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-11 + + -- Yin Kairong Wed, 18 May 2011 13:54:57 -0700 + +setting (0.1.85-10) unstable; urgency=low + + * re-upload. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-10 + + -- Yin Kairong Mon, 16 May 2011 05:43:50 -0700 + +setting (0.1.85-9) unstable; urgency=low + + * Upload package. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-9 + + -- Yin Kairong Mon, 16 May 2011 05:34:27 -0700 + +setting (0.1.85-8) unstable; urgency=low + + * Apply later-release of genlist itc for All UGs. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-8 + + -- Yin Kairong Mon, 16 May 2011 04:50:53 -0700 + +setting (0.1.85-7) unstable; urgency=low + + * avoid killing quickpanel when changing language. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-7 + + -- MyoungJune Park Mon, 16 May 2011 20:23:40 +0900 + +setting (0.1.85-6) unstable; urgency=low + + * libicu40 -> libicu + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-6 + + -- MyoungJune Park Mon, 16 May 2011 11:22:51 +0900 + +setting (0.1.85-5) unstable; urgency=low + + * release of itc, by evas_object_callback_add. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-5 + + -- MyoungJune Park Sat, 14 May 2011 16:36:02 +0900 + +setting (0.1.85-4) unstable; urgency=low + + * re upload. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-4 + + -- MyoungJune Park Fri, 13 May 2011 19:31:21 +0900 + +setting (0.1.85-3) unstable; urgency=low + + * Fix the BS caused by elm_genlist_clear in 'Sound' menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-3 + + -- Yin Kairong Fri, 13 May 2011 17:04:24 -0700 + +setting (0.1.85-2) unstable; urgency=low + + * Fix H0100126764. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-2 + + -- Yin Kairong Fri, 13 May 2011 11:44:04 -0700 + +setting (0.1.85-1) unstable; urgency=low + + * added ecore_event_handler_add/del pair. (for debugging). + * Apply safe string operation interfaces, such as safeStrNCmp,safeStrCmp,safeCopyStr,safeStrLen.. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.85-1 + + -- MyoungJune Park Thu, 12 May 2011 20:24:46 -0700 + +setting (0.1.84-103) unstable; urgency=low + + * Re-impliment the interface 'setting_create_Gendial_itc' and adjust the release squence. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-103 + + -- Yin Kairong Thu, 12 May 2011 19:09:28 -0700 + +setting (0.1.84-102) unstable; urgency=low + + * Fix some issue in 'Reset' Menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-102 + + -- Yin Kairong Thu, 12 May 2011 19:04:51 -0700 + +setting (0.1.84-101) unstable; urgency=low + + * implement the function of 'Brightness' auto saving. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-101 + + -- Yin Kairong Thu, 12 May 2011 19:02:42 -0700 + +setting (0.1.84-100) unstable; urgency=low + + * disable Exchange-efl + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-100 + + -- MyoungJune Park Thu, 12 May 2011 17:15:09 +0900 + +setting (0.1.84-99) unstable; urgency=low + + * fixed failing to load voicerecorder ug. + * Apply new UI of 'Date and time'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-99 + + -- MyoungJune Park Thu, 12 May 2011 17:01:47 +0900 + +setting (0.1.84-98) unstable; urgency=low + + * removed seven-email UG from Setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-98 + + -- MyoungJune Park Thu, 12 May 2011 10:52:41 +0900 + +setting (0.1.84-97) unstable; urgency=low + + * added B/S protection code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-97 + + -- MyoungJune Park Wed, 11 May 2011 14:11:37 +0900 + +setting (0.1.84-96) unstable; urgency=low + + * added B/S protection code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-96 + + -- MyoungJune Park Wed, 11 May 2011 12:56:28 +0900 + +setting (0.1.84-95) unstable; urgency=low + + * Modified the items needed to be reset in 'Reset' menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-95 + + -- Yin Kairong Tue, 10 May 2011 17:27:49 -0700 + +setting (0.1.84-94) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-94 + + -- Feng Kai Tue, 10 May 2011 17:18:23 -0700 + +setting (0.1.84-93) unstable; urgency=low + + * Re-implement the UI of selecting-lists in 'Edir favourite', 'Reset', and 'Network->Preferred networks->Delete'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-93 + + -- Yin Kairong Tue, 10 May 2011 15:54:58 -0700 + +setting (0.1.84-92) unstable; urgency=low + + * Fix the <-' button missing issue on the navigate bar in 'Wallpaper' menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-92 + + -- Yin Kairong Tue, 10 May 2011 15:50:01 -0700 + +setting (0.1.84-91) unstable; urgency=low + + * Adjust the layout of wallpaper main view. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-91 + + -- Yin Kairong Mon, 09 May 2011 17:20:39 -0700 + +setting (0.1.84-90) unstable; urgency=low + + * Re-implement the expandable-list style of Setting, add annimation effect, Clear the unused code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-90 + + -- Yin Kairong Mon, 09 May 2011 15:01:50 -0700 + +setting (0.1.84-89) unstable; urgency=low + + * Chnage the layout style of the navigatebar's buttons. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-89 + + -- Yin Kairong Fri, 06 May 2011 13:25:42 -0700 + +setting (0.1.84-88) unstable; urgency=low + + * Remove the background image of Display->Brightness, Add POPUP notify when user switch License->Expiry reminder. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-88 + + -- Yin Kairong Fri, 06 May 2011 13:21:14 -0700 + +setting (0.1.84-87) unstable; urgency=low + + * Adjust the font_size of POPUP text. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-87 + + -- Yin Kairong Fri, 06 May 2011 13:18:57 -0700 + +setting (0.1.84-86) unstable; urgency=low + + * Upload package to apply modifies. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-86 + + -- Yin Kairong Thu, 05 May 2011 08:54:21 -0700 + +setting (0.1.84-85) unstable; urgency=low + + * Upgrade security of Sound Playing and fix the screen-locked issues of playing 'Raising melody','vibration then melody','vibr.&rising melody'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-85 + + -- Yin Kairong Wed, 04 May 2011 08:23:16 -0700 + +setting (0.1.84-84) unstable; urgency=low + + * Make 'clicking text' and 'clicking buttton'of the expandable genlist item have the same effect. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-84 + + -- Yin Kairong Wed, 04 May 2011 08:18:14 -0700 + +setting (0.1.84-83) unstable; urgency=low + + * Change 'landscape mode' to be 'rotation lock' menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-83 + + -- Yin Kairong Tue, 03 May 2011 13:22:34 -0700 + +setting (0.1.84-82) unstable; urgency=low + + * Replace Setting icons with new ones. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-82 + + -- Yin Kairong Tue, 03 May 2011 13:20:07 -0700 + +setting (0.1.84-81) unstable; urgency=low + + * Apply help-dialoggroup style item in network menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-81 + + -- Yin Kairong Tue, 03 May 2011 13:16:08 -0700 + +setting (0.1.84-80) unstable; urgency=low + + * Perfect the new Sound UI according to the newest UI guildline and fix some issues in Sound. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-80 + + -- Yin Kairong Tue, 03 May 2011 11:09:00 -0700 + +setting (0.1.84-79) unstable; urgency=low + + * Clear text for edit field + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-79 + + -- MyoungJune Park Mon, 02 May 2011 21:03:15 +0200 + +setting (0.1.84-78) unstable; urgency=low + + * Clear text for edit field + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-78 + + -- Jungmin Kim Mon, 02 May 2011 17:44:20 +0900 + +setting (0.1.84-77) unstable; urgency=low + + * Upload pkg to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-77 + + -- Yin Kairong Wed, 04 May 2011 23:36:11 -0700 + +setting (0.1.84-76) unstable; urgency=low + + * Apply new sound UI and remove the unused code. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-76 + + -- Yin Kairong Sun, 24 Apr 2011 15:12:40 -0700 + +setting (0.1.84-75) unstable; urgency=low + + * Upload pkg to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-75 + + -- Yin Kairong Fri, 22 Apr 2011 03:07:28 -0700 + +setting (0.1.84-74) unstable; urgency=low + + * updated ringtone path. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-74 + + -- MyoungJune Park Fri, 22 Apr 2011 00:03:36 +0900 + +setting (0.1.84-73) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-73 + + -- Yin Kairong Wed, 20 Apr 2011 18:41:58 +0800 + +setting (0.1.84-72) unstable; urgency=low + + * Fix all the blinking issues, such as H0100123769,H0100123787, H0100124825 + etc.. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-72 + + -- Yin Kairong Wed, 20 Apr 2011 16:55:46 +0800 + +setting (0.1.84-71) unstable; urgency=low + + * Replace old icons with new ones. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-71 + + -- Yin Kairong Wed, 20 Apr 2011 11:50:26 +0800 + +setting (0.1.84-70) unstable; urgency=low + + * Change backgroup color of Setting App and its UG to dialoggroup + style(brwon color) 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-70 + + -- MyoungJune Park Wed, 20 Apr 2011 00:18:50 +0900 + +setting (0.1.84-69) unstable; urgency=low + + * Change backgroup color of Setting App and its UG to dialoggroup + style(brwon color).. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-69 + + -- Yin Kairong Tue, 19 Apr 2011 15:47:52 +0800 + +setting (0.1.84-68) unstable; urgency=low + + * re-arrange the code of 'memory status'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-68 + + -- MyoungJune Park Tue, 19 Apr 2011 22:26:48 +0900 + +setting (0.1.84-67) unstable; urgency=low + + * fixed crash when moving from Sound to Account ug. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-67 + + -- MyoungJune Park Tue, 19 Apr 2011 20:43:51 +0900 + +setting (0.1.84-66) unstable; urgency=low + + * fixed 'lock up ' issue when touching Seven e-mail UG, becuase of lack of + exception handling code in Setting app. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-66 + + -- MyoungJune Park Tue, 19 Apr 2011 17:50:27 +0900 + +setting (0.1.84-65) unstable; urgency=low + + * set USB mode to KIES as default. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-65 + + -- MyoungJune Park Mon, 18 Apr 2011 22:20:15 +0900 + +setting (0.1.84-64) unstable; urgency=low + + * disabled new Sound menu to old Sound menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-64 + + -- MyoungJune Park Mon, 18 Apr 2011 18:52:04 +0900 + +setting (0.1.84-63) unstable; urgency=low + + * fixed the showing black screen, when setting home screen/lock screen + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-63 + + -- MyoungJune Park Sun, 17 Apr 2011 03:09:08 +0900 + +setting (0.1.84-62) unstable; urgency=low + + * added appnames, that shouldn't be terminated when choosing language. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-62 + + -- MyoungJune Park Sat, 16 Apr 2011 20:33:23 +0900 + +setting (0.1.84-60) unstable; urgency=low + + * set USB setting to 'debug mode' as default. 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-60 + + -- MyoungJune Park Fri, 15 Apr 2011 02:36:51 +0900 + +setting (0.1.84-59) unstable; urgency=low + + * set USB setting to 'debug mode' as default. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-59 + + -- MyoungJune Park Fri, 15 Apr 2011 02:32:10 +0900 + +setting (0.1.84-58) unstable; urgency=low + + * Apply genlist dialoggroup style in Setting App and its UGs. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-58 + + -- Yin Kairong Wed, 13 Apr 2011 11:43:42 +0800 + +setting (0.1.84-57) unstable; urgency=low + + * changed the package name form 'deb.com...' to 'com...' (removal of 'deb' prefix). 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: setting_0.1.84-57 + + -- MyoungJune Park Wed, 13 Apr 2011 00:10:24 +0900 + +setting (0.1.84-56) unstable; urgency=low + + * changed the package name form 'deb.com...' to 'com...' (removal of 'deb' prefix). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: com.samsung.setting_0.1.84-56 + + -- MyoungJune Park Tue, 12 Apr 2011 17:05:49 +0900 + +setting (0.1.84-54) unstable; urgency=low + + * Upload package. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-54 + + -- Yin Kairong Mon, 11 Apr 2011 19:38:24 +0800 + +deb.com.samsung.setting (0.1.84-53) unstable; urgency=low + + * Upload package to apply changes. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-53 + + -- Yin Kairong Fri, 08 Apr 2011 17:18:37 +0800 + +deb.com.samsung.setting (0.1.84-52) unstable; urgency=low + + * Fix H0100123920,H0100124096 and H0100123918(selecting items in settings over notification popup white bar appears) + Fix H0100123835 (Date Time > touch toggle of 'Automatic' > 'Cancel' - the toggle button changed, but it should not.) + Fix H0100123793 [EXP][Display Error] No title after opening Change wallpaper option. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-52 + + -- Yin Kairong Fri, 08 Apr 2011 13:55:15 +0800 + +deb.com.samsung.setting (0.1.84-51) unstable; urgency=low + + * Upload pkg to apply modifies for GCF. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-51 + + -- MyoungJune Park Thu, 07 Apr 2011 23:46:32 +0900 + +deb.com.samsung.setting (0.1.84-50) unstable; urgency=low + + * Upload pkg to apply modifies. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-50 + + -- Yin Kairong Tue, 17 May 2011 08:57:45 +0800 + +deb.com.samsung.setting (0.1.84-49) unstable; urgency=low + + * Fix some issue about memory and LCD dimmed, Raise the ability of + Fault-tolerant. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-49 + + -- Yin Kairong Sat, 02 Apr 2011 17:16:19 +0800 + +deb.com.samsung.setting (0.1.84-48) unstable; urgency=low + + * Make entry string notable when flicking genlist and Perfect the enabling + or disabling right button accordingly to entrys empty checking. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-48 + + -- Yin Kairong Thu, 31 Mar 2011 15:43:37 +0800 + +deb.com.samsung.setting (0.1.84-47) unstable; urgency=low + + * Add functions of automatic selecting toogle-checks, when genlist item being selected. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-47 + + -- Yin Kairong Thu, 31 Mar 2011 11:42:45 +0800 + +deb.com.samsung.setting (0.1.84-46) unstable; urgency=low + + * Add empty/select nothing checking in 'setting->edit favourite', + 'system-reset', 'system->memory->clear phone memory' and fix H0100123598, + H0100123407,H0100123405. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-46 + + + -- Yin Kairong Wed, 30 Mar 2011 23:54:00 +0800 + +deb.com.samsung.setting (0.1.84-45) unstable; urgency=low + + * Fix the build break and upload pkg again + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-45 + + -- Yin Kairong Tue, 29 Mar 2011 11:04:18 +0800 + +deb.com.samsung.setting (0.1.84-44) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-44 + + -- Yin Kairong Mon, 28 Mar 2011 18:14:36 +0800 + +deb.com.samsung.setting (0.1.84-43) unstable; urgency=low + + * Perfect the layout of navigatebar subobjects and disable some reserved + menus. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-43 + + -- Yin Kairong Mon, 28 Mar 2011 16:13:59 +0800 + +deb.com.samsung.setting (0.1.84-42) unstable; urgency=low + + * Add functions of automatic selecting checks or radios, when genlist item being selected. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-42 + + -- Yin Kairong Mon, 28 Mar 2011 15:06:25 +0800 + +deb.com.samsung.setting (0.1.84-41) unstable; urgency=low + + * Upload package for apply some modifies. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-41 + + -- Yin Kairong Mon, 28 Mar 2011 05:54:21 +0800 + +deb.com.samsung.setting (0.1.84-40) unstable; urgency=low + + * Fix build break and upload pkg again. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-40 + + -- Yin Kairong Fri, 25 Mar 2011 18:50:51 +0800 + +deb.com.samsung.setting (0.1.84-39) unstable; urgency=low + + * Fixed some issues and upload package to apply them. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-39 + + -- Yin Kairong Thu, 24 Mar 2011 17:17:18 +0800 + +deb.com.samsung.setting (0.1.84-38) unstable; urgency=low + + * Add 'Landscape mode' menu in beat and nbeat theme(including sync with + quick panel). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-38 + + -- Yin Kairong Thu, 24 Mar 2011 10:35:54 +0800 + +deb.com.samsung.setting (0.1.84-37) unstable; urgency=low + + * Add missed icon files and upload pkg to apply all the modifies. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-37 + + -- Yin Kairong Wed, 23 Mar 2011 16:33:45 +0800 + +deb.com.samsung.setting (0.1.84-36) unstable; urgency=low + + * Make Setting nbeat theme more humanable. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-36 + + -- Yin Kairong Wed, 23 Mar 2011 16:21:56 +0800 + +deb.com.samsung.setting (0.1.84-35) unstable; urgency=low + + * Apply nbeat style in view of system->memory->memory status. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-35 + + -- Yin Kairong Wed, 23 Mar 2011 16:14:23 +0800 + +deb.com.samsung.setting (0.1.84-34) unstable; urgency=low + + * Enable new Wallpaper UI. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-34 + + -- Yin Kairong Wed, 23 Mar 2011 16:10:15 +0800 + +deb.com.samsung.setting (0.1.84-33) unstable; urgency=low + + * repackage. 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-33 + + -- MyoungJune Park Wed, 23 Mar 2011 18:14:33 +0900 + +deb.com.samsung.setting (0.1.84-32) unstable; urgency=low + + * repackage. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-32 + + -- MyoungJune Park Wed, 23 Mar 2011 18:04:55 +0900 + +deb.com.samsung.setting (0.1.84-31) unstable; urgency=low + + * Finish all the remaining nbeat supporting work, such as applying nbeat in + views of menu 'network, tvout, display, sound, time, license'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-31 + + -- Yin Kairong Mon, 21 Mar 2011 21:15:39 +0800 + +deb.com.samsung.setting (0.1.84-30) unstable; urgency=low + + * Apply nbeat in some views of menu 'network/sound/license'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-30 + + -- Yin Kairong Fri, 18 Mar 2011 17:37:10 +0800 + +deb.com.samsung.setting (0.1.84-29) unstable; urgency=low + + * Apply nbeat in menu 'about/usb connection/tvout/font/home screen&lock + screen/memory/event notification/touch/language/reset/security/task + switch/menu screen/Menu and widgets'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-29 + + -- Yin Kairong Fri, 18 Mar 2011 17:33:33 +0800 + +deb.com.samsung.setting (0.1.84-28) unstable; urgency=low + + * Fix some bugs. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-28 + + -- Yin Kairong Wed, 16 Mar 2011 17:22:50 +0800 + +deb.com.samsung.setting (0.1.84-27) unstable; urgency=low + + * Apply the NBEAT UI and fix build warring. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-27 + + -- Yin Kairong Wed, 16 Mar 2011 16:36:59 +0800 + +deb.com.samsung.setting (0.1.84-26) unstable; urgency=low + + * Upload pkg. ( to support GCC 4.55 ) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-26 + + -- MyoungJune Park Wed, 16 Mar 2011 01:15:47 +0900 + +deb.com.samsung.setting (0.1.84-25) unstable; urgency=low + + * Upload pkg. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-25 + + -- Yin Kairong Thu, 10 Mar 2011 08:42:48 +0800 + +deb.com.samsung.setting (0.1.84-24) unstable; urgency=low + + * Date/Time : removed warning messages at runtime. + * Sounds(new) : Rearrange parents of evas objects + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-24 + + -- MyoungJune Park Wed, 09 Mar 2011 17:13:42 +0900 + +deb.com.samsung.setting (0.1.84-23) unstable; urgency=low + + * . + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-23 + + -- Yin Kairong Tue, 08 Mar 2011 10:29:38 +0800 + +deb.com.samsung.setting (0.1.84-22) unstable; urgency=low + + * renewed System > Sound with disabled. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-22 + + -- MyoungJune Park Thu, 03 Mar 2011 23:18:20 +0900 + +deb.com.samsung.setting (0.1.84-21) unstable; urgency=low + + * refine code for preferred network list. 2 + * disabled Wallpaper to wait for stable condition. + * fixed set date/time code to change DST+. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-21 + + -- MyoungJune Park Tue, 01 Mar 2011 07:41:16 +0900 + +deb.com.samsung.setting (0.1.84-20) unstable; urgency=low + + * refine code for preferred network list. + * disabled Wallpaper to wait for stable condition. + * fixed set date/time code to change DST+. + * Tag: deb.com.samsung.setting_0.1.84-20 + + -- MyoungJune Park Mon, 28 Feb 2011 07:32:01 +0900 + +deb.com.samsung.setting (0.1.84-19) unstable; urgency=low + + * Fix H0100121402(Flight mode is damaged. User can turn it off and than it is still active.) 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-19 + + -- MyoungJune Park Sun, 27 Feb 2011 15:32:48 +0900 + +deb.com.samsung.setting (0.1.84-18) unstable; urgency=low + + * Fix H0100121402(Flight mode is damaged. User can turn it off and than it is still active.) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-18 + + -- MyoungJune Park Sun, 27 Feb 2011 15:24:36 +0900 + +deb.com.samsung.setting (0.1.84-17) unstable; urgency=low + + * fixed H0100117283 again - it displayed wrong GMT string 2 + * fixed H0100121308. + * fixed H0100120712. + * Added selection info popup. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-17 + + -- MyoungJune Park Sun, 27 Feb 2011 13:10:08 +0900 + +deb.com.samsung.setting (0.1.84-16) unstable; urgency=low + + * fixed H0100117283 again - it displayed wrong GMT string. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-16 + + -- MyoungJune Park Sun, 27 Feb 2011 12:24:47 +0900 + +deb.com.samsung.setting (0.1.84-15) unstable; urgency=low + + * fixed H0100120892. + * replaced the depricated segmentcontrol APIs with new ones. + * Removed initDB for .setting.db + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-15 + + -- MyoungJune Park Fri, 25 Feb 2011 18:17:54 +0900 + +deb.com.samsung.setting (0.1.84-14) unstable; urgency=low + + * disabled Privacy Lock UI. + * fixed H0100121191, H0100121187 - toggle button for expandable list. + * Merge "refine add/edit preferred network UI update work flow" + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-14 + + -- MyoungJune Park Fri, 25 Feb 2011 15:09:55 +0900 + +deb.com.samsung.setting (0.1.84-13) unstable; urgency=low + + * Renew the wallpaper UI and debug the new main view(Favourite&All).. + * disabled 'Font' menu, as UX 0.9 removed 'Font' menu. + * fixed bugs on USB-setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-13 + + -- MyoungJune Park Tue, 22 Feb 2011 22:12:14 +0800 + +deb.com.samsung.setting (0.1.84-12) unstable; urgency=low + + * enabled 'Calendar' menu. + * disabled 'Font' menu. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-12 + + -- MyoungJune Park Wed, 23 Feb 2011 14:24:12 +0900 + +deb.com.samsung.setting (0.1.84-11) unstable; urgency=low + + * renew USB-setting + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-11 + + -- MyoungJune Park Wed, 23 Feb 2011 13:26:44 +0900 + +deb.com.samsung.setting (0.1.84-10) unstable; urgency=low + + * Improve the function of automatic language setting + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-10 + + -- Yin Kairong Sun, 20 Feb 2011 23:51:35 +0800 + +deb.com.samsung.setting (0.1.84-9) unstable; urgency=low + + * Apply the function of automatic language setting via sim card. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-9 + + -- Yin Kairong Sun, 20 Feb 2011 20:04:54 +0800 + +deb.com.samsung.setting (0.1.84-8) unstable; urgency=low + + * "add "Cancel" button in search popup". + * Fix CQ H0100121077, H0100121021,H0100120962, and H0100120970 . + * fixed Issues from Prevent. + * update path of default ringtone path. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-8 + + -- MyoungJune Park Fri, 18 Feb 2011 09:47:18 +0900 + +deb.com.samsung.setting (0.1.84-7) unstable; urgency=low + + * Resolve the ringtone playing BS issues occured after memory being cleared or format. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-7 + + -- Yin Kairong Thu, 17 Feb 2011 04:13:43 +0800 + +deb.com.samsung.setting (0.1.84-6) unstable; urgency=low + + * back key -> end key. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-6 + + -- Byungwook Jang Wed, 16 Feb 2011 21:41:10 +0900 + +deb.com.samsung.setting (0.1.84-5) unstable; urgency=low + + * Upload pkg for applying modifies. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-5 + + -- Yin Kairong Wed, 16 Feb 2011 17:33:30 +0800 + +deb.com.samsung.setting (0.1.84-4) unstable; urgency=low + + * Fix the hangs on issues when *.so file of a UG is not exist;Keep titles of + 'Lock screen' the same + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-4 + + -- Yin Kairong Wed, 16 Feb 2011 17:30:42 +0800 + +deb.com.samsung.setting (0.1.84-3) unstable; urgency=low + + * updated configuraiton + * - enabled USE_FAVOURITE_LIST_OPTION_TIMER, after fixing bugs. + * - enabled GL engine option. + * fixed H0100120191, H0100119891 + * fixed a bug that the indicator of slider control is invisible when expanding list + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-3 + + -- MyoungJune Park Mon, 14 Feb 2011 12:12:36 +0900 + +deb.com.samsung.setting (0.1.84-2) unstable; urgency=low + + * fixed H0100117283 & H0100117284. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-2 + + -- MyoungJune Park Thu, 10 Feb 2011 19:36:06 +0900 + +deb.com.samsung.setting (0.1.84-1) unstable; urgency=low + + * Fix CQs H0100117129 & H0100119887 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.84-1 + + -- Yin Kairong Wed, 09 Feb 2011 23:06:32 +0800 + +deb.com.samsung.setting (0.1.83-94) unstable; urgency=low + + * disabled the GL function for MWC demo. 2 + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-94 + + -- MyoungJune Park Wed, 09 Feb 2011 14:14:56 +0900 + +deb.com.samsung.setting (0.1.83-93) unstable; urgency=low + + * disabled the GL function for MWC demo. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-93 + + -- MyoungJune Park Wed, 09 Feb 2011 11:56:38 +0900 + +deb.com.samsung.setting (0.1.83-92) unstable; urgency=low + + * enabled the indicator at top of window. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-92 + + -- MyoungJune Park Wed, 09 Feb 2011 10:03:15 +0900 + +deb.com.samsung.setting (0.1.83-91) unstable; urgency=low + + * added pm_api dependency. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-91 + + -- MyoungJune Park Wed, 09 Feb 2011 08:22:53 +0900 + +deb.com.samsung.setting (0.1.83-90) unstable; urgency=low + + * Change icon. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-90 + + -- MyoungJune Park Tue, 08 Feb 2011 19:23:03 +0900 + +deb.com.samsung.setting (0.1.83-89) unstable; urgency=low + + * on C210 device : + * 1. Setting app blocked after getting out USB connection menu , with favourite menu. + * 2. display > brightness, the window is overrapped with the indicator at top randomly. + * 3. display > brightness, the bg image is set too big. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-89 + + -- MyoungJune Park Tue, 08 Feb 2011 12:22:28 +0900 + +deb.com.samsung.setting (0.1.83-88) unstable; urgency=low + + * Change Vconf Path for seleted theme + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-88 + + -- MyoungJune Park Tue, 08 Feb 2011 11:33:10 +0900 + +deb.com.samsung.setting (0.1.83-87) unstable; urgency=low + + * disabled 'Back key' to 'End key'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-87 + + -- MyoungJune Park Mon, 07 Feb 2011 13:12:06 +0900 + +deb.com.samsung.setting (0.1.83-86) unstable; urgency=low + + * fixed H0100120053, H0100120054 - password-efl, added textdomain (~ ). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-86 + + -- MyoungJune Park Sun, 06 Feb 2011 16:18:47 +0900 + +deb.com.samsung.setting (0.1.83-85) unstable; urgency=low + + * fixed a bug that after entering to plugin model and exit list is scrolled up. (H0100120257). + * fixed a bug that DST toggle button is able to set when Automatic time update is On. (H0100118760). + * fixed the typing error (H0100119997, H0100120001). + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-85 + + -- MyoungJune Park Sat, 05 Feb 2011 11:34:13 +0900 + +deb.com.samsung.setting (0.1.83-84) unstable; urgency=low + + * renew USB connection setting in progress - 2. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-84 + + -- MyoungJune Park Tue, 01 Feb 2011 17:54:07 +0900 + +deb.com.samsung.setting (0.1.83-83) unstable; urgency=low + + * renew USB connection setting in progress. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-83 + + -- MyoungJune Park Tue, 01 Feb 2011 16:52:27 +0900 + +deb.com.samsung.setting (0.1.83-82) unstable; urgency=low + + * added textdomain in timeug/language setting ug. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-82 + + -- MyoungJune Park Tue, 01 Feb 2011 16:29:05 +0900 + +deb.com.samsung.setting (0.1.83-81) unstable; urgency=low + + * fixed rpath problem. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-81 + + -- MyoungJune Park Mon, 31 Jan 2011 19:27:05 +0900 + +deb.com.samsung.setting (0.1.83-80) unstable; urgency=low + + * 1.Fix the BS issue of Setting >> Sound >> Normal >> move the volme gage >> + 'back' hard key >> select 'set' button >> BS (5 out of 8 trial) + 2.Fix the rollback issue of 'Display->Brightness->move the slider bar' + 3.Fix the rollback issue of 'Touch->move the slider bar'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-79 + + -- Yin Kairong Mon, 31 Jan 2011 15:29:52 +0800 + +deb.com.samsung.setting (0.1.83-79) unstable; urgency=low + + * Upload pkg to apply modifies. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-79 + + -- Yin Kairong Mon, 31 Jan 2011 09:40:52 +0800 + +deb.com.samsung.setting (0.1.83-78) unstable; urgency=low + + * To fix the issues of missing 'image-list' and 'memory status'. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-78 + + -- Yin Kairong Sat, 29 Jan 2011 10:32:32 +0800 +deb.com.samsung.setting (0.1.83-76) unstable; urgency=low + + * Apply annimation effect in Setting main-view & Implement 'End key' process + in main-view. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-76 + + -- Yin Kairong Sat, 29 Jan 2011 08:39:39 +0800 + +deb.com.samsung.setting (0.1.83-75) unstable; urgency=low + + * disalbed vconf_set for language. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-75 + + -- MyoungJune Park Fri, 28 Jan 2011 12:24:04 +0900 + +deb.com.samsung.setting (0.1.83-74) unstable; urgency=low + + * disalbed pop-up at startup. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-74 + + -- MyoungJune Park Thu, 27 Jan 2011 21:52:12 +0900 + +deb.com.samsung.setting (0.1.83-73) unstable; urgency=low + + * applied new dir structure. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-73 + + -- MyoungJune Park Thu, 27 Jan 2011 18:12:09 +0900 + +deb.com.samsung.setting (0.1.83-72) unstable; urgency=low + + * avoid B/S caused by 'Back key' in Language Setting. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-72 + + -- MyoungJune Park Tue, 25 Jan 2011 15:35:52 +0900 + +deb.com.samsung.setting (0.1.83-71) unstable; urgency=low + + * modified SevenEmail icon path. + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-71 + + -- MyoungJune Park Tue, 25 Jan 2011 08:18:19 +0900 + +deb.com.samsung.setting (0.1.83-70) unstable; urgency=low + + * 1.Re-implement 'End Key' process in all UGs + 2.Re-implement 'Annimation' effect in all UGs + 3.Add implement of 'Annimation' effect in some UGs, such as + memory/security/tvout/default-app + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-70 + + -- Yin Kairong Mon, 24 Jan 2011 17:00:26 +0800 + +deb.com.samsung.setting (0.1.83-69) unstable; urgency=low + + * Fix Code (Setting Password UG) ( fix popup callback fucntion ) + * Git: 165.213.180.234:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-69 + + -- Junghyun Kim Mon, 24 Jan 2011 17:03:35 +0900 + +deb.com.samsung.setting (0.1.83-68) unstable; urgency=low + + * 'End Key' in date/time ug. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-68 + + -- MyoungJune Park Mon, 24 Jan 2011 16:47:49 +0900 + +deb.com.samsung.setting (0.1.83-67) unstable; urgency=low + + * Re-apply 'End Key' in ug-setting-network-efl. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-67 + + -- Yin Kairong Mon, 24 Jan 2011 14:46:33 +0800 + +deb.com.samsung.setting (0.1.83-66) unstable; urgency=low + + * fix bug (H0100118999) destory the popup when UG destory. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-66 + + -- MyoungJune Park Mon, 24 Jan 2011 13:20:15 +0900 + +deb.com.samsung.setting (0.1.83-65) unstable; urgency=low + + * Fix bugs such as H0100119050,H0100117461,H0100111404 etc.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-65 + + -- Yin Kairong Sat, 22 Jan 2011 21:55:12 +0800 + +deb.com.samsung.setting (0.1.83-64) unstable; urgency=low + + * repackage. 3 + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-64 + + -- MyoungJune Park Fri, 21 Jan 2011 11:15:25 +0900 + +deb.com.samsung.setting (0.1.83-63) unstable; urgency=low + + * repackage. 2 + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-63 + + -- MyoungJune Park Fri, 21 Jan 2011 10:04:08 +0900 + +deb.com.samsung.setting (0.1.83-62) unstable; urgency=low + + * repackage. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-62 + + -- MyoungJune Park Fri, 21 Jan 2011 09:51:51 +0900 + +deb.com.samsung.setting (0.1.83-61) unstable; urgency=low + + * Add exceptional process of 'huge image' in ug-imagelist-efl. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-61 + + -- Yin Kairong Thu, 20 Jan 2011 03:01:06 +0800 + +deb.com.samsung.setting (0.1.83-60) unstable; urgency=low + + * store wallpaper and lockscreen in separate dir. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-60 + + -- Yin Kairong Thu, 20 Jan 2011 02:57:07 +0800 + +deb.com.samsung.setting (0.1.83-59) unstable; urgency=low + + * Add viewtype in setting password ug(for gallery) + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-59 + + -- Junghyun Kim Wed, 19 Jan 2011 14:42:24 +0900 + +deb.com.samsung.setting (0.1.83-58) unstable; urgency=low + + * added key check code. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-58 + + -- MyoungJune Park Wed, 19 Jan 2011 08:51:42 +0900 + +deb.com.samsung.setting (0.1.83-57) unstable; urgency=low + + * Fix display popup issue in setting-password-ug + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-57 + + -- Junghyun Kim Sat, 15 Jan 2011 15:32:20 +0900 + +deb.com.samsung.setting (0.1.83-56) unstable; urgency=low + + * Fix bug in password-ug ( failed to set password ) + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-56 + + -- Junghyun Kim Sat, 15 Jan 2011 14:10:02 +0900 + +deb.com.samsung.setting (0.1.83-55) unstable; urgency=low + + * To fix the vconfs listen failed issue(failed to set + wallpaper&lockscreen&..). + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-55 + + -- Yin Kairong Fri, 14 Jan 2011 17:14:56 +0800 + +deb.com.samsung.setting (0.1.83-54) unstable; urgency=low + + * animation effect. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-54 + + -- MyoungJune Park Fri, 14 Jan 2011 16:03:21 +0900 + +deb.com.samsung.setting (0.1.83-53) unstable; urgency=low + + * Apply Vconf DAC. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-53 + + -- Yin Kairong Fri, 14 Jan 2011 10:28:47 +0800 + +deb.com.samsung.setting (0.1.83-52) unstable; urgency=low + + * applied page to page animation ( basic navigation bar effect ). + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-52 + + -- MyoungJune Park Thu, 13 Jan 2011 22:27:08 +0900 + +deb.com.samsung.setting (0.1.83-51) unstable; urgency=low + + * applied new UI gadget to deal with 'END KEY' in ug. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-51 + + -- MyoungJune Park Thu, 13 Jan 2011 10:04:49 +0900 + +deb.com.samsung.setting (0.1.83-50) unstable; urgency=low + + * removed deprecated Elementary APIs. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-50 + + -- MyoungJune Park Wed, 12 Jan 2011 16:51:25 +0900 + +deb.com.samsung.setting (0.1.83-49) unstable; urgency=low + + * fix issue of setting_dialoggroup_list_mouse_up_ignore_checking is not working properly. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-49 + + -- Yin Kairong Wed, 12 Jan 2011 13:20:18 +0800 + +deb.com.samsung.setting (0.1.83-48) unstable; urgency=low + + * Adjust the view of 'memory status'. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-48 + + -- Yin Kairong Wed, 12 Jan 2011 13:17:39 +0800 + +deb.com.samsung.setting (0.1.83-47) unstable; urgency=low + + * Improve the self-translation of toggle + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-47 + + -- Yin Kairong Wed, 12 Jan 2011 13:13:07 +0800 + +deb.com.samsung.setting (0.1.83-46) unstable; urgency=low + + * applied patch from winset team - displaying state of Theme ug + * enable sweep style toggle button Automatic / DST in Date/Time + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-46 + + -- MyoungJune Park Tue, 11 Jan 2011 21:46:47 +0900 + +deb.com.samsung.setting (0.1.83-45) unstable; urgency=low + + * enabled GL engine. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-45 + + -- MyoungJune Park Tue, 11 Jan 2011 20:02:35 +0900 + +deb.com.samsung.setting (0.1.83-44) unstable; urgency=low + + * Upload package to fix some bugs. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-44 + + -- Yin Kairong Tue, 11 Jan 2011 15:57:34 +0800 + +deb.com.samsung.setting (0.1.83-43) unstable; urgency=low + + * Add 'exceptional checking' in ug-imagelist-efl. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-43 + + -- Yin Kairong Tue, 11 Jan 2011 15:36:50 +0800 + +deb.com.samsung.setting (0.1.83-42) unstable; urgency=low + + * Make Setting more stable. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-42 + + -- Yin Kairong Tue, 11 Jan 2011 15:32:40 +0800 + +deb.com.samsung.setting (0.1.83-41) unstable; urgency=low + + * repackage. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-41 + + -- MyoungJune Park Tue, 11 Jan 2011 16:07:11 +0900 + +deb.com.samsung.setting (0.1.83-40) unstable; urgency=low + + * made transparent bg window in Sound + * disalbed Font menu. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-40 + + -- MyoungJune Park Tue, 11 Jan 2011 15:51:06 +0900 + +deb.com.samsung.setting (0.1.83-39) unstable; urgency=low + + * moved Task Switcher to Connectivity + * disabled setting_dialoggroup_list_mouse_up_ignore_checking in Date/time. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-39 + + -- MyoungJune Park Sat, 08 Jan 2011 15:30:12 +0900 + +deb.com.samsung.setting (0.1.83-38) unstable; urgency=low + + * repackage + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-38 + + -- MyoungJune Park Sat, 08 Jan 2011 11:07:08 +0900 + +deb.com.samsung.setting (0.1.83-37) unstable; urgency=low + + * go back to old style UI. + * applied map buf technic (as disabled). + * removed Installation Settings menu. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-37 + + -- MyoungJune Park Fri, 07 Jan 2011 16:14:24 +0900 + +deb.com.samsung.setting (0.1.83-36) unstable; urgency=low + + * Upload package for applying the new UI according v0.8 UI Document + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-36 + + -- Yin Kairong Thu, 06 Jan 2011 21:10:46 +0800 + +deb.com.samsung.setting (0.1.83-35) unstable; urgency=low + + * 1. code optmize about dialoggroup and separator + 2. re-implement the 'Favourite&All' style + 3. re-implement the add-to-favourite check-list,eg,add icons in each item, add group info,add select-all check etc.. + 4. Enable and debug new font UI + 5. add response of user action "Tap&hold" + 6. Remove setting title, + Modify dialogue group tile, + Replace old icons with newer ones + + 7. Remove sub-text in 'home screen'and 'Locked screen' + 8. Adjust position of checkbox, add padding beween groups. + 9. Adjust position of radio buttons, + 10. Fix the bug H0100116848,H0100116894,etc.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-35 + + -- Yin Kairong Thu, 06 Jan 2011 19:26:48 +0800 + +deb.com.samsung.setting (0.1.83-34) unstable; urgency=low + + * Inidicator time update after changing time & timezone set + * Fix strings + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-34 + + -- HyungKyu Song Thu, 06 Jan 2011 13:53:55 +0900 + +deb.com.samsung.setting (0.1.83-33) unstable; urgency=low + + * Fix some bugs. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-33 + + -- Yin Kairong Tue, 04 Jan 2011 15:13:32 +0800 + +deb.com.samsung.setting (0.1.83-32) unstable; urgency=low + + * removed temp code. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-32 + + -- MyoungJune Park Mon, 03 Jan 2011 19:36:38 +0900 + +deb.com.samsung.setting (0.1.83-31) unstable; urgency=low + + * fixed error on displying flight mode state. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-31 + + -- MyoungJune Park Mon, 03 Jan 2011 17:49:07 +0900 + +deb.com.samsung.setting (0.1.83-30) unstable; urgency=low + + * applied new animation effect. - debugging + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-30 + + -- MyoungJune Park Mon, 03 Jan 2011 17:34:33 +0900 + +deb.com.samsung.setting (0.1.83-29) unstable; urgency=low + + * applied new animation effect. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-29 + + -- MyoungJune Park Mon, 03 Jan 2011 11:59:08 +0900 + +deb.com.samsung.setting (0.1.83-28) unstable; urgency=low + + * applied Syncronise ug in place of Sync AUL + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-28 + + -- MyoungJune Park Mon, 03 Jan 2011 09:19:48 +0900 + +deb.com.samsung.setting (0.1.83-27) unstable; urgency=low + + * Upload package for new modifies. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-27 + + -- Yin Kairong Thu, 30 Dec 2010 16:55:08 +0800 + +deb.com.samsung.setting (0.1.83-26) unstable; urgency=low + + * when user click fastly between two menus, Setting should shiled the second + clicking action.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-26 + + -- Yin Kairong Thu, 30 Dec 2010 16:50:11 +0800 + +deb.com.samsung.setting (0.1.83-25) unstable; urgency=low + + * Fix issue of H0100116375,H0100116374 ,H0100116370 , + H0100116364,H0100116362,H0100116357. That is to say, shield the user + action "mouse moving","double clicking","triple clicking" and "mouse + tap&hold" etc... + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-25 + + -- Yin Kairong Thu, 30 Dec 2010 16:39:53 +0800 + +deb.com.samsung.setting (0.1.83-24) unstable; urgency=low + + * 1.Fix the BS issues occurs in fast tapping between servel menus. + 2.Fix the view cannot be shown sucessful(due to animation effort) in fast tapping between servel + menus. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-24 + + -- Yin Kairong Thu, 30 Dec 2010 16:07:10 +0800 + +deb.com.samsung.setting (0.1.83-23) unstable; urgency=low + + * Applying new TAPI in Setting. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-23 + + -- Yin Kairong Thu, 30 Dec 2010 16:02:36 +0800 + +deb.com.samsung.setting (0.1.83-22) unstable; urgency=low + + * Adjust the UI of 'date and time' setting view. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-22 + + -- Yin Kairong Thu, 30 Dec 2010 15:47:27 +0800 + +deb.com.samsung.setting (0.1.83-21) unstable; urgency=low + + * repackage + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-21 + + -- MyoungJune Park Tue, 28 Dec 2010 12:09:21 +0900 + +deb.com.samsung.setting (0.1.83-20) unstable; urgency=low + + * 1. modified path name of ringtone. + * 2. Fix the removing isssue of 'Home Screen & Lock Screen'. + * 3. Re-implement the ug-image-list + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-20 + + -- Yin Kairong Tue, 28 Dec 2010 09:13:45 +0800 + +deb.com.samsung.setting (0.1.83-19) unstable; urgency=low + + * Animation effect for UG(bug fix - when getting back to Setting app from UG). + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-19 + + -- MyoungJune Park Thu, 23 Dec 2010 21:23:26 +0900 + +deb.com.samsung.setting (0.1.83-18) unstable; urgency=low + + * enabled Animation effect for UG. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-18 + + -- MyoungJune Park Thu, 23 Dec 2010 16:24:11 +0900 + +deb.com.samsung.setting (0.1.83-17) unstable; urgency=low + + * Fix some bugs. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-17 + + -- Yin Kairong Thu, 23 Dec 2010 13:17:18 +0800 + +deb.com.samsung.setting (0.1.83-16) unstable; urgency=low + + * change menuscreen library name + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-16 + + -- Junghyun Kim Thu, 23 Dec 2010 12:05:29 +0900 + +deb.com.samsung.setting (0.1.83-15) unstable; urgency=low + + * pkg. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-15 + + -- Yin Kairong Thu, 23 Dec 2010 08:23:51 +0800 + +deb.com.samsung.setting (0.1.83-14) unstable; urgency=low + + * Update for upload + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-14 + + -- Junghyun Kim Wed, 22 Dec 2010 19:20:50 +0900 + +deb.com.samsung.setting (0.1.83-13) unstable; urgency=low + + * Fix some network issues + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-13 + + -- Junghyun Kim Wed, 22 Dec 2010 18:54:54 +0900 + +deb.com.samsung.setting (0.1.83-12) unstable; urgency=low + + * Fix some network issues. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-12 + + -- Yin Kairong Wed, 22 Dec 2010 17:38:54 +0800 + +deb.com.samsung.setting (0.1.83-11) unstable; urgency=low + + * added Animation effect for UG. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-11 + + -- MyoungJune Park Wed, 22 Dec 2010 18:18:42 +0900 + +deb.com.samsung.setting (0.1.83-10) unstable; urgency=low + + * Re-implement the structure of 'Reset'. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-10 + + -- Yin Kairong Wed, 22 Dec 2010 15:26:13 +0800 + +deb.com.samsung.setting (0.1.83-9) unstable; urgency=low + + * 1.Fix the twice invoking issue of mouse_up event callback registered on + compsite buttons + 2.Fix the magic number in the Setting source code + 3.Add exceptional checking after invoking snprintf function + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-9 + + -- Yin Kairong Wed, 22 Dec 2010 15:12:56 +0800 + +deb.com.samsung.setting (0.1.83-8) unstable; urgency=low + + * removed tzdata dependency. 2 + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-8 + + -- MyoungJune Park Wed, 22 Dec 2010 15:05:12 +0900 + +deb.com.samsung.setting (0.1.83-6) unstable; urgency=low + + * removed tzdata dependency. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-6 + + -- MyoungJune Park Wed, 22 Dec 2010 14:46:00 +0900 + +deb.com.samsung.setting (0.1.83-5) unstable; urgency=low + + * disabledd the 'Add to Favorite' feature until discussion with UX team. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-5 + + -- MyoungJune Park Tue, 21 Dec 2010 17:10:18 +0900 + +deb.com.samsung.setting (0.1.83-4) unstable; urgency=low + + * Make the log of Setting more Precise and Readable. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-4 + + -- Yin Kairong Fri, 24 Dec 2010 11:17:13 +0800 + +deb.com.samsung.setting (0.1.83-3) unstable; urgency=low + + * Replace the icon 'Add to Favourite'. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-3 + + -- Yin Kairong Fri, 24 Dec 2010 09:17:04 +0800 + +deb.com.samsung.setting (0.1.83-2) unstable; urgency=low + + * Support the 'Favourite&All' menu style for demo. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-2 + + -- Yin Kairong Fri, 24 Dec 2010 08:51:22 +0800 + +deb.com.samsung.setting (0.1.83-1) unstable; urgency=low + + * 1.Divx info replace from 'About phone' to 'License'. + 2.To fix the issue of failed to reset volumn in 'Reset' menu. + 3.Continue to complete replacing from the 'check' to sweep style 'toggle'. + 4.Add error handling of config operation. + 5.To arrange the code.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.83-1 + + -- Yin Kairong Mon, 20 Dec 2010 15:50:21 +0800 + +deb.com.samsung.setting (0.1.82-99) unstable; urgency=low + + * updated vconf group name. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-99 + + -- MyoungJune Park Fri, 17 Dec 2010 17:34:47 +0900 + +deb.com.samsung.setting (0.1.82-98) unstable; urgency=low + + * Adding code of un-listen the vconfs to avoid BSs. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-98 + + -- Yin Kairong Fri, 17 Dec 2010 15:38:10 +0800 + +deb.com.samsung.setting (0.1.82-97) unstable; urgency=low + + * Improve the rate of comments. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-97 + + -- Yin Kairong Fri, 17 Dec 2010 14:35:04 +0800 + +deb.com.samsung.setting (0.1.82-96) unstable; urgency=low + + * Fix the BS of evas_object_event_callback_del. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-96 + + -- Yin Kairong Fri, 17 Dec 2010 10:57:04 +0800 + +deb.com.samsung.setting (0.1.82-95) unstable; urgency=low + + * updated vconf (seven-email). + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-95 + + -- Yin Kairong Thu, 16 Dec 2010 21:07:59 +0900 + +deb.com.samsung.setting (0.1.82-94) unstable; urgency=low + + * Fix some issues and features. + * - image list chooses 1st image even if selected others. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-94 + + -- Yin Kairong Thu, 16 Dec 2010 17:33:49 +0800 + +deb.com.samsung.setting (0.1.82-93) unstable; urgency=low + + * updated 'sysman_set_datetime'. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-93 + + -- MyoungJune Park Thu, 16 Dec 2010 13:32:50 +0900 + +deb.com.samsung.setting (0.1.82-92) unstable; urgency=low + + * Fix the issue of 'cannot set mmc images as wallpaper'. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-92 + + -- Yin Kairong Wed, 15 Dec 2010 20:26:46 +0800 + +deb.com.samsung.setting (0.1.82-91) unstable; urgency=low + + * Fix the issue of missing subnail in ug-image-list and set duplicate tmp file + as the wallpaper&lockscreen. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-91 + + -- Yin Kairong Wed, 15 Dec 2010 19:37:37 +0800 + +deb.com.samsung.setting (0.1.82-90) unstable; urgency=low + + * change vconf prefix file -> db. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-89 + + -- MyoungJune Park Wed, 15 Dec 2010 20:12:30 +0900 + +deb.com.samsung.setting (0.1.82-89) unstable; urgency=low + + * added vconf group in postinst. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-89 + + -- MyoungJune Park Wed, 15 Dec 2010 20:05:07 +0900 + +deb.com.samsung.setting (0.1.82-88) unstable; urgency=low + + * rename conn_ssid -> connected_ap_name + * fixed error 'unary operator expected' + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-88 + + -- MyoungJune Park Wed, 15 Dec 2010 10:13:32 +0900 + +deb.com.samsung.setting (0.1.82-87) unstable; urgency=low + + * code static checking. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-87 + + -- Yin Kairong Tue, 14 Dec 2010 19:51:35 +0800 + +deb.com.samsung.setting (0.1.82-86) unstable; urgency=low + + * disabled SUPPORT_LCD_TIMEOUT_KEEPING. + * fixed wrong path in plugin-model. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-86 + + -- MyoungJune Park Tue, 14 Dec 2010 17:01:13 +0900 + +deb.com.samsung.setting (0.1.82-85) unstable; urgency=low + + * Applied the sweep style checkbox button. (bug fix 2) + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-85 + + -- MyoungJune Park Mon, 13 Dec 2010 22:48:01 +0900 + +deb.com.samsung.setting (0.1.82-84) unstable; urgency=low + + * Applied the sweep style checkbox button. (bug fix) + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-84 + + -- MyoungJune Park Mon, 13 Dec 2010 16:02:17 +0900 + +deb.com.samsung.setting (0.1.82-83) unstable; urgency=low + + * Applied the sweep style checkbox button. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-83 + + -- MyoungJune Park Mon, 13 Dec 2010 13:39:11 +0900 + +deb.com.samsung.setting (0.1.82-82) unstable; urgency=low + + * Remove unused Mobile Tracker Vconf keys. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-82 + + -- Junghyun Kim Mon, 13 Dec 2010 11:28:37 +0900 + +deb.com.samsung.setting (0.1.82-81) unstable; urgency=low + + * Fix the frequently BS of ug-image-list. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-81 + + -- Yin Kairong Fri, 10 Dec 2010 21:14:45 +0800 + +deb.com.samsung.setting (0.1.82-80) unstable; urgency=low + + * change Back button string + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-80 + + -- HyungKyu Song Fri, 10 Dec 2010 18:30:17 +0900 + +deb.com.samsung.setting (0.1.82-79) unstable; urgency=low + + * fixed some Crashes for Intergrating 'Backlight' and 'Brightness' menu into one, named 'Display' + * Finish applying expandable-list dialoggroup item in 'Sound' setting. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-79 + + -- MyoungJune Park Thu, 09 Dec 2010 06:00:17 +0900 + +deb.com.samsung.setting (0.1.82-78) unstable; urgency=low + + * Apply expandable-list dialoggroup item in 'Sound ->..-> alert type&vib'menu.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-78 + + -- Yin Kairong Wed, 08 Dec 2010 18:44:09 +0800 + +deb.com.samsung.setting (0.1.82-77) unstable; urgency=low + + * Apply expandable-list dialoggroup item in 'License -> Roaming network' menu.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-77 + + -- Yin Kairong Wed, 08 Dec 2010 18:41:53 +0800 + +deb.com.samsung.setting (0.1.82-76) unstable; urgency=low + + * Intergrate 'Backlight' and 'Brightness' menu into one, named 'Display'. + * and Apply expandable-list dialoggroup item in 'Display' menu.. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-76 + + -- Yin Kairong Wed, 08 Dec 2010 16:19:18 +0800 + +deb.com.samsung.setting (0.1.82-75) unstable; urgency=low + + * repackage. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-75 + + -- MyoungJune Park Wed, 08 Dec 2010 16:32:11 +0900 + +deb.com.samsung.setting (0.1.82-75) unstable; urgency=low + + * repackage. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-74 + + -- Yin Kairong Tue, 07 Dec 2010 22:12:28 +0900 + +deb.com.samsung.setting (0.1.82-73) unstable; urgency=low + + * Fix build break. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-73 + + -- Yin Kairong Tue, 07 Dec 2010 17:13:38 +0800 + +deb.com.samsung.setting (0.1.82-72) unstable; urgency=low + + * Apply expandable-list dialoggroup item in 'Date and time' menu. + * Git: slp-source.sec.samsung.net:slp/pkgs/s/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-72 + + -- Yin Kairong Tue, 07 Dec 2010 16:29:08 +0800 + +deb.com.samsung.setting (0.1.82-71) unstable; urgency=low + + * disabled LDC_TIMEOUT_KEEPING + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-71 + + -- MyoungJune Park Fri, 03 Dec 2010 15:25:56 +0900 + +deb.com.samsung.setting (0.1.82-70) unstable; urgency=low + + * enabled the favourite menu with timer. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-70 + + -- MyoungJune Park Wed, 01 Dec 2010 23:16:32 +0900 + +deb.com.samsung.setting (0.1.82-69) unstable; urgency=low + + * Upload pkg for Applying 'Reset' function and 'Privacy lock' function. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-69 + + -- Yin Kairong Tue, 30 Nov 2010 12:24:04 +0800 + +deb.com.samsung.setting (0.1.82-68) unstable; urgency=low + + * Modify the privacy lock function and Making it take an effect. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-68 + + -- Yin Kairong Tue, 30 Nov 2010 06:29:27 +0800 + +deb.com.samsung.setting (0.1.82-67) unstable; urgency=low + + * Coutinue to adjust 'Reset' function. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-67 + + -- Yin Kairong Tue, 30 Nov 2010 04:38:50 +0800 + +deb.com.samsung.setting (0.1.82-66) unstable; urgency=low + + * repackage. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-66 + + -- MyoungJune Park Tue, 30 Nov 2010 21:33:44 +0900 + +deb.com.samsung.setting (0.1.82-65) unstable; urgency=low + + * repackage. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-65 + + -- Yin Kairong Tue, 30 Nov 2010 03:09:14 +0800 + +deb.com.samsung.setting (0.1.82-64) unstable; urgency=low + + * Fix some CQs. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-64 + + -- Yin Kairong Tue, 30 Nov 2010 03:06:13 +0800 + +deb.com.samsung.setting (0.1.82-63) unstable; urgency=low + + * Re-implement the 'Brightness' view. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-63 + + -- Yin Kairong Mon, 29 Nov 2010 15:47:23 +0800 + +deb.com.samsung.setting (0.1.82-62) unstable; urgency=low + + * update CMakeLists.txt + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-62 + + -- MyoungJune Park Mon, 29 Nov 2010 13:58:26 +0900 + +deb.com.samsung.setting (0.1.82-61) unstable; urgency=low + * Add process for vconf 'db/wifi/conn_ssid' changes. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-61 + + -- Yin Kairong Mon, 29 Nov 2010 12:49:36 +0800 + +deb.com.samsung.setting (0.1.82-60) unstable; urgency=low + + * Fix the wifi status decription in Setting menu list. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-60 + + -- Yin Kairong Mon, 29 Nov 2010 10:23:44 +0800 + +deb.com.samsung.setting (0.1.82-59) unstable; urgency=low + + * Modify button text of the menu 'Date and time'. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-59 + + -- Yin Kairong Mon, 29 Nov 2010 10:15:08 +0800 + +deb.com.samsung.setting (0.1.82-58) unstable; urgency=low + + * updated favorite menu, whenever getting back from each UG, not using + Timer(5 sec). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-58 + + -- MyoungJune Park Sat, 27 Nov 2010 22:33:48 +0900 + +deb.com.samsung.setting (0.1.82-57) unstable; urgency=low + + * Package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-57 + + -- MyoungJune Park Sat, 27 Nov 2010 17:03:32 +0900 + +deb.com.samsung.setting (0.1.82-56) unstable; urgency=low + + * Package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-56 + + -- Tang Feng Fri, 26 Nov 2010 20:50:11 +0800 + +deb.com.samsung.setting (0.1.82-55) unstable; urgency=low + + * Package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-55 + + -- Chen Hanwu Fri, 26 Nov 2010 19:50:11 +0800 + +deb.com.samsung.setting (0.1.82-54) unstable; urgency=low + + * Package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-54 + + -- Yin Kairong Fri, 26 Nov 2010 17:30:11 +0800 + +deb.com.samsung.setting (0.1.82-53) unstable; urgency=low + + * fixed fault of naming rules for deb. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-53 + + -- MyoungJune Park Fri, 26 Nov 2010 15:48:26 +0900 + +deb.com.samsung.setting (0.1.82-52) unstable; urgency=low + + * Making Setting Wi-Fi menu display the wifi device name, when wifi is on. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-52 + + -- Yin Kairong Fri, 26 Nov 2010 11:41:27 +0800 + +deb.com.samsung.setting (0.1.82-51) unstable; urgency=low + + * Modify App String to System String + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-51 + + -- MyoungJune Park Thu, 25 Nov 2010 21:09:18 +0900 + +deb.com.samsung.setting (0.1.82-50) unstable; urgency=low + + * Support feature of Keeping the position after clicking the add favourite + button(+). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-50 + + -- Yin Kairong Thu, 25 Nov 2010 17:48:51 +0800 + +deb.com.samsung.setting (0.1.82-49) unstable; urgency=low + + * adopt new naming rule for debian package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-49 + + -- MyoungJune Park Thu, 25 Nov 2010 17:15:21 +0900 + +deb.com.samsung.setting (0.1.82-48) unstable; urgency=low + * Fix the issue of main menu item icons missing. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-48 + + -- Yin Kairong Thu, 25 Nov 2010 16:12:02 +0800 + +deb.com.samsung.setting (0.1.82-47) unstable; urgency=low + + * repackage + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-47 + + -- MyoungJune Park Thu, 25 Nov 2010 15:04:44 +0900 + +deb.com.samsung.setting (0.1.82-46) unstable; urgency=low + + * set max of Brightness value with devman API. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-46 + + -- Tang Feng Thu, 25 Nov 2010 13:56:07 +0900 + +deb.com.samsung.setting (0.1.82-45) unstable; urgency=low + + * updated package name for new naming rule. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-45 + + -- Tang Feng Thu, 25 Nov 2010 13:18:56 +0900 + +deb.com.samsung.setting (0.1.82-44) unstable; urgency=low + + * Add image list, modified package, icon, desktop file name. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-44 + + -- Tang Feng Tur, 25 Nov 2010 10:55:38 +0900 + +deb.com.samsung.setting (0.1.82-43) unstable; urgency=low + + * Add image list, modified package, icon, desktop file name. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: deb.com.samsung.setting_0.1.82-43 + + -- Tang Feng Tur, 25 Nov 2010 10:51:38 +0900 + +setting (0.1.82-42) unstable; urgency=low + + * modified package, icon, desktop file name. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-42 + + -- MyoungJune Park Wed, 24 Nov 2010 20:51:38 +0900 + +setting (0.1.82-41) unstable; urgency=low + + * repackage + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-41 + + -- MyoungJune Park Wed, 24 Nov 2010 20:26:42 +0900 + +setting (0.1.82-40) unstable; urgency=low + + * modified package, icon, desktop file name. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-40 + + -- MyoungJune Park Wed, 24 Nov 2010 20:14:27 +0900 + +setting (0.1.82-39) unstable; urgency=low + + * Fix the issue of memory card formatting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-39 + + -- Yin Kairong Wed, 24 Nov 2010 14:35:03 +0800 + +setting (0.1.82-38) unstable; urgency=low + + * support LCD timeout keeping feature when Setting is running in foreground. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-38 + + -- Yin Kairong Wed, 24 Nov 2010 14:31:12 +0800 + +setting (0.1.82-37) unstable; urgency=low + + * disabled the favourite list, due to 100% CPU usage. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-37 + + -- MyoungJune Park Mon, 22 Nov 2010 22:17:53 +0900 + +setting (0.1.82-36) unstable; urgency=low + + * fixed bug not storing Brightness number + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-36 + + -- MyoungJune Park Sat, 20 Nov 2010 18:11:21 +0900 + +setting (0.1.82-35) unstable; urgency=low + + * Fix Crash ( Time and Date UG ) + * Apply App String( Profile Menu ) + + -- Junghyun Kim Sat, 20 Nov 2010 14:15:27 +0900 + +setting (0.1.82-34) unstable; urgency=low + + * release after fixing UI issues, and favorite list (for DEMO) 2 + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-34 + + -- MyoungJune Park Fri, 19 Nov 2010 11:58:17 +0900 + +setting (0.1.82-33) unstable; urgency=low + + * release after fixing UI issues, and favorite list (for DEMO). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-33 + + -- MyoungJune Park Fri, 19 Nov 2010 09:53:24 +0900 + +setting (0.1.82-32) unstable; urgency=low + + * Upload pkg to apply the feature of favourite-list. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-32 + + -- Yin Kairong Thu, 18 Nov 2010 11:38:52 +0800 + +setting (0.1.82-31) unstable; urgency=low + + * Complete Adding the feature of favourite-list. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-31 + + -- Yin Kairong Thu, 18 Nov 2010 11:30:38 +0800 + +setting (0.1.82-30) unstable; urgency=low + + * Add the favourite-list feature and Optmize the code implement + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-30 + + -- Yin Kairong Thu, 18 Nov 2010 11:24:06 +0800 + +setting (0.1.82-29) unstable; urgency=low + + * Remove the repeat callback handle when flight mode status is changed. + * Fix the issue of MobileAP status cannot update in time in Setting main view. + * Fix The time field cannot get the correct focus issue. + * renamed ciss-setting-efl setting-call-efl. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-29 + + -- MyoungJune Park Fri, 12 Nov 2010 21:15:15 +0900 + +setting (0.1.82-28) unstable; urgency=low + + * repackage + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-28 + + -- MyoungJune Park Thu, 11 Nov 2010 21:40:22 +0900 + +setting (0.1.82-27) unstable; urgency=low + + * repackage + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-27 + + -- Yin Kairong Thu, 11 Nov 2010 13:05:25 +0800 + +setting (0.1.82-26) unstable; urgency=low + + * Upload pkg to resolve CQ defects. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-26 + + -- Yin Kairong Thu, 11 Nov 2010 02:04:36 +0800 + +setting (0.1.82-25) unstable; urgency=low + + * removed drm-service dependency + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-25 + + -- MyoungJune Park Wed, 10 Nov 2010 22:28:43 +0900 + +setting (0.1.82-24) unstable; urgency=low + + * added MobileAP button showing On/Off. + * updated in Network menu. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-24 + + -- MyoungJune Park Wed, 10 Nov 2010 21:27:49 +0900 + +setting (0.1.82-23) unstable; urgency=low + + * Fix the sync issues between Setting's Sound setting and Volume App. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-23 + + -- Yin Kairong Wed, 10 Nov 2010 13:34:49 +0800 + +setting (0.1.82-22) unstable; urgency=low + + * fixed a bug setting timezone. - 2 + * updated Security menu following 0.6 UX guideline. + * removed FDN2 + * Set password popup, created Privacy password. + * fixed bugs on PUK1 confirmation code. + * in Memory, changed String at "Memory Card Details" + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-22 + + -- MyoungJune Park Tue, 09 Nov 2010 21:30:05 +0900 + +setting (0.1.82-21) unstable; urgency=low + + * fixed a bug setting timezone. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-21 + + -- MyoungJune Park Mon, 08 Nov 2010 21:55:17 +0900 + +setting (0.1.82-20) unstable; urgency=low + + * key changed from VCONFKEY_SETAPPL_USE_PACKET_DATA_BOOL to VCONFKEY_3G_ENABLE + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-20 + + -- MyoungJune Park Mon, 08 Nov 2010 15:07:56 +0900 + +setting (0.1.82-19) unstable; urgency=low + + * disabled 2G/3G network entry in Connectivity > Network. + * added vconf initialization over timezone at settings.postinst + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-19 + + -- MyoungJune Park Mon, 08 Nov 2010 13:38:39 +0900 + +setting (0.1.82-18) unstable; urgency=low + + * Add the demo code for sound alter type . + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-18 + + -- Yin Kairong Fri, 05 Nov 2010 15:10:39 +0800 + +setting (0.1.82-17) unstable; urgency=low + + * removed libapputil-dev dependancy + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-17 + + -- MyoungJune Park Thu, 04 Nov 2010 21:47:07 +0900 + +setting (0.1.82-16) unstable; urgency=low + + * updated voice recorder image + * updated 'fake image' code. + * fixed the issue that it seemed that it is launching twice when setting app is invoked after adding many application menu in Applications # Please enter the commit message for your changes. + * removed app-util dependancy + * Support kinds of chinese language. + * Remove depreciated files + * Finally Making Setting App supporting zh_CN, zh_HK and zh_TW + * updated i18n string, enabled USB connection menu, chaged string from OFF to Off + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-16 + + -- MyoungJune Park Thu, 04 Nov 2010 18:05:47 +0900 + +setting (0.1.82-15) unstable; urgency=low + + * Support kinds of chinese language. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-15 + + -- Yin Kairong Wed, 03 Nov 2010 17:21:54 +0800 + +setting (0.1.82-14) unstable; urgency=low + + * pkg. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-14 + + -- Yin Kairong Tue, 02 Nov 2010 20:32:48 +0800 + +setting (0.1.82-13) unstable; urgency=low + + * + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-13 + + -- MyoungJune Park Tue, 02 Nov 2010 21:26:11 +0900 + +setting (0.1.82-11) unstable; urgency=low + + * upload pkg. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-11 + + -- Yin Kairong Mon, 01 Nov 2010 18:02:48 +0800 + +setting (0.1.82-10) unstable; urgency=low + + * (CQ H0100111256) disabled heynoti callback to receive event when time changes + * (CQ H0100108569) updated the code calling set_date/set_time and idlecapture_remove code. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-10 + + -- MyoungJune Park Mon, 01 Nov 2010 11:22:42 +0900 + +setting (0.1.82-9) unstable; urgency=low + + * fixed H0100108569 + * fixed the issue that + * in System > Brightness > turning on/off 'Automatic', + * manual silder control disappeared, and not appear again, even if turn it on. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-9 + + -- MyoungJune Park Sat, 30 Oct 2010 18:16:46 +0900 + +setting (0.1.82-8) unstable; urgency=low + + * pasword ui-gadget modificaiton (modified where the change password pop-up is), + * moved TAPI callback functions to Password UI gadget side + * PIN lock, PUK lock have app string (i18n feature) + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-8 + + -- MyoungJune Park Fri, 29 Oct 2010 16:13:31 +0900 + +setting (0.1.82-7) unstable; urgency=low + + * remove Touch Panel auto-lock menu. it's not necessary. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-7 + + -- Yin Kairong Fri, 29 Oct 2010 18:03:21 +0800 + +setting (0.1.82-6) unstable; urgency=low + + * Applying the new Date/Time UI. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-6 + + -- Yin Kairong Fri, 29 Oct 2010 18:01:27 +0800 + +setting (0.1.82-5) unstable; urgency=low + + * Fix H0100111530(Ringtone plays at '0'). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-5 + + -- Yin Kairong Fri, 29 Oct 2010 17:51:08 +0800 + +setting (0.1.82-4) unstable; urgency=low + + * Fix H0100111612(Set wallpaper failed). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-4 + + -- Yin Kairong Fri, 29 Oct 2010 17:49:04 +0800 + +setting (0.1.82-3) unstable; urgency=low + + * fix H0100110892 + * ( mobile tracker on/off button issue ) + + -- JungHyun Kim Thu, 28 Oct 2010 21:39:51 +0900 + +setting (0.1.82-2) unstable; urgency=low + + * added devman api to control brightness. + * this api is only for root acess, now it's in disable. + * if it allows us to call the api, the code block will be enabled. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-2 + + -- MyoungJune Park Wed, 27 Oct 2010 17:44:49 +0900 + +setting (0.1.82-1) unstable; urgency=low + + * Fix some defects. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.82-1 + + -- Yin Kairong Wed, 27 Oct 2010 09:46:34 +0800 + +setting (0.1.81-92) unstable; urgency=low + + * fixed showing the 'searching' popup infintely. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-92 + + -- MyoungJune Park Tue, 26 Oct 2010 22:01:35 +0900 + +setting (0.1.81-91) unstable; urgency=low + + * Add function to support more languages(zh_HK,zh_CN,zh_TW,ru_RU and ja_JP). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-91 + + -- Yin Kairong Tue, 26 Oct 2010 15:05:09 +0800 + +setting (0.1.81-90) unstable; urgency=low + + * added patch by winset team. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-90 + + -- MyoungJune Park Mon, 25 Oct 2010 17:17:28 +0900 + +setting (0.1.81-89) unstable; urgency=low + + * fixed time zone setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-89 + + -- MyoungJune Park Sat, 23 Oct 2010 15:44:35 +0900 + +setting (0.1.81-88) unstable; urgency=low + + * modified bgset file path in setting.postinst.2 + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-88 + + -- MyoungJune Park Thu, 21 Oct 2010 22:13:37 +0900 + +setting (0.1.81-87) unstable; urgency=low + + * modified bgset file path in setting.postinst. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-87 + + -- MyoungJune Park Thu, 21 Oct 2010 19:56:56 +0900 + +setting (0.1.81-86) unstable; urgency=low + + * add setting 'db/menu_widget/language' operation in postinst file + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-86 + + -- Yin Kairong Thu, 21 Oct 2010 14:02:06 +0800 + +setting (0.1.81-85) unstable; urgency=low + + * rocover the operation about language setting in postinst file + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-85 + + -- Yin Kairong Thu, 21 Oct 2010 13:55:34 +0800 + +setting (0.1.81-84) unstable; urgency=low + + * replace IDS_ST_POP_SET with IDS_COM_SK_SET + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-84 + + -- MyoungJune Park Wed, 20 Oct 2010 13:36:13 +0900 + +setting (0.1.81-83) unstable; urgency=low + + * Optmize the 0th/1st level of Setting Frame. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-83 + + -- Yin Kairong Tue, 19 Oct 2010 14:26:17 +0800 + +setting (0.1.81-82) unstable; urgency=low + + * remove all temp files on building source/binary package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-82 + + -- MyoungJune Park Mon, 18 Oct 2010 20:09:17 +0900 + +setting (0.1.81-81) unstable; urgency=low + + * contact ug setting updated + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-81 + + -- MyoungJune Park Mon, 18 Oct 2010 15:02:45 +0900 + +setting (0.1.81-80) unstable; urgency=low + + * Upload package for vconf type changing from 'file' to 'db'. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-80 + + -- Yin Kairong Mon, 18 Oct 2010 13:19:43 +0800 + +setting (0.1.81-79) unstable; urgency=low + + * changed from file/menu_widget/bgset to db/setting/bgset + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-79 + + -- MyoungJune Park Mon, 18 Oct 2010 14:07:37 +0900 + +setting (0.1.81-78) unstable; urgency=low + + * Upload package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-78 + + -- Yin Kairong Mon, 18 Oct 2010 11:41:02 +0800 + +setting (0.1.81-77) unstable; urgency=low + + * Modify the code of reading Wi-Fi Mac address. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-77 + + -- Yin Kairong Mon, 18 Oct 2010 11:29:54 +0800 + +setting (0.1.81-76) unstable; urgency=low + + * Fix the issues of Locked screen setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-76 + + -- Yin Kairong Mon, 18 Oct 2010 11:17:10 +0800 + +setting (0.1.81-75) unstable; urgency=low + + * Enable function of Divx de/regester. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-75 + + -- Yin Kairong Fri, 15 Oct 2010 02:26:30 +0800 + +setting (0.1.81-74) unstable; urgency=low + + * restore i18n feature. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-74 + + -- MyoungJune Park Fri, 15 Oct 2010 17:39:37 +0900 + +setting (0.1.81-73) unstable; urgency=low + + * modify get count function in memory status menu ( calendar, contact ) + * modify delete function in clear phone memory menu ( calendar ) + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-73 + + -- MyoungJune Park Fri, 15 Oct 2010 16:56:21 +0900 + +setting (0.1.81-72) unstable; urgency=low + + * updated changelog. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-72 + + -- MyoungJune Park Fri, 15 Oct 2010 16:20:23 +0900 + +setting (0.1.81-71) unstable; urgency=low + + * added setting.postinst to chwon inhouse:inouse /opt/data/setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-71 + + -- MyoungJune Park Fri, 15 Oct 2010 16:13:44 +0900 + +setting (0.1.81-70) unstable; urgency=low + + * add code of listening changs of Sound ringtone. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-70 + + -- Yin Kairong Thu, 14 Oct 2010 23:14:28 +0800 + +setting (0.1.81-69) unstable; urgency=low + + * applied Date/Time API from Sysman. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-69 + + -- MyoungJune Park Fri, 15 Oct 2010 13:35:22 +0900 + +setting (0.1.81-68) unstable; urgency=low + + * splited Wallpaper into Home screen and Locked Screen. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-68 + + -- MyoungJune Park Thu, 14 Oct 2010 14:38:49 +0900 + +setting (0.1.81-67) unstable; urgency=low + + * remove file-manager service dependancy. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-67 + + -- MyoungJune Park Thu, 14 Oct 2010 11:50:17 +0900 + +setting (0.1.81-66) unstable; urgency=low + + * modify setting.cfg path. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-66 + + -- MyoungJune Park Wed, 13 Oct 2010 22:40:19 +0900 + +setting (0.1.81-65) unstable; urgency=low + + * added Seven Email setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-65 + + -- MyoungJune Park Wed, 13 Oct 2010 20:28:51 +0900 + +setting (0.1.81-64) unstable; urgency=low + + * Fix issue of volumn setting invlaid. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-64 + + -- Yin Kairong Wed, 13 Oct 2010 15:21:28 +0800 + +setting (0.1.81-63) unstable; urgency=low + + * added Home icon to adopt 'home screen'. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-63 + + -- MyoungJune Park Wed, 13 Oct 2010 13:49:43 +0900 + +setting (0.1.81-61) unstable; urgency=low + + * applied patch from winset team. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-62 + + -- MyoungJune Park Tue, 12 Oct 2010 14:47:21 +0900 + +setting (0.1.81-60) unstable; urgency=low + + * Fix 'H0100109155 : in Sound setting, changing volumn, It makes BS.'. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-60 + + -- Yin Kairong Mon, 11 Oct 2010 22:46:22 +0800 + +setting (0.1.81-59) unstable; urgency=low + + * enabled reading 'open source licence.pdf'. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-59 + + -- MyoungJune Park Mon, 11 Oct 2010 21:46:08 +0900 + +setting (0.1.81-58) unstable; urgency=low + + * added 'Theme' menu and fixed bugs. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-58 + + -- MyoungJune Park Mon, 11 Oct 2010 21:05:31 +0900 + +setting (0.1.81-57) unstable; urgency=low + + * Remove the unuseful macros + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-57 + + -- Yin Kairong Sat, 09 Oct 2010 15:56:39 +0800 + +setting (0.1.81-56) unstable; urgency=low + + * added Voice recorder, FM radio menu in Applications. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-56 + + -- MyoungJune Park Sat, 09 Oct 2010 15:02:59 +0900 + +setting (0.1.81-55) unstable; urgency=low + + * rollback time&date setting + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-55 + + -- Byungwook Jang Fri, 08 Oct 2010 17:19:18 +0900 + +setting (0.1.81-54) unstable; urgency=low + + * applied time/date API + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-54 + + -- MyoungJune Park Wed, 06 Oct 2010 08:34:24 +0900 + +setting (0.1.81-53) unstable; urgency=low + + * added KiesOverWifi menu. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-53 + + -- MyoungJune Park Tue, 05 Oct 2010 17:12:34 +0900 + +setting (0.1.81-52) unstable; urgency=low + + * Disabled TV out, Photo uploads, Social network profile + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-52 + + -- MyoungJune Park Tue, 05 Oct 2010 14:28:47 +0900 + +setting (0.1.81-51) unstable; urgency=low + + * removed Mobile tracker src in build, as it is provided outside(ui-gadget)2. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-51 + + -- MyoungJune Park Fri, 01 Oct 2010 15:47:28 +0900 + +setting (0.1.81-50) unstable; urgency=low + + * removed Mobile tracker src in build, as it is provided outside(ui-gadget). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-50 + + -- MyoungJune Park Fri, 01 Oct 2010 15:26:55 +0900 + +setting (0.1.81-49) unstable; urgency=low + + * removed including deprecated header files. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-49 + + -- MyoungJune Park Thu, 30 Sep 2010 15:17:56 +0900 + +setting (0.1.81-48) unstable; urgency=low + + * enabled wallpaper setting function. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-48 + + -- MyoungJune Park Wed, 29 Sep 2010 21:40:23 +0900 + +setting (0.1.81-47) unstable; urgency=low + + * bug fix on Language setting ( vconf setting ) + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-47 + + -- MyoungJune Park Wed, 29 Sep 2010 19:28:10 +0900 + +setting (0.1.81-46) unstable; urgency=low + + * bug fix on Language setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-46 + + -- MyoungJune Park Wed, 29 Sep 2010 15:12:01 +0900 + +setting (0.1.81-45) unstable; urgency=low + + * enabled ask-on-connection as default. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-45 + + -- MyoungJune Park Wed, 29 Sep 2010 13:29:16 +0900 + +setting (0.1.81-44) unstable; urgency=low + + * added Home Screen (Dynamic version by Min Young-Hun, Kim Chung-Hyun) + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-44 + + -- MyoungJune Park Tue, 28 Sep 2010 22:39:28 +0900 + +setting (0.1.81-43) unstable; urgency=low + + * fixed a typing error. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-43 + + -- MyoungJune Park Tue, 28 Sep 2010 19:39:59 +0900 + +setting (0.1.81-42) unstable; urgency=low + + * if Language changed, all apps are terminated except desktop-screen. + * disabled USB-connection menu. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-42 + + -- MyoungJune Park Tue, 28 Sep 2010 19:14:52 +0900 + +setting (0.1.81-41) unstable; urgency=low + + * Upload package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-41 + + -- Yin Kairong Tue, 28 Sep 2010 18:06:50 +0800 + +setting (0.1.81-40) unstable; urgency=low + + * Fix some problems. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-40 + + -- Yin Kairong Tue, 28 Sep 2010 15:33:04 +0800 + +setting (0.1.81-39) unstable; urgency=low + + * Applying Scalability Features + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-39 + + -- Yin Kairong Mon, 27 Sep 2010 14:44:29 +0800 + +setting (0.1.81-38) unstable; urgency=low + + * upload package + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-38 + + -- Yin Kairong Sat, 25 Sep 2010 17:23:12 +0800 + +setting (0.1.81-37) unstable; urgency=low + + * Enable idle capture, and add functions of listening bt/wifi status change + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-37 + + -- Yin Kairong Sat, 25 Sep 2010 01:08:14 +0800 + +setting (0.1.81-36) unstable; urgency=low + + * Adjust to support multilinguage in UGs + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-36 + + -- Byungwook Jang Fri, 24 Sep 2010 16:37:41 +0900 + +setting (0.1.81-35) unstable; urgency=low + + * Adjust to support multilinguage in UGs + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-35 + + -- Yin Kairong Tue, 21 Sep 2010 17:10:33 +0800 + +setting (0.1.81-34) unstable; urgency=low + + * changed font style from bold to thin + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-34 + + -- MyoungJune Park Mon, 20 Sep 2010 21:26:04 +0900 + +setting (0.1.81-33) unstable; urgency=low + + * Fix build break + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-33 + + -- Yin Kairong Mon, 20 Sep 2010 16:38:33 +0800 + +setting (0.1.81-32) unstable; urgency=low + + * Clear kessler winset; Enable Timezone check; Disable the landscape view of + Setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-32 + + -- Yin Kairong Mon, 20 Sep 2010 16:22:49 +0800 + +setting (0.1.81-31) unstable; urgency=low + + * Package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-31 + + -- Yin Kairong Mon, 20 Sep 2010 10:45:53 +0800 + +setting (0.1.81-30) unstable; urgency=low + + * Upload Package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-30 + + -- Yin Kairong Fri, 17 Sep 2010 17:34:12 +0800 + +setting (0.1.81-29) unstable; urgency=low + + * enabled email setting with bundle. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-29 + + -- MyoungJune Park Fri, 17 Sep 2010 11:54:49 +0900 + +setting (0.1.81-28) unstable; urgency=low + + * enabled browser setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-28 + + -- MyoungJune Park Fri, 17 Sep 2010 11:37:26 +0900 + +setting (0.1.81-27) unstable; urgency=low + + * enabled browser setting. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-27 + + -- MyoungJune Park Thu, 16 Sep 2010 18:01:51 +0900 + +setting (0.1.81-26) unstable; urgency=low + + * added task switcher & home screen. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-26 + + -- MyoungJune Park Thu, 16 Sep 2010 16:42:50 +0900 + +setting (0.1.81-25) unstable; urgency=low + + * Fix build break. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-25 + + -- Yin Kairong Thu, 16 Sep 2010 15:28:20 +0800 + +setting (0.1.81-24) unstable; urgency=low + + * applied demo style as default from now. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-24 + + -- MyoungJune Park Thu, 16 Sep 2010 14:32:54 +0900 + +setting (0.1.81-23) unstable; urgency=low + + * Upload package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-23 + + -- Yin Kairong Wed, 15 Sep 2010 15:53:16 +0800 + +setting (0.1.81-22) unstable; urgency=low + + * disabled SUPPORT_VIEW_TYPE. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-22 + + -- MyoungJune Park Tue, 14 Sep 2010 20:17:47 +0900 + +setting (0.1.81-21) unstable; urgency=low + + * Add code of Home Screen/Task Switcher menus, fix the issue of wallpaper + refresh after wallpaper-image deleted/moved. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-21 + + -- Yin Kairong Tue, 14 Sep 2010 03:36:26 +0800 + +setting (0.1.81-20) unstable; urgency=low + + * replace wallpaper + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-20 + + -- MyoungJune Park Tue, 14 Sep 2010 17:57:08 +0900 + +setting (0.1.81-19) unstable; urgency=low + + * Enable Location/Bluetooth/Call and Fix code about theme. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-19 + + -- Yin Kairong Mon, 13 Sep 2010 17:41:05 +0800 + +setting (0.1.81-18) unstable; urgency=low + + * Fix Issue of Launch Setting Failed + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-18 + + -- Yin Kairong Sat, 11 Sep 2010 21:22:26 +0800 + +setting (0.1.81-17) unstable; urgency=low + + * Enable the Memory module + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-17 + + -- Yin Kairong Sat, 11 Sep 2010 19:30:15 +0800 + +setting (0.1.81-16) unstable; urgency=low + + * Shield the Memory module to avoid the build break + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-16 + + -- Yin Kairong Sat, 11 Sep 2010 18:12:18 +0800 + +setting (0.1.81-15) unstable; urgency=low + + * repackage + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-15 + + -- Yin Kairong Sat, 11 Sep 2010 16:33:43 +0800 + +setting (0.1.81-14) unstable; urgency=low + + * Fix the issue occous in the process of clicking blank area of time/date + picker view. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-14 + + -- Yin Kairong Sat, 11 Sep 2010 15:44:39 +0800 + +setting (0.1.81-13) unstable; urgency=low + + * Upload package + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-13 + + -- Yin Kairong Sat, 11 Sep 2010 15:07:21 +0800 + +setting (0.1.81-12) unstable; urgency=low + + * added error handle code + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-12 + + -- MyoungJune Park Fri, 10 Sep 2010 18:31:25 +0900 + +setting (0.1.81-11) unstable; urgency=low + + * added error handle code + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-11 + + -- Yin Kairong Fri, 10 Sep 2010 17:43:12 +0900 + +setting (0.1.81-10) unstable; urgency=low + + * Fix code bugs and CQ bugs. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-10 + + -- Yin Kairong Thu, 09 Sep 2010 17:40:10 +0800 + +setting (0.1.81-9) unstable; urgency=low + + * Improve launching time. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-9 + + -- Yin Kairong Thu, 09 Sep 2010 09:03:52 +0800 + +setting (0.1.81-8) unstable; urgency=low + + * Testing the new UI Frame. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-8 + + -- Yin Kairong Tue, 07 Sep 2010 03:09:27 +0800 + +setting (0.1.81-7) unstable; urgency=low + + * upload package enabling mobileTracker and Memory. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-7 + + -- Yin Kairong Mon, 06 Sep 2010 16:52:06 +0800 + +setting (0.1.81-6) unstable; urgency=low + + * + * remove dependancies not in use. (disabled mobile tracker) + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-6 + + -- MyoungJune Park Mon, 06 Sep 2010 12:20:55 +0900 + +setting (0.1.81-5) unstable; urgency=low + + * remove dependancies not in use. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-5 + + -- MyoungJune Park Mon, 06 Sep 2010 11:54:54 +0900 + +setting (0.1.81-4) unstable; urgency=low + + * disabled memory widget to avoid compile error. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-4 + + -- MyoungJune Park Fri, 03 Sep 2010 20:48:37 +0900 + +setting (0.1.81-3) unstable; urgency=low + + * set Backright time from 10min to 15 sec. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-3 + + -- MyoungJune Park Fri, 03 Sep 2010 19:23:05 +0900 + +setting (0.1.81-2) unstable; urgency=low + + * set to a normal mode (not demo mode). + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-2 + + -- MyoungJune Park Fri, 03 Sep 2010 17:32:46 +0900 + +setting (0.1.81-1) unstable; urgency=low + + * upload package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.81-1 + + -- Yin Kairong Fri, 03 Sep 2010 09:39:50 +0800 + +setting (0.1.80-19) unstable; urgency=low + + * remove compile error. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-19 + + -- MyoungJune Park Thu, 02 Sep 2010 14:19:46 +0900 + +setting (0.1.80-18) unstable; urgency=low + + * remove including 'TelAPI_ext.h' + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-18 + + -- MyoungJune Park Thu, 02 Sep 2010 13:46:49 +0900 + +setting (0.1.80-17) unstable; urgency=low + + * changed wallpaper, added code/images for demo. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-17 + + -- MyoungJune Park Wed, 01 Sep 2010 19:35:22 +0900 + +setting (0.1.80-16) unstable; urgency=low + + * modified Menu name : Keyboard Language -> Keyboard. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-16 + + -- MyoungJune Park Mon, 30 Aug 2010 20:00:08 +0900 + +setting (0.1.80-15) unstable; urgency=low + + * removed compile warring,fixed defects in network ,fixed the issue of build + breake, and modified Setting log system. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-15 + + -- Yin Kairong Fri, 27 Aug 2010 17:39:10 +0800 + +setting (0.1.80-14) unstable; urgency=low + + * remove applog.h dependancy. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-14 + + -- MyoungJune Park Fri, 27 Aug 2010 13:09:49 +0900 + +setting (0.1.80-13) unstable; urgency=low + + * package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-13 + + -- Yin Kairong Thu, 26 Aug 2010 17:54:13 +0800 + +setting (0.1.80-12) unstable; urgency=low + + * enabled network/security in menu, Applying network/security and perfect app UI. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-12 + + -- MyoungJune Park Wed, 25 Aug 2010 15:37:13 +0900 + +setting (0.1.80-11) unstable; urgency=low + + * enabled network/security. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-11 + + -- MyoungJune Park Tue, 24 Aug 2010 13:05:27 +0900 + +setting (0.1.80-10) unstable; urgency=low + + * package. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-10 + + -- Yin Kairong Fri, 20 Aug 2010 03:02:13 +0800 + +setting (0.1.80-9) unstable; urgency=low + + * Shield the ug loaders which have defect. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-9 + + -- Yin Kairong Fri, 20 Aug 2010 00:53:05 +0800 + +setting (0.1.80-8) unstable; urgency=low + + * Apply wifi/bluetooth/message/keyboard language/email/contact UI gadget + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-8 + + -- Yin Kairong Thu, 19 Aug 2010 17:42:18 +0800 + +setting (0.1.80-7) unstable; urgency=low + + * Package + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-7 + + -- Yin Kairong Thu, 19 Aug 2010 10:17:51 +0800 + +setting (0.1.80-6) unstable; urgency=low + + * Perfect UI appears + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-6 + + -- Yin Kairong Mon, 16 Aug 2010 18:08:09 +0800 + +setting (0.1.80-5) unstable; urgency=low + + * To apply passwd/memory/ and fix the defects in on/off check alternative + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-5 + + -- Yin Kairong Mon, 16 Aug 2010 18:08:09 +0800 + +setting (0.1.80-4) unstable; urgency=low + + * Fixed some UI defects. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-4 + + -- Yin Kairong Sat, 14 Aug 2010 02:39:44 +0800 + +setting (0.1.80-3) unstable; urgency=low + + * repackage. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-3 + + -- Yin Kairong Fri, 13 Aug 2010 18:44:45 +0800 + +setting (0.1.80-2) unstable; urgency=low + + * repackage. + * Git: 165.213.180.234:/git/slp/pkgs/settings-beat + * Tag: setting_0.1.80-1 + + -- Yin Kairong Fri, 13 Aug 2010 18:33:37 +0800 + +setting (0.1.80-1) unstable; urgency=low + + * upload package. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.80-1 + + -- Yin Kairong Fri, 13 Aug 2010 17:46:15 +0800 + +setting (0.1.79-7) unstable; urgency=low + + * Applying UI gadget. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.79-7 + + -- Yin Kairong Thu, 12 Aug 2010 14:46:22 +0800 + +setting (0.1.79-6) unstable; urgency=low + + * Debug UI. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.79-6 + + -- Yin Kairong Wed, 11 Aug 2010 13:55:50 +0800 + +setting (0.1.79-5) unstable; urgency=low + + * Applying dialoguegroup for new UI. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.79-5 + + -- Yin Kairong Tue, 10 Aug 2010 01:04:59 +0800 + +setting (0.1.79-4) unstable; urgency=low + + * Fix the issue H0100106836 (mobile tracker setting) + + -- Han Xu Thu, 05 Aug 2010 14:53:30 +0800 + +setting (0.1.79-3) unstable; urgency=low + + * Build settings-beat depository. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.79-3 + + -- Yin Kairong Tue, 03 Aug 2010 17:10:05 +0800 + +setting (0.1.79-2) unstable; urgency=low + + * Convert Setting UI Style to BEAT Style. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.79-2 + + -- Yin Kairong Fri, 30 Jul 2010 13:47:12 +0800 + +setting (0.1.78-2) unstable; urgency=low + + * Fixed the problem of word twinkle. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.78-2 + + -- Yin Kairong Wed, 21 Jul 2010 09:52:37 +0800 + +setting (0.1.78-1) unstable; urgency=low + + * Fixed Setting button wrongly sets the Brightness value. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.78-1 + + -- Yin Kairong Mon, 19 Jul 2010 16:08:28 +0800 + +setting (0.1.77-6) unstable; urgency=low + + * re-package + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.77-6 + + -- Yin Kairong Fri, 16 Jul 2010 11:23:04 +0800 + +setting (0.1.77-5) unstable; urgency=low + + * re-package + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.77-5 + + -- MyoungJune Park Thu, 15 Jul 2010 18:05:28 +0800 + +setting (0.1.77-4) unstable; urgency=low + + * changed for Ecore_IMF. + * Git: 165.213.180.234:/git/slp/pkgs/setting + * Tag: setting_0.1.77-4 + + -- Tang Feng Thu, 15 Jul 2010 15:25:28 +0800 + +setting (0.1.77-3) unstable; urgency=low + + * changed an obsolute function in contact-db-engine. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.77-3 + + -- MyoungJune Park Tue, 13 Jul 2010 17:37:53 +0900 + +setting (0.1.77-2) unstable; urgency=low + + * owner changed + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.77-2 + + -- MyoungJune Park Thu, 08 Jul 2010 16:11:46 +0900 + +setting (0.1.77-1) unstable; urgency=low + + * fix CQ H0100102586 + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.77-1 + + -- Gibyoung Kim Fri, 02 Jul 2010 17:00:53 +0900 + +setting (0.1.76-4) unstable; urgency=low + + * rebuild + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.76-4 + + -- JunYoung Kim Thu, 01 Jul 2010 16:52:48 +0900 + +setting (0.1.76-3) unstable; urgency=low + + * Added telephony header file + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.76-3 + + -- JunYoung Kim Thu, 01 Jul 2010 16:48:16 +0900 + +setting (0.1.76-2) unstable; urgency=low + + * changed telephony api + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.76-2 + + -- JunYoung Kim Thu, 01 Jul 2010 14:51:49 +0900 + +setting (0.1.76-1) unstable; urgency=low + + * fix CQ H0100102585 + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.76-1 + + -- Gibyoung Kim Tue, 29 Jun 2010 13:17:54 +0900 + +setting (0.1.75-1) unstable; urgency=low + + * Fixed mac addr string + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.75-1 + + -- JunYoung Kim Thu, 24 Jun 2010 17:12:02 +0900 + +setting (0.1.74-5) unstable; urgency=low + + * fixed setting.desktop.in & CMakeLists + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.74-5 + + -- JunYoung Kim Thu, 24 Jun 2010 10:54:33 +0900 + +setting (0.1.74-4) unstable; urgency=low + + * setting.desktop file rollback + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.74-4 + + -- JunYoung Kim Thu, 24 Jun 2010 09:14:40 +0900 + +setting (0.1.74-3) unstable; urgency=low + + * Remove old sharedgadget-model dependency at debin/control + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.74-3 + + -- Youngae Kang Wed, 23 Jun 2010 18:36:16 +0900 + +setting (0.1.74-2) unstable; urgency=low + + * remove BS related to network selection + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.74-2 + + -- Gibyoung Kim Tue, 22 Jun 2010 16:41:19 +0900 + +setting (0.1.74-1) unstable; urgency=low + + * remove BS related to flight mode + * blocking font changing in display menu + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.74-1 + + -- Gibyoung Kim Tue, 22 Jun 2010 15:02:49 +0900 + +setting (0.1.73-3) unstable; urgency=low + + * Fixed problem that don't launch about sg, network sg + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.73-3 + + -- JunYoung Kim Tue, 22 Jun 2010 10:56:57 +0900 + +setting (0.1.73-2) unstable; urgency=low + + * devide code for arm and i386 + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.73-2 + + -- Gibyoung Kim Mon, 21 Jun 2010 16:01:29 +0900 + +setting (0.1.73-1) unstable; urgency=low + + * add 2G/3G connection menu in network SG + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.73-1 + + -- Gibyoung Kim Mon, 21 Jun 2010 11:27:10 +0900 + +setting (0.1.72-3) unstable; urgency=low + + * fixed setting icon problem. + * fixed world clock SG problem + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.72-3 + + -- JunYoung Kim Fri, 18 Jun 2010 15:32:39 +0900 + +setting (0.1.72-2) unstable; urgency=low + + * change ciss setting SG + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.72-2 + + -- Gibyoung Kim Thu, 17 Jun 2010 19:28:51 +0900 + +setting (0.1.72-1) unstable; urgency=low + + * change location for new style SG + * apply change from haptic + * rebuilding for phonebook engine + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.72-1 + + -- Gibyoung Kim Thu, 17 Jun 2010 15:26:38 +0900 + +setting (0.1.71-1) unstable; urgency=low + + * Adjusted new dlog style + * Fixed BS problem in mobile tracker + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.71-1 + + -- Jun Young Kim Thu, 17 Jun 2010 13:28:28 +0900 + +setting (0.1.70-1) unstable; urgency=low + + * fix bug related pin2 change + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.70-1 + + -- Gibyoung Kim Tue, 15 Jun 2010 17:10:29 +0900 + +setting (0.1.69-2) unstable; urgency=low + + * change call setting, msg setting SG + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.69-2 + + -- Gibyoung Kim Tue, 15 Jun 2010 13:59:32 +0900 + +setting (0.1.69-1) unstable; urgency=low + + * apply new style SG + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.69-1 + + -- Gibyoung Kim Tue, 15 Jun 2010 09:55:30 +0900 + +setting (0.1.68-1) unstable; urgency=low + + * fix bug related with indicator + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.68-1 + + -- Gibyoung Kim Fri, 11 Jun 2010 18:08:04 +0900 + +setting (0.1.67-3) unstable; urgency=low + + * rebuilding for efl update + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.67-3 + + -- Gibyoung Kim Thu, 10 Jun 2010 23:06:20 +0900 + +setting (0.1.67-2) unstable; urgency=low + + * remove old API of telephony + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.67-2 + + -- Gibyoung Kim Wed, 09 Jun 2010 21:46:55 +0900 + +setting (0.1.67-1) unstable; urgency=low + + * modify changing flight mode + * code cleaning + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.67-1 + + -- Gibyoung Kim Wed, 09 Jun 2010 20:58:21 +0900 + +setting (0.1.66-1) unstable; urgency=low + + * remove widgets menu + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.66-1 + + -- Gibyoung Kim Mon, 07 Jun 2010 18:11:09 +0900 + +setting (0.1.65-3) unstable; urgency=low + + * apply change from AUL + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.65-3 + + -- Gibyoung Kim Mon, 07 Jun 2010 17:41:50 +0900 + +setting (0.1.65-2) unstable; urgency=low + + * fix bug related language change and remove build break + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.65-2 + + -- Gibyoung Kim Mon, 07 Jun 2010 11:11:19 +0900 + +setting (0.1.65-1) unstable; urgency=low + + * change appfwk as appcore + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.65-1 + + -- Gibyoung Kim Sat, 05 Jun 2010 17:02:03 +0900 + +setting (0.1.64-3) unstable; urgency=low + + * remove old package and api + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.64-3 + + -- Gibyoung Kim Fri, 04 Jun 2010 18:22:38 +0900 + +setting (0.1.64-2) unstable; urgency=low + + * code clean for setting-font + * remove build break related utilcore + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.64-2 + + -- Gibyoung Kim Fri, 04 Jun 2010 16:00:38 +0900 + +setting (0.1.64-1) unstable; urgency=low + + * apply changes from phonebook engine + * code cleaning + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.64-1 + + -- Gibyoung Kim Fri, 04 Jun 2010 13:24:05 +0900 + +setting (0.1.63-3) unstable; urgency=low + + * rebuilding for telephony framework + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.63-3 + + -- Gibyoung Kim Thu, 03 Jun 2010 15:56:19 +0900 + +setting (0.1.63-2) unstable; urgency=low + + * rebuilding for telephony framework and partial code cleaning + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.63-2 + + -- Gibyoung Kim Thu, 03 Jun 2010 15:21:40 +0900 + +setting (0.1.63-1) unstable; urgency=low + + * apply changes from system framework and heynoti + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.63-1 + + -- Gibyoung Kim Thu, 03 Jun 2010 11:22:19 +0900 + +setting (0.1.62-1) unstable; urgency=low + + * add system reboot API and memo clearing API + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.62-1 + + -- Gibyoung Kim Mon, 31 May 2010 22:53:26 +0900 + +setting (0.1.61-3) unstable; urgency=low + + * to remove BS in setting-security + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.61-3 + + -- Gibyoung Kim Mon, 31 May 2010 19:52:46 +0900 + +setting (0.1.61-2) unstable; urgency=low + + * to remove BS from setting-network + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.61-2 + + -- Gibyoung Kim Mon, 31 May 2010 17:48:40 +0900 + +setting (0.1.61-1) unstable; urgency=low + + * fix bug for setting-neetwork and code cleaning + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.61-1 + + -- Gibyoung Kim Mon, 31 May 2010 14:44:10 +0900 + +setting (0.1.60-1) unstable; urgency=low + + * apply changes from MMFW + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.60-1 + + -- Gibyoung Kim Mon, 31 May 2010 12:47:11 +0900 + +setting (0.1.59-2) unstable; urgency=low + + * to fix bug related with telephony changes + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.59-2 + + -- Gibyoung Kim Sat, 29 May 2010 18:11:38 +0900 + +setting (0.1.59-1) unstable; urgency=low + + * apply changes from telephony + * apply heynoti + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.59-1 + + -- Gibyoung Kim Sat, 29 May 2010 17:21:53 +0900 + +setting (0.1.58-1) unstable; urgency=low + + * Apply Dnet API changes + * code cleaning and bug fixing(H0100094425) + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.58-1 + + -- Gibyoung Kim Sat, 29 May 2010 00:19:38 +0900 + +setting (0.1.57-1) unstable; urgency=low + + * code cleaning(application, display, network, memory) + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.57-1 + + -- Gibyoung Kim Mon, 24 May 2010 22:41:39 +0900 + +setting (0.1.56-2) unstable; urgency=low + + * apply privilege control + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.56-2 + + -- Gibyoung Kim Wed, 19 May 2010 23:21:05 +0900 + +setting (0.1.55-1) unstable; urgency=low + + * code cleaning(common, application, connectivity) + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.55-1 + + -- Gibyoung Kim Mon, 17 May 2010 22:18:30 +0900 + +setting (0.1.54-1) unstable; urgency=low + + * from Sandeep : fix bugs related with vconf_get_str() (CQ H0100094842, H0100094844, H0100095961) + * apply changes from Emain framework + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.54-1 + + -- Gibyoung Kim Fri, 14 May 2010 16:46:53 +0900 + +setting (0.1.53-1) unstable; urgency=low + + * fixed bugs + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.53-1 + + -- JunYoung Kim Tue, 11 May 2010 21:41:05 +0900 + +setting (0.1.52-1) unstable; urgency=low + + * fixed mobile tracker + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.52-1 + + -- JunYoung Kim Thu, 06 May 2010 15:32:09 +0900 + +setting (0.1.51-1) unstable; urgency=low + + * fixed memory leak, picker error + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.51-1 + + -- JunYoung Kim Tue, 04 May 2010 14:09:41 +0900 + +setting (0.1.50-3) unstable; urgency=low + + * rebuild for DNET + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.50-3 + + -- JunYoung Kim Wed, 28 Apr 2010 14:18:49 +0900 + +setting (0.1.50-2) unstable; urgency=low + + * remove resource for setting-profile + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.50-2 + + -- Gibyoung Kim Tue, 27 Apr 2010 10:45:36 +0900 + +setting (0.1.50-1) unstable; urgency=low + + * enhance source code + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.50-1 + + -- JunYoung Kim Mon, 26 Apr 2010 23:56:45 +0900 + +setting (0.1.49-1) unstable; urgency=low + + * Fixed security bug + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.49:-1 + + -- JunYoung Kim Fri, 23 Apr 2010 11:28:22 +0900 + +setting (0.1.48-1) unstable; urgency=low + + * Size string for user memory storage is changed to use MB, GB + * Fixed postinst error + * Code cleanign setp 3 for setting memory + * Adjust DAC in setting + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.48-1 + + -- JunYoung Kim Wed, 21 Apr 2010 16:06:47 +0900 + +setting (0.1.47-1) unstable; urgency=low + + * Code cleaning of memory and sound profiles. + * Fix default value of Message alert vibration as the selected value by + user. + * Connectivity-main shows 'ask on connection' menu when user select it. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.47-1 + + -- Youngae Kang Sat, 17 Apr 2010 12:28:14 +0900 + +setting (0.1.46-1) unstable; urgency=low + + * fixed the phone, profile setting + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.46-1 + + -- JunYoung Kim Thu, 15 Apr 2010 16:47:06 +0900 + +setting (0.1.45-2) unstable; urgency=low + + * rebuild - fixed problme which is default value + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.45-2 + + -- JunYoung Kim Wed, 14 Apr 2010 17:10:19 +0900 + +setting (0.1.45-1) unstable; urgency=low + + * removed fake image + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.45-1 + + -- JunYoung Kim Tue, 13 Apr 2010 16:53:24 +0900 + +setting (0.1.44-3) unstable; urgency=low + + * build failed. rebuild + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.44-3 + + -- JunYoung Kim Tue, 13 Apr 2010 09:19:14 +0900 + +setting (0.1.44-2) unstable; urgency=low + + * rebuild + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.44-2 + + -- JunYoung Kim Mon, 12 Apr 2010 14:40:20 +0900 + +setting (0.1.44-1) unstable; urgency=low + + * adjust avator, adjust usb setting + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.44-1 + + -- JunYoung Kim Mon, 12 Apr 2010 13:42:23 +0900 + +setting (0.1.43-1) unstable; urgency=low + + * Merge About module changed by Rajeesh. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.43-1 + + -- Youngae Kang Fri, 09 Apr 2010 22:55:26 +0900 + +setting (0.1.42-2) unstable; urgency=low + + * Add tag description. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.42-2 + + -- Youngae Kang Fri, 09 Apr 2010 20:13:07 +0900 + +setting (0.1.42-1) unstable; urgency=low + + * Fix the bug that checkbox of DST doesn't show ON even though DST is set ON when + a user taps on 'Back' softkey and return to 'Time and date' + + -- Youngae Kang Fri, 09 Apr 2010 19:58:58 +0900 + +setting (0.1.41-1) unstable; urgency=low + + * Fix two bugs. + * The first is to save password as the value of user_name. + * The second is to save HomeURL as the value of proxy address. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.41-1 + + -- Youngae Kang Fri, 09 Apr 2010 18:22:35 +0900 + +setting (0.1.40-1) unstable; urgency=low + + * adjusted passwd SG in clear phone + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.40-1 + + -- JunYoung Kim Thu, 08 Apr 2010 22:56:00 +0900 + +setting (0.1.39-2) unstable; urgency=low + + * rebuild + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.39-2 + + -- JunYoung Kim Wed, 07 Apr 2010 11:06:49 +0900 + +setting (0.1.39-1) unstable; urgency=low + + * adjust default memory, fixed BS, added home url to mms connections, removed unused files + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.38-1 + + -- JunYoung Kim Wed, 07 Apr 2010 00:23:32 +0900 + +setting (0.1.38-1) unstable; urgency=low + + * Modify some language resources. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.38-1 + + -- YoungAe Kang Mon, 05 Apr 2010 22:21:35 +0900 + +setting (0.1.37-1) unstable; urgency=low + + * adjust gray bg in connectivity menu + * fixed toggle button data roaming, auto lock + + -- JunYoung Kim Mon, 05 Apr 2010 22:16:37 +0900 + +setting (0.1.36-1) unstable; urgency=low + + * Modify memory status and code cleaning. + * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag: setting_0.1.36-1 + + -- YoungAe Kang Mon, 05 Apr 2010 10:25:44 +0900 + +setting (0.1.35-1) unstable; urgency=low + + * Delete dependent codes on the previsou UI_ime packages. + * Modify codes wether mmc card exists or not. + * Git : 165.213.180.234:/git/slp2.0/slp2.0-pkgs/setting-0 + * Tag : setting_0.1.35-1 + + -- YoungAe Kang Fri, 02 Apr 2010 14:22:30 +0900 + +setting (0.1.34-1) unstable; urgency=low + + * Fix the defect that it exited after finishing Clear phone memory. + * Merge Memory status codes. + + -- YoungAe Kang Fri, 02 Apr 2010 03:22:47 +0900 + +setting (0.1.33-1) unstable; urgency=low + + * Merge codes of Time and date adopting modified UI. + + -- YoungAe Kang Thu, 01 Apr 2010 18:10:37 +0900 + +setting (0.1.32-1) unstable; urgency=low + + * Fix toggle bug of all items at General -> Ticker notification. + + -- YoungAe Kang Thu, 01 Apr 2010 17:32:11 +0900 + +setting (0.1.31-1) unstable; urgency=low + + * Insert #ifdef _A_PROJECT_ into Memory Status because of upgrading Email Service(Version 0.1.1-16). + + -- YoungAe Kang Wed, 31 Mar 2010 18:08:26 +0900 + +setting (0.1.30-1) unstable; urgency=low + + * Change Telephony header because of upgrading Telephony FW(Version 0.2.3). + + -- YoungAe Kang Wed, 31 Mar 2010 16:33:28 +0900 + +setting (0.1.29-1) unstable; urgency=low + + * Rollback header file to delay tomorrow. + * Add memory status modified by GiByoung. + + -- YoungAe Kang Tue, 30 Mar 2010 22:23:11 +0900 + +setting (0.1.28-1) unstable; urgency=low + + * Change Telephony header because of upgrading Telephony FW. + + -- YoungAe Kang Tue, 30 Mar 2010 18:23:50 +0900 + +setting (0.1.27-1) unstable; urgency=low + + * Fix BS of chaging Internet and MMS connections when User Name or Password is NULL. + + -- YoungAe Kang Tue, 30 Mar 2010 16:06:16 +0900 + +setting (0.1.26-1) unstable; urgency=low + + * Rollback setting_connection_create_connection() to orignal code. + + -- YoungAe Kang Tue, 30 Mar 2010 15:15:32 +0900 + +setting (0.1.25-1) unstable; urgency=low + + * Merge Preferred Network codes with master branch. + * Fix reset of Power on lock. + * Change to show "Please insert a SIM" message instead of "Invalid SIM" when there is no SIM. + * Change to keep SIM lock unchecked when there is no SIM. + + -- YoungAe Kang Tue, 30 Mar 2010 01:41:24 +0900 + +setting (0.1.24-1) unstable; urgency=low + + * Modified inital value of Brightness and Backlight time. + + -- YoungAe Kang Thu, 25 Mar 2010 23:24:11 +0900 + +setting (0.1.23-1) unstable; urgency=low + + * Modified wrong spell, "Ticker notification". + + -- YoungAe Kang Thu, 25 Mar 2010 23:24:11 +0900 + +setting (0.1.22-1) unstable; urgency=low + + * modified mobile tracker, adjusted SG in memory setting + + -- JunYoung Kim Fri, 26 Mar 2010 20:01:42 +0900 + +setting (0.1.21-1) unstable; urgency=low + + * CHANGE TOOLCHAIN from 2007q3 to 2009q3!!! + * DongHwan Ji + * calculate mmc max, free size master + * JunYoung Kim + * fixed problem what don't update checkbox + * Merge branch 'master' of jy0214.kim@165.213.180.234... + * added sim lock check routine in security + * modified default value + * adjust mobile tracker SG + * fixed reset all setting + * adjusted roaming network in license setting + * Jihoon Kim + * change the path of Xresources + + -- YoungAe Kang Thu, 25 Mar 2010 23:24:11 +0900 + +setting (0.1.20-1) unstable; urgency=low + + * Gibyoung + * change layout of volume slider + * junyoung + * fixed brightness problem + * junyoung + * rollback control file + * junyoung + * adjust SG in security + + -- YoungAe Kang Wed, 24 Mar 2010 22:03:52 +0900 + +setting (0.1.19-1) unstable; urgency=low + + * BS of TimeZone is fixed by + * Sound profile is modified by + * Clear Memory is modified by + * Add feature of Network profile is added by + * Preferred network is added by SISO + + -- YoungAe Kang Tue, 23 Mar 2010 16:10:49 +0900 + +setting (0.1.18-2) unstable; urgency=low + + * to resolve CQ H0100085701 + * to fix BS + * to fix locale value in language setting + * to fix memory problem + * to modify silent profile view(CQ H0100079119) + + -- JunYoung Kim Mon, 22 Mar 2010 21:05:23 +0900 + +setting (0.1.18-1) unstable; urgency=low + + * modified network profile policy & adjust license + + -- JunYoung Kim Fri, 19 Mar 2010 17:35:19 +0900 + +setting (0.1.17-1) unstable; urgency=low + + * adjusted korea language main, phone view + + -- junyoung kim Wed, 17 Mar 2010 20:08:51 +0900 + +setting (0.1.16-2) unstable; urgency=low + + * modified to get profile id in network setting + + -- junyoung Tue, 16 Mar 2010 22:34:06 +0900 + +setting (0.1.16-1) unstable; urgency=low + + * added password SG, fixed cq bug + + -- junyoung kim Tue, 16 Mar 2010 21:54:44 +0900 + +setting (0.1.15-1) unstable; urgency=low + + * adjusted new winset in time setting + + -- junyoung kim Mon, 15 Mar 2010 16:40:35 +0900 + +setting (0.1.13-2) unstable; urgency=low + + * rebuild + + -- junyoung kim Thu, 11 Mar 2010 16:08:57 +0900 + +setting (0.1.13-1) unstable; urgency=low + + * make setting_create_dial_field_xxx style draw widget + + -- junyoung kim Thu, 11 Mar 2010 15:59:59 +0900 + +setting (0.1.12-0) unstable; urgency=low + + * adjused new winset in tvout + + -- junyoung kim Wed, 10 Mar 2010 09:58:44 +0900 + +setting (0.1.11-3) unstable; urgency=low + + * rebuild + + -- junyoung kim Mon, 08 Mar 2010 23:40:20 +0900 + +setting (0.1.11-2) unstable; urgency=low + + * fixed display setting, added divx logic, enhance profile setting + + -- junyoung kim Mon, 08 Mar 2010 23:37:15 +0900 + +setting (0.1.11-1) unstable; urgency=low + + * Add haptic pattern vibration API + + -- junyoung kim Mon, 08 Mar 2010 14:10:10 +0900 + +setting (0.1.10-09) unstable; urgency=low + + * rebuild + + -- junyoung kim Fri, 05 Mar 2010 18:01:05 +0900 + +setting (0.1.10-08) unstable; urgency=low + + * adjused new winset + + -- root Fri, 05 Mar 2010 17:56:51 +0900 + +setting (0.1.10-07) unstable; urgency=low + + * cq bug fix + + -- junyoung kim Wed, 03 Mar 2010 14:48:05 +0900 + +setting (0.1.10-06) unstable; urgency=low + + * added help page in network setting & modified memory setting + + -- junyoung kim Sat, 27 Feb 2010 12:17:39 +0900 + +setting (0.1.10-05) unstable; urgency=low + + * change application setting code (use ciss shared gadget) + + -- siwoo Lee Fri, 26 Feb 2010 14:38:04 +0900 + +setting (0.1.10-04) unstable; urgency=low + + * fixed flight mode & added file-mgr API when user changed wallpaper + + -- junyoung kim Thu, 25 Feb 2010 20:53:45 +0900 + +setting (0.1.10-03) unstable; urgency=low + + * adjusted SG in connectivity & added home url in MMS profile + + -- junyoung kim Thu, 25 Feb 2010 13:55:29 +0900 + +setting (0.1.10-02) unstable; urgency=low + + * added help page in network setting + + -- junyoung kim Wed, 24 Feb 2010 00:38:54 +0900 + +setting (0.1.10-01) unstable; urgency=low + + * changed UI according to UI v1.5 + + -- junyoung kim Wed, 24 Feb 2010 00:36:21 +0900 + +setting (0.1.9-31) unstable; urgency=low + + * add vconf key + + -- siwoo Lee Mon, 22 Feb 2010 10:19:16 +0900 + +setting (0.1.9-30) unstable; urgency=low + + * added font SG, modified indicator policy, fixed mmplayer + + -- jun young kim Sat, 20 Feb 2010 17:44:09 +0900 + +setting (0.1.9-29) unstable; urgency=low + + * modified memory setting + + -- jun young kim Sat, 20 Feb 2010 14:23:42 +0900 + +setting (0.1.9-28) unstable; urgency=low + + * added phonebook-dev + + -- jun young kim Sat, 20 Feb 2010 10:54:04 +0900 + +setting (0.1.9-27) unstable; urgency=low + + * fixed picker, fixed to save profile, implemented SG in profile setting + + -- jun young kim Sat, 20 Feb 2010 10:24:50 +0900 + +setting (0.1.9-26) unstable; urgency=low + + * change mobile tracker code + + -- siwoo Lee Fri, 19 Feb 2010 20:39:27 +0900 + +setting (0.1.9-25) unstable; urgency=low + + * fix build error + + -- siwoo Lee Fri, 19 Feb 2010 19:28:21 +0900 + +setting (0.1.9-24) unstable; urgency=low + + * modify mobile tracker code + + -- siwoo Lee Fri, 19 Feb 2010 18:23:20 +0900 + +setting (0.1.9-23) unstable; urgency=low + + * bug fix multi entry issue + + -- siwoo Lee Thu, 18 Feb 2010 11:20:25 +0900 + +setting (0.1.9-22) unstable; urgency=low + + * changed launching method about open source license & removed widget disclaimer & modified security SIM related option + + -- jun young kim Wed, 17 Feb 2010 14:34:25 +0900 + +setting (0.1.9-21) unstable; urgency=low + + * Removed UI-ime library + + -- Sandeep Kumar Singh Tue, 16 Feb 2010 18:33:13 +0900 + +setting (0.1.9-21) unstable; urgency=low + + * Removed Widget Disclaimer, Modified Security items + + -- Sandeep Kumar Singh Tue, 16 Feb 2010 18:15:13 +0900 + +setting (0.1.9-20) unstable; urgency=low + + * fixed black screen for SG + + -- jun young kim Fri, 12 Feb 2010 20:06:13 +0900 + +setting (0.1.9-19) unstable; urgency=low + + * fixed datepicker, timepicker, fixed black screen. + + -- jun young kim Fri, 12 Feb 2010 18:18:34 +0900 + +setting (0.1.9-17) unstable; urgency=low + + * implemented memory setting + + -- jun young kim Fri, 12 Feb 2010 11:47:27 +0900 + +setting (0.1.9-16) unstable; urgency=low + + * adjust SG in time setting + + -- jun young kim Thu, 11 Feb 2010 23:58:32 +0900 + +setting (0.1.9-15) unstable; urgency=low + + * add phonebook shared gadget(application setting) + + -- siwoo Lee Thu, 11 Feb 2010 17:16:49 +0900 + +setting (0.1.9-14) unstable; urgency=low + + * modify password popup string + + -- siwoo Lee Thu, 11 Feb 2010 14:10:55 +0900 + +setting (0.1.9-13) unstable; urgency=low + + * modified control file to change architecture for my file + + -- jun young kim Wed, 10 Feb 2010 19:10:01 +0900 + +setting (0.1.9-12) unstable; urgency=low + + * adjust SG in application setting + + -- jun young kim Wed, 10 Feb 2010 18:56:38 +0900 + +setting (0.1.9-11) unstable; urgency=low + + * modified flight mode clicking problem + + -- jun young kim Wed, 10 Feb 2010 17:29:42 +0900 + +setting (0.1.9-10) unstable; urgency=low + + * adjust SG in display setting + + -- jun young kim Wed, 10 Feb 2010 11:30:10 +0900 + +setting (0.1.9-09) unstable; urgency=low + + * apply phonebook shared gadget + + -- siwoo Lee Wed, 10 Feb 2010 09:07:41 +0900 + +setting (0.1.9-08) unstable; urgency=low + + * modify control file + + -- siwoo Lee Tue, 09 Feb 2010 14:38:03 +0900 + +setting (0.1.9-07) unstable; urgency=low + + * modify changelog + + -- siwoo Lee Mon, 08 Feb 2010 10:41:15 +0900 + +setting (0.1.9-06) unstable; urgency=low + + * bug fix vconfkey value + + -- jun young kim Mon, 08 Feb 2010 10:08:07 +0900 + +setting (0.1.9-05) unstable; urgency=low + + * fixed sound profile path problem + + -- jun young kim Sat, 06 Feb 2010 10:56:34 +0900 + +setting (0.1.9-04) unstable; urgency=low + + * bug fix CQ & BS + + -- Siwoo Lee Fri, 05 Feb 2010 22:34:45 +0900 + +setting (0.1.9-03) unstable; urgency=low + + * rebuild + + -- jun young kim Fri, 05 Feb 2010 17:57:54 +0900 + +setting (0.1.9-02) unstable; urgency=low + + * modified D1NF type to possible list click + + -- jun young kim Fri, 05 Feb 2010 17:21:28 +0900 + +setting (0.1.9-00) unstable; urgency=low + + * modify security application code + + -- Siwoo Lee Thu, 04 Feb 2010 14:46:30 +0900 + +setting (0.1.8-14) unstable; urgency=low + + * upload test + + -- Siwoo Lee Thu, 04 Feb 2010 14:40:47 +0900 + +setting (0.1.8-13) unstable; urgency=low + + * fixed build error + + -- jun young kim Thu, 04 Feb 2010 13:18:44 +0900 + +setting (0.1.8-12) unstable; urgency=low + + * fixed build error + + -- root Thu, 04 Feb 2010 13:18:33 +0900 + +setting (0.1.8-11) unstable; urgency=low + + * fixed build error in time setting + + -- jun young kim Thu, 04 Feb 2010 11:54:38 +0900 + +setting (0.1.8-9) unstable; urgency=low + + * modified flight mode + + -- jun young kim Thu, 04 Feb 2010 00:07:13 +0900 + +setting (0.1.8-8) unstable; urgency=low + + * modified titlebar + + -- jun young kim Wed, 03 Feb 2010 17:13:27 +0900 + +setting (0.1.8-7) unstable; urgency=low + + * adjusted new winset (titlebar, indicator, softkey) + + -- root Tue, 02 Feb 2010 19:27:58 +0900 + +setting (0.1.8-6) unstable; urgency=low + + * rebuild + + -- jun young kim Sat, 30 Jan 2010 17:43:08 +0900 + +setting (0.1.8-5) unstable; urgency=low + + * fixed default image path in postinst, modified desktop Name option for multi language + + -- jun young kim Sat, 30 Jan 2010 15:20:32 +0900 + +setting (0.1.8-3) unstable; urgency=low + + * modified reset problem + + -- jun young kim Fri, 29 Jan 2010 20:49:14 +0900 + +setting (0.1.8-2) unstable; urgency=low + + * implemented mobile tracker + + -- jun young kim Fri, 29 Jan 2010 19:13:59 +0900 + +setting (0.1.8-1) unstable; urgency=low + + * changed SLP naming + + -- jun young kim Wed, 27 Jan 2010 15:56:14 +0900 + +setting (0.1.7-57) unstable; urgency=low + + * rebuild + + -- jun young kim Sat, 23 Jan 2010 18:09:12 +0900 + +setting (0.1.7-56) unstable; urgency=low + + * modified network connection section + + -- jun young kim Sat, 23 Jan 2010 18:03:21 +0900 + +setting (0.1.7-55) unstable; urgency=low + + * fixed problme when user enter open source license menu, raise BS + + -- jun young kim Sat, 23 Jan 2010 16:15:35 +0900 + +setting (0.1.7-54) unstable; urgency=low + + * fixed ringtone & modified setting name + + -- jun young kim Sat, 23 Jan 2010 14:08:15 +0900 + +setting (0.1.7-53) unstable; urgency=low + + * implemented ringtone and fixed time and date + + -- jun young kim Fri, 22 Jan 2010 19:56:18 +0900 + +setting (0.1.7-52) unstable; urgency=low + + * connected myfile shared gadget and timezone shared gadgety + + -- jun young kim Fri, 22 Jan 2010 11:14:20 +0900 + +setting (0.1.7-51) unstable; urgency=low + + * implement vibration feedback func + + -- jun young kim Thu, 21 Jan 2010 16:33:11 +0900 + +setting (0.1.7-50) unstable; urgency=low + + * implemented application setting except phonebook + + -- jun young kim Thu, 21 Jan 2010 12:02:33 +0900 + +setting (0.1.7-49) unstable; urgency=low + + * fixed vibration feedback scope (1-10 -> 0-5) + + -- jun young kim Thu, 21 Jan 2010 10:13:03 +0900 + +setting (0.1.7-48) unstable; urgency=low + + * implemented touch menu in phone setting + + -- jun young kim Thu, 21 Jan 2010 10:04:20 +0900 + +setting (0.1.7-47) unstable; urgency=low + + * rebuild to chang email + + -- jun young kim Wed, 20 Jan 2010 17:40:37 +0900 + +setting (0.1.7-46) unstable; urgency=low + + * rebuild + + -- jun young kim Wed, 20 Jan 2010 17:32:32 +0900 + +setting (0.1.7-45) unstable; urgency=low + + * implemented data-roaming + + -- jun young kim Wed, 20 Jan 2010 17:22:38 +0900 + +setting (0.1.7-44) unstable; urgency=low + + * fixed postinst bug + + -- jun young kim Tue, 19 Jan 2010 22:10:35 +0900 + +setting (0.1.7-43) unstable; urgency=low + + * modify postinst file : add #!/bin/bash + + -- Tai Hyung Kim Tue, 19 Jan 2010 21:47:57 +0900 + +setting (0.1.7-42) unstable; urgency=low + + * change mode postinst file + + -- Tai Hyung Kim Tue, 19 Jan 2010 21:14:42 +0900 + +setting (0.1.7-41) unstable; urgency=low + + * rebuild package because of fake image problem + + -- Tai Hyung Kim Tue, 19 Jan 2010 20:25:24 +0900 + +setting (0.1.7-40) unstable; urgency=low + + * added postinst files, fixed about fake image problem + + -- jun-young kim Tue, 19 Jan 2010 17:57:04 +0900 + +setting (0.1.7-39) unstable; urgency=low + + * removed smart unlock menu in phone setting + + -- jun-young kim Tue, 19 Jan 2010 13:48:37 +0900 + +setting (0.1.7-38) unstable; urgency=low + + * implemented text input menu and move data roaming menu from phone to network + + -- jun-young kim Tue, 19 Jan 2010 12:08:07 +0900 + +setting (0.1.7-37) unstable; urgency=low + + * set default value + + -- jun-young kim Sat, 16 Jan 2010 17:24:06 +0900 + +setting (0.1.7-36) unstable; urgency=low + + * implemented reset setting and network setting + + -- jun-young kim Sat, 16 Jan 2010 11:31:47 +0900 + +setting (0.1.7-35) unstable; urgency=low + + * implemented setting connectivity menu + + -- jun-young kim Fri, 15 Jan 2010 19:40:43 +0900 + +setting (0.1.7-34) unstable; urgency=low + + * implemented setting-connectivity menu + + -- root Fri, 15 Jan 2010 19:39:38 +0900 + +setting (0.1.7-33) unstable; urgency=low + + * rebuild + + -- jun-young kim Fri, 15 Jan 2010 15:38:25 +0900 + +setting (0.1.7-32) unstable; urgency=low + + * implemented click event in DCBS & time menu + + -- root Fri, 15 Jan 2010 15:35:36 +0900 + +setting (0.1.7-31) unstable; urgency=low + + * rebuild + + -- jun-young kim Thu, 14 Jan 2010 21:56:21 +0900 + +setting (0.1.7-30) unstable; urgency=low + + * rebuild + + -- junyoung kim Thu, 14 Jan 2010 21:51:42 +0900 + +setting (0.1.7-29) unstable; urgency=low + + * modified debian/control file + + -- root Thu, 14 Jan 2010 21:44:28 +0900 + +setting (0.1.7-28) unstable; urgency=low + + * rebuild again + + -- root Thu, 14 Jan 2010 21:25:36 +0900 + +setting (0.1.7-27) unstable; urgency=low + + * rebuild + + -- root Thu, 14 Jan 2010 21:25:09 +0900 + +setting (0.1.7-26) unstable; urgency=low + + * fixed menu widget + + -- jun-young kim Thu, 14 Jan 2010 19:42:28 +0900 + +setting (0.1.7-25) unstable; urgency=low + + * added default value in first time + + -- jun-young kim Thu, 14 Jan 2010 00:00:46 +0900 + +setting (0.1.7-24) unstable; urgency=low + + * fixed main view + + -- jun-young kim Wed, 13 Jan 2010 17:48:42 +0900 + +setting (0.1.7-23) unstable; urgency=low + + * architecture changed (armel -> any) + + -- jun-young kim Wed, 13 Jan 2010 15:02:43 +0900 + +setting (0.1.7-22) unstable; urgency=low + + * build again + + -- jun-young kim Wed, 13 Jan 2010 12:09:38 +0900 + +setting (0.1.7-21) unstable; urgency=low + + * added mesure time routine, modified fake image routine + + -- jun-young kim Wed, 13 Jan 2010 11:30:25 +0900 + +setting (0.1.7-20) unstable; urgency=low + + * added libtw3-popup-dev in control file + + -- jun-young kim Tue, 12 Jan 2010 09:01:06 +0900 + +setting (0.1.7-19) unstable; urgency=low + + * build again + + -- jun-young kim Tue, 12 Jan 2010 08:14:42 +0900 + +setting (0.1.7-18) unstable; urgency=low + + * build again + + -- jun-young kim Tue, 12 Jan 2010 08:07:07 +0900 + +setting (0.1.7-17) unstable; urgency=low + + * implement time-setting + rollback setting main veiw + + -- jun-young kim Mon, 11 Jan 2010 23:11:46 +0900 + +setting (0.1.7-16) unstable; urgency=low + + * fixed build error (added libtw3-popup-dev library in control file) + + -- jun-young kim Mon, 11 Jan 2010 12:24:48 +0900 + +setting (0.1.7-15) unstable; urgency=low + + * use list widget instead of setting-theme dialogue in setting-main.c + added measure source code in setting.c + added protected code in setting-display.c (wallpaper) + + -- jun-young kim Mon, 11 Jan 2010 12:15:28 +0900 + +setting (0.1.7-14) unstable; urgency=low + + * added space each dialogue filed + + -- jun-young kim Fri, 08 Jan 2010 17:47:19 +0900 + +setting (0.1.7-13) unstable; urgency=low + + * fixed touch problem and indicator problem + + -- jun-young kim Fri, 08 Jan 2010 14:54:17 +0900 + +setting (0.1.7-12) unstable; urgency=low + + * implement tv out2 + + -- jun-young kim Thu, 07 Jan 2010 19:42:51 +0900 + +setting (0.1.7-11) unstable; urgency=low + + * implement tv out + + -- jun-young kim Thu, 07 Jan 2010 19:42:29 +0900 + +setting (0.1.7-10) unstable; urgency=low + + * implement tv out & brightness + + -- jun-young kim Wed, 06 Jan 2010 20:28:55 +0900 + +setting (0.1.7-9) unstable; urgency=low + + * implement 2 depth menu except memory setting + + -- jun-young kim Wed, 06 Jan 2010 14:56:56 +0900 + +setting (0.1.7-8) unstable; urgency=low + + * implement 2 depth menu + + -- jun-young kim Mon, 04 Jan 2010 20:33:37 +0900 + +setting (0.1.7-7) unstable; urgency=low + + * fixed ELF drawing problem & implement flight mode + + -- jun-young kim Sat, 02 Jan 2010 16:20:21 +0900 + +setting (0.1.7-6) unstable; urgency=low + + * add new menu - menu and widgets + + -- jun-young kim Tue, 29 Dec 2009 22:10:20 +0900 + +setting (0.1.7-5) unstable; urgency=low + + * implement network setting + + -- jun-young kim Tue, 29 Dec 2009 18:54:20 +0900 + +setting (0.1.7-4) unstable; urgency=low + + * implement network setting + + -- jun-young kim Tue, 29 Dec 2009 15:55:54 +0900 + +setting (0.1.7-3) unstable; urgency=low + + * fixed build error + + -- jun-young kim Tue, 29 Dec 2009 14:21:32 +0900 + +setting (0.1.7-2) unstable; urgency=low + + * implement connectivity menu + + -- jun-young kim Tue, 29 Dec 2009 00:49:06 +0900 + +setting (0.1.7-1) unstable; urgency=low + + * implement wall paper + + -- jun-young kim Mon, 28 Dec 2009 23:00:47 +0900 - -- Taeyoung Kim Mon, 23 Apr 2012 21:03:11 +0900 diff --git a/debian/org.tizen.setting.install.in b/debian/com.samsung.setting.install.in similarity index 100% rename from debian/org.tizen.setting.install.in rename to debian/com.samsung.setting.install.in diff --git a/debian/org.tizen.setting.postinst b/debian/com.samsung.setting.postinst similarity index 58% rename from debian/org.tizen.setting.postinst rename to debian/com.samsung.setting.postinst index 7b2dd26..88ce8e2 100755 --- a/debian/org.tizen.setting.postinst +++ b/debian/com.samsung.setting.postinst @@ -10,8 +10,8 @@ fi ECHO="echo" ################# shell paragrames ############## +FLIGHTMODE="flightmode" NETWORK="network" -DATAROAMING="dataroaming" USBCON="usbconnectivity" SOUND="sounds" @@ -19,12 +19,15 @@ WALLPAPER="wallpaper" DISPLAY="display" MOTIONS="motions" -TILT="tile" -PANNING="panning" +TILT_ZOOM="tilt_zoom" +TILT_SCROLL="tilt_scroll" +PANNING_MOVE="panning_move" +PANNING_BROWSER="panning_browser" DOUBLETAP="double_tap" TURNOVER="turn_over" SHAKE="shake" -PICKUP="pick up" +PICKUP_NOTIFIED="pickup_notified" +PICKUP_CALL="pickup_call" POWERSAVING="powersaving" FONT="font" @@ -41,39 +44,45 @@ SECURITY="security" MEMORY="memory" ABOUT="about" MENUWIDGET="menuwidget" +MENUSCREEN="menuscreen" + +resetMenuscreen() +{ + #vconftool $GOPTION set -t string db/setting/menuscreen/selected "com.samsung.cluster-home" + vconftool $GOPTION set -t string db/setting/menuscreen/package_name "com.samsung.menu-screen" +} #$ECHO $GOPTION +#Flightmode +resetFlightmode() +{ + vconftool $GOPTION set -t bool db/setting/flight_mode "0" +} + #network resetNetwork() { vconftool $GOPTION set -t int db/setting/select_network "0" vconftool $GOPTION set -t int db/setting/network_mode "0" vconftool $GOPTION set -t bool db/setting/3gEnabled "1" -} - -#dataRoaming -resetDataRoaming() -{ vconftool $GOPTION set -t bool db/setting/data_roaming "1" } #UsbConnectivity resetUsbConnectivity() { - #connectivity - #vconftool $GOPTION set -t bool db/setting/ask_on_con "0" - # debug mode is default vconftool $GOPTION set -t int memory/setting/usb_mode "-1" -i -f vconftool $GOPTION set -t int memory/setting/usb_sel_mode "0" -i -f - vconftool $GOPTION set -t int db/setting/usb_debugmode "0" vconftool $GOPTION set -t int memory/setting/usb_in_mode_change "0" -i -f } #sound profiles resetSound() { - DEFAULT_CALL_TONE="/opt/share/settings/Ringtones/General_Over the horizon.mp3" + DEFAULT_CALL_TONE="/opt/share/settings/Ringtones/Over the horizon.mp3" + DEFAULT_NOTI_TONE="/opt/share/settings/Alerts/Whistle.mp3" + DEFAULT_MEDIA_TONE="/opt/share/settings/Previews/Over the horizon.mp3" vconftool $GOPTION set -t bool db/setting/sound/sound_on "1" vconftool $GOPTION set -t bool db/setting/sound/vibration_on "1" @@ -85,25 +94,18 @@ resetSound() vconftool $GOPTION set -t int db/setting/sound/noti/vibration_level "5" vconftool $GOPTION set -t int db/setting/sound/touch_feedback/vibration_level "3" + vconftool $GOPTION set -t int db/setting/sound/touch_feedback/vibration_level_bak "3" ##private key vconftool $GOPTION set -t string db/setting/sound/call/ringtone_path "${DEFAULT_CALL_TONE}" vconftool $GOPTION set -t int db/setting/sound/call/vibration_type "2" - vconftool $GOPTION set -t string db/setting/sound/noti/msg_ringtone_path "${DEFAULT_CALL_TONE}" + vconftool $GOPTION set -t string db/setting/sound/noti/msg_ringtone_path "${DEFAULT_NOTI_TONE}" vconftool $GOPTION set -t int db/setting/sound/noti/msg_alert_rep_type "0" - vconftool $GOPTION set -t string db/setting/sound/noti/email_ringtone_path "${DEFAULT_CALL_TONE}" + vconftool $GOPTION set -t string db/setting/sound/noti/email_ringtone_path "${DEFAULT_NOTI_TONE}" vconftool $GOPTION set -t int db/setting/sound/noti/email_alert_rep_type "0" vconftool $GOPTION set -t bool db/setting/sound/sound_lock "1" - #vconftool $GOPTION set -t bool db/setting/sound/keypad_on "1" - #vconftool $GOPTION set -t bool db/setting/sound/sound_effect_on "1" - - #others - vconftool $GOPTION set -t string db/setting/notification_tone "${DEFAULT_CALL_TONE}" - vconftool $GOPTION set -t string db/setting/media_tone "${DEFAULT_CALL_TONE}" - vconftool $GOPTION set -t string db/setting/touch_tone "${DEFAULT_CALL_TONE}" - vconftool $GOPTION set -t int db/setting/touch_vibration_tone "2" } #wallpaper @@ -114,84 +116,107 @@ resetWallpaper() } #motions -resetTilt() +resetTiltZoom() { vconftool $GOPTION set -t bool db/setting/use_tilt "1" vconftool $GOPTION set -t int db/setting/tilt_sensitivity "3" } +resetTiltScroll() +{ + vconftool $GOPTION set -t bool db/setting/use_tilt_scroll "1" + vconftool $GOPTION set -t int db/setting/tilt_scroll_sensitivity "3" +} -resetPanning() +resetPanningMove() { vconftool $GOPTION set -t bool db/setting/use_panning "1" vconftool $GOPTION set -t int db/setting/panning_sensitivity "3" } - +resetPanningBrowser() +{ + vconftool $GOPTION set -t bool db/setting/use_panning_browser "1" + vconftool $GOPTION set -t int db/setting/panning_browser_sensitivity "3" +} resetDoubleTap() { - vconftool $GOPTION set -t bool db/setting/use_double_tap "0" + vconftool $GOPTION set -t bool db/setting/use_double_tap "1" } resetShake() { - vconftool $GOPTION set -t bool db/setting/use_shake "0" + vconftool $GOPTION set -t bool db/setting/use_shake "1" +} +resetPickupNotified() +{ + vconftool $GOPTION set -t bool db/setting/use_pick_up "1" } -resetPickup() +resetPickupCall() { - vconftool $GOPTION set -t bool db/setting/use_pickup "0" + vconftool $GOPTION set -t bool db/setting/use_pick_up_call "1" } + resetTurnOver() { - vconftool $GOPTION set -t bool db/setting/use_turn_over "0" + vconftool $GOPTION set -t bool db/setting/use_turn_over "1" } resetMotions() { vconftool $GOPTION set -t bool db/setting/motion_active "1" - vconftool $GOPTION set -t bool db/setting/internet_on "1" - vconftool $GOPTION set -t bool db/setting/gallery_on "1" + vconftool $GOPTION set -t bool db/setting/motion/palm_swipe_capture "1" + vconftool $GOPTION set -t bool db/setting/motion/palm_touch_mute "1" - resetTilt - resetPanning + resetTiltZoom + resetTiltScroll + resetPanningMove + resetPanningBrowser resetDoubleTap resetTurnOver resetShake - resetPickup + resetPickupNotified + resetPickupCall } #display and light resetDisplay() { #backlight - vconftool $GOPTION set -t int db/MainLCD/Backlight/Normal "30" - vconftool $GOPTION set -t int db/setting/lcd_timeout_normal_backup "30" + vconftool $GOPTION set -t int db/setting/lcd_backlight_normal "30" + #vconftool $GOPTION set -t int db/setting/lcd_timeout_normal_backup "30" #brightness vconftool $GOPTION set -t int db/setting/Brightness "-1" - vconftool $GOPTION set -t bool db/setting/brightness_automatic "0" + vconftool $GOPTION set -t int db/setting/brightness_automatic "0" #battery - vconftool $GOPTION set -t bool db/setting/battery/charger "0" vconftool $GOPTION set -t bool db/setting/battery_percentage "0" #launch - vconftool $GOPTION set -t string db/menu_widget/launch_effect "0" + #vconftool $GOPTION set -t string db/menu_widget/launch_effect "0" } resetPowersaving() { - vconftool $GOPTION set -t bool db/setting/powersaving/powersaving_active "0" - vconftool $GOPTION set -t bool db/setting/powersaving/powersaving_active_reminder "1" - vconftool $GOPTION set -t bool db/setting/powersaving/customed_active "0" - - vconftool $GOPTION set -t int db/setting/powersaving/powersaving_at "30" - vconftool $GOPTION set -t bool db/setting/powersaving/wifi_off "0" - vconftool $GOPTION set -t bool db/setting/powersaving/bt_off "0" - vconftool $GOPTION set -t bool db/setting/powersaving/gps_off "0" - vconftool $GOPTION set -t bool db/setting/powersaving/ync_off "0" - vconftool $GOPTION set -t int db/setting/powersaving/screen_timeout "15" - - vconftool $GOPTION set -t bool db/setting/powersaving/brightness_active "0" - vconftool $GOPTION set -t bool db/setting/powersaving/brightness_auto "1" - vconftool $GOPTION set -t int db/setting/powersaving/brightness "10" + vconftool $GOPTION set -t bool db/setting/pwrsv/system_mode/status "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/system_mode/reminder "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/status "0" + + vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/at "30" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/wifi "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/bt "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/gps "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/data_sync "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/hotspot "1" + + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/brt/status "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/brt/auto/status "0" + vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/brt/value "10" + vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/backlight/time "15" + + #v0.4 + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/cpu "0" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/display "0" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/bg_color "0" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/screen_vib "0" } #font @@ -204,14 +229,13 @@ resetFont() #RotationLock resetRotationLock() { - vconftool $GOPTION set -t bool db/setting/rotate_lock "0" + vconftool $GOPTION set -t bool db/setting/rotate_lock "1" } #time and date (zone) resetTimeAndData() { vconftool $GOPTION set -t bool db/setting/automatic_time_update "1" - vconftool $GOPTION set -t bool db/setting/dst "0" vconftool $GOPTION set -t int db/menu_widget/regionformat_time1224 "1" vconftool $GOPTION set -t int db/setting/date_format "0" @@ -233,18 +257,26 @@ resetTimeAndData() #accessibility resetAccessibility() { - vconftool $GOPTION set -t bool db/setting/accessibility/accessibility "1" + vconftool $GOPTION set -t bool db/setting/accessibility/accessibility "0" vconftool $GOPTION set -t bool db/setting/accessibility/high_contrast "0" vconftool $GOPTION set -t bool db/setting/accessibility/screen_zoom "1" - vconftool $GOPTION set -t int db/setting/accessibility/font_size "72" - vconftool $GOPTION set -t int db/setting/accessibility/font_style "0" + vconftool $GOPTION set -t int db/setting/accessibility/font_size "1" + #vconftool $GOPTION set -t int db/setting/accessibility/font_style "0" vconftool $GOPTION set -t bool db/setting/accessibility/torch_light "0" vconftool $GOPTION set -t bool db/setting/accessibility/mono_audio "0" + vconftool $GOPTION set -t int db/setting/accessibility/power_key_hold "1" + vconftool $GOPTION set -t bool db/setting/accessibility/led_notify "0" + + vconftool $GOPTION set -t bool db/ciss/call_answering_key "0" + vconftool $GOPTION set -t bool db/ciss/call_power_key_ends_call "0" + vconftool $GOPTION set -t int db/ciss/answering_mode "0" + vconftool $GOPTION set -t int db/ciss/answering_mode_time "3" + vconftool $GOPTION set -t bool db/setting/accessibility/accept_call "0" vconftool $GOPTION set -t bool db/setting/accessibility/enable_auto_answer "0" vconftool $GOPTION set -t int db/setting/accessibility/auto_answer "1" - vconftool $GOPTION set -t bool db/setting/accessibility/powerkey_end_calls "0" - vconftool $GOPTION set -t int db/setting/accessibility/power_key_hold "0" + vconftool $GOPTION set -t bool db/setting/accessibility/powerkey_end_calls "0" + } #language & region @@ -256,18 +288,11 @@ resetLanguageAndRegion() } #viewtype -resetViewtype() -{ - vconftool $GOPTION set -t int db/menuscreen/viewtype "0" - vconftool $GOPTION set -t int db/taskswitcher/viewtype "0" -} - -#touch -resetTouch() -{ - vconftool $GOPTION set -t int db/setting/vib_feedback "3" - vconftool $GOPTION set -t bool db/setting/touch_panel_autolock "0" -} +#resetViewtype() +#{ + #vconftool $GOPTION set -t int db/menuscreen/viewtype "0" + #vconftool $GOPTION set -t int db/taskswitcher/viewtype "0" +#} #License resetLicense() @@ -280,26 +305,32 @@ resetLicense() #Ticker notification resetNotification() { - vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content "0" vconftool $GOPTION set -t bool db/setting/ticker_noti/messages "1" - vconftool $GOPTION set -t bool db/setting/ticker_noti/vmail "1" vconftool $GOPTION set -t bool db/setting/ticker_noti/email "1" - #vconftool $GOPTION set -t bool db/setting/ticker_noti/recv_seven_email "0" - #vconftool $GOPTION set -t bool db/setting/ticker_noti/im "1" - #vconftool $GOPTION set -t bool db/setting/ticker_noti/osp "1" - vconftool $GOPTION set -t bool db/setting/ticker_noti/sns "0" - vconftool $GOPTION set -t bool db/setting/ticker_noti/file_tran "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/im "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/twitter "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/facebook "1" + + # display content + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/messages "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/email "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/im "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/twitter "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/facebook "1" + + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/messages "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/email "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/im "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/twitter "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/facebook "1" } #security resetSecurity() { - vconftool $GOPTION set -t string db/setting/phone_passwd "" rm -rf /opt/data/setting/set_info - #vconftool $GOPTION set -t string db/setting/privacy_passwd "" - + vconftool $GOPTION set -t bool db/setting/power_on_lock "0" - vconftool $GOPTION set -t bool db/setting/phone_lock "0" vconftool $GOPTION set -t bool db/setting/simple_password "1" vconftool $GOPTION set -t bool db/setting/fmm/sim_change_alert "0" vconftool $GOPTION set -t string db/setting/fmm/recipients "" @@ -307,14 +338,16 @@ resetSecurity() vconftool $GOPTION set -t string db/setting/fmm/alert_message "" vconftool $GOPTION set -t bool db/setting/fmm/remote_control "0" vconftool $GOPTION set -t bool db/setting/fmm/location_consent "0" - + # NOT USED NOW. - vconftool $GOPTION set -t bool db/setting/rcs "0" + #vconftool $GOPTION set -t bool db/setting/rcs "0" vconftool $GOPTION set -t int db/setting/phone_lock_attempts_left "5" vconftool $GOPTION set -t string db/setting/phone_lock_timestamp "" vconftool $GOPTION set -t int db/setting/sim_lock_attempts_left "5" vconftool $GOPTION set -t string db/setting/sim_lock_timestamp "" + + vconftool $GOPTION set -t bool db/setting/fixed_dialing_mode "0" } #Memory @@ -327,6 +360,7 @@ resetMemory() vconftool $GOPTION set -t int db/setting/default_memory/fm_radio "0" vconftool $GOPTION set -t int db/setting/default_memory/all_share "0" vconftool $GOPTION set -t int db/setting/default_memory/adobe_air "0" + vconftool $GOPTION set -t int db/setting/default_memory/dvb_h "0" # format - system server #vconftool $GOPTION -i set -t int memory/mmc/format "0" @@ -335,23 +369,16 @@ resetMemory() #about resetAbout() { - vconftool $GOPTION set -t string db/setting/device_name "Tizen" -} - -#menu and widgets -resetMenuWidgets() -{ - vconftool $GOPTION set -t bool db/setting/adaptive_menu_order "0" + vconftool $GOPTION set -t string db/setting/device_name "Redwood" } - ########## invoke functions ####### -if [ $1 == $NETWORK ]; then - resetNetwork +if [ $1 == $FLIGHTMODE ]; then + resetFlightmode -elif [ $1 == $DATAROAMING ]; then - resetDataRoaming +elif [ $1 == $NETWORK ]; then + resetNetwork elif [ $1 == $USBCON ]; then resetUsbConnectivity @@ -368,11 +395,17 @@ elif [ $1 == $DISPLAY ]; then elif [ $1 == $MOTIONS ]; then resetMotions -elif [ $1 == $TILT ]; then - resetTilt +elif [ $1 == $TILT_ZOOM ]; then + resetTiltZoom + +elif [ $1 == $TILT_SCROLL ]; then + resetTiltScroll -elif [ $1 == $PANNING ]; then - resetPanning +elif [ $1 == $PANNING_MOVE ]; then + resetPanningMove + +elif [ $1 == $PANNING_BROWSER ]; then + resetPanningBrowser elif [ $1 == $DOUBLETAP ]; then resetDoubleTap @@ -380,8 +413,11 @@ elif [ $1 == $DOUBLETAP ]; then elif [ $1 == $SHAKE ]; then resetShake -elif [ $1 == $PICKUP ]; then - resetPickup +elif [ $1 == $PICKUP_NOTIFIED ]; then + resetPickupNotified + +elif [ $1 == $PICKUP_CALL ]; then + resetPickupCall elif [ $1 == $TURNOVER ]; then resetTurnOver @@ -404,11 +440,8 @@ elif [ $1 == $ACCESS ]; then elif [ $1 == $LANGREGION ]; then resetLanguageAndRegion -elif [ $1 == $VIEWTYPE ]; then - resetViewtype - -elif [ $1 == $TOUCH ]; then - resetTouch +#elif [ $1 == $VIEWTYPE ]; then +# resetViewtype elif [ $1 == $LICENSE ]; then resetLicense @@ -425,12 +458,11 @@ elif [ $1 == $MEMORY ]; then elif [ $1 == $ABOUT ]; then resetAbout -elif [ $1 == $MENUWIDGET ]; then - resetMenuWidgets - +elif [ $1 == $MENUSCREEN ]; then + resetMenuscreen else + resetFlightmode resetNetwork - resetDataRoaming resetUsbConnectivity resetSound resetWallpaper @@ -442,17 +474,16 @@ else resetTimeAndData resetAccessibility resetLanguageAndRegion - resetViewtype - resetTouch +# resetViewtype resetLicense resetNotification resetSecurity resetMemory resetAbout - resetMenuWidgets + resetMenuscreen vconftool $GOPTION -i set -t int memory/setting/font_changed "0" - vconftool $GOPTION -i set -t int memory/mobile_hotspot/skin_changed "0" + #vconftool $GOPTION -i set -t int memory/mobile_hotspot/skin_changed "0" fi ########## ending ####### @@ -464,11 +495,15 @@ then if [ ! -d /opt/data/setting ] then mkdir -p /opt/data/setting - chown 5000:5000 /opt/data/setting -R fi - chown 5000:5000 /opt/etc/X11/Xresources + +# if [ -f /opt/data/setting/setting.cfg ] +# then +# rm -rf /opt/data/setting/setting.cfg +# fi + chown 5000:5000 /opt/data/setting -R fi -heynotitool set setting_time_changed -a +#heynotitool set setting_time_changed -a sync diff --git a/debian/control b/debian/control index 86fad7c..a90b5ca 100755 --- a/debian/control +++ b/debian/control @@ -3,16 +3,16 @@ Section: misc Priority: extra Maintainer: Taesoo Jun , MyoungJune Park , Hyejin Kim , Taeyoung Kim Uploaders: Taesoo Jun , MyoungJune Park , Hyejin Kim , Taeyoung Kim -Build-Depends: debhelper (>= 5), autotools-dev, libappcore-common-dev, libappcore-efl-dev, libelm-dev, libslp-setting-dev, libslp-tapi-dev, libslp-utilx-dev, libdevman-dev, libdevman-haptic-dev, libmm-sound-dev, libcontacts-service-dev, libslp-msg-service-dev, iniparser-dev, libslp-memo-dev, libslp-calendar-dev, libheynoti-dev, libslp-sysman, libslp-sysman-dev, libui-gadget-dev, libbundle-dev, libjson-glib-dev, dlog-dev, libaul-1-dev, libslp-pm-dev, libecore-dev, libeina-dev, libicu-dev, libail-0-dev, libnetwork-dev, libmm-player-dev, libsvi-dev, libsecurity-server-client-dev, libelm-webview-dev, libbluetooth-frwk-dev, libappsvc-dev +Build-Depends: debhelper (>= 5), autotools-dev, libappcore-common-dev, libappcore-efl-dev, libelm-dev, libui-idlecapture-dev, libslp-setting-dev, libslp-tapi-dev, libslp-utilx-dev, libdevman-dev, libdevman-haptic-dev, libsvi-dev, capi-media-sound-manager-dev, libcontacts-service-dev, libslp-msg-service-dev, iniparser-dev, libslp-memo-dev, libslp-calendar-dev, libheynoti-dev, libslp-sysman, libslp-sysman-dev, libui-gadget-dev, libbundle-dev, libjson-glib-dev, dlog-dev, libaul-1-dev, libslp-pm-dev, libecore-dev, libeina-dev, libicu-dev, libail-0-dev, libnetwork-dev, capi-media-player-dev, drm-trusted-dev, drm-client-dev, libsvi-dev, libsecurity-server-client-dev, libmdm-dev, libelm-webview-dev, libbluetooth-frwk-dev, libappsvc-dev, libpango1.0-dev, capi-system-device-dev, capi-appfw-application-dev libcairo2-dev, libnotification-dev Standards-Version: 0.1.0 -Package: org.tizen.setting +Package: com.samsung.setting Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libicu Description: Setting application Setting application -Package: org.tizen.setting-dbg +Package: com.samsung.setting-dbg Architecture: any Depends: ${misc:Depends}, libicu Description: Setting application debug package (unstripped) diff --git a/debian/copyright b/debian/copyright new file mode 100755 index 0000000..6948dad --- /dev/null +++ b/debian/copyright @@ -0,0 +1,8 @@ +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + +This program is free software; you can redistribute it and/or modify +it under the terms of the Apache License version 2.0. + +The full text of the Apache 2.0 can be found in +/usr/share/common-licenses. + diff --git a/debian/rules b/debian/rules index 4e3f243..7b939ae 100755 --- a/debian/rules +++ b/debian/rules @@ -12,9 +12,9 @@ CFLAGS += -Wall -g CXXFLAGS += -Wall -g LDFLAGS ?= -PREFIX ?= /opt/apps/org.tizen.setting -RESDIR ?= /opt/apps/org.tizen.setting/res -DATADIR ?= /opt/apps/org.tizen.setting/data +PREFIX ?= /opt/apps/com.samsung.setting +RESDIR ?= /opt/apps/com.samsung.setting/res +DATADIR ?= /opt/apps/com.samsung.setting/data # Reduce relative text symbols in library CFLAGS += -fPIC @@ -38,7 +38,7 @@ configure-stamp: dh_testdir # Add here commands to configure the package. mkdir -p $(CMAKE_TMP_DIR); - cd $(CMAKE_TMP_DIR); CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX=/opt/apps/org.tizen.setting + cd $(CMAKE_TMP_DIR); CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX=/opt/apps/com.samsung.setting touch configure-stamp @@ -78,7 +78,7 @@ clean: find . -name CMakeFiles.txt | xargs rm -rf rm -rf Makefile rm -rf install_manifest.txt - rm -rf org.tizen.setting.desktop + rm -rf com.samsung.setting.desktop rm -rf *.so for f in `find $(CURDIR)/debian/ -name "*.in"`; do \ @@ -121,7 +121,7 @@ binary-arch: build install dh_installman dh_link # dh_strip - dh_strip --dbg-package=org.tizen.setting-dbg + dh_strip --dbg-package=com.samsung.setting-dbg dh_compress dh_fixperms # dh_perl diff --git a/doxygen.conf b/doxygen.conf new file mode 100644 index 0000000..0c8ee36 --- /dev/null +++ b/doxygen.conf @@ -0,0 +1,1720 @@ +# Doxyfile 1.7.4 + + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = Setting + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = + + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.txt *.c *.cpp *.h + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = ./sandbox + + + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = ../setting-doxygen + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is adviced to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the +# mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will write a font called Helvetica to the output +# directory and reference it in all dot files that doxygen generates. +# When you want a differently looking font you can specify the font name +# using DOT_FONTNAME. You need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = YES + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = /usr/bin/dot + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = YES + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/gdbinfo.txt b/gdbinfo.txt new file mode 100644 index 0000000..b4077f2 --- /dev/null +++ b/gdbinfo.txt @@ -0,0 +1,17 @@ +directory ./src +directory ./setting-profile/src +directory ./setting-about/src +directory ./setting-common/src +directory ./setting-connectivity/src +directory ./setting-display/src +directory ./setting-font/src +directory ./setting-memory/src +directory ./setting-network/src +directory ./setting-password/src +directory ./setting-phone/src +directory ./setting-profile/src +directory ./setting-reset/src +directory ./setting-security/src +directory ./setting-time/src +directory ./setting-menuscreen/src + diff --git a/include/setting-debug.h b/include/setting-debug.h index 9bdf9e7..6d9efa4 100755 --- a/include/setting-debug.h +++ b/include/setting-debug.h @@ -1,19 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ /** * @defgroup setting-debug * setting debug utility @@ -23,6 +27,12 @@ #define _SETTING_DEBUG_H_ #include +/*#define MTRACE_ENABLED*/ + +#define DISABLED_CODE 0 + +//#define DEBUG_CODE + #define SETTING_USING_PLATFORM_DBG #ifdef SETTING_USING_PLATFORM_DBG #include @@ -36,22 +46,61 @@ #if !defined(LOCALEDIR) -#define LOCALEDIR "/opt/apps/org.tizen.setting/res/locale" +#define LOCALEDIR "/opt/apps/com.samsung.setting/res/locale" #endif #if !defined(EDJDIR) -#define EDJDIR "/opt/apps/org.tizen.setting/res/edje" +#define EDJDIR "/opt/apps/com.samsung.setting/res/edje" #endif #define SUPPORT_BOTTOM_BTNS 1 - #define REMOVE_BACK_BUTTON_MAIN 0 +#define SUPPORT_GL_ENGINE 1 -/*macros to control program flow*/ -#define SUPPORT_MORE_ITEM_FUNCTION 0 -#define SUPPORT_RUN_SYSTEM_COMMAND 0 -#define SUPPORT_DYNAMIC_THEME_CHANGING 0 +/*macros to control program flow*/ +#define SUPPORT_MORE_ITEM_FUNCTION 1 + +// #define SUPPORT_MDM + +/*##menu options##*/ +#define SUPPORT_AllShare 1 +#define SUPPORT_AllShare_Memory 0 +#define SUPPORT_FMradio 1 +#define SUPPORT_FONT 1 +#define SUPPORT_MENUSCREEN 1 +#define SUPPORT_WALLPAPER 1 +#define SUPPOR_SEPARATE_BRIGHTNESS 1 + +#define SUPPORT_RCS_FOR_DEMO 0 +#define SUPPORT_ACCESSIBILITY 1 +#define SUPPORT_CERTIFICATES 0 +#define SUPPORT_MOTIONS 1 +#define SUPPORT_POWERSAVING 1 +#define SUPPORT_RUN_SYSTEM_COMMAND 0 +#define SUPPORT_VOICEINOUT 1 +#define SUPPORT_STORAGE 1 +#define SUPPORT_WIFI_DIRECT 1 +#define SUPPORT_ALLSHARECAST 1 +#define SUPPORT_DATA_USAGE 0 + +/*#endif*/ + +#define SUPPORT_APP_ROATION 0 +#define SUPPORT_LCD_TIMEOUT_KEEPING 0 +#define USE_DEVICE_SET_DISPLAY_BRT 1 + +#define LOW_BATTERY_DO_NOTHING 1 /**< 1 : turn the low batter handlding off */ + +#define APPLIED_BACK_KEY_UG 0 + +#define APPLIED_DATATIME_FIRSTDAY_WEEK 1 +#define SUPPORT_DATEFIELD_DATE_FORMAT_AUTOSET 0 + +#define SUPPORT_FDN 0 +#define SUPPORT_ENCRYPTION 0 +#define SUPPORT_SCREEN_SECURITY 1 +#define SUPPORT_PARENTAL_MODE 0 #define SETTING_ENABLE_TRACE diff --git a/include/setting-main.h b/include/setting-main.h index 96155e7..f01ba96 100755 --- a/include/setting-main.h +++ b/include/setting-main.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ /** *@defgroup setting-main *main page displaying list view at launch. @@ -25,18 +28,6 @@ void setting_update_gl_item(void* data); -int setting_main_create(void *cb); -int setting_main_destroy(void *cb); -int setting_main_update(void *cb); - -int setting_main_cleanup(void *cb); - -void setting_main_tapi_event_cb(TelTapiEvent_t *event); - -int setting_main_refresh(void *data); - -void setting_ask_data_roaming_resp_cb(void *data, Evas_Object *obj, - void *event_info); void setting_main_list_mouse_up_cb(void *data, Evas_Object *eo, void *event_info); @@ -51,17 +42,30 @@ void setting_main_click_list_default_ug_cb(void *data, Evas_Object *obj, void setting_main_click_list_ex_ug_cb(void *data, Evas_Object *obj, void *event_info); +void +setting_main_click_list_plugin_cb(void *data, Evas_Object *obj, + void *event_info); void setting_main_click_list_more_cb(void *data, Evas_Object *obj, void *event_info); void setting_main_click_list_usb_cb(void *data, Evas_Object *obj, void *event_info); +void setting_main_click_list_flight_mode_cb(void *data, + Evas_Object *obj, + void *event_info); + void setting_main_click_list_network_ug_cb(void *data, Evas_Object *obj, void *event_info); void setting_try_save_check_list(void *data); -void setting_main_click_add_all_cb(void *data, Evas_Object *obj, +void setting_main_click_edit_preferred_cb(void *data, Evas_Object *obj, void *event_info); +void setting_main_destroy_ug_cb(ui_gadget_h ug, void *priv); +void setting_main_result_ug_cb(ui_gadget_h ug, service_h service, + void *priv); +void setting_main_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, + void *priv); + #endif /* __SETTING_MAIN_H__ */ diff --git a/include/setting-more-menu.h b/include/setting-more-menu.h index 4acd3a8..312ceb6 100755 --- a/include/setting-more-menu.h +++ b/include/setting-more-menu.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_MORE_MENU_H__ #define __SETTING_MORE_MENU_H__ diff --git a/include/setting-plugin.h b/include/setting-plugin.h new file mode 100755 index 0000000..5484ca0 --- /dev/null +++ b/include/setting-plugin.h @@ -0,0 +1,33 @@ +#ifndef _SETTING_PLUGIN_H_ +#define _SETTING_PLUGIN_H_ +#ifndef bool +#define bool int +#define TRUE 1 +#define FALSE 0 +#endif + +#if 0 +#define PLUGIN_INIT \ +{\ + setting_drawer_list_init();\ + setting_dbus_handler_init();\ +} +#define PLUGIN_FINI \ +{\ + setting_dbus_handler_fini();\ + setting_drawer_list_fini();\ +} +#else + +#define PLUGIN_INIT +#define PLUGIN_FINI + +#endif + +extern int setting_dbus_handler_init(void); +extern int setting_dbus_handler_fini(void); +extern void setting_drawer_list_init(); +extern void setting_drawer_list_fini(); +extern bool setting_plugin_load(const char *cfg_file); +#endif //_SETTING_PLUGIN_H_ + diff --git a/include/setting.h b/include/setting.h old mode 100644 new mode 100755 index ffad409..ca164c2 --- a/include/setting.h +++ b/include/setting.h @@ -1,44 +1,55 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ -/**** + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +/** *@defgroup setting-app *entry point of Setting application */ #ifndef __SETTING_H__ #define __SETTING_H__ -#include +#include #include #include -#include - /* TAPI*/ -#include -#include - -#include -#include +#include +#include +#include #define EDIT_PREFERRED_STR "IDS_ST_BUTTON2_EDIT_PREFERRED" -#define PREFERRED_STR "IDS_ST_TAB_PREFERRED" +//#define PREFERRED_STR "IDS_ST_TAB_PREFERRED" +#define PREFERRED_STR "IDS_ST_BODY_FREQUENTLY_USED" #define ALL_STR "IDS_ST_OPT_ALL" #define SETTING_MAX_PID_LEN 128 +#define NO_UG_FOUND_MSG _("Unsupported menu") +#define MORE_CONNECT_STR "IDS_ST_BODY_BLUETOOTH_USB_UTILITIES_ETC" +#define MORE_SYSTEM_STR "IDS_ST_BODY_DATE_AND_TIME_KEYBOARD_LICENCE_ETC" +#define USB_NEED_OFF "Please turn USB tethering off first in Mobile hotspot" + +#define SETTING_NFC_DESC "IDS_ST_BODY_ALLOW_DATA_EXCHANGE_WHEN_DEVICE_TOUCHES_ANOTHER_DEVICE" +#define SETTING_WIFI_DIRECT_DESC "IDS_ST_BODY_SET_UP_PEER_TO_PEER_CONNECTIVITY_ABB" +#define SETTING_KIES_VIA_WIFI_DESC "IDS_ST_BODY_CONNECT_TO_KIES_VIA_WI_FI" + /** * @brief */ @@ -66,40 +77,43 @@ typedef enum _MAIN_PROFILE_Type { MAIN_PROFILE_MAX } MAIN_PROFILE_Type; +/** + * enum for genlist item to be updated + * @see setting_update_gl_item + */ typedef enum _Update_GL_Item_Type { GL_ITEM_WIFI = 0, GL_ITEM_BT, + GL_ITEM_NFC, GL_ITEM_MAP, GL_ITEM_USB, - GL_ITEM_THEME, - GL_ITEM_ROAMING, GL_ITEM_ROTATION, + GL_ITEM_FLIGHT, GL_ITEM_MAX } Update_GL_Item_Type; -#define VCONF_KEY_EVENT_ARR_SIZE 11 -typedef struct _vconf_key_change_event -{ - // member data - char *in_key[VCONF_KEY_EVENT_ARR_SIZE]; - vconf_callback_fn cb[VCONF_KEY_EVENT_ARR_SIZE]; - // member functions - int (*listen)(struct _vconf_key_change_event* me, void* data); - int (*unlisten)(struct _vconf_key_change_event* me, void* data); -}vconf_key_change_event; +typedef enum _FLIGHT_MODE_OPEARTION{ + FM_INVALID = 0,//There is no request waiting for processing + FM_ENTER = 1,//Some "flightmode enter" request is waiting for processing + FM_LEAVE,//Some "flightmode leave" request is waiting for processing +} FLIGHT_MODE_OPEARTION; /** * @brief main view context */ typedef struct _setting_main_appdata { - struct ui_gadget *ug; + + ui_gadget_h ug; + TapiHandle *handle; + Eina_Bool bAppPause; Eina_Bool updateItems[GL_ITEM_MAX]; Evas *evas; Evas_Object *win_main; + Evas_Object *controlbar; Evas_Object *controllbar_all_check; Evas_Object *gl_sel_all; @@ -117,38 +131,42 @@ typedef struct _setting_main_appdata { Elm_Object_Item *segment_all; Elm_Object_Item *segment_preferred; - bool need_register; bool isInUGMode; + /* vars for flightmode */ + bool b_fm_requesting;//whether some request is processing. 1:yes, 0:no + FLIGHT_MODE_OPEARTION fm_waiting_op; + + /* special layout */ + Setting_GenGroupItem_Data *data_flight; Setting_GenGroupItem_Data *data_wifi; Setting_GenGroupItem_Data *data_bt; - Setting_GenGroupItem_Data *data_roaming; Setting_GenGroupItem_Data *data_rotationMode; Setting_GenGroupItem_Data *data_mobileApp; - Setting_GenGroupItem_Data *data_usbcon; - Setting_GenGroupItem_Data *data_theme; + Setting_GenGroupItem_Data *data_bright; Setting_GenGroupItem_Data *data_moreSystem; Setting_GenGroupItem_Data *data_moreConnect; + Setting_GenGroupItem_Data *data_nfc; Setting_View_Type view_type; - Evas_Object *main_genlist; /**< genlist in main page */ - Evas_Object *all_check_genlist; + Evas_Object *main_genlist; /**< 'Setting main' in main page */ + Evas_Object *edit_preferred_genlist; /**< 'Edit preferred' page */ Elm_Genlist_Item_Class itc[GENDIAL_Type_MAX]; - Eina_List *item_check_list; - Setting_GenGroupItem_Data *check_all_item; - /* Animation effect for Ui-Gadget. */ - Evas_Object *ly; + Eina_List *item_check_list; /**< in preferred view, store the selected items in the list. */ + Setting_GenGroupItem_Data *check_all_item; /**< genlist node for "Select all" */ + Evas_Object *flight_popup; Evas_Object *data_roaming_popup; // listen / unlisten code - vconf_key_change_event vk_events; + Eina_List *listened_list; + sensor_h sf_handle; } setting_main_appdata; @@ -158,7 +176,4 @@ extern setting_view setting_view_more_menu; extern void __load_connectivity_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object *genlist); extern void __load_system_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object *genlist); -void signal_hide_finished(void *data, Evas_Object *obj, const char *emission, - const char *source); - #endif /* __SETTING_H__ */ diff --git a/manifest.xsd b/manifest.xsd new file mode 100644 index 0000000..57b1d98 --- /dev/null +++ b/manifest.xsd @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.tizen.setting.png b/org.tizen.setting.png deleted file mode 100644 index 5e893ee..0000000 Binary files a/org.tizen.setting.png and /dev/null differ diff --git a/packaging/settings-beat.spec b/packaging/settings-beat.spec deleted file mode 100644 index 21698e4..0000000 --- a/packaging/settings-beat.spec +++ /dev/null @@ -1,326 +0,0 @@ -Name: settings -Summary: Setting application -Version: 0.1.86 -Release: 38 -Group: misc -License: Flora Software License -Source0: %{name}-%{version}.tar.gz -BuildRequires: pkgconfig(appcore-common) -BuildRequires: pkgconfig(appcore-efl) -BuildRequires: pkgconfig(elementary) -BuildRequires: pkgconfig(vconf) -BuildRequires: pkgconfig(tapi) -BuildRequires: pkgconfig(utilX) -BuildRequires: pkgconfig(devman) -BuildRequires: pkgconfig(devman_haptic) -#BuildRequires: pkgconfig(dnet) -BuildRequires: pkgconfig(contacts-service) -BuildRequires: pkgconfig(mm-sound) -BuildRequires: pkgconfig(openssl) -BuildRequires: pkgconfig(msg-service) -BuildRequires: pkgconfig(iniparser) -BuildRequires: pkgconfig(memo) -BuildRequires: pkgconfig(calendar) -BuildRequires: pkgconfig(heynoti) -BuildRequires: pkgconfig(ui-gadget) -BuildRequires: pkgconfig(bundle) -BuildRequires: pkgconfig(json-glib-1.0) -BuildRequires: pkgconfig(dlog) -BuildRequires: pkgconfig(aul) -BuildRequires: pkgconfig(pmapi) -BuildRequires: pkgconfig(ecore-input) -BuildRequires: pkgconfig(eina) -BuildRequires: pkgconfig(icu-i18n) -BuildRequires: pkgconfig(ail) -BuildRequires: pkgconfig(sysman) -#BuildRequires: pkgconfig(mobileap-api) -BuildRequires: pkgconfig(appsvc) - -BuildRequires: pkgconfig(network) -BuildRequires: pkgconfig(mm-player) -BuildRequires: pkgconfig(svi) -BuildRequires: pkgconfig(elm-webview) -BuildRequires: pkgconfig(ewebkit) -BuildRequires: pkgconfig(bluetooth-api) -BuildRequires: pkgconfig(security-server) - -BuildRequires: sysman-internal-devel -BuildRequires: cmake -BuildRequires: edje-tools -BuildRequires: gettext-tools -%description -Setting application. - - -%prep -%setup -q - - -%build - -%define PREFIX "/opt/apps/org.tizen.setting" -%define RESDIR "/opt/apps/org.tizen.setting/res" -%define DATADIR "/opt/apps/org.tizen.setting/data" -LDFLAGS+="-Wl,--rpath=%{PREFIX}/lib -Wl,--as-needed";export LDFLAGS -cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} -make - -%install -rm -rf %{buildroot} -%make_install - -mkdir -p %{buildroot}/opt/data/setting - - -%post - -GOPTION="-g 6514" - - -#resetNetwork - vconftool $GOPTION set -t int db/setting/select_network "0" - vconftool $GOPTION set -t int db/setting/network_mode "0" - vconftool $GOPTION set -t bool db/setting/3gEnabled "1" - -#resetDataRoaming - vconftool $GOPTION set -t bool db/setting/data_roaming "1" - -#resetUsbConnectivity - #connectivity - #vconftool $GOPTION set -t bool db/setting/ask_on_con "0" - # debug mode is default - vconftool $GOPTION set -t int memory/setting/usb_mode "-1" -i -f - vconftool $GOPTION set -t int memory/setting/usb_sel_mode "0" -i -f - vconftool $GOPTION set -t int db/setting/usb_debugmode "0" - vconftool $GOPTION set -t int memory/setting/usb_in_mode_change "0" -i -f - -#resetSound - DEFAULT_CALL_TONE="/opt/share/settings/Ringtones/General_Over the horizon.mp3" - - vconftool $GOPTION set -t bool db/setting/sound/sound_on "1" - vconftool $GOPTION set -t bool db/setting/sound/vibration_on "1" - - vconftool $GOPTION set -t int db/setting/sound/call/ringtone_sound_volume "13" - vconftool $GOPTION set -t int db/setting/sound/noti/sound_volume "7" - vconftool $GOPTION set -t int db/setting/sound/media/sound_volume "7" - vconftool $GOPTION set -t int db/setting/sound/touch_feedback/sound_volume "5" - - vconftool $GOPTION set -t int db/setting/sound/noti/vibration_level "5" - vconftool $GOPTION set -t int db/setting/sound/touch_feedback/vibration_level "3" - - vconftool $GOPTION set -t string db/setting/sound/call/ringtone_path "${DEFAULT_CALL_TONE}" - vconftool $GOPTION set -t int db/setting/sound/call/vibration_type "2" - - vconftool $GOPTION set -t string db/setting/sound/noti/msg_ringtone_path "${DEFAULT_CALL_TONE}" - vconftool $GOPTION set -t int db/setting/sound/noti/msg_alert_rep_type "0" - - vconftool $GOPTION set -t string db/setting/sound/noti/email_ringtone_path "${DEFAULT_CALL_TONE}" - vconftool $GOPTION set -t int db/setting/sound/noti/email_alert_rep_type "0" - - vconftool $GOPTION set -t bool db/setting/sound/sound_lock "1" - #vconftool $GOPTION set -t bool db/setting/sound/keypad_on "1" - #vconftool $GOPTION set -t bool db/setting/sound/sound_effect_on "1" - - #others - vconftool $GOPTION set -t string db/setting/notification_tone "${DEFAULT_CALL_TONE}" - vconftool $GOPTION set -t string db/setting/media_tone "${DEFAULT_CALL_TONE}" - vconftool $GOPTION set -t string db/setting/touch_tone "${DEFAULT_CALL_TONE}" - vconftool $GOPTION set -t int db/setting/touch_vibration_tone "2" - -#resetWallpaper - vconftool $GOPTION set -t string db/menu_widget/bgset "/opt/share/settings/Wallpapers/Home_default.jpg" - vconftool $GOPTION set -t string db/idle_lock/bgset "/opt/share/settings/Wallpapers/Home_default.jpg" - -#resetTilt - vconftool $GOPTION set -t bool db/setting/use_tilt "1" - vconftool $GOPTION set -t int db/setting/tilt_sensitivity "3" - -#resetPanning - vconftool $GOPTION set -t bool db/setting/use_panning "1" - vconftool $GOPTION set -t int db/setting/panning_sensitivity "3" - -#resetDoubleTap - vconftool $GOPTION set -t bool db/setting/use_double_tap "0" - -#resetShake - vconftool $GOPTION set -t bool db/setting/use_shake "0" - -#resetPickup - vconftool $GOPTION set -t bool db/setting/use_pickup "0" - -#resetTurnOver - vconftool $GOPTION set -t bool db/setting/use_turn_over "0" - -#resetMotions - vconftool $GOPTION set -t bool db/setting/motion_active "1" - vconftool $GOPTION set -t bool db/setting/internet_on "1" - vconftool $GOPTION set -t bool db/setting/gallery_on "1" - -#resetDisplay - #backlight - vconftool $GOPTION set -t int db/MainLCD/Backlight/Normal "30" - vconftool $GOPTION set -t int db/setting/lcd_timeout_normal_backup "30" - - #brightness - vconftool $GOPTION set -t int db/setting/Brightness "-1" - vconftool $GOPTION set -t bool db/setting/brightness_automatic "0" - - #battery - vconftool $GOPTION set -t bool db/setting/battery/charger "0" - vconftool $GOPTION set -t bool db/setting/battery_percentage "0" - #launch - vconftool $GOPTION set -t string db/menu_widget/launch_effect "0" - -#resetPowersaving - vconftool $GOPTION set -t bool db/setting/powersaving/powersaving_active "0" - vconftool $GOPTION set -t bool db/setting/powersaving/powersaving_active_reminder "1" - vconftool $GOPTION set -t bool db/setting/powersaving/customed_active "0" - - vconftool $GOPTION set -t int db/setting/powersaving/powersaving_at "30" - vconftool $GOPTION set -t bool db/setting/powersaving/wifi_off "0" - vconftool $GOPTION set -t bool db/setting/powersaving/bt_off "0" - vconftool $GOPTION set -t bool db/setting/powersaving/gps_off "0" - vconftool $GOPTION set -t bool db/setting/powersaving/ync_off "0" - vconftool $GOPTION set -t int db/setting/powersaving/screen_timeout "15" - - vconftool $GOPTION set -t bool db/setting/powersaving/brightness_active "0" - vconftool $GOPTION set -t bool db/setting/powersaving/brightness_auto "1" - vconftool $GOPTION set -t int db/setting/powersaving/brightness "10" - -#resetFont - vconftool $GOPTION set -t int db/setting/font_size "1" - vconftool $GOPTION set -t int db/setting/font_type "0" - -#resetRotationLock - vconftool $GOPTION set -t bool db/setting/rotate_lock "0" - -#resetTimeAndData - vconftool $GOPTION set -t bool db/setting/automatic_time_update "1" - vconftool $GOPTION set -t bool db/setting/dst "0" - - vconftool $GOPTION set -t int db/menu_widget/regionformat_time1224 "1" - vconftool $GOPTION set -t int db/setting/date_format "0" - vconftool $GOPTION set -t int db/setting/weekofday_format "0" - - vconftool $GOPTION set -t string db/setting/timezone "+9" - # to be removed - vconftool $GOPTION set -t string db/setting/cityname_id "IDS_WCL_BODY_CITYNAME_SEOUL" - - vconftool $GOPTION set -t string db/setting/timezone_id "Asia/Seoul" - - #if [ -f /opt/etc/localtime ] - #then - rm -f /opt/etc/localtime - ln -s /usr/share/zoneinfo/Asia/Seoul /opt/etc/localtime - #fi - -#resetAccessibility - vconftool $GOPTION set -t bool db/setting/accessibility/accessibility "1" - vconftool $GOPTION set -t bool db/setting/accessibility/high_contrast "0" - vconftool $GOPTION set -t bool db/setting/accessibility/screen_zoom "1" - vconftool $GOPTION set -t int db/setting/accessibility/font_size "72" - vconftool $GOPTION set -t int db/setting/accessibility/font_style "0" - vconftool $GOPTION set -t bool db/setting/accessibility/torch_light "0" - vconftool $GOPTION set -t bool db/setting/accessibility/mono_audio "0" - vconftool $GOPTION set -t bool db/setting/accessibility/accept_call "0" - vconftool $GOPTION set -t bool db/setting/accessibility/enable_auto_answer "0" - vconftool $GOPTION set -t int db/setting/accessibility/auto_answer "1" - vconftool $GOPTION set -t bool db/setting/accessibility/powerkey_end_calls "0" - vconftool $GOPTION set -t int db/setting/accessibility/power_key_hold "0" - -#resetLanguageAndRegion - vconftool $GOPTION set -t int db/setting/lang "2" - vconftool $GOPTION set -t string db/menu_widget/language "en_US.UTF-8" - vconftool $GOPTION set -t string db/menu_widget/regionformat "en_US.UTF-8" - -#resetViewtype - vconftool $GOPTION set -t int db/menuscreen/viewtype "0" - vconftool $GOPTION set -t int db/taskswitcher/viewtype "0" - -#resetTouch - vconftool $GOPTION set -t int db/setting/vib_feedback "3" - vconftool $GOPTION set -t bool db/setting/touch_panel_autolock "0" - -#resetLicense - vconftool $GOPTION set -t bool db/setting/transaction_tracking "0" - vconftool $GOPTION set -t bool db/setting/expiry_reminder "0" - vconftool $GOPTION set -t int db/setting/roaming_network "0" - -#resetNotification - vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content "0" - vconftool $GOPTION set -t bool db/setting/ticker_noti/messages "1" - vconftool $GOPTION set -t bool db/setting/ticker_noti/vmail "1" - vconftool $GOPTION set -t bool db/setting/ticker_noti/email "1" - #vconftool $GOPTION set -t bool db/setting/ticker_noti/recv_seven_email "0" - #vconftool $GOPTION set -t bool db/setting/ticker_noti/im "1" - #vconftool $GOPTION set -t bool db/setting/ticker_noti/osp "1" - vconftool $GOPTION set -t bool db/setting/ticker_noti/sns "0" - vconftool $GOPTION set -t bool db/setting/ticker_noti/file_tran "1" - -#resetSecurity - vconftool $GOPTION set -t string db/setting/phone_passwd "" - rm -rf /opt/data/setting/set_info - #vconftool $GOPTION set -t string db/setting/privacy_passwd "" - - vconftool $GOPTION set -t bool db/setting/power_on_lock "0" - vconftool $GOPTION set -t bool db/setting/phone_lock "0" - vconftool $GOPTION set -t bool db/setting/simple_password "1" - vconftool $GOPTION set -t bool db/setting/fmm/sim_change_alert "0" - vconftool $GOPTION set -t string db/setting/fmm/recipients "" - vconftool $GOPTION set -t string db/setting/fmm/sender "" - vconftool $GOPTION set -t string db/setting/fmm/alert_message "" - vconftool $GOPTION set -t bool db/setting/fmm/remote_control "0" - vconftool $GOPTION set -t bool db/setting/fmm/location_consent "0" - - # NOT USED NOW. - vconftool $GOPTION set -t bool db/setting/rcs "0" - - vconftool $GOPTION set -t int db/setting/phone_lock_attempts_left "5" - vconftool $GOPTION set -t string db/setting/phone_lock_timestamp "" - vconftool $GOPTION set -t int db/setting/sim_lock_attempts_left "5" - vconftool $GOPTION set -t string db/setting/sim_lock_timestamp "" - -#resetMemory - vconftool $GOPTION set -t int db/setting/default_memory/wap "0" - vconftool $GOPTION set -t int db/setting/default_memory/bluetooth "0" - vconftool $GOPTION set -t int db/setting/default_memory/camera "0" - vconftool $GOPTION set -t int db/setting/default_memory/voice_recorder "0" - vconftool $GOPTION set -t int db/setting/default_memory/fm_radio "0" - vconftool $GOPTION set -t int db/setting/default_memory/all_share "0" - vconftool $GOPTION set -t int db/setting/default_memory/adobe_air "0" - - # format - system server - #vconftool $GOPTION -i set -t int memory/mmc/format "0" - -#resetAbout - vconftool $GOPTION set -t string db/setting/device_name "Tizen" - -#resetMenuWidgets - vconftool $GOPTION set -t bool db/setting/adaptive_menu_order "0" - - vconftool $GOPTION -i set -t int memory/setting/font_changed "0" - vconftool $GOPTION -i set -t int memory/mobile_hotspot/skin_changed "0" - - -#create directory /opt/data/setting -if [ "${USER}" == "root" ] -then - if [ ! -d /opt/data/setting ] - then - mkdir -p /opt/data/setting - fi - chown 5000:5000 /opt/data/setting -R - chown 5000:5000 /opt/etc/X11/Xresources -fi -heynotitool set setting_time_changed -a - - -%files -%defattr(-,root,root,-) -%attr(755,app,app) %dir /opt/data/setting -/opt/apps/org.tizen.setting/bin/setting -/opt/share/applications/org.tizen.setting.desktop -/opt/apps/org.tizen.setting/res/* -/opt/apps/org.tizen.setting/lib/* -/opt/apps/org.tizen.setting/data/* -/opt/ug/lib/* diff --git a/packaging/settings.spec b/packaging/settings.spec new file mode 100755 index 0000000..4fec2dc --- /dev/null +++ b/packaging/settings.spec @@ -0,0 +1,440 @@ +Name: settings +Summary: Setting application +Version: 0.1.87 +Release: 99 +Group: misc +License: samsung +Source0: %{name}-%{version}.tar.gz +BuildRequires: pkgconfig(appcore-common) +BuildRequires: pkgconfig(appcore-efl) +BuildRequires: pkgconfig(elementary) +BuildRequires: pkgconfig(vconf) +BuildRequires: pkgconfig(tapi) +BuildRequires: pkgconfig(utilX) +BuildRequires: pkgconfig(devman) +BuildRequires: pkgconfig(devman_haptic) +BuildRequires: pkgconfig(bluetooth-api) +BuildRequires: pkgconfig(mm-sound) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(iniparser) +BuildRequires: pkgconfig(heynoti) +BuildRequires: pkgconfig(ui-gadget-1) +BuildRequires: pkgconfig(json-glib-1.0) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(dlog) +BuildRequires: pkgconfig(aul) +BuildRequires: pkgconfig(pmapi) +BuildRequires: pkgconfig(ecore-input) +BuildRequires: pkgconfig(eina) +BuildRequires: pkgconfig(icu-i18n) +BuildRequires: pkgconfig(ail) +BuildRequires: pkgconfig(sysman) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gthread-2.0) +BuildRequires: pkgconfig(ecore-imf) +BuildRequires: pkgconfig(ecore-x) +BuildRequires: pkgconfig(ecore) +BuildRequires: pkgconfig(ecore-file) +BuildRequires: pkgconfig(icu-io) +BuildRequires: pkgconfig(icu-le) +BuildRequires: pkgconfig(icu-lx) +BuildRequires: pkgconfig(icu-uc) +BuildRequires: pkgconfig(ewebkit2) +BuildRequires: pkgconfig(drm-client) +BuildRequires: pkgconfig(drm-trusted) +BuildRequires: pkgconfig(evas) +BuildRequires: pkgconfig(edje) +BuildRequires: pkgconfig(mm-player) +BuildRequires: pkgconfig(network) +BuildRequires: pkgconfig(security-server) +BuildRequires: pkgconfig(svi) +BuildRequires: pkgconfig(appsvc) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(notification) +BuildRequires: pkgconfig(pango) +BuildRequires: pkgconfig(capi-system-runtime-info) +BuildRequires: pkgconfig(capi-media-player) +BuildRequires: pkgconfig(capi-media-sound-manager) +BuildRequires: pkgconfig(capi-system-device) +BuildRequires: pkgconfig(capi-appfw-application) +BuildRequires: pkgconfig(capi-appfw-app-manager) +BuildRequires: pkgconfig(capi-system-sensor) +BuildRequires: sysman-internal-devel +BuildRequires: cmake +BuildRequires: edje-tools +BuildRequires: gettext-tools +%description +Setting application + BEAT UI, Setting application. + + +%prep +%setup -q + +%build + +%define PREFIX "/opt/apps/com.samsung.setting" +%define RESDIR "/opt/apps/com.samsung.setting/res" +%define DATADIR "/opt/apps/com.samsung.setting/data" +CFLAGS+=" -fPIC";export CFLAGS +CXXFLAGS+=" -fPIC";export CFLAGS +LDFLAGS+="-Wl,--rpath=%{PREFIX}/lib -Wl,--hash-style=both -Wl,--as-needed";export LDFLAGS + +%ifarch %{arm} + cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} -DARCH=arm +%else + cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} -DARCH=x86 +%endif + +make + +%install +rm -rf %{buildroot} +%make_install + +mkdir -p %{buildroot}/opt/data/setting + +%clean + +%post + +# Set vconf values with -g/-u options +GOPTION="-g 6514" + +#resetMenuscreen + # menuscreen app will take this vconf + #vconftool $GOPTION set -t string db/setting/menuscreen/package_name "com.samsung.cluster-home" + + +#resetFlightmode + vconftool $GOPTION set -t bool db/setting/flight_mode "0" + +#resetNetwork + vconftool $GOPTION set -t int db/setting/select_network "0" + vconftool $GOPTION set -t int db/setting/select_network_act "0" + vconftool $GOPTION set -t int db/setting/network_mode "0" + vconftool $GOPTION set -t bool db/setting/3gEnabled "1" + vconftool $GOPTION set -t bool db/setting/data_roaming "1" + +#resetUsbConnectivity + vconftool $GOPTION set -t int memory/setting/usb_mode "-1" -i -f + vconftool $GOPTION set -t int memory/setting/usb_sel_mode "0" -i -f + vconftool $GOPTION set -t int memory/setting/usb_in_mode_change "0" -i -f + +#resetSound +%ifarch %{arm} + DEFAULT_CALL_TONE="/opt/share/settings/Ringtones/Over the horizon.mp3" +%else + DEFAULT_CALL_TONE="/opt/share/settings/Ringtones/ringtone_sdk.mp3" +%endif + +%ifarch %{arm} + DEFAULT_NOTI_TONE="/opt/share/settings/Alerts/Whistle.mp3" +%else + DEFAULT_NOTI_TONE="/opt/share/settings/Alerts/General notification_sdk.wav" +%endif + + vconftool $GOPTION set -t bool db/setting/sound/sound_on "1" + vconftool $GOPTION set -t bool db/setting/sound/vibration_on "1" + + vconftool $GOPTION set -t int db/setting/sound/call/ringtone_sound_volume "13" + vconftool $GOPTION set -t int db/setting/sound/noti/sound_volume "7" + vconftool $GOPTION set -t int db/setting/sound/media/sound_volume "7" + vconftool $GOPTION set -t int db/setting/sound/touch_feedback/sound_volume "5" + + vconftool $GOPTION set -t int db/setting/sound/noti/vibration_level "5" + vconftool $GOPTION set -t int db/setting/sound/touch_feedback/vibration_level "3" + vconftool $GOPTION set -t int db/setting/sound/touch_feedback/vibration_level_bak "3" ##private key + + vconftool $GOPTION set -t string db/setting/sound/call/ringtone_path "${DEFAULT_CALL_TONE}" + vconftool $GOPTION set -t int db/setting/sound/call/vibration_type "2" + + vconftool $GOPTION set -t string db/setting/sound/noti/msg_ringtone_path "${DEFAULT_NOTI_TONE}" + vconftool $GOPTION set -t int db/setting/sound/noti/msg_alert_rep_type "0" + + vconftool $GOPTION set -t string db/setting/sound/noti/email_ringtone_path "${DEFAULT_NOTI_TONE}" + vconftool $GOPTION set -t int db/setting/sound/noti/email_alert_rep_type "0" + + vconftool $GOPTION set -t bool db/setting/sound/sound_lock "1" + +#resetWallpaper + vconftool $GOPTION set -t string db/menu_widget/bgset "/opt/share/settings/Wallpapers/Home_default.jpg" + vconftool $GOPTION set -t string db/idle_lock/bgset "/opt/share/settings/Wallpapers/Home_default.jpg" + +#resetTilt + vconftool $GOPTION set -t bool db/setting/use_tilt "1" + vconftool $GOPTION set -t int db/setting/tilt_sensitivity "3" + vconftool $GOPTION set -t bool db/setting/use_tilt_scroll "1" + vconftool $GOPTION set -t int db/setting/tilt_scroll_sensitivity "3" + +#resetPanning + vconftool $GOPTION set -t bool db/setting/use_panning "0" + vconftool $GOPTION set -t int db/setting/panning_sensitivity "3" + vconftool $GOPTION set -t bool db/setting/use_panning_browser "1" + vconftool $GOPTION set -t int db/setting/panning_browser_sensitivity "3" + +#resetDoubleTap + vconftool $GOPTION set -t bool db/setting/use_double_tap "1" + +#resetShake + vconftool $GOPTION set -t bool db/setting/use_shake "1" + +#resetPickup + vconftool $GOPTION set -t bool db/setting/use_pick_up "1" + vconftool $GOPTION set -t bool db/setting/use_pick_up_call "1" + +#resetTurnOver + vconftool $GOPTION set -t bool db/setting/use_turn_over "1" + +#resetMotions + vconftool $GOPTION set -t bool db/setting/motion_active "1" + vconftool $GOPTION set -t bool db/setting/motion/palm_swipe_capture "1" + vconftool $GOPTION set -t bool db/setting/motion/palm_touch_mute "1" + vconftool $GOPTION set -t bool db/setting/motion/tap_twist "1" + +#resetDisplay + #backlight +%ifarch %{arm} + vconftool $GOPTION set -t int db/setting/lcd_backlight_normal "30" +%else + vconftool $GOPTION set -t int db/setting/lcd_backlight_normal "0" +%endif + #vconftool $GOPTION set -t int db/setting/lcd_timeout_normal_backup "30" + + #brightness + vconftool $GOPTION set -t int db/setting/Brightness "-1" + vconftool $GOPTION set -t int db/setting/brightness_automatic "0" + + #battery + vconftool $GOPTION set -t bool db/setting/battery_percentage "0" + #launch + #vconftool $GOPTION set -t string db/menu_widget/launch_effect "0" + + #smart screen + vconftool $GOPTION set -t int db/pm/smartstay_status "0" + vconftool $GOPTION set -t bool db/setting/smartscreen/smart_rotation "0" + vconftool $GOPTION set -t bool db/setting/auto_adjust_screen_tone "1" + vconftool $GOPTION set -t bool db/setting/smartscreen/smart_stay_r "1" + vconftool $GOPTION set -t bool db/setting/smartscreen/smart_rotation_r "1" + +#resetPowersaving + vconftool $GOPTION set -t bool db/setting/pwrsv/system_mode/status "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/system_mode/reminder "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/status "0" + + vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/at "30" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/wifi "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/bt "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/gps "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/data_sync "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/hotspot "1" + + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/brt/status "1" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/brt/auto/status "0" + vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/brt/value "10" + vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/backlight/time "15" + + #v0.4 + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/cpu "0" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/display "0" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/bg_color "0" + vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/screen_vib "0" + +#resetFont + vconftool $GOPTION set -t int db/setting/font_size "1" + vconftool $GOPTION set -t int db/setting/font_type "0" + +#resetRotationLock + vconftool $GOPTION set -t bool db/setting/rotate_lock "1" + +#resetTimeAndData + vconftool $GOPTION set -t bool db/setting/automatic_time_update "1" + + vconftool $GOPTION set -t int db/menu_widget/regionformat_time1224 "1" + vconftool $GOPTION set -t int db/setting/date_format "0" + vconftool $GOPTION set -t int db/setting/weekofday_format "0" + + vconftool $GOPTION set -t string db/setting/timezone "+9" + # to be removed + vconftool $GOPTION set -t string db/setting/cityname_id "IDS_WCL_BODY_CITYNAME_SEOUL" + + vconftool $GOPTION set -t string db/setting/timezone_id "Asia/Seoul" + + #if [ -f /opt/etc/localtime ] + #then + rm -f /opt/etc/localtime + ln -s /usr/share/zoneinfo/Asia/Seoul /opt/etc/localtime + #fi + + +#resetAccessibility + vconftool $GOPTION set -t bool db/setting/accessibility/accessibility "0" + vconftool $GOPTION set -t bool db/setting/accessibility/high_contrast "0" + vconftool $GOPTION set -t bool db/setting/accessibility/screen_zoom "1" + vconftool $GOPTION set -t int db/setting/accessibility/font_size "1" + #vconftool $GOPTION set -t int db/setting/accessibility/font_style "0" + vconftool $GOPTION set -t string db/setting/accessibility/font_name "HelveticaNeue" + vconftool $GOPTION set -t bool db/setting/accessibility/tts "0" + + vconftool $GOPTION set -t bool db/setting/accessibility/torch_light "0" + vconftool $GOPTION set -t bool db/setting/accessibility/mono_audio "0" + vconftool $GOPTION set -t int db/setting/accessibility/power_key_hold "1" + vconftool $GOPTION set -t bool db/setting/accessibility/led_notify "0" + + vconftool $GOPTION set -t bool db/ciss/call_answering_key "0" + vconftool $GOPTION set -t bool db/ciss/call_power_key_ends_call "0" + vconftool $GOPTION set -t int db/ciss/answering_mode "0" + vconftool $GOPTION set -t int db/ciss/answering_mode_time "3" + + vconftool $GOPTION set -t bool db/setting/accessibility/accept_call "0" + vconftool $GOPTION set -t bool db/setting/accessibility/enable_auto_answer "0" + vconftool $GOPTION set -t int db/setting/accessibility/auto_answer "1" + vconftool $GOPTION set -t bool db/setting/accessibility/powerkey_end_calls "0" + +#Driving Mode + vconftool $GOPTION set -t bool db/setting/drivingmode/drivingmode "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/incomingcall "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/message "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/newemails "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/newvoicemails "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/alarm "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/schedule "1" + vconftool $GOPTION set -t bool db/setting/drivingmode/unlockscreen "1" + +#resetLanguageAndRegion + vconftool $GOPTION set -t int db/setting/lang "2" + vconftool $GOPTION set -t string db/menu_widget/language "en_US.UTF-8" + vconftool $GOPTION set -t string db/menu_widget/regionformat "en_US.UTF-8" + +#resetViewtype + #vconftool $GOPTION set -t int db/menuscreen/viewtype "0" + #vconftool $GOPTION set -t int db/taskswitcher/viewtype "0" + +#resetTouch + #vconftool $GOPTION set -t int db/setting/vib_feedback "3" + #vconftool $GOPTION set -t bool db/setting/touch_panel_autolock "0" + +#resetLicense + vconftool $GOPTION set -t bool db/setting/transaction_tracking "0" + vconftool $GOPTION set -t bool db/setting/expiry_reminder "0" + vconftool $GOPTION set -t int db/setting/roaming_network "0" + +#resetNotification + vconftool $GOPTION set -t bool db/setting/ticker_noti/messages "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/email "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/im "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/twitter "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/facebook "1" + + # display content + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/messages "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/email "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/im "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/twitter "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/facebook "1" + + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/messages "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/email "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/im "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/twitter "1" + vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/facebook "1" + +#resetSecurity + rm -rf /opt/data/setting/set_info + #vconftool $GOPTION set -t string db/setting/privacy_passwd "" + + vconftool $GOPTION set -t bool db/setting/power_on_lock "0" + vconftool $GOPTION set -t bool db/setting/simple_password "1" + vconftool $GOPTION set -t int db/setting/screen_lock_type "0" + vconftool $GOPTION set -t bool db/setting/fmm/sim_change_alert "0" + vconftool $GOPTION set -t string db/setting/fmm/recipients "" + vconftool $GOPTION set -t string db/setting/fmm/sender "" + vconftool $GOPTION set -t string db/setting/fmm/alert_message "" + vconftool $GOPTION set -t bool db/setting/fmm/remote_control "0" + vconftool $GOPTION set -t bool db/setting/fmm/location_consent "0" + + # NOT USED NOW. + #vconftool $GOPTION set -t bool db/setting/rcs "0" + + vconftool $GOPTION set -t int db/setting/phone_lock_attempts_left "5" + vconftool $GOPTION set -t string db/setting/phone_lock_timestamp "" + vconftool $GOPTION set -t int db/setting/sim_lock_attempts_left "5" + vconftool $GOPTION set -t string db/setting/sim_lock_timestamp "" + vconftool $GOPTION set -t bool db/setting/fixed_dialing_mode "0" +#resetMemory + vconftool $GOPTION set -t int db/setting/default_memory/wap "0" + vconftool $GOPTION set -t int db/setting/default_memory/bluetooth "0" + vconftool $GOPTION set -t int db/setting/default_memory/camera "0" + vconftool $GOPTION set -t int db/setting/default_memory/voice_recorder "0" + vconftool $GOPTION set -t int db/setting/default_memory/fm_radio "0" + vconftool $GOPTION set -t int db/setting/default_memory/all_share "0" + vconftool $GOPTION set -t int db/setting/default_memory/adobe_air "0" + vconftool $GOPTION set -t int db/setting/default_memory/dvb_h "0" + + # format - system server + #vconftool $GOPTION -i set -t int memory/mmc/format "0" + +#resetAbout + vconftool $GOPTION set -t string db/setting/device_name "Redwood" + +#resetMenuWidgets + vconftool $GOPTION -i set -t int memory/setting/font_changed "0" + #vconftool $GOPTION -i set -t int memory/mobile_hotspot/skin_changed "0" + +#resetDevoptions + vconftool $GOPTION -i set -t int db/setting/devoption/bgprocess "0" + +#resetDatausage + vconftool $GOPTION set -t bool db/setting/mobile_data "1" + vconftool $GOPTION set -t bool db/setting/disable_mobile_data_at_limit "0" + vconftool $GOPTION set -t bool db/setting/restrict_background_data "0" + vconftool $GOPTION set -t bool db/setting/show_wifi_usage "0" + vconftool $GOPTION set -t int db/setting/data_each_month "10" + +#resetDisplay + vconftool $GOPTION set -t string db/setting/screenmode/selected_name "Dynamic" + +#------------------------------------------ +#create directory /opt/data/setting +if [ ! -d /opt/data/setting ] +then + mkdir -p /opt/data/setting +fi + +# create setting.cfg at runtime right after installation +#/opt/apps/com.samsung.setting/bin/setting_conf_util +# After flashing, initialize timezone file +/opt/apps/com.samsung.setting/bin/setting_conf_util timezone_init +chown 5000:5000 /opt/data/setting -R +#------------------------------------------ +heynotitool set setting_time_changed -a +sync + +mkdir -p /opt/ug/bin/ +ln -sf /usr/bin/ug-client /opt/ug/bin/setting-font-efl +ln -sf /usr/bin/ug-client /opt/ug/bin/setting-accessibility-efl + +%files -n settings +%manifest settings.manifest +%defattr(-,root,root,-) +#%attr(-,inhouse,inhouse) %dir /opt/data/setting +%attr(-,app,app) %dir /opt/data/setting +/opt/apps/com.samsung.setting/bin/setting +/opt/apps/com.samsung.setting/bin/setting_conf_util +/opt/data/setting/setting.cfg + +/opt/share/packages/com.samsung.setting.xml +/opt/share/packages/ug-setting-accessibility-efl.xml +/opt/share/packages/ug-setting-font-efl.xml + +/opt/share/icons/default/small/com.samsung.setting.png +/opt/share/settings/* +/opt/apps/com.samsung.setting/res/* +/opt/apps/com.samsung.setting/lib/* +/opt/apps/com.samsung.setting/data/* +/opt/ug/lib/* +/opt/data/setting/langlist.xml +/opt/data/setting/plugin-cfg/* +/opt/data/setting/plugin-xml/* +#/opt/apps/com.samsung.setting/bin/test_server + diff --git a/resource/Open_Source_Announcement.html b/resource/Open_Source_Announcement.html index fcbf335..810b6e0 100644 --- a/resource/Open_Source_Announcement.html +++ b/resource/Open_Source_Announcement.html @@ -11,7 +11,7 @@ Packages: dbus, libdbus-1-0, libdbus-glib-1-2

License: AFLv2, LGPLv2.0
Packages: libxdgmime

License: Apache License v2.0
-Packages: alarm-server, appsvc-tool, bluetooth-frwk-agent, bluetooth-frwk-test, bluetooth-share, capi-appfw-app-manager, capi-appfw-application, capi-base-common-dev, capi-content-media-content, capi-location-geocoder, capi-location-manager, capi-media-audio-io, capi-media-camera, capi-media-image-util, capi-media-player, capi-media-radio, capi-media-recorder, capi-media-sound-manager, capi-media-tone-player, capi-media-wav-player, capi-messaging-email, capi-messaging-mms, capi-messaging-sms, capi-network-bluetooth, capi-network-connection, capi-network-nfc, capi-social-calendar, capi-social-call-log, capi-social-contacts, capi-system-device, capi-system-haptic, capi-system-info, capi-system-power, capi-system-runtime-info, capi-system-sensor, capi-telephony-call, capi-telephony-network-info, capi-telephony-sim, capi-ui-efl-util, capi-uix-feedback, capi-uix-tts, org.tizen.bluetooth, org.tizen.bluetooth-headers, org.tizen.bluetooth-share-ui, org.tizen.bt-appsvc, org.tizen.bt-syspopup, org.tizen.idle-lock, org.tizen.voicerecorder, contacts-service-bin, default-fonts-fc-sdk, default-fonts-sdk, dlogutil-bin, drm-service-0, efl-theme-tizen, efl-theme-tizen-black, efl-theme-tizen-black-hd, efl-theme-tizen-hd, gps-manager, ise-engine-default, libail-0, libalarm-0, libapp-checker-0, libapp-checker-server-0, libappcore-common-0, libappcore-efl-0, libappsvc-0, libaul-1, libaul-1-executable, libbluetooth-engine-0, libbluetooth-frwk-0, libbundle-0, libcamsrcjpegenc, libcamsrcjpegenc-sw-libjpeg, libcert-svc-0, libconnectivity-device-interface-0, libcontacts-service, libdevman-0, libdlog-0, libdownload-agent-0, libheynoti-0, libmedia-service, libmedia-thumbnail, libmedia-utils, libmm-common, libmm-fileinfo, libmm-imgp-gstcs, libmm-log, libmm-player, libmm-radio, libmm-session-0, libmm-sound-0, libmm-sound-tool, libmm-ta, libmm-utility, libopencore-amrnb, libopencore-amrwb, libprivilege-control-0, librua-0, libsecurity-server-client-0, libslp-calendar-0, libslp-db-util-0, libslp-location, libslp-sensor-0, libslp-setting-0, libslp-sysman, libslp-tapi-0, libslp-utilx-0, libss-client-0, libstt, libsvi-0, libsys-assert-0, libtts, libug-setting-bluetooth-efl, libug-setting-manage-applications-efl-0, libui-gadget-0, libuw-imap-toolkit-0, libvconf-0, location-geoclue-gpsd, location-geoclue-nominatim, location-gps-manager, media-data-sdk, media-server, media-thumbnail-server, mm-fileinfo-tools, mmfw-sysconf-cleansdk-target, mmfw-sysconf-simulator, nitz, opengl-es, opengl-es-virtual-drv, security-server, sonet0, ss-server, starter, svi-data-sdk, telephony-server, wrt, wrt-plugins-common, wrt-plugins-tizen, wrt-plugins-wac, wrt-test, openssh-client, openssh-server +Packages: alarm-server, appsvc-tool, bluetooth-frwk-agent, bluetooth-frwk-test, bluetooth-share, boot-animation, capi-appfw-app-manager, capi-appfw-application, capi-base-common-dev, capi-content-media-content, capi-location-geocoder, capi-location-manager, capi-media-audio-io, capi-media-camera, capi-media-image-util, capi-media-player, capi-media-radio, capi-media-recorder, capi-media-sound-manager, capi-media-tone-player, capi-media-wav-player, capi-messaging-email, capi-messaging-mms, capi-messaging-sms, capi-network-bluetooth, capi-network-connection, capi-network-nfc, capi-social-calendar, capi-social-call-log, capi-social-contacts, capi-system-device, capi-system-haptic, capi-system-info, capi-system-power, capi-system-runtime-info, capi-system-sensor, capi-telephony-call, capi-telephony-network-info, capi-telephony-sim, capi-ui-efl-util, capi-uix-feedback, capi-uix-tts, cbhm, org.tizen.alert-3g-syspopup, org.tizen.app-selector, org.tizen.bluetooth, org.tizen.bluetooth-headers, org.tizen.bluetooth-share-ui, org.tizen.browser, org.tizen.bt-appsvc, org.tizen.bt-syspopup, org.tizen.calculator, org.tizen.calendar-viewer, org.tizen.call, org.tizen.ciss, org.tizen.clock, org.tizen.contacts, org.tizen.contacts-viewer, org.tizen.download-provider, org.tizen.efl-calendar, org.tizen.gallery, org.tizen.idle-lock, org.tizen.image-viewer, org.tizen.indicator, org.tizen.lowbat-syspopup, org.tizen.lowmem-syspopup, org.tizen.memo, org.tizen.menu-screen, org.tizen.music-player, org.tizen.phone, org.tizen.phone-lock, org.tizen.poweroff-syspopup, org.tizen.pwlock, org.tizen.quickpanel, org.tizen.setting, org.tizen.smartsearch, org.tizen.taskmgr, org.tizen.usb-syspopup, org.tizen.video-player, org.tizen.voicerecorder, org.tizen.volume, org.tizen.wifi-qs, contacts-service-bin, default-fonts-fc-sdk, default-fonts-sdk, dlogutil-bin, drm-service-0, efl-theme-tizen, efl-theme-tizen-black, efl-theme-tizen-black-hd, efl-theme-tizen-hd, gps-manager, ise-default, ise-engine-default, libail-0, libalarm-0, libapp-checker-0, libapp-checker-server-0, libappcore-common-0, libappcore-efl-0, libappsvc-0, libaudiosessionmgr-0, libaul-1, libaul-1-executable, libavsystem-0, libbluetooth-engine-0, libbluetooth-frwk-0, libbundle-0, libcamsrcjpegenc, libcamsrcjpegenc-sw-libjpeg, libcert-svc-0, libconnectivity-device-interface-0, libcontacts-service, libdevman-0, libdlog-0, libdownload-agent-0, libelm-webview, libheynoti-0, libmedia-service, libmedia-thumbnail, libmedia-utils, libmm-camcorder, libmm-common, libmm-fileinfo, libmm-imgp-gstcs, libmm-log, libmm-player, libmm-radio, libmm-session-0, libmm-sound-0, libmm-sound-tool, libmm-ta, libmm-utility, libnetwork-0, libnfc-common-lib-0, libnfc-manager-0, libopencore-amrnb, libopencore-amrwb, libpkgmgr-client-0, libpkgmgr-installer, libprivilege-control-0, librua-0, libsecurity-server-client-0, libsf-common-0, libslp-alarm-0, libslp-calendar-0, libslp-db-util-0, libslp-location, libslp-memo, libslp-mms-plugin, libslp-msg-service-0, libslp-pm-0, libslp-sensor-0, libslp-setting-0, libslp-shortcut-0, libslp-sms-plugin, libslp-sysman, libslp-tapi-0, libslp-utilx-0, libsppc-0, libss-client-0, libstt, libsvi-0, libsys-assert-0, libtts, libug-calendar-efl, libug-calendar-picker-efl, libug-contacts-efl, libug-gallery-efl-0, libug-image-viewer-efl, libug-memo-efl, libug-myfile-efl, libug-phone-efl, libug-setting-bluetooth-efl, libug-setting-call-efl, libug-setting-gallery-efl, libug-setting-location-efl, libug-setting-manage-applications-efl-0, libug-setting-theme-efl, libug-worldclock-efl, libui-gadget-0, libui-idlecapture-0, libuw-imap-toolkit-0, libvconf-0, location-geoclue-gpsd, location-geoclue-nominatim, location-gps-manager, media-data-sdk, media-server, media-thumbnail-server, menu-daemon, mm-fileinfo-tools, mmfw-sysconf-cleansdk-target, mmfw-sysconf-simulator, msg-service-tools, myaccount-0, native-installer, nitz, opengl-es, opengl-es-virtual-drv, pkgmgr-server, sdbd, security-server, sensor-framework, sonet0, spp-client-bin, spp-client-tool, ss-server, starter, svi-data-sdk, syspopup-0, syspopup-caller-0, system-server-bin, telephony-server, usb-setting-app, wifi-efl-ug, wrt, wrt-plugins-common, wrt-plugins-tizen, wrt-plugins-wac, wrt-test, openssh-client, openssh-server

Licence: BSD
Packages: libuuid1

License: New BSD
@@ -35,7 +35,7 @@ Packages: libpcre

License: perl License
Packages: libperl5.10, perl, perl-base, perl-debug, perl-doc, perl-modules, perl-suid

License: GPLv2
-Packages: apt, bash, default-files-slp, login, mtd-utils, passwd, alsa-utils, base-files, base-passwd, bluez, busybox, busybox-symlinks-adduser, busybox-symlinks-adjtimex, busybox-symlinks-binutils, busybox-symlinks-bridge-utils, busybox-symlinks-bsdmainutils, busybox-symlinks-busybox, busybox-symlinks-bzip2, busybox-symlinks-console-tools, busybox-symlinks-cpio, busybox-symlinks-cron, busybox-symlinks-daemontools, busybox-symlinks-dc, busybox-symlinks-dnsutils, busybox-symlinks-dosfstools, busybox-symlinks-ed, busybox-symlinks-eject, busybox-symlinks-fbset, busybox-symlinks-fdflush, busybox-symlinks-hdparm, busybox-symlinks-ifupdown, busybox-symlinks-initscripts, busybox-symlinks-ipcalc, busybox-symlinks-iproute, busybox-symlinks-ipsvd, busybox-symlinks-iputils-arping, busybox-symlinks-iputils-ping, busybox-symlinks-klogd, busybox-symlinks-loadlin, busybox-symlinks-lrzsz, busybox-symlinks-lzma, busybox-symlinks-lzop, busybox-symlinks-module-init-tools, busybox-symlinks-mtd-utils, busybox-symlinks-net-tools, busybox-symlinks-openbsd-inetd, busybox-symlinks-passwd, busybox-symlinks-patch, busybox-symlinks-ppp, busybox-symlinks-procps, busybox-symlinks-psmisc, busybox-symlinks-rdate, busybox-symlinks-realpath, busybox-symlinks-rpm, busybox-symlinks-runit, busybox-symlinks-sharutils, busybox-symlinks-ssmtp, busybox-symlinks-sysklogd, busybox-symlinks-telnetd, busybox-symlinks-tftp, busybox-symlinks-time, busybox-symlinks-tofrodos, busybox-symlinks-udhcpc, busybox-symlinks-udhcpd, busybox-symlinks-unzip, busybox-symlinks-vlan, busybox-symlinks-vlock, busybox-symlinks-watchdog, busybox-symlinks-wget, busybox-symlinks-xterm, busybox-symlinks-zcip, connman, e2fsck-static, execstack, gnupg, gpgv, ifupdown, initscripts, insserv, iptables, lib64readline5, libbluetooth3, libc-bin, libc-dev-bin, libc6, libc6-i686, libc6-prof, libelfg0, libfuse-dev, libgstreamer-plugins-base0.10-0, libgudev-1.0-0, liblzo2-2, libpci3, libreadline5, libudev0, linux-base, linux-headers-2.6.36-trunk-all, linux-headers-2.6.36-trunk-all-armel, linux-headers-2.6.36-trunk-common, linux-headers-2.6.36-trunk-u1, linux-image-2.6.36-trunk-u1, linux-kbuild-2.6.36, linux-source-2.6.36, locales, lsb-base, ltrace, mawk, module-init-tools, netbase, obexd, oprofile, pciutils, pkg-config, prelink, procps, psmisc, ragel, readline-common, rlfe, locales-init, shared-mime-info, simulator-opengl-dev, smackutils, system-plugin-slp, sysv-rc, sysvinit, sysvinit-utils, u-boot, u-boot-tools, udev, usbutils, valgrind, tzdata-slp, fakeroot, dpkg +Packages: apt, bash, default-files-slp, login, mtd-utils, passwd, alsa-utils, base-files, base-passwd, bluez, busybox, busybox-symlinks-adduser, busybox-symlinks-adjtimex, busybox-symlinks-binutils, busybox-symlinks-bridge-utils, busybox-symlinks-bsdmainutils, busybox-symlinks-busybox, busybox-symlinks-bzip2, busybox-symlinks-console-tools, busybox-symlinks-cpio, busybox-symlinks-cron, busybox-symlinks-daemontools, busybox-symlinks-dc, busybox-symlinks-dnsutils, busybox-symlinks-dosfstools, busybox-symlinks-ed, busybox-symlinks-eject, busybox-symlinks-fbset, busybox-symlinks-fdflush, busybox-symlinks-hdparm, busybox-symlinks-ifupdown, busybox-symlinks-initscripts, busybox-symlinks-ipcalc, busybox-symlinks-iproute, busybox-symlinks-ipsvd, busybox-symlinks-iputils-arping, busybox-symlinks-iputils-ping, busybox-symlinks-klogd, busybox-symlinks-loadlin, busybox-symlinks-lrzsz, busybox-symlinks-lzma, busybox-symlinks-lzop, busybox-symlinks-module-init-tools, busybox-symlinks-mtd-utils, busybox-symlinks-net-tools, busybox-symlinks-openbsd-inetd, busybox-symlinks-passwd, busybox-symlinks-patch, busybox-symlinks-ppp, busybox-symlinks-procps, busybox-symlinks-psmisc, busybox-symlinks-rdate, busybox-symlinks-realpath, busybox-symlinks-rpm, busybox-symlinks-runit, busybox-symlinks-sharutils, busybox-symlinks-ssmtp, busybox-symlinks-sysklogd, busybox-symlinks-telnetd, busybox-symlinks-tftp, busybox-symlinks-time, busybox-symlinks-tofrodos, busybox-symlinks-udhcpc, busybox-symlinks-udhcpd, busybox-symlinks-unzip, busybox-symlinks-vlan, busybox-symlinks-vlock, busybox-symlinks-watchdog, busybox-symlinks-wget, busybox-symlinks-xterm, busybox-symlinks-zcip, connman, e2fsck-static, execstack, gnupg, gpgv, ifupdown, initscripts, insserv, iptables, lib64readline5, libbluetooth3, libc-bin, libc-dev-bin, libc6, libc6-i686, libc6-prof, libelfg0, libfuse-dev, libgstreamer-plugins-base0.10-0, libgudev-1.0-0, liblzo2-2, libpci3, libreadline5, libudev0, linux-base, linux-headers-2.6.36-trunk-all, linux-headers-2.6.36-trunk-all-armel, linux-headers-2.6.36-trunk-common, linux-headers-2.6.36-trunk-u1, linux-image-2.6.36-trunk-u1, linux-kbuild-2.6.36, linux-source-2.6.36, locales, lsb-base, ltrace, mawk, module-init-tools, netbase, obexd, oprofile, pciutils, pkg-config, prelink, procps, psmisc, ragel, readline-common, rlfe, locales-init, shared-mime-info, simulator-opengl, simulator-opengl-dev, smackutils, system-plugin-slp, sysv-rc, sysvinit, sysvinit-utils, u-boot, u-boot-tools, udev, usbutils, valgrind, tzdata-slp, fakeroot

License: GPLv2, LGPLv2.1
Packages: attr, acl, libacl1, libattr1

License: GPLv3
@@ -47,14 +47,14 @@ Packages: libgmp10, libgmpxx4ldbl

License: LGPLv2.0
Packages: gconf-dbus-utils, geoclue, geoclue-gpsd, geoclue-nominatim, glib-networking, gstreamer-tools, gstreamer0.10-plugins-base, gstreamer0.10-plugins-base-apps, gstreamer0.10-plugins-ugly, gstreamer0.10-tools, gstreamer0.10-x, libfreealut, libfribidi0, libgconf-dbus, libgeoclue, libglib2.0-0, libglib2.0-0-refdbg, libglib2.0-bin, libglib2.0-data, libglib2.0-dev, libglib2.0-doc, libgstreamer0.10-0, libopenal-soft, libpango1.0, libpango1.0-common, libsoup2.4

License: LGPLv2.1
-Packages: alsa-scenario-scn-data-0, alsa-scenario-scn-data-0-base, alsa-scenario-scn-data-0-mc1n2, check, dialog, elm-misc, gstreamer0.10-alsa, gstreamer0.10-ffmpeg, gstreamer0.10-plugins-bad, gstreamer0.10-plugins-ext, gstreamer0.10-plugins-good, libaccounts-svc-0, libascenario-0, libasound2, libavcodec, libavformat, libavutil, libc6-dev, libeina, libeina-doc, libethumb, libethumb-bin, libexif12, libgcrypt11, libgnutls26, libgpg-error0, libisf-bin, libjson-glib, libmpc2, libnotification-0, libopenobex1, libpulse0, libsmack-0, libsndfile1, libsocial-service-0, libswscale, libusb-0.1-4, libwbxml2-0, libwbxml2-utils, location-geoclue-pdr, location-geoclue-xps, pulseaudio, pulseaudio-module-bluetooth, pulseaudio-utils, sndfile-programs, sqlfs-bin, libelm, libelm-bin +Packages: alsa-scenario-scn-data-0, alsa-scenario-scn-data-0-base, alsa-scenario-scn-data-0-mc1n2, check, dialog, elm-misc, gstreamer0.10-alsa, gstreamer0.10-ffmpeg, gstreamer0.10-plugins-bad, gstreamer0.10-plugins-ext, gstreamer0.10-plugins-good, libaccounts-svc-0, libascenario-0, libasound2, libavcodec, libavformat, libavutil, libc6-dev, libeina, libeina-doc, libethumb, libethumb-bin, libexif12, libgcrypt11, libgnutls26, libgpg-error0, libisf-bin, libjson-glib, libmpc2, libnotification-0, libopenobex1, libpulse0, libsmack-0, libsndfile1, libsocial-service-0, libswscale, libug-picker-efl, libusb-0.1-4, libwbxml2-0, libwbxml2-utils, location-geoclue-pdr, location-geoclue-xps, pulseaudio, pulseaudio-module-bluetooth, pulseaudio-utils, sndfile-programs, sqlfs-bin, libelm, libelm-bin

License: LGPLv2.1, Mozilla Public License 1.1
Packages: libcairo2

License: libpng License
Packages: libpng12-0, libpng3

License: ICU License
Packages: icu-doc, libicu -

License: MIT/X Consortium License
+

License: MIT/X Consortium License
Packages: libexpat1, expat

License: MIT License
Packages: fontconfig, fontconfig-config, giflib-tools, iniparser, libcurl, libcurl3, libdmx1, libdri2, libdrm-slp1, libdrm2, libfontconfig1, libfontenc1, libgif4, libharfbuzz, libice6, libkms1, liblua5.1-0, liboauth, libpciaccess0, libpixman-1-0, libpthread-stubs0, libsm6, libungif-bin, libungif4g, libx11-6, libx11-data, libx11-xcb1, libxau6, libxaw7, libxcb-atom1, libxcb-aux0, libxcb-composite0, libxcb-damage0, libxcb-dpms0, libxcb-dri2-0, libxcb-event1, libxcb-glx0, libxcb-icccm1, libxcb-image0, libxcb-keysyms1, libxcb-property1, libxcb-randr0, libxcb-record0, libxcb-render-util0, libxcb-render0, libxcb-reply1, libxcb-res0, libxcb-screensaver0, libxcb-shape0, libxcb-shm0, libxcb-sync0, libxcb-xevie0, libxcb-xf86dri0, libxcb-xfixes0, libxcb-xinerama0, libxcb-xprint0, libxcb-xtest0, libxcb-xv0, libxcb-xvmc0, libxcb1, libxcomposite1, libxcursor1, libxdamage1, libxdmcp6, libxext6, libxfixes3, libxfont1, libxft2, libxgesture0, libxi6, libxinerama1, libxkbfile1, libxml2, libxml2-0, libxml2-doc, libxml2-utils, libxmlsec1, libxmlsec1-openssl, libxmu-headers, libxmu6, libxmuu1, libxpm4, libxrandr2, libxrender1, libxres1, libxslt1.1, libxt6, libxtrap6, libxtst6, libxv1, libxxf86dga1, libxxf86misc1, libxxf86vm1, lua5.1, lua5.1-doc, python-xcbgen, x11-apps, x11-common, x11-utils, x11-xkb-utils, x11-xserver-utils, x11proto-bigreqs-dev, x11proto-composite-dev, x11proto-core-dev, x11proto-damage-dev, x11proto-dmx-dev, x11proto-dri2-dev, x11proto-fixes-dev, x11proto-fontcache-dev, x11proto-fonts-dev, x11proto-gesture-dev, x11proto-input-dev, x11proto-kb-dev, x11proto-randr-dev, x11proto-record-dev, x11proto-render-dev, x11proto-resource-dev, x11proto-scrnsaver-dev, x11proto-trap-dev, x11proto-video-dev, x11proto-xcmisc-dev, x11proto-xext-dev, x11proto-xf86bigfont-dev, x11proto-xf86dga-dev, x11proto-xf86dri-dev, x11proto-xf86misc-dev, x11proto-xf86vidmode-dev, x11proto-xinerama-dev, xbitmaps, xcb-proto, xfonts-utils, xinit, xinput, xkb-data, xkb-data-i18n, xpmutils, xrestop, xserver-common, xserver-xorg-core, xserver-xorg-input-evdev, xserver-xorg-input-evdev-multitouch, xserver-xorg-input-gesture, xserver-xorg-misc-emulfb, xserver-xorg-tools, xserver-xorg-video-emulfb, xtrans-dev, xutils-dev @@ -62,6 +62,8 @@ Packages: fontconfig, fontconfig-config, giflib-tools, iniparser, libcurl, libcu Packages: rfkill

License: MIT, ISC(Internet Software Consortium)
Packages: libc-ares2 +

License: BSD, LGPLv2.1, Mozilla, MIT
+Packages: libwebkit-engine

License: OpenSSL License
Packages: libssl-dev, libssl1.0.0, openssl

License: Red Hat Software
@@ -73,7 +75,7 @@ Packages: libfreetype6

License: bzip2
Packages: libbz2-1.0, bzip2

License: Samsung Proprietary
-Packages: org.tizen.sat-ui, geoclue-pdr, geoclue-xps, libslp-lbs-plugin-csr, boot-network-init +Packages: org.tizen.sat-ui, geoclue-pdr, geoclue-xps, libeas-common, libslp-telplugin-0, libslp-lbs-plugin-csr, boot-network-init

License: Apachev2.0, MIT, CPOL
Packages: wrt-commons

License: libjpeg license
@@ -82,6 +84,8 @@ Packages: libjpeg-progs Packages: ncurses-bin, ncurses-term, ncurse license, libncurses5

License: GCC 4.5 License
Packages: libstdc++6 +

License: No license
+Packages: ca-certificates


The Academic Free License v. 2.1 diff --git a/resource/Open_Source_Announcement.pdf b/resource/Open_Source_Announcement.pdf new file mode 100755 index 0000000..a3ac424 Binary files /dev/null and b/resource/Open_Source_Announcement.pdf differ diff --git a/resource/Open_Source_Announcement.txt b/resource/Open_Source_Announcement.txt old mode 100755 new mode 100644 index a4e6263..82d48be --- a/resource/Open_Source_Announcement.txt +++ b/resource/Open_Source_Announcement.txt @@ -5,7 +5,7 @@ License: AFLv2, LGPLv2.0 Packages: libxdgmime License: Apache License v2.0 -Packages: alarm-server, appsvc-tool, bluetooth-frwk-agent, bluetooth-frwk-test, bluetooth-share, capi-appfw-app-manager, capi-appfw-application, capi-base-common-dev, capi-content-media-content, capi-location-geocoder, capi-location-manager, capi-media-audio-io, capi-media-camera, capi-media-image-util, capi-media-player, capi-media-radio, capi-media-recorder, capi-media-sound-manager, capi-media-tone-player, capi-media-wav-player, capi-messaging-email, capi-messaging-mms, capi-messaging-sms, capi-network-bluetooth, capi-network-connection, capi-network-nfc, capi-social-calendar, capi-social-call-log, capi-social-contacts, capi-system-device, capi-system-haptic, capi-system-info, capi-system-power, capi-system-runtime-info, capi-system-sensor, capi-telephony-call, capi-telephony-network-info, capi-telephony-sim, capi-ui-efl-util, capi-uix-feedback, capi-uix-tts, org.tizen.bluetooth, org.tizen.bluetooth-headers, org.tizen.bluetooth-share-ui, org.tizen.bt-appsvc, org.tizen.bt-syspopup, org.tizen.idle-lock, org.tizen.voicerecorder, contacts-service-bin, default-fonts-fc-sdk, default-fonts-sdk, dlogutil-bin, drm-service-0, efl-theme-tizen, efl-theme-tizen-black, efl-theme-tizen-black-hd, efl-theme-tizen-hd, gps-manager, ise-engine-default, libail-0, libalarm-0, libapp-checker-0, libapp-checker-server-0, libappcore-common-0, libappcore-efl-0, libappsvc-0, libaul-1, libaul-1-executable, libbluetooth-engine-0, libbluetooth-frwk-0, libbundle-0, libcamsrcjpegenc, libcamsrcjpegenc-sw-libjpeg, libcert-svc-0, libconnectivity-device-interface-0, libcontacts-service, libdevman-0, libdlog-0, libdownload-agent-0, libheynoti-0, libmedia-service, libmedia-thumbnail, libmedia-utils, libmm-common, libmm-fileinfo, libmm-imgp-gstcs, libmm-log, libmm-player, libmm-radio, libmm-session-0, libmm-sound-0, libmm-sound-tool, libmm-ta, libmm-utility, libopencore-amrnb, libopencore-amrwb, libprivilege-control-0, librua-0, libsecurity-server-client-0, libslp-calendar-0, libslp-db-util-0, libslp-location, libslp-sensor-0, libslp-setting-0, libslp-sysman, libslp-tapi-0, libslp-utilx-0, libss-client-0, libstt, libsvi-0, libsys-assert-0, libtts, libug-setting-bluetooth-efl, libug-setting-manage-applications-efl-0, libui-gadget-0, libuw-imap-toolkit-0, libvconf-0, location-geoclue-gpsd, location-geoclue-nominatim, location-gps-manager, media-data-sdk, media-server, media-thumbnail-server, mm-fileinfo-tools, mmfw-sysconf-cleansdk-target, mmfw-sysconf-simulator, nitz, opengl-es, opengl-es-virtual-drv, security-server, sonet0, ss-server, starter, svi-data-sdk, telephony-server, wrt, wrt-plugins-common, wrt-plugins-tizen, wrt-plugins-wac, wrt-test, openssh-client, openssh-server +Packages: alarm-server, appsvc-tool, bluetooth-frwk-agent, bluetooth-frwk-test, bluetooth-share, boot-animation, capi-appfw-app-manager, capi-appfw-application, capi-base-common-dev, capi-content-media-content, capi-location-geocoder, capi-location-manager, capi-media-audio-io, capi-media-camera, capi-media-image-util, capi-media-player, capi-media-radio, capi-media-recorder, capi-media-sound-manager, capi-media-tone-player, capi-media-wav-player, capi-messaging-email, capi-messaging-mms, capi-messaging-sms, capi-network-bluetooth, capi-network-connection, capi-network-nfc, capi-social-calendar, capi-social-call-log, capi-social-contacts, capi-system-device, capi-system-haptic, capi-system-info, capi-system-power, capi-system-runtime-info, capi-system-sensor, capi-telephony-call, capi-telephony-network-info, capi-telephony-sim, capi-ui-efl-util, capi-uix-feedback, capi-uix-tts, cbhm, org.tizen.alert-3g-syspopup, org.tizen.app-selector, org.tizen.bluetooth, org.tizen.bluetooth-headers, org.tizen.bluetooth-share-ui, org.tizen.browser, org.tizen.bt-appsvc, org.tizen.bt-syspopup, org.tizen.calculator, org.tizen.calendar-viewer, org.tizen.call, org.tizen.ciss, org.tizen.clock, org.tizen.contacts, org.tizen.contacts-viewer, org.tizen.download-provider, org.tizen.efl-calendar, org.tizen.gallery, org.tizen.idle-lock, org.tizen.image-viewer, org.tizen.indicator, org.tizen.lowbat-syspopup, org.tizen.lowmem-syspopup, org.tizen.memo, org.tizen.menu-screen, org.tizen.music-player, org.tizen.phone, org.tizen.phone-lock, org.tizen.poweroff-syspopup, org.tizen.pwlock, org.tizen.quickpanel, org.tizen.setting, org.tizen.smartsearch, org.tizen.taskmgr, org.tizen.usb-syspopup, org.tizen.video-player, org.tizen.voicerecorder, org.tizen.volume, org.tizen.wifi-qs, contacts-service-bin, default-fonts-fc-sdk, default-fonts-sdk, dlogutil-bin, drm-service-0, efl-theme-tizen, efl-theme-tizen-black, efl-theme-tizen-black-hd, efl-theme-tizen-hd, gps-manager, ise-default, ise-engine-default, libail-0, libalarm-0, libapp-checker-0, libapp-checker-server-0, libappcore-common-0, libappcore-efl-0, libappsvc-0, libaudiosessionmgr-0, libaul-1, libaul-1-executable, libavsystem-0, libbluetooth-engine-0, libbluetooth-frwk-0, libbundle-0, libcamsrcjpegenc, libcamsrcjpegenc-sw-libjpeg, libcert-svc-0, libconnectivity-device-interface-0, libcontacts-service, libdevman-0, libdlog-0, libdownload-agent-0, libelm-webview, libheynoti-0, libmedia-service, libmedia-thumbnail, libmedia-utils, libmm-camcorder, libmm-common, libmm-fileinfo, libmm-imgp-gstcs, libmm-log, libmm-player, libmm-radio, libmm-session-0, libmm-sound-0, libmm-sound-tool, libmm-ta, libmm-utility, libnetwork-0, libnfc-common-lib-0, libnfc-manager-0, libopencore-amrnb, libopencore-amrwb, libpkgmgr-client-0, libpkgmgr-installer, libprivilege-control-0, librua-0, libsecurity-server-client-0, libsf-common-0, libslp-alarm-0, libslp-calendar-0, libslp-db-util-0, libslp-location, libslp-memo, libslp-mms-plugin, libslp-msg-service-0, libslp-pm-0, libslp-sensor-0, libslp-setting-0, libslp-shortcut-0, libslp-sms-plugin, libslp-sysman, libslp-tapi-0, libslp-utilx-0, libsppc-0, libss-client-0, libstt, libsvi-0, libsys-assert-0, libtts, libug-calendar-efl, libug-calendar-picker-efl, libug-contacts-efl, libug-gallery-efl-0, libug-image-viewer-efl, libug-memo-efl, libug-myfile-efl, libug-phone-efl, libug-setting-bluetooth-efl, libug-setting-call-efl, libug-setting-gallery-efl, libug-setting-location-efl, libug-setting-manage-applications-efl-0, libug-setting-theme-efl, libug-worldclock-efl, libui-gadget-0, libui-idlecapture-0, libuw-imap-toolkit-0, libvconf-0, location-geoclue-gpsd, location-geoclue-nominatim, location-gps-manager, media-data-sdk, media-server, media-thumbnail-server, menu-daemon, mm-fileinfo-tools, mmfw-sysconf-cleansdk-target, mmfw-sysconf-simulator, msg-service-tools, myaccount-0, native-installer, nitz, opengl-es, opengl-es-virtual-drv, pkgmgr-server, sdbd, security-server, sensor-framework, sonet0, spp-client-bin, spp-client-tool, ss-server, starter, svi-data-sdk, syspopup-0, syspopup-caller-0, system-server-bin, telephony-server, usb-setting-app, wifi-efl-ug, wrt, wrt-plugins-common, wrt-plugins-tizen, wrt-plugins-wac, wrt-test, openssh-client, openssh-server Licence: BSD Packages: libuuid1 @@ -41,7 +41,7 @@ License: perl License Packages: libperl5.10, perl, perl-base, perl-debug, perl-doc, perl-modules, perl-suid License: GPLv2 -Packages: apt, bash, default-files-slp, login, mtd-utils, passwd, alsa-utils, base-files, base-passwd, bluez, busybox, busybox-symlinks-adduser, busybox-symlinks-adjtimex, busybox-symlinks-binutils, busybox-symlinks-bridge-utils, busybox-symlinks-bsdmainutils, busybox-symlinks-busybox, busybox-symlinks-bzip2, busybox-symlinks-console-tools, busybox-symlinks-cpio, busybox-symlinks-cron, busybox-symlinks-daemontools, busybox-symlinks-dc, busybox-symlinks-dnsutils, busybox-symlinks-dosfstools, busybox-symlinks-ed, busybox-symlinks-eject, busybox-symlinks-fbset, busybox-symlinks-fdflush, busybox-symlinks-hdparm, busybox-symlinks-ifupdown, busybox-symlinks-initscripts, busybox-symlinks-ipcalc, busybox-symlinks-iproute, busybox-symlinks-ipsvd, busybox-symlinks-iputils-arping, busybox-symlinks-iputils-ping, busybox-symlinks-klogd, busybox-symlinks-loadlin, busybox-symlinks-lrzsz, busybox-symlinks-lzma, busybox-symlinks-lzop, busybox-symlinks-module-init-tools, busybox-symlinks-mtd-utils, busybox-symlinks-net-tools, busybox-symlinks-openbsd-inetd, busybox-symlinks-passwd, busybox-symlinks-patch, busybox-symlinks-ppp, busybox-symlinks-procps, busybox-symlinks-psmisc, busybox-symlinks-rdate, busybox-symlinks-realpath, busybox-symlinks-rpm, busybox-symlinks-runit, busybox-symlinks-sharutils, busybox-symlinks-ssmtp, busybox-symlinks-sysklogd, busybox-symlinks-telnetd, busybox-symlinks-tftp, busybox-symlinks-time, busybox-symlinks-tofrodos, busybox-symlinks-udhcpc, busybox-symlinks-udhcpd, busybox-symlinks-unzip, busybox-symlinks-vlan, busybox-symlinks-vlock, busybox-symlinks-watchdog, busybox-symlinks-wget, busybox-symlinks-xterm, busybox-symlinks-zcip, connman, e2fsck-static, execstack, gnupg, gpgv, ifupdown, initscripts, insserv, iptables, lib64readline5, libbluetooth3, libc-bin, libc-dev-bin, libc6, libc6-i686, libc6-prof, libelfg0, libfuse-dev, libgstreamer-plugins-base0.10-0, libgudev-1.0-0, liblzo2-2, libpci3, libreadline5, libudev0, linux-base, linux-headers-2.6.36-trunk-all, linux-headers-2.6.36-trunk-all-armel, linux-headers-2.6.36-trunk-common, linux-headers-2.6.36-trunk-u1, linux-image-2.6.36-trunk-u1, linux-kbuild-2.6.36, linux-source-2.6.36, locales, lsb-base, ltrace, mawk, module-init-tools, netbase, obexd, oprofile, pciutils, pkg-config, prelink, procps, psmisc, ragel, readline-common, rlfe, locales-init, shared-mime-info, simulator-opengl-dev, smackutils, system-plugin-slp, sysv-rc, sysvinit, sysvinit-utils, u-boot, u-boot-tools, udev, usbutils, valgrind, tzdata-slp, fakeroot, dpkg +Packages: apt, bash, default-files-slp, login, mtd-utils, passwd, alsa-utils, base-files, base-passwd, bluez, busybox, busybox-symlinks-adduser, busybox-symlinks-adjtimex, busybox-symlinks-binutils, busybox-symlinks-bridge-utils, busybox-symlinks-bsdmainutils, busybox-symlinks-busybox, busybox-symlinks-bzip2, busybox-symlinks-console-tools, busybox-symlinks-cpio, busybox-symlinks-cron, busybox-symlinks-daemontools, busybox-symlinks-dc, busybox-symlinks-dnsutils, busybox-symlinks-dosfstools, busybox-symlinks-ed, busybox-symlinks-eject, busybox-symlinks-fbset, busybox-symlinks-fdflush, busybox-symlinks-hdparm, busybox-symlinks-ifupdown, busybox-symlinks-initscripts, busybox-symlinks-ipcalc, busybox-symlinks-iproute, busybox-symlinks-ipsvd, busybox-symlinks-iputils-arping, busybox-symlinks-iputils-ping, busybox-symlinks-klogd, busybox-symlinks-loadlin, busybox-symlinks-lrzsz, busybox-symlinks-lzma, busybox-symlinks-lzop, busybox-symlinks-module-init-tools, busybox-symlinks-mtd-utils, busybox-symlinks-net-tools, busybox-symlinks-openbsd-inetd, busybox-symlinks-passwd, busybox-symlinks-patch, busybox-symlinks-ppp, busybox-symlinks-procps, busybox-symlinks-psmisc, busybox-symlinks-rdate, busybox-symlinks-realpath, busybox-symlinks-rpm, busybox-symlinks-runit, busybox-symlinks-sharutils, busybox-symlinks-ssmtp, busybox-symlinks-sysklogd, busybox-symlinks-telnetd, busybox-symlinks-tftp, busybox-symlinks-time, busybox-symlinks-tofrodos, busybox-symlinks-udhcpc, busybox-symlinks-udhcpd, busybox-symlinks-unzip, busybox-symlinks-vlan, busybox-symlinks-vlock, busybox-symlinks-watchdog, busybox-symlinks-wget, busybox-symlinks-xterm, busybox-symlinks-zcip, connman, e2fsck-static, execstack, gnupg, gpgv, ifupdown, initscripts, insserv, iptables, lib64readline5, libbluetooth3, libc-bin, libc-dev-bin, libc6, libc6-i686, libc6-prof, libelfg0, libfuse-dev, libgstreamer-plugins-base0.10-0, libgudev-1.0-0, liblzo2-2, libpci3, libreadline5, libudev0, linux-base, linux-headers-2.6.36-trunk-all, linux-headers-2.6.36-trunk-all-armel, linux-headers-2.6.36-trunk-common, linux-headers-2.6.36-trunk-u1, linux-image-2.6.36-trunk-u1, linux-kbuild-2.6.36, linux-source-2.6.36, locales, lsb-base, ltrace, mawk, module-init-tools, netbase, obexd, oprofile, pciutils, pkg-config, prelink, procps, psmisc, ragel, readline-common, rlfe, locales-init, shared-mime-info, simulator-opengl, simulator-opengl-dev, smackutils, system-plugin-slp, sysv-rc, sysvinit, sysvinit-utils, u-boot, u-boot-tools, udev, usbutils, valgrind, tzdata-slp, fakeroot License: GPLv2, LGPLv2.1 Packages: attr, acl, libacl1, libattr1 @@ -59,7 +59,7 @@ License: LGPLv2.0 Packages: gconf-dbus-utils, geoclue, geoclue-gpsd, geoclue-nominatim, glib-networking, gstreamer-tools, gstreamer0.10-plugins-base, gstreamer0.10-plugins-base-apps, gstreamer0.10-plugins-ugly, gstreamer0.10-tools, gstreamer0.10-x, libfreealut, libfribidi0, libgconf-dbus, libgeoclue, libglib2.0-0, libglib2.0-0-refdbg, libglib2.0-bin, libglib2.0-data, libglib2.0-dev, libglib2.0-doc, libgstreamer0.10-0, libopenal-soft, libpango1.0, libpango1.0-common, libsoup2.4 License: LGPLv2.1 -Packages: alsa-scenario-scn-data-0, alsa-scenario-scn-data-0-base, alsa-scenario-scn-data-0-mc1n2, check, dialog, elm-misc, gstreamer0.10-alsa, gstreamer0.10-ffmpeg, gstreamer0.10-plugins-bad, gstreamer0.10-plugins-ext, gstreamer0.10-plugins-good, libaccounts-svc-0, libascenario-0, libasound2, libavcodec, libavformat, libavutil, libc6-dev, libeina, libeina-doc, libethumb, libethumb-bin, libexif12, libgcrypt11, libgnutls26, libgpg-error0, libisf-bin, libjson-glib, libmpc2, libnotification-0, libopenobex1, libpulse0, libsmack-0, libsndfile1, libsocial-service-0, libswscale, libusb-0.1-4, libwbxml2-0, libwbxml2-utils, location-geoclue-pdr, location-geoclue-xps, pulseaudio, pulseaudio-module-bluetooth, pulseaudio-utils, sndfile-programs, sqlfs-bin, libelm, libelm-bin +Packages: alsa-scenario-scn-data-0, alsa-scenario-scn-data-0-base, alsa-scenario-scn-data-0-mc1n2, check, dialog, elm-misc, gstreamer0.10-alsa, gstreamer0.10-ffmpeg, gstreamer0.10-plugins-bad, gstreamer0.10-plugins-ext, gstreamer0.10-plugins-good, libaccounts-svc-0, libascenario-0, libasound2, libavcodec, libavformat, libavutil, libc6-dev, libeina, libeina-doc, libethumb, libethumb-bin, libexif12, libgcrypt11, libgnutls26, libgpg-error0, libisf-bin, libjson-glib, libmpc2, libnotification-0, libopenobex1, libpulse0, libsmack-0, libsndfile1, libsocial-service-0, libswscale, libug-picker-efl, libusb-0.1-4, libwbxml2-0, libwbxml2-utils, location-geoclue-pdr, location-geoclue-xps, pulseaudio, pulseaudio-module-bluetooth, pulseaudio-utils, sndfile-programs, sqlfs-bin, libelm, libelm-bin License: LGPLv2.1, Mozilla Public License 1.1 Packages: libcairo2 @@ -82,6 +82,9 @@ Packages: rfkill License: MIT, ISC(Internet Software Consortium) Packages: libc-ares2 +License: BSD, LGPLv2.1, Mozilla, MIT +Packages: libwebkit-engine + License: OpenSSL License Packages: libssl-dev, libssl1.0.0, openssl @@ -98,7 +101,7 @@ License: bzip2 Packages: libbz2-1.0, bzip2 License: Samsung Proprietary -Packages: org.tizen.sat-ui, geoclue-pdr, geoclue-xps, libslp-lbs-plugin-csr, boot-network-init +Packages: org.tizen.sat-ui, geoclue-pdr, geoclue-xps, libeas-common, libslp-telplugin-0, libslp-lbs-plugin-csr, boot-network-init License: Apachev2.0, MIT, CPOL Packages: wrt-commons @@ -112,6 +115,9 @@ Packages: ncurses-bin, ncurses-term, ncurse license, libncurses5 License: GCC 4.5 License Packages: libstdc++6 +License: No license +Packages: ca-certificates + ============================================================================================ The Academic Free License v. 2.1 diff --git a/resource/icons/00_brightness_left_gray.png b/resource/icons/00_brightness_left_gray.png new file mode 100755 index 0000000..7d43d75 Binary files /dev/null and b/resource/icons/00_brightness_left_gray.png differ diff --git a/resource/icons/00_brightness_right_gray.png b/resource/icons/00_brightness_right_gray.png new file mode 100755 index 0000000..09b23d2 Binary files /dev/null and b/resource/icons/00_brightness_right_gray.png differ diff --git a/resource/icons/00_list_expand_closed_arrow.png b/resource/icons/00_list_expand_closed_arrow.png new file mode 100755 index 0000000..32a2fb9 Binary files /dev/null and b/resource/icons/00_list_expand_closed_arrow.png differ diff --git a/resource/icons/00_list_expand_opened_arrow.png b/resource/icons/00_list_expand_opened_arrow.png new file mode 100755 index 0000000..ec41be0 Binary files /dev/null and b/resource/icons/00_list_expand_opened_arrow.png differ diff --git a/resource/images/00_input_bg_white.png b/resource/icons/01_header_icon_add.png old mode 100755 new mode 100644 similarity index 89% rename from resource/images/00_input_bg_white.png rename to resource/icons/01_header_icon_add.png index 562314f..43c4984 Binary files a/resource/images/00_input_bg_white.png and b/resource/icons/01_header_icon_add.png differ diff --git a/resource/images/00_input_bg_black.png b/resource/icons/01_header_icon_cancel.png old mode 100755 new mode 100644 similarity index 86% rename from resource/images/00_input_bg_black.png rename to resource/icons/01_header_icon_cancel.png index d5c11f5..4fb54c3 Binary files a/resource/images/00_input_bg_black.png and b/resource/icons/01_header_icon_cancel.png differ diff --git a/resource/icons/01_header_icon_done.png b/resource/icons/01_header_icon_done.png new file mode 100644 index 0000000..d771640 Binary files /dev/null and b/resource/icons/01_header_icon_done.png differ diff --git a/resource/icons/01_header_icon_others.png b/resource/icons/01_header_icon_others.png new file mode 100644 index 0000000..4fc9dfa Binary files /dev/null and b/resource/icons/01_header_icon_others.png differ diff --git a/resource/icons/Security.png b/resource/icons/21_slider_btn_volume01.png similarity index 74% rename from resource/icons/Security.png rename to resource/icons/21_slider_btn_volume01.png index b5b2d56..fd3b72d 100644 Binary files a/resource/icons/Security.png and b/resource/icons/21_slider_btn_volume01.png differ diff --git a/resource/icons/Keyboard.png b/resource/icons/21_slider_btn_volume02.png similarity index 72% rename from resource/icons/Keyboard.png rename to resource/icons/21_slider_btn_volume02.png index 02a43b9..8b3afb2 100644 Binary files a/resource/icons/Keyboard.png and b/resource/icons/21_slider_btn_volume02.png differ diff --git a/resource/icons/A01-1_icon_About_phone.png b/resource/icons/A01-1_icon_About_phone.png new file mode 100755 index 0000000..1fbc11f Binary files /dev/null and b/resource/icons/A01-1_icon_About_phone.png differ diff --git a/resource/icons/A01-1_icon_Accounts.png b/resource/icons/A01-1_icon_Accounts.png new file mode 100755 index 0000000..736997b Binary files /dev/null and b/resource/icons/A01-1_icon_Accounts.png differ diff --git a/resource/icons/A01-1_icon_ActiveSync.png b/resource/icons/A01-1_icon_ActiveSync.png new file mode 100755 index 0000000..a6e1186 Binary files /dev/null and b/resource/icons/A01-1_icon_ActiveSync.png differ diff --git a/resource/icons/A01-1_icon_Allshare_cast.png b/resource/icons/A01-1_icon_Allshare_cast.png new file mode 100755 index 0000000..1164590 Binary files /dev/null and b/resource/icons/A01-1_icon_Allshare_cast.png differ diff --git a/resource/icons/A01-1_icon_Bluetooth.png b/resource/icons/A01-1_icon_Bluetooth.png new file mode 100755 index 0000000..1a315b0 Binary files /dev/null and b/resource/icons/A01-1_icon_Bluetooth.png differ diff --git a/resource/icons/A01-1_icon_Brightness.png b/resource/icons/A01-1_icon_Brightness.png new file mode 100755 index 0000000..8eda022 Binary files /dev/null and b/resource/icons/A01-1_icon_Brightness.png differ diff --git a/resource/icons/A01-1_icon_Choose_default.png b/resource/icons/A01-1_icon_Choose_default.png new file mode 100755 index 0000000..163490c Binary files /dev/null and b/resource/icons/A01-1_icon_Choose_default.png differ diff --git a/resource/icons/A01-1_icon_Data_Roaming.png b/resource/icons/A01-1_icon_Data_Roaming.png new file mode 100755 index 0000000..78dd444 Binary files /dev/null and b/resource/icons/A01-1_icon_Data_Roaming.png differ diff --git a/resource/icons/A01-1_icon_Date_and_time.png b/resource/icons/A01-1_icon_Date_and_time.png new file mode 100755 index 0000000..4121b88 Binary files /dev/null and b/resource/icons/A01-1_icon_Date_and_time.png differ diff --git a/resource/icons/A01-1_icon_Display.png b/resource/icons/A01-1_icon_Display.png new file mode 100755 index 0000000..e3595bf Binary files /dev/null and b/resource/icons/A01-1_icon_Display.png differ diff --git a/resource/icons/A01-1_icon_Display_Language.png b/resource/icons/A01-1_icon_Display_Language.png new file mode 100755 index 0000000..89813d6 Binary files /dev/null and b/resource/icons/A01-1_icon_Display_Language.png differ diff --git a/resource/icons/A01-1_icon_Events_Notifications.png b/resource/icons/A01-1_icon_Events_Notifications.png new file mode 100755 index 0000000..6057384 Binary files /dev/null and b/resource/icons/A01-1_icon_Events_Notifications.png differ diff --git a/resource/icons/A01-1_icon_Flight_Mode.png b/resource/icons/A01-1_icon_Flight_Mode.png new file mode 100755 index 0000000..6cf9aac Binary files /dev/null and b/resource/icons/A01-1_icon_Flight_Mode.png differ diff --git a/resource/icons/A01-1_icon_Font.png b/resource/icons/A01-1_icon_Font.png new file mode 100755 index 0000000..625d344 Binary files /dev/null and b/resource/icons/A01-1_icon_Font.png differ diff --git a/resource/icons/A01-1_icon_Kies_via_Wifi.png b/resource/icons/A01-1_icon_Kies_via_Wifi.png new file mode 100755 index 0000000..de1734d Binary files /dev/null and b/resource/icons/A01-1_icon_Kies_via_Wifi.png differ diff --git a/resource/icons/A01-1_icon_License.png b/resource/icons/A01-1_icon_License.png new file mode 100755 index 0000000..b568c4f Binary files /dev/null and b/resource/icons/A01-1_icon_License.png differ diff --git a/resource/icons/A01-1_icon_Location.png b/resource/icons/A01-1_icon_Location.png new file mode 100755 index 0000000..3f78d6b Binary files /dev/null and b/resource/icons/A01-1_icon_Location.png differ diff --git a/resource/icons/A01-1_icon_Manage_Application.png b/resource/icons/A01-1_icon_Manage_Application.png new file mode 100755 index 0000000..f21f2aa Binary files /dev/null and b/resource/icons/A01-1_icon_Manage_Application.png differ diff --git a/resource/icons/A01-1_icon_Memory.png b/resource/icons/A01-1_icon_Memory.png new file mode 100755 index 0000000..f402948 Binary files /dev/null and b/resource/icons/A01-1_icon_Memory.png differ diff --git a/resource/icons/Event.png b/resource/icons/A01-1_icon_Menu.png old mode 100644 new mode 100755 similarity index 54% rename from resource/icons/Event.png rename to resource/icons/A01-1_icon_Menu.png index d275826..6853fd9 Binary files a/resource/icons/Event.png and b/resource/icons/A01-1_icon_Menu.png differ diff --git a/resource/icons/A01-1_icon_Motion.png b/resource/icons/A01-1_icon_Motion.png new file mode 100755 index 0000000..1c2875d Binary files /dev/null and b/resource/icons/A01-1_icon_Motion.png differ diff --git a/resource/icons/A01-1_icon_Network.png b/resource/icons/A01-1_icon_Network.png new file mode 100755 index 0000000..51bf5da Binary files /dev/null and b/resource/icons/A01-1_icon_Network.png differ diff --git a/resource/icons/A01-1_icon_Phone.png b/resource/icons/A01-1_icon_Phone.png new file mode 100755 index 0000000..3974c41 Binary files /dev/null and b/resource/icons/A01-1_icon_Phone.png differ diff --git a/resource/icons/Accounts.png b/resource/icons/A01-1_icon_Power_saving_mode.png old mode 100644 new mode 100755 similarity index 59% rename from resource/icons/Accounts.png rename to resource/icons/A01-1_icon_Power_saving_mode.png index 50f1886..80590d4 Binary files a/resource/icons/Accounts.png and b/resource/icons/A01-1_icon_Power_saving_mode.png differ diff --git a/resource/icons/A01-1_icon_Reset.png b/resource/icons/A01-1_icon_Reset.png new file mode 100755 index 0000000..3e0b032 Binary files /dev/null and b/resource/icons/A01-1_icon_Reset.png differ diff --git a/resource/icons/A01-1_icon_Rotation_lock.png b/resource/icons/A01-1_icon_Rotation_lock.png new file mode 100755 index 0000000..3738aeb Binary files /dev/null and b/resource/icons/A01-1_icon_Rotation_lock.png differ diff --git a/resource/icons/A01-1_icon_Security.png b/resource/icons/A01-1_icon_Security.png new file mode 100755 index 0000000..bc3f6fa Binary files /dev/null and b/resource/icons/A01-1_icon_Security.png differ diff --git a/resource/icons/A01-1_icon_Sound.png b/resource/icons/A01-1_icon_Sound.png new file mode 100755 index 0000000..f5fc257 Binary files /dev/null and b/resource/icons/A01-1_icon_Sound.png differ diff --git a/resource/icons/A01-1_icon_USB_Connection.png b/resource/icons/A01-1_icon_USB_Connection.png new file mode 100755 index 0000000..7961c0d Binary files /dev/null and b/resource/icons/A01-1_icon_USB_Connection.png differ diff --git a/resource/icons/A01-1_icon_USB_Theme.png b/resource/icons/A01-1_icon_USB_Theme.png new file mode 100755 index 0000000..8c2bf58 Binary files /dev/null and b/resource/icons/A01-1_icon_USB_Theme.png differ diff --git a/resource/icons/A01-1_icon_Wallpaper.png b/resource/icons/A01-1_icon_Wallpaper.png new file mode 100755 index 0000000..de68128 Binary files /dev/null and b/resource/icons/A01-1_icon_Wallpaper.png differ diff --git a/resource/icons/A01-1_icon_Wi-Fi.png b/resource/icons/A01-1_icon_Wi-Fi.png new file mode 100755 index 0000000..6dcd0fb Binary files /dev/null and b/resource/icons/A01-1_icon_Wi-Fi.png differ diff --git a/resource/icons/A01-1_icon_Wi-Fi_direct.png b/resource/icons/A01-1_icon_Wi-Fi_direct.png new file mode 100755 index 0000000..71a6db8 Binary files /dev/null and b/resource/icons/A01-1_icon_Wi-Fi_direct.png differ diff --git a/resource/icons/A01-1_icon_apps_information.png b/resource/icons/A01-1_icon_apps_information.png new file mode 100755 index 0000000..8fdcf6b Binary files /dev/null and b/resource/icons/A01-1_icon_apps_information.png differ diff --git a/resource/icons/A01-1_icon_color_applications.png b/resource/icons/A01-1_icon_color_applications.png new file mode 100755 index 0000000..62681bc Binary files /dev/null and b/resource/icons/A01-1_icon_color_applications.png differ diff --git a/resource/icons/A01-1_icon_color_available.png b/resource/icons/A01-1_icon_color_available.png new file mode 100755 index 0000000..3ca0f08 Binary files /dev/null and b/resource/icons/A01-1_icon_color_available.png differ diff --git a/resource/icons/A01-1_icon_color_downloads.png b/resource/icons/A01-1_icon_color_downloads.png new file mode 100755 index 0000000..1f893ef Binary files /dev/null and b/resource/icons/A01-1_icon_color_downloads.png differ diff --git a/resource/icons/A01-1_icon_color_miscellaneous_files.png b/resource/icons/A01-1_icon_color_miscellaneous_files.png new file mode 100755 index 0000000..14c6951 Binary files /dev/null and b/resource/icons/A01-1_icon_color_miscellaneous_files.png differ diff --git a/resource/icons/A01-1_icon_color_pictures.png b/resource/icons/A01-1_icon_color_pictures.png new file mode 100755 index 0000000..7b51238 Binary files /dev/null and b/resource/icons/A01-1_icon_color_pictures.png differ diff --git a/resource/icons/A01-1_icon_keyboard.png b/resource/icons/A01-1_icon_keyboard.png new file mode 100755 index 0000000..2de1924 Binary files /dev/null and b/resource/icons/A01-1_icon_keyboard.png differ diff --git a/resource/icons/A01-1_icon_mobileAP.png b/resource/icons/A01-1_icon_mobileAP.png new file mode 100755 index 0000000..896577d Binary files /dev/null and b/resource/icons/A01-1_icon_mobileAP.png differ diff --git a/resource/icons/A01-1_img_screen_mode.png b/resource/icons/A01-1_img_screen_mode.png new file mode 100755 index 0000000..b488ea2 Binary files /dev/null and b/resource/icons/A01-1_img_screen_mode.png differ diff --git a/resource/icons/A01-1_input_bg.png b/resource/icons/A01-1_input_bg.png new file mode 100755 index 0000000..2e4bdf3 Binary files /dev/null and b/resource/icons/A01-1_input_bg.png differ diff --git a/resource/icons/A01-9_controlbar_icon_Next.png b/resource/icons/A01-9_controlbar_icon_Next.png new file mode 100755 index 0000000..036bf0d Binary files /dev/null and b/resource/icons/A01-9_controlbar_icon_Next.png differ diff --git a/resource/icons/A01-9_controlbar_icon_Previous.png b/resource/icons/A01-9_controlbar_icon_Previous.png new file mode 100755 index 0000000..ee40496 Binary files /dev/null and b/resource/icons/A01-9_controlbar_icon_Previous.png differ diff --git a/resource/icons/AboutPhone.png b/resource/icons/AboutPhone.png deleted file mode 100755 index 215d387..0000000 Binary files a/resource/icons/AboutPhone.png and /dev/null differ diff --git a/resource/icons/Accessibility.png b/resource/icons/Accessibility.png new file mode 100755 index 0000000..f4df920 Binary files /dev/null and b/resource/icons/Accessibility.png differ diff --git a/resource/icons/AddFavourite.png b/resource/icons/AddFavourite.png new file mode 100755 index 0000000..7eb1e5f Binary files /dev/null and b/resource/icons/AddFavourite.png differ diff --git a/resource/icons/AllShare.png b/resource/icons/AllShare.png new file mode 100755 index 0000000..5d02a12 Binary files /dev/null and b/resource/icons/AllShare.png differ diff --git a/resource/icons/Data-32.png b/resource/icons/Data-32.png new file mode 100755 index 0000000..3f7fff1 Binary files /dev/null and b/resource/icons/Data-32.png differ diff --git a/resource/icons/DataRoaming.png b/resource/icons/DataRoaming.png deleted file mode 100755 index 3ff46ee..0000000 Binary files a/resource/icons/DataRoaming.png and /dev/null differ diff --git a/resource/icons/DateAndTime.png b/resource/icons/DateAndTime.png deleted file mode 100755 index f68d08a..0000000 Binary files a/resource/icons/DateAndTime.png and /dev/null differ diff --git a/resource/icons/Dialing.png b/resource/icons/Dialing.png new file mode 100755 index 0000000..1154155 Binary files /dev/null and b/resource/icons/Dialing.png differ diff --git a/resource/icons/Display.png b/resource/icons/Display.png deleted file mode 100755 index 0b44bae..0000000 Binary files a/resource/icons/Display.png and /dev/null differ diff --git a/resource/icons/FMRadio.png b/resource/icons/FMRadio.png new file mode 100755 index 0000000..0e5a533 Binary files /dev/null and b/resource/icons/FMRadio.png differ diff --git a/resource/icons/FlightMode.png b/resource/icons/FlightMode.png deleted file mode 100644 index 05c5995..0000000 Binary files a/resource/icons/FlightMode.png and /dev/null differ diff --git a/resource/icons/Gesture.png b/resource/icons/Gesture.png new file mode 100755 index 0000000..833a844 Binary files /dev/null and b/resource/icons/Gesture.png differ diff --git a/resource/icons/Image_browser.png b/resource/icons/Image_browser.png new file mode 100755 index 0000000..6b4b8f2 Binary files /dev/null and b/resource/icons/Image_browser.png differ diff --git a/resource/icons/Internet.png b/resource/icons/Internet.png new file mode 100755 index 0000000..5367f59 Binary files /dev/null and b/resource/icons/Internet.png differ diff --git a/resource/icons/Kies-via-WiFi.png b/resource/icons/Kies-via-WiFi.png deleted file mode 100755 index 87cfdae..0000000 Binary files a/resource/icons/Kies-via-WiFi.png and /dev/null differ diff --git a/resource/icons/Language.png b/resource/icons/Language.png deleted file mode 100644 index 58f734f..0000000 Binary files a/resource/icons/Language.png and /dev/null differ diff --git a/resource/icons/License.png b/resource/icons/License.png deleted file mode 100755 index 6db2114..0000000 Binary files a/resource/icons/License.png and /dev/null differ diff --git a/resource/icons/Location.png b/resource/icons/Location.png deleted file mode 100755 index 9860fd3..0000000 Binary files a/resource/icons/Location.png and /dev/null differ diff --git a/resource/icons/ManageApplications.png b/resource/icons/ManageApplications.png deleted file mode 100755 index ff97a19..0000000 Binary files a/resource/icons/ManageApplications.png and /dev/null differ diff --git a/resource/icons/Memory.png b/resource/icons/Memory.png deleted file mode 100755 index c18ea6b..0000000 Binary files a/resource/icons/Memory.png and /dev/null differ diff --git a/resource/icons/More.png b/resource/icons/More.png deleted file mode 100755 index 62b468b..0000000 Binary files a/resource/icons/More.png and /dev/null differ diff --git a/resource/icons/Music.png b/resource/icons/Music.png new file mode 100755 index 0000000..93674e1 Binary files /dev/null and b/resource/icons/Music.png differ diff --git a/resource/icons/Network.png b/resource/icons/Network.png deleted file mode 100644 index 7ccd6c0..0000000 Binary files a/resource/icons/Network.png and /dev/null differ diff --git a/resource/icons/Reset.png b/resource/icons/Reset.png deleted file mode 100644 index 033b92c..0000000 Binary files a/resource/icons/Reset.png and /dev/null differ diff --git a/resource/icons/SevenEmail.png b/resource/icons/SevenEmail.png new file mode 100755 index 0000000..0a89263 Binary files /dev/null and b/resource/icons/SevenEmail.png differ diff --git a/resource/icons/Sound.png b/resource/icons/Sound.png deleted file mode 100755 index 36bc53c..0000000 Binary files a/resource/icons/Sound.png and /dev/null differ diff --git a/resource/icons/Synchronise.png b/resource/icons/Synchronise.png deleted file mode 100644 index 3d9e44f..0000000 Binary files a/resource/icons/Synchronise.png and /dev/null differ diff --git a/resource/icons/Theme.png b/resource/icons/Theme.png deleted file mode 100755 index ef0de7a..0000000 Binary files a/resource/icons/Theme.png and /dev/null differ diff --git a/resource/icons/USB.png b/resource/icons/USB.png deleted file mode 100644 index 9c6eb7c..0000000 Binary files a/resource/icons/USB.png and /dev/null differ diff --git a/resource/icons/VoiceRecorder.png b/resource/icons/VoiceRecorder.png new file mode 100755 index 0000000..4160261 Binary files /dev/null and b/resource/icons/VoiceRecorder.png differ diff --git a/resource/icons/Wallpaper.png b/resource/icons/Wallpaper.png deleted file mode 100755 index eeac9f1..0000000 Binary files a/resource/icons/Wallpaper.png and /dev/null differ diff --git a/resource/icons/Wifi.png b/resource/icons/Wifi.png deleted file mode 100644 index c1b392e..0000000 Binary files a/resource/icons/Wifi.png and /dev/null differ diff --git a/resource/icons/WifiDirect.png b/resource/icons/WifiDirect.png deleted file mode 100644 index 6873342..0000000 Binary files a/resource/icons/WifiDirect.png and /dev/null differ diff --git a/resource/icons/com.samsung.traf-control.png b/resource/icons/com.samsung.traf-control.png new file mode 100755 index 0000000..d1f4f97 Binary files /dev/null and b/resource/icons/com.samsung.traf-control.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_01.png b/resource/icons/motions/browsing panning/B15_browsing_panning_01.png new file mode 100755 index 0000000..8d6b9c6 Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_01.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_02.png b/resource/icons/motions/browsing panning/B15_browsing_panning_02.png new file mode 100755 index 0000000..4c0caf6 Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_02.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_03.png b/resource/icons/motions/browsing panning/B15_browsing_panning_03.png new file mode 100755 index 0000000..66cf060 Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_03.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_04.png b/resource/icons/motions/browsing panning/B15_browsing_panning_04.png new file mode 100755 index 0000000..c90fd17 Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_04.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_05.png b/resource/icons/motions/browsing panning/B15_browsing_panning_05.png new file mode 100755 index 0000000..481244b Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_05.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_06.png b/resource/icons/motions/browsing panning/B15_browsing_panning_06.png new file mode 100755 index 0000000..b1d6587 Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_06.png differ diff --git a/resource/icons/motions/browsing panning/B15_browsing_panning_07.png b/resource/icons/motions/browsing panning/B15_browsing_panning_07.png new file mode 100755 index 0000000..4fad9f3 Binary files /dev/null and b/resource/icons/motions/browsing panning/B15_browsing_panning_07.png differ diff --git a/resource/icons/motions/direct call/B15_direct_call_01.png b/resource/icons/motions/direct call/B15_direct_call_01.png new file mode 100755 index 0000000..bcaffa7 Binary files /dev/null and b/resource/icons/motions/direct call/B15_direct_call_01.png differ diff --git a/resource/icons/motions/direct call/B15_direct_call_02.png b/resource/icons/motions/direct call/B15_direct_call_02.png new file mode 100755 index 0000000..dda1041 Binary files /dev/null and b/resource/icons/motions/direct call/B15_direct_call_02.png differ diff --git a/resource/icons/motions/direct call/B15_direct_call_03.png b/resource/icons/motions/direct call/B15_direct_call_03.png new file mode 100755 index 0000000..560da8c Binary files /dev/null and b/resource/icons/motions/direct call/B15_direct_call_03.png differ diff --git a/resource/icons/motions/double tap/B15_double_tap_01.png b/resource/icons/motions/double tap/B15_double_tap_01.png new file mode 100755 index 0000000..29e094a Binary files /dev/null and b/resource/icons/motions/double tap/B15_double_tap_01.png differ diff --git a/resource/icons/motions/double tap/B15_double_tap_02.png b/resource/icons/motions/double tap/B15_double_tap_02.png new file mode 100755 index 0000000..289e908 Binary files /dev/null and b/resource/icons/motions/double tap/B15_double_tap_02.png differ diff --git a/resource/icons/motions/panning/B15_panning_01.png b/resource/icons/motions/panning/B15_panning_01.png new file mode 100755 index 0000000..598c219 Binary files /dev/null and b/resource/icons/motions/panning/B15_panning_01.png differ diff --git a/resource/icons/motions/panning/B15_panning_02.png b/resource/icons/motions/panning/B15_panning_02.png new file mode 100755 index 0000000..8992a53 Binary files /dev/null and b/resource/icons/motions/panning/B15_panning_02.png differ diff --git a/resource/icons/motions/panning/B15_panning_03.png b/resource/icons/motions/panning/B15_panning_03.png new file mode 100755 index 0000000..04efb07 Binary files /dev/null and b/resource/icons/motions/panning/B15_panning_03.png differ diff --git a/resource/icons/motions/panning/B15_panning_04.png b/resource/icons/motions/panning/B15_panning_04.png new file mode 100755 index 0000000..c4356b5 Binary files /dev/null and b/resource/icons/motions/panning/B15_panning_04.png differ diff --git a/resource/icons/motions/panning/panning_center.png b/resource/icons/motions/panning/panning_center.png new file mode 100755 index 0000000..208929a Binary files /dev/null and b/resource/icons/motions/panning/panning_center.png differ diff --git a/resource/icons/motions/shake/B15_shake_01.png b/resource/icons/motions/shake/B15_shake_01.png new file mode 100755 index 0000000..1b7cb2d Binary files /dev/null and b/resource/icons/motions/shake/B15_shake_01.png differ diff --git a/resource/icons/motions/shake/B15_shake_02.png b/resource/icons/motions/shake/B15_shake_02.png new file mode 100755 index 0000000..3a14896 Binary files /dev/null and b/resource/icons/motions/shake/B15_shake_02.png differ diff --git a/resource/icons/motions/shake/B15_shake_03.png b/resource/icons/motions/shake/B15_shake_03.png new file mode 100755 index 0000000..45fa2b4 Binary files /dev/null and b/resource/icons/motions/shake/B15_shake_03.png differ diff --git a/resource/icons/motions/shake/B15_shake_04.png b/resource/icons/motions/shake/B15_shake_04.png new file mode 100755 index 0000000..e39278f Binary files /dev/null and b/resource/icons/motions/shake/B15_shake_04.png differ diff --git a/resource/icons/motions/smart alert/B15_smart_alert_01.png b/resource/icons/motions/smart alert/B15_smart_alert_01.png new file mode 100755 index 0000000..aa95e23 Binary files /dev/null and b/resource/icons/motions/smart alert/B15_smart_alert_01.png differ diff --git a/resource/icons/motions/smart alert/B15_smart_alert_02.png b/resource/icons/motions/smart alert/B15_smart_alert_02.png new file mode 100755 index 0000000..2226176 Binary files /dev/null and b/resource/icons/motions/smart alert/B15_smart_alert_02.png differ diff --git a/resource/icons/motions/smart alert/B15_smart_alert_03.png b/resource/icons/motions/smart alert/B15_smart_alert_03.png new file mode 100755 index 0000000..26cbf0d Binary files /dev/null and b/resource/icons/motions/smart alert/B15_smart_alert_03.png differ diff --git a/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_01.png b/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_01.png new file mode 100755 index 0000000..bce759a Binary files /dev/null and b/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_01.png differ diff --git a/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_02.png b/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_02.png new file mode 100755 index 0000000..fb0f5ca Binary files /dev/null and b/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_02.png differ diff --git a/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_03.png b/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_03.png new file mode 100755 index 0000000..f863ae6 Binary files /dev/null and b/resource/icons/motions/tilt to zoom/B15_tilt_to_zoom_03.png differ diff --git a/resource/icons/motions/turn over/B15_turn_over_01.png b/resource/icons/motions/turn over/B15_turn_over_01.png new file mode 100755 index 0000000..1fcacc5 Binary files /dev/null and b/resource/icons/motions/turn over/B15_turn_over_01.png differ diff --git a/resource/icons/motions/turn over/B15_turn_over_02.png b/resource/icons/motions/turn over/B15_turn_over_02.png new file mode 100755 index 0000000..a556d41 Binary files /dev/null and b/resource/icons/motions/turn over/B15_turn_over_02.png differ diff --git a/resource/icons/motions/turn over/B15_turn_over_03.png b/resource/icons/motions/turn over/B15_turn_over_03.png new file mode 100755 index 0000000..ff61269 Binary files /dev/null and b/resource/icons/motions/turn over/B15_turn_over_03.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_bar.png b/resource/icons/personal_vibration/B16-10_Vibration_bar.png new file mode 100755 index 0000000..a93e342 Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_bar.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_bg.png b/resource/icons/personal_vibration/B16-10_Vibration_bg.png new file mode 100755 index 0000000..4c6147d Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_bg.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_btn.png b/resource/icons/personal_vibration/B16-10_Vibration_btn.png new file mode 100755 index 0000000..237a1b1 Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_btn.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_btn_press.png b/resource/icons/personal_vibration/B16-10_Vibration_btn_press.png new file mode 100755 index 0000000..a1c081f Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_btn_press.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_icon_play.png b/resource/icons/personal_vibration/B16-10_Vibration_icon_play.png new file mode 100755 index 0000000..2906053 Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_icon_play.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_icon_play_press.png b/resource/icons/personal_vibration/B16-10_Vibration_icon_play_press.png new file mode 100755 index 0000000..8eb232b Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_icon_play_press.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_icon_rec.png b/resource/icons/personal_vibration/B16-10_Vibration_icon_rec.png new file mode 100755 index 0000000..881f91d Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_icon_rec.png differ diff --git a/resource/icons/MobileAP.png b/resource/icons/personal_vibration/B16-10_Vibration_icon_stop.png old mode 100644 new mode 100755 similarity index 51% rename from resource/icons/MobileAP.png rename to resource/icons/personal_vibration/B16-10_Vibration_icon_stop.png index 430143f..872cc0d Binary files a/resource/icons/MobileAP.png and b/resource/icons/personal_vibration/B16-10_Vibration_icon_stop.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_icon_stop_press.png b/resource/icons/personal_vibration/B16-10_Vibration_icon_stop_press.png new file mode 100755 index 0000000..03b0bf7 Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_icon_stop_press.png differ diff --git a/resource/icons/personal_vibration/B16-10_Vibration_recording_touch.png b/resource/icons/personal_vibration/B16-10_Vibration_recording_touch.png new file mode 100755 index 0000000..487787c Binary files /dev/null and b/resource/icons/personal_vibration/B16-10_Vibration_recording_touch.png differ diff --git a/resource/icons/rotation-locked.png b/resource/icons/rotation-locked.png deleted file mode 100755 index 448b0e3..0000000 Binary files a/resource/icons/rotation-locked.png and /dev/null differ diff --git a/resource/langlist.xml b/resource/langlist.xml new file mode 100644 index 0000000..dd6dbb3 --- /dev/null +++ b/resource/langlist.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/resource/media-data-sdk/settings/Alerts/General notification_sdk.wav b/resource/media-data-sdk/settings/Alerts/General notification_sdk.wav new file mode 100755 index 0000000..6487389 Binary files /dev/null and b/resource/media-data-sdk/settings/Alerts/General notification_sdk.wav differ diff --git a/resource/media-data-sdk/settings/Ringtones/Over the horizon.mp3 b/resource/media-data-sdk/settings/Ringtones/Over the horizon.mp3 new file mode 100755 index 0000000..f159e35 Binary files /dev/null and b/resource/media-data-sdk/settings/Ringtones/Over the horizon.mp3 differ diff --git a/resource/media-data-sdk/settings/Wallpapers/Default.jpg b/resource/media-data-sdk/settings/Wallpapers/Default.jpg new file mode 100755 index 0000000..10f4b14 Binary files /dev/null and b/resource/media-data-sdk/settings/Wallpapers/Default.jpg differ diff --git a/resource/media-data-sdk/settings/Wallpapers/Home_default.jpg b/resource/media-data-sdk/settings/Wallpapers/Home_default.jpg new file mode 100755 index 0000000..31fe40c Binary files /dev/null and b/resource/media-data-sdk/settings/Wallpapers/Home_default.jpg differ diff --git a/resource/media-data/settings/Alarms/Dawn chorus.mp3 b/resource/media-data/settings/Alarms/Dawn chorus.mp3 new file mode 100755 index 0000000..4565d4f Binary files /dev/null and b/resource/media-data/settings/Alarms/Dawn chorus.mp3 differ diff --git a/resource/media-data/settings/Alarms/Daybreak.mp3 b/resource/media-data/settings/Alarms/Daybreak.mp3 new file mode 100755 index 0000000..f893418 Binary files /dev/null and b/resource/media-data/settings/Alarms/Daybreak.mp3 differ diff --git a/resource/media-data/settings/Alarms/Good morning.mp3 b/resource/media-data/settings/Alarms/Good morning.mp3 new file mode 100755 index 0000000..c3c4750 Binary files /dev/null and b/resource/media-data/settings/Alarms/Good morning.mp3 differ diff --git a/resource/media-data/settings/Alarms/On time.mp3 b/resource/media-data/settings/Alarms/On time.mp3 new file mode 100755 index 0000000..5bfffa2 Binary files /dev/null and b/resource/media-data/settings/Alarms/On time.mp3 differ diff --git a/resource/media-data/settings/Alarms/Sea breeze.mp3 b/resource/media-data/settings/Alarms/Sea breeze.mp3 new file mode 100755 index 0000000..33f5f62 Binary files /dev/null and b/resource/media-data/settings/Alarms/Sea breeze.mp3 differ diff --git a/resource/media-data/settings/Alarms/Serene morning.mp3 b/resource/media-data/settings/Alarms/Serene morning.mp3 new file mode 100755 index 0000000..c429406 Binary files /dev/null and b/resource/media-data/settings/Alarms/Serene morning.mp3 differ diff --git a/resource/media-data/settings/Alarms/Springtime memories.mp3 b/resource/media-data/settings/Alarms/Springtime memories.mp3 new file mode 100755 index 0000000..a9886e8 Binary files /dev/null and b/resource/media-data/settings/Alarms/Springtime memories.mp3 differ diff --git a/resource/media-data/settings/Alarms/Ticktac.mp3 b/resource/media-data/settings/Alarms/Ticktac.mp3 new file mode 100755 index 0000000..14544fb Binary files /dev/null and b/resource/media-data/settings/Alarms/Ticktac.mp3 differ diff --git a/resource/media-data/settings/Alarms/Walk in the forest.mp3 b/resource/media-data/settings/Alarms/Walk in the forest.mp3 new file mode 100755 index 0000000..08498af Binary files /dev/null and b/resource/media-data/settings/Alarms/Walk in the forest.mp3 differ diff --git a/resource/media-data/settings/Alerts/Bubbles.mp3 b/resource/media-data/settings/Alerts/Bubbles.mp3 new file mode 100755 index 0000000..8d339bf Binary files /dev/null and b/resource/media-data/settings/Alerts/Bubbles.mp3 differ diff --git a/resource/media-data/settings/Alerts/Charming bell.mp3 b/resource/media-data/settings/Alerts/Charming bell.mp3 new file mode 100755 index 0000000..f308b4f Binary files /dev/null and b/resource/media-data/settings/Alerts/Charming bell.mp3 differ diff --git a/resource/media-data/settings/Alerts/Chirp Chrip.mp3 b/resource/media-data/settings/Alerts/Chirp Chrip.mp3 new file mode 100755 index 0000000..13adca3 Binary files /dev/null and b/resource/media-data/settings/Alerts/Chirp Chrip.mp3 differ diff --git a/resource/media-data/settings/Alerts/Cloud.mp3 b/resource/media-data/settings/Alerts/Cloud.mp3 new file mode 100755 index 0000000..e1188d1 Binary files /dev/null and b/resource/media-data/settings/Alerts/Cloud.mp3 differ diff --git a/resource/media-data/settings/Alerts/Glittering Light.mp3 b/resource/media-data/settings/Alerts/Glittering Light.mp3 new file mode 100755 index 0000000..7f8cba8 Binary files /dev/null and b/resource/media-data/settings/Alerts/Glittering Light.mp3 differ diff --git a/resource/media-data/settings/Alerts/Good News.mp3 b/resource/media-data/settings/Alerts/Good News.mp3 new file mode 100755 index 0000000..ae53a15 Binary files /dev/null and b/resource/media-data/settings/Alerts/Good News.mp3 differ diff --git a/resource/media-data/settings/Alerts/Harmonics.mp3 b/resource/media-data/settings/Alerts/Harmonics.mp3 new file mode 100755 index 0000000..999b6d3 Binary files /dev/null and b/resource/media-data/settings/Alerts/Harmonics.mp3 differ diff --git a/resource/media-data/settings/Alerts/Haze.mp3 b/resource/media-data/settings/Alerts/Haze.mp3 new file mode 100755 index 0000000..58a0c2a Binary files /dev/null and b/resource/media-data/settings/Alerts/Haze.mp3 differ diff --git a/resource/media-data/settings/Alerts/Knock.mp3 b/resource/media-data/settings/Alerts/Knock.mp3 new file mode 100755 index 0000000..dffa1b6 Binary files /dev/null and b/resource/media-data/settings/Alerts/Knock.mp3 differ diff --git a/resource/media-data/settings/Alerts/Opener.mp3 b/resource/media-data/settings/Alerts/Opener.mp3 new file mode 100755 index 0000000..7fed530 Binary files /dev/null and b/resource/media-data/settings/Alerts/Opener.mp3 differ diff --git a/resource/media-data/settings/Alerts/Pianissimo.mp3 b/resource/media-data/settings/Alerts/Pianissimo.mp3 new file mode 100755 index 0000000..847efc4 Binary files /dev/null and b/resource/media-data/settings/Alerts/Pianissimo.mp3 differ diff --git a/resource/media-data/settings/Alerts/Postman.mp3 b/resource/media-data/settings/Alerts/Postman.mp3 new file mode 100755 index 0000000..9652ad0 Binary files /dev/null and b/resource/media-data/settings/Alerts/Postman.mp3 differ diff --git a/resource/media-data/settings/Alerts/Pure Bell.mp3 b/resource/media-data/settings/Alerts/Pure Bell.mp3 new file mode 100755 index 0000000..27ed9dd Binary files /dev/null and b/resource/media-data/settings/Alerts/Pure Bell.mp3 differ diff --git a/resource/media-data/settings/Alerts/Sherbet.mp3 b/resource/media-data/settings/Alerts/Sherbet.mp3 new file mode 100755 index 0000000..693855f Binary files /dev/null and b/resource/media-data/settings/Alerts/Sherbet.mp3 differ diff --git a/resource/media-data/settings/Alerts/Starry night.mp3 b/resource/media-data/settings/Alerts/Starry night.mp3 new file mode 100755 index 0000000..4f85f9a Binary files /dev/null and b/resource/media-data/settings/Alerts/Starry night.mp3 differ diff --git a/resource/media-data/settings/Alerts/Stepping stones.mp3 b/resource/media-data/settings/Alerts/Stepping stones.mp3 new file mode 100755 index 0000000..4de2527 Binary files /dev/null and b/resource/media-data/settings/Alerts/Stepping stones.mp3 differ diff --git a/resource/media-data/settings/Alerts/Transparent piano.mp3 b/resource/media-data/settings/Alerts/Transparent piano.mp3 new file mode 100755 index 0000000..c7cdc47 Binary files /dev/null and b/resource/media-data/settings/Alerts/Transparent piano.mp3 differ diff --git a/resource/media-data/settings/Alerts/Whistle.mp3 b/resource/media-data/settings/Alerts/Whistle.mp3 new file mode 100755 index 0000000..7107d77 Binary files /dev/null and b/resource/media-data/settings/Alerts/Whistle.mp3 differ diff --git a/resource/media-data/settings/Previews/Over the horizon.mp3 b/resource/media-data/settings/Previews/Over the horizon.mp3 new file mode 100755 index 0000000..a2b3ad1 Binary files /dev/null and b/resource/media-data/settings/Previews/Over the horizon.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Basic tone 01.mp3 b/resource/media-data/settings/Ringtones/Basic tone 01.mp3 new file mode 100755 index 0000000..d3d442b Binary files /dev/null and b/resource/media-data/settings/Ringtones/Basic tone 01.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Basic tone 02.mp3 b/resource/media-data/settings/Ringtones/Basic tone 02.mp3 new file mode 100755 index 0000000..862552c Binary files /dev/null and b/resource/media-data/settings/Ringtones/Basic tone 02.mp3 differ diff --git a/resource/media-data/settings/Ringtones/BigBand.mp3 b/resource/media-data/settings/Ringtones/BigBand.mp3 new file mode 100755 index 0000000..41cbaf0 Binary files /dev/null and b/resource/media-data/settings/Ringtones/BigBand.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Bugs' story.mp3 b/resource/media-data/settings/Ringtones/Bugs' story.mp3 new file mode 100755 index 0000000..68ed8a4 Binary files /dev/null and b/resource/media-data/settings/Ringtones/Bugs' story.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Chime.mp3 b/resource/media-data/settings/Ringtones/Chime.mp3 new file mode 100755 index 0000000..5e65137 Binary files /dev/null and b/resource/media-data/settings/Ringtones/Chime.mp3 differ diff --git a/resource/media-data/settings/Ringtones/City drivin.mp3 b/resource/media-data/settings/Ringtones/City drivin.mp3 new file mode 100755 index 0000000..08296a9 Binary files /dev/null and b/resource/media-data/settings/Ringtones/City drivin.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Classic bell.mp3 b/resource/media-data/settings/Ringtones/Classic bell.mp3 new file mode 100755 index 0000000..2a5d8bb Binary files /dev/null and b/resource/media-data/settings/Ringtones/Classic bell.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Come with me.mp3 b/resource/media-data/settings/Ringtones/Come with me.mp3 new file mode 100755 index 0000000..a1dc89e Binary files /dev/null and b/resource/media-data/settings/Ringtones/Come with me.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Crossing tone.mp3 b/resource/media-data/settings/Ringtones/Crossing tone.mp3 new file mode 100755 index 0000000..95d4e1c Binary files /dev/null and b/resource/media-data/settings/Ringtones/Crossing tone.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Crossingwalk.mp3 b/resource/media-data/settings/Ringtones/Crossingwalk.mp3 new file mode 100755 index 0000000..c8c4449 Binary files /dev/null and b/resource/media-data/settings/Ringtones/Crossingwalk.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Down Hill.mp3 b/resource/media-data/settings/Ringtones/Down Hill.mp3 new file mode 100755 index 0000000..be6c4f0 Binary files /dev/null and b/resource/media-data/settings/Ringtones/Down Hill.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Emotive sensation.mp3 b/resource/media-data/settings/Ringtones/Emotive sensation.mp3 new file mode 100755 index 0000000..d288afc Binary files /dev/null and b/resource/media-data/settings/Ringtones/Emotive sensation.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Fog on the water.mp3 b/resource/media-data/settings/Ringtones/Fog on the water.mp3 new file mode 100755 index 0000000..f7e89f3 Binary files /dev/null and b/resource/media-data/settings/Ringtones/Fog on the water.mp3 differ diff --git a/resource/media-data/settings/Ringtones/High frequency.mp3 b/resource/media-data/settings/Ringtones/High frequency.mp3 new file mode 100755 index 0000000..640277c Binary files /dev/null and b/resource/media-data/settings/Ringtones/High frequency.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Just guitar.mp3 b/resource/media-data/settings/Ringtones/Just guitar.mp3 new file mode 100755 index 0000000..486e77f Binary files /dev/null and b/resource/media-data/settings/Ringtones/Just guitar.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Just spinning.mp3 b/resource/media-data/settings/Ringtones/Just spinning.mp3 new file mode 100755 index 0000000..560aead Binary files /dev/null and b/resource/media-data/settings/Ringtones/Just spinning.mp3 differ diff --git a/resource/media-data/settings/Ringtones/One fine day.mp3 b/resource/media-data/settings/Ringtones/One fine day.mp3 new file mode 100755 index 0000000..670dc7a Binary files /dev/null and b/resource/media-data/settings/Ringtones/One fine day.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Over the horizon.mp3 b/resource/media-data/settings/Ringtones/Over the horizon.mp3 new file mode 100755 index 0000000..e97f706 Binary files /dev/null and b/resource/media-data/settings/Ringtones/Over the horizon.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Overdrive.mp3 b/resource/media-data/settings/Ringtones/Overdrive.mp3 new file mode 100755 index 0000000..532377c Binary files /dev/null and b/resource/media-data/settings/Ringtones/Overdrive.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Polaris.mp3 b/resource/media-data/settings/Ringtones/Polaris.mp3 new file mode 100755 index 0000000..7617a87 Binary files /dev/null and b/resource/media-data/settings/Ringtones/Polaris.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Popple tone.mp3 b/resource/media-data/settings/Ringtones/Popple tone.mp3 new file mode 100755 index 0000000..5dda958 Binary files /dev/null and b/resource/media-data/settings/Ringtones/Popple tone.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Reverie.mp3 b/resource/media-data/settings/Ringtones/Reverie.mp3 new file mode 100755 index 0000000..ddddb15 Binary files /dev/null and b/resource/media-data/settings/Ringtones/Reverie.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Runner.mp3 b/resource/media-data/settings/Ringtones/Runner.mp3 new file mode 100755 index 0000000..620aba5 Binary files /dev/null and b/resource/media-data/settings/Ringtones/Runner.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Single Tone 01.mp3 b/resource/media-data/settings/Ringtones/Single Tone 01.mp3 new file mode 100755 index 0000000..a3107b8 Binary files /dev/null and b/resource/media-data/settings/Ringtones/Single Tone 01.mp3 differ diff --git a/resource/media-data/settings/Ringtones/Single tone 02.mp3 b/resource/media-data/settings/Ringtones/Single tone 02.mp3 new file mode 100755 index 0000000..cd6ac18 Binary files /dev/null and b/resource/media-data/settings/Ringtones/Single tone 02.mp3 differ diff --git a/resource/media-data/settings/Wallpapers/Default.jpg b/resource/media-data/settings/Wallpapers/Default.jpg new file mode 100755 index 0000000..10f4b14 Binary files /dev/null and b/resource/media-data/settings/Wallpapers/Default.jpg differ diff --git a/resource/media-data/settings/Wallpapers/Home_default.jpg b/resource/media-data/settings/Wallpapers/Home_default.jpg new file mode 100755 index 0000000..31fe40c Binary files /dev/null and b/resource/media-data/settings/Wallpapers/Home_default.jpg differ diff --git a/resource/setting-genlist-theme.edc b/resource/setting-genlist-theme.edc new file mode 100755 index 0000000..002eecd --- /dev/null +++ b/resource/setting-genlist-theme.edc @@ -0,0 +1,234 @@ + +#define BEAT_GENLIST_PART_BASE( param_item_height ) \ + part { name: "base"; \ + type: RECT; \ + repeat_events: 1; \ + scale: 1; \ + description { state: "default" 0.0; \ + min: 0 param_item_height; \ + color: 0 0 0 0; \ + } \ + } + +#define BEAT_GENLIST_PART_BG_IMAGE \ + part { name: "bg_image"; \ + clip_to: "disclip"; \ + mouse_events: 0; \ + description { state: "default" 0.0; \ + visible: 0; \ + } \ + description { state: "selected" 0.0; \ + inherit: "default" 0.0; \ + visible: 1; \ + } \ + } + +#define BEAT_GENLIST_PART_BOTTOM_LINE \ + part { name: "bottom_line"; \ + type: RECT; \ + clip_to: "disclip"; \ + mouse_events: 0; \ + description { state: "default" 0.0; \ + min: 0 1; \ + fixed: 0 1; \ + visible: 1; \ + color: 212 212 212 255; \ + rel1 { \ + relative: 0.0 1.0; \ + offset: 0 -1; \ + } \ + } \ + } + +#define BEAT_GENLIST_PART_PADDING_TOP( param_padding_size ) \ + part { name: "elm.padding.top"; \ + type: RECT; \ + scale: 1; \ + description { \ + state: "default" 0.0; \ + min: 0 param_padding_size; \ + fixed: 0 1; \ + visible: 0; \ + rel2.relative: 1.0 0.0; \ + align: 0.0 0.0; \ + } \ + } + +#define BEAT_GENLIST_PART_PADDING_BOTTOM( param_padding_size ) \ + part { name: "elm.padding.bottom"; \ + type: RECT; \ + scale: 1; \ + description { \ + state: "default" 0.0; \ + min: 0 param_padding_size; \ + fixed: 0 1; \ + visible: 0; \ + rel1.relative: 0.0 1.0; \ + align: 0.0 1.0; \ + } \ + } + +#define BEAT_GENLIST_PART_PADDING_LEFT( param_padding_size ) \ + part { name: "elm.padding.left"; \ + type: RECT; \ + scale: 1; \ + description { \ + state: "default" 0.0; \ + min: param_padding_size 0; \ + fixed: 1 0; \ + visible: 0; \ + rel2.relative: 0.0 1.0; \ + align: 0.0 0.0; \ + } \ + } + +#define BEAT_GENLIST_PART_PADDING_RIGHT( param_padding_size ) \ + part { name: "elm.padding.right"; \ + type: RECT; \ + scale: 1; \ + description { state: "default" 0.0; \ + min: param_padding_size 0; \ + fixed: 1 0; \ + visible: 0; \ + rel1.relative: 1.0 0.0; \ + align: 1.0 0.0; \ + } \ + } + +#define BEAT_GENLIST_PART_DISCLIP \ + part { name: "disclip"; \ + type: RECT; \ + description { state: "default" 0.0; \ + rel1.to: "base"; \ + rel2.to: "base"; \ + } \ + description { state: "disabled" 0.0; \ + inherit: "default" 0.0; \ + color: 255 255 255 64; \ + } \ + } + +collections { + styles { + style { name: "textblock_style_variable_height"; + base: "font=SLP:style=Roman font_size=35 align=left color=#FFFFFF wrap=word text_class=list_item ellipsis=1.0"; + tag: "br" "\n"; + tag: "hilight" "+ font=SLP:style=Bold"; + tag: "b" "+ font=SLP:style=Bold"; + tag: "tab" "\t"; + } + } + + group { name: "elm/genlist/item/setting/variable_height/default"; + alias: "elm/genlist/item_odd/setting/variable_height/default"; + + data.item: "stacking" "above"; + data.item: "selectraise" "on"; + data.item: "texts" "elm.text"; + data.item: "contents" "elm.icon elm.label"; + data.item: "treesize" "20"; + + parts { + BEAT_GENLIST_PART_BASE( 0 ) + BEAT_GENLIST_PART_BG_IMAGE + BEAT_GENLIST_PART_PADDING_LEFT( 15 ) + BEAT_GENLIST_PART_PADDING_RIGHT( 15 ) + BEAT_GENLIST_PART_PADDING_TOP( 10 ) + BEAT_GENLIST_PART_PADDING_BOTTOM( 10 ) + + part { name: "elm.text"; + clip_to: "disclip"; + type: TEXTBLOCK; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + align: 0.0 0.5; + min: 0 0; + fixed: 1 1; + rel1 { + relative: 1 1.0; + to_x: "elm.padding.left"; + to_y: "elm.padding.top"; + } + rel2 { + relative: 1 0.0; + to_x: "elm.padding.left"; + to_y: "elm.padding.bottom"; + } + text { + style: textblock_style_variable_height; + min: 1 1; + align: 0 0.5; + } + } + } + part { name: "elm.icon"; + clip_to: "disclip"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + align: 0.5 0.5; + rel1 { + relative: 1 1; + to_x: "elm.padding.left"; + to_y: "elm.padding.top"; + } + rel2 { + relative: 0 0; + to_x: "elm.padding.right"; + to_y: "elm.padding.bottom"; + } + } + } + part { name: "elm.label"; + clip_to: "disclip"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + align: 0.0 0.5; + rel1 { + relative: 1 1; + to_x: "elm.padding.left"; + to_y: "elm.padding.top"; + } + rel2 { + relative: 1 0; + to_x: "elm.padding.left"; + to_y: "elm.padding.bottom"; + } + } + } + BEAT_GENLIST_PART_DISCLIP + } + programs { + program { name: "go_active"; + signal: "elm,state,selected"; + source: "elm"; + action: STATE_SET "selected" 0.0; + target: "bg_image"; + } + program { name: "go_passive"; + signal: "elm,state,unselected"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "bg_image"; + transition: LINEAR 0.1; + } + program { name: "go_disabled"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "disclip"; + } + program { name: "go_enabled"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "disclip"; + } + } + } + +} diff --git a/resource/setting-theme.edc b/resource/setting-theme.edc index cc05940..6bbe04a 100755 --- a/resource/setting-theme.edc +++ b/resource/setting-theme.edc @@ -1,34 +1,28 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include "../setting-common/include/setting-common-data-edj-define.h" -//#include "setting-genlist.edc" - -//Cnnot be fixed when select multiple resolution -#define ITEM_X_DEN (480.0) -#define ITEM_Y_DEN (90.0) -#define ITEM_Y_DEN2 (60.0) -#define MAIN_Y_DEN (800.0) - -//#define GROUP_LIST_BG_COLOR_INC 242 238 233 255 images { - image: "00_input_bg_black.png" COMP; - image: "00_input_bg_white.png" COMP; } collections @@ -97,6 +91,7 @@ collections text { font: "SLP:style=Regular"; + text_class:"slp_regular"; size: 32; min: 0 0; align: 0.5 0.5; @@ -132,7 +127,7 @@ collections min: 0 ITEM_Y_DEN; fixed: 1 1; align: 0.0 0.0; - rel1 { relative: 0.0 10/MAIN_Y_DEN; offset: 0 0; to: "bg"; } + rel1 { relative: 0.0 0.0; offset: 0 0; to: "bg"; } rel2 { relative: 1.0 0.0; offset: 0 0; to: "bg"; } } } @@ -147,7 +142,7 @@ collections state: "default" 0.0; align: 0.0 0.0; //rel1 { relative: 0.0 1.0; offset: 0 0; to: "search_bar"; } - rel1 { relative: 0.0 ITEM_Y_DEN/MAIN_Y_DEN; offset: 0 1; to: "bg"; } + rel1 { relative: 0.0 1.0; offset: 0 1; to: "search_bar"; } rel2 { relative: 1.0 1.0; offset: 0 0; to: "bg"; } } } @@ -169,70 +164,6 @@ collections } // end of parts } - group { - name: "layout_with_title_datetime"; - parts { - part { - name: "title"; - type: TEXT; - scale: 1; - - description { - state: "default" 0.0; - //rel1 { relative: 0.0 0.0; offset: 0 -30;} // 10 -30, -20, -15 - rel1 { relative: 0.0 0.0; offset: 0 -20;} // 10 -30, -20, -15 - rel2 { relative: 1.0 0.6; } - color: 0 0 0 255; - - text { - font: "SLP:style=Roman"; - size: 22; - align: 0.0 0.5; - } - } - /*Support other theme display*/ - description { - state: "white" 0.0; - inherit: "default" 0.0; - color: 255 255 255 255; - } - - } - - part { - name: "layout"; - type: SWALLOW; - scale: 1; - - description { - state: "default" 0.0; - rel1 { relative: 0.0 0.3; } - rel2 { relative: 1.0 1.0; offset: 0 -15;} // -15 - } - } - part { name: "padding"; - type: SWALLOW; - scale: 1; - description { state: "default" 0.0; - rel1 { relative: 0.0 0.0;} - rel2 { relative: 1.0 1.0;} - color: 0 0 0 0; - } - } - } - - /*Support other theme display*/ - programs { - program {//black theme need white text - name: "Change_non_white_theme"; - signal: "change,non-white,theme"; - source: "title"; - action: STATE_SET "white" 0.0; - target: "title"; - } - } - } - group { name:"thumbnail_icon2"; @@ -286,10 +217,6 @@ collections } } } -#define TITLE_AREA_H 150 -#define BOTTOM_BAR_AREA_H 114 -#define HD_HEIGHT 1280 -#define WALLPAPER_LAYOUT_H ((HD_HEIGHT)-(TITLE_AREA_H)-(BOTTOM_BAR_AREA_H)) group { name: "wallpaper_layout"; @@ -308,6 +235,20 @@ collections } } part { + name: "bg_swallow"; + type: SWALLOW; + mouse_events: 0; + scale: 1; + description { + state: "default" 0.0; + align: 0.0 0.0; + rel1 { relative: 0.0 0.0; offset: 0 0;} + rel2 { relative: 1.0 1.0; offset: 0 0;} + //color: 0 0 0 0; + } + } + + part { name: "left_swallow_bg"; type: RECT; scale: 1; @@ -350,6 +291,7 @@ collections text { font: "SLP:style=Regular"; + text_class:"slp_regular"; size: FONT_SIZE; min: 0 0; align: 0.5 0.5; @@ -405,6 +347,7 @@ collections text { font: "SLP:style=Regular"; + text_class:"slp_regular"; size: FONT_SIZE; min: 0 0; align: 0.5 0.5; @@ -429,7 +372,7 @@ collections rel2 { relative: 704/720 786/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } } } -/* + part { name: "lock_btn"; type: SWALLOW; @@ -442,7 +385,6 @@ collections rel2 { relative: 704/720 892/WALLPAPER_LAYOUT_H; offset: 0 0; to: "bg"; } } } -*/ } // end of parts programs { @@ -475,6 +417,8 @@ collections target: "left_text"; target: "right_text"; } + + } } @@ -545,3 +489,389 @@ collections } } } + + group { name: "popup_checkview"; + parts{ + part { name: "pad_t"; + scale : 1; + mouse_events: 0; + repeat_events: 1; + description { state: "default" 0.0; + align: 0.5 0.0; + min: 0 22; + fixed: 0 1; + rel1 { + relative: 1.0 0.0;to_x: "pad_l"; + } + rel2 { + relative: 0.0 0.0;to_x: "pad_r"; + } + } + } + part { name: "pad_l"; + scale: 1; + description { state: "default" 0.0; + min : 16 0; + fixed: 1 0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 0.0 1.0; + } + align: 0.0 0.0; + } + } + part { name: "pad_r"; + scale: 1; + description { state: "default" 0.0; + min : 16 0; + fixed: 1 0; + rel1 { + relative: 1.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + align: 1.0 0.0; + } + } + part{ name:"elm.swallow.content"; + type: SWALLOW; + scale : 1; + description { state: "default" 0.0; + min: 380 0; + align: 0.5 0.5; + fixed: 1 0; + rel1 { + relative: 0.5 1.0; + to: "pad_t"; + } + rel2 { + relative: 0.5 0.0; + to: "pad_b"; + } + } + } + part { name: "pad_b"; + scale : 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 0.5 1.0; + min: 0 66; + fixed: 0 1; + rel1 { + relative: 1.0 1.0;to_x: "pad_l"; + } + rel2 { + relative: 0.0 1.0;to_x: "pad_r"; + } + } + } + part { name: "elm.swallow.end"; + type: SWALLOW; + scale : 1; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + align: 0.0 0.5; + rel1 { + relative: 0.18 0.0; + to: "pad_b"; + } + rel2 { + relative: 1.0 1.0; + to: "pad_b"; + } + } + } + part { name: "elm.text"; + type: TEXT; + scale : 1; + description { state: "default" 0.0; + text { + font: "SLP:style=Medium"; + size: 24; + min: 0 0; + align: 0.5 0.5; + } + color: 0 0 0 255; + align: 0.0 0.5; + rel1 { + relative: 0.0 0.0; + to: "pad_b"; + } + rel2 { + relative: 1.0 1.0; + to: "pad_b"; + } + } + } + } + } + group { + name: "personal_vib_layout"; + + parts { + /* background */ + part { + name: "bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; offset: 0 0;} + rel2 { relative: 1.0 1.0; offset: 0 0;} + color: 0 0 0 255; + } + } + + part { + name: "bg_icon"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + fixed: 1 1; + align: 0.5 0.5; + rel1 { relative: 0 132/PERSONAL_VIBRATION_LAYOUT_H; offset: 0 0; to: "bg"; } + rel2 { relative: 1.0 764/PERSONAL_VIBRATION_LAYOUT_H; offset: 0 0; to: "bg"; } + } + } + + part { + name: "time_pass"; + type: SWALLOW; + scale: 1; + mouse_events: 1; + description { + state: "default" 0; + visible: 1; + rel1 { + relative: 0.0 0.0; to: "bg_icon"; + } + rel2 { + relative: 1.0 1.0; to: "bg_icon"; + } + } + description { + state: "hide" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + + part { + name: "recording_icon"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + fixed: 1 1; + align: 0.5 0.5; + visible: 0; + rel1 { relative: 0.0 0.0; offset: 0 0; to: "bg_icon"; } + rel2 { relative: 1.0 1.0; offset: 0 0; to: "bg_icon"; } + } + description { + state: "show" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + + } // end of parts + + programs { + program { + name : "show_recording_icon"; + signal : "SHOW_RECORDING_ICON"; + source : "personal_vib"; + action : STATE_SET "show" 0.0; + target : "recording_icon"; + } + program { + name : "hide_recording_icon"; + signal : "HIDE_RECORDING_ICON"; + source : "personal_vib"; + action : STATE_SET "default" 0.0; + target : "recording_icon"; + } + program { + name : "show_time_pass"; + signal : "SHOW_TIME_PASS"; + source : "personal_vib"; + action : STATE_SET "default" 0.0; + target : "time_pass"; + } + program { + name : "hide_time_pass"; + signal : "HIDE_TIME_PASS"; + source : "personal_vib"; + action : STATE_SET "hide" 0.0; + target : "time_pass"; + } + } //end of programs + } + + group { + name: "traf-control"; + + parts { + part { + name: "background"; + type: RECT; + mouse_events: 0; + + description { + state: "default" 0.0; + color: 123 168 234 255; + + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + } + } + } + + part { + name: "app-stat"; + type: RECT; + mouse_events: 0; + + description { + state: "default" 0.0; + + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + + rel2 { + relative: 1.0 1.0; + offset: -1 -1; + } + } + } + + part { + name: "traf-stat"; + type: SWALLOW; + mouse_events: 0; + + description { + state: "default" 0.0; + min: 0 320; + rel1 { + to: "app-stat"; + relative: 0.0 0.0; + offset: 5 5; + } + rel2 { + to: "app-stat"; + relative: 1.0 1.0; + offset: -6 -6; + } + } + } + } + } + + + group { + name: "screen_mode"; + + parts { + part { + name: "bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; offset: 0 0;} + rel2 { relative: 1.0 1.0; offset: 0 0;} + color: 0 0 0 0; + } + } + part { + name: "elm.padding.top"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + min: 0 16; + fixed: 0 1; + visible: 0; + rel2.relative: 1.0 0.0; + align: 0.0 0.0; + } + } + part { + name: "elm.padding.bottom"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + min: 0 16; + fixed: 0 1; + visible: 0; + rel1.relative: 0.0 1.0; + align: 0.0 1.0; + } + } + part { + name: "elm.padding.left"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + min: 16 0; + fixed: 1 0; + visible: 0; + rel2.relative: 0.0 1.0; + align: 0.0 0.0; + } + } + part { + name: "elm.padding.right"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min: 16 0; + fixed: 1 0; + visible: 0; + rel1.relative: 1.0 0.0; + align: 1.0 0.0; + } + } + part { + name: "content"; + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + align: 0.5 0.5; + rel1 { + relative: 1 1; + to_x: "elm.padding.left"; + to_y: "elm.padding.top"; + } + rel2 { + relative: 0 0; + to_x: "elm.padding.right"; + to_y: "elm.padding.bottom"; + } + } + } + + } + } +} diff --git a/resource/setting.cfg b/resource/setting.cfg new file mode 100644 index 0000000..041ef08 --- /dev/null +++ b/resource/setting.cfg @@ -0,0 +1,374 @@ +[ + { + "name" : "IDS_ST_BODY_CONNECTIVITY", + "menu" : [ + { + "key_name" : "IDS_ST_BODY_FLIGHT_MODE", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Flight_Mode.png", + "ug_args" : "(null)", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_WI_FI", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Wi-Fi.png", + "ug_args" : "wifi-efl-UG", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_MOBILEAP_BODY_TETHERING", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_mobileAP.png", + "ug_args" : "setting-mobile-ap-ug", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_BODY_LOCATION", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Location.png", + "ug_args" : "setting-location-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_NETWORK", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Network.png", + "ug_args" : "setting-network-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_BODY_BLUETOOTH", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Bluetooth.png", + "ug_args" : "setting-bluetooth-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_BODY_NFC", + "icon_path" : "/opt/ug/res/icons/ug-setting-nfc-efl/com.samsung.nfc-app.png", + "ug_args" : "setting-nfc-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_ST_HEADER_WI_FI_DIRECT", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Wi-Fi_direct.png", + "ug_args" : "setting-wifidirect-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "Allshare cast", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Allshare_cast.png", + "ug_args" : "setting-allshare-cast-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_DLNA_HEADER_NEARBY_DEVICES", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/AllShare.png", + "ug_args" : "setting-allshare-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_KIES_VIA_WI_FI", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Kies_via_Wifi.png", + "ug_args" : "kies-via-wifi", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_BODY_SYNCHRONIZE", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_ActiveSync.png", + "ug_args" : "setting-synchronise-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + } + ] + }, + { + "name" : "IDS_COM_BODY_SYSTEM", + "menu" : [ + { + "key_name" : "IDS_ST_BODY_EVENTS_NOTIFICATIONS", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Events_Notifications.png", + "ug_args" : "setting-phone-efl|viewtype:notification", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_BODY_WALLPAPER", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Wallpaper.png", + "ug_args" : "setting-display-efl|viewtype:wallpaper", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_BODY_SOUNDS", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Sound.png", + "ug_args" : "setting-profile-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_OPT_BRIGHTNESS", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Brightness.png", + "ug_args" : "setting-display-efl|viewtype:brightness", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_SECURITY", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Security.png", + "ug_args" : "setting-security-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_POWER_SAVING_MODE", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Power_saving_mode.png", + "ug_args" : "setting-powersaving-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_ST_BODY_MOTION", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Motion.png", + "ug_args" : "setting-motion-efl|viewtype:motions", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_ST_BODY_ACCESSIBILITY", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/Accessibility.png", + "ug_args" : "setting-accessibility-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_FONT", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Font.png", + "ug_args" : "setting-font-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_DISPLAY", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Display.png", + "ug_args" : "setting-display-efl|viewtype:main", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_HEADER_HOME_SCREEN_ABB", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Menu.png", + "ug_args" : "setting-homescreen-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_HEADER_AUTO_ROTATE_SCREEN_ABB", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Rotation_lock.png", + "ug_args" : "(null)", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_DATE_AND_TIME", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Date_and_time.png", + "ug_args" : "setting-time-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_LANGUAGE_AND_REGION_ABB", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Display_Language.png", + "ug_args" : "setting-phone-efl|viewtype:language", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_KEYBOARD", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_keyboard.png", + "ug_args" : "isfsetting-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_HEADER_VOICE_INPUT_AND_OUTPUT", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/VoiceInOut.png", + "ug_args" : "setting-voice-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_ST_BODY_DRIVING_MODE", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/DefaultIcon.png", + "ug_args" : "setting-drivingmode-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_STORAGE", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/DefaultIcon.png", + "ug_args" : "setting-storage-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_ST_BODY_MANAGE_APPLICATIONS", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Manage_Application.png", + "ug_args" : "setting-manage-applications-efl|viewtype:manage-applications", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "Web Applications", + "icon_path" : "/opt/ug/res/icons/ug-webapp-common-efl/WebApplication.png", + "ug_args" : "webapp-common-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_ST_BODY_MEMORY", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Memory.png", + "ug_args" : "setting-memory-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_COM_BODY_RESET", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Reset.png", + "ug_args" : "setting-reset-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_ST_BODY_DEVELOPER_OPTIONS", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_USB_Connection.png", + "ug_args" : "setting-developeroption-efl|viewtype:usb", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + }, + { + "key_name" : "IDS_ST_BODY_ABOUT_PHONE", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_About_phone.png", + "ug_args" : "setting-about-efl", + "pos" : 1, + "click_times" : 0, + "is_resetable" : 1 + } + ] + }, + { + "name" : "IDS_COM_BODY_APPLICATIONS", + "menu" : [ + { + "key_name" : "IDS_COM_BODY_ACCOUNTS", + "icon_path" : "/opt/apps/com.samsung.setting/res/icons/A01-1_icon_Accounts.png", + "ug_args" : "setting-myaccount-efl|mode:account_list", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_CALL", + "icon_path" : "/usr/share/icons/default/small/com.samsung.phone.png", + "ug_args" : "setting-call-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_MESSAGES", + "icon_path" : "/opt/share/icons/default/small/com.samsung.message.png", + "ug_args" : "msg-setting-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_EMAIL", + "icon_path" : "/opt/share/icons/default/small/com.samsung.email.png", + "ug_args" : "email-setting-efl|VIEW_TYPE:main-view", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_CONTACTS", + "icon_path" : "/usr/share/icons/default/small/com.samsung.contacts.png", + "ug_args" : "contacts-settings-efl|request_type:71", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_CALENDAR", + "icon_path" : "/opt/share/icons/default/small/com.samsung.calendar.png", + "ug_args" : "calendar-settings-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_GALLERY", + "icon_path" : "/opt/share/icons/default/small/com.samsung.gallery.png", + "ug_args" : "setting-gallery-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + }, + { + "key_name" : "IDS_COM_BODY_VOICE_RECORDER", + "icon_path" : "/opt/share/icons/default/small/com.samsung.voicerecorder.png", + "ug_args" : "setting-voicerecorder-efl", + "pos" : 0, + "click_times" : 0, + "is_resetable" : 0 + } + ] + }, + { + "name" : "IDS_ST_BODY_DOWNLOADED_APPLICATIONS", + "menu" : [ + ] + } +] \ No newline at end of file diff --git a/resource/ug-setting-accessibility-efl.xml b/resource/ug-setting-accessibility-efl.xml new file mode 100644 index 0000000..c6d3d50 --- /dev/null +++ b/resource/ug-setting-accessibility-efl.xml @@ -0,0 +1,11 @@ + + + + MyoungJune Park + Setting Font Size Panel + + ug-setting-accessibility-efl.png + + + + diff --git a/resource/ug-setting-font-efl.xml b/resource/ug-setting-font-efl.xml new file mode 100644 index 0000000..ce7e413 --- /dev/null +++ b/resource/ug-setting-font-efl.xml @@ -0,0 +1,11 @@ + + + + MyoungJune Park + Setting Font Panel + + ug-setting-font-efl.png + + + + diff --git a/setting-about/CMakeLists.txt b/setting-about/CMakeLists.txt index e11a085..4fcf877 100755 --- a/setting-about/CMakeLists.txt +++ b/setting-about/CMakeLists.txt @@ -4,7 +4,12 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs_about REQUIRED elementary appcore-common appcore-efl iniparser ui-gadget bundle evas ecore tapi elm-webview ewebkit bluetooth-api) +pkg_check_modules(pkgs_about REQUIRED + elementary appcore-common appcore-efl +# drm-service iniparser ui-gadget-1 + iniparser ui-gadget-1 + capi-appfw-application capi-appfw-app-manager evas ecore + tapi bluetooth-api json-glib-1.0) FOREACH(flag ${pkgs_about_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") @@ -23,10 +28,9 @@ ADD_DEFINITIONS("-DSLP_DEBUG") SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") -ADD_LIBRARY(${SETTING_ABOUT_UG} SHARED +ADD_LIBRARY(${SETTING_ABOUT_UG} SHARED src/setting-about.c src/setting-about-main.c - src/setting-about-licences.c ) TARGET_LINK_LIBRARIES(${SETTING_ABOUT_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON}/ -lsetting-common) diff --git a/setting-about/include/setting-about-licences.h b/setting-about/include/setting-about-licences.h deleted file mode 100755 index 976f8c9..0000000 --- a/setting-about/include/setting-about-licences.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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 __SETTING_ABOUT_LICENCES_H__ -#define __SETTING_ABOUT_LICENCES_H__ - -#include - -static void setting_about_licences_click_back_cb(void *data, - Evas_Object *obj, - void *event_info); - -#endif /* __SETTING_ABOUT_LICENCES_H__ */ diff --git a/setting-about/include/setting-about-main.h b/setting-about/include/setting-about-main.h index 67a81c0..46c8d76 100755 --- a/setting-about/include/setting-about-main.h +++ b/setting-about/include/setting-about-main.h @@ -1,25 +1,30 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_ABOUT_MAIN_H__ #define __SETTING_ABOUT_MAIN_H__ #include +// #define SUPPORT_FOTA + #define SETTING_ABOUT_INFO_PATH "/etc/info.ini" #define SETTING_ABOUT_MACINFO_PATH "/opt/etc/.mac.info" #define SETTING_ABOUT_POWER_SUPPLY_PATH "/sys/class/power_supply" @@ -28,11 +33,11 @@ #define SETTING_ABOUT_NEVER_TURN_WIFI_ON_STR "Never Turn WI-FI ON" #define SETTING_ABOUT_DEVICE_INFO_STR "IDS_ST_BODY_DEVICE_INFO" -#define SETTING_ABOUT_DEVICE_NAME_STR "IDS_COM_POP_NAME" +#define SETTING_ABOUT_DEVICE_NAME_STR "IDS_ST_BODY_NAME" #define SETTING_ABOUT_MY_NUMBER_STR "IDS_ST_BODY_MY_NUMBER" #define SETTING_ABOUT_MODEL_STR "IDS_COM_BODY_FILEDETAIL_MODEL" #define SETTING_ABOUT_VERSION_STR "IDS_COM_POP_VERSION" -#define SETTING_ABOUT_BLUETOOTH_STR "Bluetooth" +#define SETTING_ABOUT_BLUETOOTH_STR KeyStr_Bluetooth #define SETTING_ABOUT_WIFI_STR _("IDS_ST_HEADER_WI_FI") #define SETTING_ABOUT_BATTERY_STR _("IDS_ST_BODY_BATTERY") #define SETTING_ABOUT_CPU_USAGE_STR _("IDS_ST_BODY_CPU_USAGE") @@ -40,26 +45,7 @@ #define SETTING_ABOUT_SLP_STR "SLP" #define SETTING_ABOUT_SLP_STR_LEN 3 -/** -* Do process when clicking '<-' button -* -* @param data -* @param obj -* @param event_info -*/ -static void setting_about_main_click_softkey_back_cb(void *data, - Evas_Object *obj, - void *event_info); - -/** -* Do process when clicking on some genlist item -* -* @param data -* @param obj -* @param event_info -*/ -static void setting_about_main_mouse_up_Gendial_list_cb(void *data, - Evas_Object *obj, - void *event_info); +void setting_about_main_get_bluetooth_address_string(char *str, int size); +void setting_about_main_get_wifi_mac_address_string(char *str, int size); #endif /* __SETTING_ABOUT_MAIN_H__ */ diff --git a/setting-about/include/setting-about.h b/setting-about/include/setting-about.h index c627a1e..8db521e 100755 --- a/setting-about/include/setting-about.h +++ b/setting-about/include/setting-about.h @@ -1,46 +1,51 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_ABOUT_H__ #define __SETTING_ABOUT_H__ #include -#include #include #include #include -#include -#include -#include #include +// #include #include #include +#include +#include +#include + #define MAX_DISPLAY_STR_LEN_ON_PHONE_INFO 256 -#define BT_MAC_LEN 14 #define SETTING_ABOUT_PROGRESSBAR_TIMEOUT 10 +//#define SETTING_ABOUT_MOBILE_AP_TURNED_OFF "Mobile hotspot will be turned off." #define SETTING_ABOUT_MOBILE_AP_TURNED_OFF "Wi-Fi hotspot will be turned off if Device name is changed." -#define SETTING_ABOUT_MY_NUMBERS_LEN 5 +#define SETTING_ABOUT_MY_NUMBERS_LEN 3 #define SETTING_ABOUT_WIFI_MAC_STR_LEN 17 +#define SETTING_ABOUT_DEFAULT_DEVICE_NAME "Redwood" typedef struct _SettingAboutUG SettingAboutUG; @@ -50,7 +55,11 @@ typedef struct _SettingAboutUG SettingAboutUG; * and the functions access app context. */ struct _SettingAboutUG { - struct ui_gadget *ug; + ui_gadget_h ug; + TapiHandle *handle; + bool tapi_responsed; + + setting_view *view_to_load; Elm_Genlist_Item_Class itc_1text; Elm_Genlist_Item_Class itc_1icon; @@ -66,27 +75,31 @@ struct _SettingAboutUG { Evas_Object *win_main_layout; Evas_Object *win_get; - struct ui_gadget *ug_loading; + ui_gadget_h ug_loading; Evas_Object *navi_bar; Evas_Object *ly_main; Evas_Object *genlsit; + Elm_Object_Item *navi_item; Ecore_Timer *update_timer; Setting_GenGroupItem_Data *item_dev_name; Setting_GenGroupItem_Data *item_data_cpu; Setting_GenGroupItem_Data *item_data_battery; + Setting_GenGroupItem_Data *item_data_bt; + Setting_GenGroupItem_Data *item_data_wifi; Evas_Object *popup; - Evas_Object *progress_bar; bool empty_flag; - char *my_numbers[SETTING_ABOUT_MY_NUMBERS_LEN]; + //char *my_numbers[SETTING_ABOUT_MY_NUMBERS_LEN]; + TelSimMsisdnList_t my_numbers; int my_number_sel_idx; bool popup_showed_flag; /** if popup has been showed, do not show again*/ +// MOBILE_AP_HANDLE mobile_ap_handle; }; extern setting_view setting_view_about_main; -extern setting_view setting_view_about_licences; -void setting_about_layout_ug_cb(struct ui_gadget *ug, enum ug_mode mode, +extern int setting_about_generate_genlist(void *data); +void setting_about_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv); #endif /* __SETTING_ABOUT_H__ */ diff --git a/setting-about/src/setting-about-licences.c b/setting-about/src/setting-about-licences.c deleted file mode 100644 index 504fbe9..0000000 --- a/setting-about/src/setting-about-licences.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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 -#include -//#define SETTING_OPEN_SOURCE_LICENSE_PATH "/opt/apps/org.tizen.setting/data/Open_Source_Announcement.txt" -//#define SETTING_OPEN_SOURCE_LICENSE_PATH "/opt/apps/org.tizen.setting/data/Open_Source_Announcement.htm" -#define SETTING_OPEN_SOURCE_LICENSE_PATH "/opt/apps/org.tizen.setting/data/Open_Source_Announcement.html" - -static int setting_about_licences_create(void *cb); -static int setting_about_licences_destroy(void *cb); -static int setting_about_licences_update(void *cb); -static int setting_about_licences_cleanup(void *cb); - -setting_view setting_view_about_licences = { - .create = setting_about_licences_create, - .destroy = setting_about_licences_destroy, - .update = setting_about_licences_update, - .cleanup = setting_about_licences_cleanup, -}; - -/* *************************************************** - * - *basic func - * - ***************************************************/ - -static Eina_Bool __web_on_idle(void *data) -{ - SETTING_TRACE_BEGIN; - SettingAboutUG *ad = (SettingAboutUG *) data; - if (ad->progress_bar) { - evas_object_del(ad->progress_bar); - ad->progress_bar = NULL; - } - return FALSE; -} -static int setting_about_licences_create(void *cb) -{ - SETTING_TRACE_BEGIN; - retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); - - SettingAboutUG *ad = (SettingAboutUG *) cb; - - Evas_Object *scroller; - ad->progress_bar = setting_create_popup_with_progressbar(ad, ad->win_get, - "pending_list", - NULL, NULL, NULL, 0); - - - Evas_Object *webview = elm_webview_add(ad->win_get); - //evas_object_color_set(webview, 255, 255, 0, 255); - //setting_dim_evas_object(webview, FALSE); - - Evas_Object *webkit = elm_webview_webkit_view_get(webview); - Evas_Object *main_frame = ewk_view_frame_main_get(webkit); - evas_object_color_set(main_frame, 255, 255, 0, 255); - ewk_view_setting_enable_frame_flattening_set(webkit, EINA_TRUE); - //ewk_view_uri_set(webkit, "http://www.google.com"); - ewk_view_uri_set(webkit, "file://"SETTING_OPEN_SOURCE_LICENSE_PATH); - - setting_push_layout_navi_bar_scroller(ad->win_main_layout, - _("IDS_ST_BODY_OPEN_SOURCE_LICENCES"), - _("IDS_COM_BODY_BACK"), - NULL, - setting_about_licences_click_back_cb, - NULL, ad, &scroller, - ad->navi_bar); - elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_FALSE); - elm_object_content_set(scroller, webview); - ecore_idler_add(__web_on_idle, ad); - setting_view_about_licences.is_create = 1; - - return SETTING_RETURN_SUCCESS; -} - -static int setting_about_licences_destroy(void *cb) -{ - /* error check */ - SETTING_TRACE_BEGIN; - retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); - if (setting_view_about_licences.is_create) - { - SettingAboutUG *ad = (SettingAboutUG *) cb; - - - if (ad->progress_bar) { - evas_object_del(ad->progress_bar); - ad->progress_bar = NULL; - } - elm_naviframe_item_pop(ad->navi_bar); - - setting_view_about_licences.is_create = 0; - } - return SETTING_RETURN_SUCCESS; -} - -static int setting_about_licences_update(void *cb) -{ - SETTING_TRACE_BEGIN; - return SETTING_RETURN_SUCCESS; -} - -static int setting_about_licences_cleanup(void *cb) -{ - SETTING_TRACE_BEGIN; - return setting_about_licences_destroy(cb); -} - -/* *************************************************** - * - *call back func - * - ***************************************************/ - -static void -setting_about_licences_click_back_cb(void *data, Evas_Object *obj, - void *event_info) -{ - /* error check */ - setting_retm_if(data == NULL, " Data parameter is NULL"); - - SettingAboutUG *ad = (SettingAboutUG *) data; - setting_view_change(&setting_view_about_licences, - &setting_view_about_main, ad); -} diff --git a/setting-about/src/setting-about-main.c b/setting-about/src/setting-about-main.c index 61bf262..5c00d7a 100755 --- a/setting-about/src/setting-about-main.c +++ b/setting-about/src/setting-about-main.c @@ -1,19 +1,24 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include #include #include #include @@ -22,8 +27,18 @@ #include #include + +#include + +#define DEVNAME_BLOCK_SPACE 0 +// #define SUPPORT_DIAG_USAGE + +/** @todo : need to handle unicode encoded input characters */ + #define MAX_DEVICE_NAME_LEN 24 -#define EMPTY_LIMITATION_STR "Name cannot be empty!" +#define EMPTY_LIMITATION_STR "IDS_ST_BODY_THE_NAME_FIELD_CANNOT_BE_EMPTY" +#define DIAGNOSTICS_USAGE_STR "Diagnostics and Usage" +#define SOFTWARE_UPDATE_STR "IDS_ST_MBODY_SOFTWARE_UPDATE" static int setting_about_main_create(void *cb); @@ -38,27 +53,57 @@ setting_view setting_view_about_main = { .cleanup = setting_about_main_cleanup, }; +static void __setting_about_main_exp_cb(void *data, Evas_Object *obj, void *event_info); + +/** +* Do process when clicking '<-' button +* +* @param data +* @param obj +* @param event_info +*/ +static void setting_about_main_click_softkey_back_cb(void *data, + Evas_Object *obj, + void *event_info); + +/** +* Do process when clicking on some genlist item +* +* @param data +* @param obj +* @param event_info +*/ +static void setting_about_main_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, + void *event_info); + static void __setting_about_main_mobile_ap_turn_off_ask_resp_cb(void *data, Evas_Object *obj, void *event_info); static void __setting_about_main_certificates_clicked(void *data); static void __setting_about_main_device_name_clicked(void *data, Evas_Object *obj); -static void __setting_about_main_exp_cb(void *data, Evas_Object *obj, void *event_info); +static void __setting_about_main_diagnostics_usage_clicked(void *data, Evas_Object *obj); + static void __setting_about_sub_list_rd_change(void *data, Evas_Object *obj, void *event_info); /* *************************************************** * *basic func * ***************************************************/ - -static void -__setting_about_device_name_changed_cb(void *data, Evas_Object *obj, - void *event_info) +static void __about_popup_rsp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SettingAboutUG *ad = data; + if (obj) { + evas_object_del(obj); + obj = NULL; + } + ad->popup = NULL; +} +static void __device_name_changed_cb(void *data, Evas_Object *obj) { retm_if(!data || !obj, "Data parameter is NULL"); //return if entry is not focused too - retm_if(!elm_object_focus_get(obj), "Entry is not focused"); Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; @@ -69,6 +114,32 @@ __setting_about_device_name_changed_cb(void *data, Evas_Object *obj, int entry_len = safeStrLen(entry_str); SETTING_TRACE("entry_str:[%s], lenght:%d", entry_str, entry_len); +#if DEVNAME_BLOCK_SPACE + //block 'Space' key + if (entry_len > 0 && NULL != strstr(entry_str, " ")) {//cancel the effect of input 'space character' + SETTING_TRACE("Cannot input the 'space' key or 'enter' key"); + + int i = 0; + int j = 0; + char *tmp = (char *)g_strdup(entry_str); + for (; tmp[i];) { + if (tmp[i] == ' ') { + for (j = i; tmp[j]; j++) { + tmp[j] = tmp[j + 1]; + } + } else { + i++; + } + } + G_FREE(list_item->sub_desc); + list_item->sub_desc = (char *)g_strdup(tmp); + G_FREE(tmp); + SETTING_TRACE("sub_desc:[%s]", list_item->sub_desc); + + elm_entry_entry_set(obj, list_item->sub_desc); + elm_entry_cursor_end_set(obj); + } +#endif //for genlist update G_FREE(list_item->sub_desc);//release first list_item->sub_desc = (char *)g_strdup(entry_str); @@ -83,8 +154,14 @@ __setting_about_device_name_changed_cb(void *data, Evas_Object *obj, Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); setting_disable_evas_object(back_btn); setting_dim_evas_object(back_btn, TRUE); - } + Evas_Object *top_r_btn = elm_object_item_part_content_get(navi_it, "title_right_btn"); + if(top_r_btn) + { + setting_disable_evas_object(top_r_btn); + setting_dim_evas_object(top_r_btn, TRUE); + } + } } } else { if (ad->empty_flag) @@ -96,39 +173,35 @@ __setting_about_device_name_changed_cb(void *data, Evas_Object *obj, Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); setting_enable_evas_object(back_btn); setting_undo_dim_evas_object(back_btn, TRUE); + + Evas_Object *top_r_btn = elm_object_item_part_content_get(navi_it, "title_right_btn"); + if(top_r_btn) + { + setting_enable_evas_object(top_r_btn); + setting_undo_dim_evas_object(top_r_btn, TRUE); + } } } } } -void setting_about_main_get_phonenumber(char *my_numbers[], int *my_numbers_len, int *selected_index) +static void +__setting_about_device_name_changed_cb(void *data, Evas_Object *obj, + void *event_info) { - SETTING_TRACE_BEGIN; - /* Currently only have one SIM card */ - TelSimSubscriberInfo_t subscriber; - TapiResult_t ret = 0; - ret = tel_get_sim_msisdn(&subscriber); - setting_retm_if(ret != TAPI_API_SUCCESS, "call tel_get_sim_msisdn failed"); - - SETTING_TRACE("num[%s]", subscriber.num); - *my_numbers_len = 0; - *selected_index = 0; - if(!isEmptyStr(subscriber.num)) { - my_numbers[0] = (char *)g_strdup(subscriber.num); - (*my_numbers_len)++; - } else { - SETTING_TRACE("subscriber.num is empty string"); - my_numbers[0] = NULL; - } + __device_name_changed_cb(data, obj); } -/* - Model Name: - - No ini: Unavailable - - Tizen @ target: TIZEN - - Tizen @ emul: SDK -*/ + +/** + * Model Name: + * - No ini: Unavailable + * - I9500 @ target: GT-I9500 + * - I9500 @ emul: SDK + * - SLP @ target: GT-SLP + * - SLP @ emul: SDK + */ void setting_about_main_get_phone_model_name(char* szStr, int nSize) { retm_if(szStr == NULL, "szStr parameter is NULL"); @@ -158,8 +231,10 @@ void setting_about_main_get_phone_model_name(char* szStr, int nSize) if (!strncmp(szEmul, "emul", 4)) { snprintf(szStr, nSize, "%s", "SDK"); } else { - if (!strncmp(szBin, "TIZEN", 5)) { - snprintf(szStr, nSize, "TIZEN REFERENCE"); + if (!strncmp(szBin, "I9500", 5)) { + snprintf(szStr, nSize, "GT-%s", szBin); + } else if (!strncmp(szBin, "SLP", 3)) { + snprintf(szStr, nSize, "GT-%s", szBin); } else { snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); } @@ -180,28 +255,32 @@ void setting_about_main_get_sw_version(char* szStr, int nSize) snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); } else { char* szBinVer = - g_strdup((char*)iniparser_getstr(dic, "Version:Version")); + g_strdup((char*)iniparser_getstr(dic, "Version:Build")); + char* szVerMaj = + g_strdup((char*)iniparser_getstr(dic, "Version:Major")); + char* szVerMin = + g_strdup((char*)iniparser_getstr(dic, "Version:Minor")); + if (szBinVer) { char* pPos = szBinVer; while(*pPos++) { if ('.' == *pPos) *pPos = '\0'; } - } else { + } + else { szBinVer = g_strdup(_("IDS_ST_HEADER_UNAVAILABLE")); } - char* szBinVerMaj = g_strdup((char*)iniparser_getstr(dic, "Version:Major")); - char* szBinVerMin = g_strdup((char*)iniparser_getstr(dic, "Version:Minor")); - - if (szBinVerMaj == NULL || szBinVerMaj == '\0' - || szBinVerMin == NULL || szBinVerMin == '\0') { - snprintf(szStr, nSize, "TIZEN %s", szBinVer); - } else { - snprintf(szStr, nSize, "TIZEN%s.%s %s", szBinVerMaj, szBinVerMin, szBinVer); + if (!szVerMaj) { + szVerMaj = g_strdup("-"); + } + if (!szVerMin) { + szVerMin = g_strdup("-"); } - if (szBinVer != NULL) G_FREE(szBinVer); - if (szBinVerMaj != NULL) G_FREE(szBinVerMaj); - if (szBinVerMin != NULL) G_FREE(szBinVerMin); + snprintf(szStr, nSize, "SLP%s.%s (%s)", szVerMaj, szVerMin, szBinVer); + G_FREE(szBinVer); + G_FREE(szVerMaj); + G_FREE(szVerMin); } if (dic) { @@ -217,27 +296,24 @@ void setting_about_main_get_wifi_mac_address_string(char *str, int size) FILE *p = fopen(SETTING_ABOUT_MACINFO_PATH, "r"); - - if (p) { - - fread(str, sizeof(char), SETTING_ABOUT_WIFI_MAC_STR_LEN, p); + int size = fread(str, sizeof(char), SETTING_ABOUT_WIFI_MAC_STR_LEN, p); + if (size != SETTING_ABOUT_WIFI_MAC_STR_LEN) { + SETTING_TRACE_ERROR("fail to call fread"); + } fclose(p); p = NULL; } else { perror("open failed!"); } - SETTING_TRACE_DEBUG("get_wifi_mac_address : %s", str); - if(safeStrLen(str) == 0) - snprintf(str, size, "%s (%s)", _("IDS_ST_HEADER_UNAVAILABLE"), _(SETTING_ABOUT_NEVER_TURN_WIFI_ON_STR)); - - - - + int wifi_state = VCONFKEY_WIFI_OFF; + vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_state); + if((safeStrLen(str) == 0) || (wifi_state == VCONFKEY_WIFI_OFF)) + snprintf(str, size, "%s (%s)", _("IDS_ST_HEADER_UNAVAILABLE"), _(SETTING_ABOUT_NEVER_TURN_WIFI_ON_STR)); } void setting_about_main_get_battery_string(char *str, int size) @@ -262,13 +338,13 @@ void setting_about_main_get_battery_string(char *str, int size) snprintf(str, size, "%d%s", val, "\%"); } else { SETTING_TRACE_ERROR("read file fail"); - snprintf(str, size, _("IDS_ST_HEADER_UNAVAILABLE")); + snprintf(str, size, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); } close(fd); } else { SETTING_TRACE_ERROR("open file fail"); - snprintf(str, size, _("IDS_ST_HEADER_UNAVAILABLE")); + snprintf(str, size, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); } } @@ -283,21 +359,18 @@ void setting_about_main_get_bluetooth_address_string(char *str, int size) /* for fixing BS of dbus signal */ bluetooth_register_callback(NULL, NULL); - ret = bluetooth_get_local_address(&local_address); + ret = bluetooth_get_local_address(&local_address); /* for fixing BS of dbus signal */ bluetooth_unregister_callback(); - if (ret < 0) - { - snprintf(str, size, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); - } - else - { + if (ret < 0) { + snprintf(str, size, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); + } else { snprintf(str, size, "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X", local_address.addr[0], local_address.addr[1], local_address.addr[2], local_address.addr[3], local_address.addr[4], local_address.addr[5]); - } + } SETTING_TRACE_DEBUG("bt address : %s", str); } @@ -414,8 +487,7 @@ static Eina_Bool __timer_update_cb(const void *data) int ret = __stat_get_cpuinfo(&usr, &sys); if (ret == -ENOENT) { SETTING_TRACE_ERROR("call __stat_get_cpuinfo fail"); - snprintf(str, sizeof(str), - _("IDS_ST_HEADER_UNAVAILABLE")); + snprintf(str, sizeof(str), "%s", _("IDS_ST_HEADER_UNAVAILABLE")); } else { snprintf(str, sizeof(str), "%.0f%s", usr + sys, "\%"); } @@ -427,6 +499,7 @@ static Eina_Bool __timer_update_cb(const void *data) if (ad->item_data_battery) { setting_about_main_get_battery_string(str, sizeof(str)); + /*SETTING_TRACE("str:%s", str);*/ ad->item_data_battery->sub_desc = (char *)g_strdup(str); elm_object_item_data_set(ad->item_data_battery->item, ad->item_data_battery); elm_genlist_item_update(ad->item_data_battery->item); @@ -444,19 +517,11 @@ __about_main_gl_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event) if (ad->item_dev_name) { Elm_Object_Item *selected_item = elm_genlist_at_xy_item_get(ad->genlsit, ev->output.x, ev->output.y, NULL); - if (ad->empty_flag && ad->item_dev_name->item != selected_item) { - setting_create_popup_without_btn(ad, ad->win_get,_(EMPTY_LIMITATION_STR), - NULL, NULL, POPUP_INTERVAL); + if (ad->item_dev_name->item == selected_item)//do nothing.. return; - } - else - { - //invoke elm_object_unfocus to trigger "unfocus" event. - elm_object_focus_set(ad->item_dev_name->eo_check, EINA_FALSE); - setting_hide_input_pannel_cb(ad->item_dev_name->eo_check); - } - } + elm_object_focus_set(ad->item_dev_name->eo_check, EINA_FALSE);//to make inputing words input + } } static void __entry_unfocus_cb(void *data, Evas_Object *obj, void *event_info) @@ -465,11 +530,10 @@ static void __entry_unfocus_cb(void *data, Evas_Object *obj, void *event_info) retm_if(!data || !obj, "Data parameter is NULL"); Evas_Object *entry_container = elm_object_parent_widget_get(obj); - if(entry_container) - { + if (entry_container) { + //whe entry unfocused, its guidetext will becomes "Input here" elm_object_part_text_set(entry_container, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); - - if(elm_entry_is_empty(obj)) + if (elm_entry_is_empty(obj)) elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm"); elm_object_signal_emit(entry_container, "elm,state,eraser,hide", "elm"); } @@ -481,6 +545,35 @@ static void __entry_unfocus_cb(void *data, Evas_Object *obj, void *event_info) //int len = safeStrLen(entry_str_utf8); SETTING_TRACE("To store \"%s\" into vconf[%s]", entry_str_utf8, VCONFKEY_SETAPPL_DEVICE_NAME_STR); + //ecore_idler_add(__check_on_idler, ad); + Setting_GenGroupItem_Data *item_dev_name = data; + SettingAboutUG *ad = item_dev_name->userdata; + __device_name_changed_cb(item_dev_name, item_dev_name->eo_check); + //after unfocus,need updating.. + elm_object_item_data_set(item_dev_name->item, item_dev_name); + elm_genlist_item_update(item_dev_name->item); + + + if(ad->navi_item + && elm_object_item_part_content_get(ad->navi_item, "title_right_btn")) { + Evas_Object *btn = elm_object_item_part_content_unset(ad->navi_item, "title_right_btn"); + evas_object_del(btn); + } + setting_hide_input_pannel_cb(item_dev_name->eo_check); + if (item_dev_name) { + if (ad->empty_flag) { + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _(EMPTY_LIMITATION_STR), + __about_popup_rsp_cb, POPUP_INTERVAL, FALSE, FALSE); + return; + } else { + } + } + + if (0 != vconf_set_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR, entry_str_utf8)) { SETTING_TRACE_ERROR("Set vconf[%s] failed", VCONFKEY_SETAPPL_DEVICE_NAME_STR); @@ -506,8 +599,12 @@ static void __entry_key_down_cb(void *data, Evas *e, Evas_Object *obj, void *eve } else { - setting_create_popup_without_btn(ad, ad->win_get,_(EMPTY_LIMITATION_STR), - NULL, NULL, POPUP_INTERVAL); + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _(EMPTY_LIMITATION_STR), + __about_popup_rsp_cb, POPUP_INTERVAL, FALSE, FALSE); } } } @@ -524,46 +621,22 @@ static Eina_Bool __add_event_on_idler(void *data) return ECORE_CALLBACK_CANCEL; } -static int setting_about_main_create(void *cb) + +int setting_about_generate_genlist(void *data) { SETTING_TRACE_BEGIN; /* error check */ - retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); - - SettingAboutUG *ad = (SettingAboutUG *) cb; + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); - Evas_Object *scroller = elm_genlist_add(ad->win_main_layout); - retvm_if(scroller == NULL, SETTING_DRAW_ERR_FAIL_SCROLLER, - "Cannot set scroller object as contento of layout"); - elm_genlist_clear(scroller); /* first to clear list */ - - /* Enabling illume notification property for window */ - elm_win_conformant_set(ad->win_main_layout, 1); - Evas_Object *conformant = elm_conformant_add(ad->win_main_layout); - elm_object_style_set(conformant, "internal_layout"); /* By Kollus. 2011-01-04 */ - evas_object_show(conformant); - elm_object_content_set(conformant, scroller); - ad->genlsit = scroller; - - ad->ly_main = - setting_create_layout_navi_bar(ad->win_main_layout, ad->win_get, - _(KeyStr_AboutPhone), - _("IDS_COM_BODY_BACK"), NULL, NULL, - setting_about_main_click_softkey_back_cb, - NULL, NULL, ad, conformant, - &ad->navi_bar, NULL); - - evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_UP, - __about_main_gl_mouse_up, ad); + SettingAboutUG *ad = (SettingAboutUG *) data; + Evas_Object *scroller = ad->genlsit; Elm_Object_Item *item = NULL; Setting_GenGroupItem_Data *item_data = NULL; char str[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, }; - (void)setting_create_Gendial_field_titleItem(scroller, &(ad->itc_group_item), SETTING_ABOUT_DEVICE_INFO_STR, NULL); - /* Device name */ char *name_value = vconf_get_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR); char *pa_sub_desc = elm_entry_utf8_to_markup(name_value); @@ -582,46 +655,56 @@ static int setting_about_main_create(void *cb) } } + // [UI] Device name - ad->item_dev_name = - setting_create_Gendial_field_def(scroller, &(ad->itc_1icon), - setting_about_main_mouse_up_Gendial_list_cb, - ad, SWALLOW_Type_LAYOUT_ENTRY, - NULL, NULL, 0, SETTING_ABOUT_DEVICE_NAME_STR, pa_sub_desc, - __setting_about_device_name_changed_cb); - if (ad->item_dev_name) { - ad->item_dev_name->userdata = ad; - ad->item_dev_name->isSinglelineFlag = 1; - ad->item_dev_name->stop_change_cb = __entry_unfocus_cb; - ad->item_dev_name->limit_filter_data = calloc(1, sizeof(Elm_Entry_Filter_Accept_Set)); - - if (ad->item_dev_name->limit_filter_data) { - //max byte len is 31 not 31+1 - ad->item_dev_name->limit_filter_data->max_byte_count = MAX_DEVICE_NAME_LEN; - ad->item_dev_name->win_main = ad->win_get; - } - ad->item_dev_name->input_panel_disable_flag = EINA_TRUE; + char *app_name = NULL; + int ret_get_app_name = app_manager_get_app_name("com.samsung.oma-dm-ui", &app_name); + if (ret_get_app_name == APP_MANAGER_ERROR_INVALID_PACKAGE ) + { + SETTING_TRACE(">>>>>>>>>>>>>>>>>> UNINSTALLED PACKAGE"); + ad->item_dev_name = NULL; } else { - SETTING_TRACE_ERROR("ad->item_dev_name is NULL"); + + ad->item_dev_name = + setting_create_Gendial_field_def(scroller, &(ad->itc_1icon), + setting_about_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, SETTING_ABOUT_DEVICE_NAME_STR, pa_sub_desc, + __setting_about_device_name_changed_cb); + if (ad->item_dev_name) { + ad->item_dev_name->userdata = ad; + ad->item_dev_name->isSinglelineFlag = 1; + ad->item_dev_name->stop_change_cb = __entry_unfocus_cb; + ad->item_dev_name->limit_filter_data = calloc(1, sizeof(Elm_Entry_Filter_Accept_Set)); + + if (ad->item_dev_name->limit_filter_data) { + //max byte len is 31 not 31+1 + //ad->item_dev_name->limit_filter_data->max_byte_count = MAX_DEVICE_NAME_LEN + OFFESET_ENTRY_FILTER; + ad->item_dev_name->limit_filter_data->max_byte_count = MAX_DEVICE_NAME_LEN; + ad->item_dev_name->win_main = ad->win_get; + } + //ad->item_dev_name->input_type = ELM_INPUT_PANEL_LAYOUT_NUMBER; + ad->item_dev_name->input_panel_disable_flag = EINA_TRUE; + } else { + SETTING_TRACE_ERROR("ad->item_dev_name is NULL"); + } + FREE(pa_sub_desc); } - FREE(pa_sub_desc); - /* My number */ - int my_numbers_len = 0; - setting_about_main_get_phonenumber(ad->my_numbers, &my_numbers_len, &ad->my_number_sel_idx); - if (my_numbers_len == 1) { + // [UI] My number + if (ad->my_numbers.count == 1) { item_data = setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), setting_about_main_mouse_up_Gendial_list_cb, ad, SWALLOW_Type_INVALID, NULL, NULL, 0, SETTING_ABOUT_MY_NUMBER_STR, - ad->my_numbers[0], NULL); + ad->my_numbers.list[0].name, NULL); if (item_data) { elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); } else { SETTING_TRACE_ERROR("item_data is NULL"); } - } else if (my_numbers_len > 1){ + } else if (ad->my_numbers.count > 1){ setting_enable_expandable_genlist(scroller, ad, __setting_about_main_exp_cb, NULL); item_data = setting_create_Gendial_exp_parent_field(scroller, @@ -629,12 +712,13 @@ static int setting_about_main_create(void *cb) NULL, NULL, SWALLOW_Type_INVALID, SETTING_ABOUT_MY_NUMBER_STR, - ad->my_numbers[ad->my_number_sel_idx]); + ad->my_numbers.list[ad->my_number_sel_idx].name); } else { SETTING_TRACE_ERROR("don't have my number"); } + // [UI] Phone model memset(str, 0x00, sizeof(str)); setting_about_main_get_phone_model_name(str, sizeof(str)); item_data = @@ -647,6 +731,7 @@ static int setting_about_main_create(void *cb) SETTING_TRACE_ERROR("item_data is NULL"); } + // [UI] SW version memset(str, 0x00, sizeof(str)); setting_about_main_get_sw_version(str, sizeof(str)); item_data = @@ -659,32 +744,38 @@ static int setting_about_main_create(void *cb) SETTING_TRACE_ERROR("item_data is NULL"); } + // [UI] Bluetooth address if ( ! isEmulBin()) { // requested by DI Kim due to BT BS on 11/26 memset(str, 0x00, sizeof(str)); setting_about_main_get_bluetooth_address_string(str, sizeof(str)); - item_data = + ad->item_data_bt = setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL, - NULL, SWALLOW_Type_INVALID, NULL, - NULL, 0, SETTING_ABOUT_BLUETOOTH_STR, str, NULL); - if (item_data) { - elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + NULL, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_ABOUT_BLUETOOTH_STR, str, NULL); + if (ad->item_data_bt) { + elm_genlist_item_select_mode_set(ad->item_data_bt->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); } else { SETTING_TRACE_ERROR("item_data is NULL"); + } } -} + + // [UI] MAC address memset(str, 0x00, sizeof(str)); setting_about_main_get_wifi_mac_address_string(str, sizeof(str)); - item_data = + SETTING_TRACE_DEBUG("[about main] get_wifi_mac_address : %s", str); + + ad->item_data_wifi = setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL, NULL, SWALLOW_Type_INVALID, NULL, NULL, 0, SETTING_ABOUT_WIFI_STR, str, NULL); - if (item_data) { - elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + if (ad->item_data_wifi) { + elm_genlist_item_select_mode_set(ad->item_data_wifi->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); } else { SETTING_TRACE_ERROR("item_data is NULL"); } + // [UI] Battery memset(str, 0x00, sizeof(str)); setting_about_main_get_battery_string(str, sizeof(str)); item_data = @@ -698,12 +789,13 @@ static int setting_about_main_create(void *cb) SETTING_TRACE_ERROR("item_data is NULL"); } + // [UI] CPU Info memset(str, 0x00, sizeof(str)); float usr, sys; int ret = __stat_get_cpuinfo(&usr, &sys); if (ret == -ENOENT) { SETTING_TRACE_ERROR("call __stat_get_cpuinfo fail"); - snprintf(str, sizeof(str), _("IDS_ST_HEADER_UNAVAILABLE")); + snprintf(str, sizeof(str), "%s", _("IDS_ST_HEADER_UNAVAILABLE")); } else { snprintf(str, sizeof(str), "%.0f%s", usr + sys, "\%"); } @@ -718,29 +810,103 @@ static int setting_about_main_create(void *cb) SETTING_TRACE_ERROR("item_data is NULL"); } + // [UI] separator item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); +#ifdef SUPPORT_DIAG_USAGE + // [UI] Diagnostics and Usage setting_create_Gendial_field_def(scroller, &(ad->itc_1text), setting_about_main_mouse_up_Gendial_list_cb, ad, SWALLOW_Type_INVALID, NULL, NULL, - 0, "IDS_ST_BODY_OPEN_SOURCE_LICENCES", + 0, DIAGNOSTICS_USAGE_STR, NULL, NULL); - // implementation is in progress. +#endif + +#ifdef SUPPORT_FOTA + // [UI] Software update setting_create_Gendial_field_def(scroller, &(ad->itc_1text), setting_about_main_mouse_up_Gendial_list_cb, ad, SWALLOW_Type_INVALID, NULL, NULL, - 0, "IDS_COM_BODY_CERTIFICATES", NULL, NULL); + 0, SOFTWARE_UPDATE_STR, + NULL, NULL); +#endif + // [UI] Certificates + // implementation is in progress. + if (is_ug_installed_by_ug_args("setting-manage-applications-efl")) + { + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_about_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, "IDS_COM_BODY_CERTIFICATES", NULL, NULL); + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } + ad->update_timer = ecore_timer_add(2, (Ecore_Task_Cb) __timer_update_cb, ad); ecore_idler_add(__add_event_on_idler, ad); - setting_view_about_main.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_about_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingAboutUG *ad = (SettingAboutUG *) cb; + + Evas_Object *scroller = elm_genlist_add(ad->win_main_layout); + retvm_if(scroller == NULL, SETTING_DRAW_ERR_FAIL_SCROLLER, + "Cannot set scroller object as contento of layout"); + elm_object_style_set(scroller, "dialogue"); + elm_genlist_clear(scroller); /* first to clear list */ + + /* Enabling illume notification property for window */ + elm_win_conformant_set(ad->win_main_layout, 1); + Evas_Object *conformant = elm_conformant_add(ad->win_main_layout); + elm_object_style_set(conformant, "internal_layout"); /* By Kollus. 2011-01-04 */ + evas_object_show(conformant); + elm_object_content_set(conformant, scroller); + ad->genlsit = scroller; + + ad->ly_main = + setting_create_layout_navi_bar(ad->win_main_layout, ad->win_get, + _(KeyStr_AboutPhone), + _("IDS_COM_BODY_BACK"), NULL, NULL, + setting_about_main_click_softkey_back_cb, + NULL, NULL, ad, conformant, + &ad->navi_bar, NULL); + + evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_UP, + __about_main_gl_mouse_up, ad); + + ad->navi_item = elm_naviframe_top_item_get(ad->navi_bar); + + int err = 0; + int value; + setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + if (VCONFKEY_TELEPHONY_SIM_INSERTED != value) + { + setting_about_generate_genlist((void *)ad); + } else { + if (ad->handle && !ad->tapi_responsed) {//not responsed yet + //SETTING_TRACE(">>> IF THERE'S SIM CARD, THIS LINE SHOULD NOT WORK"); + } else {//already responsed + // do nothing + } + } + + setting_view_about_main.is_create = 1; + SETTING_TRACE_END; return SETTING_RETURN_SUCCESS; } @@ -760,10 +926,6 @@ static int setting_about_main_destroy(void *cb) evas_object_del(ad->popup); ad->popup = NULL; } - if (ad->progress_bar) { - evas_object_del(ad->progress_bar); - ad->progress_bar = NULL; - } if (ad->ly_main != NULL) { evas_object_del(ad->ly_main); @@ -791,6 +953,16 @@ static int setting_about_main_update(void *cb) static int setting_about_main_cleanup(void *cb) { + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingAboutUG *ad = (SettingAboutUG *) cb; + + if (ad->ly_main != NULL) { + /* evas_object_hide(ad->ly_main); */ + } + return SETTING_RETURN_SUCCESS; } @@ -816,8 +988,12 @@ setting_about_main_click_softkey_back_cb(void *data, Evas_Object *obj, SettingAboutUG *ad = (SettingAboutUG *) data; if (ad->empty_flag) { - setting_create_popup_without_btn(ad, ad->win_get,_(EMPTY_LIMITATION_STR), - NULL, NULL, POPUP_INTERVAL); + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _(EMPTY_LIMITATION_STR), + __about_popup_rsp_cb, POPUP_INTERVAL, FALSE, FALSE); if (ad->item_dev_name) { elm_object_focus_set(ad->item_dev_name->eo_check, EINA_TRUE); } @@ -862,16 +1038,31 @@ setting_about_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); if (!safeStrCmp("IDS_ST_BODY_OPEN_SOURCE_LICENCES", list_item->keyStr)) { - setting_view_change(&setting_view_about_main, &setting_view_about_licences, data); + //setting_view_change(&setting_view_about_main, &setting_view_about_licences, data); } else if (!safeStrCmp("IDS_COM_BODY_CERTIFICATES", list_item->keyStr)) { __setting_about_main_certificates_clicked(data); } else if (!safeStrCmp(SETTING_ABOUT_DEVICE_NAME_STR, list_item->keyStr)) { __setting_about_main_device_name_clicked(data, list_item->eo_check); + } else if (!safeStrCmp(DIAGNOSTICS_USAGE_STR, list_item->keyStr)) { + __setting_about_main_diagnostics_usage_clicked(data, list_item->eo_check); + } else if (!safeStrCmp(SOFTWARE_UPDATE_STR, list_item->keyStr)) { +#ifdef SUPPORT_FOTA + if(aul_app_is_running("com.samsung.oma-dm-ui")) + { + SETTING_TRACE_DEBUG("oma-dm-ui is already launched. "); + aul_open_app("com.samsung.oma-dm-ui"); + } + else + { + SETTING_TRACE_DEBUG("oma-dm-ui will be launched. "); + aul_launch_app("com.samsung.oma-dm-ui", NULL); + } +#endif } } -static void __destroy_certificates_ug_cb(struct ui_gadget *ug, void *priv) +static void __destroy_certificates_ug_cb(ui_gadget_h ug, void *priv) { SETTING_TRACE_BEGIN; @@ -903,7 +1094,7 @@ static void __setting_about_main_certificates_clicked(void *data) cbs->priv = (void *)ad; ad->ug_loading = - ug_create(ad->ug, "setting-manage-applications-efl", UG_MODE_FULLVIEW, NULL, cbs); + ug_create(ad->ug, "setting-manage-certificates-efl", UG_MODE_FULLVIEW, NULL, cbs); if (NULL == ad->ug_loading) { /* error handling */ SETTING_TRACE_ERROR("NULL == ad->ug_loading"); @@ -911,6 +1102,55 @@ static void __setting_about_main_certificates_clicked(void *data) FREE(cbs); } +static void __top_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + SettingAboutUG *ad = (SettingAboutUG *) data; + + if (ad->item_dev_name) + setting_hide_input_pannel_cb(ad->item_dev_name->eo_check); + + SETTING_TRACE_END; +} + +static void _input_panel_event_cb(void *data, Ecore_IMF_Context *ctx, int value) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + retm_if(ctx == NULL, "obj parameter is NULL"); + + SettingAboutUG *ad = (SettingAboutUG *)data; + + if(value == ECORE_IMF_INPUT_PANEL_STATE_SHOW) + { + SETTING_TRACE("value == ECORE_IMF_INPUT_PANEL_STATE_SHOW"); + if(ad->navi_item && !elm_object_item_part_content_get(ad->navi_item, "title_right_btn")) + { + Evas_Object *r_button = setting_create_button(ad->navi_bar, + dgettext("sys_string", "IDS_COM_BODY_BACK"), + NAVI_BACK_BUTTON_STYLE, + __top_back_cb, + ad); + elm_object_item_part_content_set(ad->navi_item, "title_right_btn", r_button); + } + } + else if(value == ECORE_IMF_INPUT_PANEL_STATE_HIDE) + { + SETTING_TRACE("value == ECORE_IMF_INPUT_PANEL_STATE_HIDE"); + if(ad->navi_item && elm_object_item_part_content_get(ad->navi_item, "title_right_btn")) { + Evas_Object *btn = elm_object_item_part_content_unset(ad->navi_item, "title_right_btn"); + evas_object_del(btn); + } + + if (ad->item_dev_name) { + elm_object_focus_set(ad->item_dev_name->eo_check, EINA_FALSE); + } + } +} static void __setting_about_main_device_name_clicked(void *data, Evas_Object *obj) { @@ -922,7 +1162,7 @@ static void __setting_about_main_device_name_clicked(void *data, Evas_Object *ob int mobile_ap_status = VCONFKEY_MOBILE_HOTSPOT_MODE_NONE; int err = -1; int ret = setting_get_int_slp_key(INT_SLP_SETTING_MOBILE_AP_STATUS, &mobile_ap_status, &err); - //setting_retm_if(ret == SETTING_RETURN_FAIL, "Get vconf failed"); + setting_retm_if(ret == SETTING_RETURN_FAIL, "Get vconf failed"); if (!elm_object_focus_get(obj)) { elm_object_focus_set(obj, EINA_TRUE); @@ -934,70 +1174,69 @@ static void __setting_about_main_device_name_clicked(void *data, Evas_Object *ob ad->popup = NULL; } ad->popup = setting_create_popup_with_btn(ad, ad->win_get, - _(SETTING_ABOUT_MOBILE_AP_TURNED_OFF), - NULL, __setting_about_main_mobile_ap_turn_off_ask_resp_cb, 0, + NULL, _(SETTING_ABOUT_MOBILE_AP_TURNED_OFF), + __setting_about_main_mobile_ap_turn_off_ask_resp_cb, 0, 1, _("IDS_COM_SK_OK")); } else { Ecore_IMF_Context *imf_context = (Ecore_IMF_Context *)elm_entry_imf_context_get(obj); setting_retm_if(imf_context == NULL, "imf_context is NULL"); + ecore_imf_context_input_panel_event_callback_add(imf_context, ECORE_IMF_INPUT_PANEL_STATE_EVENT, _input_panel_event_cb, ad); ecore_imf_context_input_panel_show(imf_context); } } +static void __destroy_diagnostics_usage_ug_cb(ui_gadget_h ug, void *priv) +{ + SETTING_TRACE_BEGIN; + /* restore the '<-' button on the navigate bar */ + ret_if(!priv); + SettingAboutUG *ad = (SettingAboutUG *) priv; /* ad is point to priv */ + if (ug) { + ug_destroy(ug); + ad->ug_loading = NULL; + } + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); + ret_if(!navi_it); + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + if (back_btn != NULL) { + elm_object_style_set(back_btn, NAVI_BACK_BUTTON_STYLE); /* take into effect */ + } +} +static void __setting_about_main_diagnostics_usage_clicked(void *data, Evas_Object *obj) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + SettingAboutUG *ad = (SettingAboutUG *)data; + // create UG + if (!ad) + return; /* do nothing if ad is NULL */ + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + if (!cbs) { + return; + } + cbs->layout_cb = setting_about_layout_ug_cb; + cbs->result_cb = NULL; + cbs->destroy_cb = __destroy_diagnostics_usage_ug_cb; + cbs->priv = (void *)ad; + ad->ug_loading = + ug_create(ad->ug, "setting-crash-efl", UG_MODE_FULLVIEW, NULL, cbs); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + if (NULL == ad->ug_loading) { /* error handling */ + SETTING_TRACE_ERROR("NULL == ad->ug_loading"); + setting_create_simple_popup(ad, ad->win_get, NULL, _(UNSUPPORTED_FUNCTION)); + } + FREE(cbs); +} static void __setting_about_main_mobile_ap_turn_off_ask_resp_cb(void *data, Evas_Object *obj, @@ -1010,11 +1249,14 @@ static void __setting_about_main_mobile_ap_turn_off_ask_resp_cb(void *data, if (POPUP_RESPONSE_OK == response_type) { ad->popup_showed_flag = TRUE; - Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(ad->item_dev_name->eo_check); - setting_retm_if(imf_context == NULL, "imf_context is NULL"); - ecore_imf_context_input_panel_show(imf_context); + + if (ad->item_dev_name) { + Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(ad->item_dev_name->eo_check); + setting_retm_if(imf_context == NULL, "imf_context is NULL"); + ecore_imf_context_input_panel_show(imf_context); + } } - + if (ad->popup) { evas_object_del(ad->popup); @@ -1038,7 +1280,7 @@ static void __setting_about_main_exp_cb(void *data, Evas_Object *obj, void *even int i = 0; Setting_GenGroupItem_Data *item_data = NULL; for(; i < SETTING_ABOUT_MY_NUMBERS_LEN; i++) { - if (ad->my_numbers[i] == NULL) { + if (ad->my_numbers.list[i].name == NULL) { break; } @@ -1047,7 +1289,7 @@ static void __setting_about_main_exp_cb(void *data, Evas_Object *obj, void *even NULL, NULL, parentItem, SWALLOW_Type_1RADIO, rgd, i, - ad->my_numbers[i], __setting_about_sub_list_rd_change); + ad->my_numbers.list[i].name, __setting_about_sub_list_rd_change); if (item_data) { item_data->userdata = ad; elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); diff --git a/setting-about/src/setting-about.c b/setting-about/src/setting-about.c index c0d0463..b0551ad 100755 --- a/setting-about/src/setting-about.c +++ b/setting-about/src/setting-about.c @@ -1,28 +1,56 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +/** + *@defgroup setting-about + *UG creation code for setting-about + * + * - Device Info + * - Name + * - My number + * - Model + * - Version + * - Bluetooth + * - Wi-Fi + * - Battery + * - CPU usage + * - Diagnostics and Usage + * - Software update + * - Certificates + */ #include +#include + #ifndef UG_MODULE_API #define UG_MODULE_API __attribute__ ((visibility("default"))) #endif /** - * Event process when the sizeof UG view changes - */ +* Event process when the sizeof UG view changes +* +* @param data +* @param e +* @param obj +* @param event_info +*/ static void setting_about_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info) { @@ -31,14 +59,20 @@ static void setting_about_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, } /** - * on_create function of the UG - */ -static void *setting_about_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, - bundle *data, void *priv) +* on_create function of the UG +* +* @param ug +* @param mode +* @param data +* @param priv +* +* @return +*/ +static void *setting_about_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) { SETTING_TRACE_BEGIN; - setting_retvm_if((NULL == ug - || NULL == priv), NULL, "NULL == ug || NULL == priv"); + setting_retvm_if((NULL == priv), NULL, "NULL == priv"); SettingAboutUG *aboutUG = priv; aboutUG->ug = ug; @@ -53,9 +87,7 @@ static void *setting_about_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, /* register view node table */ setting_view_node_table_intialize(); setting_view_node_table_register(&setting_view_about_main, NULL); - - setting_view_node_table_register(&setting_view_about_licences, - &setting_view_about_main); + /* setting_view_node_table_register(&setting_view_about_about_view, &setting_view_about_main); */ /* creating a view. */ @@ -86,36 +118,61 @@ static void *setting_about_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, return aboutUG->ly_main; } -static void setting_about_ug_on_start(struct ui_gadget *ug, bundle *data, +static void setting_about_ug_on_start(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_about_ug_on_pause(struct ui_gadget *ug, bundle *data, +static void setting_about_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_about_ug_on_resume(struct ui_gadget *ug, bundle *data, +static void setting_about_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) { + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingAboutUG *aboutUG = priv; + + char str[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, }; + + memset(str, 0x00, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO); + if(aboutUG->item_data_wifi) + { + setting_about_main_get_wifi_mac_address_string(str, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO); + aboutUG->item_data_wifi->sub_desc = (char*)g_strdup(str); + elm_object_item_data_set(aboutUG->item_data_wifi->item, aboutUG->item_data_wifi); + elm_genlist_item_update(aboutUG->item_data_wifi->item); + } + memset(str, 0x00, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO); + if(aboutUG->item_data_bt) + { + setting_about_main_get_bluetooth_address_string(str, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO); + aboutUG->item_data_bt->sub_desc = (char*)g_strdup(str); + elm_object_item_data_set(aboutUG->item_data_bt->item, aboutUG->item_data_bt); + elm_genlist_item_update(aboutUG->item_data_bt->item); + } } /** - * on_destroy function of the UG - */ -static void setting_about_ug_on_destroy(struct ui_gadget *ug, bundle *data, +* on_destroy function of the UG +* +* @param ug +* @param data +* @param priv +*/ +static void setting_about_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) { SETTING_TRACE_BEGIN; - setting_retm_if((!ug || !priv), "!ug || !priv"); + setting_retm_if((!priv), "!priv"); SettingAboutUG *aboutUG = priv; evas_object_event_callback_del(aboutUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_about_ug_cb_resize); /* fix flash issue for gallery */ aboutUG->ug = ug; + /* delete the allocated objects. */ - setting_view_destroy(&setting_view_about_licences, - aboutUG); setting_view_destroy(&setting_view_about_main, aboutUG); if (NULL != ug_get_layout(aboutUG->ug)) { evas_object_hide((Evas_Object *) ug_get_layout(aboutUG->ug)); @@ -125,14 +182,14 @@ static void setting_about_ug_on_destroy(struct ui_gadget *ug, bundle *data, SETTING_TRACE_END; } -static void setting_about_ug_on_message(struct ui_gadget *ug, bundle *msg, - bundle *data, void *priv) +static void setting_about_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) { SETTING_TRACE_BEGIN; } -static void setting_about_ug_on_event(struct ui_gadget *ug, enum ug_event event, - bundle *data, void *priv) +static void setting_about_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) { SETTING_TRACE_BEGIN; switch (event) { @@ -157,9 +214,9 @@ static void setting_about_ug_on_event(struct ui_gadget *ug, enum ug_event event, } } -static void setting_about_ug_on_key_event(struct ui_gadget *ug, +static void setting_about_ug_on_key_event(ui_gadget_h ug, enum ug_key_event event, - bundle *data, void *priv) + service_h service, void *priv) { SETTING_TRACE_BEGIN; SettingAboutUG *ad = (SettingAboutUG *) priv; @@ -183,6 +240,32 @@ static void setting_about_ug_on_key_event(struct ui_gadget *ug, } } +static void __on_sim_get_msisdn(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + ret_if(!user_data || !data); + SettingAboutUG *ad = user_data; + TelSimAccessResult_t access_rt = result; + //TelSimMsisdnList_t *list = data; + int i =0; + + SETTING_TRACE("access_rt[%d]", access_rt); + memcpy(&(ad->my_numbers), data, sizeof(TelSimMsisdnList_t)); + SETTING_TRACE("ad->my_numbers.count[%d]", ad->my_numbers.count); + for (i = 0; i < ad->my_numbers.count && i < SETTING_ABOUT_MY_NUMBERS_LEN; i++) + { + SETTING_TRACE("index[%d] - name[%s], num[%s]", i, ad->my_numbers.list[i].name, ad->my_numbers.list[i].num); + } + + ad->my_number_sel_idx = 0;//default is 0, need improving + ad->tapi_responsed = TRUE; + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + setting_about_generate_genlist((void *)ad); +} + UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) { SETTING_TRACE_BEGIN; @@ -200,17 +283,39 @@ UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) ops->priv = aboutUG; ops->opt = UG_OPT_INDICATOR_ENABLE; + int err = 0; + int value; + setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + if (VCONFKEY_TELEPHONY_SIM_INSERTED == value)//There is a sim card, so do display to user + { + aboutUG->handle = tel_init(NULL); + if (aboutUG->handle) { + SETTING_TRACE("tel_init sucessed, and there is at least one sim card, now trying to get misidns"); + if (tel_get_sim_msisdn(aboutUG->handle, __on_sim_get_msisdn, aboutUG) == TAPI_API_SUCCESS) { + SETTING_TRACE("tel_get_sim_msisdn sent"); + } + + } + } + else + { + SETTING_TRACE_DEBUG("There is no sim card, so skip getting misidns"); + } return 0; } UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) { SETTING_TRACE_BEGIN; - struct SettingAboutUG *aboutUG; + SettingAboutUG *aboutUG; setting_retm_if(!ops, "ops == NULL"); aboutUG = ops->priv; if (aboutUG) { + if (aboutUG->handle + && tel_deinit(aboutUG->handle) == TAPI_API_SUCCESS) { + SETTING_TRACE("tel_deinit sucessed"); + } FREE(aboutUG); } } @@ -220,13 +325,13 @@ UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) **general func ** ****************************************************/ -void setting_about_layout_ug_cb(struct ui_gadget *ug, enum ug_mode mode, +void setting_about_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) { SettingAboutUG *ad = (SettingAboutUG *) priv; Evas_Object *base; - if (!ug || !priv) + if (!priv) return; SETTING_TRACE_BEGIN; @@ -254,13 +359,13 @@ void setting_about_layout_ug_cb(struct ui_gadget *ug, enum ug_mode mode, * @param[in] data * @param[in] priv */ -UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) { SETTING_TRACE_BEGIN; #if SUPPORT_RUN_SYSTEM_COMMAND - return excuteCmd(SETTING_POSTINST_FILE, 1, "about"); + return excuteCmd(SETTING_POSTINST_FILE, 1, "about"); #else - return vconf_set_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR, "Tizen"); + return vconf_set_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR, SETTING_ABOUT_DEFAULT_DEVICE_NAME); #endif } diff --git a/setting-common/CMakeLists.txt b/setting-common/CMakeLists.txt index e74b0eb..2d2dd14 100755 --- a/setting-common/CMakeLists.txt +++ b/setting-common/CMakeLists.txt @@ -19,7 +19,7 @@ PROJECT(${LIB_SETTING_COMMON}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs_common_data REQUIRED appcore-efl elementary vconf openssl evas ecore ecore-imf json-glib-1.0 edje iniparser glib-2.0) +pkg_check_modules(pkgs_common_data REQUIRED appcore-efl elementary vconf openssl evas ecore ecore-imf json-glib-1.0 edje iniparser glib-2.0 libxml-2.0 ui-gadget-1 capi-appfw-application) FOREACH(flag ${pkgs_common_data_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") @@ -44,6 +44,10 @@ ADD_LIBRARY(${LIB_SETTING_COMMON} SHARED ./src/setting-common-resource.c ./src/setting-common-view.c ./src/setting-common-draw-widget.c + ./src/setting-common-draw-searchbar.c + ./src/setting-common-draw-popup.c + ./src/setting-common-draw-naviframe.c + ./src/setting-common-draw-genlist.c ./src/setting-common-general-func.c ./src/setting-cfg.c ) diff --git a/setting-common/include/setting-cfg.h b/setting-common/include/setting-cfg.h index 7024da4..b8643fe 100755 --- a/setting-common/include/setting-cfg.h +++ b/setting-common/include/setting-cfg.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ /** *@defgroup setting-cfg *configuration file management. @@ -27,10 +30,9 @@ #include #include #include -#include +#include /*****/ - typedef enum _Cfg_Item_Type { Cfg_Item_Pos_Uninstall = -1, Cfg_Item_Pos_Level0 = 0, @@ -63,8 +65,13 @@ typedef struct { int click_times; } Setting_Cfg_Node_T; + +int setting_cfg_create(void); + void setting_cfg_print(void); +char* setting_cfg_get_path(); + int setting_cfg_init(void); void setting_cfg_exit(void); @@ -123,7 +130,7 @@ void setting_cfg_remove_downloaded_app(char *keyname); extern char *get_ug_path_from_ug_args(void *data); -extern bundle *get_bundle_from_ug_args(void *data); - +extern service_h get_bundle_from_ug_args(void *data); +extern bool is_ug_installed_by_ug_args(void *data); #endif diff --git a/setting-common/include/setting-common-data-edj-define.h b/setting-common/include/setting-common-data-edj-define.h index c4bda3f..bc5b9a1 100755 --- a/setting-common/include/setting-common-data-edj-define.h +++ b/setting-common/include/setting-common-data-edj-define.h @@ -1,26 +1,40 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_COMMON_DATA_EDJ_DEFINE_H__ #define __SETTING_COMMON_DATA_EDJ_DEFINE_H__ +//Cnnot be fixed when select multiple resolution +#define ITEM_X_DEN (480.0) +#define ITEM_Y_DEN (90.0) +#define ITEM_Y_DEN2 (60.0) +#define MAIN_Y_DEN (800.0) -/* #define D1_ITEM_NAME_MAX_MEMORY "D1_item_name_max_memory"*/ +//wallpaper +#define TITLE_AREA_H 150 +#define BOTTOM_BAR_AREA_H 114 +#define HD_HEIGHT 1280 +#define WALLPAPER_LAYOUT_H ((HD_HEIGHT)-(TITLE_AREA_H)-(BOTTOM_BAR_AREA_H)) -/* #define D1_ITEM_NAME_AVAILABLE_MEMORY "D1_item_name_available_memory"*/ +//"personal_vib_layout" +#define TOP_AREA_H 158 +#define PERSONAL_VIBRATION_LAYOUT_H ((HD_HEIGHT)-(TOP_AREA_H)-(BOTTOM_BAR_AREA_H)) #endif /* __SETTING_COMMON_DATA_EDJ_DEFINE_H__ */ diff --git a/setting-common/include/setting-common-data-error.h b/setting-common/include/setting-common-data-error.h index 8fd6f1f..20af5d9 100755 --- a/setting-common/include/setting-common-data-error.h +++ b/setting-common/include/setting-common-data-error.h @@ -1,19 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_COMMON_DATA_ERROR_H__ #define __SETTING_COMMON_DATA_ERROR_H__ diff --git a/setting-common/include/setting-common-data-slp-setting.h b/setting-common/include/setting-common-data-slp-setting.h index bdfe9e7..e9b283b 100755 --- a/setting-common/include/setting-common-data-slp-setting.h +++ b/setting-common/include/setting-common-data-slp-setting.h @@ -1,19 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_COMMON_DATA_SLP_SETTING_H__ @@ -24,62 +28,58 @@ #define SETTING_STR_SLP_LEN 256 #define VCONFKEY_SETAPPL_USE_PACKET_DATA_BOOL VCONFKEY_SETAPPL_PREFIX"/use_packet_data" -#define VCONFKEY_LCD_TIMEOUT_NORMA_BACKUP \ - VCONFKEY_SETAPPL_PREFIX"/lcd_timeout_normal_backup" -#define VCONFKEY_SETAPPL_SIM_LANGUAGE_STR "memory/setting/sim_language" +#define VCONFKEY_LCD_TIMEOUT_NORMAL_BACKUP VCONFKEY_SETAPPL_PREFIX"/lcd_timeout_normal_backup" +#define VCONFKEY_SETAPPL_SIM_LANGUAGE_STR "memory/setting/sim_language" -/** @todo verify if the below keys need to be added in libslp-setting*/ -#define VCONFKEY_SETAPPL_NOTI_TONE_PATH_STR VCONFKEY_SETAPPL_PREFIX"/notification_tone" -#define VCONFKEY_SETAPPL_TOUCH_TONE_PATH_STR VCONFKEY_SETAPPL_PREFIX"/touch_tone" +#define VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME "db/setting/accessibility/font_name" +#define VCONFKEY_SETAPPL_ACCESSIBILITY_TTS "db/setting/accessibility/tts" -/* added by hyejin 11.06.28*/ -#define VCONFKEY_SETAPPL_MEDIA_TONE_PATH_STR VCONFKEY_SETAPPL_PREFIX"/media_tone" -/** @todo verify if the below keys need to be added in libslp-setting*/ -#define VCONFKEY_SETAPPL_TOUCH_VIB_TONE_INT VCONFKEY_SETAPPL_PREFIX"/touch_vibration_tone" +//intenel +#define VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT "db/setting/select_network_act" -#define VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT VCONFKEY_SETAPPL_PREFIX"/phone_lock_attempts_left" -#define VCONFKEY_SETAPPL_PHONE_LOCK_TIMESTAMP_STR VCONFKEY_SETAPPL_PREFIX"/phone_lock_timestamp" -#define VCONFKEY_SETAPPL_SIM_LOCK_ATTEMPTS_LEFT_INT VCONFKEY_SETAPPL_PREFIX"/sim_lock_attempts_left" -#define VCONFKEY_SETAPPL_SIM_LOCK_TIMESTAMP_STR VCONFKEY_SETAPPL_PREFIX"/sim_lock_timestamp" +/** @todo verify if the below keys need to be added in libslp-setting*/ // added 11.07.11 #define VCONFKEY_SETAPPL_STATE_PARENTAL_MODE_BOOL VCONFKEY_SETAPPL_PREFIX"/parental_mode" -//#define VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL VCONFKEY_SETAPPL_PREFIX"/simple_password" - - -#define VCONFKEY_SETAPPL_BATTERY_CHARGER_NAME_STR VCONFKEY_SETAPPL_PREFIX"/battery/charger" - -/* Motions*/ -#define VCONFKEY_SETAPPL_FONT_CHANGED "memory/setting/font_changed" -#define VCONFKEY_SETAPPL_THEM_CHANGED "memory/mobile_hotspot/skin_changed" - -//powersaving -#define VCONFKEY_SETAPPL_POWERSAVING_ACTIVATION VCONFKEY_SETAPPL_PREFIX"/powersaving/powersaving_active" -#define VCONFKEY_SETAPPL_POWERSAVING_ACTIVE_REMINDER VCONFKEY_SETAPPL_PREFIX"/powersaving/powersaving_active_reminder" - -#define VCONFKEY_SETAPPL_POWERSAVING_CUSTOMED_ACTIVATION VCONFKEY_SETAPPL_PREFIX"/powersaving/customed_active" -#define VCONFKEY_SETAPPL_POWERSAVING_AT VCONFKEY_SETAPPL_PREFIX"/powersaving/powersaving_at" -#define VCONFKEY_SETAPPL_POWERSAVING_WIFI_OFF VCONFKEY_SETAPPL_PREFIX"/powersaving/wifi_off" -#define VCONFKEY_SETAPPL_POWERSAVING_BT_OFF VCONFKEY_SETAPPL_PREFIX"/powersaving/bt_off" -#define VCONFKEY_SETAPPL_POWERSAVING_GPS_OFF VCONFKEY_SETAPPL_PREFIX"/powersaving/gps_off" -#define VCONFKEY_SETAPPL_POWERSAVING_SYNC_OFF VCONFKEY_SETAPPL_PREFIX"/powersaving/ync_off" -#define VCONFKEY_SETAPPL_POWERSAVING_SCREEN_TIMEOUT VCONFKEY_SETAPPL_PREFIX"/powersaving/screen_timeout" -//// -#define VCONFKEY_SETAPPL_POWERSAVING_BRIGHTNESS_ACTIVATION VCONFKEY_SETAPPL_PREFIX"/powersaving/brightness_active" -#define VCONFKEY_SETAPPL_POWERSAVING_AUTOMATIC_BRIGHTNESS VCONFKEY_SETAPPL_PREFIX"/powersaving/brightness_auto" -#define VCONFKEY_SETAPPL_POWERSAVING_LCD_BRIGHTNESS VCONFKEY_SETAPPL_PREFIX"/powersaving/brightness" - -#define VCONFKEY_SETAPPL_MOTION_USE_SHAKE VCONFKEY_SETAPPL_PREFIX"/use_shake" -#define VCONFKEY_SETAPPL_MOTION_USE_PICKUP VCONFKEY_SETAPPL_PREFIX"/use_pickup" -#define VCONFKEY_SETAPPL_MOTION_INTERNET_ON VCONFKEY_SETAPPL_PREFIX"/internet_on" -#define VCONFKEY_SETAPPL_MOTION_GALLERY_ON VCONFKEY_SETAPPL_PREFIX"/gallery_on" + +#define VCONFKEY_SETAPPL_MOBILE_DATA_BOOL VCONFKEY_SETAPPL_PREFIX"/mobile_data" +#define VCONFKEY_SETAPPL_DISABLE_MOBILE_DATA_AT_LIMIT_BOOL VCONFKEY_SETAPPL_PREFIX"/disable_mobile_data_at_limit" +#define VCONFKEY_SETAPPL_RESTRICT_BG_DATA_BOOL VCONFKEY_SETAPPL_PREFIX"/restrict_background_data" +#define VCONFKEY_SETAPPL_SHOW_WIFI_USAGE_BOOL VCONFKEY_SETAPPL_PREFIX"/show_wifi_usage" +#define VCONFKEY_SETAPPL_DATA_EACH_MONTH_INT VCONFKEY_SETAPPL_PREFIX"/data_each_month" + +#define VCONFKEY_SETAPPL_TAP_TWIST VCONFKEY_SETAPPL_PREFIX"/motion/tap_twist" + +// Screen Mode +#define VCONFKEY_SETAPPL_SCREENMODE_SELNAME VCONFKEY_SETAPPL_PREFIX"/screenmode/selected_name" + +//Smart actions +#define VCONFKEY_SETAPPL_BOOL_AUTO_ADJUST_SCREEN_TONE VCONFKEY_SETAPPL_PREFIX"/auto_adjust_screen_tone" + +//Driving Mode(DM) +#define VCONFKEY_SETAPPL_DM_DRIVING_MODE VCONFKEY_SETAPPL_PREFIX"/driving_mode/drivingmode" +#define VCONFKEY_SETAPPL_DM_INCOMING_CALL VCONFKEY_SETAPPL_PREFIX"/driving_mode/incomingcall" +#define VCONFKEY_SETAPPL_DM_MESSAGE VCONFKEY_SETAPPL_PREFIX"/driving_mode/message" +#define VCONFKEY_SETAPPL_DM_EMAIL VCONFKEY_SETAPPL_PREFIX"/driving_mode/email" +#define VCONFKEY_SETAPPL_DM_VOICEMAIL VCONFKEY_SETAPPL_PREFIX"/driving_mode/voicemail" +#define VCONFKEY_SETAPPL_DM_ALARM VCONFKEY_SETAPPL_PREFIX"/driving_mode/alarm" +#define VCONFKEY_SETAPPL_DM_SCHEDULE VCONFKEY_SETAPPL_PREFIX"/driving_mode/schedule" +#define VCONFKEY_SETAPPL_DM_UNLOCK_SCREEN VCONFKEY_SETAPPL_PREFIX"/driving_mode/unlockscreen" + +// Smart screen -> smart rotation +#define VCONFKEY_SETAPPL_SMARTSCREEN_SMART_ROTATION VCONFKEY_SETAPPL_PREFIX"/smartscreen/smart_rotation" +#define VCONFKEY_SETAPPL_SMARTSCREEN_SMARTSTAY_STATUS_REMINDER VCONFKEY_SETAPPL_PREFIX"/smartscreen/smart_stay_r" +#define VCONFKEY_SETAPPL_SMARTSCREEN_SMARTROTATE_STATUS_REMINDER VCONFKEY_SETAPPL_PREFIX"/smartscreen/smart_rotation_r" + typedef enum { /* display and light */ INT_SLP_SETTING_LCD_BRIGHTNESS = 0, /* the value set by manul */ INT_SLP_SETTING_LCD_TIMEOUT_NORMAL, INT_SLP_SETTING_LCD_TIMEOUT_NORMAL_BACKUP, + INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, /* set by manul or not. 0:manul, 1:not */ + INT_SLP_SETTING_SELECT_NETWORK, INT_SLP_SETTING_NETWORK_MODE, INT_SLP_SETTING_REGIONFORMAT_TIME1224, @@ -120,7 +120,6 @@ typedef enum { /*****/ INT_SLP_SETTING_MSG_ALERT_REPEAT, INT_SLP_SETTING_EMAIL_ALERT_REPEAT, - INT_SLP_SETTING_CALENDAR_ALERT_REPEAT, /*****/ INT_SLP_SETTING_MSG_ALERT_VOLUME, @@ -128,21 +127,15 @@ typedef enum { INT_SLP_SETTING_SYS_TOUCH_SOUND_VOLUME, INT_SLP_SETTING_FONT_SIZE, INT_SLP_SETTING_FONT_TYPE, - INT_SLP_SETTING_TVOUT_TVSYSTEM, - INT_SLP_SETTING_TVOUT_RESOLUTION, - INT_SLP_SETTING_TVOUT_SCREENSIZE, - INT_SLP_SETTING_TVOUT_ROTATION, INT_SLP_SETTING_LANG, INT_SLP_SETTING_BT_STATUS, INT_SLP_SETTING_WIFI_STATUS, INT_SLP_SETTING_MOBILE_AP_STATUS, - INT_SLP_SETTING_VIB_FEEDBACK, INT_SLP_SETTING_ROAMING_NETWORK, INT_SLP_SETTING_USB_MODE, - - INT_SLP_SETTING_MENUSCREEN_VIEWTYPE, +#ifdef UNUSED_VCONFKEY INT_SLP_SETTING_TASKSWITCHER_VIEWTYPE, - +#endif /* memory */ INT_SLP_SETTING_DEFAULT_MEM_WAP, INT_SLP_SETTING_DEFAULT_MEM_BLUETOOTH, @@ -151,17 +144,7 @@ typedef enum { INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO, INT_SLP_SETTING_DEFAULT_MEM_ALL_SHARE, INT_SLP_SETTING_DEFAULT_MEM_ADOBE_AIR, - - /* mobile_tracker */ - INT_SLP_SETTING_MOBILE_TRACKER_RECIPIENT_ONE_INDEX, - INT_SLP_SETTING_MOBILE_TRACKER_RECIPIENT_TWO_INDEX, - INT_SLP_SETTING_MOBILE_TRACKER_RECIPIENT_THREE_INDEX, - INT_SLP_SETTING_MOBILE_TRACKER_RECIPIENT_FOUR_INDEX, - INT_SLP_SETTING_MOBILE_TRACKER_RECIPIENT_FIVE_INDEX, - - /* special type. this type check multi slp key. */ - INT_SLP_SETTING_SPECIAL_FONT, - INT_SLP_SETTING_SPECIAL_BRIGHTNESS, + INT_SLP_SETTING_DEFAULT_MEM_DVB_H, /* other module */ INT_SLP_SETTING_SIM_SLOT, @@ -171,100 +154,87 @@ typedef enum { // accessibility setting INT_SLP_SETTING_ACCESSIBILITY_ENABLE_AUTO_ANSWER, INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, +#if SUPPORT_FONT_STYLE INT_SLP_SETTING_ACCESSIBILITY_FONT_STYLE, +#endif INT_SLP_SETTING_ACCESSIBILITY_AUTO_ANSWER, INT_SLP_SETTING_ACCESSIBILITY_POWER_KEY_HOLD, //powersaving INT_SLP_SETTING_POWERSAVING_AT, INT_SLP_SETTING_POWERSAVING_SCREEN_TIMEOUT, + + // developer option > Limit background process + INT_SLP_SETTING_DEVOPTION_BGPROCESS, + + INT_SLP_SETTING_DATAUSAGE_DATA_EACH_MONTH_INT, SETTING_INT_SLP_LIST_MAX } setting_int_slp_list; typedef enum { + BOOL_SLP_SETTING_POWER_ON_LOCK = 0, BOOL_SLP_SETTING_SIMPLE_PASSWORD, - BOOL_SLP_SETTING_PRIVACY_LOCK, - BOOL_SLP_SETTING_MOBILE_TRACKER, - BOOL_SLP_SETTING_SIM_LOCK, - BOOL_SLP_SETTING_PIN_LOCK, - BOOL_SLP_SETTING_FIXED_DIALING_MODE, - BOOL_SLP_SETTING_PRIVACY_LOCK_SELECT_ALL, - BOOL_SLP_SETTING_PRIVACY_LOCK_MESSAGE, - BOOL_SLP_SETTING_PRIVACY_LOCK_MY_FILES, - BOOL_SLP_SETTING_PRIVACY_LOCK_CALLLOG, - BOOL_SLP_SETTING_PRIVACY_LOCK_CONTACT, - BOOL_SLP_SETTING_PRIVACY_LOCK_CALENDAR, - BOOL_SLP_SETTING_PRIVACY_LOCK_MEMO, - BOOL_SLP_SETTING_PRIVACY_LOCK_EMAIL, + BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, - BOOL_SLP_SETTING_DST, - BOOL_SLP_SETTING_TICKER_NOTI_DISPLAY_CONTENT, - BOOL_SLP_SETTING_TICKER_NOTI_RECV_SMS, - BOOL_SLP_SETTING_TICKER_NOTI_RECV_MMS_NOTI, - BOOL_SLP_SETTING_TICKER_NOTI_RECV_MMS, - BOOL_SLP_SETTING_TICKER_NOTI_RECV_VOICEMAIL, - BOOL_SLP_SETTING_TICKER_NOTI_RECV_EMAIL, - BOOL_SLP_SETTING_TICKER_NOTI_MSG_DELIVERY_REPORT, - BOOL_SLP_SETTING_TICKER_NOTI_MSG_READ_REPORT, - BOOL_SLP_SETTING_TICKER_NOTI_APP_DOWNLOADED, - BOOL_SLP_SETTING_TICKER_NOTI_FILE_DOWNLOADED, - BOOL_SLP_SETTING_TICKER_NOTI_IM, - BOOL_SLP_SETTING_TICKER_NOTI_FACE_BOOK, - BOOL_SLP_SETTING_TICKER_NOTI_MY_SPACE, - BOOL_SLP_SETTING_TICKER_NOTI_TWITTER, + BOOL_SLP_SETTING_TICKER_NOTI_MESSAGES, - BOOL_SLP_SETTING_TICKER_NOTI_VMAIL, BOOL_SLP_SETTING_TICKER_NOTI_EMAIL, - BOOL_SLP_SETTING_TICKER_NOTI_SEVENEMAIL, - BOOL_SLP_SETTING_TICKER_NOTI_SNS, - BOOL_SLP_SETTING_TICKER_NOTI_FILE_TRAN, - BOOL_SLP_SETTING_TICKER_NOTI_OSP, + BOOL_SLP_SETTING_TICKER_NOTI_IM, + BOOL_SLP_SETTING_TICKER_NOTI_FACEBOOK, + BOOL_SLP_SETTING_TICKER_NOTI_TWITTER, + + BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_MESSASGES, + BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_EMAIL, + BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_IM, + BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_FACEBOOK, + BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_TWITTER, + BOOL_SLP_SETTING_TRANSACTION_TRACKING, BOOL_SLP_SETTING_EXPIRY_REMINDER, - BOOL_SLP_SETTING_TVOUT_AUTOFULL_SCREEN, - BOOL_SLP_SETTING_ADAPTIVE_MENU_ORDER, + + BOOL_SLP_SETTING_FLIGHT_MODE, BOOL_SLP_SETTING_DATA_ROAMING, - BOOL_SLP_SETTING_TOUCH_PANEL_AUTOLOCK, - BOOL_SLP_SETTING_USE_NETWORK_BY_WIDGETS, - BOOL_SLP_SETTING_AUTOMATIC_BRIGHTNESS, /* set by manul or not. 0:manul, 1:not */ - BOOL_SLP_SETTING_ASK_ON_CONNECTION, - BOOL_SLP_SETTING_USB_DEBUG_MODE, + BOOL_SLP_SETTING_NFC_STATUS, BOOL_SLP_SETTING_USE_PACKET_DATA, - BOOL_SLP_SETTING_LAUNCH_IMAGE, + BOOL_SLP_SETTING_ACCESSIBILITY_ACCESSIBILITY, BOOL_SLP_SETTING_ACCESSIBILITY_HIGH_CONTRAST, BOOL_SLP_SETTING_ACCESSIBILITY_SCREEN_ZOOM, BOOL_SLP_SETTING_ACCESSIBILITY_ASSISTIVE_LIGHT, BOOL_SLP_SETTING_ACCESSIBILITY_MONO_AUDIO, + BOOL_SLP_SETTING_ACCESSIBILITY_LED_NOTIFY, BOOL_SLP_SETTING_ACCESSIBILITY_ACCEPT_CALL, BOOL_SLP_SETTING_ACCESSIBILITY_POWERKEY_END_CALLS, + + // data usage + BOOL_SLP_SETTING_DATAUSAGE_MOBILE_DATA_BOOL, + BOOL_SLP_SETTING_DATAUSAGE_DISABLE_MOBILE_DATA_AT_LIMIT_BOOL, + BOOL_SLP_SETTING_DATAUSAGE_RESTRICT_BG_DATA_BOOL, + BOOL_SLP_SETTING_DATAUSAGE_SHOW_WIFI_USAGE_BOOL, /* end */ SETTING_BOOL_SLP_LIST_MAX } setting_bool_slp_list; typedef enum { STR_SLP_LIST_PHONE_PASSWORD = 0, - STR_SLP_LIST_PRIVACY_PASSWORD, - STR_SLP_SETTING_CALL_RINGTONE_PATH, - STR_SLP_SETTING_MSG_RINGTONE_PATH, - STR_SLP_SETTING_SYS_RINGTONE_PATH, - STR_SLP_LIST_MOBILE_CONTACT_ONE, - STR_SLP_LIST_MOBILE_CONTACT_TWO, - STR_SLP_LIST_MOBILE_CONTACT_THREE, - STR_SLP_LIST_MOBILE_CONTACT_FOUR, - STR_SLP_LIST_MOBILE_CONTACT_FIVE, - STR_SLP_LIST_MOBILE_CONTACT_SENDER, - STR_SLP_LIST_MOBILE_CONTACT_MESSAGE, - STR_SLP_LIST_MOBILE_SIM_ICCID, - STR_SLP_SETTING_WALLPAPER_PATH, - STR_SLP_SETTING_LOCK_WALLPAPER_PATH, - STR_SLP_SETTING_THEME_NAME, STR_SLP_SETTING_PHONE_LOCK_TIMESTAMP, STR_SLP_SETTING_SIM_LOCK_TIMESTAMP, STR_SLP_LIST_MAX } setting_str_slp_list; +typedef struct _Vconf_Change_Node +{ + const char *in_key; + vconf_callback_fn cb; + void *cb_data; +}Vconf_Change_Node; +#define DEREGISTER_VCONFS(listened_list) setting_destory_listen_list(&(listened_list)) +#define REGISTER_VCONF_NODE(listened_list,vconf,cb,data) setting_add_listen_node(&(listened_list),vconf,cb,data) + +extern void setting_destory_listen_list(Eina_List **listened_list); +extern bool setting_add_listen_node(Eina_List **listened_list,const char *vconf, vconf_callback_fn cb, void *data); + extern int setting_set_int_slp_key(setting_int_slp_list key, int value, int *err); extern int setting_get_int_slp_key(setting_int_slp_list key, int *value, @@ -281,5 +251,10 @@ extern int setting_store_init_password(char *in); extern int setting_read_password(char *md_result); extern int setting_compare_password(char *md_result, const char *in_later); extern setting_lang_entry* setting_get_language_table(); +extern Eina_List* setting_get_language_list(); +extern void setting_get_language_list_destroy(); + +// export function +extern void setting_export(); #endif /* __SETTING_COMMON_DATA_SLP_SETTING_H__ */ diff --git a/setting-common/include/setting-common-data-type.h b/setting-common/include/setting-common-data-type.h old mode 100644 new mode 100755 index 22d9c16..3d4f7eb --- a/setting-common/include/setting-common-data-type.h +++ b/setting-common/include/setting-common-data-type.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ /** *@defgroup common-data-type @@ -37,16 +40,19 @@ #define bool Eina_Bool #endif #define PWD_FILE "/opt/data/setting/set_info" +//#define PLUGIN_CFG_DIR "/opt/data/setting/plugin-cfg" +#define PLUGIN_CFG_DIR "/opt/data/setting/plugin-xml" -#define SETTING_POSTINST_FILE "/var/lib/dpkg/info/org.tizen.setting.postinst" +#define SETTING_POSTINST_FILE "/var/lib/dpkg/info/com.samsung.setting.postinst" #define SETTING_PACKAGE "setting" #define SYSTEM_PACKAGE "sys_string" -#define SETTING_LOCALEDIR "/opt/apps/org.tizen.setting/res/locale" +#define SETTING_LOCALEDIR "/opt/apps/com.samsung.setting/res/locale" -#define SYSTEM_ICON_PATH "/opt/apps/org.tizen.setting/res/icons" -#define SETTING_ICON_PATH "/opt/apps/org.tizen.setting/res/icons" -#define SETTING_UG_ICON_PATH "/opt/ug/res/icon/org.tizen.setting" +#define SYSTEM_ICON_PATH "/opt/apps/com.samsung.setting/res/icons" +#define SETTING_ICON_PATH "/opt/apps/com.samsung.setting/res/icons" +#define SETTING_UG_ICON_PATH "/opt/ug/res/icon/com.samsung.setting" #define SETTING_UG_PATH "/opt/ug/lib" +#define SETTING_UG_PATH_USR "/usr/ug/lib" #define SETTING_EDJ_PATH EDJDIR #define SETTING_MEMORY_EDJ_NAME SETTING_EDJ_PATH"/setting-memory.edj" @@ -61,6 +67,8 @@ #define SETTING_FONT_BLACK "\033[0m" #define SETTING_FONT_BGREEN "\033[36m" +#define THEME_STYLE "beat" + #define IMG_EC_ARROW_OPEN SETTING_ICON_PATH"/00_button_expand_opened.png" #define IMG_EC_ARROW_CLOSE SETTING_ICON_PATH"/00_button_expand_closed.png" @@ -81,6 +89,13 @@ #else #define NAVI_CONTROLBAR_PART "optionheader" #endif +#define BTN_STYLE_DEF "naviframe/title/default" +#define NAVI_BTN_STYLE_LEFT "title_left_btn" +#define NAVI_BTN_STYLE_RIGHT "title_right_btn" +#define NAVI_BTN_STYLE_MORE "title_more_btn" +#define NAVI_BTN_STYLE_PREV "prev_btn" + +#define SETTING_FONT_CONF_FILE "/opt/etc/fonts/conf.avail/99-slp.conf" /** * @brief slider, button, and etc. @@ -119,31 +134,49 @@ typedef void (*setting_call_back_func) (void *data, Evas_Object *obj, void *even #define MAX_DATETIME_FORMAT_LEN 64 #define MAX_DATE_FORMAT_LEN 10 -#define SMALL_FONT_DPI 48 -#define MIDDLE_FONT_DPI 72 -#define LARGE_FONT_DPI 96 -#define HUGE_FONT_DPI 100 -#define GIANT_FONT_DPI 111 +#define SMALL_FONT_DPI (-80) +#define MIDDLE_FONT_DPI (-100) +#define LARGE_FONT_DPI (-150) +#define HUGE_FONT_DPI (-190) +#define GIANT_FONT_DPI (-250) + +#define LABEL_FONT_SIZE_SMALL 24 +#define LABEL_FONT_SIZE_NORMAL 35 +#define LABEL_FONT_SIZE_LARGE 55 +#define LABEL_FONT_SIZE_HUGE 75 +#define LABEL_FONT_SIZE_GIANT 92 #define __STR_EMUL "emul" #define __LEN_STR_EMUL 4 #define BIN_INFO_FILE_PATH "/etc/info.ini" +#define MAX_SYSTEM_SERVICE_NUM 30 +#define SYSTEM_SERVICE_LIST_PATH "/opt/osp/system/configuration/system-services.list" +#define MAX_PKG_NAME_LEN 128 + +typedef enum +{ + SYSTEM_SETTINGS_FONT_SIZE_SMALL = 0, /**< A small size */ + SYSTEM_SETTINGS_FONT_SIZE_NORMAL, /**< A normal size */ + SYSTEM_SETTINGS_FONT_SIZE_LARGE, /**< A large size */ + SYSTEM_SETTINGS_FONT_SIZE_HUGE, /**< A huge size */ + SYSTEM_SETTINGS_FONT_SIZE_GIANT /**< A giant size */ +} settings_font_size_e; + typedef struct { - int index; // auto - russia char* locale; // ex) "en_US.UTF" char* title; // "United Kingdom" + int number; // no - UI } setting_lang_entry; typedef enum _Theme_Type { Theme_Invalid = -1, - Theme_Tizen = 1, - Theme_Tizen_Black = 2, + Theme_Tizen = 0, + Theme_Tizen_Black = 1, Theme_Tizen_Blue, - Theme_Tizen_Grey, Theme_ERROR } Theme_Type; @@ -157,6 +190,7 @@ typedef enum _GENDIAL_Type { GENDIAL_Type_1line_icontext, GENDIAL_Type_group_item, + GENDIAL_Type_2text_3, GENDIAL_Type_MAX } GENDIAL_Type; @@ -169,6 +203,7 @@ typedef enum _SWALLOW_Type { SWALLOW_Type_1CHECKICON = 4, SWALLOW_Type_1RADIO = 5, SWALLOW_Type_1TOGGLE = 6, + SWALLOW_Type_MULTILINE_1TOGGLE, SWALLOW_Type_1ICON_1IMAGE, SWALLOW_Type_1BUTTON, @@ -178,7 +213,7 @@ typedef enum _SWALLOW_Type { SWALLOW_Type_1RADIO_1PROCESS, SWALLOW_Type_1RADIO_1SEARCH, SWALLOW_Type_1RADIO_1LABLE, - SWALLOW_Type_0RADIO_1SEARCH, + SWALLOW_Type_1SEARCH, SWALLOW_Type_1LINE_LAYOUT = 20, SWALLOW_Type_1LINE_LAYOUT_1RADIO, @@ -190,7 +225,6 @@ typedef enum _SWALLOW_Type { SWALLOW_Type_LAYOUT_SLIDER, SWALLOW_Type_LAYOUT_SPECIALIZTION, SWALLOW_Type_LAYOUT_SPECIALIZTION_X,//extension - SWALLOW_Type_LAYOUT_SLIDER_WITH_TITLE, SWALLOW_Type_MAX } SWALLOW_Type; @@ -208,8 +242,12 @@ typedef enum _POPUP_BTN_RESPONSE_TYPE{ } POPUP_BTN_RESPONSE_TYPE; /** *an item node in genlist + * @todo begings_to is requried? + * @todo isItemDisableFlag is required? + * @todo isSinglelineFlag is requred? */ typedef struct _Setting_GenGroupItem_Data { + void **pBack; Elm_Object_Item *item; @@ -217,47 +255,50 @@ typedef struct _Setting_GenGroupItem_Data { const char *l_swallow_path; const char *r_swallow_path; - int chk_status; /**< represent check value, slider value, datefield value etc.. */ - char *keyStr; - char *title; - char *sub_desc; - Evas_Object *rgd; + Evas_Object *win_main; + Evas *evas; + + /* radio button */ + Evas_Object *rgd; /**< radio button */ + int usb_index; /**< usb_index number of radio buttons, ex) USB setting */ /* output */ - Evas_Object *eo_check; + Evas_Object *eo_check; /**< slider, button, check, editfield, datefield */ setting_call_back_func chk_change_cb; - /* to swallow a whole layout (genlist item is 1line-layout or 2line-layout) */ + int chk_status; /**< represent check value, slider value, datefield value etc.. */ + char *keyStr; /**< title */ + char *sub_desc; /**< sub text */ + /* to swallow a whole layout (genlist item is 1line-layout or 2line-layout) */ char *item_style; /**< itc style name */ - Evas_Object *win_main; - Evas *evas; /* for slider control */ - - double slider_min; /**< to swallow a slider */ - - double slider_max; /**< to swallow a slider */ + bool isIndicatorVisible; /**< indicator option (displaying number) */ + double slider_min; /**< to swallow a slider */ + double slider_max; /**< to swallow a slider */ setting_call_back_func start_change_cb; setting_call_back_func stop_change_cb; - int belongs_to; /**< 1: slider belongs to sound group. 0: slider belongs to vibration group */ - /* input panel */ + /* sound/vibration */ + int belongs_to; /**< 1: slider belongs to sound group. 0: slider belongs to vibration group */ + /* input panel */ Elm_Input_Panel_Layout input_type; /**< input panel type */ - bool input_panel_disable_flag; /** do not show the input panel automatically when the widget is clicked or has focus*/ + bool input_panel_disable_flag; /** do not show the input panel automatically when the widget is clicked or has focus*/ + + void *userdata; /**< just a reference, do not need release. */ - void *userdata; /**< just a reference, do not need release. */ bool isPasswordFlag; bool isFocusFlag; - bool isItemDisableFlag; + bool isItemDisableFlag; /**< date/time UG only */ bool isSinglelineFlag; - int int_slp_setting_binded; /**< its relative vconf value must increase from 0, and step is 1. eg, 0, 1, 2, 3.. */ - int index; + int int_slp_setting_binded; /**< its relative vconf value must increase from 0, and step is 1. eg, 0, 1, 2, 3.. */ - Evas_Object *notify;//act as any popup to show user any message + /* popup */ + Evas_Object *notify; /**< act as any popup to show user any message */ Elm_Entry_Filter_Accept_Set *digits_filter_data; Elm_Entry_Filter_Limit_Size *limit_filter_data; @@ -278,6 +319,9 @@ typedef struct _item_table { Setting_GenGroupItem_Data *data_GenItem; } Item_Table; +/** + * @todo is 50 sufficient value? + */ typedef struct _Setting_Done_List_Data { /* external input arguements */ Evas_Object *win_main; @@ -293,6 +337,8 @@ typedef struct _Setting_Done_List_Data { Elm_Genlist_Item_Class itc_1text_1icon; Elm_Genlist_Item_Class itc_seperator; Elm_Genlist_Item_Class itc_sel_all; + Evas_Object *select_all_checkbox; + Eina_Bool select_all_checked; } Setting_Done_List_Data; #endif /* __SETTING_COMMON_DATA_TYPE_H__ */ diff --git a/setting-common/include/setting-common-draw-widget.h b/setting-common/include/setting-common-draw-widget.h old mode 100644 new mode 100755 index 9609bb5..1c85331 --- a/setting-common/include/setting-common-draw-widget.h +++ b/setting-common/include/setting-common-draw-widget.h @@ -1,22 +1,25 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - -/** - *defgroup setting-common-draw-widget + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +/** + *default group setting-common-draw-widget *common UI code for reuse */ #ifndef __SETTING_COMMON_DRAW_WIDGET_H__ @@ -28,6 +31,37 @@ #define SETTING_COMMON_DRAW_WIDGET_CONTROLBAR_ITEM_LEN 3 #define POPUP_INTERVAL 2.0 +extern const Elm_Genlist_Item_Class itc_seperator; +extern const Elm_Genlist_Item_Class itc_bottom_seperator; +extern const Elm_Genlist_Item_Class itc_sep_line; + +extern const Elm_Genlist_Item_Class itc_1text; +extern const Elm_Genlist_Item_Class itc_1text_1icon_2; + +extern const Elm_Genlist_Item_Class itc_1icon; +extern const Elm_Genlist_Item_Class itc_1icon_1text_sub; +extern const Elm_Genlist_Item_Class itc_1text_1icon; +extern const Elm_Genlist_Item_Class itc_1text_2icon; +extern const Elm_Genlist_Item_Class itc_1text_2icon_2; + +extern const Elm_Genlist_Item_Class itc_2text_2; +extern const Elm_Genlist_Item_Class itc_2text; +extern const Elm_Genlist_Item_Class itc_multiline_2text_1icon; +extern const Elm_Genlist_Item_Class itc_2text_1icon_3; +extern const Elm_Genlist_Item_Class itc_2text_1icon_6; +extern const Elm_Genlist_Item_Class itc_2text_1icon_7; + +extern const Elm_Genlist_Item_Class itc_2text_3_parent; +extern const Elm_Genlist_Item_Class itc_2text_3; +extern const Elm_Genlist_Item_Class itc_2text_2icon_3; + +extern const Elm_Genlist_Item_Class itc_multiline_text; +extern const Elm_Genlist_Item_Class itc_cm_1text_1icon_2; +extern const Elm_Genlist_Item_Class itc_sel_all; +extern const Elm_Genlist_Item_Class itc_bg_1icon; +extern const Elm_Genlist_Item_Class itc_group_item; + + /** * Do process when clicking radio in subitem of expandable item */ @@ -92,6 +126,20 @@ extern Setting_GenGroupItem_Data *setting_create_Gendial_field_1radio( Evas_Object *rgd, int chk_status, const char *keyStr, setting_call_back_func chk_change_cb); +/** + * Create 2radion style item + * @return a pointer to Setting_GenGroupItem_Data + */ +extern Setting_GenGroupItem_Data *setting_create_Gendial_field_2radio( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + Evas_Object *rgd, int chk_status, + const char *keyStr, + const char *sub_desc, + setting_call_back_func chk_change_cb); /** * Create common style item with menu icon @@ -189,8 +237,16 @@ extern void setting_enable_expandable_genlist(Evas_Object *genlist, void *data, setting_call_back_func gl_smart_cb); +/** +* The API to let an item which with processbar go into "processing" +* @return +*/ extern void setting_begin_progress_genlist_item(Setting_GenGroupItem_Data * data_item); +/** +* The API to let an item which with processbar go into "processed" +* @return +*/ extern void setting_finish_progress_genlist_item(Setting_GenGroupItem_Data * data_item); @@ -201,7 +257,9 @@ extern void setting_finish_progress_genlist_item(Setting_GenGroupItem_Data * extern Evas_Object *setting_create_slider(Evas_Object *win_main, Evas *evas, const char *l_swallow_path, const char *r_swallow_path, - double value, double slider_min, + double value, + bool indicator, + double slider_min, double slider_max, setting_call_back_func slider_change_cb, @@ -250,7 +308,22 @@ extern Evas_Object *create_bgimage_box_add(void *data, Evas_Object *win_main, */ extern Evas_Object *setting_create_client_bx(Evas_Object *win_main); +/** +* The API to Create a lable +* @return a lable +*/ +extern Evas_Object *setting_create_lable(Evas_Object *parent, const char *lable,const char *style); + +/** +* The API to Create an object to show an image +* @return an object to show an image +*/ extern Evas_Object *setting_create_image(Evas_Object *parent, const char *img_path); + +/** +* The API to Create an object to show anamition image +* @return an object to show anamition image +*/ extern Evas_Object *setting_create_gif(Evas_Object *parent, const char **png_list); /** @@ -258,55 +331,98 @@ extern Evas_Object *setting_create_gif(Evas_Object *parent, const char **png_lis * @return a popup window which contents a progressbar */ extern Evas_Object *setting_create_popup_with_progressbar(void *data, - Evas_Object *parent, - char *progressbar_style, - char *progressbar_title, - char *progressbar_lable, - setting_call_back_func - response_cb, int timeout); -extern Evas_Object *setting_create_popup_with_btn(void *data, Evas_Object *parent, - char *content_str, char *title_str, - setting_call_back_func response_cb, - int timeout, int btn_num, ...); - + Evas_Object *parent, + char *progressbar_style, + char *title, + char *text, + setting_call_back_func response_cb, + int timeout, + bool blocked_flag, + bool keygrab_flag); +/** +* The general API to create a certain popup window with more than one button. +* @return a certain popup window +*/ +extern Evas_Object *setting_create_popup_with_btn(void *data, + Evas_Object *parent, + char *title, + char *text, + setting_call_back_func response_cb, + int timeout, + int btn_num, ...); /** * The general API to create a certain popup window * @return a certain popup window */ -extern Evas_Object *setting_create_popup_without_btn(void *data, Evas_Object *parent, - char *content_str, char *title_str, - setting_call_back_func response_cb, - int timeout); - +extern Evas_Object *setting_create_popup_without_btn(void *data, + Evas_Object *parent, + char *title, + char *text, + setting_call_back_func response_cb, + int timeout, + bool blocked_flag, + bool keygrab_flag); /** -* The API to create a certain popup window without title -* @return a certain popup window without title +* The API to create a certain popup window with title +* @return a certain popup window with title */ -extern int setting_create_popup_without_title(void *data, Evas_Object *win_main, - char *str_text); - +extern int setting_create_simple_popup(void *data, + Evas_Object *parent, + char *title, + char *text); /** -* The API to create a certain popup window with title +* The API to create a certain popup window with a gif and some buttons * @return a certain popup window with title */ -extern int setting_create_popup_with_title(void *data, Evas_Object *win_main, - char *str_title, char *str_text); +extern Evas_Object *setting_create_popup_with_gif(void *data, + Evas_Object *parent, + char *title, + char *text, + const char **png_list,//array end with 'NULL'. + setting_call_back_func response_cb, + int timeout, + int btn_num, ...); -extern Evas_Object *setting_create_popup_with_gif(void *data, Evas_Object *parent, char *content_str, char *title_str, const char **png_list, //array end with 'NULL'. - setting_call_back_func - response_cb, int timeout, int btn_num, ...); -extern Evas_Object *setting_create_popup_with_content(void *data, Evas_Object *parent, char *content_str, char *title_str, Evas_Object *content, //content obj below text - int timeout); +/** +* The API to create a certain popup window with a check +* @return a certain popup window with title +*/ +extern Evas_Object *setting_create_popup_with_checkview(Evas_Object *parent, + char *title, + char *check_str, + Evas_Object *checkview_content, + Evas_Object **check, + int timeout); +/** +* The API to create a certain popup window with a check and some buttons +* @return a certain popup window with title +*/ extern Evas_Object *setting_create_popup_with_check(void *data, - Evas_Object *parent, - char *content_str, - char *title_str, - char *check_str, - setting_call_back_func - response_cb, int timeout, - Evas_Object **check, int btn_num, ...); + Evas_Object *parent, + char *title, + char *text, + char *check_str, + Evas_Object **check, + setting_call_back_func response_cb, + int timeout, + int btn_num, ...); /** +* The API to create a certain popup window with a image, a check and some buttons +* @return a certain popup window with title +*/ +extern Evas_Object *setting_create_popup_with_image_check(void *data, + Evas_Object *parent, + char *title, + char *text1, + char *text2, + char *icon_path, + char *check_str, + Evas_Object **check, + setting_call_back_func response_cb, + int timeout, + int btn_num, ...); +/** * Alternate the check object status and its binded vcof value via original vcofn value */ extern int setting_draw_onoff_status(Evas_Object *obj, @@ -353,17 +469,31 @@ extern Evas_Object *setting_create_blank_rect(Evas_Object *layout); */ extern Evas_Object *setting_create_editfiled(Evas_Object *win_main, char *title, char *def_str); - +/** +* The API to Create a standard layout +* @return a standard layout +*/ extern Evas_Object *setting_create_win_layout(Evas_Object *win_layout, Evas_Object *win_obj); - +/** +* The API to Create a naviframe +* @return a naviframe +*/ extern Evas_Object *setting_create_navi_bar(Evas_Object *layout); +/** +* The API to Create a button +* @return a button +*/ extern Evas_Object *setting_create_button(Evas_Object *parent, const char *btn_str, const char *btn_style, setting_call_back_func btn_click_cb, void *cb_data); +/** +* The API to Create top buttons onto naviframe +* @return a naviframe item +*/ extern Elm_Object_Item * setting_create_navi_bar_top_buttons(char *title_str, char *lbutton_str, char *rbutton_str, @@ -454,7 +584,7 @@ extern Evas_Object *setting_create_layout_navi_bar_genlist(Evas_Object * win_lay * The general API to push any evas object(@param[in][eo_view]) to the specialized navi_bar, * which contents at most 3 buttons */ -extern void setting_push_layout_navi_bar(char *title_str, +extern Elm_Object_Item *setting_push_layout_navi_bar(char *title_str, char *lbutton_str, char *rbutton_str, char *mbutton_str, setting_call_back_func lbutton_click_cb, @@ -505,18 +635,6 @@ extern Evas_Object *setting_create_textbox(Evas_Object *parent, /****done_list****/ /** -* hide selectinfo popup -*/ -extern void sel_info_popup_hide_cb(void *data, Evas *e, Evas_Object *obj, - void *event_info); - -/** -* show selectinfo popup -*/ -extern void sel_info_popup_show_cb(void *data, Evas *e, Evas_Object *obj, - void *event_info); - -/** * Create selectinfo popup */ extern void setting_create_sel_info_popup(Evas_Object *parent, @@ -573,6 +691,18 @@ extern Evas_Object *setting_create_searchbar(void *data, Evas_Object *parent, Evas_Smart_Cb change_cb, Evas_Smart_Cb cancel_cb); +#if APPLIED_BACK_KEY_UG + +/** +* Get the toppest popup in current evas, cross through all the APP and UGs. +* +* @param[in] evas +* +* @return the toppest popup in current evas +*/ +extern Evas_Object *get_toppest_popup_window(Evas *evas); +#endif + /** * Make it no effect when clicking on a evas object, such as, layout, genlist * @@ -650,6 +780,12 @@ extern Evas_Object *setting_create_icon(Evas_Object *parent, const char *img_pat Evas_Object_Event_Cb down_cb, Evas_Object_Event_Cb move_cb, void *data); +/** +* to make sbu-obj the same size as parent-obj.Notice: subobj is the only sub-obj @parent wants to display +* +* @param[in] parent +* @param[in] subobj +*/ /** * To create a button which only has a image and looks clickable @@ -675,4 +811,10 @@ extern Evas_Object *setting_create_image_button(Evas_Object *parent, extern char *setting_customize_text(const char *input_str, const int font_size, const char *color, const char *align); +/* +* To go to top of list in top view of navibar. +* @param[in] navibar +*/ +extern void setting_go_to_navibar_list_top(Evas_Object *navibar); + #endif /* __SETTING_COMMON_DRAW_WIDGET_H__ */ diff --git a/setting-common/include/setting-common-general-func.h b/setting-common/include/setting-common-general-func.h old mode 100644 new mode 100755 index b120c65..1742a5d --- a/setting-common/include/setting-common-general-func.h +++ b/setting-common/include/setting-common-general-func.h @@ -1,25 +1,43 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_COMMON_GENERAL_FUNC_H__ #define __SETTING_COMMON_GENERAL_FUNC_H__ +#ifdef _ +#undef _ +#undef N_ +#undef S_ +#endif + +#include + +#ifdef _ +#undef _ +#undef N_ +#undef S_ +#endif + #include -#include +#include +#include #ifndef _EDJ #define _EDJ(o) elm_layout_edje_get(o) @@ -39,23 +57,21 @@ extern char *setting_file_basename(char *path); /*****/ extern char *get_pa_usb_connect_mode_str(); -extern char *get_pa_theme_name_str(); extern char *get_brightness_mode_str(); extern char *get_pa_backlight_time_str(); extern char *get_pa_powersaving_at_str(); extern char *get_pa_screen_timeout_str(); extern char *get_pa_display_language_str(); -extern char *setting_pa_main_get_language(); extern char *get_pa_Wi_Fi_on_off_str(); extern char *get_Mobile_AP_on_off_str(); extern char *get_BT_on_off_str(); +extern char *get_NFC_on_off_str(); extern char *get_pa_time_format_str(); extern char *get_pa_date_format_str(); extern char *get_pa_week_format_str(); extern char *get_pa_roaming_network_str(); extern double get_widgets_factor(); -extern Theme_Type setting_get_theme(); extern char *setting_gettext(const char *s); extern bool is_digital_str(const char *cstr); extern bool is_substr_ncase(const char *parentstr, const char *substr); @@ -71,13 +87,23 @@ extern bool isEmptyStr(const char *str); extern int safeStrLen(const char *str); extern bool get_substring_int(const char **ipStr, int *ipValue, char delim); extern bool is_ip_string(const char *ipstr); -extern int setting_invoke_reset_function(char *lib_name, bundle *data, void *ext); +extern int setting_invoke_reset_function(char *lib_name, service_h service, void *ext); extern int excuteCmd(char* exec_path, int option_num, ...); -extern void set_font_dpi(short size); extern void create_fontlink(const char *linkpath, const char *linkname, const char *fontfilepath, const char *fontfilename); extern char* get_icon_path(const char *package); + +extern int is_slp_binary(); extern bool isEmulBin(); extern int get_popup_btn_response_type(const char *btn_str); +extern bool is_system_service(const char *pkg_name); +extern void clear_system_service_data(); + +extern char *get_default_font(int language); +extern void *font_conf_doc_parse(char *doc_name, char *font_name); +extern char *cur_font_get(); +extern void font_config_set(char *font_name); +extern void font_size_set(); + #endif /* __SETTING_COMMON_GENERAL_FUNC_H__ */ diff --git a/setting-common/include/setting-common-resource.h b/setting-common/include/setting-common-resource.h index 11c70be..8d91810 100755 --- a/setting-common/include/setting-common-resource.h +++ b/setting-common/include/setting-common-resource.h @@ -1,81 +1,81 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_COMMON_RESOURCE #define __SETTING_COMMON_RESOURCE -#define SETTING_ICON_PATH_CFG "/opt/apps/org.tizen.setting/res/icons/" -#define SETTING_IMAGE_PATH_CFG "/opt/apps/org.tizen.setting/res/images/" - -#define KeyStr_Select_All "IDS_COM_BODY_SELECT_ALL" +#define SETTING_ICON_PATH_CFG "/opt/apps/com.samsung.setting/res/icons/" +#define SETTING_IMAGE_PATH_CFG "/opt/apps/com.samsung.setting/res/images/" +#define SETTING_OPEN_SOURCE_LICENSE_PATH "file:///opt/apps/com.samsung.setting/data/Open_Source_Announcement.html" -#define KeyStr_INFO "Info" - -/* connectivity keyStr*/ + /* connectivity keyStr*/ #define KeyStr_Connectivity "IDS_ST_BODY_CONNECTIVITY" +#define KeyStr_FlightMode "IDS_ST_BODY_FLIGHT_MODE" #define KeyStr_WiFi "IDS_COM_BODY_WI_FI" #define KeyStr_WiFiDirect "IDS_ST_HEADER_WI_FI_DIRECT" -#define KeyStr_MobileAP "IDS_WIFI_HEADER_MOBILE_HOTSPOT_VZW" +#define KeyStr_Bluetooth "IDS_COM_BODY_BLUETOOTH" +#define KeyStr_MobileAP "IDS_MOBILEAP_BODY_TETHERING" -/* #define KeyStr_MobileAP "IDS_ST_BODY_MOBILE_AP"*/ #define KeyStr_AllShare "IDS_COM_BODY_ALLSHARE" +#define KeyStr_AllShareCast "Allshare cast" +#define KeyStr_NearbyDevices "IDS_DLNA_HEADER_NEARBY_DEVICES" #define KeyStr_Synchronise "IDS_COM_BODY_SYNCHRONIZE" #define KeyStr_Location "IDS_COM_BODY_LOCATION" +#define KeyStr_Network "IDS_ST_BODY_NETWORK" #define KeyStr_DataRoaming "IDS_ST_BODY_DATA_ROAMING" #define KeyStr_UsePacketData "IDS_ST_BODY_USE_PACKET_DATA" -/* #define KeyStr_UsePacketData "3G data"*/ -/* #define KeyStr_PacketDataCounter "Packet data counter"*/ #define KeyStr_USBconnection "IDS_ST_HEADER_USB_UTILITIES" -#define KeyStr_TVout "TV out" +#define KeyStr_DeveloperOption "IDS_ST_BODY_DEVELOPER_OPTIONS" /* system keyStr*/ -#define KeyStr_System "IDS_ST_BODY_SYSTEM" -//#define KeyStr_Home "Menu screen" +#define KeyStr_System "IDS_COM_BODY_SYSTEM" + +#define KeyStr_Menuscreen "IDS_ST_HEADER_HOME_SCREEN_ABB" +#define KeyStr_Homescreen "IDS_ST_HEADER_HOME_SCREEN_ABB" -/* #define KeyStr_Theme "IDS_ST_BODY_THEME"*/ -/* #define KeyStr_Theme "Skin color" */ -//#define KeyStr_Theme "Winset" #define KeyStr_Theme "IDS_ST_BODY_WINSET" #define KeyStr_Sounds "IDS_COM_BODY_SOUNDS" -#define KeyStr_Wallpaper "IDS_ST_BODY_WALLPAPER" +#define KeyStr_Wallpaper "IDS_COM_BODY_WALLPAPER" #define KeyStr_HomeScreen "IDS_ST_HEADER_HOME_SCREEN_ABB" -#define KeyStr_LockedScreen "IDS_ST_BODY_LOCK_SCREEN" + +#define KeyStr_LockedScreen "IDS_ST_HEADER_LOCK_SCREEN" #define KeyStr_Font "IDS_COM_BODY_FONT" -//#define KeyStr_Motions "IDS_ST_BODY_MOTION_SETTINGS" -#define KeyStr_Motions "IDS_ST_MBODY_MOTIONS" -#define KeyStr_Powersaving "Power saving mode" +#define KeyStr_Motions "IDS_ST_BODY_MOTION" +#define KeyStr_Powersaving "IDS_ST_BODY_POWER_SAVING_MODE" #define KeyStr_Display "IDS_ST_BODY_DISPLAY" -#define KeyStr_Menuscreen "Menu screen" #define KeyStr_Brightness "IDS_COM_OPT_BRIGHTNESS" #define KeyStr_BacklightTime "IDS_ST_BODY_BACKLIGHT_TIME" -#define KeyStr_Landscape "IDS_ST_BODY_ROTATION_LOCK" +#define KeyStr_Landscape "IDS_ST_HEADER_AUTO_ROTATE_SCREEN_ABB" #define KeyStr_DateTime "IDS_ST_BODY_DATE_AND_TIME" #define KeyStr_VoiceInOut "IDS_ST_HEADER_VOICE_INPUT_AND_OUTPUT" #define KeyStr_DisplayLanguage "IDS_ST_HEADER_DISPLAY_LANGUAGE" -//#define KeyStr_LanguageRegion "Language & Region" +#define keystr_Drivingmode "IDS_ST_BODY_DRIVING_MODE" + #define KeyStr_LanguageRegion "IDS_ST_BODY_LANGUAGE_AND_REGION_ABB" -#define KeyStr_ChooseDefApps "Default program" /*#define KeyStr_KeyboradLanguage "keyborad language"*/ #define KeyStr_KeyboradLanguage "IDS_ST_BODY_KEYBOARD" @@ -88,14 +88,15 @@ #define KeyStr_Reset "IDS_COM_BODY_RESET" #define KeyStr_AboutPhone "IDS_ST_BODY_ABOUT_PHONE" #define KeyStr_MenuWidgets "IDS_ST_BODY_MENU_AND_WIDGETS" -//#define KeyStr_Accessibility "IDS_ST_BODY_ACCESSIBILITY_SETTINGS" -#define KeyStr_Accessibility "Accessibility" -#define KeyStr_Screen_reader "Screen reader (TTS)" +/*#define KeyStr_Accessibility "IDS_ST_BODY_ACCESSIBILITY_SETTINGS"*/ +#define KeyStr_Accessibility "IDS_ST_BODY_ACCESSIBILITY" +#define KeyStr_Screen_reader "IDS_ST_MBODY_SCREEN_READER_HTTS" /* applications keyStr*/ -#define KeyStr_Applications "IDS_ST_BODY_APPLICATIONS" +#define KeyStr_Applications "IDS_COM_BODY_APPLICATIONS" +#define KeyStr_Accounts "IDS_COM_BODY_ACCOUNTS" -#define KeyStr_Call "IDS_COM_BODY_PHONE" +#define KeyStr_Call "IDS_COM_BODY_CALL" #define KeyStr_Gallery "IDS_COM_BODY_GALLERY" #define KeyStr_Messages "IDS_COM_BODY_MESSAGES" @@ -119,65 +120,108 @@ #define KeyStr_VoiceRecorder "IDS_COM_BODY_VOICE_RECORDER" #define KeyStr_FMRadio "IDS_COM_BODY_FM_RADIO" #define KeyStr_Twitter "IDS_COM_BODY_TWITTER" -#define KeyStr_NFC "NFC" +#define KeyStr_NFC "IDS_COM_BODY_NFC" +#define KeyStr_Facebook "IDS_ST_BODY_FACEBOOK" + +#define KeyStr_DataUsage "Data usage" +#define KeyStr_Storage "IDS_ST_BODY_STORAGE" /* applications keyStr*/ #define KeyStr_DownloadedAPPs "IDS_ST_BODY_DOWNLOADED_APPLICATIONS" #define KeyStr_AppsInformation "IDS_ST_BODY_APPLICATION_INFO" #define KeyStr_ManageApps "IDS_ST_BODY_MANAGE_APPLICATIONS" -#define KeyStr_NewExchange "New exchange" +#define KeyStr_WebApps "Web Applications" + +#define KeyStr_MoreConnect "IDS_ST_BODY_MORE_CONNECTIVITY_SETTINGS" +#define KeyStr_MoreSystem "IDS_ST_BODY_MORE_SYSTEM_SETTINGS" + +#define KeyStr_Save "Save" -#define KeyStr_MoreConnect "More connectivity settings" -#define KeyStr_MoreSystem "More system settings" -#define IMG_More SETTING_ICON_PATH_CFG"More.png" +/* certificates keyStr*/ +//#define KeyStr_CertUI "IDS_COM_BODY_CERTIFICATE_INFO" +#define KeyStr_CertUI "Certificate" + +////////////////Common Strings/////////////// +#define KeyStr_Item_Sel "Item(s) Selected" +#define UNSUPPORTED_FUNCTION "Cannot support this function" +#define KeyStr_Select_All "IDS_COM_BODY_SELECT_ALL" +#define KeyStr_INFO "Info" /*****/ #define IMG_DefaultIcon SETTING_ICON_PATH_CFG"DefaultIcon.png" /* connectivity IMG*/ -#define IMG_WiFi SETTING_ICON_PATH_CFG"Wifi.png" -#define IMG_WiFiDirect SETTING_ICON_PATH_CFG"WifiDirect.png" -#define IMG_MobileAP SETTING_ICON_PATH_CFG"MobileAP.png" -#define IMG_Synchronise SETTING_ICON_PATH_CFG"Synchronise.png" -#define IMG_Location SETTING_ICON_PATH_CFG"Location.png" -#define IMG_DataRoaming SETTING_ICON_PATH_CFG"DataRoaming.png" -#define IMG_USBconnection SETTING_ICON_PATH_CFG"USB.png" -#define IMG_KeisOverWifi SETTING_ICON_PATH_CFG"Kies-via-WiFi.png" - -#define IMG_NFC "/opt/ug/res/icons/ug-setting-nfc-efl/org.tizen.nfc-app.png" +#define IMG_FlightMode SETTING_ICON_PATH_CFG"A01-1_icon_Flight_Mode.png" +#define IMG_WiFi SETTING_ICON_PATH_CFG"A01-1_icon_Wi-Fi.png" +#define IMG_WiFiDirect SETTING_ICON_PATH_CFG"A01-1_icon_Wi-Fi_direct.png" +#define IMG_Bluetooth SETTING_ICON_PATH_CFG"A01-1_icon_Bluetooth.png" +#define IMG_MobileAP SETTING_ICON_PATH_CFG"A01-1_icon_mobileAP.png" +#define IMG_AllShare SETTING_ICON_PATH_CFG"AllShare.png" +#define IMG_AllShareCast SETTING_ICON_PATH_CFG"A01-1_icon_Allshare_cast.png" +#define IMG_Synchronise SETTING_ICON_PATH_CFG"A01-1_icon_ActiveSync.png" +#define IMG_Location SETTING_ICON_PATH_CFG"A01-1_icon_Location.png" +#define IMG_Network SETTING_ICON_PATH_CFG"A01-1_icon_Network.png" +#define IMG_DataRoaming SETTING_ICON_PATH_CFG"A01-1_icon_Data_Roaming.png" +#define IMG_UsePacketData SETTING_ICON_PATH_CFG"Data-32.png" +#define IMG_USBconnection SETTING_ICON_PATH_CFG"A01-1_icon_USB_Connection.png" +#define IMG_TVout SETTING_ICON_PATH_CFG"TVout.png" /* system IMG*/ -#define IMG_Menuscreen SETTING_ICON_PATH_CFG"Home.png" -#define IMG_Sounds SETTING_ICON_PATH_CFG"Sound.png" -#define IMG_Wallpaper SETTING_ICON_PATH_CFG"Wallpaper.png" -#define IMG_Brightness SETTING_ICON_PATH_CFG"Brightness.png" +#define IMG_Menuscreen SETTING_ICON_PATH_CFG"A01-1_icon_Menu.png" +#define IMG_Sounds SETTING_ICON_PATH_CFG"A01-1_icon_Sound.png" +#define IMG_Wallpaper SETTING_ICON_PATH_CFG"A01-1_icon_Wallpaper.png" +#define IMG_Font SETTING_ICON_PATH_CFG"A01-1_icon_Font.png" +#define IMG_Brightness SETTING_ICON_PATH_CFG"A01-1_icon_Brightness.png" #define IMG_BacklightTime SETTING_ICON_PATH_CFG"BacklightTime.png" -#define IMG_Dispaly SETTING_ICON_PATH_CFG"Display.png" -#define IMG_Landscape SETTING_ICON_PATH_CFG"rotation-locked.png" -#define IMG_Powersaving SETTING_ICON_PATH_CFG"Display.png" +#define IMG_Dispaly SETTING_ICON_PATH_CFG"A01-1_icon_Display.png" +#define IMG_Landscape SETTING_ICON_PATH_CFG"A01-1_icon_Rotation_lock.png" + +#define IMG_Powersaving SETTING_ICON_PATH_CFG"A01-1_icon_Power_saving_mode.png" -#define IMG_DateTime SETTING_ICON_PATH_CFG"DateAndTime.png" +#define IMG_DateTime SETTING_ICON_PATH_CFG"A01-1_icon_Date_and_time.png" #define IMG_VoiceInOut SETTING_ICON_PATH_CFG"VoiceInOut.png" -#define IMG_DisplayLanguage SETTING_ICON_PATH_CFG"Language.png" -#define IMG_KeyboradLanguage SETTING_ICON_PATH_CFG"Keyboard.png" +#define IMG_DisplayLanguage SETTING_ICON_PATH_CFG"A01-1_icon_Display_Language.png" +#define IMG_ChooseDefApps SETTING_ICON_PATH_CFG"A01-1_icon_Choose_default.png" +#define IMG_KeyboradLanguage SETTING_ICON_PATH_CFG"A01-1_icon_keyboard.png" +#define IMG_Gestures SETTING_ICON_PATH_CFG"Gesture.png" #define IMG_Touch SETTING_ICON_PATH_CFG"Touch.png" -#define IMG_License SETTING_ICON_PATH_CFG"License.png" -#define IMG_EventsNotifications SETTING_ICON_PATH_CFG"Event.png" -#define IMG_Security SETTING_ICON_PATH_CFG"Security.png" -#define IMG_Memory SETTING_ICON_PATH_CFG"Memory.png" -#define IMG_Reset SETTING_ICON_PATH_CFG"Reset.png" -#define IMG_AboutPhone SETTING_ICON_PATH_CFG"AboutPhone.png" -#define IMG_Theme SETTING_ICON_PATH_CFG"Theme.png" +#define IMG_Motion SETTING_ICON_PATH_CFG"A01-1_icon_Motion.png" +#define IMG_License SETTING_ICON_PATH_CFG"A01-1_icon_License.png" +#define IMG_EventsNotifications SETTING_ICON_PATH_CFG"A01-1_icon_Events_Notifications.png" +#define IMG_Security SETTING_ICON_PATH_CFG"A01-1_icon_Security.png" +#define IMG_Memory SETTING_ICON_PATH_CFG"A01-1_icon_Memory.png" +#define IMG_Reset SETTING_ICON_PATH_CFG"A01-1_icon_Reset.png" +#define IMG_AboutPhone SETTING_ICON_PATH_CFG"A01-1_icon_About_phone.png" +#define IMG_Theme SETTING_ICON_PATH_CFG"A01-1_icon_USB_Theme.png" #define IMG_Accessibility SETTING_ICON_PATH_CFG"Accessibility.png" +/* #define IMG_MenuWidgets SETTING_ICON_PATH_CFG"Menu and widgets"*/ + /* applications IMG*/ -#define IMG_MANAGE_APPS SETTING_ICON_PATH_CFG"ManageApplications.png" +#define IMG_Accounts SETTING_ICON_PATH_CFG"A01-1_icon_Accounts.png" +#define IMG_Call "/usr/share/icons/default/small/com.samsung.phone.png" +#define IMG_Messages "/opt/share/icons/default/small/com.samsung.message.png" +#define IMG_Email "/opt/share/icons/default/small/com.samsung.email.png" +#define IMG_Contacts "/usr/share/icons/default/small/com.samsung.contacts.png" +#define IMG_Calendar "/opt/share/icons/default/small/com.samsung.calendar.png" +#define IMG_Gallery "/opt/share/icons/default/small/com.samsung.gallery.png" +#define IMG_VoiceRecorder "/opt/share/icons/default/small/com.samsung.voicerecorder.png" +#define IMG_KeisOverWifi SETTING_ICON_PATH_CFG"A01-1_icon_Kies_via_Wifi.png" +#define IMG_NFC "/opt/ug/res/icons/ug-setting-nfc-efl/com.samsung.nfc-app.png" +#define IMG_DataUsage SETTING_ICON_PATH_CFG"com.samsung.traf-control.png" + +#define IMG_Web_Apps "/opt/ug/res/icons/ug-webapp-common-efl/WebApplication.png" #define IMG_PhoneCalling SETTING_ICON_PATH_CFG"phoneCalling.png" -#define IMG_ROBERT SETTING_ICON_PATH_CFG"robert.png" -#define IMG_ROBERT_LIFT SETTING_ICON_PATH_CFG"robert_lift.png" + +#define IMG_VoiceTalk vconf_get_str(VCONFKEY_BGSET) + +#define IMG_PANNING_CENTER SETTING_ICON_PATH_CFG "motions/panning/panning_center.png" + #define IMG_Panning SETTING_ICON_PATH_CFG"horz_scrollbar.png" + #define IMG_Tilt vconf_get_str(VCONFKEY_BGSET) + /* display UG IMG*/ #define IMG_BRIGTHNESS_LEFT SETTING_ICON_PATH_CFG"00_brightness_left.png" #define IMG_BRIGHTNESS_RIGHT SETTING_ICON_PATH_CFG"00_brightness_right.png" @@ -185,10 +229,10 @@ /* SOUND IMG*/ #define IMG_SLIDER_BTN_VOLUME01 \ SETTING_ICON_PATH_CFG"B04_slider_btn_Volume01.png" - + //SETTING_ICON_PATH_CFG"21_slider_btn_volume01.png" #define IMG_SLIDER_BTN_VOLUME02 \ SETTING_ICON_PATH_CFG"B04_slider_btn_Volume02.png" - + //SETTING_ICON_PATH_CFG"21_slider_btn_volume02.png" /* touch IMG*/ #define IMG_VIBRATION_ICON_01 \ @@ -202,10 +246,57 @@ #define IMG_SENSITIVITY_ICON_02 \ SETTING_ICON_PATH_CFG"68_icon_vibration_02.png" +/* pdf */ +#define PDF_SOURCE_ANNOUNCEMENT \ + "/opt/apps/com.samsung.setting/data/Open_Source_Announcement.pdf" + /* home screen*/ #define IMG_DEFAULT_HOME_SCREEN \ "/opt/share/settings/Wallpapers/Home_default.jpg" +/* */ +#define IMG_AddFavourite \ + SETTING_ICON_PATH_CFG"AddFavourite.png" +/* add */ +#define IMG_ADD \ + SETTING_ICON_PATH_CFG"01_header_icon_add.png" +/* Save, OK, Done */ +#define IMG_DONE \ + SETTING_ICON_PATH_CFG"01_header_icon_done.png" + +/* Cancel, Delete, back */ +#define IMG_CANCEL \ + SETTING_ICON_PATH_CFG"01_header_icon_cancel.png" +/* others */ +#define IMG_OTHERS \ + SETTING_ICON_PATH_CFG"01_header_icon_cancel.png" + +/* Next */ +#define IMG_NEXT SETTING_ICON_PATH_CFG"A01-9_controlbar_icon_Next.png" + +/* Previous */ +#define IMG_PREVIOUS SETTING_ICON_PATH_CFG"A01-9_controlbar_icon_Previous.png" + + +/* setting image list*/ +#define IMG_SYSTEM_MYFILE_FILE SYSTEM_ICON_PATH"/60_myfiles_file_etc.png" +#define IMG_SYSTEM_MYFILE_MP3 SYSTEM_ICON_PATH"/60_myfiles_file_mp3_b.png" +#define IMG_SYSTEM_MYFILE_VOICE SYSTEM_ICON_PATH"/60_myfiles_file_amr.png" +#define IMG_SYSTEM_MYFILE_MP4 SYSTEM_ICON_PATH"/60_myfiles_file_mp4_b.png" +#define IMG_SYSTEM_MYFILE_ICON SYSTEM_ICON_PATH"/myfile_icon_etc.png" + +/* plug in*/ +#define IMG_GREEN_SWITCH SETTING_ICON_PATH_CFG"green_switch-32.png" +#define IMG_APPS_INFORMATION SETTING_ICON_PATH_CFG"A01-1_icon_apps_information.png" +#define IMG_MANAGE_APPS SETTING_ICON_PATH_CFG"A01-1_icon_Manage_Application.png" +#define IMG_NEW_EXCHANGE "/usr/res/icons/default/small/sync-config.png" +#define IMG_ICON_EMAIL "/usr/share/images/icon_email.png" +#define IMG_ICON_SPLITBER_HOR "/usr/share/images/splitbar_hor.png" + +#define IMG_SCREEN_MODE SETTING_ICON_PATH_CFG"A01-1_img_screen_mode.png" + +/*****/ + /****Others****/ /* sound profile*/ diff --git a/setting-common/include/setting-common-view.h b/setting-common/include/setting-common-view.h index 677c664..1e2ff16 100755 --- a/setting-common/include/setting-common-view.h +++ b/setting-common/include/setting-common-view.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ /** *@defgroup setting-common-view *each UG is able to have multiple views. @@ -39,7 +42,7 @@ int setting_view_node_table_register(setting_view *view, setting_view *topview); int setting_view_cb_at_endKey(void *cb); setting_view *setting_view_get_topview(setting_view *view); - +extern void setting_view_update_topview(setting_view *view, setting_view *topview); extern int setting_view_create(setting_view *view, void *cb); extern int setting_view_update(setting_view *view, void *cb); extern int setting_view_destroy(setting_view *view, void *cb); diff --git a/setting-common/src/setting-cfg.c b/setting-common/src/setting-cfg.c index bf3fc39..ee98169 100755 --- a/setting-common/src/setting-cfg.c +++ b/setting-common/src/setting-cfg.c @@ -1,28 +1,30 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #include #include #include #include - -#include +#include #define CFG_FILE_DIR_PATH "/opt/data/setting/" #define CFG_FILE_PATH CFG_FILE_DIR_PATH"setting.cfg" @@ -30,10 +32,16 @@ JsonParser* parser; JsonNode* root; /* category_list */ +char* setting_cfg_get_path() +{ + return CFG_FILE_PATH; +} + int setting_cfg_file_write( JsonNode * node ); -#define __create_an_item(item_name, icon_path, ug_args, defaultPos, is_resetable)\ +#define __create_an_item(item_name, icon_path, ug_args, defaultPos, is_resetable) do\ {\ + if (!is_ug_installed_by_ug_args(ug_args)) break;\ menu_item = json_node_new(JSON_NODE_OBJECT); \ object = json_object_new(); \ json_node_take_object(menu_item, object); \ @@ -44,10 +52,11 @@ int setting_cfg_file_write( JsonNode * node ); json_object_set_int_member(object, "click_times", 0); \ json_object_set_int_member(object, "is_resetable", is_resetable); \ json_array_add_element(menu, menu_item); \ -} +} while(0);\ -#define __create_an_item_by_pkg(item_name, pkg_name, ug_args, defaultPos, is_resetable)\ +#define __create_an_item_by_pkg(item_name, pkg_name, ug_args, defaultPos, is_resetable) do\ {\ + if (!is_ug_installed_by_ug_args(ug_args)) break;\ menu_item = json_node_new(JSON_NODE_OBJECT); \ object = json_object_new(); \ char* __temp_##item_name = get_icon_path(pkg_name); \ @@ -60,7 +69,7 @@ int setting_cfg_file_write( JsonNode * node ); json_object_set_int_member(object, "is_resetable", is_resetable); \ json_array_add_element(menu, menu_item); \ free(__temp_##item_name); __temp_##item_name = NULL; \ -} +} while(0);\ #define __create_a_menu(menu_name)\ @@ -95,72 +104,147 @@ int setting_cfg_create(void) JsonArray *menu; JsonObject *object; - int ret = 0; - int support_nfc = 0; - /* Category list */ category_list = json_node_new (JSON_NODE_ARRAY); json_node_take_array ( category_list, json_array_new () ); /* Connectivity */ __create_a_menu(KeyStr_Connectivity); - __create_an_item(KeyStr_WiFi, IMG_WiFi, "wifi-efl-UG", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); - - ret = vconf_get_bool(VCONFKEY_NFC_FEATURE, &support_nfc); - if((ret != -1) && (support_nfc == 1)) - __create_an_item(KeyStr_NFC, IMG_NFC, "setting-nfc-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); + __create_an_item(KeyStr_FlightMode, IMG_FlightMode, NULL, Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + __create_an_item(KeyStr_WiFi, IMG_WiFi, "wifi-efl-UG", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); + __create_an_item(KeyStr_MobileAP, IMG_MobileAP, "setting-mobile-ap-ug", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); __create_an_item(KeyStr_Location, IMG_Location, "setting-location-efl", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); - __create_an_item(KeyStr_DataRoaming, IMG_DataRoaming, NULL, Cfg_Item_Pos_Level1, Cfg_Item_Resetable); - if(!isEmulBin()) { - __create_an_item(KeyStr_WiFiDirect, IMG_WiFiDirect, "setting-wifidirect-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); + __create_an_item(KeyStr_Network, IMG_Network, "setting-network-efl", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); + __create_an_item(KeyStr_Bluetooth, IMG_Bluetooth, "setting-bluetooth-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); + __create_an_item(KeyStr_NFC, IMG_NFC, "setting-nfc-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); + +#if SUPPORT_DATA_USAGE + __create_an_item(KeyStr_DataUsage, IMG_DataUsage, "setting-datausage-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); +#endif + +#if SUPPORT_WIFI_DIRECT + __create_an_item(KeyStr_WiFiDirect, IMG_WiFiDirect, "setting-wifidirect-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); +#endif + +#if SUPPORT_ALLSHARECAST + // Allshare Cast -- Here + __create_an_item(KeyStr_AllShareCast, IMG_AllShareCast, "setting-allshare-cast-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); +#endif + +#if SUPPORT_AllShare + // allshare setting + __create_an_item(KeyStr_NearbyDevices, IMG_AllShare, "setting-allshare-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); +#endif + + if ( ! is_slp_binary()) { + __create_an_item(KeyStr_KeisOverWifi, IMG_KeisOverWifi, "kies-via-wifi", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); + } + + if ( ! is_slp_binary()) { + __create_an_item(KeyStr_Synchronise, IMG_Synchronise, "setting-synchronise-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); } - __create_an_item(KeyStr_USBconnection, IMG_USBconnection, "setting-connectivity-efl|viewtype:usb", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); /* System */ __create_a_menu(KeyStr_System); /* a new group.. */ - __create_an_item(KeyStr_Sounds, IMG_Sounds, "setting-profile-efl", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); + __create_an_item(KeyStr_EventsNotifications, IMG_EventsNotifications, "setting-phone-efl|viewtype:notification", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); + + // Wallpaper -- here +#if SUPPORT_WALLPAPER /* kinds of wallpaper version.. */ __create_an_item(KeyStr_Wallpaper, IMG_Wallpaper, "setting-display-efl|viewtype:wallpaper", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); +#endif + __create_an_item(KeyStr_Sounds, IMG_Sounds, "setting-profile-efl", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); - __create_an_item(KeyStr_Display, IMG_Dispaly, "setting-display-efl|viewtype:main", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); +#if SUPPOR_SEPARATE_BRIGHTNESS + __create_an_item(KeyStr_Brightness, IMG_Brightness, "setting-display-efl|viewtype:brightness", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); +#endif - /* a new group.. */ - __create_an_item(KeyStr_DateTime, IMG_DateTime, "setting-time-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); + __create_an_item(KeyStr_Security, IMG_Security, "setting-security-efl", Cfg_Item_Pos_Level0, Cfg_Item_Resetable); - /* a new group.. */ +#if SUPPORT_POWERSAVING + __create_an_item(KeyStr_Powersaving, IMG_Powersaving, "setting-powersaving-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); +#endif + +#if SUPPORT_MOTIONS + __create_an_item(KeyStr_Motions, IMG_Motion, "setting-motion-efl|viewtype:motions", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); +#endif + +#if SUPPORT_ACCESSIBILITY + __create_an_item(KeyStr_Accessibility, IMG_Accessibility, "setting-accessibility-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); +#endif + +#if SUPPORT_FONT + __create_an_item(KeyStr_Font, IMG_Font, "setting-font-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); +#endif + + __create_an_item(KeyStr_Display, IMG_Dispaly, "setting-display-efl|viewtype:main", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); +#if SUPPORT_MENUSCREEN + __create_an_item(KeyStr_Menuscreen, IMG_Menuscreen, "setting-homescreen-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); +#endif + __create_an_item(KeyStr_Landscape, IMG_Landscape, NULL, Cfg_Item_Pos_Level1, Cfg_Item_Resetable); + __create_an_item(KeyStr_DateTime, IMG_DateTime, "setting-time-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); __create_an_item(KeyStr_LanguageRegion, IMG_DisplayLanguage, "setting-phone-efl|viewtype:language", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); __create_an_item(KeyStr_KeyboradLanguage, IMG_KeyboradLanguage, "isfsetting-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); - __create_an_item(KeyStr_EventsNotifications, IMG_EventsNotifications, "setting-phone-efl|viewtype:notification", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); +#if SUPPORT_VOICEINOUT + __create_an_item(KeyStr_VoiceInOut, IMG_VoiceInOut, "setting-voice-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); +#endif + __create_an_item(keystr_Drivingmode, IMG_DefaultIcon, "setting-drivingmode-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); +#if SUPPORT_STORAGE + __create_an_item(KeyStr_Storage, IMG_DefaultIcon, "setting-storage-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); +#endif + __create_an_item(KeyStr_ManageApps, IMG_MANAGE_APPS, "setting-manage-applications-efl|viewtype:manage-applications", Cfg_Item_Pos_Level1, + Cfg_Item_Resetable); + + __create_an_item(KeyStr_WebApps, IMG_Web_Apps, "webapp-common-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); + +#if SUPPORT_CERTIFICATES + __create_an_item(KeyStr_CertUI, IMG_MANAGE_APPS, "setting-manage-certificates-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); +#endif + __create_an_item(KeyStr_Memory, IMG_Memory, "setting-memory-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); __create_an_item(KeyStr_Reset, IMG_Reset, "setting-reset-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); + __create_an_item(KeyStr_DeveloperOption, IMG_USBconnection, "setting-developeroption-efl|viewtype:usb", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); __create_an_item(KeyStr_AboutPhone, IMG_AboutPhone, "setting-about-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable); /* Applications */ __create_a_menu(KeyStr_Applications); - __create_an_item_by_pkg(KeyStr_Call, "org.tizen.phone", "setting-call-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); - __create_an_item_by_pkg(KeyStr_Messages, "org.tizen.message", "msg-setting-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); - __create_an_item_by_pkg(KeyStr_Contacts, "org.tizen.contacts", "contacts-settings-efl|request_type:71", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); + __create_an_item(KeyStr_Accounts, IMG_Accounts, "setting-myaccount-efl|mode:account_list", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + __create_an_item(KeyStr_Call, IMG_Call, "setting-call-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + __create_an_item(KeyStr_Messages, IMG_Messages, "msg-setting-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + __create_an_item(KeyStr_Email, IMG_Email, "email-setting-efl|VIEW_TYPE:main-view", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + __create_an_item(KeyStr_Contacts, IMG_Contacts, "contacts-settings-efl|request_type:71", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); - __create_an_item_by_pkg(KeyStr_Calendar, "org.tizen.efl-calendar", "calendar-settings-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); + __create_an_item(KeyStr_Calendar, IMG_Calendar, "calendar-settings-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); - __create_an_item_by_pkg(KeyStr_Gallery, "org.tizen.gallery", "setting-gallery-efl", Cfg_Item_Pos_Level1, Cfg_Item_unResetable); + __create_an_item(KeyStr_Gallery, IMG_Gallery, "setting-gallery-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + __create_an_item(KeyStr_VoiceRecorder, IMG_VoiceRecorder, "setting-voicerecorder-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); +#if SUPPORT_FMradio + // FMradio setting + __create_an_item_by_pkg(KeyStr_FMRadio, "com.samsung.fm-radio", "setting-fmradio-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); + SETTING_TRACE_DEBUG("Added FMRadio"); +#endif - /* Downloaded App */ - __create_a_menu(KeyStr_DownloadedAPPs); - __create_an_item(KeyStr_ManageApps, IMG_MANAGE_APPS, "setting-manage-applications-efl|viewtype:manage-applications", Cfg_Item_Pos_Level1, - Cfg_Item_Resetable); + + +#if DISABLED_CODE + __create_an_item_by_pkg(KeyStr_NFC, "com.samsung.nfc-app", "setting-nfc-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable); +#endif + + /* Downloaded App */ + __create_a_menu(KeyStr_DownloadedAPPs); + /* write to file */ - ret = setting_cfg_file_write( category_list ); + int ret = setting_cfg_file_write( category_list ); json_node_free( category_list ); @@ -171,6 +255,14 @@ int setting_cfg_create(void) /* load file */ int setting_cfg_file_read( void ) { +#if DISABLED_CODE + if (access( CFG_FILE_PATH, R_OK|F_OK ) !=0 ) + { + SETTING_TRACE("file [%s] not legal, need to check your file-system.[%s:%d]\n", CFG_FILE_PATH, __FILE__, __LINE__); + //return Cfg_Error_Type_FilePermissionDenied; + return FALSE; + } +#endif parser = json_parser_new (); /* to be freed on exit */ /* file -> parser */ @@ -179,6 +271,8 @@ int setting_cfg_file_read( void ) if( FALSE == ret ) { + return FALSE; +#if DISABLED_CODE SETTING_TRACE_ERROR("error->message:%s", (char*)(error->message)); /* The file is existing and can be accessed normally, but it was @@ -206,7 +300,7 @@ int setting_cfg_file_read( void ) } /*if the failed is caused by reading the file recursively invoking */ return setting_cfg_file_read(); - +#endif } /* parser -> root */ @@ -239,6 +333,7 @@ int setting_cfg_file_write( JsonNode * node ) } /* public functions */ +#if DISABLED_CODE int setting_cfg_init( void ) { g_type_init (); @@ -307,6 +402,47 @@ int setting_cfg_init( void ) return Cfg_Error_Type_Sucess; } +#endif + +int setting_cfg_init( void ) +{ + g_type_init (); + + if (!access(CFG_FILE_PATH, R_OK|W_OK|F_OK )) { // succeed to access + if(!setting_cfg_file_read()) { // return FALSE + if (remove(CFG_FILE_PATH)) { + return Cfg_Error_Type_RemoveCfg_Failed; + } + return Cfg_Error_Type_ReadCfg_Failed; + } + + return Cfg_Error_Type_Sucess; + } else { // fail to access + switch (errno) { + // file non-existing case + case ENOENT: + SETTING_TRACE_ERROR("non-existing file/dir"); + ecore_file_mkdir(CFG_FILE_DIR_PATH); + if (!setting_cfg_create()) { // return FALSE + SETTING_TRACE_ERROR("Error to create a new config file"); + return Cfg_Error_Type_CreateCfg_Failed; + } + if(!setting_cfg_file_read() ) { // return FALSE + if (remove(CFG_FILE_PATH)) { + return Cfg_Error_Type_RemoveCfg_Failed; + } + return Cfg_Error_Type_ReadCfg_Failed; + } + + return Cfg_Error_Type_Sucess; + // other cases + case EACCES: + case EROFS: + default: + return Cfg_Error_Type_DirPermissionDenied; + } + } +} void setting_cfg_exit( void ) { @@ -546,6 +682,47 @@ void setting_cfg_remove_downloaded_app( char * keyname ) } } +bool is_ug_installed_by_ug_args(void *data) +{ + retv_if(!data, TRUE);//if passing NULL,drawing it + char* ug_args = data; + char *ug_name = get_ug_path_from_ug_args(ug_args); + + char ug_file_opt[PATH_MAX]; + if (snprintf(ug_file_opt, PATH_MAX, "%s/libug-%s.so", SETTING_UG_PATH, ug_name) < 0) + return false; + + struct stat st; + bool result_opt = false; + + if(stat(ug_file_opt, &st) == 0) { + result_opt = true; + } else { + SETTING_TRACE_ERROR(" %s is *NOT* present\n", ug_file_opt); + result_opt = false; + } + + //------------------------------------------------------------------------------------- + char ug_file_usr[PATH_MAX]; + bool result_usr = false; + if (snprintf(ug_file_usr, PATH_MAX, "%s/libug-%s.so", SETTING_UG_PATH_USR, ug_name) < 0) + return false; + + if(stat(ug_file_usr, &st) == 0) { + result_usr = true; + } else { + SETTING_TRACE_ERROR(" %s is *NOT* present\n", ug_file_usr); + result_usr = false; + } + + // false & false --> false + // true & false --> true + // false & true --> true + // true & true --> true + + return (result_usr || result_opt); +} + /*other relative function*/ char *get_ug_path_from_ug_args(void *data) { @@ -574,7 +751,7 @@ char *get_ug_path_from_ug_args(void *data) return path; } -bundle *get_bundle_from_ug_args(void *data) +service_h get_bundle_from_ug_args(void *data) { /*SETTING_TRACE_BEGIN;*/ char *p = (char *)data; @@ -585,19 +762,19 @@ bundle *get_bundle_from_ug_args(void *data) char *q = strchr(p, '|'); if (q) { /* (key, value) pairs exit. eg: ug_args = "sevenemail-setting-efl|caller:setting; cmd:main option" */ /* alloc data */ - bundle *b = bundle_create(); - if (!b) + service_h svc; + if (service_create(&svc)) return NULL; int str_len = safeStrLen(p) + 1; char *v_key = (char *)calloc(1, str_len); if (!v_key) { - bundle_free(b); + service_destroy(svc); return NULL; } char *v_value = (char *)calloc(1, str_len); if (!v_value) { - bundle_free(b); + service_destroy(svc); FREE(v_key); return NULL; } @@ -615,7 +792,7 @@ bundle *get_bundle_from_ug_args(void *data) SETTING_TRACE ("To add ('%s', '%s') to bundle data", v_key, v_value); - bundle_add(b, v_key, v_value); + service_add_extra_data(svc, v_key, v_value); } else { SETTING_TRACE_ERROR ("invalid key-value format!!\n"); @@ -628,11 +805,8 @@ bundle *get_bundle_from_ug_args(void *data) safeCopyStr(v_key, p, m - p); ++m; safeCopyStr(v_value, m, safeStrLen(m)); - /*SETTING_TRACE - ("To add ('%s', '%s') to bundle data", - v_key, v_value); - */ - bundle_add(b, v_key, v_value); + + service_add_extra_data(svc, v_key, v_value); } else { SETTING_TRACE_ERROR ("invalid key-value format!!\n"); @@ -647,7 +821,7 @@ bundle *get_bundle_from_ug_args(void *data) FREE(v_key); FREE(v_value); - return b; + return svc; } else { /* eg: ug_args = "setting-browser-efl" */ /*SETTING_TRACE("(key, value) pairs not exit");*/ diff --git a/setting-common/src/setting-common-data-slp-setting.c b/setting-common/src/setting-common-data-slp-setting.c index a5389ca..ca472f6 100755 --- a/setting-common/src/setting-common-data-slp-setting.c +++ b/setting-common/src/setting-common-data-slp-setting.c @@ -1,27 +1,38 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #include -#include -#include #include #include #include +#include +#include +#include + +#include +#include +#include +#include + typedef enum { eBOOL, @@ -31,214 +42,206 @@ typedef enum typedef union { int i; - int b; + bool b; char* c; } vconfval; -typedef struct vconf_node + +typedef struct VconfNode VconfNode; +struct VconfNode { - int key; /** vconf id definded in Setting app */ - const char* vconf_key; /** vconf string defined in libslp-setting */ - vconftype type; /** BOOL, INT, STRING */ - vconfval value; /** variable by union */ + int key; /** vconf id definded in Setting app */ + const char* vconf_key; /** vconf string defined in libslp-setting */ + vconftype type; /** BOOL, INT, STRING */ + vconfval value; /** variable by union */ + void (*export)(VconfNode* pnode); /** method for exporting current state */ +}; + + +// export function for each vconf key +void export_default(VconfNode* node) +{ + SETTING_TRACE("key : %s ",node->vconf_key); +} -}VconfNode; /** bool vconf table */ static VconfNode g_btable[] = { - {BOOL_SLP_SETTING_POWER_ON_LOCK, VCONFKEY_SETAPPL_STATE_POWER_ON_LOCK_BOOL, eBOOL, {0}}, // node[0] - {BOOL_SLP_SETTING_SIMPLE_PASSWORD, VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL, eBOOL, {0}}, // node[0] - {BOOL_SLP_SETTING_PRIVACY_LOCK, VCONFKEY_SETAPPL_STATE_PRIVACY_LOCK_BOOL, eBOOL, {0}}, // node[0] - {BOOL_SLP_SETTING_MOBILE_TRACKER,VCONFKEY_SETAPPL_FIND_MY_MOBILE_SIM_CHANGE_ALERT_BOOL, eBOOL, {0}}, - {BOOL_SLP_SETTING_SIM_LOCK, VCONFKEY_SETAPPL_STATE_SIM_LOCK_BOOL, eBOOL, {0}}, - {BOOL_SLP_SETTING_PIN_LOCK, VCONFKEY_SETAPPL_STATE_PIN_LOCK_BOOL, eBOOL, {0}}, - {BOOL_SLP_SETTING_FIXED_DIALING_MODE, NULL, eBOOL,{0}}, - {BOOL_SLP_SETTING_PRIVACY_LOCK_SELECT_ALL, VCONFKEY_SETAPPL_STATE_PRIVACY_LOCK_SELECT_ALL_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_PRIVACY_LOCK_MESSAGE, VCONFKEY_SETAPPL_STATE_PRIVACY_LOCK_MESSAGE_BOOL, eBOOL,{0}}, - - {BOOL_SLP_SETTING_PRIVACY_LOCK_MY_FILES, VCONFKEY_SETAPPL_STATE_PRIVACY_LOCK_MY_FILES_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_PRIVACY_LOCK_CALLLOG, VCONFKEY_SETAPPL_STATE_PRIVACY_LOCK_CALL_LOG_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_PRIVACY_LOCK_CONTACT, VCONFKEY_SETAPPL_STATE_PRIVACY_LOCK_CONTACT_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_PRIVACY_LOCK_CALENDAR, VCONFKEY_SETAPPL_STATE_PRIVACY_LOCK_CALENDAR_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_PRIVACY_LOCK_MEMO, VCONFKEY_SETAPPL_STATE_PRIVACY_LOCK_MEMO_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_PRIVACY_LOCK_EMAIL, VCONFKEY_SETAPPL_STATE_PRIVACY_LOCK_EMAIL_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_DST, VCONFKEY_SETAPPL_STATE_DST_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_DISPLAY_CONTENT, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_DISPLAY_CONTENT_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_RECV_SMS, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_RECV_SMS_BOOL, eBOOL,{0}}, - - {BOOL_SLP_SETTING_TICKER_NOTI_RECV_MMS_NOTI, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_RECV_MMS_NOTI_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_RECV_MMS, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_RECV_MMS_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_RECV_VOICEMAIL, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_RECV_VOICEMAIL_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_RECV_EMAIL, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_RECV_EMAIL_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_MSG_DELIVERY_REPORT, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_MSG_DELIVERY_REPORT_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_MSG_READ_REPORT, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_MSG_READ_REPORT_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_APP_DOWNLOADED, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_APP_DOWNLOADED_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_FILE_DOWNLOADED, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_FILE_DOWNLOADED_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_IM, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_IM_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_FACE_BOOK, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_FACE_BOOK_BOOL, eBOOL,{0}}, - - {BOOL_SLP_SETTING_TICKER_NOTI_MY_SPACE, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_MY_SPACE_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_TWITTER, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_TWITTER_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_MESSAGES, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_MESSAGES_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_VMAIL, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_VMAIL_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_EMAIL, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_EMAIL_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_SEVENEMAIL, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_RECV_SEVEN_EMAIL_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_SNS, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_SNS_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_FILE_TRAN, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_FILE_TRAN_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TICKER_NOTI_OSP, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_OSP_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TRANSACTION_TRACKING, VCONFKEY_SETAPPL_STATE_TRANSACTION_TRACKING_BOOL, eBOOL,{0}}, - - {BOOL_SLP_SETTING_EXPIRY_REMINDER, VCONFKEY_SETAPPL_STATE_EXPIRY_REMINDER_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TVOUT_AUTOFULL_SCREEN, VCONFKEY_SETAPPL_TVOUT_AUTOFULL_SCREEN_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_ADAPTIVE_MENU_ORDER, VCONFKEY_SETAPPL_STATE_ADAPTIVE_MENU_ORDER_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_DATA_ROAMING, VCONFKEY_SETAPPL_STATE_DATA_ROAMING_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_TOUCH_PANEL_AUTOLOCK, VCONFKEY_SETAPPL_STATE_TOUCH_PANEL_AUTOLOCK_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_USE_NETWORK_BY_WIDGETS, VCONFKEY_SETAPPL_STATE_USE_NETWORK_BY_WIDGETS_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_AUTOMATIC_BRIGHTNESS, VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_BOOL, eBOOL,{0}}, /* set by manul or not. 0:manul, 1:not */ - {BOOL_SLP_SETTING_ASK_ON_CONNECTION, NULL, eBOOL,{0}}, /* nothing */ - {BOOL_SLP_SETTING_USB_DEBUG_MODE, VCONFKEY_SETAPPL_USB_DEBUG_MODE, eBOOL,{0}}, - - {BOOL_SLP_SETTING_USE_PACKET_DATA, VCONFKEY_3G_ENABLE, eBOOL,{0}}, - {BOOL_SLP_SETTING_LAUNCH_IMAGE,VCONFKEY_LAUNCH_EFFECT, eBOOL,{0}}, - {BOOL_SLP_SETTING_ACCESSIBILITY_ACCESSIBILITY, VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY, eBOOL,{0}}, - {BOOL_SLP_SETTING_ACCESSIBILITY_HIGH_CONTRAST, VCONFKEY_SETAPPL_ACCESSIBILITY_HIGH_CONTRAST, eBOOL,{0}}, - {BOOL_SLP_SETTING_ACCESSIBILITY_SCREEN_ZOOM, VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_ZOOM, eBOOL,{0}}, - {BOOL_SLP_SETTING_ACCESSIBILITY_ASSISTIVE_LIGHT, VCONFKEY_SETAPPL_ACCESSIBILITY_TORCH_LIGHT, eBOOL,{0}}, - {BOOL_SLP_SETTING_ACCESSIBILITY_MONO_AUDIO, VCONFKEY_SETAPPL_ACCESSIBILITY_MONO_AUDIO, eBOOL,{0}}, - {BOOL_SLP_SETTING_ACCESSIBILITY_ACCEPT_CALL, VCONFKEY_CISSAPPL_ANSWERING_KEY_BOOL, eBOOL,{0}}, - {BOOL_SLP_SETTING_ACCESSIBILITY_POWERKEY_END_CALLS, VCONFKEY_CISSAPPL_POWER_KEY_ENDS_CALL_BOOL, eBOOL,{0}}, + {BOOL_SLP_SETTING_POWER_ON_LOCK, VCONFKEY_SETAPPL_STATE_POWER_ON_LOCK_BOOL, eBOOL, {0}, export_default}, // node[0] + {BOOL_SLP_SETTING_SIMPLE_PASSWORD, VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL, eBOOL, {0}, export_default}, // node[0] + + {BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, eBOOL,{0}, export_default}, + + {BOOL_SLP_SETTING_TICKER_NOTI_MESSAGES, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_MESSAGES_BOOL, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_TICKER_NOTI_EMAIL, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_EMAIL_BOOL, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_TICKER_NOTI_IM, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_IM_BOOL, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_TICKER_NOTI_FACEBOOK, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_FACEBOOK_BOOL, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_TICKER_NOTI_TWITTER, VCONFKEY_SETAPPL_STATE_TICKER_NOTI_TWITTER_BOOL, eBOOL,{0}, export_default}, + + {BOOL_SLP_SETTING_TRANSACTION_TRACKING, VCONFKEY_SETAPPL_STATE_TRANSACTION_TRACKING_BOOL, eBOOL,{0}, export_default}, + + {BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_MESSASGES, VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_MESSASGES, eBOOL, {0}, export_default}, + {BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_EMAIL, VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_EMAIL, eBOOL, {0}, export_default}, + {BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_IM, VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_IM, eBOOL, {0}, export_default}, + {BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_FACEBOOK, VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_FACEBOOK, eBOOL, {0}, export_default}, + {BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_TWITTER, VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_TWITTER, eBOOL, {0}, export_default}, + + {BOOL_SLP_SETTING_EXPIRY_REMINDER, VCONFKEY_SETAPPL_STATE_EXPIRY_REMINDER_BOOL, eBOOL,{0}, export_default}, + + {BOOL_SLP_SETTING_FLIGHT_MODE, VCONFKEY_SETAPPL_FLIGHT_MODE_BOOL, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_DATA_ROAMING, VCONFKEY_SETAPPL_STATE_DATA_ROAMING_BOOL, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_NFC_STATUS,VCONFKEY_NFC_STATE, eBOOL, {0}, export_default}, + + {BOOL_SLP_SETTING_USE_PACKET_DATA, VCONFKEY_3G_ENABLE, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_ACCESSIBILITY, VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_HIGH_CONTRAST, VCONFKEY_SETAPPL_ACCESSIBILITY_HIGH_CONTRAST, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_SCREEN_ZOOM, VCONFKEY_SETAPPL_ACCESSIBILITY_SCREEN_ZOOM, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_ASSISTIVE_LIGHT, VCONFKEY_SETAPPL_ACCESSIBILITY_TORCH_LIGHT, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_MONO_AUDIO, VCONFKEY_SETAPPL_ACCESSIBILITY_MONO_AUDIO, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_LED_NOTIFY, VCONFKEY_SETAPPL_ACCESSIBILITY_LED_NOTIFY, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_ACCEPT_CALL, VCONFKEY_CISSAPPL_ANSWERING_KEY_BOOL, eBOOL,{0}, export_default}, + {BOOL_SLP_SETTING_ACCESSIBILITY_POWERKEY_END_CALLS, VCONFKEY_CISSAPPL_POWER_KEY_ENDS_CALL_BOOL, eBOOL,{0}, export_default}, + + //datausage + {BOOL_SLP_SETTING_DATAUSAGE_MOBILE_DATA_BOOL, VCONFKEY_SETAPPL_MOBILE_DATA_BOOL, eBOOL, {0}, export_default}, + {BOOL_SLP_SETTING_DATAUSAGE_DISABLE_MOBILE_DATA_AT_LIMIT_BOOL, VCONFKEY_SETAPPL_DISABLE_MOBILE_DATA_AT_LIMIT_BOOL, eBOOL, {0}, export_default}, + {BOOL_SLP_SETTING_DATAUSAGE_RESTRICT_BG_DATA_BOOL, VCONFKEY_SETAPPL_RESTRICT_BG_DATA_BOOL, eBOOL, {0}, export_default}, + {BOOL_SLP_SETTING_DATAUSAGE_SHOW_WIFI_USAGE_BOOL, VCONFKEY_SETAPPL_SHOW_WIFI_USAGE_BOOL, eBOOL, {0}, export_default}, + //------------------------------------------------------------------------------------------------ + {SETTING_BOOL_SLP_LIST_MAX, NULL, eBOOL, {0}, export_default}, }; + /** int vconf table */ static VconfNode g_itable[] = { - {INT_SLP_SETTING_LCD_BRIGHTNESS, VCONFKEY_SETAPPL_LCD_BRIGHTNESS, eINT, {0}}, - {INT_SLP_SETTING_LCD_TIMEOUT_NORMAL,VCONFKEY_SYSMAN_LCD_TIMEOUT_NORMAL, eINT, {0}}, - {INT_SLP_SETTING_LCD_TIMEOUT_NORMAL_BACKUP,VCONFKEY_LCD_TIMEOUT_NORMA_BACKUP, eINT, {0}}, - {INT_SLP_SETTING_SELECT_NETWORK,VCONFKEY_SETAPPL_SELECT_NETWORK_INT, eINT, {0}}, - - {INT_SLP_SETTING_NETWORK_MODE,VCONFKEY_SETAPPL_NETWORK_MODE_INT, eINT, {0}}, - {INT_SLP_SETTING_REGIONFORMAT_TIME1224,VCONFKEY_REGIONFORMAT_TIME1224, eINT, {0}}, - {INT_SLP_SETTING_DATE_FORMAT,VCONFKEY_SETAPPL_DATE_FORMAT_INT, eINT, {0}}, - {INT_SLP_SETTING_WEEK_FORMAT,VCONFKEY_SETAPPL_WEEKOFDAY_FORMAT_INT, eINT, {0}}, + {INT_SLP_SETTING_LCD_BRIGHTNESS, VCONFKEY_SETAPPL_LCD_BRIGHTNESS, eINT, {0}, export_default}, + {INT_SLP_SETTING_LCD_TIMEOUT_NORMAL,VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, eINT, {0}, export_default}, + {INT_SLP_SETTING_LCD_TIMEOUT_NORMAL_BACKUP,VCONFKEY_LCD_TIMEOUT_NORMAL_BACKUP, eINT, {0}, export_default}, + + {INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT, eINT,{0}, export_default}, + + {INT_SLP_SETTING_SELECT_NETWORK,VCONFKEY_SETAPPL_SELECT_NETWORK_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_NETWORK_MODE,VCONFKEY_SETAPPL_NETWORK_MODE_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_REGIONFORMAT_TIME1224,VCONFKEY_REGIONFORMAT_TIME1224, eINT, {0}, export_default}, + {INT_SLP_SETTING_DATE_FORMAT,VCONFKEY_SETAPPL_DATE_FORMAT_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_WEEK_FORMAT,VCONFKEY_SETAPPL_WEEKOFDAY_FORMAT_INT, eINT, {0}, export_default}, /* CALL_ALERT_TYPE */ - {INT_SLP_SETTING_CALL_ALERT_TYPE, NULL, eINT, {0}}, - {INT_SLP_SETTING_NORMAL_CALL_ALERT_TYPE, NULL, eINT, {0}}, - {INT_SLP_SETTING_SILENT_CALL_ALERT_TYPE, NULL, eINT, {0}}, - {INT_SLP_SETTING_DRIVING_CALL_ALERT_TYPE, NULL, eINT, {0}}, - {INT_SLP_SETTING_MEETING_CALL_ALERT_TYPE, NULL, eINT, {0}}, - {INT_SLP_SETTING_OUTDOOR_CALL_ALERT_TYPE, NULL, eINT, {0}}, + {INT_SLP_SETTING_CALL_ALERT_TYPE, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_NORMAL_CALL_ALERT_TYPE, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_SILENT_CALL_ALERT_TYPE, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_DRIVING_CALL_ALERT_TYPE, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_MEETING_CALL_ALERT_TYPE, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_OUTDOOR_CALL_ALERT_TYPE, NULL, eINT, {0}, export_default}, /* CALL_ALERT_VIB */ - {INT_SLP_SETTING_CALL_ALERT_VIB, VCONFKEY_SETAPPL_CALL_VIBRATION_PATTERN_INT, eINT, {0}}, - {INT_SLP_SETTING_NORMAL_CALL_ALERT_VIB, NULL, eINT, {0}}, - {INT_SLP_SETTING_SILENT_CALL_ALERT_VIB, NULL, eINT, {0}}, - {INT_SLP_SETTING_DRIVING_CALL_ALERT_VIB, NULL, eINT, {0}}, - {INT_SLP_SETTING_MEETING_CALL_ALERT_VIB, NULL, eINT, {0}}, - {INT_SLP_SETTING_OUTDOOR_CALL_ALERT_VIB, NULL, eINT, {0}}, + {INT_SLP_SETTING_CALL_ALERT_VIB, VCONFKEY_SETAPPL_CALL_VIBRATION_PATTERN_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_NORMAL_CALL_ALERT_VIB, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_SILENT_CALL_ALERT_VIB, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_DRIVING_CALL_ALERT_VIB, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_MEETING_CALL_ALERT_VIB, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_OUTDOOR_CALL_ALERT_VIB, NULL, eINT, {0}, export_default}, /*****/ - {INT_SLP_SETTING_CALL_ALERT_VOLUME, NULL, eINT, {0}}, + {INT_SLP_SETTING_CALL_ALERT_VOLUME, NULL, eINT, {0}, export_default}, /* MSG_ALERT_TYPE */ - {INT_SLP_SETTING_MSG_ALERT_TYPE, NULL, eINT, {0}}, - {INT_SLP_SETTING_NORMAL_MSG_ALERT_TYPE, NULL, eINT, {0}}, - {INT_SLP_SETTING_SILENT_MSG_ALERT_TYPE, NULL, eINT, {0}}, - {INT_SLP_SETTING_DRIVING_MSG_ALERT_TYPE, NULL, eINT, {0}}, - {INT_SLP_SETTING_MEETING_MSG_ALERT_TYPE, NULL, eINT, {0}}, - {INT_SLP_SETTING_OUTDOOR_MSG_ALERT_TYPE, NULL, eINT, {0}}, + {INT_SLP_SETTING_MSG_ALERT_TYPE, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_NORMAL_MSG_ALERT_TYPE, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_SILENT_MSG_ALERT_TYPE, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_DRIVING_MSG_ALERT_TYPE, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_MEETING_MSG_ALERT_TYPE, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_OUTDOOR_MSG_ALERT_TYPE, NULL, eINT, {0}, export_default}, /* MSG_ALERT_VIB */ - {INT_SLP_SETTING_MSG_ALERT_VIB, NULL, eINT, {0}}, - {INT_SLP_SETTING_NORMAL_MSG_ALERT_VIB, NULL, eINT, {0}}, - {INT_SLP_SETTING_SILENT_MSG_ALERT_VIB, NULL, eINT, {0}}, - {INT_SLP_SETTING_DRIVING_MSG_ALERT_VIB, NULL, eINT, {0}}, - {INT_SLP_SETTING_MEETING_MSG_ALERT_VIB, NULL, eINT, {0}}, - {INT_SLP_SETTING_OUTDOOR_MSG_ALERT_VIB, NULL, eINT, {0}}, + {INT_SLP_SETTING_MSG_ALERT_VIB, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_NORMAL_MSG_ALERT_VIB, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_SILENT_MSG_ALERT_VIB, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_DRIVING_MSG_ALERT_VIB, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_MEETING_MSG_ALERT_VIB, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_OUTDOOR_MSG_ALERT_VIB, NULL, eINT, {0}, export_default}, /*****/ - {INT_SLP_SETTING_MSG_ALERT_REPEAT,VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, eINT, {0}}, - {INT_SLP_SETTING_EMAIL_ALERT_REPEAT,VCONFKEY_SETAPPL_NOTI_EMAIL_ALERT_REP_TYPE_INT, eINT, {0}}, - {INT_SLP_SETTING_CALENDAR_ALERT_REPEAT,VCONFKEY_SETAPPL_NOTI_CALENDAR_ALERT_REP_TYPE_INT, eINT, {0}}, + {INT_SLP_SETTING_MSG_ALERT_REPEAT,VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_EMAIL_ALERT_REPEAT,VCONFKEY_SETAPPL_NOTI_EMAIL_ALERT_REP_TYPE_INT, eINT, {0}, export_default}, /*****/ - {INT_SLP_SETTING_MSG_ALERT_VOLUME, NULL, eINT, {0}}, - {INT_SLP_SETTING_SYS_TOUCH_SOUND, NULL, eINT, {0}}, - {INT_SLP_SETTING_SYS_TOUCH_SOUND_VOLUME, NULL, eINT, {0}}, - {INT_SLP_SETTING_FONT_SIZE,VCONFKEY_SETAPPL_FONT_SIZE_INT, eINT, {0}}, - {INT_SLP_SETTING_FONT_TYPE,VCONFKEY_SETAPPL_FONT_TYPE_INT, eINT, {0}}, - {INT_SLP_SETTING_TVOUT_TVSYSTEM,VCONFKEY_SETAPPL_TVOUT_TVSYSTEM_INT, eINT, {0}}, - {INT_SLP_SETTING_TVOUT_RESOLUTION,VCONFKEY_SETAPPL_TVOUT_RESOLUTION_INT, eINT, {0}}, - {INT_SLP_SETTING_TVOUT_SCREENSIZE,VCONFKEY_SETAPPL_TVOUT_SCREENSIZE_INT, eINT, {0}}, - {INT_SLP_SETTING_TVOUT_ROTATION,VCONFKEY_SETAPPL_TVOUT_ROTATION_INT, eINT, {0}}, - {INT_SLP_SETTING_LANG,VCONFKEY_SETAPPL_LANG_INT, eINT, {0}}, - {INT_SLP_SETTING_BT_STATUS,VCONFKEY_BT_STATUS, eINT, {0}}, - {INT_SLP_SETTING_WIFI_STATUS,VCONFKEY_WIFI_STATE, eINT, {0}}, - {INT_SLP_SETTING_MOBILE_AP_STATUS,VCONFKEY_MOBILE_HOTSPOT_MODE, eINT, {0}}, - {INT_SLP_SETTING_VIB_FEEDBACK,VCONFKEY_SETAPPL_VIB_FEEDBACK_INT, eINT, {0}}, - {INT_SLP_SETTING_ROAMING_NETWORK,VCONFKEY_SETAPPL_ROAMING_NETWORK_INT, eINT, {0}}, - {INT_SLP_SETTING_USB_MODE,VCONFKEY_SETAPPL_USB_MODE_INT, eINT, {0}}, - - {INT_SLP_SETTING_MENUSCREEN_VIEWTYPE, NULL, eINT, {0}}, - {INT_SLP_SETTING_TASKSWITCHER_VIEWTYPE,VCONFKEY_TASKSWITCHER_VIEWTYPE, eINT, {0}}, - + {INT_SLP_SETTING_MSG_ALERT_VOLUME, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_SYS_TOUCH_SOUND, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_SYS_TOUCH_SOUND_VOLUME, NULL, eINT, {0}, export_default}, + {INT_SLP_SETTING_FONT_SIZE,VCONFKEY_SETAPPL_FONT_SIZE_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_FONT_TYPE,VCONFKEY_SETAPPL_FONT_TYPE_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_LANG,VCONFKEY_SETAPPL_LANG_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_BT_STATUS,VCONFKEY_BT_STATUS, eINT, {0}, export_default}, + {INT_SLP_SETTING_WIFI_STATUS,VCONFKEY_WIFI_STATE, eINT, {0}, export_default}, + {INT_SLP_SETTING_MOBILE_AP_STATUS,VCONFKEY_MOBILE_HOTSPOT_MODE, eINT, {0}, export_default}, + {INT_SLP_SETTING_ROAMING_NETWORK,VCONFKEY_SETAPPL_ROAMING_NETWORK_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_USB_MODE,VCONFKEY_SETAPPL_USB_MODE_INT, eINT, {0}, export_default}, +#ifdef UNUSED_VCONFKEY + {INT_SLP_SETTING_TASKSWITCHER_VIEWTYPE,VCONFKEY_TASKSWITCHER_VIEWTYPE, eINT, {0}, export_default}, +#endif /* memory */ - {INT_SLP_SETTING_DEFAULT_MEM_WAP,VCONFKEY_SETAPPL_DEFAULT_MEM_WAP_INT, eINT, {0}}, - {INT_SLP_SETTING_DEFAULT_MEM_BLUETOOTH,VCONFKEY_SETAPPL_DEFAULT_MEM_BLUETOOTH_INT, eINT, {0}}, - {INT_SLP_SETTING_DEFAULT_MEM_CAMERA,VCONFKEY_SETAPPL_DEFAULT_MEM_CAMERA_INT, eINT, {0}}, - {INT_SLP_SETTING_DEFAULT_MEM_VOICE_RECORDER,VCONFKEY_SETAPPL_DEFAULT_MEM_VOICE_RECORDER_INT, eINT, {0}}, - {INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO,VCONFKEY_SETAPPL_DEFAULT_MEM_FM_RADIO_INT, eINT, {0}}, - {INT_SLP_SETTING_DEFAULT_MEM_ALL_SHARE,VCONFKEY_SETAPPL_DEFAULT_MEM_ALL_SHARE_INT, eINT, {0}}, - {INT_SLP_SETTING_DEFAULT_MEM_ADOBE_AIR,VCONFKEY_SETAPPL_DEFAULT_MEM_ADOBE_AIR_INT, eINT, {0}}, - - /* mobile_tracker */ - {INT_SLP_SETTING_MOBILE_TRACKER_RECIPIENT_ONE_INDEX,NULL, eINT, {0}}, - {INT_SLP_SETTING_MOBILE_TRACKER_RECIPIENT_TWO_INDEX,NULL, eINT, {0}}, - {INT_SLP_SETTING_MOBILE_TRACKER_RECIPIENT_THREE_INDEX,NULL, eINT, {0}}, - {INT_SLP_SETTING_MOBILE_TRACKER_RECIPIENT_FOUR_INDEX,NULL, eINT, {0}}, - {INT_SLP_SETTING_MOBILE_TRACKER_RECIPIENT_FIVE_INDEX,NULL, eINT, {0}}, - - /* special type. this type check multi slp key. */ - {INT_SLP_SETTING_SPECIAL_FONT, NULL, eINT, {0}}, - {INT_SLP_SETTING_SPECIAL_BRIGHTNESS, NULL, eINT, {0}}, + {INT_SLP_SETTING_DEFAULT_MEM_WAP,VCONFKEY_SETAPPL_DEFAULT_MEM_WAP_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_DEFAULT_MEM_BLUETOOTH,VCONFKEY_SETAPPL_DEFAULT_MEM_BLUETOOTH_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_DEFAULT_MEM_CAMERA,VCONFKEY_SETAPPL_DEFAULT_MEM_CAMERA_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_DEFAULT_MEM_VOICE_RECORDER,VCONFKEY_SETAPPL_DEFAULT_MEM_VOICE_RECORDER_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO,VCONFKEY_SETAPPL_DEFAULT_MEM_FM_RADIO_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_DEFAULT_MEM_ALL_SHARE,VCONFKEY_SETAPPL_DEFAULT_MEM_ALL_SHARE_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_DEFAULT_MEM_ADOBE_AIR,VCONFKEY_SETAPPL_DEFAULT_MEM_ADOBE_AIR_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_DEFAULT_MEM_DVB_H,VCONFKEY_SETAPPL_DEFAULT_MEM_DVB_H_INT, eINT, {0}, export_default}, /* other module */ - {INT_SLP_SETTING_SIM_SLOT,VCONFKEY_TELEPHONY_SIM_SLOT, eINT, {0}}, - {INT_SLP_SETTING_PHONE_LOCK_ATTEMPTS_LEFT,VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT, eINT, {0}}, - {INT_SLP_SETTING_SIM_LOCK_ATTEMPTS_LEFT,VCONFKEY_SETAPPL_SIM_LOCK_ATTEMPTS_LEFT_INT, eINT, {0}}, + {INT_SLP_SETTING_SIM_SLOT,VCONFKEY_TELEPHONY_SIM_SLOT, eINT, {0}, export_default}, + {INT_SLP_SETTING_PHONE_LOCK_ATTEMPTS_LEFT,VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_SIM_LOCK_ATTEMPTS_LEFT,VCONFKEY_SETAPPL_SIM_LOCK_ATTEMPTS_LEFT_INT, eINT, {0}, export_default}, // accessibility setting - {INT_SLP_SETTING_ACCESSIBILITY_ENABLE_AUTO_ANSWER, VCONFKEY_CISSAPPL_ANSWERING_MODE_INT, eINT,{0}}, - {INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, eINT, {0}}, - {INT_SLP_SETTING_ACCESSIBILITY_FONT_STYLE,VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_STYLE, eINT, {0}}, - {INT_SLP_SETTING_ACCESSIBILITY_AUTO_ANSWER, VCONFKEY_CISSAPPL_ANSWERING_MODE_TIME_INT, eINT, {0}}, - {INT_SLP_SETTING_ACCESSIBILITY_POWER_KEY_HOLD, VCONFKEY_SETAPPL_ACCESSIBILITY_POWER_KEY_HOLD, eINT, {0}}, - - {INT_SLP_SETTING_POWERSAVING_AT, VCONFKEY_SETAPPL_POWERSAVING_AT, eINT, {0}}, - {INT_SLP_SETTING_POWERSAVING_SCREEN_TIMEOUT, VCONFKEY_SETAPPL_POWERSAVING_SCREEN_TIMEOUT, eINT, {0}}, + {INT_SLP_SETTING_ACCESSIBILITY_ENABLE_AUTO_ANSWER, VCONFKEY_CISSAPPL_ANSWERING_MODE_INT, eINT,{0}, export_default}, + {INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, eINT, {0}, export_default}, +#if SUPPORT_FONT_STYLE + {INT_SLP_SETTING_ACCESSIBILITY_FONT_STYLE,VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_STYLE, eINT, {0}, export_default}, +#endif + {INT_SLP_SETTING_ACCESSIBILITY_AUTO_ANSWER, VCONFKEY_CISSAPPL_ANSWERING_MODE_TIME_INT, eINT, {0}, export_default}, + {INT_SLP_SETTING_ACCESSIBILITY_POWER_KEY_HOLD, VCONFKEY_SETAPPL_ACCESSIBILITY_POWER_KEY_HOLD, eINT, {0}, export_default}, + + //powersaving + {INT_SLP_SETTING_POWERSAVING_AT, VCONFKEY_SETAPPL_PWRSV_CUSTMODE_AT, eINT, {0}, export_default}, + {INT_SLP_SETTING_POWERSAVING_SCREEN_TIMEOUT, VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BLTIME, eINT, {0}, export_default}, + {INT_SLP_SETTING_DEVOPTION_BGPROCESS, VCONFKEY_SETAPPL_DEVOPTION_BGPROCESS, eINT, {0}, export_default}, + + {INT_SLP_SETTING_DATAUSAGE_DATA_EACH_MONTH_INT, VCONFKEY_SETAPPL_DATA_EACH_MONTH_INT, eINT, {0}, export_default}, + {SETTING_INT_SLP_LIST_MAX, NULL, eINT, {0}, export_default}, }; /** string vconf table */ -static VconfNode g_ctable[] = { - { STR_SLP_LIST_PHONE_PASSWORD, NULL, eSTRING,/* union*/ }, - { STR_SLP_LIST_PRIVACY_PASSWORD, VCONFKEY_SETAPPL_PRIVACY_PASSWD_STR, eSTRING, }, - { STR_SLP_SETTING_CALL_RINGTONE_PATH, NULL, eSTRING, }, - { STR_SLP_SETTING_MSG_RINGTONE_PATH, NULL, eSTRING, }, - { STR_SLP_SETTING_SYS_RINGTONE_PATH, NULL, eSTRING, }, - { STR_SLP_LIST_MOBILE_CONTACT_ONE,NULL, eSTRING, }, - { STR_SLP_LIST_MOBILE_CONTACT_TWO,NULL, eSTRING, }, - { STR_SLP_LIST_MOBILE_CONTACT_THREE,NULL, eSTRING, }, - { STR_SLP_LIST_MOBILE_CONTACT_FOUR,NULL, eSTRING, }, - { STR_SLP_LIST_MOBILE_CONTACT_FIVE,NULL, eSTRING, }, - { STR_SLP_LIST_MOBILE_CONTACT_SENDER,VCONFKEY_SETAPPL_FIND_MY_MOBILE_SENDER_STR, eSTRING, }, - { STR_SLP_LIST_MOBILE_CONTACT_MESSAGE,VCONFKEY_SETAPPL_FIND_MY_MOBILE_MESSAGE_STR, eSTRING, }, - { STR_SLP_LIST_MOBILE_SIM_ICCID,NULL, eSTRING, }, - { STR_SLP_SETTING_WALLPAPER_PATH,VCONFKEY_BGSET, eSTRING, }, - { STR_SLP_SETTING_LOCK_WALLPAPER_PATH,VCONFKEY_IDLE_LOCK_BGSET, eSTRING, }, - { STR_SLP_SETTING_THEME_NAME, "db/setting/selected_theme", eSTRING, }, - { STR_SLP_SETTING_PHONE_LOCK_TIMESTAMP,VCONFKEY_SETAPPL_PHONE_LOCK_TIMESTAMP_STR, eSTRING, }, - { STR_SLP_SETTING_SIM_LOCK_TIMESTAMP,VCONFKEY_SETAPPL_SIM_LOCK_TIMESTAMP_STR, eSTRING, }, +static VconfNode g_stable[] = { + /* password code - special processing */ + { STR_SLP_LIST_PHONE_PASSWORD, NULL, eSTRING,{0}, export_default }, + { STR_SLP_SETTING_PHONE_LOCK_TIMESTAMP,VCONFKEY_SETAPPL_PHONE_LOCK_TIMESTAMP_STR, eSTRING,{0}, export_default }, + { STR_SLP_SETTING_SIM_LOCK_TIMESTAMP,VCONFKEY_SETAPPL_SIM_LOCK_TIMESTAMP_STR, eSTRING,{0}, export_default }, + { STR_SLP_LIST_MAX, NULL, eSTRING, {0}, export_default}, }; +void setting_export() +{ + int i = 0; + + for (i=0;i store data into XML + g_btable[i].export(&g_btable[i]); + } + + for (i=0;i store data into XML + g_itable[i].export(&g_itable[i]); + } + + for (i=0;i store data into XML + g_stable[i].export(&g_stable[i]); + } +} int set_vconf(VconfNode node,VconfNode *result) { @@ -250,34 +253,36 @@ int set_vconf(VconfNode node,VconfNode *result) switch(node.type) { case eBOOL: + SETTING_TRACE("begin case eINT[%s=\"%d\"]", node.vconf_key, node.value.b); ret = vconf_set_bool(node.vconf_key, node.value.b); result->type = eBOOL; result->value.b = node.value.b; - SETTING_TRACE("KEY:%d VCONF_KEY=%s TYPE=%d VALUE=%d ", result->key, result->vconf_key, result->type, result->value.b); break; case eINT: - SETTING_TRACE("begin case eINT"); + SETTING_TRACE("begin case eINT[%s=\"%d\"]", node.vconf_key, node.value.i); ret = vconf_set_int(node.vconf_key, node.value.i); result->type = eINT; result->value.i = node.value.i; - SETTING_TRACE("KEY:%d VCONF_KEY=%s TYPE=%d VALUE=%d ", result->key, result->vconf_key, result->type, result->value.i); - SETTING_TRACE("end case eINT"); break; case eSTRING: if (node.key == STR_SLP_LIST_PHONE_PASSWORD) { ret = setting_store_init_password(node.value.c); } else { + SETTING_TRACE("begin case eINT[%s=\"%s\"]", node.vconf_key, node.value.c); ret = vconf_set_str(node.vconf_key, node.value.c); } result->type = eSTRING; result->value.c = node.value.c; - SETTING_TRACE("KEY:%d VCONF_KEY=%s TYPE=%d VALUE=%d ", result->key, result->vconf_key, result->type, result->value.c); break; default: - SETTING_TRACE(">>>>>>>>>> node.type is NOT DEFINED"); + SETTING_TRACE_ERROR(">>>>>>>>>> node.type is NOT DEFINED"); break; } + if (0 != ret) + { + SETTING_TRACE_ERROR(">>>>>>>>>> Failed to set vconf"); + } //SETTING_TRACE("KEY:%d VCONF_KEY=%s TYPE=%d VALUE=%d ", result->key, result->vconf_key, result->type, result->value.i); return ret; } @@ -296,7 +301,7 @@ int get_vconf(VconfNode node, VconfNode* result) switch(node.type) { case eBOOL: - ret = vconf_get_bool(node.vconf_key, &(node.value.b)); + ret = vconf_get_bool(node.vconf_key, (int *)(&(node.value.b))); result->type = eBOOL; result->value.b = node.value.b; break; @@ -438,7 +443,7 @@ int setting_get_string_slp_key(setting_str_slp_list key, char *value, int *err) /** @todo check memory leack when passwork checking */ VconfNode result; - ret = get_vconf(g_ctable[key], &result); + ret = get_vconf(g_stable[key], &result); if (ret >= 0) { @@ -464,9 +469,9 @@ int setting_set_string_slp_key(setting_str_slp_list key, char *value, int *err) } VconfNode result; - g_ctable[key].value.c = value; - ret = set_vconf(g_ctable[key], &result); - g_ctable[key].value.c = ""; + g_stable[key].value.c = value; + ret = set_vconf(g_stable[key], &result); + g_stable[key].value.c = ""; SETTING_TRACE("setting_set_str ::: KEY:%d VCONF_KEY=%s TYPE=%d VALUE=%d ", result.key, result.vconf_key, result.type, result.value.c); *err = ret; @@ -475,22 +480,22 @@ int setting_set_string_slp_key(setting_str_slp_list key, char *value, int *err) /** @todo don't use i18n string directly. */ static const setting_lang_entry lang_table[] = { - { SETTING_LANG_AUTOMATIC, "auto", "Automatic"}, - { SETTING_LANG_KOREA, "ko_KR.UTF-8", "한국어"}, - { SETTING_LANG_ENGLISH, "en_US.UTF-8", "English"}, - { SETTING_LANG_CHINA, "zh_CN.UTF-8", "简体中文"}, - { SETTING_LANG_CANTONESE, "zh_HK.UTF-8", "繁體中文(香港)"}, - { SETTING_LANG_TAIWAN, "zh_TW.UTF-8", "繁體中文(台灣)"}, - { SETTING_LANG_GERMAN, "de_DE.UTF-8", "Deutsch"}, - { SETTING_LANG_DUTCH, "nl_NL.UTF-8", "Nederlands"}, - { SETTING_LANG_SPAINISH, "es_ES.UTF-8", "Español"}, - { SETTING_LANG_PORTUGUESE, "pt_PT.UTF-8", "Português"}, - { SETTING_LANG_GREEK, "el_GR.UTF-8", "Eλληνικά"}, - { SETTING_LANG_ITALIAN, "it_IT.UTF-8", "Italiano"}, - { SETTING_LANG_FRENCH, "fr_FR.UTF-8", "Français"}, - { SETTING_LANG_TURKISH, "tr_TR.UTF-8", "Türkçe"}, - { SETTING_LANG_JAPAN, "ja_JP.UTF-8", "にほんご"}, - { SETTING_LANG_RUSSIAN, "ru_RU.UTF-8", "Россию"}, + { "auto", "Automatic"}, + { "ko_KR.UTF-8", "한국어"}, + { "en_US.UTF-8", "English"}, + { "zh_CN.UTF-8", "简体中文"}, + { "zh_HK.UTF-8", "繁體中文(香港)"}, + { "zh_TW.UTF-8", "繁體中文(台灣)"}, + { "de_DE.UTF-8", "Deutsch"}, + { "nl_NL.UTF-8", "Nederlands"}, + { "es_ES.UTF-8", "Español"}, + { "pt_PT.UTF-8", "Português"}, + { "el_GR.UTF-8", "Eλληνικά"}, + { "it_IT.UTF-8", "Italiano"}, + { "fr_FR.UTF-8", "Français"}, + { "tr_TR.UTF-8", "Türkçe"}, + { "ja_JP.UTF-8", "にほんご"}, + { "ru_RU.UTF-8", "Россию"}, }; setting_lang_entry* setting_get_language_table() @@ -498,12 +503,142 @@ setting_lang_entry* setting_get_language_table() return (setting_lang_entry*)lang_table; } + +#define LANGLIST_FILE_DIR_PATH "/opt/data/setting/" +#define LANGLIST_FILE_PATH LANGLIST_FILE_DIR_PATH"langlist.xml" + +static void _parseLangListXML(char* docname); // internal +static void __tree_walk_langlist(xmlNodePtr cur); // internal + +static Eina_List* s_langlist; // internal + +// do it once +int _langlist_load() +{ + SETTING_TRACE_BEGIN; + + if (!s_langlist) + { + _parseLangListXML(LANGLIST_FILE_PATH); + } + + return 0; +} + +// singleton +Eina_List* setting_get_language_list() +{ + if (NULL == s_langlist) + { + _langlist_load(); + } + + return s_langlist; +} + +int _langlist_destroy() +{ + SETTING_TRACE_BEGIN; + Eina_List *li = s_langlist; + setting_lang_entry* node; + while (li) { + node = (setting_lang_entry*) eina_list_data_get(li); + if (node) + { + SETTING_TRACE("destroy nodes : locale : %s title : %s", node->locale, node->title); + G_FREE(node->locale); + G_FREE(node->title); + FREE(node); + } + li = eina_list_next(li); + } + s_langlist = eina_list_free(s_langlist); // returns NULL + + return 0; +} + +void setting_get_language_list_destroy() +{ + _langlist_destroy(); +} + +static void _parseLangListXML(char* docname) +{ + SETTING_TRACE_BEGIN; + xmlDocPtr doc; + xmlNodePtr cur; + + doc = xmlParseFile(docname); + + if (doc == NULL ) { + fprintf(stderr,"Document not parsed successfully. \n"); + return; + } + + cur = xmlDocGetRootElement(doc); + if (cur == NULL) { + fprintf(stderr,"empty document\n"); + xmlFreeDoc(doc); + return; + } + + printf("ROOT NODE : %s \n", cur->name); + // make sure root node is "settings" + if (xmlStrcmp(cur->name, (const xmlChar *) "langlist")) { + SETTING_TRACE("document of the wrong type, root node != settings"); + xmlFreeDoc(doc); + return; + } + + cur = cur->xmlChildrenNode; + __tree_walk_langlist(cur); + + /* save tree to file */ + if (doc != NULL) { + //xmlSaveFormatFile (docname, doc, 1); + xmlFreeDoc(doc); + } + //xmlFreeDoc(doc); + return; +} + +static void __tree_walk_langlist(xmlNodePtr cur) +{ + SETTING_TRACE_BEGIN; + xmlNode *cur_node = NULL; + char* id; + char* string; + int number; + + for (cur_node = cur; cur_node;cur_node = cur_node->next) { + if (cur_node->type == XML_ELEMENT_NODE) { + + SETTING_TRACE(" name=%s title=%s number=%s \n", xmlGetProp(cur_node, (const xmlChar *)"id"), xmlGetProp(cur_node, (const xmlChar *)"string"), xmlGetProp(cur_node, (const xmlChar *)"no")); + id = (char *)g_strdup((char*)xmlGetProp(cur_node, (const xmlChar *)"id")); + string = (char *)g_strdup((char*) xmlGetProp(cur_node, (const xmlChar *)"string")); + number = atoi((char*) xmlGetProp(cur_node, (const xmlChar *)"no")); + SETTING_TRACE(">>>> locale: %s title: %s", (char*)id, (char*)string); + + setting_lang_entry* pitem = (setting_lang_entry*)calloc(1, sizeof(setting_lang_entry)); + pitem->locale = id; + pitem->title = string; + pitem->number = number; + + s_langlist = eina_list_append(s_langlist, pitem); + } + } +} +//----------------------------------------------------------------------------------------------- +//----------------------------------------------------------------------------------------------- + +//setting_lang_entry* + ////////////////////////////////////////////////////////////////////////////////////////// int setting_store_init_password(char *in) { SHA256_CTX context; - char md[SHA256_DIGEST_LENGTH]; + char md[SHA256_DIGEST_LENGTH] = {0,}; /* int i = 0; */ int ret = SETTING_RETURN_FAIL; @@ -537,7 +672,7 @@ int setting_store_init_password(char *in) } else { SETTING_TRACE("ERR: pwd file is not exist \n"); } - + return ret; } @@ -548,7 +683,10 @@ int setting_read_password(char *md_result) FILE *fp = NULL; fp = fopen(PWD_FILE, "r"); if (fp) { - fread(md_result, sizeof(char), SHA256_DIGEST_LENGTH, fp); + int size = fread(md_result, sizeof(char), SHA256_DIGEST_LENGTH, fp); + if (size != SHA256_DIGEST_LENGTH) { + SETTING_TRACE_ERROR("fread failed"); + } fclose(fp); } else { SETTING_TRACE("ERR: pwd file is not exist \n"); @@ -586,3 +724,51 @@ int setting_compare_password(char *md_result, const char *in_later) } return ret; } + +void setting_destory_listen_list(Eina_List **listened_list) +{ + if (listened_list && *listened_list) + { + Vconf_Change_Node *node = NULL; + Eina_List *li = *listened_list; + while (li) { + node = (Vconf_Change_Node *) eina_list_data_get(li); + if (node) + { + SETTING_TRACE("Deregister callback[%p] of %s", node->cb, node->in_key); + if (node->in_key && node->cb) { + (void)vconf_ignore_key_changed(node->in_key, node->cb); + FREE(node); + } + } + li = eina_list_next(li); + } + *listened_list = eina_list_free(*listened_list); + } +} + +bool setting_add_listen_node(Eina_List **listened_list,const char *vconf, vconf_callback_fn cb, void *data) +{ + Vconf_Change_Node *node = calloc(1, sizeof(Vconf_Change_Node)); + bool ret = TRUE; + if (node && vconf && cb) + { + node->in_key = vconf; + node->cb = cb; + node->cb_data = data; + + if(0 == vconf_notify_key_changed(vconf, cb, data)) + { + SETTING_TRACE("Register callback[%p] of %s", node->cb, node->in_key); + *listened_list = eina_list_append(*listened_list, node); + } + else + { + SETTING_TRACE_ERROR("Failed to register callback[%p] of %s", node->cb, node->in_key); + ret = FALSE; + } + } + return ret; +} + + diff --git a/setting-common/src/setting-common-draw-genlist.c b/setting-common/src/setting-common-draw-genlist.c new file mode 100755 index 0000000..0899e6c --- /dev/null +++ b/setting-common/src/setting-common-draw-genlist.c @@ -0,0 +1,1621 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#include +#include + +#define EXCEED_LIMITATION_STR "Name is too long." + +static Evas_Object *_gl_Gendial_content_get(void *data, Evas_Object *obj, const char *part); +static char *_gl_Gendial_text_get(void *data, Evas_Object *obj, const char *part); +static void _gl_Gendial_del(void *data, Evas_Object *obj); +const Elm_Genlist_Item_Class itc_seperator = { + .item_style = "dialogue/separator/21/with_line", + .func.text_get = NULL, + .func.content_get = NULL, + .func.state_get = NULL, + .func.del = NULL, +}; + +const Elm_Genlist_Item_Class itc_bottom_seperator = { + .item_style = "dialogue/separator/20", + .func.text_get = NULL, + .func.content_get = NULL, + .func.state_get = NULL, + .func.del = NULL, +}; + +const Elm_Genlist_Item_Class itc_sep_line = { + .item_style = "dialogue/separator/1/with_line", + .func.text_get = _gl_Gendial_text_get, + .func.content_get = NULL, + .func.state_get = NULL, + .func.del = NULL, +}; + +#define DEFINE_ITC1(style, name) \ +const Elm_Genlist_Item_Class name = {\ + .item_style = style,\ + .func.text_get = _gl_Gendial_text_get,\ + .func.content_get = _gl_Gendial_content_get,\ + .func.state_get = NULL,\ + .func.del = _gl_Gendial_del,\ +}; + +DEFINE_ITC1("dialogue/1text", itc_1text); +DEFINE_ITC1("dialogue/1text.1icon.2", itc_1text_1icon_2); + +DEFINE_ITC1("dialogue/1icon", itc_1icon); +DEFINE_ITC1("dialogue/1text.1icon/expandable2", itc_1icon_1text_sub); +DEFINE_ITC1("dialogue/1text.1icon", itc_1text_1icon); +DEFINE_ITC1("dialogue/1text.2icon", itc_1text_2icon); +DEFINE_ITC1("dialogue/1text.2icon.2", itc_1text_2icon_2); + +DEFINE_ITC1("dialogue/2text.2", itc_2text_2); +DEFINE_ITC1("dialogue/2text", itc_2text); +DEFINE_ITC1("multiline/2text.1icon", itc_multiline_2text_1icon); +DEFINE_ITC1("dialogue/2text.1icon.3", itc_2text_1icon_3); +DEFINE_ITC1("dialogue/2text.1icon.6", itc_2text_1icon_6); +DEFINE_ITC1("dialogue/2text.1icon.7", itc_2text_1icon_7); + +DEFINE_ITC1("dialogue/2text.3/expandable", itc_2text_3_parent); +DEFINE_ITC1("dialogue/2text.3", itc_2text_3); +DEFINE_ITC1("dialogue/2text.2icon.3", itc_2text_2icon_3); + +DEFINE_ITC1("multiline/1text", itc_multiline_text); +DEFINE_ITC1("1text.1icon.2", itc_cm_1text_1icon_2); +DEFINE_ITC1("select_all", itc_sel_all); +DEFINE_ITC1("dialogue/bg/1icon", itc_bg_1icon); +DEFINE_ITC1("dialogue/title", itc_group_item); + +/** + * Do process when clicking on a common genlist item + */ +void setting_mouse_up_Gendial_list_radio_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + setting_retm_if(data == NULL, "Data parameter is NULL"); + Evas_Object *radio = data; + elm_radio_value_set(radio, list_item->chk_status); +} + +static void __radio_changed(void *data, Evas_Object *obj, void *event_info) +{ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + list_item->chk_status = elm_radio_value_get(obj); /* for update */ +} + +static void __entry_changed(void *data, Evas_Object *obj, void *event_info) +{ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + list_item->sub_desc = (char *)g_strdup(elm_entry_entry_get(obj)); + Evas_Object *entry_container = elm_object_parent_widget_get(obj); + if (entry_container) + { + if (elm_entry_is_empty(obj)) + { + elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm"); + elm_object_signal_emit(entry_container, "elm,state,eraser,hide", "elm"); + } + else + { + elm_object_signal_emit(entry_container, "elm,state,guidetext,hide", "elm"); + elm_object_signal_emit(entry_container, "elm,state,eraser,show", "elm"); + } + } +} + +static void __entry_unfocused(void *data, Evas_Object *obj, void *event_info) // Unfocused callback will show guidetext and hide X marked button. +{ + ret_if(!data); + Evas_Object *entry_container = data; + //whe entry unfocused, its guidetext will becomes "Input here" + elm_object_part_text_set(entry_container, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + if (elm_entry_is_empty(obj)) + elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm"); + elm_object_signal_emit(entry_container, "elm,state,eraser,hide", "elm"); +} +static void __entry_focused(void *data, Evas_Object *obj, void *event_info) // Focused callback will show X marked button and hide guidetext. +{ + ret_if(!data); + Evas_Object *entry_container = data; + //whe entry focused, its guidetext will becomes "Input here" + elm_object_part_text_set(entry_container, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + if (!elm_entry_is_empty(obj)) + elm_object_signal_emit(entry_container, "elm,state,eraser,show", "elm"); + elm_object_signal_emit(entry_container, "elm,state,guidetext,hide", "elm"); +} +static void __eraser_clicked(void *data, Evas_Object *obj, const char *emission, const char *source) // When X marked button is clicked, empty entry's contents. +{ + ret_if(!data); + Evas_Object *entry = data; + elm_entry_entry_set(entry, ""); + elm_object_focus_set(entry, EINA_TRUE); +} + +static void __chk_changed(void *data, Evas_Object *obj, void *event_info) +{ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + list_item->chk_status = elm_check_state_get(obj); /* for update */ +} + +static void __error_popup_response_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = data; + if (list_item->notify) { + evas_object_del(list_item->notify); + list_item->notify = NULL; + } +} + +static void __max_len_reached(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + retm_if(!elm_object_focus_get(obj), "Entry is not focused");//notify only when entry is being focused on. + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + if (!list_item->notify) + { + list_item->notify = setting_create_popup_without_btn(list_item, list_item->win_main, + NULL, _(EXCEED_LIMITATION_STR), + __error_popup_response_cb, + POPUP_INTERVAL, FALSE, FALSE); + elm_object_focus_set(list_item->eo_check, EINA_FALSE); + } else { + //postpone 2 seconds again + elm_popup_timeout_set(list_item->notify, POPUP_INTERVAL); + } + +} + + +/** + * Do process when clicking radio in subitem of expandable item + */ +void setting_sub_list_rd_change(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + list_item->chk_status = elm_radio_value_get(obj); /* for update */ + + Elm_Object_Item *subItem = list_item->item; + Elm_Object_Item *parentItem = elm_genlist_item_parent_get(subItem); + + Setting_GenGroupItem_Data *data_subItem = elm_object_item_data_get(subItem); /* subItem data */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + + ret_if(NULL == data_subItem || NULL == data_parentItem); + int err; + setting_set_int_slp_key(data_parentItem->int_slp_setting_binded, + list_item->chk_status, &err); + ret_if(0 != err); + data_parentItem->sub_desc = (char *)g_strdup(_(data_subItem->keyStr)); + elm_object_item_data_set(data_parentItem->item, data_parentItem); + elm_genlist_item_update(data_parentItem->item); +} + +/** + * Do process when clicking on subitem of expandable item + */ +void setting_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *subitem = (Elm_Object_Item *) event_info; + Elm_Object_Item *parentItem = elm_genlist_item_parent_get(subitem); + elm_genlist_item_selected_set(subitem, 0); + Setting_GenGroupItem_Data *data_subItem = + elm_object_item_data_get(subitem); + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + ret_if(NULL == data_subItem || NULL == data_parentItem); + + elm_radio_value_set(data_subItem->rgd, data_subItem->chk_status); + int err; + setting_set_int_slp_key(data_parentItem->int_slp_setting_binded, + data_subItem->chk_status, &err); + setting_retm_if(0 != err, "Set vconf error[%d]",data_parentItem->int_slp_setting_binded); + + data_parentItem->sub_desc = (char *)g_strdup(_(data_subItem->keyStr)); + elm_object_item_data_set(data_parentItem->item, data_parentItem); + elm_genlist_item_update(data_parentItem->item); +} + +static void __exp_list_smart_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(data == NULL || event_info == NULL); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + char *cb_type = data; + + if (0 == safeStrCmp(cb_type, "drag") + || 0 == safeStrCmp(cb_type, "longpressed")) { + //Evas_Object *base_view = (Evas_Object *) elm_genlist_item_object_get(item); + //edje_object_signal_emit(base_view, "mouse,out", "touch_arrow"); + } else if (0 == safeStrCmp(cb_type, "contracted")) { + elm_genlist_item_subitems_clear(item); + } +} + +static void _gl_Gendial_sel(void *data, Evas_Object *obj, void *event_info) +{ + /* SETTING_TRACE_BEGIN; */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); +} + +static void _gl_Gendial_sel_expand(void *data, Evas_Object *obj, + void *event_info) +{ + /* SETTING_TRACE_BEGIN; */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + bool status = !elm_genlist_item_expanded_get(item); + elm_genlist_item_expanded_set(item, status); +} + +static char *_gl_Gendial_text_get(void *data, Evas_Object *obj, + const char *part) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) data; + /* SETTING_TRACE("part:%s", part); */ + if (SWALLOW_Type_LAYOUT_ENTRY == item_data->swallow_type) { /* no need to create 'text' part */ + return NULL; + } + + /* for font size view */ + if (SWALLOW_Type_1RADIO_1LABLE == item_data->swallow_type) { + char speciliztion[MAX_SPECIALIZITION_LEN] = {0,}; + int font_size = -1; + SETTING_TRACE("item_data->chk_status:%d", item_data->chk_status); + if (SYSTEM_SETTINGS_FONT_SIZE_SMALL == item_data->chk_status) { + font_size = LABEL_FONT_SIZE_SMALL; + } else if (SYSTEM_SETTINGS_FONT_SIZE_LARGE == item_data->chk_status) { + font_size = LABEL_FONT_SIZE_LARGE; + } else if (SYSTEM_SETTINGS_FONT_SIZE_HUGE == item_data->chk_status) { + font_size = LABEL_FONT_SIZE_HUGE; + } else if (SYSTEM_SETTINGS_FONT_SIZE_GIANT == item_data->chk_status) { + font_size = LABEL_FONT_SIZE_GIANT; + } else { + font_size = LABEL_FONT_SIZE_NORMAL; + } + SETTING_TRACE("font_size:%d", font_size); + snprintf(speciliztion, sizeof(speciliztion), "%s", + font_size, _(item_data->keyStr)); + return (char *)g_strdup(speciliztion); + } + + if (!safeStrCmp(part, "elm.text") || !safeStrCmp(part, "elm.text.1")) { /* title */ + if (item_data->keyStr) { + return (char *)g_strdup(_(item_data->keyStr)); /* use item_data->keyStr */ + } + + } else if (!safeStrCmp(part, "elm.text.2")) { /* bottom or right */ + if (item_data->sub_desc) { + return (char *)g_strdup(item_data->sub_desc); + } + } + + return NULL; +} + +static Evas_Object *__add_check(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *check = elm_check_add(parent); + elm_check_state_set(check, item_data->chk_status); + evas_object_show(check); + evas_object_pass_events_set(check, 1); + evas_object_propagate_events_set(check, 0); + + item_data->eo_check = check; + + if (item_data->chk_change_cb) { + evas_object_smart_callback_add(check,"changed",item_data->chk_change_cb,item_data); + } else { + evas_object_smart_callback_add(check,"changed", __chk_changed, item_data); + } + return check; +} +static Evas_Object *__add_check_icon(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *check = __add_check(item_data, parent); + + Evas_Object *thumb = NULL; + if (item_data->r_swallow_path) { + thumb = elm_icon_add(parent); + elm_icon_file_set(thumb, + item_data->r_swallow_path, + NULL); + evas_object_size_hint_aspect_set(thumb, + EVAS_ASPECT_CONTROL_VERTICAL, + 1, 1); + } + + Evas_Object *layout = elm_layout_add(parent); + elm_layout_file_set(layout, SETTING_THEME_EDJ_NAME, + "thumbnail_icon2"); + evas_object_size_hint_weight_set(layout, + EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_object_part_content_set(layout, "checkbox", check); + elm_object_part_content_set(layout, "thumbnail", thumb); + evas_object_show(layout); + return layout; +} +static Evas_Object *__add_toggle(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *check = __add_check(item_data, parent); + elm_object_style_set(check, "on&off"); + return check; +} +static Evas_Object *__add_multiline_toggle(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *chk = __add_toggle(item_data, parent); + elm_object_style_set(chk, "on&off"); + return chk; +} + +static Evas_Object *__add_radio(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + if (!item_data->rgd) { /* exceptional handling */ + item_data->rgd = elm_radio_add(parent); + elm_radio_state_value_set(item_data->rgd, -1); + } + Evas_Object *radio = elm_radio_add(parent); + elm_radio_state_value_set(radio, + item_data->chk_status); + elm_radio_group_add(radio, item_data->rgd); + evas_object_show(radio); + item_data->eo_check = radio; + if (item_data->chk_change_cb) { + evas_object_smart_callback_add(radio, + "changed", + item_data->chk_change_cb, + item_data); + } else { + evas_object_smart_callback_add(radio, + "changed", + __radio_changed, + item_data); + } + return radio; +} +static Evas_Object *__add_button(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *btn = elm_button_add(parent); + evas_object_show(btn); + if (item_data->r_swallow_path) + { + elm_object_style_set(btn, item_data->r_swallow_path); + } + if (item_data->keyStr) + { + elm_object_text_set(btn, _(item_data->keyStr)); + } + evas_object_propagate_events_set(btn, EINA_FALSE); + if (item_data->chk_change_cb) + evas_object_smart_callback_add(btn, + "clicked", + item_data->chk_change_cb, + item_data); + return btn; +} +static Evas_Object *__add_entry(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + elm_genlist_mode_set(parent, ELM_LIST_COMPRESS); /* resolve abnormal height issue */ + Evas_Object *ed_name = + setting_create_editfiled(parent, _(item_data->keyStr), + item_data->sub_desc); + Evas_Object *entry = elm_object_part_content_get(ed_name, "elm.swallow.content"); + item_data->eo_check = entry; + elm_entry_input_panel_layout_set(entry, + item_data->input_type); + + if (item_data->isSinglelineFlag) { + elm_entry_single_line_set(entry, EINA_TRUE); + } + + if (item_data->isPasswordFlag) { + elm_entry_single_line_set(entry, EINA_TRUE); + elm_entry_password_set(entry, EINA_TRUE); + } + + if (item_data->limit_filter_data) { + elm_entry_markup_filter_append + (entry, + elm_entry_filter_limit_size, + item_data->limit_filter_data); + + evas_object_smart_callback_add(entry, + "maxlength,reached", + __max_len_reached, + item_data); + + } + if (item_data->stop_change_cb) {//invoked when stop focusing on + evas_object_smart_callback_add(entry, + "unfocused", + item_data->stop_change_cb, + item_data); + } + else + { + evas_object_smart_callback_add(entry, + "unfocused", + __entry_unfocused, + ed_name); + } + if (item_data->digits_filter_data) { + elm_entry_markup_filter_append + (entry, + elm_entry_filter_accept_set, + item_data->digits_filter_data); + } + + /* for Setting App, All the entrys's context popup shouldn't be able */ + /* to insert images, text is the only one can be inserted. */ + elm_entry_cnp_mode_set(entry, ELM_CNP_MODE_PLAINTEXT); + + if (item_data->chk_change_cb) { + evas_object_smart_callback_add + (entry, + "changed", item_data->chk_change_cb, + item_data); + } + //default handle + evas_object_smart_callback_add(entry, "changed", __entry_changed, item_data); + evas_object_smart_callback_add(entry, "focused", __entry_focused, ed_name); + elm_object_signal_callback_add(ed_name, "elm,eraser,clicked", "elm", __eraser_clicked, entry); + + if (item_data->input_panel_disable_flag) { + elm_entry_input_panel_enabled_set(entry, EINA_FALSE); + } + return ed_name; +} +static Evas_Object *__add_slider(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *li_slider = + setting_create_slider(parent, item_data->evas, + item_data->l_swallow_path, + item_data->r_swallow_path, + item_data->chk_status, + item_data->isIndicatorVisible, + item_data->slider_min, + item_data->slider_max, + item_data->chk_change_cb, + item_data->start_change_cb, + item_data->stop_change_cb, + item_data); + evas_object_pass_events_set(li_slider, 1); + evas_object_propagate_events_set(li_slider, 0); + item_data->eo_check = li_slider; + return li_slider; +} + +static Evas_Object *__add_datefield(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + /* **********create time/date field */ + Evas_Object *datetimefield = item_data->eo_check = elm_datetime_add(parent); + evas_object_size_hint_weight_set(datetimefield, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(datetimefield, EVAS_HINT_FILL, 0.5); + evas_object_show(datetimefield); + + char date_format[MAX_DATETIME_FORMAT_LEN + 1] = {0, }; + const char *time_format = NULL; + if (item_data->chk_status)//12 hours + { + time_format = "%I : %M %p"; + } else { //24 hours + time_format = "%H : %M"; + } + +#if SUPPORT_DATEFIELD_DATE_FORMAT_AUTOSET //Get date-format from datefiled itself, if elm_datetime_add() supports set date-format via ICU. + char *old_format = elm_datetime_format_get(datetimefield); + snprintf(date_format, MAX_DATE_FORMAT_LEN + 1, //add one space " " + "%s", old_format); + safeStrNCat(date_format, time_format, MAX_DATETIME_FORMAT_LEN); + FREE(old_format); + SETTING_TRACE("datefield_format:%s", date_format); +#else + snprintf(date_format, MAX_DATETIME_FORMAT_LEN, + "%s %s", item_data->sub_desc, time_format); +#endif + elm_datetime_format_set(datetimefield, date_format); + + // min : 1970 1, 01, Thursday 00:00:00 + // max : 2038 1, 19, Thursday 03:14:07 + struct tm ts_ret; + memset(&ts_ret, 0, sizeof(struct tm)); + ts_ret.tm_year = 138; + ts_ret.tm_mon = 1; + ts_ret.tm_mday = 19; + elm_datetime_value_max_set(datetimefield, &ts_ret); + + ts_ret.tm_year = 70; + ts_ret.tm_mon = 0; + ts_ret.tm_mday = 1; + elm_datetime_value_min_set(datetimefield, &ts_ret); + + + time_t ctime = time(NULL); + //struct tm ts_ret; + struct tm *ts = localtime_r(&ctime, &ts_ret); + retv_if(!ts, NULL); + + elm_datetime_value_set(datetimefield, &ts_ret); + + if (item_data->chk_change_cb) { + evas_object_smart_callback_add(datetimefield, + "changed", + item_data->chk_change_cb, + item_data); + } + + if (item_data->isItemDisableFlag) { + setting_disable_evas_object(datetimefield); + } + return datetimefield; +} +static Evas_Object *__add_radio_search(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *box = elm_box_add(parent); + elm_box_horizontal_set(box, 1); + + //a.radio.. + Evas_Object *radio = __add_radio(item_data, parent); + setting_disable_evas_object(radio); + elm_box_pack_end(box, radio); + + //b.separator.. + Evas_Object *separator = + setting_create_blank_rect_customize(box, + SETTING_HALF_SCREEN_WIDTH, + SETTING_PADDING_HEIGHT); + elm_box_pack_end(box, separator); + + //c.progressbar.. + Evas_Object *progressbar = elm_progressbar_add(parent); + elm_object_style_set(progressbar, "list_process"); + evas_object_size_hint_align_set(progressbar, + EVAS_HINT_FILL, 0.5); + evas_object_size_hint_weight_set(progressbar, + EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_progressbar_pulse(progressbar, EINA_TRUE); + evas_object_show(progressbar); + elm_box_pack_end(box, progressbar); + + evas_object_show(box); + return box; +} +static Evas_Object *__add_search(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + // added by JTS: CQ H0100135171 + Evas_Object *box = elm_box_add(parent); + elm_box_horizontal_set(box, 1); + + //b.separator.. + Evas_Object *separator = + setting_create_blank_rect_customize(box, + SETTING_HALF_SCREEN_WIDTH, SETTING_PADDING_HEIGHT); + elm_box_pack_end(box, separator); + + //c.progressbar.. + Evas_Object *progressbar = elm_progressbar_add(parent); + elm_object_style_set(progressbar, "list_process"); + evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, 0.5); + evas_object_size_hint_weight_set(progressbar, + EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_progressbar_pulse(progressbar, EINA_TRUE); + evas_object_show(progressbar); + elm_box_pack_end(box, progressbar); + + evas_object_show(box); + return box; + +} +static Evas_Object *__add_process(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + Evas_Object *progressbar = elm_progressbar_add(parent); + elm_object_style_set(progressbar, "list_process"); + evas_object_size_hint_align_set(progressbar, + EVAS_HINT_FILL, 0.5); + evas_object_size_hint_weight_set(progressbar, + EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_progressbar_pulse(progressbar, EINA_TRUE); + evas_object_show(progressbar); + return progressbar; +} + +static Evas_Object *__add_radio_lable(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent, NULL); + + //a.radio.. + Evas_Object *radio = __add_radio(item_data, parent); + + return radio; +} + +static Evas_Object *__add_left_default(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent || !item_data->l_swallow_path, NULL); + Evas_Object *icon = elm_icon_add(parent); + elm_icon_file_set(icon, item_data->l_swallow_path,NULL); + evas_object_size_hint_aspect_set(icon,EVAS_ASPECT_CONTROL_VERTICAL,1, 1); + return icon; +} +static Evas_Object *__add_right_default(Setting_GenGroupItem_Data *item_data, Evas_Object *parent) +{ + retv_if(!item_data || !parent || !item_data->r_swallow_path, NULL); + Evas_Object *icon = elm_icon_add(parent); + elm_icon_file_set(icon, item_data->r_swallow_path,NULL); + evas_object_size_hint_aspect_set(icon,EVAS_ASPECT_CONTROL_VERTICAL,1, 1); + return icon; +} + +// draw handler +typedef Evas_Object * (*__drawer_fp)(Setting_GenGroupItem_Data *item_data, Evas_Object *parent); +typedef struct +{ + SWALLOW_Type type; // ui type + __drawer_fp draw; +} __Content_Drawer; +static __Content_Drawer __cd_left[SWALLOW_Type_MAX] = { + //base objects + {SWALLOW_Type_1CHECK, __add_check}, + {SWALLOW_Type_1TOGGLE, __add_toggle}, + {SWALLOW_Type_1RADIO, __add_radio}, + {SWALLOW_Type_1BUTTON, __add_button}, + + //base objects in an layout + {SWALLOW_Type_LAYOUT_ENTRY, __add_entry}, + {SWALLOW_Type_LAYOUT_SLIDER, __add_slider}, + {SWALLOW_Type_LAYOUT_DATEFIELD, __add_datefield}, + + //other compelx objects + {SWALLOW_Type_1SEARCH, __add_search}, + {SWALLOW_Type_1PROCESS, __add_process}, + {SWALLOW_Type_MULTILINE_1TOGGLE, __add_multiline_toggle}, + {SWALLOW_Type_1CHECKICON, __add_check_icon}, + {SWALLOW_Type_1RADIO_1SEARCH, __add_radio_search}, + {SWALLOW_Type_1RADIO_1LABLE, __add_radio_lable}, + + //left part object of the type + {SWALLOW_Type_1ICON_1RADIO, __add_left_default}, + {SWALLOW_Type_1RADIO_1PROCESS, __add_radio}, +}; +static __Content_Drawer __cd_right[SWALLOW_Type_MAX] = { + //right part object of the type + {SWALLOW_Type_1ICON_1RADIO, __add_toggle}, + {SWALLOW_Type_1RADIO_1PROCESS, __add_process}, +}; + +static __Content_Drawer __cd_end[SWALLOW_Type_MAX] = { + //end part object of the type + {SWALLOW_Type_1RADIO, __add_radio}, +}; +/*static __Part_Drawer __pd[__MAX_PART_NUM] = { + {"elm.icon", __cd_left}, + {"elm.icon.1", __cd_left}, + {"elm.icon.2", __cd_right}, + {"elm.swallow.end", __cd_end}, +};*/ + +static Evas_Object *_gl_Gendial_content_get(void *data, Evas_Object *obj, + const char *part) +{ + retv_if(!data, NULL); + Setting_GenGroupItem_Data *item_data = data; + retv_if(!data, NULL); + __Content_Drawer *cd_list = NULL; + __drawer_fp fp = NULL; + if (!safeStrCmp(part, "elm.icon") || !safeStrCmp(part, "elm.icon.1")) + { + fp = __add_left_default; //hold default drawer + cd_list = __cd_left; + } + else if (!safeStrCmp(part, "elm.icon.2")) + { + fp = __add_right_default; //hold default drawer + cd_list = __cd_right; + } + else if (!safeStrCmp(part, "elm.swallow.end")) + { + //the default value of fp is NULL here + cd_list = __cd_end; + } + if (!cd_list) return NULL;//invalid part + + int idx = 0; + for (; idx < SWALLOW_Type_MAX; idx++) + { + if (item_data->swallow_type == cd_list[idx].type)//match using swallow type + { + fp = cd_list[idx].draw; + break; + } + } + return fp ? fp(item_data, obj) : NULL; +} + +static void _gl_Gendial_del(void *data, Evas_Object *obj) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) data; + if (item_data) { + G_FREE(item_data->keyStr); + G_FREE(item_data->sub_desc); + G_FREE((item_data->l_swallow_path)); + G_FREE((item_data->r_swallow_path)); + G_FREE(item_data->item_style); + + + if (item_data->digits_filter_data) + { + G_FREE(item_data->digits_filter_data->accepted); + G_FREE(item_data->digits_filter_data->rejected); + FREE(item_data->digits_filter_data); + + } + + if (item_data->notify) { + evas_object_del(item_data->notify); + item_data->notify = NULL; + } + + FREE(item_data->limit_filter_data); + __BACK_POINTER_UNSET(item_data); + FREE(item_data); + } + /* SETTING_TRACE_END; */ +} + +/** + * To intialize an Elm_Genlist_Item_Class, according to item style + * + * @param[in] item_style + * @param[in/out] itc + */ +bool setting_create_Gendial_itc(const char *item_style, + Elm_Genlist_Item_Class *itc) +{ + itc->item_style = item_style; + itc->func.text_get = _gl_Gendial_text_get; + itc->func.content_get = _gl_Gendial_content_get; + itc->func.state_get = NULL; + itc->func.del = _gl_Gendial_del; /* _gl_Gendial_del; */ + return TRUE; +} + +/** + * Create group style item + * + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_field_group_titleItem(Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + Elm_Object_Item *parent, + Elm_Genlist_Item_Type flag, /* ELM_GENLIST_ITEM_GROUP or ELM_GENLIST_ITEM_NONE */ + const char *keyStr, + setting_call_back_func gl_sel) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, parent, + flag, gl_sel, NULL); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, parent, + flag, _gl_Gendial_sel, NULL); + } + return item_data; +} + +/** + * Create separator style item with title + * + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_field_titleItem( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + const char *keyStr, + setting_call_back_func gl_sel) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, gl_sel, + NULL); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, + _gl_Gendial_sel, NULL); + } + return item_data; +} + +/** + * Create 1radio-1text style item + * + * @return a pointer to Setting_GenGroupItem_Data + */ + +Setting_GenGroupItem_Data *setting_create_Gendial_field_1radio( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + Evas_Object *rgd, int chk_status, + const char *keyStr, + setting_call_back_func chk_change_cb) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + item_data->swallow_type = swallow_type; + item_data->chk_status = chk_status; + item_data->chk_change_cb = chk_change_cb; + item_data->rgd = rgd; + + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, gl_sel, + sel_data); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, + _gl_Gendial_sel, sel_data); + } + return item_data; +} + +Setting_GenGroupItem_Data *setting_create_Gendial_field_2radio( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + Evas_Object *rgd, int chk_status, + const char *keyStr, + const char *sub_desc, + setting_call_back_func chk_change_cb) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + item_data->sub_desc = (char *)g_strdup(sub_desc); + item_data->swallow_type = swallow_type; + item_data->chk_status = chk_status; + item_data->chk_change_cb = chk_change_cb; + item_data->rgd = rgd; + + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, gl_sel, + sel_data); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, + _gl_Gendial_sel, sel_data); + } + return item_data; +} + +/** + * Create common style item with menu icon + * + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_field_groupitem( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + Elm_Object_Item *parent, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + char *l_icon_path, + char *r_icon_path, int chk_status, + const char *keyStr, char *sub_desc, + setting_call_back_func + chk_change_cb) +{ +// SETTING_TRACE_BEGIN; + Setting_GenGroupItem_Data *item_data = ( + Setting_GenGroupItem_Data *) calloc(1, sizeof(Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + + /* to do formatting customizition in one place */ + if (SWALLOW_Type_LAYOUT_SPECIALIZTION == swallow_type + || SWALLOW_Type_LAYOUT_SPECIALIZTION_X == swallow_type) { + elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS); + + char speciliztion[MAX_SPECIALIZITION_LEN] = { 0, }; + //char *temp1 = setting_customize_text(keyStr, 0, "#9C9C9C", "left"); + char* temp1 = (char *)keyStr; + char*temp2 = strchr(temp1, '&'); + char* temp = NULL; + + while (NULL != temp2) { + if (0 == safeStrNCmp(temp2, "&", strlen("&")) ||//'&' + 0 == safeStrNCmp(temp2, "<", strlen("<")) ||//'<' + 0 == safeStrNCmp(temp2, ">", strlen(">")) ||//'>' + 0 == safeStrNCmp(temp2, """, strlen(""")) ||//double quotes + 0 == safeStrNCmp(temp2, "'", strlen("'")) ||//single quotes + 0 == safeStrNCmp(temp2, " ", strlen(" ")) ||//space character + 0 == safeStrNCmp(temp2, "©", strlen("©")) ||//copyright character + 0 == safeStrNCmp(temp2, "®", strlen("®"))//registeration character + ) {//escape character,do nothing + temp = temp2 + 1; + if ('\0' == temp[0]) break; + temp2 = strchr(temp, '&'); + } + else + { + g_strlcat(speciliztion, temp1, temp2 - temp1 +1); + g_strlcat(speciliztion, "&", MAX_SPECIALIZITION_LEN); + temp1 = temp2 + 1; + if ('\0' == temp1[0]) break; + temp2 = strchr(temp1, '&'); + } + } + if ('\0' != temp1[0]) { + g_strlcat(speciliztion, temp1, MAX_SPECIALIZITION_LEN); + } + + + item_data->keyStr = (char *)g_strdup(speciliztion); + } else { + item_data->keyStr = (char *)g_strdup(keyStr); + } + + item_data->sub_desc = (char *)g_strdup(sub_desc); + item_data->swallow_type = swallow_type; + item_data->l_swallow_path = (char *)g_strdup(l_icon_path); + item_data->r_swallow_path = (char *)g_strdup(r_icon_path); + item_data->chk_status = chk_status; + item_data->chk_change_cb = chk_change_cb; + + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, parent, + ELM_GENLIST_ITEM_NONE, gl_sel, + sel_data); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, parent, + ELM_GENLIST_ITEM_NONE, + _gl_Gendial_sel, sel_data); + } + if (SWALLOW_Type_LAYOUT_SPECIALIZTION == swallow_type) { + Elm_Object_Item *item = elm_genlist_item_append(genlist, + &(itc_sep_line), + NULL, NULL, + ELM_GENLIST_ITEM_NONE, + NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + //Fix the separator line disappear issue when clicking "SPECIALIZTION" words in new HD theme + elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } + + return item_data; +} + +/** + * Common function to create a genlist item + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_field_def(Evas_Object * + genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func + gl_sel, + void *sel_data, + SWALLOW_Type + swallow_type, + char *l_icon_path, + char *r_icon_path, + int chk_status, + const char *keyStr, + char *sub_desc, + setting_call_back_func chk_change_cb) +{ + return setting_create_Gendial_field_groupitem(genlist, itc, NULL, + gl_sel, sel_data, + swallow_type, l_icon_path, + r_icon_path, chk_status, + keyStr, sub_desc, + chk_change_cb); +} + +/** + * Create 1entry style item + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_field_entry(Evas_Object * + genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type + swallow_type, + char *l_icon_path, + char *r_icon_path, + int chk_status, + const char *keyStr, + char *sub_desc, + setting_call_back_func + chk_change_cb, + Elm_Input_Panel_Layout + input_type, + bool isPasswordFlag, + bool isFocusFlag, + int max_char_count, + int max_byte_count, + char *accepted, + char *rejected) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) calloc(1, + sizeof (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + item_data->sub_desc = (char *)g_strdup(sub_desc); + item_data->swallow_type = swallow_type; + item_data->l_swallow_path = (char *)g_strdup(l_icon_path); + item_data->r_swallow_path = (char *)g_strdup(r_icon_path); + item_data->chk_status = chk_status; + item_data->chk_change_cb = chk_change_cb; + + item_data->input_type = input_type; + item_data->isPasswordFlag = isPasswordFlag; + item_data->isFocusFlag = isFocusFlag; + + Elm_Entry_Filter_Accept_Set *digits_filter_data = + (Elm_Entry_Filter_Accept_Set *) calloc(1, sizeof (Elm_Entry_Filter_Accept_Set)); + if(!digits_filter_data) { + SETTING_TRACE_ERROR("calloc Elm_Entry_Filter_Accept_Set failed"); + // free allocated data + G_FREE(item_data->keyStr); + G_FREE(item_data->sub_desc); + G_FREE(item_data->l_swallow_path); + G_FREE(item_data->r_swallow_path); + FREE(item_data); + return NULL; + } + + + Elm_Entry_Filter_Limit_Size *limit_filter_data = + (Elm_Entry_Filter_Limit_Size *) calloc(1, sizeof (Elm_Entry_Filter_Limit_Size)); + if(!limit_filter_data) { + SETTING_TRACE_ERROR("calloc Elm_Entry_Filter_Limit_Size failed"); + + // free allocated data + G_FREE(item_data->keyStr); + G_FREE(item_data->sub_desc); + G_FREE(item_data->l_swallow_path); + G_FREE(item_data->r_swallow_path); + FREE(item_data); + FREE(digits_filter_data); + return NULL; + } + + limit_filter_data->max_char_count = max_char_count; + limit_filter_data->max_byte_count = max_byte_count; + digits_filter_data->accepted = (char *)g_strdup(accepted); + digits_filter_data->rejected = (char *)g_strdup(rejected); + + item_data->digits_filter_data = digits_filter_data; + item_data->limit_filter_data = limit_filter_data; + item_data->userdata = sel_data; + + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, gl_sel, + sel_data); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_NONE, + _gl_Gendial_sel, sel_data); + } + return item_data; +} + +/** + * General function to create a parent item of expandable item + * + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_exp_parent_field( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + SWALLOW_Type swallow_type, + const char *keyStr, + char *sub_desc) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + item_data->sub_desc = (char *)g_strdup(sub_desc); + item_data->swallow_type = swallow_type; + + if (gl_sel) { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_TREE, gl_sel, + sel_data); + } else { + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, NULL, + ELM_GENLIST_ITEM_TREE, + _gl_Gendial_sel_expand, sel_data); + } + return item_data; +} + +/** + * General function to create a subitem of expandable item + * + * @return a pointer to Setting_GenGroupItem_Data + */ +Setting_GenGroupItem_Data *setting_create_Gendial_exp_sub_field( + Evas_Object *genlist, + const Elm_Genlist_Item_Class *itc, + setting_call_back_func gl_sel, + void *sel_data, + Elm_Object_Item *parent, + SWALLOW_Type swallow_type, + Evas_Object *rgd, int chk_status, + const char *keyStr, + setting_call_back_func + chk_change_cb) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) calloc(1, + sizeof + (Setting_GenGroupItem_Data)); + setting_retvm_if(!item_data, NULL, "calloc failed"); + item_data->keyStr = (char *)g_strdup(keyStr); + item_data->swallow_type = swallow_type; + item_data->chk_status = chk_status; + item_data->rgd = rgd; + + if (!gl_sel) { + gl_sel = setting_sub_list_sel_cb; + } + if (!chk_change_cb) { + chk_change_cb = setting_sub_list_rd_change; + } + + item_data->chk_change_cb = chk_change_cb; + item_data->item = + elm_genlist_item_append(genlist, itc, item_data, parent, + ELM_GENLIST_ITEM_NONE, gl_sel, sel_data); + return item_data; +} + +/** + * To make genlist support expandable style item + */ +void setting_enable_expandable_genlist(Evas_Object *genlist, void *data, + setting_call_back_func gl_exp_cb, + setting_call_back_func gl_smart_cb) +{ + ret_if(NULL == genlist); + elm_genlist_tree_effect_enabled_set(genlist, TRUE); + if (!gl_smart_cb) { + gl_smart_cb = __exp_list_smart_cb; + } + + if (gl_exp_cb) + evas_object_smart_callback_add(genlist, "expanded", gl_exp_cb, data); + evas_object_smart_callback_add(genlist, "contracted", gl_smart_cb, "contracted"); + + evas_object_smart_callback_add(genlist, "drag", gl_smart_cb, "drag"); + evas_object_smart_callback_add(genlist, "longpressed", gl_smart_cb, "longpressed"); +} + +/* +example: + +setting_create_Gendial_itc("dialogue/1text.2icon.2", + &(networkUG->itc_1text_2icon)); + +1. create a process genlist item : [intial state is 'PROCESS'] +ad->data_searching_net = setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_2icon), + setting_network_select_network_mouse_up_Gendial_list_radio_cb, ad, + SWALLOW_Type_1RADIO_1PROCESS, + ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL, + "Searching..", NULL); +or [intial state is 'UNPROCESS'] +ad->data_searching_net = setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_2icon), + setting_network_select_network_mouse_up_Gendial_list_radio_cb, ad, + SWALLOW_Type_1RADIO, + ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL, + "Searching..", NULL); + +2. to set the PROCESS state at any place as you like: +setting_begin_progress_genlist_item(ad->data_searching_net); -- change from UNPROCESS->PROCESS +setting_finish_progress_genlist_item(ad->data_searching_net);--change from PROCESS->UNPROCESS +*/ +void setting_begin_progress_genlist_item(Setting_GenGroupItem_Data *data_item) +{ + if (data_item) { + if (SWALLOW_Type_1RADIO != data_item->swallow_type) { + return; + } + + data_item->swallow_type = SWALLOW_Type_1RADIO_1PROCESS; + elm_object_item_data_set(data_item->item, data_item); + elm_genlist_item_update(data_item->item); + } +} + +void setting_finish_progress_genlist_item(Setting_GenGroupItem_Data *data_item) +{ + if (data_item) { + if (SWALLOW_Type_1RADIO_1PROCESS != data_item->swallow_type) { + return; + } + data_item->swallow_type = SWALLOW_Type_1RADIO; + elm_object_item_data_set(data_item->item, data_item); + elm_genlist_item_update(data_item->item); + } +} + +/** +* Check if some item is selected in done-list +*/ + +bool setting_done_list_is_some_item_selected(Setting_Done_List_Data *list_data) +{ + SETTING_TRACE_BEGIN; + bool isFound = FALSE; /* wether can found some item checked */ + int idx = 0; + int state = 0; + for (; idx < list_data->cur_item_num; idx++) { + state = + elm_check_state_get(list_data->chk_items[idx]. + data_GenItem->eo_check); + if (state) { + isFound = TRUE; + break; + } + } + return isFound; +} + +static void __setting_done_list_item_sel(void *data) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "data == NULL"); + Setting_Done_List_Data *list_data = (Setting_Done_List_Data *)data; + + int sel_num = 0; + int idx = 0; + + setting_create_sel_info_popup(list_data->ly_parent, + &(list_data->selInfoPop_layout), + &(list_data->selInfoPop)); + + /* else for other checks, do rotinue checking */ + bool isFound = FALSE; /* wether found the item not checked */ + for (idx = 0; idx < list_data->cur_item_num; idx++) { + if (!list_data->chk_items[idx].data_GenItem->chk_status) { + /* SETTING_TRACE("%s not select", _(list_data->chk_items[idx].item_name)); */ + isFound = TRUE; + /* break; */ + } else { + /* SETTING_TRACE("%s select", _(list_data->chk_items[idx].item_name)); */ + sel_num++; + } + } + + if (isFound) { /* reset state of chk_sel_all */ + list_data->select_all_checked = 0; + elm_check_state_pointer_set(list_data->select_all_checkbox, &list_data->select_all_checked); + } else { + list_data->select_all_checked = 1; + elm_check_state_pointer_set(list_data->select_all_checkbox, &list_data->select_all_checked); + } + + /* SETTING_TRACE("sel_num:%d", sel_num); */ + if (!sel_num) { + evas_object_hide(list_data->selInfoPop); + return; + } + char text[MAX_DISPLAY_NAME_LEN_ON_UI +1] = {0, }; + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%d %s", sel_num, KeyStr_Item_Sel); + + /* text set and timeout set */ + edje_object_part_text_set(_EDJ(list_data->selInfoPop_layout), "elm.text", text); + +} + +/** +* Do process when clicking the check object in the done-list item +*/ +void setting_done_list_Gendial_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + + /* new status */ + list_item->chk_status = elm_check_state_get(list_item->eo_check); + + Setting_Done_List_Data *list_data = list_item->userdata; + __setting_done_list_item_sel(list_data); +} + +static void setting_done_list_Gendial_mouse_up_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + + /* other process.. */ + Setting_Done_List_Data *list_data = list_item->userdata; + __setting_done_list_item_sel(list_data); +} + +static void __setting_select_all_done(void *data) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "data == NULL"); + Setting_Done_List_Data *list_data = (Setting_Done_List_Data *)data; + + int sel_num = 0; + int idx = 0; + + setting_create_sel_info_popup(list_data->ly_parent, + &(list_data->selInfoPop_layout), + &(list_data->selInfoPop)); + + if (list_data->select_all_checked) { + /* set all other checks state to be 1 */ + SETTING_TRACE_DEBUG("Select All checked"); + for (idx = 0; idx < list_data->cur_item_num; idx++) { + list_data->chk_items[idx].data_GenItem->chk_status = 1; + elm_object_item_data_set(list_data->chk_items[idx].data_GenItem->item, list_data->chk_items [idx].data_GenItem); + elm_genlist_item_update(list_data->chk_items [idx].data_GenItem->item); + } + sel_num = list_data->cur_item_num; + } else { + SETTING_TRACE_DEBUG("Select All unchecked"); + /* set all other checks state to be 0 */ + for (idx = 0; idx < list_data->cur_item_num; idx++) { + list_data->chk_items[idx].data_GenItem->chk_status = 0; + elm_object_item_data_set(list_data->chk_items[idx].data_GenItem->item, list_data->chk_items[idx].data_GenItem); + elm_genlist_item_update(list_data->chk_items[idx].data_GenItem->item); + } + sel_num = 0; + } + + /* SETTING_TRACE("sel_num:%d", sel_num); */ + if (!sel_num) { + evas_object_hide(list_data->selInfoPop); + return; + } + char text[MAX_DISPLAY_NAME_LEN_ON_UI +1] = {0, }; + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%d %s", sel_num, KeyStr_Item_Sel); + + /* text set and timeout set */ + edje_object_part_text_set(_EDJ(list_data->selInfoPop_layout), "elm.text", text); + +} + +static void __setting_select_all_layout_mouse_down_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "data == NULL"); + Setting_Done_List_Data *list_data = (Setting_Done_List_Data *)data; + + list_data->select_all_checked = !list_data->select_all_checked; + elm_check_state_pointer_set(list_data->select_all_checkbox, &list_data->select_all_checked); + + __setting_select_all_done(list_data); +} + +static void __setting_select_all_check_changed_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "data == NULL"); + Setting_Done_List_Data *list_data = (Setting_Done_List_Data *)data; + + elm_check_state_pointer_set(list_data->select_all_checkbox, &list_data->select_all_checked); + __setting_select_all_done(data); +} + +/** +* The API to create done-list. +* +* @param[in] list_data +* @return a done-list +*/ +Evas_Object *setting_create_done_list(Setting_Done_List_Data *list_data) +{ + SETTING_TRACE_BEGIN; + retvm_if(list_data == NULL, NULL, "list_data == NULL"); + Evas_Object *sub_layout = elm_layout_add(list_data->win_main); + elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, "search_layout"); + evas_object_size_hint_weight_set(sub_layout, EVAS_HINT_EXPAND, 0.0); + evas_object_show(sub_layout); + + setting_create_Gendial_itc("1text.1icon.2", &(list_data->itc_1text_1icon)); + + Evas_Object *select_all_layout = elm_layout_add(sub_layout); + retvm_if(select_all_layout == NULL, NULL, "select_all_layout == NULL"); + elm_layout_theme_set(select_all_layout, "genlist", "item", "select_all/default"); + evas_object_size_hint_weight_set(select_all_layout, EVAS_HINT_EXPAND, EVAS_HINT_FILL); + evas_object_size_hint_align_set(select_all_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_event_callback_add(select_all_layout, EVAS_CALLBACK_MOUSE_DOWN, __setting_select_all_layout_mouse_down_cb, list_data); + + Eina_Bool select_all_checked = list_data->select_all_checked; + Evas_Object *select_all_checkbox = elm_check_add(select_all_layout); + elm_check_state_pointer_set(select_all_checkbox, &select_all_checked); + evas_object_smart_callback_add(select_all_checkbox, "changed", __setting_select_all_check_changed_cb, list_data); + evas_object_propagate_events_set(select_all_checkbox, EINA_FALSE); + elm_object_part_content_set(select_all_layout, "elm.icon", select_all_checkbox); + + list_data->select_all_checkbox = select_all_checkbox; + elm_object_part_text_set(select_all_layout, "elm.text", _(KeyStr_Select_All)); + + Evas_Object *scroller = elm_genlist_add(list_data->win_main); + retvm_if(scroller == NULL, NULL, "scroller == NULL"); + elm_genlist_clear(scroller); /* first to clear list */ + + elm_object_part_content_set(sub_layout, "search_list", scroller); + elm_object_part_content_set(sub_layout, "search_bar", select_all_layout); + + int index = 0; + for (; index < list_data->cur_item_num; index++) { + list_data->chk_items[index].data_GenItem = + setting_create_Gendial_field_def(scroller, + &(list_data->itc_1text_1icon), + setting_done_list_Gendial_mouse_up_cb, + list_data, + SWALLOW_Type_1CHECK, NULL, + NULL, 0, + list_data->chk_items + [index].item_name, NULL, + setting_done_list_Gendial_chk_btn_cb); + if (list_data->chk_items[index].data_GenItem) { + list_data->chk_items[index].data_GenItem->userdata = list_data; + } else { + SETTING_TRACE_ERROR("list_data->chk_items[index].data_GenItem is NULL"); + } + + } + + return sub_layout; +} + +/** +* To disable a specialized genlist item +* +* @param[in] item +*/ +void setting_disable_genlist_item(Elm_Object_Item *item) +{ + if (item) { + elm_object_item_disabled_set(item, EINA_TRUE); /* make it be dim displayed */ + } +} + +/** +* To enable a specialized genlist item +* +* @param[in] item +*/ +void setting_enable_genlist_item(Elm_Object_Item *item) +{ + if (item) { + elm_object_item_disabled_set(item, EINA_FALSE); /* make it be normally displayed */ + } +} + diff --git a/setting-common/src/setting-common-draw-naviframe.c b/setting-common/src/setting-common-draw-naviframe.c new file mode 100755 index 0000000..5388b5f --- /dev/null +++ b/setting-common/src/setting-common-draw-naviframe.c @@ -0,0 +1,748 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#include +#include + +Evas_Object *setting_create_win_layout(Evas_Object *win_layout, + Evas_Object *win_obj) +{ + Evas_Object *layout = NULL; + + /* Base Layout */ + layout = elm_layout_add(win_layout); + setting_retvm_if(layout == NULL, FALSE, "layout == NULL"); + + elm_layout_theme_set(layout, "layout", "application", "default"); + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_win_resize_object_add(win_obj, layout); + Evas_Object *bg = setting_create_bg(layout, win_obj, "group_list"); + elm_object_part_content_set(layout, "elm.swallow.bg", bg); + evas_object_show(layout); + + return layout; +} + +#define HALF_SCREEN_STR_LEN 20 +#define ONE_THIRD_SCREEN_STR_LEN 13 +Evas_Object *setting_create_navi_bar(Evas_Object *layout) +{ + + Evas_Object *navi = NULL; + navi = elm_naviframe_add(layout); + + if (navi == NULL) { + SETTING_TRACE(" *** elm_naviframe_add returns NULL *** "); + return NULL; + } + elm_object_part_content_set(layout, "elm.swallow.content", navi); + evas_object_show(navi); + return navi; +} + +Elm_Object_Item * setting_create_navi_bar_top_buttons(char *title_str, + char *lbutton_str, + char *rbutton_str, + char *mbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, Evas_Object *eo_view,/*any container obj */ + Evas_Object *navigate_bar ) +{ + //SETTING_TRACE_BEGIN; + Evas_Object *l_button = NULL; + Evas_Object *r_button = NULL; + Evas_Object *m_button = NULL; + Elm_Object_Item *navi_it = NULL; + + /* create buttons */ + l_button = setting_create_button(navigate_bar, lbutton_str, + "naviframe/title/default", + lbutton_click_cb, cb_data); + + r_button = setting_create_button(navigate_bar, rbutton_str, + "naviframe/title/default", + rbutton_click_cb, cb_data); + m_button = setting_create_button(navigate_bar, mbutton_str, + "naviframe/title/default", + mbutton_click_cb, cb_data); + + navi_it = elm_naviframe_item_push(navigate_bar, title_str, + NULL, NULL, eo_view, + NULL); + retv_if(!navi_it, NULL); + + /* arrange buttons into navi_it*/ + if (l_button) { + elm_object_item_part_content_set(navi_it, "title_left_btn", l_button); + } + if (r_button) { + elm_object_item_part_content_set(navi_it, "title_right_btn", r_button); + } + if (m_button) { + elm_object_item_part_content_set(navi_it, "title_more_btn", m_button); + } + //remove '<-' button + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + if (back_btn) { + elm_object_item_part_content_set(navi_it, "prev_btn", NULL); + if (back_btn) evas_object_del(back_btn); + } + + return navi_it; +} + +Elm_Object_Item *__create_navi_bar_bottom_buttons(char *title_str, char *lbutton_str, char *rbutton_str, + char *mbutton_str, setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, Evas_Object *eo_view,/*any container obj */ + Evas_Object *navigate_bar, /*the specialized navigation bar */ + Evas_Object *controlbar) +{ + SETTING_TRACE_BEGIN; + Elm_Object_Item *navi_it = NULL; + + /* arrange buttons into controlbar*/ + if (0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { /* do special handling */ + Evas_Object *l_button = NULL; + l_button = setting_create_button(navigate_bar, lbutton_str, + NAVI_BACK_BUTTON_STYLE, + lbutton_click_cb, cb_data); + + navi_it = elm_naviframe_item_push(navigate_bar, title_str, l_button, NULL, eo_view, NULL); /* add new button */ + elm_object_style_set(l_button, NAVI_BACK_BUTTON_STYLE); /* take into effect */ + + if (!rbutton_str && !mbutton_str) { /* return directly */ + if (controlbar) { + evas_object_del(controlbar); + controlbar = NULL; + } + return navi_it; + } else { + if (rbutton_str && mbutton_str) { /* both exist.. */ + elm_toolbar_item_append(controlbar, NULL, mbutton_str, mbutton_click_cb, cb_data); + elm_toolbar_item_append(controlbar, NULL, rbutton_str, rbutton_click_cb, cb_data); + + } else if (rbutton_str) { /* r_btn exist.. */ + elm_toolbar_item_append(controlbar, NULL, rbutton_str, rbutton_click_cb, cb_data); + elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, "", NULL, NULL), EINA_TRUE); + } else if (mbutton_str) { /* m_btn exist.. */ + elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, "", NULL, NULL), EINA_TRUE); + elm_toolbar_item_append(controlbar, NULL, mbutton_str, mbutton_click_cb, cb_data); + } + + elm_object_item_part_content_set(navi_it, NAVI_CONTROLBAR_PART, controlbar); + return navi_it; + } + } + + if (lbutton_str) + elm_toolbar_item_append(controlbar, NULL, lbutton_str, lbutton_click_cb, cb_data); + if (mbutton_str) + elm_toolbar_item_append(controlbar, NULL, mbutton_str, mbutton_click_cb, cb_data); + + /* if controllbar just have one right button, let it occups 1/2. */ + + if (rbutton_str) + { + if (!lbutton_str && !mbutton_str) + { + elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, "", NULL, NULL), EINA_TRUE); + } + elm_toolbar_item_append(controlbar, NULL, rbutton_str, rbutton_click_cb, cb_data); + } + else + { + if (lbutton_str || mbutton_str) + { + elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, "", NULL, NULL), EINA_TRUE); + } + } + + navi_it = elm_naviframe_item_push(navigate_bar, title_str, NULL, NULL, eo_view, NULL); + elm_object_item_part_content_set(navi_it, NAVI_CONTROLBAR_PART, controlbar); + return navi_it; + +} + + +/** +* Create buttons on the specialized navigation bar +* +* @param[in] eo_view navigation bar's content +* @param[in] controlbar title obj of navigation bar +* +*/ +void setting_create_navi_bar_buttons(char *title_str, char *lbutton_str, char *rbutton_str, + char *mbutton_str, setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, Evas_Object *eo_view,/*any container obj */ + Evas_Object *navigate_bar, /*the specialized navigation bar */ + Evas_Object *controlbar) +{ /* controlbar */ + #if SUPPORT_BOTTOM_BTNS + __create_navi_bar_bottom_buttons(title_str, lbutton_str, + rbutton_str, mbutton_str, + lbutton_click_cb, + rbutton_click_cb, + mbutton_click_cb, + cb_data, eo_view, + navigate_bar, controlbar); + return; + #endif + + Evas_Object *l_button = NULL; + Evas_Object *r_button = NULL; + Evas_Object *m_button = NULL; + Elm_Object_Item *navi_it = NULL; + + /* navigationbar left buttons */ + + /* create buttons */ + if (lbutton_str && 0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { /* left 'Back' button should be processed specially */ + l_button = setting_create_button(navigate_bar, lbutton_str, + NAVI_BACK_BUTTON_STYLE, + lbutton_click_cb, cb_data); + } else { + l_button = setting_create_button(navigate_bar, lbutton_str, + NAVI_DEF_BUTTON_STYLE, + lbutton_click_cb, cb_data); + } + + + r_button = setting_create_button(navigate_bar, rbutton_str, + NAVI_DEF_BUTTON_STYLE, + rbutton_click_cb, cb_data); + m_button = setting_create_button(navigate_bar, mbutton_str, + NAVI_DEF_BUTTON_STYLE, + mbutton_click_cb, cb_data); + + Elm_Object_Item *item = NULL; + + /* arrange buttons into controlbar*/ + if (0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { /* do special handling */ + /* At then, in function elm_naviframe_item_push, icon of l_button will be unset, */ + /* Usr need set style again!! */ + navi_it = elm_naviframe_item_push(navigate_bar, title_str, l_button, NULL, eo_view, NULL); /* add new button */ + elm_object_style_set(l_button, NAVI_BACK_BUTTON_STYLE); /* take into effect */ + + if (!rbutton_str && !mbutton_str) { /* return directly */ + if (controlbar) { + evas_object_del(controlbar); + controlbar = NULL; + } + return; + } else { + if (rbutton_str && mbutton_str) { /* both exist.. */ + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", m_button); + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", r_button); + /* item[2] = elm_controlbar_object_item_append(controlbar, r_button, 1); */ + } else if (rbutton_str) { /* r_btn exist.. */ + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", r_button); + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + //elm_object_part_content_set(item, "object", NULL); + } else if (mbutton_str) { /* m_btn exist.. */ + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + //elm_object_part_content_set(item, "object", NULL); + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", m_button); + } + + elm_object_item_part_content_set(navi_it, NAVI_CONTROLBAR_PART, controlbar); + return; + } + } + + if (l_button) + { + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", l_button); + } + if (m_button) + { + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", m_button); + } + /* if controllbar just have one right button, let it occups 1/2. */ + if (!l_button && !m_button) + { + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + //elm_object_part_content_set(item, "object", NULL); + } + if (r_button) + { + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", r_button); + } + + navi_it = elm_naviframe_item_push(navigate_bar, title_str, NULL, NULL, eo_view, NULL); + + elm_object_item_part_content_set(navi_it, NAVI_CONTROLBAR_PART, controlbar); + return; +} + +/** +* The general API to create a layout with navigation bar, +* which contents any evas container object(@param[eo_view]) as its content +* +* @param[in] eo_view navigation bar's content +* @param[out] titleobj title obj of navigation bar +* +* return main layout of UG or App.. +*/ +Evas_Object *setting_create_layout_navi_bar(Evas_Object *win_layout, Evas_Object *win_obj, char *title_str, char *lbutton_str, char *rbutton_str, char *mbutton_str, setting_call_back_func lbutton_click_cb, setting_call_back_func rbutton_click_cb, setting_call_back_func mbutton_click_cb, void *cb_data, Evas_Object *eo_view, /*any container obj constructed on any evas obj */ + Evas_Object **navi_bar, + Evas_Object **titleobj) +{ + + Evas_Object *layout = setting_create_win_layout(win_layout, win_obj); + *navi_bar = setting_create_navi_bar(layout); + /* add controlbar */ + Evas_Object *controlbar = elm_toolbar_add(*navi_bar); + setting_retvm_if(controlbar == NULL, NULL, "controlbar == NULL"); + elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); + //elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); + if (titleobj) { /* need output */ + *titleobj = controlbar; + } + + setting_create_navi_bar_buttons(title_str, + lbutton_str, rbutton_str, NULL, + lbutton_click_cb, rbutton_click_cb, + NULL, cb_data, eo_view /*content */ , + *navi_bar, controlbar); + return layout; +} + +/** +* The API to create a layout with navigation bar, +* which contents a scroller object as its content +* +* @param[out] scroller navigation bar's content +* +* @return a layout with a special navigation bar and at most 2 buttons +*/ + +Evas_Object *setting_create_layout_navi_bar_scroller(Evas_Object *win_layout, + Evas_Object *win_obj, + char *title_str, + char *lbutton_str, + char *rbutton_str, + setting_call_back_func + lbutton_click_cb, + setting_call_back_func + rbutton_click_cb, + void *cb_data, + Evas_Object **scroller, + Evas_Object **navi_bar) +{ + + Evas_Object *layout = setting_create_win_layout(win_layout, win_obj); + *navi_bar = setting_create_navi_bar(layout); + + /* add controlbar */ + Evas_Object *controlbar = elm_toolbar_add(*navi_bar); + setting_retvm_if(controlbar == NULL, NULL, "controlbar == NULL"); + elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); + //elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); + + /*****/ + /* create scroller as CONTENT */ + Evas_Object *scrl = NULL; + /* Evas_Object *ret = NULL; */ + if (scroller != NULL) { + /* scrl =*scroller = elm_scroller_add(win_layout); */ + scrl = *scroller = elm_scroller_add(layout); + retvm_if(*scroller == NULL, NULL, + "Cannot set scroller object as contento of layout"); + elm_scroller_bounce_set(*scroller, EINA_FALSE, EINA_TRUE); + elm_scroller_policy_set(*scroller, ELM_SCROLLER_POLICY_OFF, + ELM_SCROLLER_POLICY_AUTO); + evas_object_show(*scroller); + } + + /*****/ + + setting_create_navi_bar_buttons(title_str, + lbutton_str, rbutton_str, NULL, + lbutton_click_cb, rbutton_click_cb, + NULL, cb_data, scrl /*content */ , + *navi_bar, controlbar); + return layout; +} + +/** +* The API to create a layout with navigation bar , +* which contents a genlist object as its content +* +* @return a layout with a special navigation bar and at most 2 buttons +*/ +Evas_Object *setting_create_layout_navi_bar_genlist(Evas_Object *win_layout, + Evas_Object *win_obj, + char *title_str, + char *lbutton_str, + char *rbutton_str, + setting_call_back_func + lbutton_click_cb, + setting_call_back_func + rbutton_click_cb, + void *cb_data, + Evas_Object **genlist, + Evas_Object **navi_bar) +{ + /* win_layout -> layout */ + Evas_Object *layout = setting_create_win_layout(win_layout, win_obj); + + *navi_bar = setting_create_navi_bar(layout); + + /* add controlbar */ + Evas_Object *controlbar = elm_toolbar_add(*navi_bar); + setting_retvm_if(controlbar == NULL, NULL, "controlbar == NULL"); + elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); + //elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); + + *genlist = elm_genlist_add(*navi_bar); + elm_object_style_set(*genlist, "dialogue"); + retvm_if(*genlist == NULL, NULL, + "Cannot set scroller object as contento of layout"); + elm_genlist_clear(*genlist); /* first to clear list */ + + setting_create_navi_bar_buttons(title_str, + lbutton_str, rbutton_str, NULL, + lbutton_click_cb, rbutton_click_cb, + NULL, cb_data, *genlist, *navi_bar, + controlbar); + return layout; +} + + +Elm_Object_Item *__push_navi_bar_bottom_buttons(char *title_str, + char *lbutton_str, char *rbutton_str, + char *mbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, Evas_Object *eo_view, + Evas_Object *navigate_bar, Evas_Object **titleobj) +{ + Elm_Object_Item *navi_it = NULL; + Evas_Object *controlbar = NULL; + + /* arrange buttons into controlbar*/ + if (0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { + Evas_Object *l_button = NULL; + l_button = setting_create_button(navigate_bar, lbutton_str, + NAVI_BACK_BUTTON_STYLE, + lbutton_click_cb, cb_data); + + navi_it = elm_naviframe_item_push(navigate_bar, title_str, l_button, NULL, eo_view, NULL); + elm_object_style_set(l_button, NAVI_BACK_BUTTON_STYLE); /* take into effect */ + if (!rbutton_str && !mbutton_str) + { + return navi_it; + } + + controlbar = elm_toolbar_add(navigate_bar); + setting_retvm_if(controlbar == NULL, navi_it, "controlbar == NULL"); + elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); + //elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); + if (titleobj) *titleobj = controlbar; + + if (rbutton_str && mbutton_str) { + elm_toolbar_item_append(controlbar, NULL, mbutton_str, mbutton_click_cb, cb_data); + elm_toolbar_item_append(controlbar, NULL, rbutton_str, rbutton_click_cb, cb_data); + } else if (rbutton_str) { + elm_toolbar_item_append(controlbar, NULL, rbutton_str, rbutton_click_cb, cb_data); + int len = safeStrLen(rbutton_str); + if (len < ONE_THIRD_SCREEN_STR_LEN) { + elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL), EINA_TRUE); + + } + + if (len < HALF_SCREEN_STR_LEN) + { + elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, "", NULL, NULL), EINA_TRUE); + } + } else if (mbutton_str) { + elm_toolbar_item_append(controlbar, NULL, mbutton_str, mbutton_click_cb, cb_data); + elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, "", NULL, NULL), EINA_TRUE); + elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + } + } else { /* no need back button on navi_bar */ + navi_it = elm_naviframe_item_push(navigate_bar, title_str, NULL, NULL, eo_view, NULL); + if (!lbutton_str && !rbutton_str && !mbutton_str) { + return navi_it; + } + + //remove '<-' button, insteadly using controlbar + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + elm_object_item_part_content_set(navi_it, "prev_btn", NULL); + evas_object_del(back_btn); + + controlbar = elm_toolbar_add(navigate_bar); + setting_retvm_if(controlbar == NULL, navi_it, "controlbar == NULL"); + elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); + //elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); + if (titleobj) *titleobj = controlbar; + + if (lbutton_str) + elm_toolbar_item_append(controlbar, NULL, lbutton_str, lbutton_click_cb, cb_data); + if (mbutton_str) + elm_toolbar_item_append(controlbar, NULL, mbutton_str, mbutton_click_cb, cb_data); + if (rbutton_str) + elm_toolbar_item_append(controlbar, NULL, rbutton_str, rbutton_click_cb, cb_data); + } + + elm_object_item_part_content_set(navi_it, NAVI_CONTROLBAR_PART, controlbar); + return navi_it; +} + + +/** +* The general API to push any evas object(@param[eo_view]) to the specialized navi_bar, +* which contents at most 3 buttons +*/ +Elm_Object_Item * +setting_push_layout_navi_bar(char *title_str, + char *lbutton_str, char *rbutton_str, + char *mbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + setting_call_back_func mbutton_click_cb, + void *cb_data, Evas_Object *eo_view, + Evas_Object *navi_bar, Evas_Object **titleobj) +{ +#if SUPPORT_BOTTOM_BTNS + return __push_navi_bar_bottom_buttons(title_str, + lbutton_str, rbutton_str,mbutton_str, + lbutton_click_cb, + rbutton_click_cb, + mbutton_click_cb, + cb_data, eo_view, navi_bar, titleobj); +#endif + + + Evas_Object *l_button = NULL; + Evas_Object *r_button = NULL; + Evas_Object *m_button = NULL; + Elm_Object_Item *navi_it = NULL; + Evas_Object *controlbar = NULL; + + /* create buttons */ + if (lbutton_str && 0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { /* left 'Back' button should be processed specially */ + l_button = setting_create_button(navi_bar, lbutton_str, + NAVI_BACK_BUTTON_STYLE, + lbutton_click_cb, cb_data); + } else { + l_button = setting_create_button(navi_bar, lbutton_str, + NAVI_DEF_BUTTON_STYLE, + lbutton_click_cb, cb_data); + } + r_button = setting_create_button(navi_bar, rbutton_str, + NAVI_DEF_BUTTON_STYLE, + rbutton_click_cb, cb_data); + m_button = setting_create_button(navi_bar, mbutton_str, + NAVI_DEF_BUTTON_STYLE, + mbutton_click_cb, cb_data); + + Elm_Object_Item *item = NULL; + + /* arrange buttons into controlbar*/ + if (0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { /* need back button on navi_bar */ + navi_it = elm_naviframe_item_push(navi_bar, title_str, l_button, NULL, eo_view, NULL); + elm_object_style_set(l_button, NAVI_BACK_BUTTON_STYLE); /* take into effect */ + if (!rbutton_str && !mbutton_str) + { + return navi_it; + } + + controlbar = elm_toolbar_add(navi_bar); + setting_retvm_if(controlbar == NULL, NULL, "controlbar == NULL"); + elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); + //elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); + if (titleobj) *titleobj = controlbar; + + if (rbutton_str && mbutton_str) { + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", m_button); + /* elm_controlbar_object_item_append(controlbar, NULL, 1); */ + item = elm_toolbar_item_append(controlbar,NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", r_button); + } else if (rbutton_str) { + if (0 == + safeStrCmp(rbutton_str, _(KeyStr_INFO))) { + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", r_button); + } else { + int len = safeStrLen(rbutton_str); + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", r_button); + + if (len < HALF_SCREEN_STR_LEN) + { + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", r_button); + } + if (len < ONE_THIRD_SCREEN_STR_LEN) + { + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + } + } + + } else if (mbutton_str) { + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", m_button); + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + } + } else { /* no need back button on navi_bar */ + navi_it = elm_naviframe_item_push(navi_bar, title_str, NULL, NULL, eo_view, NULL); + if (!lbutton_str && !rbutton_str && !mbutton_str) + { + return navi_it; + } + + //remove '<-' button, insteadly using controlbar + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + elm_object_item_part_content_set(navi_it, "prev_btn", NULL); + evas_object_del(back_btn); + + controlbar = elm_toolbar_add(navi_bar); + setting_retvm_if(controlbar == NULL, NULL, "controlbar == NULL"); + elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); + //elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); + if (titleobj) *titleobj = controlbar; + + if (l_button) + { + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", l_button); + } + if (m_button) + { + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", m_button); + } + if (r_button) + { + item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_part_content_set(item, "object", r_button); + } + } + + elm_object_item_part_content_set(navi_it, NAVI_CONTROLBAR_PART, controlbar); + + return navi_it; +} + +/** +* The API to push a scroller object(@param[scroller]) to the specialized navi_bar, +* which contents at most 2 buttons +*/ + +void +setting_push_layout_navi_bar_scroller(Evas_Object *win_main, char *title_str, + char *lbutton_str, char *rbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + void *cb_data, + Evas_Object **scroller, + Evas_Object *navi_bar) +{ + /* create scroller */ + Evas_Object *scrl = NULL; + if (scroller != NULL) { + scrl = *scroller = elm_scroller_add(win_main); + retm_if(*scroller == NULL, + "Cannot set scroller as contento of layout"); + elm_scroller_bounce_set(*scroller, EINA_FALSE, EINA_TRUE); + elm_scroller_policy_set(*scroller, ELM_SCROLLER_POLICY_OFF, + ELM_SCROLLER_POLICY_AUTO); + + evas_object_show(*scroller); + } + + setting_push_layout_navi_bar(title_str, + lbutton_str, rbutton_str, NULL, + lbutton_click_cb, + rbutton_click_cb, + NULL, cb_data, scrl, navi_bar, NULL); +} + +/** +* @ The API to push a genlist object(@param[genlist]) to the specialized navi_bar, +* which contents at most 2 buttons +*/ +void +setting_push_layout_navi_bar_genlist(Evas_Object *win_layout, + Evas_Object *win_obj, char *title_str, + char *lbutton_str, char *rbutton_str, + setting_call_back_func lbutton_click_cb, + setting_call_back_func rbutton_click_cb, + void *cb_data, Evas_Object **genlist, + Evas_Object *navi_bar) +{ + /* create scroller */ + Evas_Object *gl = NULL; + if (genlist != NULL) { + gl = *genlist = elm_genlist_add(win_layout); + elm_object_style_set(*genlist, "dialogue"); + retm_if(*genlist == NULL, + "Cannot set scroller object as contento of layout"); + elm_genlist_clear(gl); /* first to clear list */ + } + + setting_push_layout_navi_bar(title_str, + lbutton_str, rbutton_str, NULL, + lbutton_click_cb, + rbutton_click_cb, + NULL, cb_data, gl, navi_bar, NULL); +} + +/* +* To go to top of list in top view of navibar. +* @param[in] navibar +*/ +void setting_go_to_navibar_list_top(Evas_Object *navibar) +{ + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(navibar); + if (navi_it) + { + Evas_Object *content = elm_object_item_part_content_get(navi_it, "default"); + + Elm_Object_Item *first_item = elm_genlist_first_item_get(content); + if (first_item) + { + elm_genlist_item_show(first_item, ELM_GENLIST_ITEM_SCROLLTO_TOP); + } + } +} + + diff --git a/setting-common/src/setting-common-draw-popup.c b/setting-common/src/setting-common-draw-popup.c new file mode 100755 index 0000000..ce00ed5 --- /dev/null +++ b/setting-common/src/setting-common-draw-popup.c @@ -0,0 +1,566 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#include +#include +#include +#include + +static void _setting_def_response_cb(void *data, Evas_Object *obj, + void *event_info) +{ + if (obj) { + evas_object_del(obj); + obj = NULL; + } +} + +static void __popup_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) + +{ + SETTING_TRACE_BEGIN; + Ecore_X_Display *disp = ecore_x_display_get(); + Ecore_X_Window xwin = elm_win_xwindow_get(obj); + int ret = utilx_ungrab_key(disp, xwin, KEY_HOME); + if (ret) { + SETTING_TRACE_ERROR("KEY_HOME ungrab error ret[%d]", ret); + } + +} + +/** +* @ set the attribution of the specialized progressbar +* @See setting_create_custom_progressbar. +*/ +static void __popup_event_set(Evas_Object *popup, void *data, + setting_call_back_func response_cb, + int timeout,//to control the timeout time + bool blocked_flag,//to control whether to block the screen + bool keygrab_flag//to control whether to block the 'Home key' + ) +{ + if (timeout > 0) { + if (response_cb) { + evas_object_smart_callback_add(popup, "timeout", response_cb, data); + } else { + evas_object_smart_callback_add(popup, "timeout", _setting_def_response_cb, data); + } + } + + if (!blocked_flag) {//not blocked_flag == TRUE !!! + if (response_cb) { + evas_object_smart_callback_add(popup, "block,clicked", response_cb, data); + } else { + evas_object_smart_callback_add(popup, "block,clicked", _setting_def_response_cb, data); + } + } + + if (keygrab_flag) { + Ecore_X_Display *disp = ecore_x_display_get(); + Ecore_X_Window xwin = elm_win_xwindow_get(popup); + int ret = utilx_grab_key(disp, xwin, KEY_HOME, TOP_POSITION_GRAB); + if (ret) { + SETTING_TRACE_ERROR("KEY_HOME grab error ret[%d]", ret); + } + evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, __popup_del_cb, NULL); + } +} +static Evas_Object *__add_progressbar(void *data, Evas_Object *parent, + char *progressbar_style, + char *progressbar_title, + char *progressbar_lable) +{ + SETTING_TRACE_BEGIN; + Evas_Object *popup = elm_popup_add(parent); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + if (progressbar_title) { + elm_object_part_text_set(popup, "title,text", progressbar_title); + } + + Evas_Object *box = elm_box_add(popup); + /* elm_box_horizontal_set(box, 1); */ + + if (progressbar_lable) { + Evas_Object *label = elm_label_add(popup); + elm_object_text_set(label, progressbar_lable); /* "Loading..." */ + //elm_label_text_align_set(label, "left"); + evas_object_show(label); + elm_box_pack_end(box, label); + } + + if (progressbar_style) { + Evas_Object *progressbar = elm_progressbar_add(popup); + elm_object_style_set(progressbar, progressbar_style); /* "toolbar_process" or "pending_list" or "list_prosess" */ + elm_progressbar_pulse(progressbar, EINA_TRUE); + evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, + 0.5); + evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_progressbar_pulse(progressbar, EINA_TRUE); + evas_object_show(progressbar); + elm_box_pack_end(box, progressbar); + } + + evas_object_show(box); + elm_object_content_set(popup, box); + return popup; +} + +/** +* create a popup window which contents a progressbar +* +* @return a popup window which contents a progressbar +*/ +Evas_Object *setting_create_popup_with_progressbar(void *data, + Evas_Object *parent, + char *progressbar_style, + char *title, + char *text, + setting_call_back_func response_cb, + int timeout, + bool blocked_flag, + bool keygrab_flag) +{ + SETTING_TRACE_BEGIN; + Evas_Object *popup = NULL; + popup = __add_progressbar(data, parent, progressbar_style, + title, text); + + if (timeout > 0) { + elm_popup_timeout_set(popup, timeout); + } + __popup_event_set(popup, data, response_cb, timeout, blocked_flag, keygrab_flag); + evas_object_show(popup); + return popup; +} + +/** +* The general API to create a certain popup window with more than one button. +* @return a certain popup window +*/ +Evas_Object *setting_create_popup_with_btn(void *data, + Evas_Object *parent, + char *title, + char *text, + setting_call_back_func response_cb, + int timeout, + int btn_num, ...) +{ + Evas_Object *popup = elm_popup_add(parent); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + if (text) { + char r_str_text[HELP_MSG_BUFF_SIZE] = { 0, }; + snprintf(r_str_text, HELP_MSG_BUFF_SIZE, ""); + g_strlcat(r_str_text, text, HELP_MSG_BUFF_SIZE); + g_strlcat(r_str_text, "", HELP_MSG_BUFF_SIZE); + elm_object_text_set(popup, r_str_text); + + } + + if (title) { + elm_object_part_text_set(popup, "title,text", title); + } + if (timeout > 0) { + elm_popup_timeout_set(popup, timeout); + } + + if (btn_num > 0) { //the case popup has button or buttons + va_list args; + va_start(args, btn_num); + + char *btn_str; + int argno = 0; + char *btn_part_str[] = { + _("button1"), _("button2"), _("button3") + }; + + for (; argno < btn_num; argno++) { + btn_str = va_arg( args, char *); + SETTING_TRACE("Parameter #%d is: %s, btn_part_str;%s", argno, btn_str, btn_part_str[argno]); + if (btn_str) { + Evas_Object *btn = setting_create_button(popup, btn_str, NULL, response_cb, data); + elm_object_part_content_set(popup, btn_part_str[argno], btn); + } + } + + va_end(args); + } else { //the case popup doesn't have any button. + __popup_event_set(popup, data,response_cb, timeout, FALSE, FALSE); + } + + evas_object_show(popup); + return popup; + } + +/** +* The general API to create a certain popup window +* +* @return a certain popup window +*/ +Evas_Object *setting_create_popup_without_btn(void *data, + Evas_Object *parent, + char *title, + char *text, + setting_call_back_func response_cb, + int timeout, + bool blocked_flag, + bool keygrab_flag) +{ + Evas_Object *popup = elm_popup_add(parent); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + if (text) { + char r_str_text[HELP_MSG_BUFF_SIZE] = { 0, }; + snprintf(r_str_text, HELP_MSG_BUFF_SIZE, ""); + g_strlcat(r_str_text, text, HELP_MSG_BUFF_SIZE); + g_strlcat(r_str_text, "", HELP_MSG_BUFF_SIZE); + elm_object_text_set(popup, r_str_text); + + } + + if (title) { + elm_object_part_text_set(popup, "title,text", title); + } + if (timeout > 0) { + elm_popup_timeout_set(popup, timeout); + } + + __popup_event_set(popup, data,response_cb, timeout, blocked_flag, keygrab_flag); + evas_object_show(popup); + return popup; +} + +/** +* The API to create a certain popup window with title +* +* @return a certain popup window with title +* not used now +*/ +int setting_create_simple_popup(void *data, + Evas_Object *parent, + char *title, + char *text) +{ + setting_create_popup_without_btn(data, parent, title, text, + NULL, POPUP_INTERVAL, FALSE, FALSE); + return 0; +} + + +#define ADD_POPUP_BTN(btn_num, popup, response_cb, data) \ + if (btn_num > 0) {\ + va_list args;\ + va_start(args, btn_num);\ + \ + char *btn_str;\ + int argno = 0;\ + char *btn_part_str[] = {\ + _("button1"), _("button2"), _("button3")\ + };\ + \ + for (; argno < btn_num; argno++) {\ + btn_str = va_arg( args, char *);\ + SETTING_TRACE("Parameter #%d is: %s, btn_part_str;%s", argno, btn_str, btn_part_str[argno]);\ + if (btn_str)\ + {\ + Evas_Object *btn = setting_create_button(popup, btn_str, NULL, response_cb, data);\ + elm_object_part_content_set(popup, btn_part_str[argno], btn);\ + }\ + }\ + va_end(args);\ + } else {\ + if (response_cb) {\ + evas_object_smart_callback_add(popup, "timeout", response_cb, data);\ + evas_object_smart_callback_add(popup, "block,clicked", response_cb, data);\ + } else {\ + evas_object_smart_callback_add(popup, "timeout", _setting_def_response_cb, data);\ + evas_object_smart_callback_add(popup, "block,clicked", _setting_def_response_cb, data);\ + }\ + } + +//1Title-1Description-1Gif-nButton +/* @png_list is an array end with 'NULL'. like , + const char *png_list[] = { + SETTING_ICON_PATH_CFG"motions/motion_overturn_01.png", + SETTING_ICON_PATH_CFG"motions/motion_overturn_02.png", + SETTING_ICON_PATH_CFG"motions/motion_overturn_03.png", + SETTING_ICON_PATH_CFG"motions/motion_overturn_04.png", + SETTING_ICON_PATH_CFG"motions/motion_overturn_05.png", + NULL //must end with 'NULL' + }; +*/ + +Evas_Object *setting_create_popup_with_gif(void *data, + Evas_Object *parent, + char *title, + char *text, + const char **png_list, //array end with 'NULL'. + setting_call_back_func response_cb, + int timeout, + int btn_num, ...) +{ + SETTING_TRACE_BEGIN; + //displaying image + Evas_Object *image = NULL; + if (png_list && *png_list) { + if (png_list[1]) { //png_list is an array end with 'NULL', and it has at least 2 png file, + image = setting_create_gif(parent, png_list); + } else { //png_list just has one png file, + image = setting_create_image(parent, *png_list); + } + } + + + Evas_Object* pLy = elm_layout_add(parent); + elm_layout_theme_set(pLy, "layout", "application", "noindicator" ); + evas_object_size_hint_weight_set(pLy, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + Evas_Object* pBg = elm_bg_add(pLy); + evas_object_size_hint_weight_set(pBg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_part_content_set(pLy, "elm.swallow.bg", pBg); + elm_bg_color_set(pBg, 200, 200, 200); // R,G,B: 200 -> White Grey + evas_object_show(pBg); + + evas_object_show(pLy); + elm_object_part_content_set(pLy, "elm.swallow.bg", pBg); + elm_object_part_content_set(pLy, "elm.swallow.content", image); + + Evas_Object *popup = elm_popup_add(parent); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + //title + if (title) { + elm_object_part_text_set(popup, "title,text", title); + } + + if (timeout > 0) { + elm_popup_timeout_set(popup, timeout); + } + + //content + Evas_Object *content_box = elm_box_add(popup); + //instructing of displaying image + if (text) { + Evas_Object *lable = setting_create_lable(popup, text, + "popup_description/default"); + elm_box_pack_end(content_box, lable); + } + //displaying image + if (pLy) { + elm_box_pack_end(content_box, pLy); + } + + //set box into popup + elm_object_content_set(popup, content_box); + ADD_POPUP_BTN(btn_num, popup, response_cb, data); + evas_object_show(popup); + return popup; + +} + +Evas_Object *setting_create_popup_with_checkview(Evas_Object *parent, + char *title, + char *check_str, + Evas_Object *checkview_content, + Evas_Object **check, + int timeout) +{ + Evas_Object *popup = elm_popup_add(parent); + evas_object_show(popup); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + //title + if (title) { + elm_object_part_text_set(popup, "title,text", title); + } + + if (timeout > 0) { + elm_popup_timeout_set(popup, timeout); + } + + //set box into popup + + Evas_Object *checkview = elm_layout_add(parent); + elm_layout_file_set(checkview, SETTING_THEME_EDJ_NAME, "popup_checkview"); + evas_object_size_hint_weight_set(checkview, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + //instructing of displaying image + if (check_str) { + edje_object_part_text_set(elm_layout_edje_get(checkview), "elm.text", check_str); + } + if (check) { + *check = elm_check_add(popup); + evas_object_size_hint_align_set(*check, EVAS_HINT_FILL, + EVAS_HINT_FILL); + evas_object_size_hint_weight_set(*check, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + evas_object_show(*check); + elm_object_part_content_set(checkview, "elm.swallow.end", *check); + } + //content + if (checkview_content) { + elm_object_part_content_set(checkview, "elm.swallow.content", checkview_content); + } + + elm_object_content_set(popup, checkview); + return popup; +} + +/** +* The API to create a certain popup window with a check and some buttons +* @return a certain popup window with title +*/ +Evas_Object *setting_create_popup_with_check(void *data, + Evas_Object *parent, + char *title, + char *text, + char *check_str, + Evas_Object **check, + setting_call_back_func response_cb, + int timeout, + int btn_num, ...) +{ + SETTING_TRACE_BEGIN; + //content + Evas_Object *checkview_content = NULL; + if (text) + checkview_content = setting_create_lable(parent, text, "popup/default"); + + Evas_Object *popup = setting_create_popup_with_checkview(parent, title, check_str, checkview_content, check, timeout); + ADD_POPUP_BTN(btn_num, popup, response_cb, data); + evas_object_show(popup); + return popup; +} + + +/** +* The API to create a certain popup window with a image, a check and some buttons +* @return a certain popup window with title +*/ +Evas_Object *setting_create_popup_with_image_check(void *data, + Evas_Object *parent, + char *title, + char *text1, + char *text2, + char *icon_path, + char *check_str, + Evas_Object **check, + setting_call_back_func response_cb, + int timeout, + int btn_num, ...) +{ + SETTING_TRACE_BEGIN; + //content + Evas_Object *lable = NULL; + Evas_Object *content_box = elm_box_add(parent); + if (text1) { + lable = setting_create_lable(content_box, text1, "popup/default"); + elm_box_pack_end(content_box, lable); + } + if (icon_path) { + Evas_Object *image = setting_create_image(content_box, icon_path); + setting_resize_object(image, 140*WIDGET_SCALE_FACTOR, 150*WIDGET_SCALE_FACTOR); + elm_box_pack_end(content_box, image); + } + + if (text2) { + lable = setting_create_lable(content_box, text2, "popup/default"); + elm_box_pack_end(content_box, lable); + } + + Evas_Object *popup = setting_create_popup_with_checkview(parent, title, check_str, content_box, check, timeout); + ADD_POPUP_BTN(btn_num, popup, response_cb, data); + evas_object_show(popup); + return popup; +} + +/** +* Create selectinfo popup +*/ +void setting_create_sel_info_popup(Evas_Object *parent, + Evas_Object **selInfoPop_layout, + Evas_Object **selInfoPop) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE("*selInfoPop:%p", *selInfoPop); + if (!(*selInfoPop)) { + /* Add notify */ + *selInfoPop = elm_notify_add(parent); + elm_notify_orient_set(*selInfoPop, ELM_NOTIFY_ORIENT_BOTTOM); + evas_object_size_hint_weight_set(*selInfoPop, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(*selInfoPop, EVAS_HINT_FILL, + EVAS_HINT_FILL); + elm_notify_timeout_set(*selInfoPop, 3); + + /* list_data->selInfoPop layout add */ + *selInfoPop_layout = elm_layout_add(*selInfoPop); + + elm_layout_theme_set(*selInfoPop_layout, "standard", + "selectioninfo", "vertical/bottom_12"); + + /* list_data->selInfoPop layout content set to notify */ + elm_object_content_set(*selInfoPop, *selInfoPop_layout); + } + + evas_object_show(*selInfoPop); +} + +#if APPLIED_BACK_KEY_UG + +/** +* Get the toppest popup in current evas, cross through all the APP and UGs. +* +* @param[in] evas +* +* @return the toppest popup in current evas +*/ +Evas_Object *get_toppest_popup_window(Evas *evas) +{ + Evas_Object *evas_bottom = evas_object_top_get(evas); + /* SETTING_TRACE("evas_bottom:%p", evas_bottom); */ + Evas_Object *below = evas_bottom; + + Evas_Object *found = NULL; + const char *type = NULL; + while (1) { + /* parent = elm_widget_parent_get(parent); */ + below = evas_object_below_get(below); + if (!below) { + break; + } + /* SETTING_TRACE("below:%p", below); */ + type = elm_widget_type_get(below); + /* SETTING_TRACE("below's type:%s", type); */ + if (type && !safeStrCmp(type, "popup")) { + found = below; + break; + } + } + SETTING_TRACE("found:%p", found); + return found; +} +#endif + + + diff --git a/setting-common/src/setting-common-draw-searchbar.c b/setting-common/src/setting-common-draw-searchbar.c new file mode 100755 index 0000000..2b0ffc6 --- /dev/null +++ b/setting-common/src/setting-common-draw-searchbar.c @@ -0,0 +1,170 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#include +/** +* Get searchbar text and register redraw_cb by idler. +* +* @param[in] data +* @param[in] search_bar +* @param[in] search_text +* @param[in] search_idler +* @param[in] redraw_cb +*/ +int setting_searchbar_redraw(void *data, + Evas_Object *search_bar, + char *search_text, + Ecore_Idler **search_idler, + Ecore_Task_Cb redraw_cb) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(search_bar == NULL, -1, "search_bar parameter is NULL"); + //const char *str = elm_object_text_get(search_bar); + Evas_Object *entry = elm_object_part_content_get(search_bar, "elm.swallow.content"); + const char *str = elm_entry_entry_get(entry); + int str_len = safeStrLen(str); + setting_retvm_if(str_len > MAX_SEARCH_STR_LEN, -1, "str_len > MAX_SEARCH_STR_LEN"); + + memset(search_text, '\0', MAX_SEARCH_STR_LEN + 1); + safeCopyStr(search_text, str, MAX_SEARCH_STR_LEN); + + SETTING_TRACE("Update the search view text, search_text=%s", + search_text); + + if (*search_idler) { + ecore_idler_del(*search_idler); + *search_idler = NULL; + } + *search_idler = ecore_idler_add(redraw_cb, data); + return 0; +} +static void __searchbar_chg_cb(void *data, Evas_Object *obj, void *event_info) +{ + Evas_Object *searchbar_layout = data; + if (elm_object_focus_get(searchbar_layout)) { + if (elm_entry_is_empty(obj)) { + elm_object_signal_emit(searchbar_layout, "elm,state,eraser,hide", "elm"); + } + else + elm_object_signal_emit(searchbar_layout, "elm,state,eraser,show", "elm"); + } +} + +static void __searchbar_focused_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(!data || !obj); + Evas_Object *searchbar_layout = data; + if (!elm_entry_is_empty(obj)) + elm_object_signal_emit(searchbar_layout, "elm,state,eraser,show", "elm"); + elm_object_signal_emit(searchbar_layout, "elm,state,guidetext,hide", "elm"); + elm_object_signal_emit(searchbar_layout, "cancel,in", ""); +} + +static void __searchbar_unfocused_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(!data || !obj); + Evas_Object *searchbar_layout = data; + if (elm_entry_is_empty(obj)) + elm_object_signal_emit(searchbar_layout, "elm,state,guidetext,show", "elm"); + elm_object_signal_emit(searchbar_layout, "elm,state,eraser,hide", "elm"); +} + +static void __searchbar_eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) +{ + ret_if(!data); + Evas_Object *entry = data; + elm_entry_entry_set(entry, ""); +} + +static void __searchbar_bg_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) +{ + ret_if(!data); + Evas_Object *entry = data; + elm_object_focus_set(entry, EINA_TRUE); +} + +static void __searchbar_cancel_clicked_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(!data || !obj); + evas_object_hide(obj); + Evas_Object *searchbar_layout = data; + elm_object_signal_emit(searchbar_layout, "cancel,out", ""); + Evas_Object *entry = elm_object_part_content_get(searchbar_layout, "elm.swallow.content"); + ret_if(!entry); + const char* text = elm_entry_entry_get(entry); + if (text != NULL && strlen(text) > 0) + elm_entry_entry_set(entry, NULL); + elm_object_focus_set(entry, EINA_FALSE); +} + +static void __searchbar_searchsymbol_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) +{ + ret_if(!data); + Evas_Object *entry = data; + elm_object_focus_set(entry, EINA_TRUE); +} +/** +* Create searchar, register change cb and cancel cb. +* +* @param[in] data +* @param[in] parent +* @param[in] change_cb +* @param[in] cancel_cb +*/ +Evas_Object *setting_create_searchbar(void *data, Evas_Object *parent, + Evas_Smart_Cb change_cb, + Evas_Smart_Cb cancel_cb) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(parent == NULL, NULL, "parent parameter is NULL"); + Evas_Object *searchbar_layout = elm_layout_add(parent); + elm_layout_theme_set(searchbar_layout, "layout", "searchbar", "cancel_button"); + elm_object_part_content_set(parent, "searchbar", searchbar_layout); + Evas_Object *entry = elm_entry_add(searchbar_layout); + elm_entry_scrollable_set(entry, EINA_TRUE); + elm_entry_single_line_set(entry, EINA_TRUE); + if (change_cb) evas_object_smart_callback_add(entry, "changed", change_cb, data); + evas_object_smart_callback_add(entry, "changed", __searchbar_chg_cb, searchbar_layout); + evas_object_smart_callback_add(entry, "focused", __searchbar_focused_cb, searchbar_layout); + evas_object_smart_callback_add(entry, "unfocused", __searchbar_unfocused_cb, searchbar_layout); + elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_NORMAL); + elm_object_part_content_set(searchbar_layout, "elm.swallow.content", entry); + elm_object_part_text_set(searchbar_layout, "elm.guidetext", _("IDS_COM_SK_SEARCH")); + elm_object_signal_callback_add(searchbar_layout, "elm,eraser,clicked", "elm", __searchbar_eraser_clicked_cb, entry); + elm_object_signal_callback_add(searchbar_layout, "elm,bg,clicked", "elm", __searchbar_bg_clicked_cb, entry); + evas_object_size_hint_weight_set(searchbar_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(searchbar_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); + + + Evas_Object *cancel_btn = elm_button_add(searchbar_layout); + elm_object_part_content_set(searchbar_layout, "button_cancel", cancel_btn); + elm_object_style_set(cancel_btn, "searchbar/default"); + elm_object_text_set(cancel_btn, _("Cancel")); + + if (!cancel_cb){ + cancel_cb = __searchbar_cancel_clicked_cb; + } + evas_object_smart_callback_add(cancel_btn, "clicked", cancel_cb, searchbar_layout); + elm_object_signal_callback_add(searchbar_layout, "elm,action,click", "", __searchbar_searchsymbol_clicked_cb, entry); + return searchbar_layout; +} + diff --git a/setting-common/src/setting-common-draw-widget.c b/setting-common/src/setting-common-draw-widget.c index 859fe81..fe472f0 100755 --- a/setting-common/src/setting-common-draw-widget.c +++ b/setting-common/src/setting-common-draw-widget.c @@ -1,141 +1,27 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #include - -#define EXCEED_LIMITATION_STR "Name is too long." -/** - * Do process when clicking on a common genlist item - */ -void setting_mouse_up_Gendial_list_radio_cb(void *data, Evas_Object *obj, - void *event_info) -{ - /* error check */ - retm_if(event_info == NULL, "Invalid argument: event info is NULL"); - Elm_Object_Item *item = (Elm_Object_Item *) event_info; - elm_genlist_item_selected_set(item, 0); - Setting_GenGroupItem_Data *list_item = - (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); - - setting_retm_if(data == NULL, "Data parameter is NULL"); - Evas_Object *radio = data; - elm_radio_value_set(radio, list_item->chk_status); -} - -static void __radio_changed(void *data, Evas_Object *obj, void *event_info) -{ - retm_if(data == NULL, "Data parameter is NULL"); - Setting_GenGroupItem_Data *list_item = - (Setting_GenGroupItem_Data *) data; - list_item->chk_status = elm_radio_value_get(obj); /* for update */ -} - -static void __entry_changed(void *data, Evas_Object *obj, void *event_info) -{ - retm_if(data == NULL, "Data parameter is NULL"); - Setting_GenGroupItem_Data *list_item = - (Setting_GenGroupItem_Data *) data; - list_item->sub_desc = (char *)g_strdup(elm_entry_entry_get(obj)); - Evas_Object *entry_container = elm_object_parent_widget_get(obj); - if (entry_container) - { - if (elm_entry_is_empty(obj)) - { - elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm"); - elm_object_signal_emit(entry_container, "elm,state,eraser,hide", "elm"); - } - else - { - elm_object_signal_emit(entry_container, "elm,state,guidetext,hide", "elm"); - elm_object_signal_emit(entry_container, "elm,state,eraser,show", "elm"); - } - } -} - -static void __entry_unfocused(void *data, Evas_Object *obj, void *event_info) // Unfocused callback will show guidetext and hide X marked button. -{ - ret_if(!data); - Evas_Object *entry_container = data; - //whe entry unfocused, its guidetext will becomes "Input here" - elm_object_part_text_set(entry_container, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); - if (elm_entry_is_empty(obj)) - elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm"); - elm_object_signal_emit(entry_container, "elm,state,eraser,hide", "elm"); -} -static void __entry_focused(void *data, Evas_Object *obj, void *event_info) // Focused callback will show X marked button and hide guidetext. -{ - ret_if(!data); - Evas_Object *entry_container = data; - //whe entry focused, its guidetext will becomes "Input here" - elm_object_part_text_set(entry_container, "elm.guidetext", _("Input here")); - if (!elm_entry_is_empty(obj)) - elm_object_signal_emit(entry_container, "elm,state,eraser,show", "elm"); - elm_object_signal_emit(entry_container, "elm,state,guidetext,hide", "elm"); -} -static void __eraser_clicked(void *data, Evas_Object *obj, const char *emission, const char *source) // When X marked button is clicked, empty entry's contents. -{ - ret_if(!data); - Evas_Object *entry = data; - elm_entry_entry_set(entry, ""); - elm_object_focus_set(entry, EINA_TRUE); -} - -static void __chk_changed(void *data, Evas_Object *obj, void *event_info) -{ - retm_if(data == NULL, "Data parameter is NULL"); - Setting_GenGroupItem_Data *list_item = - (Setting_GenGroupItem_Data *) data; - list_item->chk_status = elm_check_state_get(obj); /* for update */ -} - -static void __error_popup_response_cb(void *data, Evas_Object *obj, - void *event_info) -{ - SETTING_TRACE_BEGIN; - retm_if(data == NULL, "Data parameter is NULL"); - Setting_GenGroupItem_Data *list_item = data; - if (list_item->notify) { - evas_object_del(list_item->notify); - list_item->notify = NULL; - } -} - -static void __max_lenght_reached(void *data, Evas_Object *obj, void *event_info) -{ - SETTING_TRACE_BEGIN; - retm_if(data == NULL, "Data parameter is NULL"); - retm_if(!elm_object_focus_get(obj), "Entry is not focused");//notify only when entry is being focused on. - - Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; - if (!list_item->notify) - { - list_item->notify = setting_create_popup_without_btn(list_item, list_item->win_main, - _(EXCEED_LIMITATION_STR), - NULL, - __error_popup_response_cb, - POPUP_INTERVAL); - } else { - //postpone 2 seconds again - elm_popup_timeout_set(list_item->notify, POPUP_INTERVAL); - } - -} - +#include +#include /** * Hide the input pannel @@ -145,7 +31,7 @@ static void __max_lenght_reached(void *data, Evas_Object *obj, void *event_info) void setting_hide_input_pannel_cb(Evas_Object *entry) { ret_if(entry == NULL); - Ecore_IMF_Context *imf_context = (Ecore_IMF_Context *)elm_entry_imf_context_get(entry); + Ecore_IMF_Context *imf_context = (Ecore_IMF_Context*)elm_entry_imf_context_get(entry); if (imf_context) { ecore_imf_context_input_panel_hide(imf_context); } @@ -157,1278 +43,41 @@ void setting_hide_input_pannel_cb(Evas_Object *entry) if (elm_entry_is_empty(entry)) elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm"); elm_object_signal_emit(entry_container, "elm,state,eraser,hide", "elm"); - } -} - -/** - * Do process when clicking radio in subitem of expandable item - */ -void setting_sub_list_rd_change(void *data, Evas_Object *obj, void *event_info) -{ - SETTING_TRACE_BEGIN; - retm_if(data == NULL, "Data parameter is NULL"); - Setting_GenGroupItem_Data *list_item = - (Setting_GenGroupItem_Data *) data; - list_item->chk_status = elm_radio_value_get(obj); /* for update */ - - Elm_Object_Item *subItem = list_item->item; - Elm_Object_Item *parentItem = elm_genlist_item_parent_get(subItem); - - Setting_GenGroupItem_Data *data_subItem = elm_object_item_data_get(subItem); /* subItem data */ - Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ - - ret_if(NULL == data_subItem || NULL == data_parentItem); - int err; - setting_set_int_slp_key(data_parentItem->int_slp_setting_binded, - list_item->chk_status, &err); - ret_if(0 != err); - data_parentItem->sub_desc = (char *)g_strdup(_(data_subItem->keyStr)); - elm_object_item_data_set(data_parentItem->item, data_parentItem); - elm_genlist_item_update(data_parentItem->item); -} - -/** - * Do process when clicking on subitem of expandable item - */ -void setting_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) -{ - SETTING_TRACE_BEGIN; - /* error check */ - retm_if(event_info == NULL, "Invalid argument: event info is NULL"); - Elm_Object_Item *subitem = (Elm_Object_Item *) event_info; - Elm_Object_Item *parentItem = elm_genlist_item_parent_get(subitem); - elm_genlist_item_selected_set(subitem, 0); - Setting_GenGroupItem_Data *data_subItem = - elm_object_item_data_get(subitem); - Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ - ret_if(NULL == data_subItem || NULL == data_parentItem); - - elm_radio_value_set(data_subItem->rgd, data_subItem->chk_status); - int err; - setting_set_int_slp_key(data_parentItem->int_slp_setting_binded, - data_subItem->chk_status, &err); - setting_retm_if(0 != err, "Set vconf error[%d]",data_parentItem->int_slp_setting_binded); - - data_parentItem->sub_desc = (char *)g_strdup(_(data_subItem->keyStr)); - elm_object_item_data_set(data_parentItem->item, data_parentItem); - elm_genlist_item_update(data_parentItem->item); -} - -static void __exp_list_smart_cb(void *data, Evas_Object *obj, void *event_info) -{ - ret_if(data == NULL || event_info == NULL); - Elm_Object_Item *item = (Elm_Object_Item *) event_info; - char *cb_type = data; - - if (0 == safeStrCmp(cb_type, "drag") - || 0 == safeStrCmp(cb_type, "longpressed")) { - //Evas_Object *base_view = (Evas_Object *) elm_genlist_item_object_get(item); - //edje_object_signal_emit(base_view, "mouse,out", "touch_arrow"); - } else if (0 == safeStrCmp(cb_type, "contracted")) { - elm_genlist_item_subitems_clear(item); - } -} - -static void _gl_Gendial_sel(void *data, Evas_Object *obj, void *event_info) -{ - /* SETTING_TRACE_BEGIN; */ - retm_if(event_info == NULL, "Invalid argument: event info is NULL"); - Elm_Object_Item *item = (Elm_Object_Item *) event_info; - elm_genlist_item_selected_set(item, 0); - return; -} - -static void _gl_Gendial_sel_expand(void *data, Evas_Object *obj, - void *event_info) -{ - /* SETTING_TRACE_BEGIN; */ - retm_if(event_info == NULL, "Invalid argument: event info is NULL"); - Elm_Object_Item *item = (Elm_Object_Item *) event_info; - elm_genlist_item_selected_set(item, 0); - bool status = !elm_genlist_item_expanded_get(item); - elm_genlist_item_expanded_set(item, status); - return; -} - -static char *_gl_Gendial_text_get(void *data, Evas_Object *obj, - const char *part) -{ - /* SETTING_TRACE_BEGIN; */ - Setting_GenGroupItem_Data *item_data = - (Setting_GenGroupItem_Data *) data; - /* SETTING_TRACE("part:%s", part); */ - if (SWALLOW_Type_LAYOUT_SLIDER == item_data->swallow_type - || SWALLOW_Type_LAYOUT_ENTRY == item_data->swallow_type - || SWALLOW_Type_1RADIO_1LABLE == item_data->swallow_type) { /* no need to create 'text' part */ - /* SETTING_TRACE("part:%s", part); */ - /* SETTING_TRACE("item_data->swallow_type:%d", item_data->swallow_type); */ - return NULL; - } - - if (!safeStrCmp(part, "elm.text") - || !safeStrCmp(part, "elm.text.1")) { /* title */ - if (item_data->keyStr) { - return (char *)g_strdup(_(item_data->keyStr)); /* use item_data->keyStr */ - } - - } else if (!safeStrCmp(part, "elm.text.2")) { /* bottom or right */ - if (item_data->sub_desc) { - return (char *)g_strdup(item_data->sub_desc); - } - } - - return NULL; -} - -static Evas_Object *_gl_Gendial_content_get(void *data, Evas_Object *obj, - const char *part) -{ - /* SETTING_TRACE_BEGIN; */ - Setting_GenGroupItem_Data *item_data = - (Setting_GenGroupItem_Data *) data; - /* SETTING_TRACE("part:%s", part); */ - /* SETTING_TRACE("item_data->swallow_type:%d", item_data->swallow_type); */ - Evas_Object *eo_begin = NULL; - Evas_Object *eo_end = NULL; - if (!safeStrCmp(part, "elm.icon") - || !safeStrCmp(part, "elm.icon.1")) { /* left */ - if (item_data->swallow_type == SWALLOW_Type_1CHECK) { - eo_begin = elm_check_add(obj); - evas_object_show(eo_begin); - evas_object_pass_events_set(eo_begin, 1); - evas_object_propagate_events_set(eo_begin, 0); - - elm_check_state_set(eo_begin, item_data->chk_status); - item_data->eo_check = eo_begin; - /* SETTING_TRACE("keyStr:%s", item_data->keyStr); */ - /* SETTING_TRACE("eo_begin:%p", eo_begin); */ - /* SETTING_TRACE("it is %s, item_data->eo_check:%p, widdget_type:%s", _(item_data->keyStr), item_data->eo_check, elm_widget_type_get(eo_begin)); */ - - if (item_data->chk_change_cb) { - evas_object_smart_callback_add(eo_begin, - "changed", - item_data->chk_change_cb, - item_data); - } else { - evas_object_smart_callback_add(eo_begin, - "changed", - __chk_changed, - item_data); - } - - } else if (item_data->swallow_type == SWALLOW_Type_1CHECKICON) { - eo_begin = elm_check_add(obj); - evas_object_show(eo_begin); - evas_object_pass_events_set(eo_begin, 1); - evas_object_propagate_events_set(eo_begin, 0); - - elm_check_state_set(eo_begin, item_data->chk_status); - item_data->eo_check = eo_begin; - /* SETTING_TRACE("keyStr:%s", item_data->keyStr); */ - /* SETTING_TRACE("eo_begin:%p", eo_begin); */ - /* SETTING_TRACE("it is %s, item_data->eo_check:%p, widdget_type:%s", _(item_data->keyStr), item_data->eo_check, elm_widget_type_get(eo_begin)); */ - - if (item_data->chk_change_cb) { - evas_object_smart_callback_add(eo_begin, - "changed", - item_data->chk_change_cb, - item_data); - } else { - evas_object_smart_callback_add(eo_begin, - "changed", - __chk_changed, - item_data); - } - - Evas_Object *thumb = NULL; - /*thumb = create_image_box_add(NULL, params->UGData->win_main, params->UGData->evas, - params->itemSubPath, - 58, 58, - NULL, - NULL); */ - if (item_data->r_swallow_path) { - thumb = elm_icon_add(obj); - elm_icon_file_set(thumb, - item_data->r_swallow_path, - NULL); - evas_object_size_hint_aspect_set(thumb, - EVAS_ASPECT_CONTROL_VERTICAL, - 1, 1); - } - - Evas_Object *layout = elm_layout_add(obj); - elm_layout_file_set(layout, SETTING_THEME_EDJ_NAME, - "thumbnail_icon2"); - evas_object_size_hint_weight_set(layout, - EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - elm_object_part_content_set(layout, "checkbox", eo_begin); - elm_object_part_content_set(layout, "thumbnail", thumb); - evas_object_show(layout); - return layout; - - } else if (item_data->swallow_type == SWALLOW_Type_1TOGGLE) { - eo_begin = elm_check_add(obj); - elm_check_state_set(eo_begin, item_data->chk_status); - - elm_object_style_set(eo_begin, "on&off"); - evas_object_show(eo_begin); - evas_object_pass_events_set(eo_begin, 1); - evas_object_propagate_events_set(eo_begin, 0); - - item_data->eo_check = eo_begin; - if (item_data->chk_change_cb) { - evas_object_smart_callback_add(eo_begin, - "changed", - item_data->chk_change_cb, - item_data); - } else { - evas_object_smart_callback_add(eo_begin, - "changed", - __chk_changed, - item_data); - } - - } else if (item_data->swallow_type == SWALLOW_Type_1RADIO - || item_data->swallow_type == - SWALLOW_Type_1RADIO_1PROCESS) { - if (!item_data->rgd) { /* exceptional handling */ - item_data->rgd = elm_radio_add(obj); - elm_radio_state_value_set(item_data->rgd, -1); - } - eo_begin = elm_radio_add(obj); - elm_radio_state_value_set(eo_begin, - item_data->chk_status); - elm_radio_group_add(eo_begin, item_data->rgd); - item_data->eo_check = eo_begin; - if (item_data->chk_change_cb) { - evas_object_smart_callback_add(eo_begin, - "changed", - item_data->chk_change_cb, - item_data); - } else { - evas_object_smart_callback_add(eo_begin, - "changed", - __radio_changed, - item_data); - } - } else if (SWALLOW_Type_1BUTTON == item_data->swallow_type) { - eo_begin = elm_button_add(obj); - if (item_data->r_swallow_path) - { - elm_object_style_set(eo_begin, item_data->r_swallow_path); - } - if (item_data->keyStr) - { - elm_object_text_set(eo_begin, _(item_data->keyStr)); - } - evas_object_propagate_events_set(eo_begin, EINA_FALSE); - if (item_data->chk_change_cb) - evas_object_smart_callback_add(eo_begin, - "clicked", - item_data->chk_change_cb, - item_data); - } else if (SWALLOW_Type_LAYOUT_ENTRY == item_data->swallow_type) { - elm_genlist_mode_set(obj, ELM_LIST_COMPRESS); /* resolve abnormal height issue */ - Evas_Object *ed_name = - setting_create_editfiled(obj, _(item_data->keyStr), - item_data->sub_desc); - Evas_Object *entry = elm_object_part_content_get(ed_name, "elm.swallow.content"); - item_data->eo_check = entry; - elm_entry_input_panel_layout_set(entry, - item_data->input_type); - - if (item_data->isSinglelineFlag) { - elm_entry_single_line_set(entry, EINA_TRUE); - } - - if (item_data->isPasswordFlag) { - elm_entry_single_line_set(entry, EINA_TRUE); - elm_entry_password_set(entry, EINA_TRUE); - } - - if (item_data->limit_filter_data) { - elm_entry_markup_filter_append - (entry, - elm_entry_filter_limit_size, - item_data->limit_filter_data); - - evas_object_smart_callback_add(entry, - "maxlength,reached", - __max_lenght_reached, - item_data); - - } - if (item_data->stop_change_cb) {//invoked when stop focusing on - evas_object_smart_callback_add(entry, - "unfocused", - item_data->stop_change_cb, - item_data); - } - else - { - evas_object_smart_callback_add(entry, - "unfocused", - __entry_unfocused, - ed_name); - } - if (item_data->digits_filter_data) { - elm_entry_markup_filter_append - (entry, - elm_entry_filter_accept_set, - item_data->digits_filter_data); - } - - /* for Setting App, All the entrys's context popup shouldn't be able */ - /* to insert images, text is the only one can be inserted. */ - elm_entry_cnp_mode_set(entry, ELM_CNP_MODE_PLAINTEXT); - - if (item_data->chk_change_cb) { - evas_object_smart_callback_add - (entry, - "changed", item_data->chk_change_cb, - item_data); - } - //default handle - evas_object_smart_callback_add(entry, "changed", __entry_changed, item_data); - evas_object_smart_callback_add(entry, "focused", __entry_focused, ed_name); - elm_object_signal_callback_add(ed_name, "elm,eraser,clicked", "elm", __eraser_clicked, entry); - - if (item_data->input_panel_disable_flag) { - elm_entry_input_panel_enabled_set(entry, EINA_FALSE); - } - return ed_name; - } else if (SWALLOW_Type_LAYOUT_SLIDER == - item_data->swallow_type) { - Evas_Object *li_slider = - setting_create_slider(obj, item_data->evas, - item_data->l_swallow_path, - item_data->r_swallow_path, - item_data->chk_status, - item_data->slider_min, - item_data->slider_max, - item_data->chk_change_cb, - item_data->start_change_cb, - item_data->stop_change_cb, - item_data); - return li_slider; - } else if (SWALLOW_Type_LAYOUT_SLIDER_WITH_TITLE == - item_data->swallow_type) { - - Evas_Object *li_slider = - setting_create_slider(obj, item_data->evas, - item_data->l_swallow_path, - item_data->r_swallow_path, - item_data->chk_status, - item_data->slider_min, - item_data->slider_max, - item_data->chk_change_cb, - item_data->start_change_cb, - item_data->stop_change_cb, - item_data); - evas_object_pass_events_set(li_slider, 1); - evas_object_propagate_events_set(li_slider, 0); - - return li_slider; - } else if (SWALLOW_Type_LAYOUT_DATEFIELD == - item_data->swallow_type) { - /* SETTING_TRACE("SWALLOW_Type_LAYOUT_DATEFIELD == item_data->swallow_type"); */ - Evas_Object *sub_layout = elm_layout_add(obj); - elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, - "layout_with_title_datetime"); - evas_object_size_hint_weight_set(sub_layout, - EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - /* **********create time/date field */ - Evas_Object *datetimefield = item_data->eo_check = elm_datetime_add(sub_layout); - evas_object_size_hint_weight_set(datetimefield, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(datetimefield, EVAS_HINT_FILL, 0.5); - evas_object_show(datetimefield); - - char date_format[MAX_DATETIME_FORMAT_LEN + 1] = {0, }; - const char *time_format = NULL; - if (item_data->chk_status)//12 hours - { - time_format = "%I : %M %p"; - } else { //24 hours - time_format = "%H : %M"; - } - -#if SUPPORT_DATEFIELD_DATE_FORMAT_AUTOSET //Get date-format from datefiled itself, if elm_datetime_add() supports set date-format via ICU. - char *old_format = elm_datetime_format_get(datetimefield); - snprintf(date_format, MAX_DATE_FORMAT_LEN + 1, //add one space " " - "%s", old_format); - safeStrNCat(date_format, time_format, MAX_DATETIME_FORMAT_LEN); - FREE(old_format); - SETTING_TRACE("datefield_format:%s", date_format); -#else - snprintf(date_format, MAX_DATETIME_FORMAT_LEN, - "%s %s", item_data->sub_desc, time_format); -#endif - elm_datetime_format_set(datetimefield, date_format); - - struct tm ts_ret; - memset(&ts_ret, 0, sizeof(struct tm)); - ts_ret.tm_year = 137; - ts_ret.tm_mon = 11; - ts_ret.tm_mday = 30; - elm_datetime_value_max_set(datetimefield, &ts_ret); - - ts_ret.tm_year = 70; - ts_ret.tm_mon = 0; - ts_ret.tm_mday = 1; - elm_datetime_value_min_set(datetimefield, &ts_ret); - - - time_t ctime = time(NULL); - //struct tm ts_ret; - struct tm *ts = localtime_r(&ctime, &ts_ret); - retv_if(!ts, NULL); - - elm_datetime_value_set(datetimefield, &ts_ret); - - if (item_data->chk_change_cb) { - evas_object_smart_callback_add(datetimefield, - "changed", - item_data->chk_change_cb, - item_data); - } - /* if(item_data->isFocusFlag) */ - /* { */ - /* elm_object_focus(datetimefield); */ - /* } */ - elm_object_part_content_set(sub_layout, "layout", - datetimefield); - edje_object_part_text_set(_EDJ(sub_layout), "title", - _(item_data->keyStr)); - if (Theme_Tizen_Black == setting_get_theme() - || Theme_Tizen_Blue == setting_get_theme()) { - edje_object_signal_emit(_EDJ(sub_layout), - "change,non-white,theme", - "title"); - } - - if (item_data->isItemDisableFlag) { - setting_disable_evas_object(datetimefield); - } - return sub_layout; - } else if (SWALLOW_Type_1RADIO_1SEARCH == item_data->swallow_type) { - - Evas_Object *box = elm_box_add(obj); - elm_box_horizontal_set(box, 1); - - //a.radio.. - if (!item_data->rgd) { //exceptional handling - item_data->rgd = elm_radio_add(obj); - elm_radio_state_value_set(item_data->rgd, -1); - } - eo_begin = elm_radio_add(obj); - elm_radio_state_value_set(eo_begin, - item_data->chk_status); - elm_radio_group_add(eo_begin, item_data->rgd); - item_data->eo_check = eo_begin; - evas_object_show(eo_begin); - setting_disable_evas_object(eo_begin); - elm_box_pack_end(box, eo_begin); - - //b.separator.. - Evas_Object *separator = - setting_create_blank_rect_customize(box, - SETTING_HALF_SCREEN_WIDTH, - SETTING_PADDING_HEIGHT); - elm_box_pack_end(box, separator); - - //c.progressbar.. - Evas_Object *progressbar = elm_progressbar_add(obj); - elm_object_style_set(progressbar, "list_process"); - evas_object_size_hint_align_set(progressbar, - EVAS_HINT_FILL, 0.5); - evas_object_size_hint_weight_set(progressbar, - EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - elm_progressbar_pulse(progressbar, EINA_TRUE); - evas_object_show(progressbar); - elm_box_pack_end(box, progressbar); - - evas_object_show(box); - return box; - } else if (SWALLOW_Type_0RADIO_1SEARCH == item_data->swallow_type) { - // added by JTS: CQ H0100135171 - Evas_Object *box = elm_box_add(obj); - elm_box_horizontal_set(box, 1); - - //b.separator.. - Evas_Object *separator = - setting_create_blank_rect_customize(box, - SETTING_HALF_SCREEN_WIDTH, SETTING_PADDING_HEIGHT); - elm_box_pack_end(box, separator); - - //c.progressbar.. - Evas_Object *progressbar = elm_progressbar_add(obj); - elm_object_style_set(progressbar, "list_process"); - evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, 0.5); - evas_object_size_hint_weight_set(progressbar, - EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_progressbar_pulse(progressbar, EINA_TRUE); - evas_object_show(progressbar); - elm_box_pack_end(box, progressbar); - - evas_object_show(box); - return box; - } else if (SWALLOW_Type_1PROCESS == item_data->swallow_type) { - Evas_Object *progressbar = elm_progressbar_add(obj); - elm_object_style_set(progressbar, "list_process_small"); - elm_progressbar_horizontal_set(progressbar, EINA_TRUE); - elm_progressbar_pulse(progressbar, EINA_TRUE); - evas_object_show(progressbar); - return progressbar; - } else if (SWALLOW_Type_1RADIO_1LABLE == item_data->swallow_type) { - //set_font_dpi(MIDDLE_FONT_DPI);//relative to middle font_size - Evas_Object *box = elm_box_add(obj); - elm_box_horizontal_set(box, 1); - - //a.radio.. - if (!item_data->rgd) { /* exceptional handling */ - item_data->rgd = elm_radio_add(obj); - elm_radio_state_value_set(item_data->rgd, -1); - } - eo_begin = elm_radio_add(obj); - elm_radio_state_value_set(eo_begin, - item_data->chk_status); - elm_radio_group_add(eo_begin, item_data->rgd); - item_data->eo_check = eo_begin; - - if (item_data->chk_change_cb) { - evas_object_smart_callback_add(eo_begin, - "changed", - item_data->chk_change_cb, - item_data); - } else { - evas_object_smart_callback_add(eo_begin, - "changed", - __radio_changed, - item_data); - } - - evas_object_show(eo_begin); - setting_disable_evas_object(eo_begin); - elm_box_pack_end(box, eo_begin); - - //b.separator.. - Evas_Object *separator = - setting_create_blank_rect_customize(box, - SETTING_PADDING_WIDTH, - SETTING_PADDING_HEIGHT); - elm_box_pack_end(box, separator); - - //c.progressbar.. - Evas_Object *label = elm_label_add(box); - char speciliztion[MAX_SPECIALIZITION_LEN] = { 0, }; - if (item_data->chk_status > 0)//font_size - { - int font_size = -1; - SETTING_TRACE("item_data->chk_status:%d", item_data->chk_status); - if (SMALL_FONT_DPI == item_data->chk_status) { - font_size = 18; - } else if (LARGE_FONT_DPI == item_data->chk_status) { - font_size = 35; - } else if (HUGE_FONT_DPI == item_data->chk_status) { - font_size = 65; - } else if (GIANT_FONT_DPI == item_data->chk_status) { - font_size = 82; - } else { - font_size = 24; - } - SETTING_TRACE("font_size:%d", font_size); - snprintf(speciliztion, sizeof(speciliztion), - "%s", - font_size, - _(item_data->keyStr)); - elm_object_text_set(label, speciliztion); - } - else - { - elm_object_text_set(label, _(item_data->keyStr)); - } - evas_object_show(label); - elm_box_pack_end(box, label); - return box; - - } else { - if (item_data->l_swallow_path) { - eo_begin = elm_icon_add(obj); - elm_icon_file_set(eo_begin, - item_data->l_swallow_path, - NULL); - evas_object_size_hint_aspect_set(eo_begin, - EVAS_ASPECT_CONTROL_VERTICAL, - 1, 1); - } - } - return eo_begin; - } else if (!safeStrCmp(part, "elm.icon.2")) { /* right */ - if (item_data->swallow_type == SWALLOW_Type_1ICON_1RADIO) { - eo_end = elm_check_add(obj); - elm_check_state_set(eo_end, item_data->chk_status); - elm_object_style_set(eo_end, "on&off"); - evas_object_show(eo_end); - evas_object_pass_events_set(eo_end, 1); - evas_object_propagate_events_set(eo_end, 0); - - item_data->eo_check = eo_end; - if (item_data->chk_change_cb) { - evas_object_smart_callback_add(eo_end, - "changed", - item_data->chk_change_cb, - item_data); - } else { - evas_object_smart_callback_add(eo_end, - "changed", - __chk_changed, - item_data); - } - - } else if (SWALLOW_Type_1RADIO_1PROCESS == - item_data->swallow_type) { - Evas_Object *progressbar = elm_progressbar_add(obj); - elm_object_style_set(progressbar, "list_process"); - evas_object_size_hint_align_set(progressbar, - EVAS_HINT_FILL, 0.5); - evas_object_size_hint_weight_set(progressbar, - EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - elm_progressbar_pulse(progressbar, EINA_TRUE); - evas_object_show(progressbar); - return progressbar; - } else { - if (item_data->r_swallow_path) { - if (SWALLOW_Type_1ICON_1IMAGE == - item_data->swallow_type) { - eo_end = - create_image_box_add(NULL, - item_data->win_main, - item_data->evas, - (char *) - item_data->r_swallow_path, 58, 58, NULL, NULL); - } else { - eo_end = elm_icon_add(obj); - elm_icon_file_set(eo_end, - item_data->r_swallow_path, - NULL); - evas_object_size_hint_aspect_set(eo_end, - EVAS_ASPECT_CONTROL_VERTICAL, - 1, 1); - } - } - } - return eo_end; - - } else if (!safeStrCmp(part, "elm.swallow.end")) { /* right */ - if (item_data->swallow_type == SWALLOW_Type_1RADIO) { - if (!item_data->rgd) { /* exceptional handling */ - item_data->rgd = elm_radio_add(obj); - elm_radio_state_value_set(item_data->rgd, -1); - } - eo_end = elm_radio_add(obj); - elm_radio_state_value_set(eo_end, - item_data->chk_status); - elm_radio_group_add(eo_end, item_data->rgd); - item_data->eo_check = eo_end; - if (item_data->chk_change_cb) { - evas_object_smart_callback_add(eo_end, - "changed", - item_data->chk_change_cb, - item_data); - } else { - evas_object_smart_callback_add(eo_end, - "changed", - __radio_changed, - item_data); - } - return eo_end; - } - - } - - return NULL; -} - -static void _gl_Gendial_del(void *data, Evas_Object *obj) -{ - /* SETTING_TRACE_BEGIN; */ - Setting_GenGroupItem_Data *item_data = - (Setting_GenGroupItem_Data *) data; - if (item_data) { - G_FREE(item_data->keyStr); - G_FREE(item_data->sub_desc); - G_FREE((item_data->l_swallow_path)); - G_FREE((item_data->r_swallow_path)); - G_FREE(item_data->title); - G_FREE(item_data->item_style); - - - if (item_data->digits_filter_data) - { - G_FREE(item_data->digits_filter_data->accepted); - G_FREE(item_data->digits_filter_data->rejected); - FREE(item_data->digits_filter_data); - - } - - if (item_data->notify) { - evas_object_del(item_data->notify); - item_data->notify = NULL; - } - - FREE(item_data->limit_filter_data); - __BACK_POINTER_UNSET(item_data); - FREE(item_data); - } - /* SETTING_TRACE_END; */ - return; -} - -const static Elm_Genlist_Item_Class itc_sep_line = { - .item_style = "dialogue/separator/1/with_line", - .func.text_get = _gl_Gendial_text_get, - .func.content_get = NULL, - .func.state_get = NULL, - .func.del = NULL, -}; - -/** - * To intialize an Elm_Genlist_Item_Class, according to item style - * - * @param[in] item_style - * @param[in/out] itc - */ -bool setting_create_Gendial_itc(const char *item_style, - Elm_Genlist_Item_Class *itc) -{ - itc->item_style = item_style; - itc->func.text_get = _gl_Gendial_text_get; - itc->func.content_get = _gl_Gendial_content_get; - itc->func.state_get = NULL; - itc->func.del = _gl_Gendial_del; /* _gl_Gendial_del; */ - return TRUE; -} - -/** - * Create group style item - * - * @return a pointer to Setting_GenGroupItem_Data - */ -Setting_GenGroupItem_Data *setting_create_Gendial_field_group_titleItem(Evas_Object *genlist, - const Elm_Genlist_Item_Class *itc, - Elm_Object_Item *parent, - Elm_Genlist_Item_Type flag, /* ELM_GENLIST_ITEM_GROUP or ELM_GENLIST_ITEM_NONE */ - const char *keyStr, - setting_call_back_func gl_sel) -{ - /* SETTING_TRACE_BEGIN; */ - Setting_GenGroupItem_Data *item_data = - (Setting_GenGroupItem_Data *) calloc(1, - sizeof - (Setting_GenGroupItem_Data)); - setting_retvm_if(!item_data, NULL, "calloc failed"); - item_data->keyStr = (char *)g_strdup(keyStr); - if (gl_sel) { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, parent, - flag, gl_sel, NULL); - } else { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, parent, - flag, _gl_Gendial_sel, NULL); - } - return item_data; -} - -/** - * Create separator style item with title - * - * @return a pointer to Setting_GenGroupItem_Data - */ -Setting_GenGroupItem_Data *setting_create_Gendial_field_titleItem( - Evas_Object *genlist, - const Elm_Genlist_Item_Class *itc, - const char *keyStr, - setting_call_back_func gl_sel) -{ - /* SETTING_TRACE_BEGIN; */ - Setting_GenGroupItem_Data *item_data = - (Setting_GenGroupItem_Data *) calloc(1, - sizeof - (Setting_GenGroupItem_Data)); - setting_retvm_if(!item_data, NULL, "calloc failed"); - item_data->keyStr = (char *)g_strdup(keyStr); - if (gl_sel) { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, NULL, - ELM_GENLIST_ITEM_NONE, gl_sel, - NULL); - } else { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, NULL, - ELM_GENLIST_ITEM_NONE, - _gl_Gendial_sel, NULL); - } - return item_data; -} - -/** - * Create 1radio-1text style item - * - * @return a pointer to Setting_GenGroupItem_Data - */ - -Setting_GenGroupItem_Data *setting_create_Gendial_field_1radio( - Evas_Object *genlist, - const Elm_Genlist_Item_Class *itc, - setting_call_back_func gl_sel, - void *sel_data, - SWALLOW_Type swallow_type, - Evas_Object *rgd, int chk_status, - const char *keyStr, - setting_call_back_func chk_change_cb) -{ - /* SETTING_TRACE_BEGIN; */ - Setting_GenGroupItem_Data *item_data = - (Setting_GenGroupItem_Data *) calloc(1, - sizeof - (Setting_GenGroupItem_Data)); - setting_retvm_if(!item_data, NULL, "calloc failed"); - item_data->keyStr = (char *)g_strdup(keyStr); - item_data->swallow_type = swallow_type; - item_data->chk_status = chk_status; - item_data->chk_change_cb = chk_change_cb; - item_data->rgd = rgd; - - if (gl_sel) { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, NULL, - ELM_GENLIST_ITEM_NONE, gl_sel, - sel_data); - } else { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, NULL, - ELM_GENLIST_ITEM_NONE, - _gl_Gendial_sel, sel_data); - } - return item_data; -} - -Setting_GenGroupItem_Data *setting_create_Gendial_field_2radio( - Evas_Object *genlist, - const Elm_Genlist_Item_Class *itc, - setting_call_back_func gl_sel, - void *sel_data, - SWALLOW_Type swallow_type, - Evas_Object *rgd, int chk_status, - const char *keyStr, - const char *sub_desc, - setting_call_back_func chk_change_cb) -{ - /* SETTING_TRACE_BEGIN; */ - Setting_GenGroupItem_Data *item_data = - (Setting_GenGroupItem_Data *) calloc(1, - sizeof - (Setting_GenGroupItem_Data)); - setting_retvm_if(!item_data, NULL, "calloc failed"); - item_data->keyStr = (char *)g_strdup(keyStr); - item_data->sub_desc = (char *)g_strdup(sub_desc); - item_data->swallow_type = swallow_type; - item_data->chk_status = chk_status; - item_data->chk_change_cb = chk_change_cb; - item_data->rgd = rgd; - - if (gl_sel) { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, NULL, - ELM_GENLIST_ITEM_NONE, gl_sel, - sel_data); - } else { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, NULL, - ELM_GENLIST_ITEM_NONE, - _gl_Gendial_sel, sel_data); - } - return item_data; -} - -/** - * Create common style item with menu icon - * - * @return a pointer to Setting_GenGroupItem_Data - */ -Setting_GenGroupItem_Data *setting_create_Gendial_field_groupitem( - Evas_Object *genlist, - const Elm_Genlist_Item_Class *itc, - Elm_Object_Item *parent, - setting_call_back_func gl_sel, - void *sel_data, - SWALLOW_Type swallow_type, - char *l_icon_path, - char *r_icon_path, int chk_status, - const char *keyStr, char *sub_desc, - setting_call_back_func - chk_change_cb) -{ -// SETTING_TRACE_BEGIN; - Setting_GenGroupItem_Data *item_data = ( - Setting_GenGroupItem_Data *) calloc(1, sizeof(Setting_GenGroupItem_Data)); - setting_retvm_if(!item_data, NULL, "calloc failed"); - - /* to do formatting customizition in one place */ - if (SWALLOW_Type_LAYOUT_SPECIALIZTION == swallow_type - || SWALLOW_Type_LAYOUT_SPECIALIZTION_X == swallow_type) { - elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS); - - char speciliztion[MAX_SPECIALIZITION_LEN] = { 0, }; - //char *temp1 = setting_customize_text(keyStr, 0, "#9C9C9C", "left"); - char* temp1 = (char *)keyStr; - char*temp2 = strchr(temp1, '&'); - char* temp = NULL; - - while (NULL != temp2) { - if (0 == safeStrNCmp(temp2, "&", strlen("&")) ||//'&' - 0 == safeStrNCmp(temp2, "<", strlen("<")) ||//'<' - 0 == safeStrNCmp(temp2, ">", strlen(">")) ||//'>' - 0 == safeStrNCmp(temp2, """, strlen(""")) ||//double quotes - 0 == safeStrNCmp(temp2, "'", strlen("'")) ||//single quotes - 0 == safeStrNCmp(temp2, " ", strlen(" ")) ||//space character - 0 == safeStrNCmp(temp2, "©", strlen("©")) ||//copyright character - 0 == safeStrNCmp(temp2, "®", strlen("®"))//registeration character - ) {//escape character,do nothing - temp = temp2 + 1; - if ('\0' == temp[0]) break; - temp2 = strchr(temp, '&'); - } - else - { - g_strlcat(speciliztion, temp1, temp2 - temp1 +1); - g_strlcat(speciliztion, "&", MAX_SPECIALIZITION_LEN); - temp1 = temp2 + 1; - if ('\0' == temp1[0]) break; - temp2 = strchr(temp1, '&'); - } - } - if ('\0' != temp1[0]) { - g_strlcat(speciliztion, temp1, MAX_SPECIALIZITION_LEN); - } - - - item_data->keyStr = (char *)g_strdup(speciliztion); - } else { - item_data->keyStr = (char *)g_strdup(keyStr); - } - - item_data->sub_desc = (char *)g_strdup(sub_desc); - item_data->swallow_type = swallow_type; - item_data->l_swallow_path = (char *)g_strdup(l_icon_path); - item_data->r_swallow_path = (char *)g_strdup(r_icon_path); - - item_data->chk_status = chk_status; - item_data->chk_change_cb = chk_change_cb; - - if (gl_sel) { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, parent, - ELM_GENLIST_ITEM_NONE, gl_sel, - sel_data); - } else { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, parent, - ELM_GENLIST_ITEM_NONE, - _gl_Gendial_sel, sel_data); - } - if (SWALLOW_Type_LAYOUT_SPECIALIZTION == swallow_type) { - Elm_Object_Item *item = elm_genlist_item_append(genlist, - &(itc_sep_line), - NULL, NULL, - ELM_GENLIST_ITEM_NONE, - NULL, NULL); - elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - //Fix the separator line disappear issue when clicking "SPECIALIZTION" words in new HD theme - elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - } - - return item_data; -} - -/** - * Common function to create a genlist item - * @return a pointer to Setting_GenGroupItem_Data - */ -Setting_GenGroupItem_Data *setting_create_Gendial_field_def(Evas_Object * - genlist, - const Elm_Genlist_Item_Class *itc, - setting_call_back_func - gl_sel, - void *sel_data, - SWALLOW_Type - swallow_type, - char *l_icon_path, - char *r_icon_path, - int chk_status, - const char *keyStr, - char *sub_desc, - setting_call_back_func - chk_change_cb) -{ - return setting_create_Gendial_field_groupitem(genlist, itc, NULL, - gl_sel, sel_data, - swallow_type, l_icon_path, - r_icon_path, chk_status, - keyStr, sub_desc, - chk_change_cb); -} - -/** - * Create 1entry style item - * @return a pointer to Setting_GenGroupItem_Data - */ -Setting_GenGroupItem_Data *setting_create_Gendial_field_entry(Evas_Object * - genlist, - const Elm_Genlist_Item_Class *itc, - setting_call_back_func gl_sel, - void *sel_data, - SWALLOW_Type - swallow_type, - char *l_icon_path, - char *r_icon_path, - int chk_status, - const char *keyStr, - char *sub_desc, - setting_call_back_func - chk_change_cb, - Elm_Input_Panel_Layout - input_type, - bool isPasswordFlag, - bool isFocusFlag, - int max_char_count, - int max_byte_count, - char *accepted, - char *rejected) -{ - /* SETTING_TRACE_BEGIN; */ - Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) calloc(1, - sizeof (Setting_GenGroupItem_Data)); - setting_retvm_if(!item_data, NULL, "calloc failed"); - item_data->keyStr = (char *)g_strdup(keyStr); - item_data->sub_desc = (char *)g_strdup(sub_desc); - item_data->swallow_type = swallow_type; - item_data->l_swallow_path = (char *)g_strdup(l_icon_path); - item_data->r_swallow_path = (char *)g_strdup(r_icon_path); - item_data->chk_status = chk_status; - item_data->chk_change_cb = chk_change_cb; - - item_data->input_type = input_type; - item_data->isPasswordFlag = isPasswordFlag; - item_data->isFocusFlag = isFocusFlag; - - Elm_Entry_Filter_Accept_Set *digits_filter_data = - (Elm_Entry_Filter_Accept_Set *) calloc(1, sizeof (Elm_Entry_Filter_Accept_Set)); - if(!digits_filter_data) { - SETTING_TRACE_ERROR("calloc Elm_Entry_Filter_Accept_Set failed"); - // free allocated data - G_FREE(item_data->keyStr); - G_FREE(item_data->sub_desc); - G_FREE(item_data->l_swallow_path); - G_FREE(item_data->r_swallow_path); - FREE(item_data); - return NULL; - } - - - Elm_Entry_Filter_Limit_Size *limit_filter_data = - (Elm_Entry_Filter_Limit_Size *) calloc(1, sizeof (Elm_Entry_Filter_Limit_Size)); - if(!limit_filter_data) { - SETTING_TRACE_ERROR("calloc Elm_Entry_Filter_Limit_Size failed"); - - // free allocated data - G_FREE(item_data->keyStr); - G_FREE(item_data->sub_desc); - G_FREE(item_data->l_swallow_path); - G_FREE(item_data->r_swallow_path); - FREE(item_data); - FREE(digits_filter_data); - return NULL; - } - - limit_filter_data->max_char_count = max_char_count; - limit_filter_data->max_byte_count = max_byte_count; - digits_filter_data->accepted = (char *)g_strdup(accepted); - digits_filter_data->rejected = (char *)g_strdup(rejected); - - item_data->digits_filter_data = digits_filter_data; - item_data->limit_filter_data = limit_filter_data; - item_data->userdata = sel_data; - - if (gl_sel) { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, NULL, - ELM_GENLIST_ITEM_NONE, gl_sel, - sel_data); - } else { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, NULL, - ELM_GENLIST_ITEM_NONE, - _gl_Gendial_sel, sel_data); } - return item_data; } -/** - * General function to create a parent item of expandable item - * - * @return a pointer to Setting_GenGroupItem_Data - */ -Setting_GenGroupItem_Data *setting_create_Gendial_exp_parent_field( - Evas_Object *genlist, - const Elm_Genlist_Item_Class *itc, - setting_call_back_func gl_sel, - void *sel_data, - SWALLOW_Type swallow_type, - const char *keyStr, - char *sub_desc) +Evas_Object *setting_create_button(Evas_Object *parent, const char *btn_str, + const char *btn_style, + setting_call_back_func btn_click_cb, + void *cb_data) { - /* SETTING_TRACE_BEGIN; */ - Setting_GenGroupItem_Data *item_data = - (Setting_GenGroupItem_Data *) calloc(1, - sizeof - (Setting_GenGroupItem_Data)); - setting_retvm_if(!item_data, NULL, "calloc failed"); - item_data->keyStr = (char *)g_strdup(keyStr); - item_data->sub_desc = (char *)g_strdup(sub_desc); - item_data->swallow_type = swallow_type; - - if (gl_sel) { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, NULL, - ELM_GENLIST_ITEM_TREE, gl_sel, - sel_data); - } else { - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, NULL, - ELM_GENLIST_ITEM_TREE, - _gl_Gendial_sel_expand, sel_data); + retv_if(!parent || !btn_str, NULL); + if ('\0' == btn_str[0]) {//Empty rectangle + return setting_create_blank_rect_customize(parent, + SETTING_PADDING_WIDTH, + SETTING_PADDING_WIDTH); } - return item_data; -} -/** - * General function to create a subitem of expandable item - * - * @return a pointer to Setting_GenGroupItem_Data - */ -Setting_GenGroupItem_Data *setting_create_Gendial_exp_sub_field( - Evas_Object *genlist, - const Elm_Genlist_Item_Class *itc, - setting_call_back_func gl_sel, - void *sel_data, - Elm_Object_Item *parent, - SWALLOW_Type swallow_type, - Evas_Object *rgd, int chk_status, - const char *keyStr, - setting_call_back_func - chk_change_cb) -{ - /* SETTING_TRACE_BEGIN; */ - Setting_GenGroupItem_Data *item_data = - (Setting_GenGroupItem_Data *) calloc(1, - sizeof - (Setting_GenGroupItem_Data)); - setting_retvm_if(!item_data, NULL, "calloc failed"); - item_data->keyStr = (char *)g_strdup(keyStr); - item_data->swallow_type = swallow_type; - item_data->chk_status = chk_status; - item_data->rgd = rgd; - - if (!gl_sel) { - gl_sel = setting_sub_list_sel_cb; - } - if (!chk_change_cb) { - chk_change_cb = setting_sub_list_rd_change; + Evas_Object *button = elm_button_add(parent); + if (btn_style) { + elm_object_style_set(button, btn_style); } - item_data->chk_change_cb = chk_change_cb; - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, parent, - ELM_GENLIST_ITEM_NONE, gl_sel, sel_data); - return item_data; -} + if (0 != safeStrCmp(NAVI_BACK_BUTTON_STYLE, btn_style)) {//not '<-' button + elm_object_text_set(button, btn_str); -/** - * To make genlist support expandable style item - */ -void setting_enable_expandable_genlist(Evas_Object *genlist, void *data, - setting_call_back_func gl_exp_cb, - setting_call_back_func gl_smart_cb) -{ - ret_if(NULL == genlist); - elm_genlist_tree_effect_enabled_set(genlist, TRUE); - if (!gl_smart_cb) { - gl_smart_cb = __exp_list_smart_cb; + evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(button,EVAS_HINT_FILL, 0.5); } - if (gl_exp_cb) - evas_object_smart_callback_add(genlist, "expanded", gl_exp_cb, data); - evas_object_smart_callback_add(genlist, "contracted", gl_smart_cb, "contracted"); - - evas_object_smart_callback_add(genlist, "drag", gl_smart_cb, "drag"); - evas_object_smart_callback_add(genlist, "longpressed", gl_smart_cb, "longpressed"); - - return; -} - -/* -example: - -setting_create_Gendial_itc("dialogue/1text.2icon.2", - &(networkUG->itc_1text_2icon)); - -1. create a process genlist item : [intial state is 'PROCESS'] -ad->data_searching_net = setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_2icon), - setting_network_select_network_mouse_up_Gendial_list_radio_cb, ad, - SWALLOW_Type_1RADIO_1PROCESS, - ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL, - "Searching..", NULL); -or [intial state is 'UNPROCESS'] -ad->data_searching_net = setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_2icon), - setting_network_select_network_mouse_up_Gendial_list_radio_cb, ad, - SWALLOW_Type_1RADIO, - ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL, - "Searching..", NULL); - -2. to set the PROCESS state at any place as you like: -setting_begin_progress_genlist_item(ad->data_searching_net); -- change from UNPROCESS->PROCESS -setting_finish_progress_genlist_item(ad->data_searching_net);--change from PROCESS->UNPROCESS -*/ -void setting_begin_progress_genlist_item(Setting_GenGroupItem_Data *data_item) -{ - if (data_item) { - if (SWALLOW_Type_1RADIO != data_item->swallow_type) { - return; - } - - data_item->swallow_type = SWALLOW_Type_1RADIO_1PROCESS; - elm_object_item_data_set(data_item->item, data_item); - elm_genlist_item_update(data_item->item); + if (btn_click_cb) { + evas_object_smart_callback_add(button, "clicked", + btn_click_cb, cb_data); } + evas_object_show(button); + return button; } -void setting_finish_progress_genlist_item(Setting_GenGroupItem_Data *data_item) -{ - if (data_item) { - if (SWALLOW_Type_1RADIO_1PROCESS != data_item->swallow_type) { - return; - } - data_item->swallow_type = SWALLOW_Type_1RADIO; - elm_object_item_data_set(data_item->item, data_item); - elm_genlist_item_update(data_item->item); - } -} /** * To create slider object of a genlist item @@ -1438,29 +87,37 @@ void setting_finish_progress_genlist_item(Setting_GenGroupItem_Data *data_item) Evas_Object *setting_create_slider(Evas_Object *parent, Evas *evas, const char *l_swallow_path, const char *r_swallow_path, double value, - double slider_min, double slider_max, + bool indicator, double slider_min, double slider_max, setting_call_back_func slider_change_cb, setting_call_back_func slider_start_change_cb, setting_call_back_func slider_stop_change_cb, void *cb_data) { - Setting_GenGroupItem_Data *item_data = - (Setting_GenGroupItem_Data *) cb_data; Evas_Object *slider = elm_slider_add(parent); /* "elm/slider/horizontal/default" */ retv_if(slider == NULL, NULL); - elm_slider_indicator_format_set(slider, "%1.0f"); + if(indicator) + { + elm_slider_indicator_format_set(slider, "%1.0f"); + } + else + { + /* for brightness slider */ + elm_slider_indicator_show_set(slider, EINA_FALSE); + elm_object_style_set(slider, "ebook"); + } + evas_object_size_hint_weight_set(slider, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, 0.5); if (slider_change_cb) - evas_object_smart_callback_add(slider, "changed", slider_change_cb, item_data); + evas_object_smart_callback_add(slider, "changed", slider_change_cb, cb_data); if (slider_stop_change_cb) - evas_object_smart_callback_add(slider, "slider,drag,stop", slider_stop_change_cb, item_data); + evas_object_smart_callback_add(slider, "slider,drag,stop", slider_stop_change_cb, cb_data); if(slider_start_change_cb) - evas_object_smart_callback_add(slider, "slider,drag,start", slider_start_change_cb, item_data); + evas_object_smart_callback_add(slider, "slider,drag,start", slider_start_change_cb, cb_data); Evas_Object *icon1 = elm_icon_add(slider); elm_icon_file_set(icon1, l_swallow_path, NULL); @@ -1475,8 +132,6 @@ Evas_Object *setting_create_slider(Evas_Object *parent, Evas *evas, elm_slider_min_max_set(slider, slider_min, slider_max); elm_slider_value_set(slider, value); - item_data->eo_check = slider; - return slider; } @@ -1588,170 +243,16 @@ Evas_Object *setting_create_lable(Evas_Object *parent, const char *lable, Evas_Object *label = elm_label_add(parent); elm_object_style_set(label, style); elm_label_line_wrap_set(label, ELM_WRAP_MIXED); - elm_object_text_set(label, lable); + + const char *str = setting_customize_text(lable, 0, NULL, "left"); + elm_object_text_set(label, str); + FREE(str); evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(label); return label; } -static void _setting_def_response_cb(void *data, Evas_Object *obj, - void *event_info) -{ - if (obj) { - evas_object_del(obj); - obj = NULL; - } -} - -Evas_Object *setting_create_popup_with_btn(void *data, Evas_Object *parent, - char *content_str, char *title_str, - setting_call_back_func response_cb, - int timeout, int btn_num, ...) -{ - Evas_Object *popup = elm_popup_add(parent); - evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - if (content_str) { - char r_str_text[HELP_MSG_BUFF_SIZE] = { 0, }; - snprintf(r_str_text, HELP_MSG_BUFF_SIZE, ""); - g_strlcat(r_str_text, content_str, HELP_MSG_BUFF_SIZE); - g_strlcat(r_str_text, "", HELP_MSG_BUFF_SIZE); - elm_object_text_set(popup, r_str_text); - - } - - if (title_str) { - elm_object_part_text_set(popup, "title,text", title_str); - } - if (timeout > 0) { - elm_popup_timeout_set(popup, timeout); - } - - if (btn_num > 0) - { - va_list args; - va_start(args, btn_num); - - char *btn_str; - int argno = 0; - char *btn_part_str[] = { - _("button1"), _("button2"), _("button3") - }; - - for (; argno < btn_num; argno++) { - btn_str = va_arg( args, char *); - SETTING_TRACE("Parameter #%d is: %s, btn_part_str;%s", argno, btn_str, btn_part_str[argno]); - if (btn_str) - { - Evas_Object *btn = setting_create_button(popup, btn_str, NULL, response_cb, data); - elm_object_part_content_set(popup, btn_part_str[argno], btn); - } - } - - va_end(args); - } - else - { - if (response_cb) { - evas_object_smart_callback_add(popup, "timeout", response_cb, data); - evas_object_smart_callback_add(popup, "block,clicked", response_cb, data); - } else { - evas_object_smart_callback_add(popup, "timeout", _setting_def_response_cb, data); - evas_object_smart_callback_add(popup, "block,clicked", _setting_def_response_cb, data); - } - } - - evas_object_show(popup); - return popup; -} - -/** -* The general API to create a certain popup window -* -* @return a certain popup window -*/ -Evas_Object *setting_create_popup_without_btn(void *data, Evas_Object *parent, - char *content_str, char *title_str, - setting_call_back_func response_cb, - int timeout) -{ - return setting_create_popup_with_btn(data, parent, content_str, title_str, - response_cb, timeout, 0); -} - -/** -* create a popup window which contents a progressbar -* -* @return a popup window which contents a progressbar -*/ -Evas_Object *setting_create_popup_with_progressbar(void *data, Evas_Object *parent, - char *progressbar_style, - char *progressbar_title, - char *progressbar_lable, - setting_call_back_func response_cb, - int timeout) -{ - Evas_Object *popup = - setting_create_popup_without_btn(data, parent, NULL, progressbar_title, - response_cb, timeout); - Evas_Object *box = elm_box_add(popup); - /* elm_box_horizontal_set(box, 1); */ - - if (progressbar_lable) { - Evas_Object *label = elm_label_add(popup); - elm_object_text_set(label, progressbar_lable); /* "Loading..." */ - evas_object_show(label); - elm_box_pack_end(box, label); - } - - if (progressbar_style) { - Evas_Object *progressbar = elm_progressbar_add(popup); - elm_object_style_set(progressbar, progressbar_style); /* "toolbar_process" or "pending_list" or "list_prosess" */ - elm_progressbar_pulse(progressbar, EINA_TRUE); - evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, - 0.5); - evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - elm_progressbar_pulse(progressbar, EINA_TRUE); - evas_object_show(progressbar); - elm_box_pack_end(box, progressbar); - } - - evas_object_show(box); - elm_object_content_set(popup, box); - return popup; -} - -/** -* The API to create a certain popup window without title -* -* @return a certain popup window without title -*/ -int setting_create_popup_without_title(void *data, Evas_Object *win_main, - char *str_text) -{ - setting_create_popup_without_btn(data, win_main, str_text, - NULL, NULL, POPUP_INTERVAL); - return 0; -} - -/** -* The API to create a certain popup window with title -* -* @return a certain popup window with title -* not used now -*/ -int setting_create_popup_with_title(void *data, Evas_Object *win_main, - char *str_title, char *str_text) -{ - setting_create_popup_without_btn(data, win_main, str_text, - str_title, NULL, POPUP_INTERVAL); - return 0; -} - - - #define DEMO_STEP 0.4 typedef struct _setting_gif_data{ Ecore_Timer *update_timer; @@ -1841,200 +342,6 @@ Evas_Object *setting_create_gif(Evas_Object *parent, const char **png_list) return gif; } -//1Title-1Description-1Gif-nButton -/* @png_list is an array end with 'NULL'. like , - const char *png_list[] = { - SETTING_ICON_PATH_CFG"motions/motion_overturn_01.png", - SETTING_ICON_PATH_CFG"motions/motion_overturn_02.png", - SETTING_ICON_PATH_CFG"motions/motion_overturn_03.png", - SETTING_ICON_PATH_CFG"motions/motion_overturn_04.png", - SETTING_ICON_PATH_CFG"motions/motion_overturn_05.png", - NULL //must end with 'NULL' - }; -*/ - -Evas_Object *setting_create_popup_with_gif(void *data, Evas_Object *parent, char *content_str, char *title_str, const char **png_list, //array end with 'NULL'. - setting_call_back_func response_cb, - int timeout, int btn_num, ...) -{ - SETTING_TRACE_BEGIN; - //displaying image - Evas_Object *image = NULL; - if (png_list && *png_list) { - if (png_list[1]) { //png_list is an array end with 'NULL', and it has at least 2 png file, - image = setting_create_gif(parent, png_list); - } else { //png_list just has one png file, - image = setting_create_image(parent, *png_list); - } - } - - - Evas_Object* pLy = elm_layout_add(parent); - elm_layout_theme_set(pLy, "layout", "application", "noindicator" ); - evas_object_size_hint_weight_set(pLy, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - - Evas_Object* pBg = elm_bg_add(pLy); - evas_object_size_hint_weight_set(pBg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_part_content_set(pLy, "elm.swallow.bg", pBg); - elm_bg_color_set(pBg, 200, 200, 200); // R,G,B: 200 -> White Grey - evas_object_show(pBg); - - evas_object_show(pLy); - elm_object_part_content_set(pLy, "elm.swallow.bg", pBg); - elm_object_part_content_set(pLy, "elm.swallow.content", image); - - Evas_Object *popup = elm_popup_add(parent); - evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - //title - if (title_str) { - elm_object_part_text_set(popup, "title,text", title_str); - } - - if (timeout > 0) { - elm_popup_timeout_set(popup, timeout); - } - - //content - Evas_Object *content_box = elm_box_add(popup); - //instructing of displaying image - if (content_str) { - Evas_Object *lable = setting_create_lable(popup, content_str, - "popup_description/default"); - elm_box_pack_end(content_box, lable); - } - //displaying image - if (pLy) { - elm_box_pack_end(content_box, pLy); - } - - //set box into popup - elm_object_content_set(popup, content_box); - - if (btn_num > 0) - { - va_list args; - va_start(args, btn_num); - - char *btn_str; - int argno = 0; - char *btn_part_str[] = { - _("button1"), _("button2"), _("button3") - }; - - for (; argno < btn_num; argno++) { - btn_str = va_arg( args, char *); - SETTING_TRACE("Parameter #%d is: %s, btn_part_str;%s", argno, btn_str, btn_part_str[argno]); - if (btn_str) - { - Evas_Object *btn = setting_create_button(popup, btn_str, NULL, response_cb, data); - elm_object_part_content_set(popup, btn_part_str[argno], btn); - } - } - - va_end(args); - } - else - { - if (response_cb) { - evas_object_smart_callback_add(popup, "timeout", response_cb, data); - evas_object_smart_callback_add(popup, "block,clicked", response_cb, data); - } else { - evas_object_smart_callback_add(popup, "timeout", _setting_def_response_cb, data); - evas_object_smart_callback_add(popup, "block,clicked", _setting_def_response_cb, data); - } - } - evas_object_show(popup); - return popup; - -} - -Evas_Object *setting_create_popup_with_check(void *data, Evas_Object *parent, - char *content_str, char *title_str, - char *check_str, - setting_call_back_func response_cb, - int timeout, Evas_Object **check, - int btn_num, ...) -{ - SETTING_TRACE_BEGIN; - Evas_Object *popup = elm_popup_add(parent); - evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - //title - if (title_str) { - elm_object_part_text_set(popup, "title,text", title_str); - } - - if (timeout > 0) { - elm_popup_timeout_set(popup, timeout); - } - - Evas_Object *layout = elm_layout_add(popup); - elm_layout_file_set(layout, SETTING_THEME_EDJ_NAME, "popup_checkview"); - evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - - //instructing of displaying image - if (check_str) { - edje_object_part_text_set(elm_layout_edje_get(layout), - "elm.text", check_str); - } - if (check) { - *check = elm_check_add(popup); - evas_object_size_hint_align_set(*check, EVAS_HINT_FILL, - EVAS_HINT_FILL); - evas_object_size_hint_weight_set(*check, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - evas_object_show(*check); - elm_object_part_content_set(layout, "elm.swallow.end", *check); - } - //content - if (content_str) { - Evas_Object *lable = setting_create_lable(popup, content_str, - "popup_description/default"); - elm_object_part_content_set(layout, "elm.swallow.content", lable); - } - //set box into popup - elm_object_content_set(popup, layout); - - if (btn_num > 0) - { - va_list args; - va_start(args, btn_num); - - char *btn_str; - int argno = 0; - char *btn_part_str[] = { - _("button1"), _("button2"), _("button3") - }; - - for (; argno < btn_num; argno++) { - btn_str = va_arg( args, char *); - SETTING_TRACE("Parameter #%d is: %s, btn_part_str;%s", argno, btn_str, btn_part_str[argno]); - if (btn_str) - { - Evas_Object *btn = setting_create_button(popup, btn_str, NULL, response_cb, data); - elm_object_part_content_set(popup, btn_part_str[argno], btn); - } - } - - va_end(args); - } - else - { - if (response_cb) { - evas_object_smart_callback_add(popup, "timeout", response_cb, data); - evas_object_smart_callback_add(popup, "block,clicked", response_cb, data); - } else { - evas_object_smart_callback_add(popup, "timeout", _setting_def_response_cb, data); - evas_object_smart_callback_add(popup, "block,clicked", _setting_def_response_cb, data); - } - } - evas_object_show(popup); - return popup; - -} - /** * Set the vconf value via its binded check object. @@ -2183,735 +490,6 @@ setting_create_editfiled(Evas_Object *win_main, char *title, char *def_str) return layout; } -Evas_Object *setting_create_win_layout(Evas_Object *win_layout, - Evas_Object *win_obj) -{ - Evas_Object *layout = NULL; - - /* Base Layout */ - layout = elm_layout_add(win_layout); - setting_retvm_if(layout == NULL, FALSE, "layout == NULL"); - - elm_layout_theme_set(layout, "layout", "application", "default"); - evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - elm_win_resize_object_add(win_obj, layout); - Evas_Object *bg = setting_create_bg(layout, win_obj, "group_list"); - elm_object_part_content_set(layout, "elm.swallow.bg", bg); - evas_object_show(layout); - - return layout; -} - -#define HALF_SCREEN_STR_LEN 20 -#define ONE_THIRD_SCREEN_STR_LEN 13 -Evas_Object *setting_create_navi_bar(Evas_Object *layout) -{ - - Evas_Object *navi = NULL; - navi = elm_naviframe_add(layout); - - if (navi == NULL) { - SETTING_TRACE(" *** elm_naviframe_add returns NULL *** "); - return NULL; - } - elm_object_part_content_set(layout, "elm.swallow.content", navi); - evas_object_show(navi); - return navi; -} - - -Evas_Object *setting_create_button(Evas_Object *parent, const char *btn_str, - const char *btn_style, - setting_call_back_func btn_click_cb, - void *cb_data) -{ - retv_if(!parent || !btn_str, NULL); - if ('\0' == btn_str[0]) {//Empty rectangle - return setting_create_blank_rect_customize(parent, - SETTING_PADDING_WIDTH, - SETTING_PADDING_WIDTH); - } - - Evas_Object *button = elm_button_add(parent); - if (btn_style) { - elm_object_style_set(button, btn_style); - } - - if (0 != safeStrCmp(NAVI_BACK_BUTTON_STYLE, btn_style)) {//not '<-' button - elm_object_text_set(button, btn_str); - - evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(button,EVAS_HINT_FILL, 0.5); - } - - if (btn_click_cb) { - evas_object_smart_callback_add(button, "clicked", - btn_click_cb, cb_data); - } - evas_object_show(button); - return button; -} - -Elm_Object_Item * setting_create_navi_bar_top_buttons(char *title_str, - char *lbutton_str, - char *rbutton_str, - char *mbutton_str, - setting_call_back_func lbutton_click_cb, - setting_call_back_func rbutton_click_cb, - setting_call_back_func mbutton_click_cb, - void *cb_data, Evas_Object *eo_view,/*any container obj */ - Evas_Object *navigate_bar ) -{ - //SETTING_TRACE_BEGIN; - Evas_Object *l_button = NULL; - Evas_Object *r_button = NULL; - Evas_Object *m_button = NULL; - Elm_Object_Item *navi_it = NULL; - - /* create buttons */ - l_button = setting_create_button(navigate_bar, lbutton_str, - "naviframe/title/default", - lbutton_click_cb, cb_data); - - r_button = setting_create_button(navigate_bar, rbutton_str, - "naviframe/title/default", - rbutton_click_cb, cb_data); - m_button = setting_create_button(navigate_bar, mbutton_str, - "naviframe/title/default", - mbutton_click_cb, cb_data); - - navi_it = elm_naviframe_item_push(navigate_bar, title_str, - NULL, NULL, eo_view, - NULL); - retv_if(!navi_it, NULL); - - /* arrange buttons into navi_it*/ - if (l_button) { - elm_object_item_part_content_set(navi_it, "title_left_btn", l_button); - } - if (r_button) { - elm_object_item_part_content_set(navi_it, "title_right_btn", r_button); - } - if (m_button) { - elm_object_item_part_content_set(navi_it, "title_more_btn", m_button); - } - //remove '<-' button - Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); - if (back_btn) { - elm_object_item_part_content_set(navi_it, "prev_btn", NULL); - if (back_btn) evas_object_del(back_btn); - } - - return navi_it; -} - -Elm_Object_Item *__create_navi_bar_bottom_buttons(char *title_str, char *lbutton_str, char *rbutton_str, - char *mbutton_str, setting_call_back_func lbutton_click_cb, - setting_call_back_func rbutton_click_cb, - setting_call_back_func mbutton_click_cb, - void *cb_data, Evas_Object *eo_view,/*any container obj */ - Evas_Object *navigate_bar, /*the specialized navigation bar */ - Evas_Object *controlbar) -{ - SETTING_TRACE_BEGIN; - Elm_Object_Item *navi_it = NULL; - - /* arrange buttons into controlbar*/ - if (0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { /* do special handling */ - Evas_Object *l_button = NULL; - l_button = setting_create_button(navigate_bar, lbutton_str, - NAVI_BACK_BUTTON_STYLE, - lbutton_click_cb, cb_data); - - navi_it = elm_naviframe_item_push(navigate_bar, title_str, l_button, NULL, eo_view, NULL); /* add new button */ - elm_object_style_set(l_button, NAVI_BACK_BUTTON_STYLE); /* take into effect */ - - if (!rbutton_str && !mbutton_str) { /* return directly */ - if (controlbar) { - evas_object_del(controlbar); - controlbar = NULL; - } - return navi_it; - } else { - if (rbutton_str && mbutton_str) { /* both exist.. */ - elm_toolbar_item_append(controlbar, NULL, mbutton_str, mbutton_click_cb, cb_data); - elm_toolbar_item_append(controlbar, NULL, rbutton_str, rbutton_click_cb, cb_data); - - } else if (rbutton_str) { /* r_btn exist.. */ - elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, "", NULL, NULL), EINA_TRUE); - elm_toolbar_item_append(controlbar, NULL, rbutton_str, rbutton_click_cb, cb_data); - } else if (mbutton_str) { /* m_btn exist.. */ - elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, "", NULL, NULL), EINA_TRUE); - elm_toolbar_item_append(controlbar, NULL, mbutton_str, mbutton_click_cb, cb_data); - } - - elm_object_item_part_content_set(navi_it, NAVI_CONTROLBAR_PART, controlbar); - return navi_it; - } - } - - if (lbutton_str) - elm_toolbar_item_append(controlbar, NULL, lbutton_str, lbutton_click_cb, cb_data); - if (mbutton_str) - elm_toolbar_item_append(controlbar, NULL, mbutton_str, mbutton_click_cb, cb_data); - - /* if controllbar just have one right button, let it occups 1/2. */ - - if (rbutton_str) - { - if (!lbutton_str && !mbutton_str) - { - elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, "", NULL, NULL), EINA_TRUE); - } - elm_toolbar_item_append(controlbar, NULL, rbutton_str, rbutton_click_cb, cb_data); - } - else - { - if (lbutton_str || mbutton_str) - { - elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, "", NULL, NULL), EINA_TRUE); - } - } - - navi_it = elm_naviframe_item_push(navigate_bar, title_str, NULL, NULL, eo_view, NULL); - elm_object_item_part_content_set(navi_it, NAVI_CONTROLBAR_PART, controlbar); - return navi_it; - -} - - -/** -* Create buttons on the specialized navigation bar -* -* @param[in] eo_view navigation bar's content -* @param[in] controlbar title obj of navigation bar -* -*/ -void setting_create_navi_bar_buttons(char *title_str, char *lbutton_str, char *rbutton_str, - char *mbutton_str, setting_call_back_func lbutton_click_cb, - setting_call_back_func rbutton_click_cb, - setting_call_back_func mbutton_click_cb, - void *cb_data, Evas_Object *eo_view,/*any container obj */ - Evas_Object *navigate_bar, /*the specialized navigation bar */ - Evas_Object *controlbar) -{ /* controlbar */ - #if SUPPORT_BOTTOM_BTNS - __create_navi_bar_bottom_buttons(title_str, lbutton_str, - rbutton_str, mbutton_str, - lbutton_click_cb, - rbutton_click_cb, - mbutton_click_cb, - cb_data, eo_view, - navigate_bar, controlbar); - return; - #endif - - Evas_Object *l_button = NULL; - Evas_Object *r_button = NULL; - Evas_Object *m_button = NULL; - Elm_Object_Item *navi_it = NULL; - - /* navigationbar left buttons */ - - /* create buttons */ - if (lbutton_str && 0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { /* left 'Back' button should be processed specially */ - l_button = setting_create_button(navigate_bar, lbutton_str, - NAVI_BACK_BUTTON_STYLE, - lbutton_click_cb, cb_data); - } else { - l_button = setting_create_button(navigate_bar, lbutton_str, - NAVI_DEF_BUTTON_STYLE, - lbutton_click_cb, cb_data); - } - - - r_button = setting_create_button(navigate_bar, rbutton_str, - NAVI_DEF_BUTTON_STYLE, - rbutton_click_cb, cb_data); - m_button = setting_create_button(navigate_bar, mbutton_str, - NAVI_DEF_BUTTON_STYLE, - mbutton_click_cb, cb_data); - - Elm_Object_Item *item = NULL; - - /* arrange buttons into controlbar*/ - if (0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { /* do special handling */ - /* At then, in function elm_naviframe_item_push, icon of l_button will be unset, */ - /* Usr need set style again!! */ - navi_it = elm_naviframe_item_push(navigate_bar, title_str, l_button, NULL, eo_view, NULL); /* add new button */ - elm_object_style_set(l_button, NAVI_BACK_BUTTON_STYLE); /* take into effect */ - - if (!rbutton_str && !mbutton_str) { /* return directly */ - if (controlbar) { - evas_object_del(controlbar); - controlbar = NULL; - } - return; - } else { - if (rbutton_str && mbutton_str) { /* both exist.. */ - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", m_button); - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", r_button); - /* item[2] = elm_controlbar_object_item_append(controlbar, r_button, 1); */ - } else if (rbutton_str) { /* r_btn exist.. */ - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", r_button); - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - } else if (mbutton_str) { /* m_btn exist.. */ - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", m_button); - } - - elm_object_item_part_content_set(navi_it, NAVI_CONTROLBAR_PART, controlbar); - return; - } - } - - if (l_button) - { - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", l_button); - } - if (m_button) - { - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", m_button); - } - /* if controllbar just have one right button, let it occups 1/2. */ - if (!l_button && !m_button) - { - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - } - if (r_button) - { - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", r_button); - } - navi_it = elm_naviframe_item_push(navigate_bar, title_str, NULL, NULL, eo_view, NULL); - - elm_object_item_part_content_set(navi_it, NAVI_CONTROLBAR_PART, controlbar); - return; -} - -/** -* The general API to create a layout with navigation bar, -* which contents any evas container object(@param[eo_view]) as its content -* -* @param[in] eo_view navigation bar's content -* @param[out] titleobj title obj of navigation bar -* -* return main layout of UG or App.. -*/ -Evas_Object *setting_create_layout_navi_bar(Evas_Object *win_layout, Evas_Object *win_obj, char *title_str, char *lbutton_str, char *rbutton_str, char *mbutton_str, setting_call_back_func lbutton_click_cb, setting_call_back_func rbutton_click_cb, setting_call_back_func mbutton_click_cb, void *cb_data, Evas_Object *eo_view, /*any container obj constructed on any evas obj */ - Evas_Object **navi_bar, - Evas_Object **titleobj) -{ - - Evas_Object *layout = setting_create_win_layout(win_layout, win_obj); - *navi_bar = setting_create_navi_bar(layout); - /* add controlbar */ - Evas_Object *controlbar = elm_toolbar_add(*navi_bar); - setting_retvm_if(controlbar == NULL, NULL, "controlbar == NULL"); - elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); - elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); - if (titleobj) { /* need output */ - *titleobj = controlbar; - } - - setting_create_navi_bar_buttons(title_str, - lbutton_str, rbutton_str, NULL, - lbutton_click_cb, rbutton_click_cb, - NULL, cb_data, eo_view /*content */ , - *navi_bar, controlbar); - return layout; -} - -/** -* The API to create a layout with navigation bar, -* which contents a scroller object as its content -* -* @param[out] scroller navigation bar's content -* -* @return a layout with a special navigation bar and at most 2 buttons -*/ - -Evas_Object *setting_create_layout_navi_bar_scroller(Evas_Object *win_layout, - Evas_Object *win_obj, - char *title_str, - char *lbutton_str, - char *rbutton_str, - setting_call_back_func - lbutton_click_cb, - setting_call_back_func - rbutton_click_cb, - void *cb_data, - Evas_Object **scroller, - Evas_Object **navi_bar) -{ - - Evas_Object *layout = setting_create_win_layout(win_layout, win_obj); - *navi_bar = setting_create_navi_bar(layout); - - /* add controlbar */ - Evas_Object *controlbar = elm_toolbar_add(*navi_bar); - setting_retvm_if(controlbar == NULL, NULL, "controlbar == NULL"); - elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); - elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); - - /*****/ - /* create scroller as CONTENT */ - Evas_Object *scrl = NULL; - /* Evas_Object *ret = NULL; */ - if (scroller != NULL) { - /* scrl =*scroller = elm_scroller_add(win_layout); */ - scrl = *scroller = elm_scroller_add(layout); - retvm_if(*scroller == NULL, NULL, - "Cannot set scroller object as contento of layout"); - elm_scroller_bounce_set(*scroller, EINA_FALSE, EINA_TRUE); - elm_scroller_policy_set(*scroller, ELM_SCROLLER_POLICY_OFF, - ELM_SCROLLER_POLICY_AUTO); - evas_object_show(*scroller); - } - - /*****/ - - setting_create_navi_bar_buttons(title_str, - lbutton_str, rbutton_str, NULL, - lbutton_click_cb, rbutton_click_cb, - NULL, cb_data, scrl /*content */ , - *navi_bar, controlbar); - return layout; -} - -/** -* The API to create a layout with navigation bar , -* which contents a genlist object as its content -* -* @return a layout with a special navigation bar and at most 2 buttons -*/ -Evas_Object *setting_create_layout_navi_bar_genlist(Evas_Object *win_layout, - Evas_Object *win_obj, - char *title_str, - char *lbutton_str, - char *rbutton_str, - setting_call_back_func - lbutton_click_cb, - setting_call_back_func - rbutton_click_cb, - void *cb_data, - Evas_Object **genlist, - Evas_Object **navi_bar) -{ - /* win_layout -> layout */ - Evas_Object *layout = setting_create_win_layout(win_layout, win_obj); - - *navi_bar = setting_create_navi_bar(layout); - - /* add controlbar */ - Evas_Object *controlbar = elm_toolbar_add(*navi_bar); - setting_retvm_if(controlbar == NULL, NULL, "controlbar == NULL"); - elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); - elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); - - *genlist = elm_genlist_add(*navi_bar); - retvm_if(*genlist == NULL, NULL, - "Cannot set scroller object as contento of layout"); - elm_genlist_clear(*genlist); /* first to clear list */ - - setting_create_navi_bar_buttons(title_str, - lbutton_str, rbutton_str, NULL, - lbutton_click_cb, rbutton_click_cb, - NULL, cb_data, *genlist, *navi_bar, - controlbar); - return layout; -} - - -Elm_Object_Item *__push_navi_bar_bottom_buttons(char *title_str, - char *lbutton_str, char *rbutton_str, - char *mbutton_str, - setting_call_back_func lbutton_click_cb, - setting_call_back_func rbutton_click_cb, - setting_call_back_func mbutton_click_cb, - void *cb_data, Evas_Object *eo_view, - Evas_Object *navigate_bar, Evas_Object **titleobj) -{ - Elm_Object_Item *navi_it = NULL; - Evas_Object *controlbar = NULL; - - /* arrange buttons into controlbar*/ - if (0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { - Evas_Object *l_button = NULL; - l_button = setting_create_button(navigate_bar, lbutton_str, - NAVI_BACK_BUTTON_STYLE, - lbutton_click_cb, cb_data); - - navi_it = elm_naviframe_item_push(navigate_bar, title_str, l_button, NULL, eo_view, NULL); - elm_object_style_set(l_button, NAVI_BACK_BUTTON_STYLE); /* take into effect */ - if (!rbutton_str && !mbutton_str) - { - return navi_it; - } - - controlbar = elm_toolbar_add(navigate_bar); - setting_retvm_if(controlbar == NULL, navi_it, "controlbar == NULL"); - elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); - elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); - if (titleobj) *titleobj = controlbar; - - if (rbutton_str && mbutton_str) { - elm_toolbar_item_append(controlbar, NULL, mbutton_str, mbutton_click_cb, cb_data); - elm_toolbar_item_append(controlbar, NULL, rbutton_str, rbutton_click_cb, cb_data); - } else if (rbutton_str) { - int len = safeStrLen(rbutton_str); - if (len < ONE_THIRD_SCREEN_STR_LEN) { - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - - } - - if (len < HALF_SCREEN_STR_LEN) - { - elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, "", NULL, NULL), EINA_TRUE); - } - elm_toolbar_item_append(controlbar, NULL, rbutton_str, rbutton_click_cb, cb_data); - } else if (mbutton_str) { - elm_toolbar_item_append(controlbar, NULL, mbutton_str, mbutton_click_cb, cb_data); - elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, "", NULL, NULL), EINA_TRUE); - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - } - } else { /* no need back button on navi_bar */ - navi_it = elm_naviframe_item_push(navigate_bar, title_str, NULL, NULL, eo_view, NULL); - if (!lbutton_str && !rbutton_str && !mbutton_str) { - return navi_it; - } - - //remove '<-' button, insteadly using controlbar - Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); - elm_object_item_part_content_set(navi_it, "prev_btn", NULL); - evas_object_del(back_btn); - - controlbar = elm_toolbar_add(navigate_bar); - setting_retvm_if(controlbar == NULL, navi_it, "controlbar == NULL"); - elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); - elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); - if (titleobj) *titleobj = controlbar; - - if (lbutton_str) - elm_toolbar_item_append(controlbar, NULL, lbutton_str, lbutton_click_cb, cb_data); - if (mbutton_str) - elm_toolbar_item_append(controlbar, NULL, mbutton_str, mbutton_click_cb, cb_data); - if (rbutton_str) - elm_toolbar_item_append(controlbar, NULL, rbutton_str, rbutton_click_cb, cb_data); - } - - elm_object_item_part_content_set(navi_it, NAVI_CONTROLBAR_PART, controlbar); - return navi_it; -} - - -/** -* The general API to push any evas object(@param[eo_view]) to the specialized navi_bar, -* which contents at most 3 buttons -*/ -void -setting_push_layout_navi_bar(char *title_str, - char *lbutton_str, char *rbutton_str, - char *mbutton_str, - setting_call_back_func lbutton_click_cb, - setting_call_back_func rbutton_click_cb, - setting_call_back_func mbutton_click_cb, - void *cb_data, Evas_Object *eo_view, - Evas_Object *navi_bar, Evas_Object **titleobj) -{ -#if SUPPORT_BOTTOM_BTNS - __push_navi_bar_bottom_buttons(title_str, - lbutton_str, rbutton_str,mbutton_str, - lbutton_click_cb, - rbutton_click_cb, - mbutton_click_cb, - cb_data, eo_view, navi_bar, titleobj); - return; -#endif - - - Evas_Object *l_button = NULL; - Evas_Object *r_button = NULL; - Evas_Object *m_button = NULL; - Elm_Object_Item *navi_it = NULL; - Evas_Object *controlbar = NULL; - - /* create buttons */ - if (lbutton_str && 0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { /* left 'Back' button should be processed specially */ - l_button = setting_create_button(navi_bar, lbutton_str, - NAVI_BACK_BUTTON_STYLE, - lbutton_click_cb, cb_data); - } else { - l_button = setting_create_button(navi_bar, lbutton_str, - NAVI_DEF_BUTTON_STYLE, - lbutton_click_cb, cb_data); - } - r_button = setting_create_button(navi_bar, rbutton_str, - NAVI_DEF_BUTTON_STYLE, - rbutton_click_cb, cb_data); - m_button = setting_create_button(navi_bar, mbutton_str, - NAVI_DEF_BUTTON_STYLE, - mbutton_click_cb, cb_data); - - Elm_Object_Item *item = NULL; - - /* arrange buttons into controlbar*/ - if (0 == safeStrCmp(lbutton_str, _("IDS_COM_BODY_BACK"))) { /* need back button on navi_bar */ - navi_it = elm_naviframe_item_push(navi_bar, title_str, l_button, NULL, eo_view, NULL); - elm_object_style_set(l_button, NAVI_BACK_BUTTON_STYLE); /* take into effect */ - if (!rbutton_str && !mbutton_str) - { - return; - } - - controlbar = elm_toolbar_add(navi_bar); - setting_retm_if(controlbar == NULL, "controlbar == NULL"); - elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); - elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); - if (titleobj) *titleobj = controlbar; - - if (rbutton_str && mbutton_str) { - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", m_button); - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", r_button); - } else if (rbutton_str) { - if (0 == - safeStrCmp(rbutton_str, _(KeyStr_INFO))) { - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", r_button); - } else { - int len = safeStrLen(rbutton_str); - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", r_button); - - if (len < HALF_SCREEN_STR_LEN) - { - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - } - if (len < ONE_THIRD_SCREEN_STR_LEN) - { - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - } - } - - } else if (mbutton_str) { - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", m_button); - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - } - } else { /* no need back button on navi_bar */ - navi_it = elm_naviframe_item_push(navi_bar, title_str, NULL, NULL, eo_view, NULL); - if (!lbutton_str && !rbutton_str && !mbutton_str) - { - return; - } - - //remove '<-' button, insteadly using controlbar - Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); - elm_object_item_part_content_set(navi_it, "prev_btn", NULL); - evas_object_del(back_btn); - - controlbar = elm_toolbar_add(navi_bar); - setting_retm_if(controlbar == NULL, "controlbar == NULL"); - elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); - elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); - if (titleobj) *titleobj = controlbar; - - if (l_button) - { - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", l_button); - } - if (m_button) - { - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", m_button); - } - if (r_button) - { - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", r_button); - } - } - - elm_object_item_part_content_set(navi_it, NAVI_CONTROLBAR_PART, controlbar); - - return; -} - -/** -* The API to push a scroller object(@param[scroller]) to the specialized navi_bar, -* which contents at most 2 buttons -*/ - -void -setting_push_layout_navi_bar_scroller(Evas_Object *win_main, char *title_str, - char *lbutton_str, char *rbutton_str, - setting_call_back_func lbutton_click_cb, - setting_call_back_func rbutton_click_cb, - void *cb_data, - Evas_Object **scroller, - Evas_Object *navi_bar) -{ - /* create scroller */ - Evas_Object *scrl = NULL; - if (scroller != NULL) { - scrl = *scroller = elm_scroller_add(win_main); - retm_if(*scroller == NULL, - "Cannot set scroller as contento of layout"); - elm_scroller_bounce_set(*scroller, EINA_FALSE, EINA_TRUE); - elm_scroller_policy_set(*scroller, ELM_SCROLLER_POLICY_OFF, - ELM_SCROLLER_POLICY_AUTO); - - evas_object_show(*scroller); - } - - setting_push_layout_navi_bar(title_str, - lbutton_str, rbutton_str, NULL, - lbutton_click_cb, - rbutton_click_cb, - NULL, cb_data, scrl, navi_bar, NULL); -} - -/** -* @ The API to push a genlist object(@param[genlist]) to the specialized navi_bar, -* which contents at most 2 buttons -*/ -void -setting_push_layout_navi_bar_genlist(Evas_Object *win_layout, - Evas_Object *win_obj, char *title_str, - char *lbutton_str, char *rbutton_str, - setting_call_back_func lbutton_click_cb, - setting_call_back_func rbutton_click_cb, - void *cb_data, Evas_Object **genlist, - Evas_Object *navi_bar) -{ - /* create scroller */ - Evas_Object *gl = NULL; - if (genlist != NULL) { - gl = *genlist = elm_genlist_add(win_layout); - retm_if(*genlist == NULL, - "Cannot set scroller object as contento of layout"); - elm_genlist_clear(gl); /* first to clear list */ - } - - setting_push_layout_navi_bar(title_str, - lbutton_str, rbutton_str, NULL, - lbutton_click_cb, - rbutton_click_cb, - NULL, cb_data, gl, navi_bar, NULL); -} - /** * Create a text box, which cannot be edited, just to show a specilization segment. * @@ -2933,506 +511,10 @@ Evas_Object *setting_create_textbox(Evas_Object *parent, const char *content) elm_entry_entry_set(obj, content); evas_object_show(obj); - return obj; } /** -* Check if some item is selected in done-list -*/ - -bool setting_done_list_is_some_item_selected(Setting_Done_List_Data *list_data) -{ - SETTING_TRACE_BEGIN; - bool isFound = FALSE; /* wether can found some item checked */ - int idx = 1; - int state = 0; - for (; idx < list_data->cur_item_num; idx++) { - state = - elm_check_state_get(list_data->chk_items[idx]. - data_GenItem->eo_check); - if (state) { - isFound = TRUE; - break; - } - } - return isFound; -} - -/** -* show selectinfo popup -*/ -void sel_info_popup_show_cb(void *data, Evas *e, Evas_Object *obj, - void *event_info) -{ - Evas_Object *layout = data; - edje_object_signal_emit(_EDJ(layout), - "elm,layout,content,bottom_padding", - "layout"); -} - -/** -* hide selectinfo popup -*/ -void sel_info_popup_hide_cb(void *data, Evas *e, Evas_Object *obj, - void *event_info) -{ - Evas_Object *layout = data; - edje_object_signal_emit(_EDJ(layout), "elm,layout,content,default", - "layout"); -} - -/** -* Create selectinfo popup -*/ -void setting_create_sel_info_popup(Evas_Object *parent, - Evas_Object **selInfoPop_layout, - Evas_Object **selInfoPop) -{ - SETTING_TRACE_BEGIN; - SETTING_TRACE("*selInfoPop:%p", *selInfoPop); - if (!(*selInfoPop)) { - /* Add notify */ - *selInfoPop = elm_notify_add(parent); - elm_notify_orient_set(*selInfoPop, ELM_NOTIFY_ORIENT_BOTTOM); - evas_object_size_hint_weight_set(*selInfoPop, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(*selInfoPop, EVAS_HINT_FILL, - EVAS_HINT_FILL); - - /* Callback add */ - /* evas_object_smart_callback_add(*selInfoPop, "timeout", _timeout_cb, NULL); */ - evas_object_event_callback_add(*selInfoPop, EVAS_CALLBACK_SHOW, - sel_info_popup_show_cb, parent); - evas_object_event_callback_add(*selInfoPop, EVAS_CALLBACK_HIDE, - sel_info_popup_hide_cb, parent); - - /* list_data->selInfoPop layout add */ - *selInfoPop_layout = elm_layout_add(*selInfoPop); - - elm_layout_theme_set(*selInfoPop_layout, "standard", - "selectioninfo", "vertical/bottom_12"); - /* edje_object_signal_callback_add(_EDJ(list_data->selInfoPop_layout), "elm,action,click", "", _clicked_cb, NULL); */ - /* list_data->selInfoPop layout content set to notify */ - elm_object_content_set(*selInfoPop, *selInfoPop_layout); - } - - evas_object_show(*selInfoPop); -} - -/** -* Do process when clicking the check object in the done-list item -*/ -void setting_done_list_Gendial_chk_btn_cb(void *data, Evas_Object *obj, - void *event_info) -{ - SETTING_TRACE_BEGIN; - /* error check */ - retm_if(data == NULL, "Data parameter is NULL"); - Setting_GenGroupItem_Data *list_item = - (Setting_GenGroupItem_Data *) data; - Setting_Done_List_Data *list_data = list_item->userdata; - - list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ - int sel_num = 0; - setting_create_sel_info_popup(list_data->ly_parent, - &(list_data->selInfoPop_layout), - &(list_data->selInfoPop)); - elm_object_item_data_set(list_item->item, list_item); - elm_genlist_item_update(list_item->item); - - int idx = 1; - if (0 == safeStrCmp(KeyStr_Select_All, list_item->keyStr)) { /* if(obj == chk_sel_all) */ - /* SETTING_TRACE("Select All"); */ - if (list_item->chk_status) { - /* set all other checks state to be 1 */ - for (idx = 1; idx < list_data->cur_item_num; idx++) { - /* elm_check_state_set(list_data->chk_items[idx].data_GenItem->eo_check, 1); */ - list_data->chk_items[idx]. - data_GenItem->chk_status = 1; - elm_object_item_data_set(list_data->chk_items[idx].data_GenItem->item, list_data->chk_items[idx].data_GenItem); - elm_genlist_item_update(list_data->chk_items[idx].data_GenItem->item); - } - sel_num = list_data->cur_item_num - 1; - } else { - /* set all other checks state to be 0 */ - for (idx = 1; idx < list_data->cur_item_num; idx++) { - /* elm_check_state_set(list_data->chk_items[idx].data_GenItem->eo_check, 0); */ - list_data->chk_items[idx]. - data_GenItem->chk_status = 0; - elm_object_item_data_set(list_data->chk_items[idx].data_GenItem->item, list_data->chk_items [idx].data_GenItem); - elm_genlist_item_update(list_data->chk_items[idx].data_GenItem->item); - } - sel_num = 0; - } - /* return; */ - } else { - /* SETTING_TRACE("Select %s", _(list_item->keyStr)); */ - /* else for other checks, do rotinue checking */ - bool isFound = FALSE; /* wether found the item not checked */ - for (idx = 1; idx < list_data->cur_item_num; idx++) { - - if (!list_data->chk_items[idx].data_GenItem->chk_status) { - /* SETTING_TRACE("%s not select", _(list_data->chk_items[idx].item_name)); */ - isFound = TRUE; - /* break; */ - } else { - /* SETTING_TRACE("%s select", _(list_data->chk_items[idx].item_name)); */ - sel_num++; - } - } - - if (isFound) { /* reset state of chk_sel_all */ - /* elm_check_state_set(list_data->chk_items[0].data_GenItem->eo_check, 0); */ - list_data->chk_items[0].data_GenItem->chk_status = 0; - } else { - /* elm_check_state_set(list_data->chk_items[0].data_GenItem->eo_check, 1); */ - list_data->chk_items[0].data_GenItem->chk_status = 1; - } - elm_object_item_data_set(list_data->chk_items[0].data_GenItem->item, list_data->chk_items[0].data_GenItem); - elm_genlist_item_update(list_data->chk_items[0].data_GenItem->item); - } - /* SETTING_TRACE("sel_num:%d", sel_num); */ - if (!sel_num) { - evas_object_hide(list_data->selInfoPop); - elm_object_item_disabled_set(elm_toolbar_last_item_get - (list_data->controllbar), - EINA_TRUE); - return; - } - elm_object_item_disabled_set(elm_toolbar_last_item_get - (list_data->controllbar), EINA_FALSE); - char text[MAX_DISPLAY_NAME_LEN_ON_UI]; - if (sel_num == 1) - snprintf(text, sizeof(text), "%d Item Selected", sel_num); - else - snprintf(text, sizeof(text), "%d Items Selected", sel_num); - - /* text set and timeout set */ - edje_object_part_text_set(_EDJ(list_data->selInfoPop_layout), - "elm.text", text); -} - -static void setting_done_list_Gendial_mouse_up_cb(void *data, Evas_Object *obj, - void *event_info) -{ - /* error check */ - retm_if(event_info == NULL, "Invalid argument: event info is NULL"); - Elm_Object_Item *item = (Elm_Object_Item *) event_info; - elm_genlist_item_selected_set(item, 0); - Setting_GenGroupItem_Data *list_item = - (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); - - int old_status = elm_check_state_get(list_item->eo_check); - /* new status */ - list_item->chk_status = !old_status; - elm_check_state_set(list_item->eo_check, list_item->chk_status); - - /* other process.. */ - Setting_Done_List_Data *list_data = list_item->userdata; - int sel_num = 0; - setting_create_sel_info_popup(list_data->ly_parent, - &(list_data->selInfoPop_layout), - &(list_data->selInfoPop)); - - int idx = 1; - if (0 == safeStrCmp(KeyStr_Select_All, list_item->keyStr)) { /* if(obj == chk_sel_all) */ - /* SETTING_TRACE("Select All"); */ - /* SETTING_TRACE("Select %s", _(list_item->keyStr)); */ - if (list_item->chk_status) { - /* set all other checks state to be 1 */ - for (idx = 1; idx < list_data->cur_item_num; idx++) { - /* elm_check_state_set(list_data->chk_items[idx].data_GenItem->eo_check, 1); */ - list_data->chk_items[idx]. - data_GenItem->chk_status = 1; - elm_object_item_data_set(list_data->chk_items[idx].data_GenItem->item, list_data->chk_items [idx].data_GenItem); - elm_genlist_item_update(list_data->chk_items [idx].data_GenItem->item); - } - sel_num = list_data->cur_item_num - 1; - } else { - /* set all other checks state to be 0 */ - for (idx = 1; idx < list_data->cur_item_num; idx++) { - /* elm_check_state_set(list_data->chk_items[idx].data_GenItem->eo_check, 0); */ - list_data->chk_items[idx]. - data_GenItem->chk_status = 0; - elm_object_item_data_set(list_data->chk_items[idx].data_GenItem->item, list_data->chk_items[idx].data_GenItem); - elm_genlist_item_update(list_data->chk_items[idx].data_GenItem->item); - } - sel_num = 0; - } - /* return; */ - } else { - /* SETTING_TRACE("Select %s", _(list_item->keyStr)); */ - /* else for other checks, do rotinue checking */ - bool isFound = FALSE; /* wether found the item not checked */ - for (idx = 1; idx < list_data->cur_item_num; idx++) { - - if (!list_data->chk_items[idx].data_GenItem->chk_status) { - /* SETTING_TRACE("%s not select", _(list_data->chk_items[idx].item_name)); */ - isFound = TRUE; - /* break; */ - } else { - /* SETTING_TRACE("%s select", _(list_data->chk_items[idx].item_name)); */ - sel_num++; - } - } - - if (isFound) { /* reset state of chk_sel_all */ - /* elm_check_state_set(list_data->chk_items[0].data_GenItem->eo_check, 0); */ - list_data->chk_items[0].data_GenItem->chk_status = 0; - } else { - /* elm_check_state_set(list_data->chk_items[0].data_GenItem->eo_check, 1); */ - list_data->chk_items[0].data_GenItem->chk_status = 1; - } - elm_object_item_data_set(list_data->chk_items[0].data_GenItem->item, list_data->chk_items[0].data_GenItem); - elm_genlist_item_update(list_data->chk_items[0].data_GenItem->item); - } - /* SETTING_TRACE("sel_num:%d", sel_num); */ - if (!sel_num) { - elm_object_item_disabled_set(elm_toolbar_last_item_get - (list_data->controllbar), - EINA_TRUE); - evas_object_hide(list_data->selInfoPop); - return; - } - elm_object_item_disabled_set(elm_toolbar_last_item_get - (list_data->controllbar), EINA_FALSE); - char text[MAX_DISPLAY_NAME_LEN_ON_UI]; - if (sel_num == 1) - snprintf(text, sizeof(text), "%d Item Selected", sel_num); - else - snprintf(text, sizeof(text), "%d Items Selected", sel_num); - - /* text set and timeout set */ - edje_object_part_text_set(_EDJ(list_data->selInfoPop_layout), - "elm.text", text); -} - -/** -* The API to create done-list. -* -* @param[in] list_data -* @return a done-list -*/ -Evas_Object *setting_create_done_list(Setting_Done_List_Data *list_data) -{ - SETTING_TRACE_BEGIN; - Evas_Object *sub_layout = elm_layout_add(list_data->win_main); - elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, - "search_layout"); - evas_object_size_hint_weight_set(sub_layout, EVAS_HINT_EXPAND, 0.0); - evas_object_show(sub_layout); - - setting_create_Gendial_itc("select_all", &(list_data->itc_sel_all)); - setting_create_Gendial_itc("1text.1icon.2", - &(list_data->itc_1text_1icon)); - - Evas_Object *gl_sel_all = elm_genlist_add(list_data->win_main); - retvm_if(gl_sel_all == NULL, NULL, "gl_sel_all == NULL"); - elm_genlist_clear(gl_sel_all); /* first to clear list */ - elm_genlist_bounce_set(gl_sel_all, 0, 0); - - Evas_Object *scroller = elm_genlist_add(list_data->win_main); - retvm_if(scroller == NULL, NULL, "scroller == NULL"); - elm_genlist_clear(scroller); /* first to clear list */ - elm_object_part_content_set(sub_layout, "search_list", scroller); - elm_object_part_content_set(sub_layout, "search_bar", gl_sel_all); - - list_data->chk_items[0].data_GenItem = setting_create_Gendial_field_def(gl_sel_all, &(list_data->itc_sel_all), setting_done_list_Gendial_mouse_up_cb, list_data, SWALLOW_Type_1CHECK, /* SWALLOW_Type_CHECK_ALL, */ - NULL, - NULL, - 0, - list_data->chk_items - [0].item_name, - NULL, - setting_done_list_Gendial_chk_btn_cb); - - if (list_data->chk_items[0].data_GenItem) { - list_data->chk_items[0].data_GenItem->userdata = list_data; - } else { - SETTING_TRACE_ERROR("list_data->chk_items[0].data_GenItem is NULL"); - } - - int index = 1; - for (; index < list_data->cur_item_num; index++) { - list_data->chk_items[index].data_GenItem = - setting_create_Gendial_field_def(scroller, - & - (list_data->itc_1text_1icon), - setting_done_list_Gendial_mouse_up_cb, - list_data, - SWALLOW_Type_1CHECK, NULL, - NULL, 0, - list_data->chk_items - [index].item_name, NULL, - setting_done_list_Gendial_chk_btn_cb); - if (list_data->chk_items[index].data_GenItem) { - list_data->chk_items[index].data_GenItem->userdata = list_data; - } else { - SETTING_TRACE_ERROR("list_data->chk_items[index].data_GenItem is NULL"); - } - - } - - return sub_layout; -} - -/** -* Get searchbar text and register redraw_cb by idler. -* -* @param[in] data -* @param[in] search_bar -* @param[in] search_text -* @param[in] search_idler -* @param[in] redraw_cb -*/ -int setting_searchbar_redraw(void *data, - Evas_Object *search_bar, - char *search_text, - Ecore_Idler **search_idler, - Ecore_Task_Cb redraw_cb) -{ - SETTING_TRACE_BEGIN; - setting_retvm_if(search_bar == NULL, -1, "search_bar parameter is NULL"); - //const char *str = elm_object_text_get(search_bar); - Evas_Object *entry = elm_object_part_content_get(search_bar, "elm.swallow.content"); - const char *str = elm_entry_entry_get(entry); - int str_len = safeStrLen(str); - setting_retvm_if(str_len > MAX_SEARCH_STR_LEN, -1, "str_len > MAX_SEARCH_STR_LEN"); - - memset(search_text, '\0', MAX_SEARCH_STR_LEN + 1); - safeCopyStr(search_text, str, MAX_SEARCH_STR_LEN); - - SETTING_TRACE("Update the search view text, search_text=%s", - search_text); - - if (*search_idler) { - ecore_idler_del(*search_idler); - *search_idler = NULL; - } - *search_idler = ecore_idler_add(redraw_cb, data); - return 0; -} - -static void __searchbar_chg_cb(void *data, Evas_Object *obj, void *event_info) -{ - Evas_Object *searchbar_layout = data; - if (elm_object_focus_get(searchbar_layout)) { - if (elm_entry_is_empty(obj)) { - elm_object_signal_emit(searchbar_layout, "elm,state,eraser,hide", "elm"); - } - else - elm_object_signal_emit(searchbar_layout, "elm,state,eraser,show", "elm"); - } -} - -static void __searchbar_focused_cb(void *data, Evas_Object *obj, void *event_info) -{ - ret_if(!data || !obj); - Evas_Object *searchbar_layout = data; - if (!elm_entry_is_empty(obj)) - elm_object_signal_emit(searchbar_layout, "elm,state,eraser,show", "elm"); - elm_object_signal_emit(searchbar_layout, "elm,state,guidetext,hide", "elm"); - elm_object_signal_emit(searchbar_layout, "cancel,in", ""); -} - -static void __searchbar_unfocused_cb(void *data, Evas_Object *obj, void *event_info) -{ - ret_if(!data || !obj); - Evas_Object *searchbar_layout = data; - if (elm_entry_is_empty(obj)) - elm_object_signal_emit(searchbar_layout, "elm,state,guidetext,show", "elm"); - elm_object_signal_emit(searchbar_layout, "elm,state,eraser,hide", "elm"); -} - -static void __searchbar_eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) -{ - ret_if(!data); - Evas_Object *entry = data; - elm_entry_entry_set(entry, ""); -} - -static void __searchbar_bg_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) -{ - ret_if(!data); - Evas_Object *entry = data; - elm_object_focus_set(entry, EINA_TRUE); -} - -static void __searchbar_cancel_clicked_cb(void *data, Evas_Object *obj, void *event_info) -{ - ret_if(!data || !obj); - evas_object_hide(obj); - Evas_Object *searchbar_layout = data; - elm_object_signal_emit(searchbar_layout, "cancel,out", ""); - Evas_Object *entry = elm_object_part_content_get(searchbar_layout, "elm.swallow.content"); - ret_if(!entry); - const char* text = elm_entry_entry_get(entry); - if (text != NULL && strlen(text) > 0) - elm_entry_entry_set(entry, NULL); - elm_object_focus_set(entry, EINA_FALSE); - #if 0 - Ecore_IMF_Context *imf_context = (Ecore_IMF_Context*)elm_entry_imf_context_get(entry); - if (imf_context) { - ecore_imf_context_input_panel_hide(imf_context); - } - #endif -} - -static void __searchbar_searchsymbol_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) -{ - ret_if(!data); - Evas_Object *entry = data; - elm_object_focus_set(entry, EINA_TRUE); -} - -/** -* Create searchar, register change cb and cancel cb. -* -* @param[in] data -* @param[in] parent -* @param[in] change_cb -* @param[in] cancel_cb -*/ -Evas_Object *setting_create_searchbar(void *data, Evas_Object *parent, - Evas_Smart_Cb change_cb, - Evas_Smart_Cb cancel_cb) -{ - SETTING_TRACE_BEGIN; - setting_retvm_if(parent == NULL, NULL, "parent parameter is NULL"); - Evas_Object *searchbar_layout = elm_layout_add(parent); - elm_layout_theme_set(searchbar_layout, "layout", "searchbar", "cancel_button"); - elm_object_part_content_set(parent, "searchbar", searchbar_layout); - Evas_Object *entry = elm_entry_add(searchbar_layout); - elm_entry_scrollable_set(entry, EINA_TRUE); - elm_entry_single_line_set(entry, EINA_TRUE); - if (change_cb) evas_object_smart_callback_add(entry, "changed", change_cb, data); - evas_object_smart_callback_add(entry, "changed", __searchbar_chg_cb, searchbar_layout); - evas_object_smart_callback_add(entry, "focused", __searchbar_focused_cb, searchbar_layout); - evas_object_smart_callback_add(entry, "unfocused", __searchbar_unfocused_cb, searchbar_layout); - elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_NORMAL); - elm_object_part_content_set(searchbar_layout, "elm.swallow.content", entry); - elm_object_part_text_set(searchbar_layout, "elm.guidetext", _("IDS_COM_SK_SEARCH")); - elm_object_signal_callback_add(searchbar_layout, "elm,eraser,clicked", "elm", __searchbar_eraser_clicked_cb, entry); - elm_object_signal_callback_add(searchbar_layout, "elm,bg,clicked", "elm", __searchbar_bg_clicked_cb, entry); - evas_object_size_hint_weight_set(searchbar_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(searchbar_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); - - - Evas_Object *cancel_btn = elm_button_add(searchbar_layout); - elm_object_part_content_set(searchbar_layout, "button_cancel", cancel_btn); - elm_object_style_set(cancel_btn, "searchbar/default"); - elm_object_text_set(cancel_btn, _("Cancel")); - - if (!cancel_cb){ - cancel_cb = __searchbar_cancel_clicked_cb; - } - evas_object_smart_callback_add(cancel_btn, "clicked", cancel_cb, searchbar_layout); - elm_object_signal_callback_add(searchbar_layout, "elm,action,click", "", __searchbar_searchsymbol_clicked_cb, entry); - return searchbar_layout; -} - -/** * Make it no effect when clicking on a evas object and its sub-objects, such as, layout, genlist * * @param[in] obj @@ -3457,30 +539,6 @@ void setting_enable_evas_object(Evas_Object *obj) } /** -* To disable a specialized genlist item -* -* @param[in] item -*/ -void setting_disable_genlist_item(Elm_Object_Item *item) -{ - if (item) { - elm_object_item_disabled_set(item, EINA_TRUE); /* make it be dim displayed */ - } -} - -/** -* To enable a specialized genlist item -* -* @param[in] item -*/ -void setting_enable_genlist_item(Elm_Object_Item *item) -{ - if (item) { - elm_object_item_disabled_set(item, EINA_FALSE); /* make it be normally displayed */ - } -} - -/** * To resize a evas object, such as, icon, button.. * * @param[in] obj diff --git a/setting-common/src/setting-common-general-func.c b/setting-common/src/setting-common-general-func.c old mode 100644 new mode 100755 index 841c9cc..64c8ee3 --- a/setting-common/src/setting-common-general-func.c +++ b/setting-common/src/setting-common-general-func.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #include #include @@ -22,8 +25,8 @@ #include #include #include -#define SETTING_USB_DEFAULT_MODE 0 -#define DEFAULT_USB_BUF_SIZE 64 +#include +#include char *setting_file_basename(char *path) { @@ -43,65 +46,26 @@ char *setting_file_basename(char *path) char *get_pa_usb_connect_mode_str() { int ret = SETTING_RETURN_FAIL; - int value, selMode; - char title_default_usb_subtitle[DEFAULT_USB_BUF_SIZE]; + int value; ret = vconf_get_int(VCONFKEY_SETAPPL_USB_MODE_INT, &value); setting_retvm_if(SETTING_RETURN_FAIL == ret, NULL, "Failed to get vconf value"); /* file system exceptional handle */ switch (value) { - case SETTING_USB_NONE_MODE: - ret = vconf_get_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, &selMode); - setting_retvm_if(SETTING_RETURN_FAIL == ret, NULL, "Failed to get vconf value"); - if (SETTING_USB_DEBUG_MODE == selMode) - return (char*)g_strdup(_("IDS_ST_BODY_USB_DEBUGGING")); - case SETTING_USB_DEFAULT_MODE: - snprintf(title_default_usb_subtitle, DEFAULT_USB_BUF_SIZE, "USB %s", _("IDS_COM_BODY_DEFAULT")); - return (char*)g_strdup(title_default_usb_subtitle); case SETTING_USB_DEBUG_MODE: return (char*)g_strdup(_("IDS_ST_BODY_USB_DEBUGGING")); default: - return NULL; - } -} - -char *get_pa_theme_name_str() -{ - int ret = SETTING_RETURN_FAIL; - int err; - char value[SETTING_STR_SLP_LEN] = { 0, }; - char *name; - char *ext; - ret = setting_get_string_slp_key(STR_SLP_SETTING_THEME_NAME, value, &err); - setting_retvm_if(SETTING_RETURN_FAIL == ret, NULL, "Failed to get vconf value"); /* file system exceptional handle */ - - name = strrchr(value, '/'); - ext = strstr(value, ".edj"); - - if (!name) - name = value; - else - ++name; - - if (!ext) - ext = value + safeStrLen(value); - - if (0 == safeStrCmp("tizen-black-hd", name)) { - return (char *)g_strdup(_("IDS_ST_BODY_BLACK")); - } else if (0 == safeStrCmp("tizen-hd", name)) { - return (char *)g_strdup(_("IDS_ST_BODY_WHITE")); - } else { - return (char *)g_strndup(name, ext - name); + return (char*)g_strdup(_("IDS_COM_POP_DISCONNECTED")); } } char *get_brightness_mode_str() { int value, err; - setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_BRIGHTNESS, &value, + setting_get_int_slp_key(INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, &value, &err); - if (value) { + if (value != SETTING_BRIGHTNESS_AUTOMATIC_OFF) { return setting_gettext("IDS_COM_BODY_AUTOMATIC"); } else { return setting_gettext("IDS_COM_BODY_MANUAL"); @@ -110,23 +74,87 @@ char *get_brightness_mode_str() char *get_pa_backlight_time_str() { - int value = 30; + int value = 0; char backlight_time_str[MAX_DISPLAY_NAME_LEN_ON_UI]; +#if SUPPORT_LCD_TIMEOUT_KEEPING + if (0 != vconf_get_int(VCONFKEY_LCD_TIMEOUT_NORMAL_BACKUP, &value)) { + /* value = 600; */ + if(isEmulBin()) + value = 0; /* keep agree with postin file */ + else + value = 30; + vconf_set_int(VCONFKEY_LCD_TIMEOUT_NORMAL_BACKUP, value); + } +#else int err; int ret = setting_get_int_slp_key(INT_SLP_SETTING_LCD_TIMEOUT_NORMAL, &value, &err); + #if NORMAL if (SETTING_RETURN_FAIL == ret || value < 0) { /* file system exceptional handle, eg. The vconf file lost due to file system. */ - value = 30; /* keep agree with postin file */ + /* value = 600; */ + if(isEmulBin()) + value = 0; /* keep agree with postin file */ + else + value = 30; setting_set_int_slp_key(INT_SLP_SETTING_LCD_TIMEOUT_NORMAL, value, &err); } + #else // for MDM server + // adjust value. + // if < 15, 15 + // if 15 < < 30, 15 + // if 30 < < 60, 30 + // if 60 < < 120, 60 + // if 120 < < 300, 120 + // if 300 < < 600, 300 + // if > 600, 600 + if(isEmulBin()) + { + if (SETTING_RETURN_FAIL == ret || value < 15) + value = 0; + else if(value >= 15 && value < 30) + value = 15; + else if(value >= 30 && value < 60) + value = 30; + else if(value >= 60 && value < 120) + value = 60; + else if(value >= 120 && value < 300) + value = 120; + else if(value >= 300 && value < 600) + value = 300; + else + value = 600; + } + else + { + if (SETTING_RETURN_FAIL == ret || value < 30) + value = 15; + else if(value >= 30 && value < 60) + value = 30; + else if(value >= 60 && value < 120) + value = 60; + else if(value >= 120 && value < 300) + value = 120; + else if(value >= 300 && value < 600) + value = 300; + else + value = 600; + } - if (value == 60) { + setting_set_int_slp_key(INT_SLP_SETTING_LCD_TIMEOUT_NORMAL, + value, &err); + #endif +#endif + + if (value == 0) { snprintf(backlight_time_str, sizeof(backlight_time_str), "%s", - _("1 minute")); - } else if (value >= 60) { + _("IDS_ST_BODY_ALWAYS_ON")); + } else if (value == 60) { + snprintf(backlight_time_str, sizeof(backlight_time_str), "%s", + _("IDS_COM_BODY_1_MINUTE")); + } else if (value > 60) { snprintf(backlight_time_str, sizeof(backlight_time_str), "%d %s", value / 60, (char *)(_("IDS_COM_BODY_MINUTES_LC"))); } else { @@ -151,7 +179,7 @@ char *get_pa_powersaving_at_str() value, &err); } - snprintf(powersaving_at_str, MAX_DISPLAY_NAME_LEN_ON_UI, "%d%% %s", + snprintf(powersaving_at_str, MAX_DISPLAY_NAME_LEN_ON_UI, "At %d%% %s", value, "battery power"); return (char *)g_strdup(powersaving_at_str); } @@ -192,26 +220,24 @@ char *get_pa_display_language_str() int ret = SETTING_RETURN_FAIL; int err; int index; - setting_lang_entry* table = setting_get_language_table(); + + Eina_List* list = setting_get_language_list(); + Eina_List* elist = NULL; + ret = setting_get_int_slp_key(INT_SLP_SETTING_LANG, &index, &err); - return (char *)g_strdup(table[index].title); // "auto" -} -char *setting_pa_main_get_language() -{ - setting_lang_entry* table = setting_get_language_table(); - char* pa_path = vconf_get_str(VCONFKEY_LANGSET); + if (0 == index) + return g_strdup("Automatic"); - int i; - for (i=0; inumber == index) + title = g_strdup(pnode->title); + } + return title; } char *get_pa_Wi_Fi_on_off_str() @@ -286,6 +312,24 @@ char *get_BT_on_off_str() } } +char *get_NFC_on_off_str() +{ + int ret = SETTING_RETURN_FAIL; + int value = 0, err = 0; + ret = setting_get_bool_slp_key(BOOL_SLP_SETTING_NFC_STATUS, &value, &err); + + if (SETTING_RETURN_FAIL == ret) { /* file system exceptional handle, eg. The vconf file lost due to file system. */ + SETTING_TRACE_DEBUG("fail to get nfc status from vconf"); + value = VCONFKEY_NFC_STATE_OFF; + } + + if (VCONFKEY_NFC_STATE_OFF == value) { + return setting_gettext("IDS_COM_BODY_OFF_M_STATUS"); + } else { + return setting_gettext("IDS_COM_BODY_ON_M_STATUS"); + } +} + char *get_pa_time_format_str() { int ret = SETTING_RETURN_FAIL; @@ -327,11 +371,6 @@ char *get_pa_week_format_str() char *format_str[] = { _("IDS_ST_BODY_SUNDAY"), _("IDS_ST_BODY_MONDAY"), - _("IDS_ST_BODY_TUESDAY"), - _("IDS_ST_BODY_WEDNESDAY"), - _("IDS_ST_BODY_THURSDAY"), - _("IDS_ST_BODY_FRIDAY"), - _("IDS_ST_BODY_SATURDAY"), }; ret = @@ -360,50 +399,6 @@ double get_widgets_factor() return elm_scale_get(); } -static Theme_Type g_theme_type = Theme_Invalid; - - -Theme_Type setting_get_theme() -{ - if (Theme_Invalid == g_theme_type) { - int ret = SETTING_RETURN_FAIL; - int err; - char value[SETTING_STR_SLP_LEN] = { 0, }; - char *name; - char *ext; - ret = - setting_get_string_slp_key(STR_SLP_SETTING_THEME_NAME, - value, &err); - setting_retvm_if(SETTING_RETURN_FAIL == ret, Theme_ERROR, "Failed to get vconf value"); /* file system exceptional handle */ - - name = strrchr(value, '/'); - ext = strstr(value, ".edj"); - - if (!name) - name = value; - else - ++name; - - if (!ext) - ext = value + safeStrLen(value); - - /* special theme process.. */ - if (0 == safeStrCmp("tizen-black", name) || 0 == safeStrCmp("tizen-black-hd", name)) { - g_theme_type = Theme_Tizen_Black; - } else if (0 == safeStrCmp("tizen", name) || 0 == safeStrCmp("tizen-hd", name)) { - g_theme_type = Theme_Tizen; - } else if (0 == safeStrCmp("tizen-blue", name)) { - g_theme_type = Theme_Tizen_Blue; - } else if (0 == safeStrCmp("grey-hd", name)) { - g_theme_type = Theme_Tizen_Grey; - } else { - g_theme_type = Theme_ERROR; - } - } - - return g_theme_type; -} - char *setting_gettext(const char *s) { /* fisrt find in app pg */ @@ -667,10 +662,10 @@ bool is_ip_string(const char *ipstr) return TRUE; } -int setting_invoke_reset_function(char *lib_name, bundle *data, void *ext) +int setting_invoke_reset_function(char *lib_name, service_h service, void *ext) { SETTING_TRACE("Enter %s with lib_name:%s", __FUNCTION__, lib_name); - int (*reset) (bundle *pair, void *ptr); + int (*reset) (service_h pair, void *ptr); int ret = OPERATE_LIB_SUCESS; void *handle = dlopen(lib_name, RTLD_LAZY); @@ -688,7 +683,7 @@ int setting_invoke_reset_function(char *lib_name, bundle *data, void *ext) } if (reset) - ret = (*reset) (data, ext); /* CALL */ + ret = (*reset) (service, ext); /* CALL */ if (ret < 0) ret += UNDEFINED_LIB_SYMBOL;//from -2 on @@ -724,30 +719,6 @@ int excuteCmd(char* exec_path, int option_num, ...) return system(cmd); } -void set_font_dpi(short size) -{ - char buf[MAX_COMMON_BUFFER_LEN +1]; - const char *xrespath = "/opt/etc/X11/Xresources"; - int ret = snprintf(buf, sizeof(buf), "/bin/echo \"Xft.dpi: %d\" > %s", size, - xrespath); - ret_if(ret < 0); - - ret = system(buf);//echo Xft.dpi: 48 > /opt/etc/X11/Xresources - if ( ret == -1) { - SETTING_TRACE_ERROR("Xft.dpi error \n"); - abort(); - } - - - snprintf(buf, MAX_COMMON_BUFFER_LEN, "/usr/bin/xrdb -nocpp -load %s", xrespath); - ret = system(buf); - if ( ret == -1) { - SETTING_TRACE_ERROR("xrdb -nocpp -load \n"); - abort(); - } else { - SETTING_TRACE("xrdb -nocpp -load - DONE \n"); - } -} void create_fontlink(const char *linkpath, const char *linkname, const char *fontfilepath, const char *fontfilename) @@ -764,14 +735,15 @@ void create_fontlink(const char *linkpath, const char *linkname, SETTING_TRACE("lcpath:%s", lcpath); remove(newpath); - symlink(lcpath, newpath); + ret = symlink(lcpath, newpath); + setting_retm_if(ret != 0, "fail to call symlink"); } char* get_icon_path(const char *package) { - ail_appinfo_h handle; + ail_appinfo_h handle; - char* ret_str; + char* ret_str; char *icon_path = IMG_DefaultIcon;//The default icon must exist.(it will be installed by Setting App) bool result = TRUE; @@ -781,32 +753,54 @@ char* get_icon_path(const char *package) SETTING_TRACE_ERROR("Failed to ail_package_get_appinfo."); result = FALSE; destroy = FALSE; - } + } if (result && ail_appinfo_get_str(handle, AIL_PROP_ICON_STR, &icon_path) != AIL_ERROR_OK) { SETTING_TRACE_ERROR("Failed to ail_appinfo_get_str."); result = FALSE; - } + } if (result && access(icon_path, R_OK|F_OK ) !=0 ) {//The file cannot be accessed. SETTING_TRACE_ERROR("The file[%s] cannot be accessed. To use defaut icon.", icon_path); icon_path = IMG_DefaultIcon; - } + } - ret_str = strdup(icon_path); + ret_str = strdup(icon_path); if (destroy && ail_package_destroy_appinfo(handle) != AIL_ERROR_OK) { SETTING_TRACE_ERROR("Failed to ail_package_destroy_appinfo."); } return ret_str; } +// SLP : 1 +// not SLP : 0 +int is_slp_binary() +{ + dictionary* dic = iniparser_load("/etc/info.ini"); + char* str = (char *)iniparser_getstr(dic, "Version:Build"); + char* pos = str; + if (str) { + while(*pos++){ + if('_' == *pos) { + *pos = '\0'; + if (!strncmp(str, "SLP", 3)) return 1; + } + } + } + if (dic) { + iniparser_freedict(dic); + dic = NULL; + } + return 0; +} + bool isEmulBin() { char szEmul[__LEN_STR_EMUL+1]; const char* szBinVer = NULL; dictionary* dic = iniparser_load(BIN_INFO_FILE_PATH); -// when failed to get the info, let's regard the binary as an emulator one + // when failed to get the info, let's regard the binary as an emulator one if (!dic) return TRUE; @@ -842,20 +836,426 @@ int get_popup_btn_response_type(const char *btn_str) POPUP_BTN_RESPONSE_TYPE rsp_type = POPUP_RESPONSE_INVALID; retv_if(!btn_str, rsp_type); if (0 == safeStrCmp(btn_str, _("IDS_COM_BODY_CLOSE")) - || 0 == safeStrCmp(btn_str, _("Try"))//KeyStr_Try + || 0 == safeStrCmp(btn_str, _("IDS_COM_SK_TRY"))//KeyStr_Try || 0 == safeStrCmp(btn_str, _("IDS_COM_SK_OK")) || 0 == safeStrCmp(btn_str, _("IDS_COM_SK_YES")) || 0 == safeStrCmp(btn_str, _("IDS_ST_BODY_USE_MOTION")) || 0 == safeStrCmp(btn_str, _("IDS_COM_POP_TRY_AGAIN")) - || 0 == safeStrCmp(btn_str, _("IDS_COM_SK_DELETE"))) + || 0 == safeStrCmp(btn_str, _("IDS_COM_SK_DELETE")) + || 0 == safeStrCmp(btn_str, _(KeyStr_Save))) { rsp_type = POPUP_RESPONSE_OK; } - else //for others, + else //for others, { rsp_type = POPUP_RESPONSE_CANCEL; } return rsp_type; } +#define SUPPORT_STATIC_LOAD 1 +#if SUPPORT_STATIC_LOAD +static char *system_service_list[MAX_SYSTEM_SERVICE_NUM] = {NULL, }; +#endif +void clear_system_service_data() +{ + #if SUPPORT_STATIC_LOAD + int idx; + for (idx = 0; idx < MAX_SYSTEM_SERVICE_NUM && system_service_list[idx]; idx++) + { + FREE(system_service_list[idx]); + } + #endif +} + +bool is_system_service(const char *pkg_name) +{ + //SLP native apps list, + if (0 == safeStrCmp(pkg_name, "com.samsung.menu-screen") + || 0 == safeStrCmp(pkg_name, "com.samsung.live-data-provider") + || 0 == safeStrCmp(pkg_name, "com.samsung.live-magazine") + || 0 == safeStrCmp(pkg_name, "com.samsung.pwlock") + || 0 == safeStrCmp(pkg_name, "com.samsung.quickpanel") + || 0 == safeStrCmp(pkg_name, "com.samsung.vtmain") + || 0 == safeStrCmp(pkg_name, "com.samsung.call") + || 0 == safeStrCmp(pkg_name, "usb_setting") + || 0 == safeStrCmp(pkg_name, "com.samsung.indicator") + || 0 == safeStrCmp(pkg_name, "com.samsung.cluster-home") + ) + { + return TRUE; + } + //OSP service app list, + bool ret = FALSE; +#if SUPPORT_STATIC_LOAD + int idx = 0; + if (!system_service_list[0]) //just load the file + { + FILE *fp = fopen(SYSTEM_SERVICE_LIST_PATH, "r"); + if (fp) { + char result[MAX_PKG_NAME_LEN+1] = {0, }; + while (fgets(result, MAX_PKG_NAME_LEN, fp)) + { + result[strlen(result) - 1] = '\0';//offset 1 + system_service_list[idx++] = strdup(result); + } + fclose(fp); + } + + } + + for (idx = 0; idx < MAX_SYSTEM_SERVICE_NUM && system_service_list[idx]; idx++) + { + if (0 == safeStrCmp(pkg_name, system_service_list[idx])) { + ret = TRUE; + break; + } + } +#else + FILE *fp = fopen(SYSTEM_SERVICE_LIST_PATH, "r"); + if (fp) { + char result[MAX_PKG_NAME_LEN+1] = {0, }; + while (fgets(result, MAX_PKG_NAME_LEN, fp)) + { + result[strlen(result) - 1] = '\0';//offset 1 + if (0 == safeStrCmp(pkg_name, result)) { + ret = TRUE; + break; + } + } + fclose(fp); + } +#endif + SETTING_TRACE("ret:%d", ret); + return ret; +} + +/** + * should use g_free to free returned string + */ +char *get_default_font(int language) +{ + char *font_name = NULL; + + switch(language) + { + case SETTING_LANG_KOREA: + font_name = g_strdup("SLPSansKorean"); + break; + case SETTING_LANG_CHINA: + /* output_font : SLPSansFallback*/ + case SETTING_LANG_CANTONESE: + /* output_font : SLPSansFallback*/ + case SETTING_LANG_TAIWAN: + font_name = g_strdup("SLPSansFallback"); + break; + case SETTING_LANG_JAPAN: + font_name = g_strdup("UDGothic"); + break; + case SETTING_LANG_AUTOMATIC: + /* output_font : HelveticaNeue*/ + case SETTING_LANG_ENGLISH: + /* output_font : HelveticaNeue*/ + case SETTING_LANG_GERMAN: + /* output_font : HelveticaNeue*/ + case SETTING_LANG_DUTCH: + /* output_font : HelveticaNeue*/ + case SETTING_LANG_SPAINISH: + /* output_font : HelveticaNeue*/ + case SETTING_LANG_PORTUGUESE: + /* output_font : HelveticaNeue*/ + case SETTING_LANG_GREEK: + /* output_font : HelveticaNeue*/ + case SETTING_LANG_ITALIAN: + /* output_font : HelveticaNeue*/ + case SETTING_LANG_FRENCH: + /* output_font : HelveticaNeue*/ + case SETTING_LANG_TURKISH: + /* output_font : HelveticaNeue*/ + case SETTING_LANG_RUSSIAN: + font_name = g_strdup("HelveticaNeue"); + break; + default: + font_name = g_strdup("HelveticaNeue"); + break; + } + return font_name; +} + +void *font_conf_doc_parse(char *doc_name, char *font_name) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(doc_name == NULL, NULL, "Param data is NULL"); + setting_retvm_if(font_name == NULL, NULL, "Param data is NULL"); + xmlDocPtr doc = NULL; + xmlNodePtr cur = NULL; + xmlNodePtr cur2 = NULL; + xmlNodePtr cur3 = NULL; + xmlChar *key = NULL; + + doc = xmlParseFile(doc_name); + setting_retvm_if(doc == NULL, NULL, "Document not parsed successfully."); + + cur = xmlDocGetRootElement(doc); + + if (cur == NULL) { + SETTING_TRACE_DEBUG("empty document"); + xmlFreeDoc(doc); + doc = NULL; + return NULL; + } + + if(xmlStrcmp(cur->name, (const xmlChar *)"fontconfig")) { + SETTING_TRACE_DEBUG("document of the wrong type, root node != fontconfig"); + xmlFreeDoc(doc); + doc = NULL; + return NULL; + } + + cur = cur->xmlChildrenNode; + + while(cur != NULL) + { + if((!xmlStrcmp(cur->name, (const xmlChar *)"match"))) + { + cur2 = cur->xmlChildrenNode; + while(cur2 != NULL) + { + if((!xmlStrcmp(cur2->name, (const xmlChar *)"edit"))) + { + cur3 = cur2->xmlChildrenNode; + while(cur3 != NULL) + { + if((!xmlStrcmp(cur3->name, (const xmlChar *)"string"))) + { + xmlNodeSetContent(cur3->xmlChildrenNode, (const xmlChar *)font_name); + key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1); + SETTING_TRACE_DEBUG("after changed, string is: %s\n", key); + xmlFree(key); + key = NULL; + return doc; + } + cur3 = cur3->next; + } + } + cur2 = cur2->next; + } + } + cur = cur->next; + } + + xmlFreeDoc(doc); + doc = NULL; + return NULL; +} + +/** + * should use g_free to free return string + */ +char *cur_font_get() +{ + SETTING_TRACE_BEGIN; + xmlDocPtr doc = NULL; + xmlNodePtr cur = NULL; + xmlNodePtr cur2 = NULL; + xmlNodePtr cur3 = NULL; + xmlChar *key = NULL; + + char *font_name = NULL; + + doc = xmlParseFile(SETTING_FONT_CONF_FILE); + setting_retvm_if(doc == NULL, NULL, "Document not parsed successfully."); + + cur = xmlDocGetRootElement(doc); + + if(cur == NULL) { + SETTING_TRACE_DEBUG("empty document"); + xmlFreeDoc(doc); + doc = NULL; + return NULL; + } + + if(xmlStrcmp(cur->name, (const xmlChar *)"fontconfig")) { + SETTING_TRACE_DEBUG("document of the wrong type, root node != fontconfig"); + xmlFreeDoc(doc); + doc = NULL; + return NULL; + } + + cur = cur->xmlChildrenNode; + + while(cur != NULL) + { + if((!xmlStrcmp(cur->name, (const xmlChar *)"match"))) + { + cur2 = cur->xmlChildrenNode; + while(cur2 != NULL) + { + if((!xmlStrcmp(cur2->name, (const xmlChar *)"edit"))) + { + cur3 = cur2->xmlChildrenNode; + while(cur3 != NULL) + { + if((!xmlStrcmp(cur3->name, (const xmlChar *)"string"))) + { + key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1); + SETTING_TRACE_DEBUG("string is: %s", key); + + font_name = g_strdup((char *)key); + xmlFree(key); + key = NULL; + xmlFreeDoc(doc); + doc = NULL; + return font_name; + } + cur3 = cur3->next; + } + } + cur2 = cur2->next; + } + } + cur = cur->next; + } + + xmlFreeDoc(doc); + doc = NULL; + return NULL; +} + +static int __font_size_get() +{ + int font_size = -1; + int value = -1; + int err = -1; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, &value, &err); + retvm_if(ret != 0, -1, "get vconf failed"); + + switch(value) { + case SYSTEM_SETTINGS_FONT_SIZE_SMALL: + font_size = SMALL_FONT_DPI; + break; + case SYSTEM_SETTINGS_FONT_SIZE_NORMAL: + font_size = MIDDLE_FONT_DPI; + break; + case SYSTEM_SETTINGS_FONT_SIZE_LARGE: + font_size = LARGE_FONT_DPI; + break; + case SYSTEM_SETTINGS_FONT_SIZE_HUGE: + font_size = HUGE_FONT_DPI; + break; + case SYSTEM_SETTINGS_FONT_SIZE_GIANT: + font_size = GIANT_FONT_DPI; + break; + default: + font_size = MIDDLE_FONT_DPI; + break; + } + return font_size; +} + +void font_config_set(char *font_name) +{ + Eina_List *text_classes = NULL; + Elm_Text_Class *etc = NULL; + const Eina_List *l = NULL; + Eina_List *fo_list = NULL; + Elm_Font_Overlay *efo = NULL; + int font_size = __font_size_get(); + int size = 0; + + text_classes = elm_config_text_classes_list_get(); + + fo_list = (Eina_List *)elm_config_font_overlay_list_get(); + + Eina_List *ll = NULL; + Eina_List *l_next = NULL; + + Eina_Bool slp_medium_exist = EINA_FALSE; + Eina_Bool slp_roman_exist = EINA_FALSE; + Eina_Bool slp_bold_exist = EINA_FALSE; + Eina_Bool slp_regular_exist = EINA_FALSE; + + EINA_LIST_FOREACH_SAFE(fo_list, ll, l_next, efo) + { + if (!safeStrCmp(efo->text_class, "slp_medium")) { + elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size); + slp_medium_exist = EINA_TRUE; + } else if (!safeStrCmp(efo->text_class, "slp_roman")) { + elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size); + slp_roman_exist = EINA_TRUE; + } else if (!safeStrCmp(efo->text_class, "slp_bold")) { + elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size); + slp_bold_exist = EINA_TRUE; + } else if (!safeStrCmp(efo->text_class, "slp_regular")) { + elm_config_font_overlay_set(efo->text_class, (const char*)font_name, efo->size); + slp_regular_exist = EINA_TRUE; + } + } + + /* if slp_XX do not exist, need to set them, font size is -100(100%) */ + if (slp_medium_exist == EINA_FALSE) { + elm_config_font_overlay_set("slp_medium", (const char*)font_name, MIDDLE_FONT_DPI); + } + if (slp_roman_exist == EINA_FALSE) { + elm_config_font_overlay_set("slp_roman", (const char*)font_name, MIDDLE_FONT_DPI); + } + if (slp_bold_exist == EINA_FALSE) { + elm_config_font_overlay_set("slp_bold", (const char*)font_name, MIDDLE_FONT_DPI); + } + if (slp_regular_exist == EINA_FALSE) { + elm_config_font_overlay_set("slp_regular", (const char*)font_name, MIDDLE_FONT_DPI); + } + + EINA_LIST_FOREACH(text_classes, l, etc) + { + ll = NULL; + + size = font_size; + EINA_LIST_FOREACH(fo_list, ll, efo) + { + if (!safeStrCmp(etc->name, efo->text_class)) { + size = efo->size; + } + } + elm_config_font_overlay_set(etc->name, (const char*)font_name, size); + } + + elm_config_font_overlay_apply(); + elm_config_all_flush(); + elm_config_engine_set("software_x11"); + elm_config_save(); + elm_config_text_classes_list_free(text_classes); + text_classes = NULL; + + // vconf update + vconf_set_str(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, font_name); +} + +void font_size_set() +{ + Eina_List *text_classes = NULL; + Elm_Text_Class *etc = NULL; + const Eina_List *l = NULL; + int font_size = __font_size_get(); + char *font_name = cur_font_get(); + + if (font_size == -1) { + SETTING_TRACE_DEBUG("failed to call font_size_get"); + return; + } + + text_classes = elm_config_text_classes_list_get(); + + EINA_LIST_FOREACH(text_classes, l, etc) + { + elm_config_font_overlay_set(etc->name, font_name, font_size); + } + + elm_config_all_flush(); + elm_config_engine_set("software_x11"); + elm_config_save(); + elm_config_text_classes_list_free(text_classes); + text_classes = NULL; + G_FREE(font_name); +} diff --git a/setting-common/src/setting-common-resource.c b/setting-common/src/setting-common-resource.c index f10ddd2..fe46a51 100755 --- a/setting-common/src/setting-common-resource.c +++ b/setting-common/src/setting-common-resource.c @@ -1,28 +1,31 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ - - -const char *STR_SETTING_NORMAL = "Normal"; +const char *STR_SETTING_NORMAL = "IDS_ST_BODY_NORMAL_T_PROFILE"; /* security*/ const char *STR_SETTING_OPERATION_FAILED = "IDS_COM_BODY_OPERATION_FAILED"; /* network*/ -const char *STR_SETTING_MMS_CONNECTIONS = "MMS connection"; +const char *STR_SETTING_MMS_CONNECTIONS = "IDS_ST_BODY_MMS_CONNECTIONS"; const char *STR_SETTING_GSM_900_1800 = "GSM 900/1800"; const char *STR_SETTING_GSM_850_1900 = "GSM 850/1900"; const char *STR_SETTING_UMTS = "UMTS"; diff --git a/setting-common/src/setting-common-view.c b/setting-common/src/setting-common-view.c old mode 100644 new mode 100755 index 12fffff..8e24535 --- a/setting-common/src/setting-common-view.c +++ b/setting-common/src/setting-common-view.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #include @@ -101,6 +104,27 @@ setting_view *setting_view_get_topview(setting_view *view) } } +void setting_view_update_topview(setting_view *view, setting_view *topview) +{ + SETTING_TRACE_BEGIN; + ret_if(NULL == view); + int idx = 0; + SettingViewNode *viewnode = NULL; + for (; idx < g_view_node_table_cur_size; idx++) { + if (view == g_view_node_table[idx].view) { + viewnode = &(g_view_node_table[idx]); + break; + } + } + if (viewnode) { + viewnode->topview = topview; + } + else + { + } +} + + int setting_view_create(setting_view *view, void *cb) { /* error check */ @@ -172,7 +196,7 @@ setting_view_change(setting_view *from_view, setting_view *to_view, void *cb) //from a child view to his parent view, need cleanup child view ret = setting_view_cleanup(from_view, cb); } - + if (ret == SETTING_RETURN_FAIL) { return SETTING_RETURN_FAIL; } diff --git a/setting-connectivity/CMakeLists.txt b/setting-connectivity/CMakeLists.txt index a0bbb53..891974a 100755 --- a/setting-connectivity/CMakeLists.txt +++ b/setting-connectivity/CMakeLists.txt @@ -2,7 +2,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs_connectivity REQUIRED evas elementary appcore-common appcore-efl ui-gadget bundle utilX heynoti devman) +pkg_check_modules(pkgs_connectivity REQUIRED evas elementary appcore-common appcore-efl +ui-gadget-1 capi-appfw-application utilX devman capi-system-runtime-info) FOREACH(flag ${pkgs_connectivity_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") @@ -21,13 +22,13 @@ ADD_DEFINITIONS("-DSLP_DEBUG") SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") -ADD_LIBRARY(${SETTING_CONNECTIVITY_UG} SHARED +ADD_LIBRARY(${SETTING_DEVELOPEROPTION_UG} SHARED ./src/setting-connectivity.c ./src/setting-connectivity-usb.c ./src/setting-connectivity-usb-help.c ) -TARGET_LINK_LIBRARIES(${SETTING_CONNECTIVITY_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) -TARGET_LINK_LIBRARIES(${SETTING_CONNECTIVITY_UG} ${pkgs_connectivity_LDFLAGS}) +TARGET_LINK_LIBRARIES(${SETTING_DEVELOPEROPTION_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_DEVELOPEROPTION_UG} ${pkgs_connectivity_LDFLAGS}) -INSTALL(TARGETS ${SETTING_CONNECTIVITY_UG} DESTINATION /opt/ug/lib) +INSTALL(TARGETS ${SETTING_DEVELOPEROPTION_UG} DESTINATION /opt/ug/lib) diff --git a/setting-connectivity/include/setting-connectivity-usb-help.h b/setting-connectivity/include/setting-connectivity-usb-help.h index 30acc51..ebf1362 100755 --- a/setting-connectivity/include/setting-connectivity-usb-help.h +++ b/setting-connectivity/include/setting-connectivity-usb-help.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_CONNECTIVITY_USB_HELP_H__ #define __SETTING_CONNECTIVITY_USB_HELP_H__ diff --git a/setting-connectivity/include/setting-connectivity-usb.h b/setting-connectivity/include/setting-connectivity-usb.h index 903c4e8..56c4bfc 100755 --- a/setting-connectivity/include/setting-connectivity-usb.h +++ b/setting-connectivity/include/setting-connectivity-usb.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_CONNECTIVITY_USB_H__ #define __SETTING_CONNECTIVITY_USB_H__ @@ -23,6 +26,8 @@ #define NUM_PROGRESSBAR 4 +#define SETTING_USB_DEBUGGING_DESC "IDS_ST_BODY_DEBUGGING_MODE_LAUNCHES_WHEN_USB_IS_CONNECTED" + enum progressbar_status { STATE_NONE = 0x00, STATE_PROGRESSBAR @@ -39,8 +44,10 @@ struct _button_status { static void setting_connectivity_usb_click_softkey_cancel_cb(void *data, Evas_Object *obj, void *event_info); +#ifdef HELP_UG_EXIST static void setting_connectivity_usb_click_softkey_set_cb(void *data, Evas_Object *obj, void *event_info); +#endif #endif /* __SETTING_CONNECTIVITY_USB_H__ */ diff --git a/setting-connectivity/include/setting-connectivity.h b/setting-connectivity/include/setting-connectivity.h index a6d3346..afd497c 100755 --- a/setting-connectivity/include/setting-connectivity.h +++ b/setting-connectivity/include/setting-connectivity.h @@ -1,47 +1,50 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_CONNECTIVITY_H__ #define __SETTING_CONNECTIVITY_H__ #include -#include #include +#ifdef SUPPORT_MDM +#include +#endif #include -#include -#include -#include - -#include #include #include #include +#include + enum mode_change { - NO_CHANGE = 0x00, - IN_CHANGE + CHANGE_COMPLETE = 0, + IN_MODE_CHANGE, + IN_MODE_CHANGE_NONE }; enum usb_connection_status { - USB_CONNECTED = 0, - USB_DISCONNECTED, + USB_DISCONNECTED = 0, + USB_CONNECTED, GETTING_STATUS_FAIL }; @@ -49,11 +52,11 @@ typedef struct _SettingConnectivityUG SettingConnectivityUG; /** * Setting Connectivity UG context - * all UG function has void* as an agument. this is casted back to SettingConnectivityUG + * all UG function has void* as an agument. this is casted back to SettingConnectivityUG * and the functions access app context. */ struct _SettingConnectivityUG { - struct ui_gadget *ug; + ui_gadget_h ug; /* add more variables here (move your appdata to here) */ Evas *evas; @@ -61,21 +64,38 @@ struct _SettingConnectivityUG { Evas_Object *win_get; Evas_Object *navi_bar; - Evas_Object *ly_tvout; - Evas_Object *ly_usb; Evas_Object *chk_con; + Evas_Object *pop; + + Setting_GenGroupItem_Data *debug_mode; /* debug mode */ + Setting_GenGroupItem_Data *cpu_usage; /* Show CPU Usage */ + Setting_GenGroupItem_Data *gpu_render; /* Force GPU Rendering */ + Setting_GenGroupItem_Data *bg_processes; /* Limit background processes */ + /*****/ setting_view *view_to_load; - Elm_Genlist_Item_Class itc_1text_1icon_2; - Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_title; + Elm_Genlist_Item_Class itc_1text; + Elm_Genlist_Item_Class itc_1text_1progress; + Elm_Genlist_Item_Class itc_1text_1icon; + Elm_Genlist_Item_Class itc_1text_1icon_gen; + Elm_Genlist_Item_Class itc_2text_3; Elm_Genlist_Item_Class itc_group_item; Elm_Genlist_Item_Class itc_seperator; Elm_Genlist_Item_Class itc_help_style; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + int noti_fd; - int isUsbConnected; + Eina_Bool blockUI; +#ifdef SUPPORT_MDM + mdm_status_t curMdmPolicy; + policy_receiver_handle policy_handler; + mdm_result_t mdm_service; +#endif }; extern setting_view setting_view_connectivity_usb; diff --git a/setting-connectivity/src/setting-connectivity-usb-help.c b/setting-connectivity/src/setting-connectivity-usb-help.c index 573e7e8..a095208 100755 --- a/setting-connectivity/src/setting-connectivity-usb-help.c +++ b/setting-connectivity/src/setting-connectivity-usb-help.c @@ -1,23 +1,25 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include - -#define HELP_MGS_BUF_LEN 256 +#define HELP_LEN 2048 static int setting_connectivity_usb_help_create(void *cb); static int setting_connectivity_usb_help_destroy(void *cb); @@ -31,7 +33,7 @@ setting_view setting_view_connectivity_usb_help = { .cleanup = setting_connectivity_usb_help_cleanup, }; -/* ************************************************** +/* *************************************************** * *basic func * @@ -43,7 +45,21 @@ static int setting_connectivity_usb_help_create(void *cb) SettingConnectivityUG *ad = (SettingConnectivityUG *) cb; - char usb_debugging_help_msg[HELP_MGS_BUF_LEN]; + char samsung_kies_help[HELP_LEN]; + char mass_storage_help[HELP_LEN]; + char debugging_mode_help[HELP_LEN]; + + snprintf(samsung_kies_help, HELP_LEN, + "%s%s%s%s", "", _("IDS_ST_HEADER_SAMSUNG_KIES"), "
", + evas_textblock_text_utf8_to_markup(NULL, _("IDS_ST_BODY_SAMSUNG_KIES_CONNECTION_CONNECTING_USB_HELP_MSG"))); + snprintf(mass_storage_help, HELP_LEN, + "%s%s%s%s", "", _("IDS_ST_OPT_MASS_STORAGE_ABB"), "
", + evas_textblock_text_utf8_to_markup(NULL, _("IDS_ST_BODY_MASS_STORAGE_HELP_MSG"))); + snprintf(debugging_mode_help, HELP_LEN, + "%s%s%s%s", "", _("IDS_ST_BODY_USB_DEBUGGING"), "
", + evas_textblock_text_utf8_to_markup(NULL, _("IDS_ST_BODY_USB_DEBUGGING_IS_INTENDED_FOR_DEVELOPMENT_PURPOSES_ONLY_MSG"))); + + Evas_Object *genlist; setting_push_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, @@ -54,15 +70,23 @@ static int setting_connectivity_usb_help_create(void *cb) NULL, ad, &genlist, ad->navi_bar); - snprintf(usb_debugging_help_msg, HELP_MGS_BUF_LEN, "%s
""%s", - _("IDS_ST_BODY_USB_DEBUGGING"), - _("IDS_ST_BODY_THIS_MODE_IS_FOR_APPLICATION_DEVELOPERS_YOU_CAN_TEST_AND_DEVELOP_SOFTWARE")); - setting_create_Gendial_field_def(genlist, &(ad->itc_help_style), - NULL, - ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, - 0, usb_debugging_help_msg, NULL, - NULL); + NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, + 0, samsung_kies_help, NULL, + NULL); + + setting_create_Gendial_field_def(genlist, &(ad->itc_help_style), + NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, + 0, mass_storage_help, NULL, + NULL); + + setting_create_Gendial_field_def(genlist, &(ad->itc_help_style), + NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, + 0, debugging_mode_help, NULL, + NULL); setting_view_connectivity_usb_help.is_create = 1; diff --git a/setting-connectivity/src/setting-connectivity-usb.c b/setting-connectivity/src/setting-connectivity-usb.c old mode 100644 new mode 100755 index 30d0702..ff33910 --- a/setting-connectivity/src/setting-connectivity-usb.c +++ b/setting-connectivity/src/setting-connectivity-usb.c @@ -1,55 +1,64 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include - -#define DEFAULT_USB_BUF_SIZE 64 -#define SETTING_USB_DEFAULT_MODE 0 +#define GROUP_MAX 30 +#define MDM_POLICY_RESTRICTED \ + "MDM policy restricts connecting Samsung Kies mode." +#define USB_BTN_NO 0 +#define SETTING_USB_MDM_RESTRICTED 10 + +static char* bgprocess_list[] = { + "IDS_ST_HEADER_STANDARD_LIMIT_ABB", + "IDS_ST_HEADER_NO_BACKGROUND_PROCESSES_ABB", + "IDS_ST_HEADER_1_PROCESS_AT_MOST_ABB", + "IDS_ST_HEADER_2_PROCESSES_AT_MOST_ABB", + "IDS_ST_HEADER_3_PROCESSES_AT_MOST_ABB", + "IDS_ST_HEADER_4_PROCESSES_AT_MOST_ABB", +}; static int setting_connectivity_usb_create(void *cb); static int setting_connectivity_usb_destroy(void *cb); static int setting_connectivity_usb_update(void *cb); static int setting_connectivity_usb_cleanup(void *cb); -static void mode_change_vconf_cb(keynode_t *key, void *data); + +static void current_mode_change_vconf_cb(keynode_t *key, void *data); +static void in_mode_change_vconf_cb(keynode_t *key, void *data); static void set_progressbar_status (int mode); static void unset_progressbar_status (int mode); -static int disable_glitem(int index); -static int enable_glitem(int index); -static void enable_all_buttons(); -static int disable_all_buttons(int enable); -static void unload_popup(); -void load_usb_connection_popup(Evas_Object *radio); -static void usb_status_vconf_cb(keynode_t *key, void *data); - -/* set button style */ -static Elm_Genlist_Item_Class itc; -static Elm_Genlist_Item_Class itc11; +static void select_popup_btn_vconf_cb(keynode_t *key, void *data); +static void usb_chgdet_cb(runtime_info_key_e key, void *data); +static void unload_popup(void* data); +void load_usb_connection_popup(void* data); +void load_usb_disabled_popup(int mode); /* This is pointer to indicate progressbars*/ static button_status button[NUM_PROGRESSBAR]; -/* This variable indicates whether or not USB mode is being changed */ -static int in_mode_change; /* NO_CHANGE: USB mode is not being changed, IN_CHANGE: USB mode is being changed */ - /* This variable shows the current/selected USB mode */ -static int curMode, selMode; +static int g_curMode; // INT_SLP_SETTING_USB_MODE R +static int g_selMode; // VCONFKEY_SETAPPL_USB_SEL_MODE_INT R/W /* These variables are for the popup */ static Evas_Object *win_main, *popup_eo; +static char *popup_msg, *popup_title; setting_view setting_view_connectivity_usb = { .create = setting_connectivity_usb_create, @@ -58,42 +67,97 @@ setting_view setting_view_connectivity_usb = { .cleanup = setting_connectivity_usb_cleanup, }; +#if DISABLED_CODE +static void +__setting_devoptions_main_exp_cb(void *data, Evas_Object * obj, void *event_info) +{ + ret_if(NULL == data || NULL == event_info); + SETTING_TRACE_BEGIN; + SettingConnectivityUG *ad = (SettingConnectivityUG *) data; + + Elm_Object_Item *parentItem = event_info; //parent item + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); //parent data + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + // WARNING + // setting_create_simple_popup(NULL, ad->win_get, NULL, "NOT IMPLMENTED YET"); + + // add each items + Evas_Object *rgd; + if (data_parentItem == ad->bg_processes /* <- name */) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + + setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, SWALLOW_Type_1RADIO, rgd, 0, _(bgprocess_list[0]), NULL); + setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, SWALLOW_Type_1RADIO, rgd, 1, _(bgprocess_list[1]), NULL); + setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, SWALLOW_Type_1RADIO, rgd, 2, _(bgprocess_list[2]), NULL); + setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, SWALLOW_Type_1RADIO, rgd, 3, _(bgprocess_list[3]), NULL); + setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, SWALLOW_Type_1RADIO, rgd, 4, _(bgprocess_list[4]), NULL); + setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, SWALLOW_Type_1RADIO, rgd, 5, _(bgprocess_list[5]), NULL); + + setting_update_chk_status(rgd, data_parentItem->int_slp_setting_binded); + } +} +#endif + /** - * This function is for adding buttons with a radio box and a progressbar + * This function is for adding buttons with a subtitle or a progressbar */ -Elm_Object_Item *setting_create_Gendial_field_group_item_1radio(Evas_Object * genlist, - Elm_Genlist_Item_Class *itc, +Elm_Object_Item *setting_create_Gendial_field_group_item_1text_1icon(Evas_Object * genlist, setting_call_back_func gl_sel, - void *sel_data, + SettingConnectivityUG *sel_data, SWALLOW_Type swallow_type, - Evas_Object * rgd, int chk_status, const char *keyStr, - setting_call_back_func chk_change_cb, - Elm_Object_Item *git, int index) { SETTING_TRACE_BEGIN; - Setting_GenGroupItem_Data *item_data = - (Setting_GenGroupItem_Data *) calloc(1, - sizeof - (Setting_GenGroupItem_Data)); + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) calloc(1, sizeof (Setting_GenGroupItem_Data)); + item_data->keyStr = (char *)g_strdup(keyStr); item_data->swallow_type = swallow_type; item_data->chk_status = chk_status; - item_data->chk_change_cb = chk_change_cb; - item_data->rgd = rgd; - item_data->index = index; + item_data->usb_index = index; + item_data->sub_desc = (char *)g_strdup(_("IDS_COM_POP_CONNECTED")); - item_data->item = - elm_genlist_item_append(genlist, itc, item_data, git, + /* If current mode is the mode of this button, the genlist appended should be with subtext "Connected" + * If not, the genlist should be with single text */ + SETTING_TRACE("g_curMode: %d, index : %d\n", g_curMode, index); + +#if DISABLED_CODE + if (g_curMode == index) + { + + // setting_create_Gendial_itc("dialogue/1text.1icon", &(connectiveUG->itc_1text_1icon_gen)); /* toggle */ + item_data->item = elm_genlist_item_append(genlist, &(sel_data->itc_2text_3), item_data, NULL, ELM_GENLIST_ITEM_NONE, gl_sel, sel_data); + } + else /* g_curMode is concerned with other button */ + { + item_data->item = elm_genlist_item_append(genlist, &(sel_data->itc_1text_1icon), item_data, NULL, ELM_GENLIST_ITEM_NONE, gl_sel, sel_data); + + } +#endif + //Elm_Genlist_Item_Class itc_1text_1icon_gen; + item_data->item = elm_genlist_item_append(genlist, + &(sel_data->itc_1text_1icon), + item_data, + NULL, + ELM_GENLIST_ITEM_NONE, + gl_sel, + sel_data); + SETTING_TRACE_END; return item_data->item; } /** * Creating progressbar + * + *@param parent + *@param num + * + *@return */ Evas_Object *create_progressbar(Evas_Object *parent, int num) { @@ -111,7 +175,13 @@ Evas_Object *create_progressbar(Evas_Object *parent, int num) } /** - * This function set the icons: a radio box and a progressbar + * This function set the icons: a progressbar + * + *@param data + *@param obj + *@param part + * + *@return */ Evas_Object *_gl_icon_get(void *data, Evas_Object *obj, const char *part) { @@ -119,45 +189,198 @@ Evas_Object *_gl_icon_get(void *data, Evas_Object *obj, const char *part) Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; Evas_Object *icon = NULL; - if (!strncmp(part, "elm.icon.2", sizeof("elm.icon.2"))) { - switch (button[item_data->index].pstate) { + /* The number of icon is 1, so we should use "elm.icon" instead of "elm.icon.2" */ + if (!strncmp(part, "elm.icon", sizeof("elm.icon"))) { + switch (button[item_data->usb_index].pstate) { case STATE_PROGRESSBAR: - icon = create_progressbar(obj, item_data->index); + icon = create_progressbar(obj, item_data->usb_index); case STATE_NONE: default: break; } - } else { - icon = elm_radio_add(obj); - elm_radio_state_value_set(icon, item_data->chk_status); - elm_radio_group_add(icon, item_data->rgd); - item_data->eo_check = icon; - evas_object_smart_callback_add(icon, "changed", - item_data->chk_change_cb, - item_data); } SETTING_TRACE_END; return icon; } -static void setting_connectivity_usb_radio_up_cb(void *data, Evas_Object *obj, void *event_info) + +static void setting_connectivity_popup_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + int response_type = btn_type(obj); + int ret; + + SettingConnectivityUG *ad = data; + + if (POPUP_RESPONSE_OK == response_type) { + // OK + // set vconf + SETTING_TRACE("keeping_debug: SET\n"); + ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, SETTING_USB_DEBUG_MODE); + + elm_check_state_set(ad->debug_mode->eo_check, 1); + ad->debug_mode->chk_status = 1; + } else if (POPUP_RESPONSE_CANCEL == response_type) { + // NO + SETTING_TRACE("keeping_debug: UNSET\n"); + ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, SETTING_USB_SAMSUNG_KIES); + + // set to zero + elm_check_state_set(ad->debug_mode->eo_check, 0); + ad->debug_mode->chk_status = 0; + } + + if (ad->pop) { + evas_object_del(ad->pop); + ad->pop = NULL; + } +} + + +static void setting_connectivity_main_chk_usb_debug_cb(void *data, Evas_Object * obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + //error check + retm_if(data == NULL, "Data parameter is NULL"); + SettingConnectivityUG *ad = NULL; + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + ad = list_item->userdata; + + // jack_connected? --> process + // NOT jack_connected? --> popup and skip + if (USB_DISCONNECTED == check_usb_jack_status()) + { + switch (g_selMode) + { + case SETTING_USB_SAMSUNG_KIES: + /* not USB debug mode */ + load_usb_connection_popup(ad); + break; + default: + break; + } + + // set default state + int ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, SETTING_USB_SAMSUNG_KIES); + setting_retm_if(ret != 0, "fail to set vconf"); + elm_check_state_set(ad->debug_mode->eo_check, 0); + } + else /* USB_CONNECTED == check_usb_jack_status() */ + { + SETTING_TRACE("ad->blockUI: EINA_TRUE\n"); + ad->blockUI = EINA_TRUE; + + list_item->chk_status = elm_check_state_get(obj); // for genlist update status + int opposite = (list_item->chk_status == 1) ? SETTING_ON_OFF_BTN_ON : SETTING_ON_OFF_BTN_OFF; + + if (opposite) { + // off --> on + // create popup + ad->pop = setting_create_popup_with_btn(ad, ad->win_get, NULL, + _("USB Debugging mode on"), setting_connectivity_popup_cb, 0, 2, + dgettext("sys_string", "IDS_COM_SK_OK"), + _("IDS_COM_SK_CANCEL")); + } else { + // set default state + int ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, SETTING_USB_SAMSUNG_KIES); + setting_retm_if(ret != 0, "fail to set vconf"); + elm_check_state_set(ad->debug_mode->eo_check, 0); + } + } +} + +#if DISABLED_CODE +static void setting_connectivity_main_chk_btn_cb(void *data, Evas_Object * obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + //error check + retm_if(data == NULL, "Data parameter is NULL"); + SettingConnectivityUG *ad = NULL; + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + ad = list_item->userdata; + list_item->chk_status = elm_check_state_get(obj); // for genlist update status + + int opposite = (list_item->chk_status == 1) ? SETTING_ON_OFF_BTN_ON : SETTING_ON_OFF_BTN_OFF; + + + //SETTING_TRACE(" config_engine_get : %s", elm_config_engine_get()); + + // DO NOTHING NOW + if (opposite) + { + // ON + elm_config_engine_set("opengl_x11"); + elm_config_save(); + } else { + // OFF + elm_config_engine_set("software_x11"); + elm_config_save(); + } + + +} + +static void setting_connectivity_usb_mouse_up_Gendial_CPU_usage_cb(void* data, Evas_Object* obj, void* event_info) +{ + SETTING_TRACE_BEGIN; + + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + //Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingConnectivityUG *ad = (SettingConnectivityUG *) data; + + setting_create_simple_popup(NULL, ad->win_get, NULL, "NOT IMPLMENTED YET"); + + SETTING_TRACE_END; +} + +static void setting_connectivity_usb_mouse_up_Gendial_GPU_rendering_cb(void* data, Evas_Object* obj, void* event_info) { SETTING_TRACE_BEGIN; - setting_retm_if(data == NULL, "ERROR: data == NULL"); - Evas_Object *radio = (Evas_Object *)obj; - SETTING_TRACE("Radio set: when pushing cancel btn on popup\n"); - elm_radio_value_set(radio, SETTING_USB_DEFAULT_MODE); + + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + setting_retm_if(data == NULL, "Data parameter is NULL"); + //SettingConnectivityUG *ad = (SettingConnectivityUG *) data; + + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + + if (list_item->chk_status) + { + // ON + elm_config_engine_set("opengl_x11"); + elm_config_save(); + } else { + // OFF + elm_config_engine_set("software_x11"); + elm_config_save(); + } + SETTING_TRACE_END; } +#endif /** * Do process when clicking on some genlist item + * + *@param data + *@param obj + *@param event_info */ -static void setting_connectivity_usb_mouse_up_Gendial_list_radio_cb(void *data, - Evas_Object - *obj, - void - *event_info) +static void setting_connectivity_usb_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, void *event_info) { SETTING_TRACE_BEGIN; @@ -167,72 +390,126 @@ static void setting_connectivity_usb_mouse_up_Gendial_list_radio_cb(void *data, elm_genlist_item_selected_set(item, 0); Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); - Evas_Object *radio = NULL; + +#if DISABLED_CODE/*{{{*/ + int ret; setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingConnectivityUG *ad = (SettingConnectivityUG *) data; - if ( in_mode_change == IN_CHANGE) + /* (ad->blockUI == EINA_TRUE) : When clicking a btn, do nothing + * (ad->blockUI == EINA_FALSE) : When clicking a btn, change usb mode */ + if ( EINA_TRUE == ad->blockUI ) { SETTING_TRACE("Currently, USB mode is changing\n"); return; } /* If selected mode is same as the previous mode, do nothing */ - if (curMode == list_item->chk_status) + if (g_curMode == list_item->chk_status) { SETTING_TRACE("Selected mode is same as the previous mode\n"); return ; } - selMode = list_item->chk_status; - /* If USB cable is connected, buttons should be disabled */ - int jack_status = check_usb_jack_status(); - if (jack_status == USB_CONNECTED) + SETTING_TRACE("list_item->chk_status: %d\n", list_item->chk_status); + + g_selMode = list_item->chk_status; + ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, g_selMode); + setting_retm_if ( ret != 0, "FAIL: vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT)\n"); + + /* if the USB cable is not connected and the selected mode is not the KIES mode, + * popup should be loaded to ask connecting the USB cable */ + if (USB_DISCONNECTED == check_usb_jack_status()) { - /* USB mode is changing */ - in_mode_change = IN_CHANGE; - - if (SETTING_RETURN_FAIL == disable_all_buttons(selMode)) + switch (g_selMode) { - SETTING_TRACE("FAIL: disable_all_buttons(index)\n"); - return ; + case SETTING_USB_DEBUG_MODE: + default: + load_usb_connection_popup(ad); + break; } - - /* Drawing progressbar */ - set_progressbar_status(selMode); } - - int ret; - SETTING_TRACE("selMode : %d\n",selMode); - ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, selMode); - if ( ret != 0 ) + else /* USB_CONNECTED == check_usb_jack_status() */ { - SETTING_TRACE("vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT)\n"); - return ; + SETTING_TRACE("ad->blockUI: EINA_TRUE\n"); + ad->blockUI = EINA_TRUE; } - SETTING_TRACE("selMode : %d\n",selMode); + SETTING_TRACE("ad->blockUI: %d\n", ad->blockUI); +#endif/*}}}*/ + + SettingConnectivityUG *ad = (SettingConnectivityUG *) data; - if (jack_status == USB_DISCONNECTED) + if (USB_DISCONNECTED == check_usb_jack_status()) { - radio = data; - switch (selMode) + switch (g_selMode) { - case SETTING_USB_DEFAULT_MODE: - SETTING_TRACE("Radio set: clicked Default mode \n"); - elm_radio_value_set(radio, SETTING_USB_DEFAULT_MODE); + case SETTING_USB_SAMSUNG_KIES: + /* not USB debug mode */ + load_usb_connection_popup(ad); break; - case SETTING_USB_DEBUG_MODE: default: - load_usb_connection_popup(radio); break; } + + // set default state + int ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, SETTING_USB_SAMSUNG_KIES); + setting_retm_if(ret != 0, "fail to set vconf"); + elm_check_state_set(list_item->eo_check, 0); + } + else /* USB_CONNECTED == check_usb_jack_status() */ + { + SETTING_TRACE("ad->blockUI: EINA_TRUE\n"); + ad->blockUI = EINA_TRUE; + + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + + if (list_item->chk_status) { + // off --> on + // create popup + elm_check_state_set(list_item->eo_check, list_item->chk_status); + ad->pop = setting_create_popup_with_btn(ad, ad->win_get, NULL, + _("USB Debugging mode on"), setting_connectivity_popup_cb, 0, 2, + dgettext("sys_string", "IDS_COM_SK_OK"), + _("IDS_COM_SK_CANCEL")); + } else { + // set default state + int ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, SETTING_USB_SAMSUNG_KIES); + setting_retm_if(ret != 0, "fail to set vconf"); + elm_check_state_set(list_item->eo_check, 0); + } } SETTING_TRACE_END; } + +char* get_bg_processes() +{ + int value; + int err; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_DEVOPTION_BGPROCESS, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + if (value >=0 && value <= sizeof(bgprocess_list)/sizeof(bgprocess_list[0]) ) + return _(bgprocess_list[value]); + else + { + return _(bgprocess_list[0]); /* error proc */ + } +} + /** * To create the usb main view + * + *@param cb + * + *@return */ static int setting_connectivity_usb_create(void *cb) { @@ -244,100 +521,49 @@ static int setting_connectivity_usb_create(void *cb) SettingConnectivityUG *ad = (SettingConnectivityUG *) cb; Evas_Object *scroller; - int vconf_ret = -1; - int index = -1; + int vconf_ret = -1; int err = -1; - char title_default_usb_button[DEFAULT_USB_BUF_SIZE]; int jack_status = USB_DISCONNECTED; - SETTING_TRACE("in_mode_change = NO_CHANGE\n"); - in_mode_change = NO_CHANGE; /* win_main of the popup */ win_main = ad->win_get; - +#ifdef HELP_UG_EXIST ad->ly_usb = setting_create_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, - _(KeyStr_USBconnection), + _(KeyStr_DeveloperOption), dgettext("sys_string", "IDS_COM_BODY_BACK"), _("IDS_COM_BODY_HELP"), setting_connectivity_usb_click_softkey_cancel_cb, setting_connectivity_usb_click_softkey_set_cb, ad, &scroller, &ad->navi_bar); +#else + ad->ly_usb = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_DeveloperOption), + dgettext("sys_string", "IDS_COM_BODY_BACK"), + NULL, + setting_connectivity_usb_click_softkey_cancel_cb, + NULL, + ad, &scroller, + &ad->navi_bar); +#endif SETTING_TRACE("before init\n"); - for (index = 0; index < NUM_PROGRESSBAR; index++) { - button[index].item = NULL; - button[index].pstate = STATE_NONE; - } - - /* itc is for the group titles */ - setting_create_Gendial_itc("dialogue/title", &itc); - SETTING_TRACE("itc is set\n"); - - /* itc11 is for the group members */ - itc11.item_style = "dialogue/1text.2icon"; - itc11.func.text_get = ad->itc_1text_1icon_2.func.text_get; - itc11.func.state_get = ad->itc_1text_1icon_2.func.state_get; - itc11.func.del = ad->itc_1text_1icon_2.func.del; - itc11.func.content_get = _gl_icon_get; - - SETTING_TRACE("itc11 is set\n"); - - /* scroller is a genlist */ - ad->chk_con = elm_radio_add(scroller); - elm_radio_state_value_set(ad->chk_con, -1); - - /* First Group */ - setting_create_Gendial_field_titleItem(scroller, &itc, - _("IDS_ST_BODY_DEFAULT_CONNECTION_MODE"), NULL); - - SETTING_TRACE("First group is made\n"); - - snprintf(title_default_usb_button, DEFAULT_USB_BUF_SIZE, "USB %s", _("IDS_COM_BODY_DEFAULT")); - - /* First item of the first group */ - button[SETTING_USB_DEFAULT_MODE].item = - setting_create_Gendial_field_group_item_1radio(scroller, &itc11, - setting_connectivity_usb_mouse_up_Gendial_list_radio_cb, - ad->chk_con, - SWALLOW_Type_1RADIO, - ad->chk_con, - SETTING_USB_DEFAULT_MODE, - title_default_usb_button, - setting_connectivity_usb_radio_up_cb, - NULL, SETTING_USB_DEFAULT_MODE); - - SETTING_TRACE("First item of First group is set\n"); + button[SETTING_USB_DEBUG_MODE].item = NULL; + button[SETTING_USB_DEBUG_MODE].pstate = STATE_NONE; - /* Second Group */ - setting_create_Gendial_field_titleItem(scroller, &itc, - _("IDS_ST_POP_SELECT_OTHER_CONNECTION"), NULL); + /* icon of itc_1text_1icon is progressbar */ + ad->itc_1text_1icon.func.content_get = _gl_icon_get; - SETTING_TRACE("Second group is made\n"); - - /* First item of the second group */ - button[SETTING_USB_DEBUG_MODE].item = - setting_create_Gendial_field_group_item_1radio(scroller, &itc11, - setting_connectivity_usb_mouse_up_Gendial_list_radio_cb, - ad->chk_con, - SWALLOW_Type_1RADIO, - ad->chk_con, - SETTING_USB_DEBUG_MODE, - _("IDS_ST_BODY_USB_DEBUGGING"), - setting_connectivity_usb_radio_up_cb, - NULL, SETTING_USB_DEBUG_MODE); - - SETTING_TRACE("First item of Second group is set\n"); - - ad->isUsbConnected = check_usb_jack_status(); - - /* Set curMode and selMode which are internal variables */ - if ( ad->isUsbConnected == USB_CONNECTED) + jack_status = check_usb_jack_status(); + /* Set g_curMode and g_selMode which are internal variables */ + if ( jack_status == USB_CONNECTED) { - setting_get_int_slp_key(INT_SLP_SETTING_USB_MODE, &curMode, &err); + setting_get_int_slp_key(INT_SLP_SETTING_USB_MODE, &g_curMode, &err); if (err != 0) { SETTING_TRACE("FAIL: setting_get_int_slp_key(INT_SLP_SETTING_USB_MODE)\n"); @@ -345,221 +571,312 @@ static int setting_connectivity_usb_create(void *cb) } } else /* USB cable is not connected */ - curMode = SETTING_USB_NONE_MODE; + g_curMode = SETTING_USB_NONE_MODE; - err = vconf_get_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, &selMode); + err = vconf_get_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, &g_selMode); if (err != 0) { SETTING_TRACE("FAIL: vconf_get_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT)\n"); return SETTING_RETURN_FAIL; } - /* set state */ - if (ad->isUsbConnected == USB_CONNECTED) { - SETTING_TRACE("Radio set: initial radio \n"); - elm_radio_value_set(ad->chk_con, curMode); + Elm_Object_Item *item = NULL;; +#if 1 + // [UI] separator + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + // [UI] USB debugging +#if DISABLED_CODE + button[SETTING_USB_DEBUG_MODE].item = + setting_create_Gendial_field_group_item_1text_1icon(scroller, + setting_connectivity_usb_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_INVALID, + SETTING_USB_DEBUG_MODE, + _("IDS_ST_BODY_USB_DEBUGGING"), + SETTING_USB_DEBUG_MODE); +#else + int ret = -1; + int vconf_val; + int toggle_dbg = 0; + + // VCONFKEY_SETAPPL_USB_SEL_MODE_INT -> set state + // VCONFKEY_SETAPPL_USB_MODE_INT -> get state + + /* Setting g_selMode and g_curMode */ + ret = vconf_get_int(VCONFKEY_SETAPPL_USB_MODE_INT, &vconf_val); + if ( (ret == 0) && (vconf_val == 3) ) + toggle_dbg = 1; + else + toggle_dbg = 0; + + ad->debug_mode = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon_gen), + setting_connectivity_usb_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, toggle_dbg, "IDS_ST_BODY_USB_DEBUGGING", + NULL, setting_connectivity_main_chk_usb_debug_cb); + + if (ad->debug_mode) { + ad->debug_mode->userdata = ad; + button[SETTING_USB_DEBUG_MODE].item = ad->debug_mode->item; + } else { + SETTING_TRACE_ERROR("ad->debug_mode is NULL"); + return SETTING_RETURN_FAIL; } - else { - SETTING_TRACE("Radio set: initial radio\n"); - elm_radio_value_set(ad->chk_con, selMode); + + setting_create_Gendial_field_def(scroller, &(ad->itc_help_style), NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, SETTING_USB_DEBUGGING_DESC, NULL, + NULL); + +#endif + + SETTING_TRACE("Second item of Second group is set\n"); + +#endif + +#if DISABLED_CODE + // [UI] Show CPU Usage + ad->cpu_usage = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon_gen), + setting_connectivity_usb_mouse_up_Gendial_CPU_usage_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, 0, "IDS_ST_MBODY_SHOW_CPU_USAGE", + NULL, setting_connectivity_main_chk_btn_cb); + if (ad->cpu_usage) { + ad->cpu_usage->userdata = ad; + //setting_disable_genlist_item(ad->cpu_usage->item); + } else { + SETTING_TRACE_ERROR("ad->cpu_usage is NULL"); + return SETTING_RETURN_FAIL; + } + + // [UI] help text + setting_create_Gendial_field_def(scroller, &(ad->itc_help_style), NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION, + NULL, NULL, 0, _("IDS_ST_BODY_SCREEN_OVERLAY_SHOWING_CURRENT_CPU_USAGE_ABB"), NULL, + NULL); + + + // Get GPU Rendering state + //SETTING_TRACE(" config_engine_get : %s", elm_config_engine_get()); + const char* engine_str = NULL; + engine_str = elm_config_engine_get(); + int gpu_toggle = -1; + if (engine_str) + { + if ( 0 == strcmp(engine_str, "opengl_x11")) + { + gpu_toggle = 1; + SETTING_TRACE(">>> opengl_11 selected -- ON "); + } else if ( 0 == strcmp(engine_str, "software_x11")) { + gpu_toggle = 0; + SETTING_TRACE(">>> software_11 selected -- OFF "); + } else { + engine_str = "software_x11"; + gpu_toggle = 0; + } + } else { + // abort(); } + // [UI] Force GPU rendering + ad->gpu_render = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon_gen), + setting_connectivity_usb_mouse_up_Gendial_GPU_rendering_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, gpu_toggle, _("IDS_ST_BODY_FORCE_GPU_RENDERING_ABB"), + NULL, setting_connectivity_main_chk_btn_cb); + if (ad->gpu_render ) { + ad->gpu_render->userdata = ad; + //setting_disable_genlist_item(ad->gpu_render->item); + } else { + SETTING_TRACE_ERROR("ad->gpu_render is NULL"); + return SETTING_RETURN_FAIL; + } + + // [UI] help text + setting_create_Gendial_field_def(scroller, &(ad->itc_help_style), NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION, + NULL, NULL, 0, _("IDS_ST_BODY_USE_2D_HARDWARE_ACCELERATION_IN_APPLICATIONS_ABB"), NULL, + NULL); + + // NEWCODE: + setting_enable_expandable_genlist(scroller, ad, __setting_devoptions_main_exp_cb, NULL); + + + // [UI] expandble list - Automatic answering + char *bgproc = get_bg_processes(); + ad->bg_processes = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_ST_BODY_LIMIT_BACKGROUND_PROCESSES", + bgproc); + + // [UI] Limit background processes + if (ad->bg_processes) { + ad->bg_processes->userdata = ad; + ad->bg_processes->int_slp_setting_binded = INT_SLP_SETTING_DEVOPTION_BGPROCESS; + + } else { + SETTING_TRACE_ERROR("ad->bg_processes is NULL"); + return SETTING_RETURN_FAIL; + } + + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + +#endif + //---------------------------------------------------------------------------------------------- /* Registering callback function for VCONFKEY_SETAPPL_USB_MODE_INT */ - vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_USB_MODE_INT, mode_change_vconf_cb, ad); + vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_USB_MODE_INT, current_mode_change_vconf_cb, ad); if(vconf_ret != 0) { SETTING_TRACE("FAIL: vconf_notify_key_changed(VCONFKEY_SETAPPL_USB_MODE_INT)\n"); return SETTING_RETURN_FAIL; } - /* Registering callback function for VCONFKEY_SETAPPL_USB_MODE_INT */ - vconf_ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_USB_STATUS, usb_status_vconf_cb, ad); + /* Registering callback function for VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE */ + vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE, in_mode_change_vconf_cb, ad); if(vconf_ret != 0) { - SETTING_TRACE("FAIL: vconf_notify_key_changed(VCONFKEY_SYSMAN_USB_STATUS)\n"); + SETTING_TRACE("FAIL: vconf_notify_key_changed(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE)\n"); return SETTING_RETURN_FAIL; } - SETTING_TRACE("curMode: %d, selMode: %d\n", curMode, selMode); - - setting_view_connectivity_usb.is_create = 1; - - SETTING_TRACE_END; - return SETTING_RETURN_SUCCESS; -} - -/* check_usb_jack_status() is moved to setting-connectivity.c */ - -/** - * Disable a button (genlist) - * - *@param index - * - *@return - */ -static int disable_glitem(int index) -{ - SETTING_TRACE_BEGIN; - - if (SETTING_USB_DEFAULT_MODE != index && SETTING_USB_DEBUG_MODE != index ) + /* Registering callback function for VCONFKEY_SETAPPL_SELECT_POPUP_BTN_INT */ + vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_SELECT_POPUP_BTN_INT, select_popup_btn_vconf_cb, ad); + if(vconf_ret != 0) { - SETTING_TRACE("ERROR: Item index to disable is invalid.\n"); + SETTING_TRACE("FAIL: vconf_notify_key_changed(VCONFKEY_SETAPPL_SELECT_POPUP_BTN_INT)\n"); return SETTING_RETURN_FAIL; } - elm_object_item_disabled_set(button[index].item, EINA_TRUE); - SETTING_TRACE_END; - return SETTING_RETURN_SUCCESS; -} - -/** - * Disable all buttons except a button whose index is the input value. - * - *@param enable - * - *@return - */ -static int disable_all_buttons(int enable) -{ - SETTING_TRACE_BEGIN; - - if (SETTING_USB_DEFAULT_MODE != enable && SETTING_USB_DEBUG_MODE != enable) + /* Registering callback function for VCONFKEY_SYSMAN_USB_STATUS */ + err = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_USB_CONNECTED, usb_chgdet_cb, ad); + if(err != RUNTIME_INFO_ERROR_NONE) { - SETTING_TRACE("ERROR: Item index to disable is invalid.\n"); + SETTING_TRACE("FAIL: runtime_info_set_changed_cb(RUNTIME_INFO_KEY_USB_CONNECTED, usb_chgdet_cb, ad)\n"); return SETTING_RETURN_FAIL; } - if (enable_glitem(enable) == SETTING_RETURN_FAIL) + SETTING_TRACE("g_curMode: %d, g_selMode: %d\n", g_curMode, g_selMode); + + int val; + vconf_ret = vconf_get_int(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE, &val); + if (vconf_ret == 0 && val == IN_MODE_CHANGE) { - SETTING_TRACE("FAIL: enable_glitem()\n"); - return SETTING_RETURN_FAIL; + SETTING_TRACE("ad->blockUI: EINA_TRUE\n"); + ad->blockUI = EINA_TRUE; } - /* When using y=3-x, we can get y=SETTING_USB_DEFAULT_MODE(=0) with x=SETTING_USB_DEBUG_MODE(=3) - * and y=SETTING_USB_DEBUG_MODE(=3) with x=SETTING_USB_DEFAULT_MODE(=0) */ - if (disable_glitem(SETTING_USB_DEBUG_MODE - enable) == SETTING_RETURN_FAIL) + else /* val == CHANGE_COMPLETE */ { - SETTING_TRACE("FAIL: disable_glitem()\n"); - return SETTING_RETURN_FAIL; + SETTING_TRACE("ad->blockUI: EINA_FALSE\n"); + ad->blockUI = EINA_FALSE; } + setting_view_connectivity_usb.is_create = 1; + SETTING_TRACE_END; return SETTING_RETURN_SUCCESS; } /** - * Enable a button (genlist) + * This callback function is called when USB cable is connected or disconnected + * + *@param data */ -static int enable_glitem(int index) +static void usb_chgdet_cb(runtime_info_key_e key, void *data) { SETTING_TRACE_BEGIN; - if (SETTING_USB_DEFAULT_MODE != index && SETTING_USB_DEBUG_MODE != index) - { - SETTING_TRACE("ERROR: Item index to enable is invalid.\n"); - return SETTING_RETURN_FAIL; - } - - elm_object_item_disabled_set(button[index].item, EINA_FALSE); - SETTING_TRACE_END; - return SETTING_RETURN_SUCCESS; -} + setting_retm_if(NULL == data, "ERROR:The parameter(data) is NULL\n"); + SettingConnectivityUG *ad = (SettingConnectivityUG *)data; -/** - * Enable all buttons. - */ -static void enable_all_buttons() -{ - SETTING_TRACE_BEGIN; + if (USB_DISCONNECTED == check_usb_jack_status()) + { + SETTING_TRACE("USB is disconnected. \n"); - if(SETTING_RETURN_FAIL == enable_glitem(SETTING_USB_DEFAULT_MODE) - || SETTING_RETURN_FAIL == enable_glitem(SETTING_USB_DEBUG_MODE)) + //elm_genlist_item_item_class_update(button[SETTING_USB_DEBUG_MODE].item, &(ad->itc_1text_1icon)); + if (STATE_PROGRESSBAR == button[SETTING_USB_DEBUG_MODE].pstate) + { + button[SETTING_USB_DEBUG_MODE].pstate = STATE_NONE; + //elm_genlist_item_update(button[SETTING_USB_DEBUG_MODE].item); + } + ad->blockUI = EINA_FALSE; + } + else /* USB_CONNECTED == check_usb_jack_status() */ { - SETTING_TRACE("FAIL: enable_glitem()\n"); - return ; + SETTING_TRACE("USB is connected. ad->blockUI = EINA_TRUE\n"); + ad->blockUI = EINA_TRUE; } + unload_popup(ad); SETTING_TRACE_END; } -static void usb_status_vconf_cb(keynode_t *key, void *data) +/** + * This callback function is called when USB-setting changes VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE + * + *@param data + */ +static void in_mode_change_vconf_cb(keynode_t *key, void *data) { SETTING_TRACE_BEGIN; - setting_retm_if(data == NULL, "ERROR:The parameter(data) is NULL\n"); + setting_retm_if(NULL == data, "ERROR:The parameter(data) is NULL\n"); SettingConnectivityUG *ad = (SettingConnectivityUG *) data; + SETTING_TRACE("ad->blockUI: %d\n", ad->blockUI); - int val = -1; + int in_mode_change; int ret = -1; - ret = vconf_get_int(VCONFKEY_SYSMAN_USB_STATUS, &val); - setting_retm_if(ret != 0, "FAIL: vconf_get_int(VCONFKEY_SYSMAN_USB_STATUS)"); - - switch(val) { - case VCONFKEY_SYSMAN_USB_AVAILABLE: - SETTING_TRACE("USB cable is connected\n"); - ad->isUsbConnected = USB_CONNECTED; - - if (IN_CHANGE == in_mode_change) { - SETTING_TRACE("ERROR: Currently, USB mode is being changed. It occurs when USB cable is connected before USB-setting is terminated completely.\n"); - return; - } - ret = vconf_get_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, &selMode); - setting_retm_if(ret != 0, "FAIL: vconf_get_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT)"); - ret = vconf_get_int(VCONFKEY_SETAPPL_USB_MODE_INT, &curMode); - setting_retm_if(ret != 0, "FAIL: vconf_get_int(VCONFKEY_SETAPPL_USB_MODE_INT)"); - if (selMode == curMode) { - SETTING_TRACE("Mode Change completed\n"); - unload_popup(); - return; + ret = vconf_get_int(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE, &in_mode_change); + setting_retm_if (ret != 0, "vconf_get_int(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE\n"); + ret = vconf_get_int (VCONFKEY_SETAPPL_USB_SEL_MODE_INT, &g_selMode); + setting_retm_if (ret != 0, "FAIL: vconf_get_int (VCONFKEY_SETAPPL_USB_SEL_MODE_INT\n"); + + if (CHANGE_COMPLETE == in_mode_change) { + SETTING_TRACE("ad->blockUI: EINA_FALSE\n"); + ad->blockUI = EINA_FALSE; + } else if (IN_MODE_CHANGE == in_mode_change) { + SETTING_TRACE("USB connection mode is changing\n"); + SETTING_TRACE("ad->blockUI: EINA_TRUE\n"); + ad->blockUI = EINA_TRUE; + + //elm_genlist_item_item_class_update(button[SETTING_USB_DEBUG_MODE].item, &(ad->itc_1text_1icon)); + + // toggle + if (SETTING_USB_DEBUG_MODE == g_selMode) { + elm_check_state_set(ad->debug_mode->eo_check, 1); + } else { + elm_check_state_set(ad->debug_mode->eo_check, 0); } - SETTING_TRACE("in_mode_change = IN_CHANGE\n"); - in_mode_change = IN_CHANGE; - - if (SETTING_RETURN_FAIL == disable_all_buttons(selMode)) { - SETTING_TRACE("FAIL: diable_all_buttons()\n"); - return; + // change toggle state + if (SETTING_USB_DEBUG_MODE == g_selMode) { + set_progressbar_status(SETTING_USB_DEBUG_MODE); + } else { + unset_progressbar_status(SETTING_USB_DEBUG_MODE); } - - /* The progressbar of the selected mode should be visible */ - set_progressbar_status(selMode); - - /* When USB cable is connected, the popup should be unloaded after disabling all buttons and loading progress bar */ - unload_popup(); - break; - case VCONFKEY_SYSMAN_USB_DISCONNECTED: - SETTING_TRACE("USB cable is not connected\n"); - - if (USB_CONNECTED == ad->isUsbConnected) { - SETTING_TRACE("in_mode_change = IN_CHANGE\n"); - in_mode_change = IN_CHANGE; - } - else { - SETTING_TRACE("in_mode_change = NO_CHANGE\n"); - in_mode_change = NO_CHANGE; - } - ad->isUsbConnected = USB_DISCONNECTED; - - SETTING_TRACE("Radio set: Disconnecting USB \n"); - elm_radio_value_set(ad->chk_con, SETTING_USB_DEFAULT_MODE); - unset_progressbar_status(selMode); - selMode = SETTING_USB_DEFAULT_MODE; - curMode = SETTING_USB_NONE_MODE; - ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, selMode); - if (ret != 0) - { - SETTING_TRACE("FAIL: setting_get_int_slp_key(INT_SLP_SETTING_USB_MODE)\n"); - } - enable_all_buttons(); - unload_popup(); - break; - default: - break; + unload_popup(ad); + } else { + SETTING_TRACE("Getting in_mode_change failed\n"); } + SETTING_TRACE_END; } /** - * To change the status of progressbars + * To set the status of progressbar + * + * @param mode */ static void set_progressbar_status (int mode) { @@ -568,11 +885,16 @@ static void set_progressbar_status (int mode) /* The progressbar of the selected mode is visible */ SETTING_TRACE("Loading progressbar on btn of %d\n", mode); button[mode].pstate = STATE_PROGRESSBAR; - elm_genlist_item_update(button[mode].item); + //elm_genlist_item_update(button[mode].item); SETTING_TRACE_END; } +/** + * To unset the status of progressbar + * + * @param mode + */ static void unset_progressbar_status (int mode) { SETTING_TRACE_BEGIN; @@ -580,18 +902,57 @@ static void unset_progressbar_status (int mode) /* All progressbars are invisible */ SETTING_TRACE("Unloading progressbar on btn of %d\n", mode); button[mode].pstate = STATE_NONE; - elm_genlist_item_update(button[mode].item); + //elm_genlist_item_update(button[mode].item); SETTING_TRACE_END; } /** * When VCONFKEY_SETAPPL_USB_MODE_INT is changed, all buttons are enabled + * + *@param key + *@param data */ -static void mode_change_vconf_cb(keynode_t *key, void *data) +static void current_mode_change_vconf_cb(keynode_t *key, void *data) { SETTING_TRACE_BEGIN; + setting_retm_if (NULL == data, "ERROR:The parameter(data) is NULL\n"); + SettingConnectivityUG *ad = (SettingConnectivityUG *)data; + + int ret = -1; + + /* Get g_curMode and g_selMode */ + ret = vconf_get_int(VCONFKEY_SETAPPL_USB_MODE_INT, &g_curMode); + setting_retm_if (ret != 0, "ERROR: vconf_get_int(VCONFKEY_SETAPPL_USB_MODE_INT)"); + ret = vconf_get_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, &g_selMode); + setting_retm_if (ret != 0, "ERROR: vconf_get_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT)"); + SETTING_TRACE("g_curMode: %d, g_selMode: %d\n", g_curMode, g_selMode); + + unset_progressbar_status(SETTING_USB_DEBUG_MODE); + if (SETTING_USB_DEBUG_MODE == g_curMode) { + //elm_genlist_item_item_class_update(button[SETTING_USB_DEBUG_MODE].item, &(ad->itc_2text_3)); + elm_check_state_set(ad->debug_mode->eo_check, 1); + } else { + //elm_genlist_item_item_class_update(button[SETTING_USB_DEBUG_MODE].item, &(ad->itc_1text_1icon)); + elm_check_state_set(ad->debug_mode->eo_check, 0); + } + /* Unblock setting UI */ + SETTING_TRACE("ad->blockUI: EINA_FALSE\n"); + ad->blockUI = EINA_FALSE; + + SETTING_TRACE_END; +} + +/** + * When a button on a popup of USB-syspopup is cllicked, this callback is called + * + *@param key + *@param data + */ +static void select_popup_btn_vconf_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; if(data == NULL) { SETTING_TRACE("ERROR:The parameter(data) is NULL\n"); @@ -599,54 +960,26 @@ static void mode_change_vconf_cb(keynode_t *key, void *data) } SettingConnectivityUG *ad = (SettingConnectivityUG *)data; - int value = -1; int ret = -1; - - SETTING_TRACE("curMode: %d, selMode: %d\n", curMode, selMode); - ret = vconf_get_int(VCONFKEY_SETAPPL_USB_MODE_INT, &value); - if (ret != 0) - { - SETTING_TRACE("ERROR: vconf_get_int(VCONFKEY_SETAPPL_USB_MODE_INT)"); - return; - } - - /* When USB cable is connected, current mode is changed to selected mode. - * When USB cable is not connceted, current mode is SETTING_USB_NONE_MODE. */ - ad->isUsbConnected = check_usb_jack_status(); - if (ad->isUsbConnected == USB_CONNECTED) - { - /* The progressbar of the selected mode is visible */ - unset_progressbar_status(selMode); - - /* The radio box is updated */ - if (curMode != SETTING_USB_NONE_MODE) - elm_genlist_item_update(button[curMode].item); - else - elm_genlist_item_update(button[SETTING_USB_DEFAULT_MODE].item); - SETTING_TRACE("Radio set: When current mode is changed with connected USB\n"); - elm_radio_value_set(ad->chk_con, selMode); - - /* update the curMode state */ - curMode = value; + int value = -1; - /* All buttons are enabled */ - enable_all_buttons(); - } - else /* If USB cable is disconnected, current mode is none */ + ret = vconf_get_int(VCONFKEY_SETAPPL_SELECT_POPUP_BTN_INT, &value); + if (ret != 0) { - curMode = SETTING_USB_NONE_MODE; + SETTING_TRACE("FAIL: vconf_get_int(VCONFKEY_SETAPPL_SELECT_POPUP_BTN_INT) \n"); + return ; } - SETTING_TRACE("in_mode_change = NO_CHANGE\n"); - in_mode_change = NO_CHANGE; - - SETTING_TRACE("curMode: %d, selMode: %d\n", curMode, selMode); - + if (USB_BTN_NO == value) ad->blockUI = EINA_FALSE; SETTING_TRACE_END; } /** * To destory the view of usb + * + *@param cb + * + *@return */ static int setting_connectivity_usb_destroy(void *cb) { @@ -659,20 +992,35 @@ static int setting_connectivity_usb_destroy(void *cb) int num_err = 0; /* Removing the popup if the popup is loaded */ - unload_popup(); + unload_popup(ad); win_main = NULL; /* Closing vconf trace */ - vconf_ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_USB_MODE_INT, mode_change_vconf_cb); + vconf_ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_USB_MODE_INT, current_mode_change_vconf_cb); if (vconf_ret != 0) { SETTING_TRACE("FAIL: vconf_ignore_key_changed(VCONFKEY_SETAPPL_USB_MODE_INT)\n"); num_err++; } - vconf_ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_USB_STATUS, usb_status_vconf_cb); + + vconf_ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE, in_mode_change_vconf_cb); if (vconf_ret != 0) { - SETTING_TRACE("FAIL: vconf_ignore_key_changed(VCONFKEY_SYSMAN_USB_STATUS)\n"); + SETTING_TRACE("FAIL: vconf_ignore_key_changed(VCONFKEY_SETAPPL_USB_MODE_INT)\n"); + num_err++; + } + + vconf_ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_SELECT_POPUP_BTN_INT, select_popup_btn_vconf_cb); + if (vconf_ret != 0) + { + SETTING_TRACE("FAIL: vconf_ignore_key_changed(VCONFKEY_SETAPPL_SELECT_POPUP_BTN_INT)\n"); + num_err++; + } + + vconf_ret = runtime_info_unset_changed_cb(RUNTIME_INFO_KEY_USB_CONNECTED); + if (vconf_ret != RUNTIME_INFO_ERROR_NONE) + { + SETTING_TRACE("FAIL: runtime_info_unset_changed_cb(RUNTIME_INFO_KEY_USB_CONNECTED)\n"); num_err++; } @@ -696,6 +1044,10 @@ static int setting_connectivity_usb_destroy(void *cb) /** * To update the view of usb + * + *@param cb + * + *@return */ static int setting_connectivity_usb_update(void *cb) { @@ -703,27 +1055,9 @@ static int setting_connectivity_usb_update(void *cb) /* error check */ retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); SettingConnectivityUG *ad = (SettingConnectivityUG *) cb; - int ret; if (ad->ly_usb != NULL) { evas_object_show(ad->ly_usb); - - ret = vconf_get_int(VCONFKEY_SETAPPL_USB_MODE_INT, &curMode); - setting_retvm_if(ret != 0, SETTING_RETURN_FAIL, "FAIL: vconf_get_int(VCONFKEY_SETAPPL_USB_MODE_INT"); - if (SETTING_USB_NONE_MODE == curMode) - { - ret = vconf_get_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, &selMode); - setting_retvm_if(ret != 0, SETTING_RETURN_FAIL, "FAIL: vconf_get_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT"); - SETTING_TRACE("Radio set: when updating view \n"); - elm_radio_value_set(ad->chk_con, selMode); - } - else /* curMode != SETTING_USB_NONE_MODE */ - { - SETTING_TRACE("Radio set: when updating view \n"); - elm_radio_value_set(ad->chk_con, curMode); - } - - } SETTING_TRACE_END; return SETTING_RETURN_SUCCESS; @@ -731,14 +1065,24 @@ static int setting_connectivity_usb_update(void *cb) /** * To cleanup the view of usb + * + *@param cb + * + *@return */ static int setting_connectivity_usb_cleanup(void *cb) { + SETTING_TRACE_BEGIN; + SETTING_TRACE_END; return SETTING_RETURN_SUCCESS; } /** * Do process when clicking '<-' button + * + *@param data + *@param obj + *@param event_info */ static void setting_connectivity_usb_click_softkey_cancel_cb(void *data, Evas_Object *obj, @@ -750,14 +1094,21 @@ setting_connectivity_usb_click_softkey_cancel_cb(void *data, Evas_Object *obj, SettingConnectivityUG *ad = (SettingConnectivityUG *) data; + /* Not to block back(->) button */ /* Send destroy request */ ug_destroy_me(ad->ug); + SETTING_TRACE_END; } /** * Do process when clicking 'Help' button + * + *@param data + *@param obj + *@param event_info */ +#ifdef HELP_UG_EXIST static void setting_connectivity_usb_click_softkey_set_cb(void *data, Evas_Object *obj, void *event_info) @@ -773,6 +1124,7 @@ setting_connectivity_usb_click_softkey_set_cb(void *data, Evas_Object *obj, &setting_view_connectivity_usb_help, ad); SETTING_TRACE_END; } +#endif /** @@ -780,13 +1132,24 @@ setting_connectivity_usb_click_softkey_set_cb(void *data, Evas_Object *obj, */ /** - * unload popup + * unload popup */ -static void unload_popup() +// SettingConnectivityUG *ad = (SettingConnectivityUG *)data; +static void unload_popup(void* data) { SETTING_TRACE_BEGIN; - - if (popup_eo != NULL) + SettingConnectivityUG *ad = (SettingConnectivityUG *)data; + + //ad->pop + if (ad->pop) + { + evas_object_del(ad->pop); + ad->pop = NULL; + } else { + SETTING_TRACE("ad->pop == NULL\n"); + } + + if (popup_eo != NULL) { SETTING_TRACE("evas_object_del(popup_eo)\n"); evas_object_del(popup_eo); @@ -796,7 +1159,7 @@ static void unload_popup() { SETTING_TRACE("popup_eo == NULL\n"); } - + SETTING_TRACE_END; } @@ -806,45 +1169,55 @@ static void unload_popup() static void usb_connection_response_cb(void *data, Evas_Object *obj, void *event_info) { SETTING_TRACE_BEGIN; - setting_retm_if(!data, "ERROR: The parameter is NULL\n"); - Evas_Object *radio = data; int ret = -1; - curMode = SETTING_USB_NONE_MODE; - selMode = SETTING_USB_DEFAULT_MODE; - ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, selMode); + SettingConnectivityUG *ad = (SettingConnectivityUG *)data; + + g_curMode = SETTING_USB_NONE_MODE; + g_selMode = SETTING_USB_SAMSUNG_KIES; + ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, g_selMode); setting_retm_if(ret != 0, "vconf_set_int(VCONF_SETAPPL_USB_SEL_MODE_INT)\n"); - SETTING_TRACE("Radio set: When cancel btn is clicked\n"); - elm_radio_value_set(radio, selMode); - unload_popup(); + unload_popup(ad); SETTING_TRACE_END; } /** - * When a button on USB utilities is pushed, + * When a button on USB utilities is pushed, * this function makes a popup if USB cable is not connected */ -void load_usb_connection_popup(Evas_Object *radio) +void load_usb_connection_popup(void* data) { SETTING_TRACE_BEGIN; - setting_retm_if(!radio, "ERROR: The parameter is NULL\n"); - unload_popup(); + int ret; + SettingConnectivityUG *ad = (SettingConnectivityUG *)data; + + unload_popup(ad); + switch(g_selMode) + { + default: + popup_msg = _("IDS_ST_POP_CONNECT_TO_PC_USB_DEBUGGING_WILL_BE_DISABLED_AUTOMATICALLY_AFTER_USE"); + popup_title = _("IDS_ST_BODY_USB_DEBUGGING"); + // SET TO "DEBUG MODE" + ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, SETTING_USB_DEBUG_MODE); + break; + } - //popup_eo = elm_popup_with_buttons_add(win_main, popup_title, popup_msg, 1, _("IDS_COM_SK_CANCEL"), -10, NULL); - //evas_object_smart_callback_add(popup_eo, "response", usb_connection_response_cb, NULL); popup_eo = elm_popup_add(win_main); - elm_object_part_text_set(popup_eo, "title,text", _("IDS_ST_BODY_USB_DEBUGGING")); - elm_object_text_set(popup_eo, _("IDS_ST_POP_CONNECT_TO_PC_USB_DEBUGGING_WILL_BE_DISABLED_AUTOMATICALLY_AFTER_USE")); - Evas_Object *btn = setting_create_button(win_main, _("IDS_COM_SK_CANCEL"), NULL, usb_connection_response_cb, radio); - elm_object_part_content_set(popup_eo, "button1", btn); + elm_object_part_text_set(popup_eo, "title,text", popup_title); + elm_object_text_set(popup_eo, popup_msg); + Evas_Object *btn = setting_create_button(win_main, _("IDS_COM_SK_CANCEL"), NULL, usb_connection_response_cb, ad); + elm_object_part_content_set(popup_eo, "button1", btn); evas_object_show(popup_eo); + popup_msg = NULL; + popup_title = NULL; if (popup_eo == NULL) - SETTING_TRACE( "ERROR: ad->popup_eo is NULL \n"); + SETTING_TRACE( "ERROR: ad->popup_eo is NULL \n"); if (win_main == NULL) - SETTING_TRACE( "ERROR: ad->win_main is NULL \n"); + SETTING_TRACE( "ERROR: ad->win_main is NULL \n"); SETTING_TRACE_END; } + diff --git a/setting-connectivity/src/setting-connectivity.c b/setting-connectivity/src/setting-connectivity.c index 6643c0c..43ce75e 100755 --- a/setting-connectivity/src/setting-connectivity.c +++ b/setting-connectivity/src/setting-connectivity.c @@ -1,19 +1,28 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +/** + *@defgroup setting-connectivity + *UG creation code for setting-connectivity + */ #include #include @@ -22,13 +31,17 @@ #define UG_MODULE_API __attribute__ ((visibility("default"))) #endif -#define SETTING_USB_DEFAULT_MODE 0 +#define USB_BTN_NO 0 -setting_view *__get_connective_view_to_load(bundle *data) +setting_view *__get_connective_view_to_load(service_h service) { SETTING_TRACE_BEGIN; - setting_retvm_if(NULL == data, NULL, "NULL == data"); - const char *viewtype = bundle_get_val(data, "viewtype"); + char *viewtype = NULL; + + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + SETTING_TRACE("viewtype:%s", viewtype); if (!safeStrCmp(viewtype, "usb")) { @@ -39,17 +52,20 @@ setting_view *__get_connective_view_to_load(bundle *data) } -Evas_Object *__get_connective_layout_to_return(bundle *data, void *priv) +Evas_Object *__get_connective_layout_to_return(service_h service, void *priv) { SETTING_TRACE_BEGIN; SettingConnectivityUG *connectiveUG = priv; - const char *viewtype = bundle_get_val(data, "viewtype"); + char *viewtype = NULL; + + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + SETTING_TRACE("viewtype:%s", viewtype); if (!safeStrCmp(viewtype, "usb")) { return connectiveUG->ly_usb; - } else if (!safeStrCmp(viewtype, "tvout")) { - return connectiveUG->ly_tvout; } else { return NULL; /* &setting_view_connective_main; */ } @@ -64,11 +80,11 @@ static void setting_connective_ug_cb_resize(void *data, Evas *e, setting_view_update(ad->view_to_load, ad); } -static void *setting_connective_ug_on_create(struct ui_gadget *ug, - enum ug_mode mode, bundle *data, +static void *setting_connective_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, void *priv) { - setting_retvm_if((!ug || !priv), NULL, "!ug || !priv"); + setting_retvm_if((!priv), NULL, "!priv"); SettingConnectivityUG *connectiveUG = priv; connectiveUG->ug = ug; @@ -91,21 +107,24 @@ static void *setting_connective_ug_on_create(struct ui_gadget *ug, &setting_view_connectivity_usb); /* creating a view. */ - setting_create_Gendial_itc("dialogue/1text.1icon.2", - &(connectiveUG->itc_1text_1icon_2)); - setting_create_Gendial_itc("dialogue/2text.3", - &(connectiveUG->itc_2text_2)); + setting_create_Gendial_itc("dialogue/title", &(connectiveUG->itc_title)); + setting_create_Gendial_itc("dialogue/1text", &(connectiveUG->itc_1text)); + setting_create_Gendial_itc("dialogue/1text.1icon", &(connectiveUG->itc_1text_1icon)); + setting_create_Gendial_itc("dialogue/1text.1icon", &(connectiveUG->itc_1text_1icon_gen)); /* toggle */ + setting_create_Gendial_itc("dialogue/2text.3", &(connectiveUG->itc_2text_3)); + setting_create_Gendial_itc("dialogue/2text.3/expandable", &(connectiveUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", &(connectiveUG->itc_1icon_1text_sub)); + setting_create_Gendial_itc("multiline/1text", &(connectiveUG->itc_help_style)); + connectiveUG->itc_seperator.item_style = "dialogue/separator/21/with_line"; connectiveUG->itc_seperator.func.text_get = NULL; connectiveUG->itc_seperator.func.content_get = NULL; connectiveUG->itc_seperator.func.state_get = NULL; connectiveUG->itc_seperator.func.del = NULL; - setting_create_Gendial_itc("multiline/1text", - &(connectiveUG->itc_help_style)); - - connectiveUG->view_to_load = __get_connective_view_to_load(data); + + connectiveUG->view_to_load = __get_connective_view_to_load(service); setting_retvm_if(NULL == connectiveUG->view_to_load, NULL, "NULL == connectiveUG->view_to_load"); setting_view_node_set_cur_view(connectiveUG->view_to_load); @@ -114,29 +133,29 @@ static void *setting_connective_ug_on_create(struct ui_gadget *ug, EVAS_CALLBACK_RESIZE, setting_connective_ug_cb_resize, connectiveUG); - return __get_connective_layout_to_return(data, connectiveUG); + return __get_connective_layout_to_return(service, connectiveUG); } -static void setting_connective_ug_on_start(struct ui_gadget *ug, bundle *data, +static void setting_connective_ug_on_start(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_connective_ug_on_pause(struct ui_gadget *ug, bundle *data, +static void setting_connective_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_connective_ug_on_resume(struct ui_gadget *ug, bundle *data, +static void setting_connective_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_connective_ug_on_destroy(struct ui_gadget *ug, - bundle *data, void *priv) +static void setting_connective_ug_on_destroy(ui_gadget_h ug, + service_h service, void *priv) { SETTING_TRACE_BEGIN; - setting_retm_if((!ug || !priv), "!ug || !priv"); + setting_retm_if((!priv), "!priv"); SettingConnectivityUG *connectiveUG = priv; evas_object_event_callback_del(connectiveUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_connective_ug_cb_resize); /* fix flash issue for gallery */ @@ -158,23 +177,36 @@ static void setting_connective_ug_on_destroy(struct ui_gadget *ug, } int ret = check_usb_jack_status(); - if (ret == USB_DISCONNECTED) /* USB cable is not connected */ + if (ret == USB_CONNECTED) /* USB cable is connected */ + { + SETTING_TRACE("USB cable is connected\n"); + /* If kill_apps_popup is loaded, no btn is pushed when Setting is terminated*/ + ret = vconf_set_int(VCONFKEY_SETAPPL_SELECT_POPUP_BTN_INT, USB_BTN_NO); + if ( ret != 0) + { + SETTING_TRACE("FAIL: vconf_set_int(VCONFKEY_SETAPPL_SELECT_POPUP_BTN_INT)\n"); + } + } + else if (ret == USB_DISCONNECTED) /* USB cable is not connected */ { SETTING_TRACE("USB cable is not connected\n"); set_usb_mode_default(); } - + else + { + SETTING_TRACE("FAIL: check_usb_jack_status()\n"); + } SETTING_TRACE_END; } -static void setting_connective_ug_on_message(struct ui_gadget *ug, bundle *msg, - bundle *data, void *priv) +static void setting_connective_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) { SETTING_TRACE_BEGIN; } -static void setting_connective_ug_on_event(struct ui_gadget *ug, - enum ug_event event, bundle *data, +static void setting_connective_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, void *priv) { SETTING_TRACE_BEGIN; @@ -200,14 +232,12 @@ static void setting_connective_ug_on_event(struct ui_gadget *ug, } } -static void setting_connective_ug_on_key_event(struct ui_gadget *ug, +static void setting_connective_ug_on_key_event(ui_gadget_h ug, enum ug_key_event event, - bundle *data, void *priv) + service_h service, void *priv) { SETTING_TRACE_BEGIN; SettingConnectivityUG *ad = (SettingConnectivityUG *) priv; - if (!ug) - return; switch (event) { case UG_KEY_EVENT_END: @@ -261,23 +291,27 @@ UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) } /*****/ -UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) { SETTING_TRACE_BEGIN; int ret = 0; - const char *ug_type = bundle_get_val(data, "viewtype"); /* usb */ + char *ug_type = NULL; + + service_get_extra_data(service, "viewtype", &ug_type); + if(!ug_type) + return -1; + if (0 == safeStrCmp(ug_type, "usb")) { /* usb */ #if SUPPORT_RUN_SYSTEM_COMMAND - ret += excuteCmd(SETTING_POSTINST_FILE, 1, "usbconnectivity"); + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "usbconnectivity"); #else - ret += vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, SETTING_USB_DEFAULT_MODE); + ret += vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, SETTING_USB_SAMSUNG_KIES); /* Resetting VCONFKEY_SETAPPL_USB_MODE_INT (current mode) is not necessary. * If USB cable is removed, the key value is SETTING_USB_NONE_MODE by USB-setting. * If USB cable is connected, the key value is changed by selected mode. */ - ret += vconf_set_int(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE, NO_CHANGE); - ret += vconf_set_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE, FALSE); + ret += vconf_set_int(VCONFKEY_SETAPPL_USB_IN_MODE_CHANGE, CHANGE_COMPLETE); #endif } return ret; @@ -291,30 +325,25 @@ UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) int check_usb_jack_status() { SETTING_TRACE_BEGIN; - int jack_status = -1; - if (device_get_property(DEVTYPE_JACK, JACK_PROP_USB_ONLINE, &jack_status) == 0 && jack_status == 1) { - SETTING_TRACE("jack_status: %d", jack_status); + bool usb_connection = false; + int ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_USB_CONNECTED, &usb_connection); + if (ret == RUNTIME_INFO_ERROR_NONE && usb_connection == true) { SETTING_TRACE_END; return USB_CONNECTED; /* USB is connected */ - } - else { - SETTING_TRACE("jack_status: %d", jack_status); + } else { SETTING_TRACE_END; return USB_DISCONNECTED; /* USB is disconnected */ } } /** - * This function sets USB mode to Default USB mode + * This function sets USB mode to KIES mode */ void set_usb_mode_default() { + SETTING_TRACE_BEGIN; int ret = -1; - - /* USB mode is changed to default USB mode */ - ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, SETTING_USB_DEFAULT_MODE); - if ( ret != 0) - { - SETTING_TRACE("FAIL: vconf_set_int(VCONFKEY_SETAPPL_USB_MODE_INT)\n"); - } + + ret = vconf_set_int(VCONFKEY_SETAPPL_USB_SEL_MODE_INT, SETTING_USB_SAMSUNG_KIES); + SETTING_TRACE_END; } diff --git a/setting-datausage/CMakeLists.txt b/setting-datausage/CMakeLists.txt new file mode 100755 index 0000000..af60989 --- /dev/null +++ b/setting-datausage/CMakeLists.txt @@ -0,0 +1,35 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_datausage REQUIRED ecore ecore-file evas elementary appcore-common appcore-efl ui-gadget-1 capi-appfw-application sysman cairo) + +FOREACH(flag ${pkgs_datausage_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_DATAUSAGE_UG} SHARED + ./src/setting-datausage.c + ./src/setting-datausage-main.c + ./src/setting-datausage-more-setting.c + ./src/setting-datausage-change-cycle.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_DATAUSAGE_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_DATAUSAGE_UG} ${pkgs_datausage_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_DATAUSAGE_UG} DESTINATION /opt/ug/lib) diff --git a/setting-datausage/include/setting-datausage-change-cycle.h b/setting-datausage/include/setting-datausage-change-cycle.h new file mode 100755 index 0000000..ebf8645 --- /dev/null +++ b/setting-datausage/include/setting-datausage-change-cycle.h @@ -0,0 +1,28 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_DATAUSAGE_CHANGE_CYCLE_H__ +#define __SETTING_DATAUSAGE_CHANGE_CYCLE_H__ + +#include + +static void __setting_datausage_change_cycle_back_cb(void *data, Evas_Object * obj, void *event_info); + +#endif /* __SETTING_DATAUSAGE_CHANGE_CYCLE_H__ */ diff --git a/setting-datausage/include/setting-datausage-main.h b/setting-datausage/include/setting-datausage-main.h new file mode 100755 index 0000000..d3dc8bb --- /dev/null +++ b/setting-datausage/include/setting-datausage-main.h @@ -0,0 +1,29 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_DATAUSAGE_MAIN_H__ +#define __SETTING_DATAUSAGE_MAIN_H__ + +#include + +#define SETTING_DATAUSAGE_DESC_LEN_MAX 256 + + +#endif /* __SETTING_DATAUSAGE_MAIN_H__ */ diff --git a/setting-datausage/include/setting-datausage-more-setting.h b/setting-datausage/include/setting-datausage-more-setting.h new file mode 100755 index 0000000..ca8c3c0 --- /dev/null +++ b/setting-datausage/include/setting-datausage-more-setting.h @@ -0,0 +1,29 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_DATAUSAGE_MORE_SETTING_H__ +#define __SETTING_DATAUSAGE_MORE_SETTING_H__ + +#include + +static void __setting_datausage_more_setting_back_cb(void *data, Evas_Object * obj, void *event_info); +static void __setting_datausage_more_setting_mouse_up_cb(void *data, Evas_Object *obj, void *event_info); + +#endif /* __SETTING_DATAUSAGE_MORE_SETTING_H__ */ diff --git a/setting-datausage/include/setting-datausage.h b/setting-datausage/include/setting-datausage.h new file mode 100755 index 0000000..bf4bb96 --- /dev/null +++ b/setting-datausage/include/setting-datausage.h @@ -0,0 +1,108 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_DATAUSAGE_H__ +#define __SETTING_DATAUSAGE_H__ + +#include +#include + +#include + +#include +#include + +#include + +#define SETTING_DATAUSAGE_DATA_ROAMING_STR "IDS_ST_BODY_DATA_ROAMING" +#define SETTING_DATAUSAGE_RESTRICT_BACKGROUND_STR "Restrict background data" +#define SETTING_DATAUSAGE_SHOW_WIFI_STR "Show Wi-Fi usage" + +#define SETTING_DATAUSAGE_ON_THIS_DATE_EACH_MONTH_STR "On this date each month" + +#define SETTING_DATAUSAGE_MOBILE_DATA_STR "IDS_ST_MBODY_MOBILE_DATA" +#define SETTING_DATAUSAGE_DISABLE_MOBILE_DATA_STR "Disable mobile data at limit" +#define SETTING_DATAUSAGE_DATA_USAGE_CYCLE_STR "IDS_ST_MTODY_DATA_USAGE_CYCLE" +#define SETTING_DATAUSAGE_CHANGE_CYCLE_STR "IDS_ST_BODY_CHANGE_CYCLE" +#define SETTING_DATAUSAGE_MORE_SETTING_STR "More data usage setting" +#define SETTING_DATAUSAGE_GRAPH_DESC_STR "%s : About %s used" +#define SETTING_DATAUSAGE_DESC_STR "Measured by your phone. Your carrier's data usage accounting may differ." + + +typedef struct _SettingDatausageUG SettingDatausageUG; + +/** + * Setting Datausage UG context + * all UG function has void* as an agument. this is casted back to SettingDatausageUG + * and the functions access app context. + */ +struct _SettingDatausageUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + + Evas_Object *ly_main; + + Evas_Object *genlist; + Evas_Object *layout; + Evas_Object *navibar; + + setting_view *view_to_load; + + /* datausage setting */ + Evas_Object *popup; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + Elm_Genlist_Item_Class itc_1text_1icon_2; + Elm_Genlist_Item_Class itc_1text_1icon; + Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_1text; + Elm_Genlist_Item_Class itc_group_item; + Elm_Genlist_Item_Class itc_bg_1icon; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_variable_height; + Elm_Genlist_Item_Class itc_layout; + + Setting_GenGroupItem_Data *mobile_data; + Setting_GenGroupItem_Data *disable_mobile_data; + Setting_GenGroupItem_Data *data_usage_cycle; + Setting_GenGroupItem_Data *change_cycle; + Setting_GenGroupItem_Data *more_setting; + Setting_GenGroupItem_Data *graph_image; + Setting_GenGroupItem_Data *graph_desc; + + Setting_GenGroupItem_Data *data_roaming; + Setting_GenGroupItem_Data *restrict_bg; + Setting_GenGroupItem_Data *show_wifi; + + Setting_GenGroupItem_Data *change_data; + + cairo_surface_t *cairo_surface; + cairo_t *cr; +}; + +extern setting_view setting_view_datausage_main; +extern setting_view setting_view_datausage_more_setting; +extern setting_view setting_view_datausage_change_cycle; + +#endif /* __SETTING_DATAUSAGE_H__ */ diff --git a/setting-datausage/src/setting-datausage-change-cycle.c b/setting-datausage/src/setting-datausage-change-cycle.c new file mode 100755 index 0000000..39cc9fc --- /dev/null +++ b/setting-datausage/src/setting-datausage-change-cycle.c @@ -0,0 +1,208 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#include + +static int __setting_datausage_change_cycle_create(void *cb); +static int __setting_datausage_change_cycle_destroy(void *cb); +static int __setting_datausage_change_cycle_update(void *cb); +static int __setting_datausage_change_cycle_cleanup(void *cb); + +setting_view setting_view_datausage_change_cycle = { + .create = __setting_datausage_change_cycle_create, + .destroy = __setting_datausage_change_cycle_destroy, + .update = __setting_datausage_change_cycle_update, + .cleanup = __setting_datausage_change_cycle_cleanup, +}; + +static char *_item_label_get(void *data, Evas_Object *obj, const char *part) +{ + SETTING_TRACE_BEGIN; + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + + if (!safeStrCmp(part, "elm.text") || !safeStrCmp(part, "elm.text.1")) { /* title */ + if (item_data->keyStr) { + return (char *)g_strdup(_(item_data->keyStr)); + } + } else if (!safeStrCmp(part, "elm.text.2")) { /* bottom or right */ + if (item_data->sub_desc) { + return (char *)g_strdup(item_data->sub_desc); + } + } + + + return NULL; +} + +static Evas_Object *_item_content_get(void *data, Evas_Object *obj, const char *part) +{ + SETTING_TRACE_BEGIN; + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + //int width = (int) (690 * elm_scale_get()); + + if (!safeStrCmp(part, "elm.icon") || !safeStrCmp(part, "elm.icon.1")) { + Evas_Object *datetimefield = elm_datetime_add(obj); + item_data->eo_check = datetimefield; + + elm_datetime_field_visible_set(datetimefield, ELM_DATETIME_YEAR, EINA_FALSE); + elm_datetime_field_visible_set(datetimefield, ELM_DATETIME_MONTH, EINA_FALSE); + elm_datetime_field_visible_set(datetimefield, ELM_DATETIME_HOUR, EINA_FALSE); + elm_datetime_field_visible_set(datetimefield, ELM_DATETIME_MINUTE, EINA_FALSE); + elm_datetime_field_visible_set(datetimefield, ELM_DATETIME_AMPM, EINA_FALSE); + + evas_object_size_hint_weight_set(datetimefield, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(datetimefield, 0.5, 0.5); + evas_object_show(datetimefield); + + char date_format[MAX_DATETIME_FORMAT_LEN + 1] = {0, }; + const char *time_format = "%H : %M"; + + snprintf(date_format, MAX_DATETIME_FORMAT_LEN, + "%s %s", item_data->sub_desc, time_format); + elm_datetime_format_set(datetimefield, date_format); + + struct tm ts_ret; + time_t ctime = time(NULL); + struct tm *ts = localtime_r(&ctime, &ts_ret); + retv_if(!ts, NULL); + ts_ret.tm_mday = item_data->chk_status; + + elm_datetime_value_set(datetimefield, &ts_ret); + + if (item_data->chk_change_cb) { + evas_object_smart_callback_add(datetimefield, "changed", + item_data->chk_change_cb, item_data); + } + return datetimefield; + } + + return NULL; +} + +static void _item_del(void *data, Evas_Object *obj) +{ + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + if (item_data) { + G_FREE(item_data->keyStr); + G_FREE(item_data->sub_desc); + FREE(item_data); + } +} + +/* *************************************************** +** +** basic func +** +** **************************************************/ + +static int __setting_datausage_change_cycle_create(void *cb) +{ + SETTING_TRACE_BEGIN; + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + Evas_Object *scroller; + + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(SETTING_DATAUSAGE_CHANGE_CYCLE_STR), + _("IDS_COM_BODY_BACK"), + NULL, + __setting_datausage_change_cycle_back_cb, + NULL, + ad, &scroller, ad->navibar); + + setting_retvm_if(scroller == NULL, SETTING_RETURN_FAIL, "scroller is NULL"); + + Elm_Object_Item *item = NULL;; + + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->itc_layout.item_style = "dialogue/1text.1icon.5"; + ad->itc_layout.func.text_get = _item_label_get; + ad->itc_layout.func.content_get = _item_content_get; + ad->itc_layout.func.state_get = NULL; + ad->itc_layout.func.del = _item_del; + + + int value = 0; + int err = 0; + int ret = 0; + + ret = setting_get_int_slp_key(INT_SLP_SETTING_DATAUSAGE_DATA_EACH_MONTH_INT, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + ad->change_data = setting_create_Gendial_field_def(scroller, &(ad->itc_layout), + NULL, + ad, SWALLOW_Type_LAYOUT_DATEFIELD, + NULL, NULL, value, + SETTING_DATAUSAGE_ON_THIS_DATE_EACH_MONTH_STR, + "%Y %b %d", + NULL); + + setting_view_datausage_change_cycle.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int __setting_datausage_change_cycle_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + + elm_naviframe_item_pop(ad->navibar); + setting_view_datausage_change_cycle.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int __setting_datausage_change_cycle_update(void *cb) +{ + SETTING_TRACE_BEGIN; + return SETTING_RETURN_SUCCESS; +} + +static int __setting_datausage_change_cycle_cleanup(void *cb) +{ + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + __setting_datausage_change_cycle_destroy(cb); + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** +** +** call back func +** +** **************************************************/ +static void __setting_datausage_change_cycle_back_cb(void *data, Evas_Object * obj, void *event_info) +{ + //error check + ret_if(data == NULL); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + setting_view_change(&setting_view_datausage_change_cycle, &setting_view_datausage_main, ad); +} diff --git a/setting-datausage/src/setting-datausage-main.c b/setting-datausage/src/setting-datausage-main.c new file mode 100755 index 0000000..181bc01 --- /dev/null +++ b/setting-datausage/src/setting-datausage-main.c @@ -0,0 +1,484 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include + +#define SETTING_DATAUSAGE_GRAPH_W ((int)720 * WIDGET_SCALE_FACTOR) +#define SETTING_DATAUSAGE_GRAPH_H ((int)320 * WIDGET_SCALE_FACTOR) + +#define SETTING_DATAUSAGE_CAIRO_W 720 +#define SETTING_DATAUSAGE_CAIRO_H 320 + +#define SETTING_DATAUSAGE_HEAD_POINT_X 30 +#define SETTING_DATAUSAGE_HEAD_POINT_Y 50 + +#define SETTING_DATAUSAGE_INTERVAL 50 + +#define SETTING_DATAUSAGE_CHART_WIDTH 600 +#define SETTING_DATAUSAGE_CHART_HEIGHT 200 + +static int setting_datausage_main_create(void *cb); +static int setting_datausage_main_destroy(void *cb); +static int setting_datausage_main_update(void *cb); +static int setting_datausage_main_cleanup(void *cb); + +static void __setting_datausage_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info); + +setting_view setting_view_datausage_main = { + .create = setting_datausage_main_create, + .destroy = setting_datausage_main_destroy, + .update = setting_datausage_main_update, + .cleanup = setting_datausage_main_cleanup, +}; + +static void __setting_datausage_main_pie_graph(Evas_Object *parent, const char* part, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(parent == NULL, "parent is NULL"); + setting_retm_if(data == NULL, "data is NULL"); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + Evas* evas = evas_object_evas_get(parent); + setting_retm_if(evas == NULL, "evas is NULL"); + + Evas_Object *clip = evas_object_rectangle_add(evas); + evas_object_color_set(clip, 255, 255, 255, 255); + + Evas_Object *pie_image_object = evas_object_image_add(evas); + setting_retm_if(pie_image_object == NULL, "pie_image_object is NULL"); + evas_object_color_set(pie_image_object, 255, 255, 255, 250); + evas_object_clip_set(pie_image_object, clip); + evas_object_show(pie_image_object); + + evas_object_resize(clip, SETTING_DATAUSAGE_GRAPH_W , SETTING_DATAUSAGE_GRAPH_H); + evas_object_resize(pie_image_object, SETTING_DATAUSAGE_GRAPH_W, SETTING_DATAUSAGE_GRAPH_H); + + elm_object_part_content_set(parent, part, pie_image_object); + + int cairo_w = SETTING_DATAUSAGE_CAIRO_W; + int cairo_h = SETTING_DATAUSAGE_CAIRO_H; + if (ad->cairo_surface == NULL) { + ad->cairo_surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, cairo_w, cairo_h); + setting_retm_if(ad->cairo_surface == NULL, "ad->cairo_surface is NULL"); + } + + // scale cairo cr which is correspond to scale of elementary. + if (ad->cr == NULL) { + ad->cr = cairo_create(ad->cairo_surface); + setting_retm_if(ad->cr == NULL, "ad->cr is NULL"); + } + + // bg + cairo_set_source_rgba(ad->cr, 0.0, 0.0, 0.0, 1.0); + cairo_set_line_width(ad->cr, 1); + + int begin_point_x = SETTING_DATAUSAGE_HEAD_POINT_X; + int begin_point_y = SETTING_DATAUSAGE_HEAD_POINT_Y; + int line_length = SETTING_DATAUSAGE_CHART_WIDTH; + + int i = 0; + int max = SETTING_DATAUSAGE_CHART_HEIGHT / SETTING_DATAUSAGE_INTERVAL + 1; + for (i = 0; i < max; i++) { + cairo_move_to(ad->cr, begin_point_x, begin_point_y); + cairo_line_to(ad->cr, begin_point_x + line_length, begin_point_y); + begin_point_y += SETTING_DATAUSAGE_INTERVAL; + } + + begin_point_x = SETTING_DATAUSAGE_HEAD_POINT_X; + begin_point_y = SETTING_DATAUSAGE_HEAD_POINT_Y; + line_length = SETTING_DATAUSAGE_CHART_HEIGHT; + + max = SETTING_DATAUSAGE_CHART_WIDTH / SETTING_DATAUSAGE_INTERVAL + 1; + for (i = 0; i < max; i++) { + cairo_move_to(ad->cr, begin_point_x, begin_point_y); + cairo_line_to(ad->cr, begin_point_x, begin_point_y + line_length); + begin_point_x += SETTING_DATAUSAGE_INTERVAL; + } + + cairo_stroke(ad->cr); + + evas_object_image_size_set(pie_image_object, cairo_w, cairo_h); + evas_object_image_data_set(pie_image_object, cairo_image_surface_get_data(ad->cairo_surface)); + evas_object_image_fill_set(pie_image_object, 0, 0, cairo_w, cairo_h); +} + +static char *_item_label_get(void *data, Evas_Object *obj, const char *part) +{ + //SETTING_TRACE_BEGIN; + + return NULL; +} + +static Evas_Object *_item_content_get(void *data, Evas_Object *obj, const char *part) +{ + //SETTING_TRACE_BEGIN; + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + int width = (int) (690 * elm_scale_get()); + + if (!safeStrCmp(part, "elm.icon")) { + if (item_data->keyStr == NULL) { + Evas_Object *sub_layout = elm_layout_add(obj); + elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, "traf-control"); + __setting_datausage_main_pie_graph(sub_layout, "traf-stat", item_data->userdata); + evas_object_show(sub_layout); + return sub_layout; + } + } else if (!safeStrCmp(part, "elm.label")) { + if (item_data->keyStr) { + Evas_Object *label = NULL; + label = elm_label_add(obj); + elm_label_line_wrap_set(label, EINA_TRUE); + elm_label_wrap_width_set(label, width); + elm_object_text_set(label, _(item_data->keyStr)); + return label; + } + } + + return NULL; +} + +static void _item_del(void *data, Evas_Object *obj) +{ + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + if (item_data) { + G_FREE(item_data->keyStr); + + FREE(item_data); + } +} + +static void __setting_datausage_main_mouse_up_Gendial_list_cb(void *data, Evas_Object * obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + //error check + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + int opposite = !list_item->chk_status; + + int err = -1; + int ret = -1; + + if (!safeStrCmp(SETTING_DATAUSAGE_MORE_SETTING_STR, list_item->keyStr)) { + setting_view_change(&setting_view_datausage_main, &setting_view_datausage_more_setting, ad); + } else if (!safeStrCmp(SETTING_DATAUSAGE_CHANGE_CYCLE_STR, list_item->keyStr)) { + setting_view_change(&setting_view_datausage_main, &setting_view_datausage_change_cycle, ad); + } else if (!safeStrCmp(SETTING_DATAUSAGE_MOBILE_DATA_STR, list_item->keyStr)) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_MOBILE_DATA_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + + elm_check_state_set(list_item->eo_check, opposite); + list_item->chk_status = opposite; + } else if (!safeStrCmp(SETTING_DATAUSAGE_DISABLE_MOBILE_DATA_STR, list_item->keyStr)) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_DISABLE_MOBILE_DATA_AT_LIMIT_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + + elm_check_state_set(list_item->eo_check, opposite); + list_item->chk_status = opposite; + } +} + +static void __setting_datausage_main_chk_btn_cb(void *data, Evas_Object * obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + //error check + retm_if(data == NULL, "Data parameter is NULL"); + SettingDatausageUG *ad = NULL; + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + ad = list_item->userdata; + list_item->chk_status = elm_check_state_get(obj); // for genlist update status + + int opposite = (list_item->chk_status == 1) ? SETTING_ON_OFF_BTN_ON : SETTING_ON_OFF_BTN_OFF; + + int err = -1; + int ret = -1; + + if (obj == ad->mobile_data->eo_check) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_MOBILE_DATA_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + } else if (obj == ad->disable_mobile_data->eo_check) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_DISABLE_MOBILE_DATA_AT_LIMIT_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + } +} + + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static int setting_datausage_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + + elm_theme_extension_add(NULL, SETTING_EDJ_PATH"/setting-genlist-theme.edj"); + + ad->ly_main = setting_create_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, + _(KeyStr_DataUsage), _("IDS_COM_BODY_BACK"), + NULL, + __setting_datausage_main_click_softkey_back_cb, + NULL, ad, &ad->genlist, + &ad->navibar); + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(ad->genlist, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int value = 0; + int err = 0; + int ret = 0; + + // Mobile data - ON/OFF + ret = setting_get_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_MOBILE_DATA_BOOL, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + ad->mobile_data = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text_1icon), + __setting_datausage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, SETTING_DATAUSAGE_MOBILE_DATA_STR, + NULL, __setting_datausage_main_chk_btn_cb); + if (ad->mobile_data) { + ad->mobile_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->mobile_data is NULL"); + return SETTING_RETURN_FAIL; + } + + // Disable mobile data at limit -ON/OFF + ret = setting_get_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_DISABLE_MOBILE_DATA_AT_LIMIT_BOOL, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + ad->disable_mobile_data = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text_1icon), + __setting_datausage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, SETTING_DATAUSAGE_DISABLE_MOBILE_DATA_STR, + NULL, __setting_datausage_main_chk_btn_cb); + if (ad->disable_mobile_data) { + ad->disable_mobile_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->disable_mobile_data is NULL"); + return SETTING_RETURN_FAIL; + } + + item = elm_genlist_item_append(ad->genlist, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + // Data usage cycle + ad->data_usage_cycle = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_2), + __setting_datausage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_DATAUSAGE_DATA_USAGE_CYCLE_STR, + "1-30 Jun", NULL); + if (ad->data_usage_cycle) { + ad->data_usage_cycle->userdata = ad; + elm_genlist_item_select_mode_set(ad->data_usage_cycle->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->data_usage_cycle is NULL"); + return SETTING_RETURN_FAIL; + } + + // Change cycle + ad->change_cycle = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), + __setting_datausage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_DATAUSAGE_CHANGE_CYCLE_STR, + NULL, NULL); + if (ad->change_cycle) { + ad->change_cycle->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->change_cycle is NULL"); + return SETTING_RETURN_FAIL; + } + + item = elm_genlist_item_append(ad->genlist, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + // More data usage setting + ad->more_setting = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), + __setting_datausage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_DATAUSAGE_MORE_SETTING_STR, + NULL, NULL); + if (ad->more_setting) { + ad->more_setting->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->change_cycle is NULL"); + return SETTING_RETURN_FAIL; + } + + + /* graph image */ + ad->itc_variable_height.item_style = "setting/variable_height"; + ad->itc_variable_height.func.text_get = _item_label_get; + ad->itc_variable_height.func.content_get = _item_content_get; + ad->itc_variable_height.func.state_get = NULL; + ad->itc_variable_height.func.del = _item_del; + + ad->graph_image = (Setting_GenGroupItem_Data *) calloc(1, sizeof(Setting_GenGroupItem_Data)); + setting_retvm_if(!ad->graph_image, SETTING_RETURN_FAIL, "calloc failed"); + + if (ad->graph_image) { + ad->graph_image->userdata = ad; + + ad->graph_image->item = elm_genlist_item_append(ad->genlist, &(ad->itc_variable_height), ad->graph_image, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(ad->graph_image->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->graph_image is NULL"); + return SETTING_RETURN_FAIL; + } + + /* description */ + char *time_interval = "Jun 1-30"; + char *used_size = "273MB"; + char used_str[SETTING_DATAUSAGE_DESC_LEN_MAX + 1] = {0,}; + snprintf(used_str, SETTING_DATAUSAGE_DESC_LEN_MAX, SETTING_DATAUSAGE_GRAPH_DESC_STR, + time_interval, used_size); + char desc_str[2 * SETTING_DATAUSAGE_DESC_LEN_MAX + 1] = {0,}; + snprintf(desc_str, 2 * SETTING_DATAUSAGE_DESC_LEN_MAX, "%s

%s", + used_str, SETTING_DATAUSAGE_DESC_STR); + ad->graph_desc = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_variable_height), NULL, + ad, SWALLOW_Type_INVALID, + NULL, NULL, 0, desc_str, NULL, + NULL); + if (ad->graph_desc) { + ad->graph_desc->userdata = ad; + elm_genlist_item_select_mode_set(ad->graph_desc->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->graph_desc is NULL"); + return SETTING_RETURN_FAIL; + } + + item = elm_genlist_item_append(ad->genlist, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), + __setting_datausage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, "test1", + NULL, NULL); + setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), + __setting_datausage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, "test2", + NULL, NULL); + setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), + __setting_datausage_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, "test3", + NULL, NULL); + + item = elm_genlist_item_append(ad->genlist, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + setting_view_datausage_main.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_datausage_main_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + + if (ad->cr) { + cairo_destroy(ad->cr); + ad->cr = NULL; + } + if (ad->cairo_surface) { + cairo_surface_destroy(ad->cairo_surface); + ad->cairo_surface = NULL; + } + + if (ad->ly_main) { + evas_object_del(ad->ly_main); + ad->ly_main = NULL; + setting_view_datausage_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_datausage_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + + if (ad->ly_main) { + evas_object_show(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_datausage_main_cleanup(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + + if (ad->ly_main) { + evas_object_hide(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void __setting_datausage_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + ret_if(data == NULL); + + SettingDatausageUG *ad = (SettingDatausageUG *) data; + /* Send destroy request */ + ug_destroy_me(ad->ug); +} diff --git a/setting-datausage/src/setting-datausage-more-setting.c b/setting-datausage/src/setting-datausage-more-setting.c new file mode 100755 index 0000000..5d2d1c4 --- /dev/null +++ b/setting-datausage/src/setting-datausage-more-setting.c @@ -0,0 +1,228 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#include + +static int __setting_datausage_more_setting_create(void *cb); +static int __setting_datausage_more_setting_destroy(void *cb); +static int __setting_datausage_more_setting_update(void *cb); +static int __setting_datausage_more_setting_cleanup(void *cb); + +setting_view setting_view_datausage_more_setting = { + .create = __setting_datausage_more_setting_create, + .destroy = __setting_datausage_more_setting_destroy, + .update = __setting_datausage_more_setting_update, + .cleanup = __setting_datausage_more_setting_cleanup, +}; + +static void __setting_datausage_more_setting_chk_btn_cb(void *data, Evas_Object * obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + //error check + retm_if(data == NULL, "Data parameter is NULL"); + SettingDatausageUG *ad = NULL; + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + ad = list_item->userdata; + list_item->chk_status = elm_check_state_get(obj); // for genlist update status + + int opposite = (list_item->chk_status == 1) ? SETTING_ON_OFF_BTN_ON : SETTING_ON_OFF_BTN_OFF; + + int err = -1; + int ret = -1; + + if (obj == ad->data_roaming->eo_check) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + } else if (obj == ad->restrict_bg->eo_check) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_RESTRICT_BG_DATA_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + } else if (obj == ad->show_wifi->eo_check) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_SHOW_WIFI_USAGE_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + } +} + + +/* *************************************************** +** +** basic func +** +** **************************************************/ + +static int __setting_datausage_more_setting_create(void *cb) +{ + SETTING_TRACE_BEGIN; + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + Evas_Object *scroller; + + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(SETTING_DATAUSAGE_MORE_SETTING_STR), + _("IDS_COM_BODY_BACK"), + NULL, + __setting_datausage_more_setting_back_cb, + NULL, + ad, &scroller, ad->navibar); + + setting_retvm_if(scroller == NULL, SETTING_RETURN_FAIL, "scroller is NULL"); + + Elm_Object_Item *item = NULL;; + + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int value = 0; + int err = 0; + + // Data roaming - ON/OFF + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, &value, &err); + if (err != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + ad->data_roaming = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + __setting_datausage_more_setting_mouse_up_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, SETTING_DATAUSAGE_DATA_ROAMING_STR, + NULL, __setting_datausage_more_setting_chk_btn_cb); + if (ad->data_roaming) { + ad->data_roaming->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_roaming is NULL"); + return SETTING_RETURN_FAIL; + } + + // Restrict background data - ON/OFF + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_RESTRICT_BG_DATA_BOOL, &value, &err); + if (err != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + ad->restrict_bg = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + __setting_datausage_more_setting_mouse_up_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, SETTING_DATAUSAGE_RESTRICT_BACKGROUND_STR, + NULL, __setting_datausage_more_setting_chk_btn_cb); + if (ad->restrict_bg) { + ad->restrict_bg->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_roaming is NULL"); + return SETTING_RETURN_FAIL; + } + + // Show Wi-Fi usage - ON/OFF + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_SHOW_WIFI_USAGE_BOOL, &value, &err); + if (err != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + ad->show_wifi = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + __setting_datausage_more_setting_mouse_up_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, SETTING_DATAUSAGE_SHOW_WIFI_STR, + NULL, __setting_datausage_more_setting_chk_btn_cb); + if (ad->show_wifi) { + ad->show_wifi->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_roaming is NULL"); + return SETTING_RETURN_FAIL; + } + + setting_view_datausage_more_setting.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int __setting_datausage_more_setting_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingDatausageUG *ad = (SettingDatausageUG *) cb; + + elm_naviframe_item_pop(ad->navibar); + setting_view_datausage_more_setting.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int __setting_datausage_more_setting_update(void *cb) +{ + SETTING_TRACE_BEGIN; + return SETTING_RETURN_SUCCESS; +} + +static int __setting_datausage_more_setting_cleanup(void *cb) +{ + //error check + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + __setting_datausage_more_setting_destroy(cb); + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** +** +** call back func +** +** **************************************************/ +static void __setting_datausage_more_setting_back_cb(void *data, Evas_Object * obj, void *event_info) +{ + //error check + ret_if(data == NULL); + SettingDatausageUG *ad = (SettingDatausageUG *) data; + + setting_view_change(&setting_view_datausage_more_setting, &setting_view_datausage_main, ad); +} + +static void __setting_datausage_more_setting_mouse_up_cb(void *data, Evas_Object *obj, void *event_info) +{ + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)elm_object_item_data_get(item); + + setting_retm_if(data == NULL, "Data parameter is NULL"); + + int opposite = !list_item->chk_status; + int err = -1; + int ret = -1; + + if (!safeStrCmp(SETTING_DATAUSAGE_DATA_ROAMING_STR, list_item->keyStr)) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + + elm_check_state_set(list_item->eo_check, opposite); + list_item->chk_status = opposite; + } else if (!safeStrCmp(SETTING_DATAUSAGE_RESTRICT_BACKGROUND_STR, list_item->keyStr)) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_RESTRICT_BG_DATA_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + + elm_check_state_set(list_item->eo_check, opposite); + list_item->chk_status = opposite; + } else if (!safeStrCmp(SETTING_DATAUSAGE_SHOW_WIFI_STR, list_item->keyStr)) { + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_DATAUSAGE_SHOW_WIFI_USAGE_BOOL, opposite, &err); + setting_retm_if(ret == -1, "set vconf failed"); + + elm_check_state_set(list_item->eo_check, opposite); + list_item->chk_status = opposite; + } +} diff --git a/setting-datausage/src/setting-datausage.c b/setting-datausage/src/setting-datausage.c new file mode 100755 index 0000000..5283c11 --- /dev/null +++ b/setting-datausage/src/setting-datausage.c @@ -0,0 +1,206 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +/** + *@defgroup setting-datausage + *UG creation code for setting-datausage + */ + +#include +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +setting_view *__get_datausage_view_to_load(service_h service) +{ + SETTING_TRACE_BEGIN; + + setting_view_node_table_register(&setting_view_datausage_main, NULL); + setting_view_node_table_register(&setting_view_datausage_more_setting, &setting_view_datausage_main); + setting_view_node_table_register(&setting_view_datausage_change_cycle, &setting_view_datausage_main); + + return &setting_view_datausage_main; +} + +static void setting_datausage_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, + void *event_info) +{ + SettingDatausageUG *ad = (SettingDatausageUG *) data; + setting_view_update(ad->view_to_load, ad); +} + +static void *setting_datausage_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) +{ + setting_retvm_if((!ug || !priv), NULL, "!ug || !priv"); + + SettingDatausageUG *datausageUG = priv; + datausageUG->ug = ug; + datausageUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + datausageUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(datausageUG->win_main_layout); + datausageUG->evas = evas_object_evas_get(datausageUG->win_main_layout); + + setting_retvm_if(datausageUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + datausageUG->itc_seperator.item_style = "dialogue/separator/21/with_line"; + datausageUG->itc_seperator.func.text_get = NULL; + datausageUG->itc_seperator.func.content_get = NULL; + datausageUG->itc_seperator.func.state_get = NULL; + datausageUG->itc_seperator.func.del = NULL; + + setting_create_Gendial_itc("dialogue/2text.3/expandable", &(datausageUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", &(datausageUG->itc_1icon_1text_sub)); + setting_create_Gendial_itc("dialogue/2text.3", &(datausageUG->itc_2text_2)); + setting_create_Gendial_itc("dialogue/1text.1icon.2", &(datausageUG->itc_1text_1icon_2)); + setting_create_Gendial_itc("dialogue/1text", &(datausageUG->itc_1text)); + setting_create_Gendial_itc("dialogue/1text.1icon", &(datausageUG->itc_1text_1icon)); + setting_create_Gendial_itc("dialogue/title", &(datausageUG->itc_group_item)); + setting_create_Gendial_itc("multiline/1text", &(datausageUG->itc_bg_1icon)); + + /* creating a view. */ + datausageUG->view_to_load = __get_datausage_view_to_load(service); + setting_retvm_if(NULL == datausageUG->view_to_load, NULL, + "NULL == datausageUG->view_to_load"); + setting_view_node_set_cur_view(datausageUG->view_to_load); + setting_view_create(datausageUG->view_to_load, (void *)datausageUG); + evas_object_event_callback_add(datausageUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_datausage_ug_cb_resize, datausageUG); + return datausageUG->ly_main; +} + +static void setting_datausage_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_datausage_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_datausage_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_datausage_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!ug || !priv), "!ug || !priv"); + SettingDatausageUG *datausageUG = priv; + + evas_object_event_callback_del(datausageUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_datausage_ug_cb_resize); /* fix flash issue for gallery */ + datausageUG->ug = ug; + + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_datausage_change_cycle, datausageUG); + setting_view_destroy(&setting_view_datausage_more_setting, datausageUG); + setting_view_destroy(&setting_view_datausage_main, datausageUG); + if (NULL != ug_get_layout(datausageUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(datausageUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(datausageUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_datausage_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_datausage_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + switch (event) { + case UG_EVENT_LOW_MEMORY: + break; + case UG_EVENT_LOW_BATTERY: + break; + case UG_EVENT_LANG_CHANGE: + break; + case UG_EVENT_ROTATE_PORTRAIT: + break; + case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN: + break; + case UG_EVENT_ROTATE_LANDSCAPE: + break; + case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN: + break; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_datausage_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + if (!ug) + return; + + switch (event) { + case UG_KEY_EVENT_END: + ug_destroy_me(ug); + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingDatausageUG *datausageUG = calloc(1, sizeof(SettingDatausageUG)); + setting_retvm_if(!datausageUG, -1, "Create SettingDatausageUG obj failed"); + + ops->create = setting_datausage_ug_on_create; + ops->start = setting_datausage_ug_on_start; + ops->pause = setting_datausage_ug_on_pause; + ops->resume = setting_datausage_ug_on_resume; + ops->destroy = setting_datausage_ug_on_destroy; + ops->message = setting_datausage_ug_on_message; + ops->event = setting_datausage_ug_on_event; + ops->key_event = setting_datausage_ug_on_key_event; + ops->priv = datausageUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingDatausageUG *datausageUG = NULL; + setting_retm_if(!ops, "ops == NULL"); + + datausageUG = ops->priv; + FREE(datausageUG); +} diff --git a/setting-display/CMakeLists.txt b/setting-display/CMakeLists.txt index 9908c1b..eebefe4 100755 --- a/setting-display/CMakeLists.txt +++ b/setting-display/CMakeLists.txt @@ -2,7 +2,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs_display REQUIRED elementary ecore ecore-x edje evas appcore-common appcore-efl ui-gadget bundle dlog devman) +pkg_check_modules(pkgs_display REQUIRED elementary ecore ecore-x edje evas appcore-common appcore-efl ui-gadget-1 capi-appfw-application dlog capi-system-device) FOREACH(flag ${pkgs_display_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") @@ -27,6 +27,8 @@ ADD_LIBRARY(${SETTING_DISPLAY_UG} SHARED ##./src/setting-display-backlight.c ./src/setting-display-brightness.c ./src/setting-display-wallpaper.c + ./src/setting-display-screen-mode.c + ./src/setting-display-smart-screen.c ) TARGET_LINK_LIBRARIES(${SETTING_DISPLAY_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) diff --git a/setting-display/include/setting-display-brightness.h b/setting-display/include/setting-display-brightness.h index eb82e8d..2d62d8e 100755 --- a/setting-display/include/setting-display-brightness.h +++ b/setting-display/include/setting-display-brightness.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_DISPLAY_BRIGHTNESS_H__ #define __SETTING_DISPLAY_BRIGHTNESS_H__ diff --git a/setting-display/include/setting-display-main.h b/setting-display/include/setting-display-main.h index 000a6c0..b629ffc 100755 --- a/setting-display/include/setting-display-main.h +++ b/setting-display/include/setting-display-main.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_DISPLAY_MAIN_H__ #define __SETTING_DISPLAY_MAIN_H__ @@ -25,6 +28,11 @@ #define LAUNCH_IMAGE_STR "IDS_ST_BODY_APP_OPENING_IMAGE" #define LAUNCH_BATTERY_STR "IDS_ST_BODY_BATTERY_PERCENTAGE_ABB" +#define KeyStr_AdjustScreenTone "Auto adjust screen tone" +#define KeyStr_AdjustScreenTone_Dsc "Save power by adjusting screen tone according to analysis of images" + +#define LAUNCH_BATTERY_DESC "Shows battery percentage on indicator" + #define SETTING_DISPLAY_TIME_15_SEC_STR "IDS_ST_BODY_15SEC" #define SETTING_DISPLAY_TIME_30_SEC_STR "IDS_ST_BODY_30SEC" #define SETTING_DISPLAY_TIME_1_MIN_STR "IDS_COM_BODY_1_MINUTE" @@ -36,16 +44,28 @@ static void setting_display_main_battery_chk_btn_cb(void *data, Evas_Object *obj, void *event_info); +static void setting_display_main_auto_adjust_chk_btn_cb(void *data, Evas_Object *obj, void *event_info); static void setting_display_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info); static void setting_display_main_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info); +#if OPENING_EFFECT static void setting_display_main_launch_effect_chk_btn_cb(void *data, Evas_Object *obj, void *event_info); +#endif +#ifdef UNUSED_VCONFKEY +static void setting_display_main_launch_image_chk_btn_cb(void *data, + Evas_Object *obj, + void *event_info); +#endif +#if OPENING_EFFECT static Ecore_X_Window setting_display_main_effect_get_root(Evas_Object * win_main); + static void setting_display_main_effect_set_value(void *data); +#endif + #endif /* __SETTING_DISPLAY_MAIN_H__ */ diff --git a/setting-display/include/setting-display-screen-mode.h b/setting-display/include/setting-display-screen-mode.h new file mode 100755 index 0000000..e7d0f58 --- /dev/null +++ b/setting-display/include/setting-display-screen-mode.h @@ -0,0 +1,31 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_DISPLAY_SCREEN_MODE_H__ +#define __SETTING_DISPLAY_SCREEN_MODE_H__ + +#include + + +static void +setting_display_screen_mode_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info); + +#endif /* __SETTING_DISPLAY_MAIN_H__ */ diff --git a/setting-display/include/setting-display-smart-screen.h b/setting-display/include/setting-display-smart-screen.h new file mode 100755 index 0000000..d174441 --- /dev/null +++ b/setting-display/include/setting-display-smart-screen.h @@ -0,0 +1,30 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_DISPLAY_SMART_SCREEN_H__ +#define __SETTING_DISPLAY_SMART_SCREEN_H__ + +#include + + +static void __setting_display_smart_screen_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info); + +#endif /* __SETTING_DISPLAY_SMART_SCREEN_H__ */ diff --git a/setting-display/include/setting-display-wallpaper.h b/setting-display/include/setting-display-wallpaper.h index 66728cd..f1e4353 100755 --- a/setting-display/include/setting-display-wallpaper.h +++ b/setting-display/include/setting-display-wallpaper.h @@ -1,27 +1,32 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_DISPLAY_WALLPAPER_H__ #define __SETTING_DISPLAY_WALLPAPER_H__ #include -#define SETING_DISPLAY_WALLPAPER_CHANGE_WALLPAPER_STR "IDS_COM_HEADER_CHANGE_WALLPAPER" -#define SETING_DISPLAY_WALLPAPER_CUSTOMIZED_LOCK_SCREEN_STR "IDS_IDLE_HEADER_CUSTOMISE_LOCK_SCREEN_ABB" +#define SETTING_WALLPAPER_HOME_AND_LOCK_SCREEN "Home and lock screens wallpaper" +#define SETTING_WALLPAPER_HOME_SCREEN_CHANGED "Home screen changed" +#define SETTING_WALLPAPER_LOCK_SCREEN_CHANGED "Lock screen changed" +#define SETTING_WALLPAPER_HOME_AND_LOCK_SCREEN_CHANGED "Home screen and Lock screen changed" static void setting_display_wallpaper_click_softkey_cancel_cb(void *data, Evas_Object *obj, diff --git a/setting-display/include/setting-display.h b/setting-display/include/setting-display.h old mode 100644 new mode 100755 index 0a444a8..6f64381 --- a/setting-display/include/setting-display.h +++ b/setting-display/include/setting-display.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_DISPLAY_H__ #define __SETTING_DISPLAY_H__ @@ -23,56 +26,88 @@ #include -#include #include -#include -#include -#include #include #include -#define USE_DEVICE_SET_DISPLAY_BRT 1 +#include + +#define Keystr_SmartScreen "IDS_ST_MBODY_SMART_SCREEN" +#define Keystr_ScreenMode "IDS_ST_BODY_SCREEN_MODE" +#define Keystr_Dynamic "IDS_ST_BODY_DYNAMIC_T_DISPLAY_EFFECT" +#define Keystr_Standard "IDS_ST_BODY_STANDARD_T_DISPLAY_EFFECT" +#define Keystr_Natural "IDS_ST_BODY_NATURAL_T_DISPLAY_EFFECT" +#define Keystr_Movie "IDS_ST_BODY_MOVIE_T_DISPLAY_EFFECT" + +typedef enum { + WALLPAPER_CUR_SEL_NONE = 0, + WALLPAPER_CUR_SEL_HOME_SCREEN, + WALLPAPER_CUR_SEL_LOCK_SCREEN, + WALLPAPER_CUR_SEL_HOME_AND_LOCK_SCREEN +} Wallpaper_Cur_Sel; typedef struct _SettingDisplayUG SettingDisplayUG; +#define OPENING_EFFECT 0 +#define BRIGHTNESS_DISPLAY 0 + /** * Setting Display UG context - * all UG function has void* as an agument. this is casted back to SettingDisplayUG + * all UG function has void* as an agument. this is casted back to SettingDisplayUG * and the functions access app context. */ struct _SettingDisplayUG { - struct ui_gadget *ug; + ui_gadget_h ug; /* add more variables here (move your appdata to here) */ Evas *evas; Evas_Object *win_main_layout; Evas_Object *win_get; - struct ui_gadget *ug_loading; + ui_gadget_h ug_loading; Evas_Object *ly_main; Evas_Object *ly_wall; - Evas_Object *img_homescreen; - Evas_Object *img_lockscreen; - Evas_Object *scrl_wall; - Evas_Object *navi_bar; /* for navigation effect */ + Setting_GenGroupItem_Data *data_screen_mode; Setting_GenGroupItem_Data *data_br; Setting_GenGroupItem_Data *data_back; Setting_GenGroupItem_Data *data_br_auto; Setting_GenGroupItem_Data *data_br_sli; + +#if OPENING_EFFECT Setting_GenGroupItem_Data *data_launch_effect; +#endif + + Setting_GenGroupItem_Data *data_launch_image; Setting_GenGroupItem_Data *data_battery; + // smart screen + Setting_GenGroupItem_Data *data_smart_stay; + Setting_GenGroupItem_Data *data_smart_rotation; + Setting_GenGroupItem_Data *data_auto_adjust_scrn_tone; + + // for wallpaper + Wallpaper_Cur_Sel cur_sel; + Evas_Object *view_layout; + Evas_Object *selInfoPop; + Evas_Object *selInfoPop_layout; + Setting_GenGroupItem_Data *data_home_screen; + Setting_GenGroupItem_Data *data_lock_screen; + Setting_GenGroupItem_Data *data_home_lock_screen; + //int bright_value; int low_bat; setting_view *view_to_load; + Evas_Object *popup_chk; + Evas_Object *popup; + Elm_Genlist_Item_Class itc_2text_2; Elm_Genlist_Item_Class itc_1text_1icon; Elm_Genlist_Item_Class itc_layout; @@ -85,8 +120,10 @@ struct _SettingDisplayUG { extern setting_view setting_view_display_main; extern setting_view setting_view_display_brightness; extern setting_view setting_view_display_wallpaper; +extern setting_view setting_view_display_screen_mode; +extern setting_view setting_view_display_smart_screen; -void setting_display_layout_ug_cb(struct ui_gadget *ug, enum ug_mode mode, +void setting_display_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv); #endif /* __SETTING_DISPLAY_H__ */ diff --git a/setting-display/src/setting-display-brightness.c b/setting-display/src/setting-display-brightness.c index 9fd5a49..a5bf8d8 100755 --- a/setting-display/src/setting-display-brightness.c +++ b/setting-display/src/setting-display-brightness.c @@ -1,26 +1,29 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include -#include #define Left_Bright_Icon IMG_BRIGTHNESS_LEFT #define Right_Bright_Icon IMG_BRIGHTNESS_RIGHT +#define SUPPORT_DISPLAY_HOMESCREEN_IMAGE 0 static int setting_display_brightness_create(void *cb); static int setting_display_brightness_destroy(void *cb); @@ -47,16 +50,16 @@ static Eina_Bool setting_display_brightness_on_idle(void *data) SETTING_TRACE_BEGIN; SettingDisplayUG *ad = (SettingDisplayUG *) data; int auto_value, err; - setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_BRIGHTNESS, + setting_get_int_slp_key(INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, &auto_value, &err); - if (auto_value) { + if (auto_value != SETTING_BRIGHTNESS_AUTOMATIC_OFF) { setting_disable_genlist_item(ad->data_br_sli->item); } return FALSE; } -// low battery +// low battery static void setting_display_brightness_lowbat_cb(keynode_t *key, void* data) { // SETTING_TRACE_BEGIN; @@ -73,18 +76,18 @@ static void setting_display_brightness_lowbat_cb(keynode_t *key, void* data) ad->low_bat = battery_value; int automatic_val, err; - setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_BRIGHTNESS, &automatic_val, &err); + setting_get_int_slp_key(INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, &automatic_val, &err); if (battery_value < VCONFKEY_SYSMAN_BAT_WARNING_LOW) { - // disabled + // disabled if (ad->data_br_sli) { setting_disable_genlist_item(ad->data_br_sli->item); setting_disable_genlist_item(ad->data_br_auto->item); } } else { if (ad->data_br_sli) { - if (automatic_val != 1) // not automatic + if (automatic_val == SETTING_BRIGHTNESS_AUTOMATIC_OFF) // not automatic { setting_enable_genlist_item(ad->data_br_auto->item); setting_enable_genlist_item(ad->data_br_sli->item); @@ -104,19 +107,45 @@ static int setting_display_brightness_create(void *cb) SettingDisplayUG *ad = (SettingDisplayUG *) cb; - Evas_Object *navi_bar = ad->navi_bar; - Evas_Object *sub_layout = elm_layout_add(navi_bar); + Evas_Object *sub_layout = elm_layout_add(ad->win_main_layout); elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, "search_layout"); +#if SUPPORT_DISPLAY_HOMESCREEN_IMAGE + Evas_Object *bg_image = + create_bgimage_box_add(NULL, ad->win_main_layout, ad->evas, + pa_bgset, + -1, -1, /* load the image as it's own size */ + NULL, + NULL); + elm_layout_content_set(sub_layout, "bg_swallow", bg_image); + FREE(pa_bgset); +#endif Evas_Object *genlist = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(genlist, "dialogue"); retvm_if(genlist == NULL, SETTING_RETURN_FAIL, "Cannot set scroller object as contento of layout"); elm_genlist_clear(genlist); /* first to clear list */ - setting_push_layout_navi_bar(_(KeyStr_Brightness), - _("IDS_COM_BODY_BACK"), NULL, NULL, - setting_display_brightness_click_softkey_cancel_cb, - NULL, - NULL, ad, sub_layout, navi_bar, NULL);; + + /* add basic layout */ + if (&setting_view_display_brightness == ad->view_to_load) { + ad->ly_main = + setting_create_layout_navi_bar(ad->win_main_layout, + ad->win_get, + _(KeyStr_Brightness), + _("IDS_COM_BODY_BACK"), + NULL, NULL, + setting_display_brightness_click_softkey_cancel_cb, + NULL, NULL, ad, + sub_layout, + &ad->navi_bar, NULL); + } else { + setting_push_layout_navi_bar(_(KeyStr_Brightness), + _("IDS_COM_BODY_BACK"), NULL, NULL, + setting_display_brightness_click_softkey_cancel_cb, + NULL, + NULL, ad, sub_layout, ad->navi_bar, NULL);; + } + elm_object_part_content_set(sub_layout, "search_list2", genlist); int auto_value, value; @@ -128,9 +157,12 @@ static int setting_display_brightness_create(void *cb) elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); // [control] AUTOMATIC - boolean - vconf - setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_BRIGHTNESS, &auto_value, &err); + setting_get_int_slp_key(INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, &auto_value, &err); SETTING_TRACE("auto_value:%d", auto_value); + if(auto_value == SETTING_BRIGHTNESS_AUTOMATIC_PAUSE) + auto_value = SETTING_BRIGHTNESS_AUTOMATIC_ON; + // [UI] AUTOMATIC - boolean ad->data_br_auto = setting_create_Gendial_field_def(genlist, &(ad->itc_1text_1icon), @@ -145,6 +177,7 @@ static int setting_display_brightness_create(void *cb) SETTING_TRACE_ERROR("ad->data_br_auto is NULL"); } + int battery_value; vconf_get_int(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &battery_value); ad->low_bat = battery_value; @@ -161,14 +194,14 @@ static int setting_display_brightness_create(void *cb) SETTING_TRACE("******* value = %d ", value); int max_brt; - max_brt = device_get_max_brt(0); - if (max_brt < 0) { + if (DEVICE_ERROR_NONE != device_get_max_brightness(BRIGHTNESS_DISPLAY, &max_brt)) { SETTING_TRACE("Fail to get the max brightness of the display.\n"); max_brt = 10; } else { SETTING_TRACE("Max brightness of the display is %d\n", max_brt); } + // [UI] Slider control for Bightness ad->data_br_sli = setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL, NULL, SWALLOW_Type_LAYOUT_SLIDER, @@ -180,6 +213,7 @@ static int setting_display_brightness_create(void *cb) if (ad->data_br_sli) { ad->data_br_sli->win_main = ad->win_main_layout; ad->data_br_sli->evas = ad->evas; + ad->data_br_sli->isIndicatorVisible = false; ad->data_br_sli->slider_min = 1; ad->data_br_sli->slider_max = max_brt; ad->data_br_sli->userdata = ad; @@ -265,6 +299,11 @@ setting_display_brightness_click_softkey_cancel_cb(void *data, /* error check */ retm_if(data == NULL, "Data parameter is NULL"); SettingDisplayUG *ad = (SettingDisplayUG *) data; + if (&setting_view_display_brightness == ad->view_to_load) { + /* Send destroy request */ + ug_destroy_me(ad->ug); + return; + } setting_view_change(&setting_view_display_brightness, &setting_view_display_main, ad); @@ -280,7 +319,9 @@ static void __toggle_automatic_chk(void* data, int chk_status) } else { // TOGGLE OFF - int value = device_get_display_brt(0); + int value = SETTING_BRIGHTNESS_LEVEL7; + device_get_brightness(BRIGHTNESS_DISPLAY, &value); + SETTING_TRACE(" SENOSR :: %d ", value); setting_set_int_slp_key(INT_SLP_SETTING_LCD_BRIGHTNESS, value, &err); @@ -288,7 +329,7 @@ static void __toggle_automatic_chk(void* data, int chk_status) if (ad->low_bat < VCONFKEY_SYSMAN_BAT_WARNING_LOW) { setting_disable_genlist_item(ad->data_br_sli->item); setting_disable_genlist_item(ad->data_br_auto->item); - setting_set_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_BRIGHTNESS, chk_status, &err); + setting_set_int_slp_key(INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, chk_status, &err); return; } @@ -299,7 +340,7 @@ static void __toggle_automatic_chk(void* data, int chk_status) setting_enable_genlist_item(ad->data_br_sli->item); } - setting_set_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_BRIGHTNESS, chk_status, &err); + setting_set_int_slp_key(INT_SLP_SETTING_AUTOMATIC_BRIGHTNESS, chk_status, &err); } static void @@ -323,7 +364,7 @@ setting_display_brightness_chk_btn_cb(void *data, Evas_Object *obj, * [UI] 'Automatic' toggle */ static void setting_display_brightness_mouse_up_Gendial_list_cb(void *data, - Evas_Object * obj, + Evas_Object * obj, void *event_info) { /* error check */ @@ -346,7 +387,7 @@ static void setting_display_brightness_mouse_up_Gendial_list_cb(void *data, } static void setting_display_set_slider_value(void* data, Evas_Object *obj, double value) - + { SETTING_TRACE_BEGIN; retm_if(data == NULL, "Invalid argument: data is NULL"); @@ -355,12 +396,12 @@ static void setting_display_set_slider_value(void* data, Evas_Object *obj, doubl int ret, err; #ifdef USE_DEVICE_SET_DISPLAY_BRT - ret = device_set_display_brt(DEV_MAIN_DISPLAY, value); - if (ret == 0) { + ret = device_set_brightness(BRIGHTNESS_DISPLAY, value); + if (ret == DEVICE_ERROR_NONE) { ad->data_br_sli->chk_status = value; ret = setting_set_int_slp_key(INT_SLP_SETTING_LCD_BRIGHTNESS, value, &err); } else { - /* SETTING_TRACE("device_set_display_brt : failed"); */ + /* SETTING_TRACE("device_set_brightness : failed"); */ } #endif } @@ -371,13 +412,13 @@ setting_display_birghtness_bright_slider_value_change_cb(void *data, Evas_Object *obj, void *event_info) { - //SETTING_TRACE_BEGIN; + SETTING_TRACE_BEGIN; retm_if(data == NULL, "Data parameter is NULL"); int value = 0; static int old_val = -1; - SettingDisplayUG *ad = NULL; - Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; ad = list_item->userdata; value = elm_check_state_get(ad->data_br_auto->eo_check); @@ -389,7 +430,7 @@ setting_display_birghtness_bright_slider_value_change_cb(void *data, double val = elm_slider_value_get(obj); value = (int)(val + 0.5); /* SETTING_TRACE("val:%f", val); */ - //SETTING_TRACE("value:%d", value); + SETTING_TRACE("value:%d", value); if (value != old_val) { setting_display_set_slider_value(ad, obj, value); diff --git a/setting-display/src/setting-display-main.c b/setting-display/src/setting-display-main.c old mode 100644 new mode 100755 index fef5fb2..6e3857c --- a/setting-display/src/setting-display-main.c +++ b/setting-display/src/setting-display-main.c @@ -1,23 +1,27 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #include + static int setting_display_main_create(void *cb); static int setting_display_main_destroy(void *cb); static int setting_display_main_update(void *cb); @@ -30,6 +34,9 @@ setting_view setting_view_display_main = { .cleanup = setting_display_main_cleanup, }; +static char* str_in_arr[] = {"Dynamic", "Standard", "Natural", "Movie"}; +static char* str_out_arr[] = {Keystr_Dynamic, Keystr_Standard, Keystr_Natural, Keystr_Movie}; + /* *************************************************** * *basic func @@ -50,6 +57,15 @@ __setting_display_main_exp_cb(void *data, Evas_Object *obj, void *event_info) rgd = elm_radio_add(scroller); elm_radio_value_set(rgd, -1); + if(isEmulBin()) + { + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 0, /* Always ON */ + "IDS_ST_BODY_ALWAYS_ON", NULL); + } setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, @@ -97,13 +113,14 @@ __setting_display_main_exp_cb(void *data, Evas_Object *obj, void *event_info) } } - -// low battery +#if !SUPPOR_SEPARATE_BRIGHTNESS +// low battery static void setting_display_main_lowbat_cb(keynode_t *key, void* data) { ret_if(data == NULL); SettingDisplayUG *ad = (SettingDisplayUG *) data; SETTING_TRACE_BEGIN; + ret_if(ad->data_br == NULL); char* vconf_key = vconf_keynode_get_name(key); SETTING_TRACE("the value of [ %s ] just changed", vconf_key); @@ -116,14 +133,14 @@ static void setting_display_main_lowbat_cb(keynode_t *key, void* data) if (battery_value < VCONFKEY_SYSMAN_BAT_WARNING_LOW) { elm_slider_value_set(ad->data_br->eo_check, 1); - // disabled + // disabled setting_disable_genlist_item(ad->data_br->item); } else { setting_enable_genlist_item(ad->data_br->item); } return; } - +#endif static int setting_display_main_create(void *cb) { @@ -158,6 +175,32 @@ static int setting_display_main_create(void *cb) ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + char *curmode = vconf_get_str(VCONFKEY_SETAPPL_SCREENMODE_SELNAME); + SETTING_TRACE(">>> CUR SCREEN MODE : %s ", curmode); + + int i = 0; + for (; i < sizeof(str_in_arr)/sizeof(str_in_arr[0]); i++) { + if (0 == safeStrCmp(str_in_arr[i], curmode)) { + ad->data_screen_mode = setting_create_Gendial_field_def(scroller, &(itc_2text_3), + setting_display_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, Keystr_ScreenMode, + _(str_out_arr[i]), NULL); + if (ad->data_screen_mode) { + ad->data_screen_mode->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_screen_mode is NULL"); + } + break; + } + } + + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + #if !SUPPOR_SEPARATE_BRIGHTNESS /* BRIGHTNESS */ ad->data_br = setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), @@ -170,8 +213,29 @@ static int setting_display_main_create(void *cb) } else { SETTING_TRACE_ERROR("ad->data_br is NULL"); } + #endif + + int value = 0; + int ret = vconf_get_bool(VCONFKEY_SETAPPL_BOOL_AUTO_ADJUST_SCREEN_TONE, &value); + ad->data_auto_adjust_scrn_tone = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_display_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, KeyStr_AdjustScreenTone, + NULL, + setting_display_main_auto_adjust_chk_btn_cb); + if (ad->data_auto_adjust_scrn_tone) { + ad->data_auto_adjust_scrn_tone->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_battery is NULL"); + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, KeyStr_AdjustScreenTone_Dsc, NULL, NULL); + /* BACKLIGHTTIME */ - char* pa_backlight_time = get_pa_backlight_time_str(); + char* pa_backlight_time = get_pa_backlight_time_str(); ad->data_back = setting_create_Gendial_exp_parent_field(scroller, &(ad->itc_2text_3_parent), @@ -179,12 +243,21 @@ static int setting_display_main_create(void *cb) SWALLOW_Type_INVALID, "IDS_ST_LIGHTSETTINGS_BODY_BACKLIGHTTIME", pa_backlight_time); +#if SUPPORT_LCD_TIMEOUT_KEEPING + if (ad->data_back) { + ad->data_back->int_slp_setting_binded = + INT_SLP_SETTING_LCD_TIMEOUT_NORMAL_BACKUP; + } else { + SETTING_TRACE_ERROR("ad->data_back is NULL"); + } +#else if (ad->data_back) { ad->data_back->int_slp_setting_binded = INT_SLP_SETTING_LCD_TIMEOUT_NORMAL; } else { SETTING_TRACE_ERROR("ad->data_back is NULL"); - } + } +#endif G_FREE(pa_backlight_time); /* add separator */ @@ -193,7 +266,21 @@ static int setting_display_main_create(void *cb) ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - int value = 0; + + /* Smart screen */ + setting_create_Gendial_field_def(scroller, &(itc_1text), + setting_display_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, Keystr_SmartScreen, + NULL, NULL); + + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_BRIGHTNESS, &auto_value, &err); */ + value = 0; vconf_get_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, &value); ad->data_battery = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), @@ -208,13 +295,18 @@ static int setting_display_main_create(void *cb) SETTING_TRACE_ERROR("ad->data_battery is NULL"); } + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, LAUNCH_BATTERY_DESC, NULL, NULL); + +#if OPENING_EFFECT /* add separator */ item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - /* Launch Effect */ + /* Launch Effect - Opening Effect */ int launch_effect_value = 0; Ecore_X_Window root = 0; Ecore_X_Atom effect_enable_atom = 0; @@ -239,26 +331,47 @@ static int setting_display_main_create(void *cb) } else { SETTING_TRACE_ERROR("ad->data_launch_effect is NULL"); } +#endif + /* Launch Image on/off */ + ret = SETTING_RETURN_FAIL; +#ifdef UNUSED_VCONFKEY + int launch_image_value; + int err; + /* value set */ + ret = setting_get_bool_slp_key(BOOL_SLP_SETTING_LAUNCH_IMAGE, + &launch_image_value, &err); + ad->data_launch_image = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_display_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, launch_image_value, + LAUNCH_IMAGE_STR, NULL, + setting_display_main_launch_image_chk_btn_cb); + if (ad->data_launch_image) { + ad->data_launch_image->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_launch_image is NULL"); + } +#endif +#if !SUPPOR_SEPARATE_BRIGHTNESS + if (ad->data_br) { + int battery_value; + vconf_get_int(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &battery_value); + ad->low_bat = battery_value; - int battery_value; - vconf_get_int(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &battery_value); - ad->low_bat = battery_value; - - if (battery_value < VCONFKEY_SYSMAN_BAT_WARNING_LOW) - { - if (ad->data_br) { + if ( battery_value < VCONFKEY_SYSMAN_BAT_WARNING_LOW ) + { elm_slider_value_set(ad->data_br->eo_check, 1); - // disabled setting_disable_genlist_item(ad->data_br->item); } - } else { - if (ad->data_br) { + else + { setting_enable_genlist_item(ad->data_br->item); } } vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, setting_display_main_lowbat_cb, ad); - +#endif setting_view_display_main.is_create = 1; return SETTING_RETURN_SUCCESS; } @@ -270,12 +383,13 @@ static int setting_display_main_destroy(void *cb) retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); SettingDisplayUG *ad = (SettingDisplayUG *) cb; - +#if !SUPPOR_SEPARATE_BRIGHTNESS // low battery handler - registration vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, setting_display_main_lowbat_cb); - +#endif if (ad->ly_main != NULL) { evas_object_del(ad->ly_main); + /* if(ad->back_dialData) FREE(ad->back_dialData); */ setting_view_display_main.is_create = 0; } @@ -299,6 +413,20 @@ static int setting_display_main_update(void *cb) elm_genlist_item_update(ad->data_br->item); } + + if (ad->data_screen_mode) { + char *curmode = vconf_get_str(VCONFKEY_SETAPPL_SCREENMODE_SELNAME); + SETTING_TRACE(">>> CUR SCREEN MODE : %s ", curmode); + int i = 0; + for (; i < sizeof(str_in_arr)/sizeof(str_in_arr[0]); i++) { + if (0 == safeStrCmp(str_in_arr[i], curmode)) { + ad->data_screen_mode->sub_desc = (char *)g_strdup(_(str_out_arr[i])); + break; + } + } + elm_object_item_data_set(ad->data_screen_mode->item, ad->data_screen_mode); + elm_genlist_item_update(ad->data_screen_mode->item); + } } return SETTING_RETURN_SUCCESS; @@ -336,20 +464,49 @@ setting_display_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, if (!safeStrCmp("IDS_COM_OPT_BRIGHTNESS", list_item->keyStr)) { setting_view_change(&setting_view_display_main, &setting_view_display_brightness, ad); - } else if (!safeStrCmp(LAUNCH_EFFECT_STR, list_item->keyStr)) { + } + else if (!safeStrCmp(KeyStr_AdjustScreenTone, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + vconf_set_bool(VCONFKEY_SETAPPL_BOOL_AUTO_ADJUST_SCREEN_TONE, list_item->chk_status); + } +#if OPENING_EFFECT + else if (!safeStrCmp(LAUNCH_EFFECT_STR, list_item->keyStr)) { int old_status = elm_check_state_get(list_item->eo_check); /* new status */ list_item->chk_status = !old_status; elm_check_state_set(list_item->eo_check, list_item->chk_status); setting_display_main_effect_set_value(list_item); - } else if (!safeStrCmp(LAUNCH_BATTERY_STR, list_item->keyStr)) { + } +#endif +#ifdef UNUSED_VCONFKEY + else if (!safeStrCmp(LAUNCH_IMAGE_STR, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + + int err; + setting_set_bool_slp_key(BOOL_SLP_SETTING_LAUNCH_IMAGE, + list_item->chk_status, &err); + } +#endif + else if (!safeStrCmp(LAUNCH_BATTERY_STR, list_item->keyStr)) { int old_status = elm_check_state_get(list_item->eo_check); /* new status */ list_item->chk_status = !old_status; elm_check_state_set(list_item->eo_check, list_item->chk_status); vconf_set_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, list_item->chk_status); } + else if (!safeStrCmp(Keystr_ScreenMode, list_item->keyStr)) { + setting_view_change(&setting_view_display_main, &setting_view_display_screen_mode, ad); + } + else if (!safeStrCmp(Keystr_SmartScreen, list_item->keyStr)) { + setting_view_change(&setting_view_display_main, &setting_view_display_smart_screen, ad); + } } static void @@ -369,6 +526,18 @@ setting_display_main_click_softkey_back_cb(void *data, Evas_Object *obj, } +static void setting_display_main_auto_adjust_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + vconf_set_bool(VCONFKEY_SETAPPL_BOOL_AUTO_ADJUST_SCREEN_TONE, list_item->chk_status); +} + + static void setting_display_main_battery_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) @@ -382,6 +551,7 @@ setting_display_main_battery_chk_btn_cb(void *data, Evas_Object *obj, vconf_set_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, list_item->chk_status); } +#if OPENING_EFFECT static void setting_display_main_launch_effect_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) @@ -396,7 +566,29 @@ setting_display_main_launch_effect_chk_btn_cb(void *data, Evas_Object *obj, setting_display_main_effect_set_value(list_item); return; } +#endif +/* setting_display_brightness_chk_btn_cb*/ +#ifdef UNUSED_VCONFKEY +/* Fake image - launch effect*/ +static void +setting_display_main_launch_image_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + + int err; + setting_set_bool_slp_key(BOOL_SLP_SETTING_LAUNCH_IMAGE, + list_item->chk_status, &err); +} +#endif +#if OPENING_EFFECT static Ecore_X_Window setting_display_main_effect_get_root(Evas_Object * win_main) { @@ -433,3 +625,4 @@ static void setting_display_main_effect_set_value(void *data) ecore_x_window_prop_card32_set(root, effect_enable_atom, &is_enable, 1); return; } +#endif diff --git a/setting-display/src/setting-display-screen-mode.c b/setting-display/src/setting-display-screen-mode.c new file mode 100755 index 0000000..d20379e --- /dev/null +++ b/setting-display/src/setting-display-screen-mode.c @@ -0,0 +1,214 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include + +static int setting_display_screen_mode_create(void *cb); +static int setting_display_screen_mode_destroy(void *cb); +static int setting_display_screen_mode_update(void *cb); +static int setting_display_screen_mode_cleanup(void *cb); + +static char* str_in_arr[] = {"Dynamic", "Standard", "Natural", "Movie"}; +static char* str_out_arr[] = {Keystr_Dynamic, Keystr_Standard, Keystr_Natural, Keystr_Movie}; + +static void setting_display_screen_mode_mouse_up_Gendial_list_radio_cb(void *data, Evas_Object *obj, void *event_info); + +setting_view setting_view_display_screen_mode = { + .create = setting_display_screen_mode_create, + .destroy = setting_display_screen_mode_destroy, + .update = setting_display_screen_mode_update, + .cleanup = setting_display_screen_mode_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static int setting_display_screen_mode_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; + + setting_call_back_func gl_sel_cb = NULL; + Evas_Object *scroller = NULL; + Setting_GenGroupItem_Data *item_data = NULL; + + /* add basic layout */ + Evas_Object *view_layout = elm_layout_add(ad->win_main_layout); + elm_layout_file_set(view_layout, SETTING_THEME_EDJ_NAME, "search_layout"); + evas_object_size_hint_weight_set(view_layout, EVAS_HINT_EXPAND, 0.0); + evas_object_show(view_layout); + + Evas_Object *sub_layout = elm_layout_add(view_layout); + elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, "screen_mode"); + evas_object_size_hint_weight_set(sub_layout, EVAS_HINT_EXPAND, 0.0); + evas_object_show(sub_layout); + + Evas_Object *image = elm_image_add(view_layout); + elm_image_file_set(image, IMG_SCREEN_MODE, NULL); + elm_image_resizable_set(image, EINA_TRUE, EINA_TRUE); + evas_object_show(image); + + elm_object_part_content_set(sub_layout, "content", image); + elm_object_part_content_set(view_layout, "search_bar", sub_layout); + + int w = 0; + int h = 0; + elm_image_object_size_get(image, &w, &h); + SETTING_TRACE("w = %d, h = %d", w, h); + setting_resize_object(image, w * WIDGET_SCALE_FACTOR, h * WIDGET_SCALE_FACTOR); + + setting_push_layout_navi_bar(_(Keystr_ScreenMode), _("IDS_COM_BODY_BACK"), + NULL, NULL, + setting_display_screen_mode_click_softkey_back_cb, + NULL, NULL, ad, view_layout, ad->navi_bar, NULL); + + scroller = elm_genlist_add(ad->navi_bar); + retvm_if(scroller == NULL, SETTING_RETURN_FAIL, "scroller == NULL"); + elm_object_style_set(scroller, "dialogue"); + elm_genlist_clear(scroller); /* first to clear list */ + + elm_object_part_content_set(view_layout, "search_list", scroller); + + //gl_sel_cb = setting_mouse_up_Gendial_list_radio_cb; + gl_sel_cb = setting_display_screen_mode_mouse_up_Gendial_list_radio_cb; + + Evas_Object *radio = elm_radio_add(scroller); + elm_radio_state_value_set(radio, -1); + + char* curmode = vconf_get_str(VCONFKEY_SETAPPL_SCREENMODE_SELNAME); + SETTING_TRACE(">>> CUR SCREEN MODE : %s ", curmode); + + int i = 0; + + for (i=0; i< sizeof(str_in_arr)/sizeof(str_in_arr[0]) ;i++) + { + item_data = setting_create_Gendial_field_1radio(scroller, + &(itc_1text_1icon_2), + gl_sel_cb, + radio, /* sel data */ + SWALLOW_Type_1RADIO, + radio, i, + str_out_arr[i], NULL); + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + } + + // set toggle + int j; + for (j=0; j< sizeof(str_in_arr)/sizeof(str_in_arr[0]) ;j++) { + if (0 == strcmp(str_in_arr[j], curmode)) { + elm_radio_value_set(radio, j); + break; + } + } + + setting_view_display_screen_mode.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_screen_mode_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + + setting_view_display_screen_mode.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_screen_mode_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_screen_mode_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; + + setting_display_screen_mode_destroy(ad); + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +static void +setting_display_screen_mode_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, + "[Setting > Display] Data parameter is NULL"); + + SettingDisplayUG *ad = (SettingDisplayUG *) data; + + setting_view_change(&setting_view_display_screen_mode, &setting_view_display_main, ad); + SETTING_TRACE_END; +} + + +static void +setting_display_screen_mode_mouse_up_Gendial_list_radio_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(event_info == NULL, + "Invalid argument: event info is NULL"); + + Evas_Object *radio = (Evas_Object *) data; + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + //SettingDisplayUG *ad = (SettingDisplayUG *) list_item->userdata; + + elm_radio_value_set(radio, list_item->chk_status); + vconf_set_str(VCONFKEY_SETAPPL_SCREENMODE_SELNAME, str_in_arr[list_item->chk_status]); + /* Set status to device manager */ + device_set_image_enhance_mode(list_item->chk_status); + SETTING_TRACE(">>> AFTER VCONF SET : %s ", str_in_arr[list_item->chk_status]); +} diff --git a/setting-display/src/setting-display-smart-screen.c b/setting-display/src/setting-display-smart-screen.c new file mode 100755 index 0000000..c33f4f6 --- /dev/null +++ b/setting-display/src/setting-display-smart-screen.c @@ -0,0 +1,349 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include + +#define SETTING_DISPLAY_SMART_STAY "Smart stay" +#define SETTING_DISPLAY_SMART_STAY_DESC "Disables screen timeout if device detects that your face is watching the screen" + +#define SETTING_DISPLAY_SMART_ROTATION "Smart rotation" +#define SETTING_DISPLAY_SMART_ROTATION_DESC "Disables auto screen rotation by checking the orientation of your face and the device" + +#define SETTING_DISPLAY_SMART_STAY_DLG_STR1 "Smart stay disables screen timeout if device detects that your face is watching the screen" + +#define SETTING_DISPLAY_SMART_STAY_DLG_STR2 "Smart stay may not work in these situations:
"\ + " .When front camera fails to detect face
"\ + " .When using device in the dark
"\ + " .When front camera is used for the application" + +#define SETTING_DISPLAY_SMART_ROTATION_DLG_STR1 "Smart stay disables screen timeout if device detects that your face is watching the screen" + +#define SETTING_DISPLAY_SMART_ROTATION_DLG_STR2 "Smart stay may not work in these situations:
"\ + " .When front camera fails to detect face
"\ + " .When using device in the dark
"\ + " .When front camera is used for the application
"\ + "Screen rotation can be slower if Smart rotation enabled" +#define DO_NOT_ASK_AGAIN "Don't ask again" + +static int setting_display_smart_screen_create(void *cb); +static int setting_display_smart_screen_destroy(void *cb); +static int setting_display_smart_screen_update(void *cb); +static int setting_display_smart_screen_cleanup(void *cb); + +setting_view setting_view_display_smart_screen = { + .create = setting_display_smart_screen_create, + .destroy = setting_display_smart_screen_destroy, + .update = setting_display_smart_screen_update, + .cleanup = setting_display_smart_screen_cleanup, +}; + +static void +__smart_stay_on_resp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "NULL == data"); + int response_type = btn_type(obj); + SettingDisplayUG *ad = (SettingDisplayUG *) data; + if (POPUP_RESPONSE_OK == response_type) { //need set vconf + ret_if (!ad->data_smart_stay); + int err = vconf_set_int(VCONFKEY_PM_SMARTSTAY_STATUS, ad->data_smart_stay->chk_status); + if (0 != err) { //if set failed, need rollback + SETTING_TRACE_ERROR("Set vconf Failed"); + if (ad->data_smart_stay) { + ad->data_smart_stay->chk_status = !ad->data_smart_stay->chk_status; + elm_check_state_set(ad->data_smart_stay->eo_check, ad->data_smart_stay->chk_status); + } + return; + } + + if (ad->popup_chk && elm_check_state_get(ad->popup_chk)) { + vconf_set_bool(VCONFKEY_SETAPPL_SMARTSCREEN_SMARTSTAY_STATUS_REMINDER, FALSE); + } + + } else if (POPUP_RESPONSE_CANCEL == response_type) { //need rollback + if (ad->data_smart_stay) { + ad->data_smart_stay->chk_status = !ad->data_smart_stay->chk_status; + elm_check_state_set(ad->data_smart_stay->eo_check, ad->data_smart_stay->chk_status); + } + } + + evas_object_del(ad->popup); + ad->popup = NULL; + ad->popup_chk = NULL; +} + +static void +__smart_rotate_on_resp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "NULL == data"); + int response_type = btn_type(obj); + SettingDisplayUG *ad = (SettingDisplayUG *) data; + if (POPUP_RESPONSE_OK == response_type) { //need set vconf + ret_if (!ad->data_smart_rotation); + int err = vconf_set_bool(VCONFKEY_SETAPPL_SMARTSCREEN_SMART_ROTATION, ad->data_smart_rotation->chk_status); + if (0 != err) { //if set failed, need rollback + SETTING_TRACE_ERROR("Set vconf Failed"); + if (ad->data_smart_rotation) { + ad->data_smart_rotation->chk_status = !ad->data_smart_rotation->chk_status; + elm_check_state_set(ad->data_smart_rotation->eo_check, ad->data_smart_rotation->chk_status); + } + return; + } + + if (ad->popup_chk && elm_check_state_get(ad->popup_chk)) { + vconf_set_bool(VCONFKEY_SETAPPL_SMARTSCREEN_SMARTROTATE_STATUS_REMINDER, FALSE); + } + + } else if (POPUP_RESPONSE_CANCEL == response_type) { //need rollback + if (ad->data_smart_rotation) { + ad->data_smart_rotation->chk_status = !ad->data_smart_rotation->chk_status; + elm_check_state_set(ad->data_smart_rotation->eo_check, ad->data_smart_rotation->chk_status); + } + } + + evas_object_del(ad->popup); + ad->popup = NULL; + ad->popup_chk = NULL; +} + + +static void __handle_via_check_status(void *data) +{ + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + retm_if(!list_item || !list_item->userdata, "list_item == NULL || list_item->userdata"); + SettingDisplayUG *ad = list_item->userdata; + + SETTING_TRACE("list_item->chk_status = %d", list_item->chk_status); + if (!safeStrCmp(SETTING_DISPLAY_SMART_STAY, list_item->keyStr)) { + int reminder_flag = TRUE; + int ret = vconf_get_bool(VCONFKEY_SETAPPL_SMARTSCREEN_SMARTSTAY_STATUS_REMINDER, &reminder_flag); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + SETTING_TRACE("reminder_flag:%d", reminder_flag); + if (list_item->chk_status && reminder_flag) { + ad->popup = + setting_create_popup_with_image_check(ad, ad->win_get, + SETTING_DISPLAY_SMART_STAY, + _(SETTING_DISPLAY_SMART_STAY_DLG_STR1), + _(SETTING_DISPLAY_SMART_STAY_DLG_STR2), + SETTING_ICON_PATH_CFG"SmartScreen.png", + _("Don't ask again"), + &(ad->popup_chk), + __smart_stay_on_resp_cb, + 0, + 2, _("IDS_COM_SK_OK"), + _("IDS_COM_SK_CANCEL")); + return; + } + ret = + vconf_set_int(VCONFKEY_PM_SMARTSTAY_STATUS, list_item->chk_status); + if (0 != ret) { /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(list_item->eo_check, + list_item->chk_status); + return; + } + + } else if(!safeStrCmp(SETTING_DISPLAY_SMART_ROTATION, list_item->keyStr)) { + int reminder_flag = TRUE; + int ret = vconf_get_bool(VCONFKEY_SETAPPL_SMARTSCREEN_SMARTROTATE_STATUS_REMINDER, &reminder_flag); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + SETTING_TRACE("reminder_flag:%d", reminder_flag); + if (list_item->chk_status && reminder_flag) { + ad->popup = + setting_create_popup_with_image_check(ad, ad->win_get, + SETTING_DISPLAY_SMART_ROTATION, + _(SETTING_DISPLAY_SMART_ROTATION_DLG_STR1), + _(SETTING_DISPLAY_SMART_ROTATION_DLG_STR2), + SETTING_ICON_PATH_CFG"SmartScreen.png", + _("Don't ask again"), + &(ad->popup_chk), + __smart_rotate_on_resp_cb, + 0, + 2, _("IDS_COM_SK_OK"), + _("IDS_COM_SK_CANCEL")); + return; + } + ret = + vconf_set_bool(VCONFKEY_SETAPPL_SMARTSCREEN_SMART_ROTATION, list_item->chk_status); + if (0 != ret) { /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(list_item->eo_check, + list_item->chk_status); + return; + } + + } +} + +static void __setting_display_smart_screen_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + int old_status = elm_check_state_get(list_item->eo_check); + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + __handle_via_check_status(list_item); +} + +static void __setting_display_smart_screen_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + __handle_via_check_status(list_item); +} + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static int setting_display_smart_screen_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingDisplayUG *ad = (SettingDisplayUG *) cb; + + Evas_Object *scroller = NULL; + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(Keystr_SmartScreen), _("IDS_COM_BODY_BACK"), + NULL, + __setting_display_smart_screen_click_softkey_back_cb, + NULL, ad, &scroller, + ad->navi_bar); + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int ret = 0; + int value = 0; + ret = vconf_get_int(VCONFKEY_PM_SMARTSTAY_STATUS, &value); + SETTING_TRACE("value = %d", value); + setting_retvm_if(ret != 0, SETTING_RETURN_FAIL, "fail to get vconf"); + + ad->data_smart_stay = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + __setting_display_smart_screen_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, + SETTING_DISPLAY_SMART_STAY, NULL, + __setting_display_smart_screen_chk_btn_cb); + if (ad->data_smart_stay) { + ad->data_smart_stay->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_launch_image is NULL"); + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, SETTING_DISPLAY_SMART_STAY_DESC, NULL, NULL); + + ret = vconf_get_bool(VCONFKEY_SETAPPL_SMARTSCREEN_SMART_ROTATION, &value); + SETTING_TRACE("value = %d", value); + setting_retvm_if(ret != 0, SETTING_RETURN_FAIL, "fail to get vconf"); + + ad->data_smart_rotation = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + __setting_display_smart_screen_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value, + SETTING_DISPLAY_SMART_ROTATION, NULL, + __setting_display_smart_screen_chk_btn_cb); + if (ad->data_smart_rotation) { + ad->data_smart_rotation->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_launch_image is NULL"); + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, SETTING_DISPLAY_SMART_ROTATION_DESC, NULL, NULL); + + setting_view_display_smart_screen.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_smart_screen_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingDisplayUG *ad = (SettingDisplayUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_display_smart_screen.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_smart_screen_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_display_smart_screen_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingDisplayUG *ad = (SettingDisplayUG *) cb; + + setting_display_smart_screen_destroy(ad); + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +static void __setting_display_smart_screen_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, + "[Setting > Display] Data parameter is NULL"); + + SettingDisplayUG *ad = (SettingDisplayUG *) data; + + setting_view_change(&setting_view_display_smart_screen, &setting_view_display_main, ad); +} diff --git a/setting-display/src/setting-display-wallpaper.c b/setting-display/src/setting-display-wallpaper.c index 8b61cf6..51cf2d0 100755 --- a/setting-display/src/setting-display-wallpaper.c +++ b/setting-display/src/setting-display-wallpaper.c @@ -1,21 +1,25 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include +#include static int setting_display_wallpaper_create(void *cb); static int setting_display_wallpaper_destroy(void *cb); @@ -29,21 +33,67 @@ setting_view setting_view_display_wallpaper = { .cleanup = setting_display_wallpaper_cleanup, }; -//#define MAX_IMAGE_H_SIZE (600.0) -//#define MAX_IMAGE_W_SIZE (336.0) /* *************************************************** * *basic func * ***************************************************/ +static void __setting_display_wallpaper_vconf_change_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingDisplayUG *ad = (SettingDisplayUG *)data; + + char *vconf_name = vconf_keynode_get_name(key); + + if (!safeStrCmp(vconf_name, VCONFKEY_BGSET)) { + if (ad->cur_sel == WALLPAPER_CUR_SEL_LOCK_SCREEN) { + ad->cur_sel = WALLPAPER_CUR_SEL_HOME_AND_LOCK_SCREEN; + } else if (ad->cur_sel == WALLPAPER_CUR_SEL_NONE) { + ad->cur_sel = WALLPAPER_CUR_SEL_HOME_SCREEN; + } else { + /* do nothing */ + } + } else if (!safeStrCmp(vconf_name, VCONFKEY_IDLE_LOCK_BGSET)) { + if (ad->cur_sel == WALLPAPER_CUR_SEL_HOME_SCREEN) { + ad->cur_sel = WALLPAPER_CUR_SEL_HOME_AND_LOCK_SCREEN; + } else if (ad->cur_sel == WALLPAPER_CUR_SEL_NONE) { + ad->cur_sel = WALLPAPER_CUR_SEL_LOCK_SCREEN; + } else { + /* do nothing */ + } + } +} -static void __destroy_gallery_ug_cb(struct ui_gadget *ug, void *priv) +static int __setting_display_wallpaper_listen_vconf_change(void *data) { SETTING_TRACE_BEGIN; + int ret = 0; + ret = vconf_notify_key_changed(VCONFKEY_BGSET, + __setting_display_wallpaper_vconf_change_cb, data); + setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", (char *)VCONFKEY_BGSET, ret); + + ret = vconf_notify_key_changed(VCONFKEY_IDLE_LOCK_BGSET, + __setting_display_wallpaper_vconf_change_cb, data); + setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", (char *)VCONFKEY_IDLE_LOCK_BGSET, ret); + return ret; +} - /* restore the '<-' button on the navigate bar */ - ret_if(!priv); +static int __setting_display_wallpaper_unlisten_vconf_change() +{ + SETTING_TRACE_BEGIN; + (void)vconf_ignore_key_changed(VCONFKEY_BGSET, + __setting_display_wallpaper_vconf_change_cb); + (void)vconf_ignore_key_changed(VCONFKEY_IDLE_LOCK_BGSET, + __setting_display_wallpaper_vconf_change_cb); + return 0; +} + +static void __destroy_gallery_ug_cb(ui_gadget_h ug, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(priv == NULL, "Data parameter is NULL"); SettingDisplayUG *ad = (SettingDisplayUG *) priv; /* ad is point to priv */ if (ug) { @@ -51,6 +101,7 @@ static void __destroy_gallery_ug_cb(struct ui_gadget *ug, void *priv) ad->ug_loading = NULL; } + /* restore the '<-' button on the navigate bar */ Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); ret_if(!navi_it); Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); @@ -58,127 +109,51 @@ static void __destroy_gallery_ug_cb(struct ui_gadget *ug, void *priv) if (back_btn != NULL) { elm_object_style_set(back_btn, NAVI_BACK_BUTTON_STYLE); /* take into effect */ } -} - -static void setting_display_wallpaper_string_vconf_change_cb(keynode_t *key, - void *data) -{ - SettingDisplayUG *ad = data; - if (!ad) - return; /* do nothing if ad is NULL */ - char *value = vconf_keynode_get_str(key); - char *vconf_name = vconf_keynode_get_name(key); - - int w; - int h; - ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h); - - double max_image_w_size = w/2 - w*0.03; - double max_image_h_size = h*0.46875; - - if (!safeStrCmp(vconf_name, VCONFKEY_BGSET)) { - evas_object_image_file_set(ad->img_homescreen, NULL, NULL); /* give a littile time for gallery to copy the tmp file */ - Evas_Object *temp_img = evas_object_image_add(ad->evas); - int temp_w; - int temp_h; - double ratio_w, ratio_h, ratio; - - /* A:VCONFKEY_BGSET */ - evas_object_image_file_set(temp_img, value, NULL); - evas_object_image_size_get(temp_img, &temp_w, &temp_h); - SETTING_TRACE("temp_w:%d, temp_h:%d", temp_w, temp_h); - ratio_w = temp_w / max_image_w_size; - ratio_h = temp_h / max_image_h_size; - ratio = (ratio_w > ratio_h ? ratio_w : ratio_h); - SETTING_TRACE("ratio_w:%f, ratio_h:%f, ratio:%f", ratio_w, - ratio_h, ratio); - - evas_object_image_file_set(ad->img_homescreen, value, NULL); - evas_object_image_fill_set(ad->img_homescreen, 0, 0, - temp_w / ratio, temp_h / ratio); - evas_object_size_hint_min_set(ad->img_homescreen, - temp_w / ratio, temp_h / ratio); - evas_object_del(temp_img); - - } else if (!safeStrCmp(vconf_name, VCONFKEY_IDLE_LOCK_BGSET)) { - /* SETTING_TRACE("vconf_name is %s.\tvalue is %s", vconf_name, value); */ - evas_object_image_file_set(ad->img_lockscreen, NULL, NULL); /* give a littile time for gallery to copy the tmp file */ - Evas_Object *temp_img = evas_object_image_add(ad->evas); - int temp_w; - int temp_h; - double ratio_w, ratio_h, ratio; - /* A:VCONFKEY_BGSET */ - evas_object_image_file_set(temp_img, value, NULL); - evas_object_image_size_get(temp_img, &temp_w, &temp_h); - SETTING_TRACE("temp_w:%d, temp_h:%d", temp_w, temp_h); - ratio_w = temp_w / max_image_w_size; - ratio_h = temp_h / max_image_h_size; - ratio = (ratio_w > ratio_h ? ratio_w : ratio_h); - SETTING_TRACE("ratio_w:%f, ratio_h:%f, ratio:%f", ratio_w, - ratio_h, ratio); - - evas_object_image_file_set(ad->img_lockscreen, value, NULL); - evas_object_image_fill_set(ad->img_lockscreen, 0, 0, - temp_w / ratio, temp_h / ratio); - evas_object_size_hint_min_set(ad->img_lockscreen, - temp_w / ratio, temp_h / ratio); - evas_object_del(temp_img); + char text[MAX_DISPLAY_NAME_LEN_ON_UI +1] = {0, }; + SETTING_TRACE("cur_sel = %d", ad->cur_sel); + switch(ad->cur_sel) { + case WALLPAPER_CUR_SEL_HOME_SCREEN: + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%s", SETTING_WALLPAPER_HOME_SCREEN_CHANGED); + break; + case WALLPAPER_CUR_SEL_LOCK_SCREEN: + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%s", SETTING_WALLPAPER_LOCK_SCREEN_CHANGED); + break; + case WALLPAPER_CUR_SEL_HOME_AND_LOCK_SCREEN: + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%s", SETTING_WALLPAPER_HOME_AND_LOCK_SCREEN_CHANGED); + break; + default: + ad->cur_sel = WALLPAPER_CUR_SEL_NONE; + return; } -} -int setting_display_wallpaper_listen_vconf_change(void *data) -{ - SETTING_TRACE_BEGIN; - int ret; - ret = - vconf_notify_key_changed(VCONFKEY_BGSET, - setting_display_wallpaper_string_vconf_change_cb, - data); - setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", - (char *)VCONFKEY_BGSET, ret); - - ret = - vconf_notify_key_changed(VCONFKEY_IDLE_LOCK_BGSET, - setting_display_wallpaper_string_vconf_change_cb, - data); - setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", - (char *)VCONFKEY_IDLE_LOCK_BGSET, ret); - return ret; -} - -int setting_display_wallpaper_unlisten_vconf_change(void *data) -{ - SETTING_TRACE_BEGIN; + setting_create_sel_info_popup(ad->view_layout, + &(ad->selInfoPop_layout), + &(ad->selInfoPop)); + elm_notify_timeout_set(ad->selInfoPop, 3); - (void)vconf_ignore_key_changed(VCONFKEY_BGSET, - setting_display_wallpaper_string_vconf_change_cb); - (void)vconf_ignore_key_changed(VCONFKEY_IDLE_LOCK_BGSET, - setting_display_wallpaper_string_vconf_change_cb); - return 0; + edje_object_part_text_set(_EDJ(ad->selInfoPop_layout), "elm.text", text); + ad->cur_sel = WALLPAPER_CUR_SEL_NONE; } -static void -__wall_button_clicked_cb(void *data, Evas_Object *obj, void *event_info) +static void __setting_display_wallpaper_ug_launch(void *data) { SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); SettingDisplayUG *ad = (SettingDisplayUG *) data; - if (!ad) return; /* do nothing if ad is NULL */ - if (ad->ug_loading) return; // prevent double-clicked - - bundle *b = bundle_create(); - if (!b) { + service_h svc; + if (service_create(&svc)) { return; } - bundle_add(b, "launch-type", "select-setas"); - bundle_add(b, "setas-type", "wallpaper"); - bundle_add(b, "file-type", "image"); + service_add_extra_data(svc, "launch-type", "select-setas"); + service_add_extra_data(svc, "setas-type", "wallpaper"); + service_add_extra_data(svc, "file-type", "image"); struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); if (!cbs) { - bundle_free(b); + service_destroy(svc); return; } @@ -187,126 +162,116 @@ __wall_button_clicked_cb(void *data, Evas_Object *obj, void *event_info) cbs->destroy_cb = __destroy_gallery_ug_cb; cbs->priv = (void *)ad; - ad->ug_loading = - ug_create(ad->ug, "gallery-efl", UG_MODE_FULLVIEW, b, cbs); + ad->ug_loading = ug_create(ad->ug, "gallery-efl", UG_MODE_FULLVIEW, svc, cbs); if (NULL == ad->ug_loading) { /* error handling */ SETTING_TRACE_ERROR("NULL == ad->ug_loading"); - setting_create_popup_without_title(ad, ad->win_get, _("Cannot support this function")); - // popup message - + setting_create_simple_popup(ad, ad->win_get, NULL, _(UNSUPPORTED_FUNCTION)); } - bundle_free(b); + + service_destroy(svc); FREE(cbs); } +static void __setting_display_wallpaper_mouse_up_Gendial_list_cb(void *data, Evas_Object * obj, void *event_info) +{ + //error check + setting_retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingDisplayUG *ad = (SettingDisplayUG *) data; + + if (!safeStrCmp("IDS_ST_MBODY_HOME_SCREEN_WALLPAPER", list_item->keyStr)) { + __setting_display_wallpaper_ug_launch(ad); + } else if (!safeStrCmp("IDS_ST_MBODY_LOCK_SCREEN_WALLPAPER_M_NOUN", list_item->keyStr)) { + __setting_display_wallpaper_ug_launch(ad); + } else if (!safeStrCmp(SETTING_WALLPAPER_HOME_AND_LOCK_SCREEN, list_item->keyStr)) { + __setting_display_wallpaper_ug_launch(ad); + } else { + /* do nothing */ + } + +} + static int setting_display_wallpaper_create(void *cb) { SETTING_TRACE_BEGIN; retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); SettingDisplayUG *ad = (SettingDisplayUG *) cb; /* ad is point to cb */ + ad->cur_sel = WALLPAPER_CUR_SEL_NONE; + + Evas_Object *view_layout = elm_layout_add(ad->win_main_layout); + elm_layout_file_set(view_layout, SETTING_THEME_EDJ_NAME, "selinfo_bottom"); + evas_object_size_hint_weight_set(view_layout, EVAS_HINT_EXPAND, 0.0); + ad->view_layout = view_layout; + + Evas_Object *controllbar = NULL; + Evas_Object *scroller = NULL; + + ad->ly_wall = setting_create_layout_navi_bar(ad->win_main_layout, ad->win_get, + _(KeyStr_Wallpaper), + _("IDS_COM_BODY_BACK"), NULL, NULL, + setting_display_wallpaper_click_softkey_cancel_cb, + NULL, NULL, ad, view_layout, + &ad->navi_bar, &controllbar); + + scroller = elm_genlist_add(ad->navi_bar); + elm_object_style_set(scroller, "dialogue"); + retvm_if(scroller == NULL, SETTING_RETURN_FAIL, "Cannot set scroller object as contento of layout"); + elm_genlist_clear(scroller); /* first to clear list */ + elm_object_part_content_set(view_layout, "elm.swallow.contents", scroller); + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->data_home_screen = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + __setting_display_wallpaper_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, "IDS_ST_MBODY_HOME_SCREEN_WALLPAPER", + NULL, NULL); + if (ad->data_home_screen) { + ad->data_home_screen->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->screen_reader is NULL"); + return SETTING_RETURN_FAIL; + } + + ad->data_lock_screen = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + __setting_display_wallpaper_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, "IDS_ST_MBODY_LOCK_SCREEN_WALLPAPER_M_NOUN", + NULL, NULL); + if (ad->data_lock_screen) { + ad->data_lock_screen->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->screen_reader is NULL"); + return SETTING_RETURN_FAIL; + } - Evas_Object *sub_layout = elm_layout_add(ad->win_main_layout); - elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, - "wallpaper_layout"); - evas_object_size_hint_weight_set(sub_layout, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - - ad->ly_wall = - setting_create_layout_navi_bar_scroller(ad->win_main_layout, - ad->win_get, - _(KeyStr_Wallpaper), - (char *)dgettext("sys_string", "IDS_COM_BODY_BACK"), - NULL, - setting_display_wallpaper_click_softkey_cancel_cb, - NULL, ad, &(ad->scrl_wall), - &(ad->navi_bar)); - - /* pack outer box into scroller */ - elm_object_content_set(ad->scrl_wall, sub_layout); - - int w; - int h; - ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h); - - double max_image_w_size = w/2 - w*0.03; - double max_image_h_size = h*0.46875; - - /* elm_scroller_content_set(scroller, sub_layout); */ - Evas_Object *eo_left, *eo_right; - Evas_Object *temp_img = evas_object_image_add(ad->evas); - int temp_w; - int temp_h; - double ratio_w, ratio_h, ratio; - char *pa_image_path = NULL; - - /* A:VCONFKEY_BGSET */ - pa_image_path = vconf_get_str(VCONFKEY_BGSET); - evas_object_image_file_set(temp_img, pa_image_path, NULL); - evas_object_image_size_get(temp_img, &temp_w, &temp_h); - SETTING_TRACE("temp_w:%d, temp_h:%d", temp_w, temp_h); - ratio_w = temp_w / max_image_w_size; - ratio_h = temp_h / max_image_h_size; - ratio = (ratio_w > ratio_h ? ratio_w : ratio_h); - SETTING_TRACE("ratio_w:%f, ratio_h:%f, ratio:%f", ratio_w, ratio_h, - ratio); - create_image_box_add_ex(NULL, ad->win_main_layout, ad->evas, pa_image_path, - temp_w / ratio, temp_h / ratio, NULL, NULL, - &eo_left, &(ad->img_homescreen)); - - evas_object_del(temp_img); - FREE(pa_image_path); - - /* temp_img are being used in both bgset & lock screen. */ - Evas_Object *temp_img2 = evas_object_image_add(ad->evas); - - /* B:VCONFKEY_IDLE_LOCK_BGSET */ - pa_image_path = vconf_get_str(VCONFKEY_IDLE_LOCK_BGSET); - evas_object_image_file_set(temp_img2, pa_image_path, NULL); - evas_object_image_size_get(temp_img2, &temp_w, &temp_h); - SETTING_TRACE("temp_w:%d, temp_h:%d", temp_w, temp_h); - ratio_w = temp_w / max_image_w_size; - ratio_h = temp_h / max_image_h_size; - ratio = (ratio_w > ratio_h ? ratio_w : ratio_h); - SETTING_TRACE("ratio_w:%f, ratio_h:%f, ratio:%f", ratio_w, ratio_h, - ratio); - create_image_box_add_ex(NULL, ad->win_main_layout, ad->evas, pa_image_path, - temp_w / ratio, temp_h / ratio, NULL, NULL, - &eo_right, &(ad->img_lockscreen)); - evas_object_del(temp_img2); - FREE(pa_image_path); - - elm_object_part_content_set(sub_layout, "left_swallow", eo_left); - elm_object_part_content_set(sub_layout, "right_swallow", eo_right); - - edje_object_part_text_set(_EDJ(sub_layout), "left_text", - _(KeyStr_HomeScreen)); - edje_object_part_text_set(_EDJ(sub_layout), "right_text", - _(KeyStr_LockedScreen)); - - /* button : change wallpaper */ - Evas_Object *btn = elm_button_add(sub_layout); - elm_object_text_set(btn, _(SETING_DISPLAY_WALLPAPER_CHANGE_WALLPAPER_STR)); - evas_object_smart_callback_add(btn, "clicked", __wall_button_clicked_cb, - ad); - elm_object_part_content_set(sub_layout, "btn", btn); - - SETTING_TRACE_DEBUG("get theme : %d", setting_get_theme()); - if (Theme_Tizen_Black == setting_get_theme()) { - SETTING_TRACE_DEBUG("black theme"); - elm_object_style_set(btn, "sweep"); - edje_object_signal_emit(_EDJ(sub_layout), "change,non-white,theme", "elm"); - } else if (Theme_Tizen_Blue == setting_get_theme()) { - SETTING_TRACE_DEBUG("blue theme"); - edje_object_signal_emit(_EDJ(sub_layout), "change,non-white,theme", "elm"); - } else if (Theme_Tizen_Grey == setting_get_theme()) { - SETTING_TRACE_DEBUG("grey theme"); - edje_object_signal_emit(_EDJ(sub_layout), "change,non-white,theme", "elm"); + ad->data_home_lock_screen = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + __setting_display_wallpaper_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_WALLPAPER_HOME_AND_LOCK_SCREEN, + NULL, NULL); + if (ad->data_home_lock_screen) { + ad->data_home_lock_screen->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->screen_reader is NULL"); + return SETTING_RETURN_FAIL; } setting_view_display_wallpaper.is_create = 1; - setting_display_wallpaper_listen_vconf_change(ad); + __setting_display_wallpaper_listen_vconf_change(ad); return SETTING_RETURN_SUCCESS; } @@ -317,10 +282,16 @@ static int setting_display_wallpaper_destroy(void *cb) retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); SettingDisplayUG *ad = (SettingDisplayUG *) cb; /* ad is point to cb */ - setting_display_wallpaper_unlisten_vconf_change(ad); + __setting_display_wallpaper_unlisten_vconf_change(); + + if (ad->selInfoPop) { + evas_object_del(ad->selInfoPop); + ad->selInfoPop = NULL; + } if (ad->ly_wall != NULL) { evas_object_del(ad->ly_wall); + ad->ly_wall = NULL; } setting_view_display_wallpaper.is_create = 0; @@ -334,6 +305,7 @@ static int setting_display_wallpaper_update(void *cb) static int setting_display_wallpaper_cleanup(void *cb) { + SETTING_TRACE_BEGIN; return SETTING_RETURN_SUCCESS; } diff --git a/setting-display/src/setting-display.c b/setting-display/src/setting-display.c old mode 100644 new mode 100755 index e98b1c8..64b38b9 --- a/setting-display/src/setting-display.c +++ b/setting-display/src/setting-display.c @@ -1,24 +1,36 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +/** + *@defgroup setting-display + *UG creation code for setting-display + * + * - Screen Mode + * - Backlight time + * - Smart Screen + * - Battery percentage + */ #include #include -#include #define SETTING_BRIGHTNESS_LEVEL_FOR_EMUL 24 @@ -26,28 +38,48 @@ #define UG_MODULE_API __attribute__ ((visibility("default"))) #endif -setting_view *__get_display_view_to_load(bundle *data) +setting_view *__get_display_view_to_load(service_h service) { SETTING_TRACE_BEGIN; - setting_retvm_if(NULL == data, NULL, "NULL == data"); - const char *viewtype = bundle_get_val(data, "viewtype"); + + char *viewtype = NULL; + + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + SETTING_TRACE("viewtype:%s", viewtype); if (!safeStrCmp(viewtype, "brightness")) { + setting_view_node_table_register(&setting_view_display_brightness, + NULL); return &setting_view_display_brightness; } else if (!safeStrCmp(viewtype, "wallpaper")) { + setting_view_node_table_register(&setting_view_display_wallpaper, NULL); return &setting_view_display_wallpaper; } else { + setting_view_node_table_register(&setting_view_display_main, NULL); + setting_view_node_table_register(&setting_view_display_screen_mode, + &setting_view_display_main); + setting_view_node_table_register(&setting_view_display_brightness, + &setting_view_display_main); + setting_view_node_table_register(&setting_view_display_smart_screen, + &setting_view_display_main); return &setting_view_display_main; } } -Evas_Object *__get_display_layout_to_return(bundle *data, void *priv) +Evas_Object *__get_display_layout_to_return(service_h service, void *priv) { SETTING_TRACE_BEGIN; SettingDisplayUG *displayUG = priv; - const char *viewtype = bundle_get_val(data, "viewtype"); + char *viewtype = NULL; + + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + SETTING_TRACE("viewtype:%s", viewtype); if (!safeStrCmp(viewtype, "wallpaper")) { @@ -65,16 +97,15 @@ static void setting_display_ug_cb_resize(void *data, Evas *e, setting_view_update(ad->view_to_load, ad); } -static void *setting_display_ug_on_create(struct ui_gadget *ug, - enum ug_mode mode, bundle *data, +static void *setting_display_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, void *priv) { - setting_retvm_if((!ug || !priv), NULL, "!ug || !priv"); + setting_retvm_if((!priv), NULL, "!priv"); SettingDisplayUG *displayUG = priv; displayUG->ug = ug; - bindtextdomain(SETTING_PACKAGE, SETTING_LOCALEDIR); - textdomain(SETTING_PACKAGE); + appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); displayUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); displayUG->win_get = (Evas_Object *) ug_get_window(); @@ -88,10 +119,6 @@ static void *setting_display_ug_on_create(struct ui_gadget *ug, /* register view node table */ setting_view_node_table_intialize(); - setting_view_node_table_register(&setting_view_display_main, NULL); - setting_view_node_table_register(&setting_view_display_brightness, - &setting_view_display_main); - setting_view_node_table_register(&setting_view_display_wallpaper, NULL); setting_create_Gendial_itc("dialogue/2text.3", &(displayUG->itc_2text_2)); @@ -102,15 +129,16 @@ static void *setting_display_ug_on_create(struct ui_gadget *ug, &(displayUG->itc_2text_3_parent)); setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", &(displayUG->itc_1icon_1text_sub)); + setting_create_Gendial_itc("dialogue/1text", &(displayUG->itc_1text)); + displayUG->itc_seperator.item_style = "dialogue/separator/21/with_line"; displayUG->itc_seperator.func.text_get = NULL; displayUG->itc_seperator.func.content_get = NULL; displayUG->itc_seperator.func.state_get = NULL; displayUG->itc_seperator.func.del = NULL; - setting_create_Gendial_itc("dialogue/1text", &(displayUG->itc_1text)); /* creating a view. */ - displayUG->view_to_load = __get_display_view_to_load(data); + displayUG->view_to_load = __get_display_view_to_load(service); setting_retvm_if(NULL == displayUG->view_to_load, NULL, "NULL == displayUG->view_to_load"); setting_view_node_set_cur_view(displayUG->view_to_load); @@ -118,29 +146,29 @@ static void *setting_display_ug_on_create(struct ui_gadget *ug, evas_object_event_callback_add(displayUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_display_ug_cb_resize, displayUG); - return __get_display_layout_to_return(data, displayUG); + return __get_display_layout_to_return(service, displayUG); } -static void setting_display_ug_on_start(struct ui_gadget *ug, bundle *data, +static void setting_display_ug_on_start(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_display_ug_on_pause(struct ui_gadget *ug, bundle *data, +static void setting_display_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_display_ug_on_resume(struct ui_gadget *ug, bundle *data, +static void setting_display_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_display_ug_on_destroy(struct ui_gadget *ug, bundle *data, +static void setting_display_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) { SETTING_TRACE_BEGIN; - setting_retm_if((!ug || !priv), "!ug || !priv"); + setting_retm_if((!priv), "!priv"); SettingDisplayUG *displayUG = priv; /* fix flash issue for gallery */ @@ -151,10 +179,15 @@ static void setting_display_ug_on_destroy(struct ui_gadget *ug, bundle *data, if (&setting_view_display_main == displayUG->view_to_load) { setting_view_destroy(&setting_view_display_brightness, displayUG); + setting_view_destroy(&setting_view_display_screen_mode, displayUG); + setting_view_destroy(&setting_view_display_smart_screen, displayUG); setting_view_destroy(&setting_view_display_main, displayUG); } else if (&setting_view_display_wallpaper == displayUG->view_to_load) { setting_view_destroy(&setting_view_display_wallpaper, displayUG); + } else if (&setting_view_display_brightness == displayUG->view_to_load) { + setting_view_destroy(&setting_view_display_brightness, + displayUG); } if (NULL != ug_get_layout(displayUG->ug)) { @@ -165,14 +198,14 @@ static void setting_display_ug_on_destroy(struct ui_gadget *ug, bundle *data, SETTING_TRACE_END; } -static void setting_display_ug_on_message(struct ui_gadget *ug, bundle *msg, - bundle *data, void *priv) +static void setting_display_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) { SETTING_TRACE_BEGIN; } -static void setting_display_ug_on_event(struct ui_gadget *ug, - enum ug_event event, bundle *data, +static void setting_display_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, void *priv) { SETTING_TRACE_BEGIN; @@ -198,14 +231,12 @@ static void setting_display_ug_on_event(struct ui_gadget *ug, } } -static void setting_display_ug_on_key_event(struct ui_gadget *ug, +static void setting_display_ug_on_key_event(ui_gadget_h ug, enum ug_key_event event, - bundle *data, void *priv) + service_h service, void *priv) { SETTING_TRACE_BEGIN; SettingDisplayUG *ad = (SettingDisplayUG *) priv; - if (!ug) - return; switch (event) { case UG_KEY_EVENT_END: @@ -264,13 +295,13 @@ UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) * ***************************************************/ -void setting_display_layout_ug_cb(struct ui_gadget *ug, enum ug_mode mode, +void setting_display_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) { SettingDisplayUG *ad = (SettingDisplayUG *) priv; Evas_Object *base; - if (!ug || !priv) + if (!priv) return; SETTING_TRACE_BEGIN; @@ -298,11 +329,22 @@ static int setting_reset_display_brightness(void) SETTING_TRACE_BEGIN; int ret = 0; - ret += vconf_set_bool(VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_BOOL, FALSE); - ret += vconf_set_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, SETTING_BRIGHTNESS_LEVEL_FOR_EMUL); + ret += vconf_set_int(VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT, SETTING_BRIGHTNESS_AUTOMATIC_OFF); + + if(isEmulBin()) + { + ret += vconf_set_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, SETTING_BRIGHTNESS_LEVEL_FOR_EMUL); #if USE_DEVICE_SET_DISPLAY_BRT - ret += device_set_display_brt(DEV_MAIN_DISPLAY, SETTING_BRIGHTNESS_LEVEL_FOR_EMUL); + ret += device_set_brightness(BRIGHTNESS_DISPLAY, SETTING_BRIGHTNESS_LEVEL_FOR_EMUL); #endif + } + else + { + ret += vconf_set_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, SETTING_BRIGHTNESS_LEVEL7); +#if USE_DEVICE_SET_DISPLAY_BRT + ret += device_set_brightness(BRIGHTNESS_DISPLAY, SETTING_BRIGHTNESS_LEVEL7);; +#endif + } SETTING_TRACE_END; return ret; } @@ -312,15 +354,14 @@ static int setting_reset_display_backlight(void) { SETTING_TRACE_BEGIN; int ret = 0; - - if (isEmulBin()) { - ret += vconf_set_int(VCONFKEY_SYSMAN_LCD_TIMEOUT_NORMAL, - SETTING_BACKLIGHT_TIME_10MIN); - } - else { - ret += vconf_set_int(VCONFKEY_SYSMAN_LCD_TIMEOUT_NORMAL, - SETTING_BACKLIGHT_TIME_30SEC); - } +#if SUPPORT_LCD_TIMEOUT_KEEPING + ret += vconf_set_int(VCONFKEY_LCD_TIMEOUT_NORMAL_BACKUP, 0); +#else + if(isEmulBin()) + ret += vconf_set_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, 0); + else + ret += vconf_set_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, 30); +#endif SETTING_TRACE_END; return ret; } @@ -341,7 +382,7 @@ static int setting_reset_display_lc_screen(void) SETTING_TRACE_BEGIN; int ret = 0; ret += vconf_set_str(VCONFKEY_IDLE_LOCK_BGSET, IMG_DEFAULT_HOME_SCREEN); - ret += setting_invoke_reset_function("/opt/ug/lib/libug-setting-lock.so", NULL, NULL); + ret += setting_invoke_reset_function("/opt/ug/lib/libug-setting-lock.so", 0, NULL); return ret; } @@ -373,35 +414,39 @@ static int setting_reset_display_main(void) int ret = 0; ret += setting_reset_display_backlight(); ret += setting_reset_display_brightness(); - - ret += vconf_set_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, FALSE);//battery percent - ret += vconf_set_bool(VCONFKEY_LAUNCH_EFFECT, FALSE);//launch image + ret += vconf_set_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, FALSE);//battery percent setting_reset_launch_effect(); + // smart screen + ret += vconf_set_int(VCONFKEY_PM_SMARTSTAY_STATUS, 0); + ret += vconf_set_bool(VCONFKEY_SETAPPL_SMARTSCREEN_SMART_ROTATION, FALSE); return ret; } /*****/ -UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) { SETTING_TRACE_BEGIN; int ret = 0; - const char *ug_type = bundle_get_val(data, "viewtype"); /* usb */ + char *ug_type = NULL; + + service_get_extra_data(service, "viewtype", &ug_type); SETTING_TRACE("ug_type:%s", ug_type); if (0 == safeStrCmp(ug_type, "wallpaper")) { - + /*ret += setting_reset_home_wallpaper(); + ret += setting_reset_display_lc_screen();*/ #if SUPPORT_RUN_SYSTEM_COMMAND ret += excuteCmd(SETTING_POSTINST_FILE, 1, "wallpaper"); - ret += setting_invoke_reset_function("/opt/ug/lib/libug-setting-lock.so", NULL, NULL); + ret += setting_invoke_reset_function("/opt/ug/lib/libug-setting-lock.so", service, NULL); #else ret += setting_reset_home_wallpaper(); ret += setting_reset_display_lc_screen(); #endif - + } else if (0 == safeStrCmp(ug_type, "main")) { #if SUPPORT_RUN_SYSTEM_COMMAND ret += excuteCmd(SETTING_POSTINST_FILE, 1, "display"); diff --git a/setting-fileview/CMakeLists.txt b/setting-fileview/CMakeLists.txt new file mode 100755 index 0000000..77f24c0 --- /dev/null +++ b/setting-fileview/CMakeLists.txt @@ -0,0 +1,35 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_fileview REQUIRED + elementary appcore-common appcore-efl ui-gadget-1 capi-appfw-application evas ecore ewebkit2) + +FOREACH(flag ${pkgs_fileview_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_FILEVIEW_UG} SHARED + src/setting-fileview.c + src/setting-fileview-main.c +) + +TARGET_LINK_LIBRARIES(${SETTING_FILEVIEW_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON}/ -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_FILEVIEW_UG} ${pkgs_fileview_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_FILEVIEW_UG} DESTINATION /opt/ug/lib) diff --git a/setting-fileview/include/setting-fileview-main.h b/setting-fileview/include/setting-fileview-main.h new file mode 100755 index 0000000..2f0f1a5 --- /dev/null +++ b/setting-fileview/include/setting-fileview-main.h @@ -0,0 +1,27 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_FILEVIEW_LICENCES_H__ +#define __SETTING_FILEVIEW_LICENCES_H__ + +#include + +static void setting_fileview_click_back_cb(void *data, Evas_Object *obj, void *event_info); +#endif /* __SETTING_FILEVIEW_LICENCES_H__ */ diff --git a/setting-fileview/include/setting-fileview.h b/setting-fileview/include/setting-fileview.h new file mode 100755 index 0000000..da541f2 --- /dev/null +++ b/setting-fileview/include/setting-fileview.h @@ -0,0 +1,51 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_FILEVIEW_H__ +#define __SETTING_FILEVIEW_H__ + +#include +#include +#include +#include +#include + +typedef struct _SettingFileviewUG SettingFileviewUG; + +/** + * Setting About UG context + * all UG function has void* as an agument. this is casted back to SettingFileviewUG + * and the functions access app context. + */ +struct _SettingFileviewUG { + ui_gadget_h ug; + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + Evas_Object *navi_bar; + Evas_Object *ly_main; + Evas_Object *progress_bar; + char *input_file; + char *input_title; + + Evas_Object *webkit; +}; +extern setting_view setting_view_fileview_main; +#endif /* __SETTING_FILEVIEW_H__ */ diff --git a/setting-fileview/src/setting-fileview-main.c b/setting-fileview/src/setting-fileview-main.c new file mode 100755 index 0000000..6b2c1a1 --- /dev/null +++ b/setting-fileview/src/setting-fileview-main.c @@ -0,0 +1,181 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include + +static int setting_fileview_create(void *cb); +static int setting_fileview_destroy(void *cb); +static int setting_fileview_update(void *cb); +static int setting_fileview_cleanup(void *cb); + +setting_view setting_view_fileview_main = { + .create = setting_fileview_create, + .destroy = setting_fileview_destroy, + .update = setting_fileview_update, + .cleanup = setting_fileview_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ +#if DISABLED_CODE +static Eina_Bool __web_on_idle(void *data) +{ + SETTING_TRACE_BEGIN; + SettingFileviewUG *ad = (SettingFileviewUG *) data; + if (ad->progress_bar) { + evas_object_del(ad->progress_bar); + ad->progress_bar = NULL; + } + return FALSE; +} + +static void __setting_fileview_policy_navigation_decide(void *data, Evas_Object *webview, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "data is NULL"); + setting_retm_if(event_info == NULL, "event_info is NULL"); + + SettingFileviewUG *ad = (SettingFileviewUG *)data; + + Ewk_Policy_Decision *policy_decision = (Ewk_Policy_Decision *)event_info; + ewk_policy_decision_ignore(policy_decision); + + char *url = (char *)ewk_policy_decision_url_get(policy_decision); + char *scheme = (char *)ewk_policy_decision_scheme_get(policy_decision); + SETTING_TRACE("url : %s", url); + SETTING_TRACE("scheme : %s", scheme); + + int ret = 0; + service_h service = NULL; + ret = service_create(&service); + setting_retm_if(service == NULL, "service is NULL"); + + ret = service_set_operation(service, SERVICE_OPERATION_VIEW); + ret = service_set_uri(service, url); + ret = service_send_launch_request(service, NULL, NULL); + ret = service_destroy(service); +} +#endif + +static int setting_fileview_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingFileviewUG *ad = (SettingFileviewUG *) cb; + + Evas_Object *scroller; + //ad->progress_bar = setting_create_popup_with_progressbar(ad, ad->win_get, "pending_list", NULL, NULL, NULL, 0, TRUE, TRUE); + + ad->ly_main = setting_create_layout_navi_bar_scroller(ad->win_main_layout, + ad->win_get, + _(ad->input_title),//_("IDS_ST_BODY_OPEN_SOURCE_LICENCES"), + _("IDS_COM_BODY_BACK"), + NULL, + setting_fileview_click_back_cb, + NULL, ad, &scroller, + &(ad->navi_bar)); + + //Evas *evas = evas_object_evas_get(ad->win_get); + //Evas_Object *webview = ewk_view_add(evas); + //ad->webkit = webview; + + SETTING_TRACE("ad->input_file:%s", ad->input_file); + //ewk_view_uri_set(ad->webkit, ad->input_file); + + elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_FALSE); + + //elm_object_content_set(scroller, ad->webkit); + //evas_object_show(ad->webkit); + //ecore_idler_add(__web_on_idle, ad); + + //evas_object_smart_callback_add(ad->webkit, "policy,navigation,decide", __setting_fileview_policy_navigation_decide, ad); + + setting_view_fileview_main.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_fileview_destroy(void *cb) +{ + /* error check */ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingFileviewUG *ad = (SettingFileviewUG *) cb; + //evas_object_smart_callback_del(ad->webkit, "policy,navigation,decide", __setting_fileview_policy_navigation_decide); + + //if (ad->webkit) { + // evas_object_del(ad->webkit); + // ad->webkit = NULL; + //} + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + ad->ly_main = NULL; + setting_view_fileview_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_fileview_update(void *cb) +{ + SETTING_TRACE_BEGIN; + SettingFileviewUG *ad = (SettingFileviewUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + } + return SETTING_RETURN_SUCCESS; + +} + +static int setting_fileview_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + SettingFileviewUG *ad = (SettingFileviewUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_hide(ad->ly_main); + } + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_fileview_click_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + setting_retm_if(data == NULL, " Data parameter is NULL"); + + SettingFileviewUG *ad = (SettingFileviewUG *) data; + /* Send destroy request */ + ug_destroy_me(ad->ug); + return; +} diff --git a/setting-fileview/src/setting-fileview.c b/setting-fileview/src/setting-fileview.c new file mode 100755 index 0000000..a2491bd --- /dev/null +++ b/setting-fileview/src/setting-fileview.c @@ -0,0 +1,252 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +/** + *@defgroup setting-fileview + *UG creation code for setting-fileview + * html file viewer + */ + +#include +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +bool __parse_ug_argument(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingFileviewUG *ad = priv; + ad->input_file = NULL; + + service_get_extra_data(service, "file", &(ad->input_file)); + setting_retvm_if(!ad->input_file, FALSE, "no arguement to specialize file"); + + ad->input_title = NULL; + + service_get_extra_data(service, "title", &(ad->input_title)); + setting_retvm_if(!ad->input_title, FALSE, "no arguement to title"); + SETTING_TRACE("ad->input_file:%s", ad->input_file); + SETTING_TRACE("ad->input_title:%s", ad->input_title); + return TRUE; +} + +/** +* Event process when the sizeof UG view changes +* +* @param data +* @param e +* @param obj +* @param event_info +*/ +static void setting_fileview_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, + void *event_info) +{ + SettingFileviewUG *ad = (SettingFileviewUG *) data; + setting_view_update(&setting_view_fileview_main, ad); +} + +/** +* on_create function of the UG +* +* @param ug +* @param mode +* @param data +* @param priv +* +* @return +*/ +static void *setting_fileview_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if((NULL == priv), NULL, "NULL == priv"); + SettingFileviewUG *fileviewUG = priv; + fileviewUG->ug = ug; + + fileviewUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + fileviewUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(fileviewUG->win_main_layout); + fileviewUG->evas = evas_object_evas_get(fileviewUG->win_main_layout); + + setting_retvm_if(fileviewUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + /* creating a view. */ + if (!__parse_ug_argument(service, priv)) + { + SETTING_TRACE_ERROR("Invalid arguement"); + return NULL; + } + setting_view_create(&setting_view_fileview_main, (void *)fileviewUG); + evas_object_event_callback_add(fileviewUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_fileview_ug_cb_resize, fileviewUG); + return fileviewUG->ly_main; +} + +static void setting_fileview_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_fileview_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == priv, "NULL == priv"); + SettingFileviewUG *fileviewUG = priv; + if (fileviewUG->webkit) { + ewk_view_visibility_set(fileviewUG->webkit, EINA_FALSE); + } +} + +static void setting_fileview_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == priv, "NULL == priv"); + SettingFileviewUG *fileviewUG = priv; + if (fileviewUG->webkit) { + ewk_view_visibility_set(fileviewUG->webkit, EINA_TRUE); + } +} + +/** +* on_destroy function of the UG +* +* @param ug +* @param data +* @param priv +*/ +static void setting_fileview_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingFileviewUG *fileviewUG = priv; + + evas_object_event_callback_del(fileviewUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_fileview_ug_cb_resize); /* fix flash issue for gallery */ + fileviewUG->ug = ug; + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_fileview_main, fileviewUG); + + if (NULL != ug_get_layout(fileviewUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(fileviewUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(fileviewUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_fileview_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_fileview_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + switch (event) { + case UG_EVENT_LOW_MEMORY: + break; + case UG_EVENT_LOW_BATTERY: + break; + case UG_EVENT_LANG_CHANGE: + break; + case UG_EVENT_ROTATE_PORTRAIT: + break; + case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN: + break; + case UG_EVENT_ROTATE_LANDSCAPE: + break; + case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN: + break; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_fileview_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingFileviewUG *ad = (SettingFileviewUG *) priv; + + switch (event) { + case UG_KEY_EVENT_END: + { + if (elm_naviframe_top_item_get(ad->navi_bar) == + elm_naviframe_bottom_item_get(ad->navi_bar)) { + ug_destroy_me(ug); + } else { + /* elm_naviframe_item_pop(ad->navi_bar); */ + setting_view_cb_at_endKey(ad); + } + } + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingFileviewUG *fileviewUG = calloc(1, sizeof(SettingFileviewUG)); + setting_retvm_if(!fileviewUG, -1, "Create SettingFileviewUG obj failed"); + + ops->create = setting_fileview_ug_on_create; + ops->start = setting_fileview_ug_on_start; + ops->pause = setting_fileview_ug_on_pause; + ops->resume = setting_fileview_ug_on_resume; + ops->destroy = setting_fileview_ug_on_destroy; + ops->message = setting_fileview_ug_on_message; + ops->event = setting_fileview_ug_on_event; + ops->key_event = setting_fileview_ug_on_key_event; + ops->priv = fileviewUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingFileviewUG *fileviewUG; + setting_retm_if(!ops, "ops == NULL"); + + fileviewUG = ops->priv; + if (fileviewUG) { + FREE(fileviewUG); + } +} + +/* *************************************************** + ** + **general func + ** + ****************************************************/ + diff --git a/setting-font/CMakeLists.txt b/setting-font/CMakeLists.txt new file mode 100755 index 0000000..f6037d2 --- /dev/null +++ b/setting-font/CMakeLists.txt @@ -0,0 +1,34 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_font REQUIRED ecore ecore-file evas elementary appcore-common appcore-efl ui-gadget-1 capi-appfw-application +sysman fontconfig libxml-2.0) + +FOREACH(flag ${pkgs_font_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_FONT_UG} SHARED + ./src/setting-font.c + ./src/setting-font-main.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_FONT_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_FONT_UG} ${pkgs_font_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_FONT_UG} DESTINATION /opt/ug/lib) diff --git a/setting-font/include/setting-font-main.h b/setting-font/include/setting-font-main.h new file mode 100755 index 0000000..da185d9 --- /dev/null +++ b/setting-font/include/setting-font-main.h @@ -0,0 +1,35 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_FONT_MAIN_H__ +#define __SETTING_FONT_MAIN_H__ + +#include + +#define SETTING_FONT_POPUP_DESC "Do you want to change the font:" +#define SETTING_FONT_PRELOAD_FONT_PATH "/usr/share/fonts" +#define SETTING_FONT_DOWNLOADED_FONT_PATH "/opt/share/fonts" + +#define SETTING_FONT_TYPE_STR "IDS_ST_BODY_FONT_TYPE" +#define SETTING_FONT_SIZE_STR "IDS_ST_MBODY_FONT_SIZE" +#define SETTING_FONT_SIZE_DESC "IDS_ST_BODY_CHANGE_TEXT_SIZE_IN_CONTACTS_CALENDAR_MEMO_MESSAGES_EMAIL_AND_IM" + + +#endif /* __SETTING_FONT_MAIN_H__ */ diff --git a/setting-font/include/setting-font.h b/setting-font/include/setting-font.h new file mode 100755 index 0000000..61327d8 --- /dev/null +++ b/setting-font/include/setting-font.h @@ -0,0 +1,84 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_FONT_H__ +#define __SETTING_FONT_H__ + +#include +#include + +#include + +#include +#include + +typedef struct _SettingFontUG SettingFontUG; + +typedef enum +{ + FONT_SIZE_AND_FONT_SEL_UG, + FONT_SEL_VIEW_APPCONTROL, +}FontUGViewMode; + + +/** + * Setting Font UG context + * all UG function has void* as an agument. this is casted back to SettingFontUG + * and the functions access app context. + */ +struct _SettingFontUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + + Evas_Object *ly_main; + + Evas_Object *genlist; + Evas_Object *navibar; + + /* font setting */ + Evas_Object *popup; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + Elm_Genlist_Item_Class itc_1text_1icon_2; + Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_group_item; + Elm_Genlist_Item_Class itc_bg_1icon; + Elm_Genlist_Item_Class itc_seperator; + + Setting_GenGroupItem_Data *subitem; + Setting_GenGroupItem_Data *font_type; + Setting_GenGroupItem_Data *font_size; + + int prev_font; + char *font_name; + + FontUGViewMode viewmode; +}; + +extern setting_view setting_view_font_main; + +int setting_font_update_vconf_key(void *data, setting_vconf_type type, + int slp_key); + +#endif /* __SETTING_FONT_H__ */ diff --git a/setting-font/src/setting-font-main.c b/setting-font/src/setting-font-main.c new file mode 100755 index 0000000..724e6da --- /dev/null +++ b/setting-font/src/setting-font-main.c @@ -0,0 +1,579 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#include +#include +#include +#include +#include + +static int setting_font_main_create(void *cb); +static int setting_font_main_destroy(void *cb); +static int setting_font_main_update(void *cb); +static int setting_font_main_cleanup(void *cb); + +static void __setting_font_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info); + +setting_view setting_view_font_main = { + .create = setting_font_main_create, + .destroy = setting_font_main_destroy, + .update = setting_font_main_update, + .cleanup = setting_font_main_cleanup, +}; + +static char* __setting_font_main_get_font_size(int value) +{ + const char* font_size_arr[] = { + _("IDS_ST_BODY_SMALL_M_TEXTSIZE"), // 0 + _("IDS_ST_BODY_NORMAL_T_PROFILE"), // 1 + _("IDS_ST_BODY_TEXTSTYLE_LARGE"), // 2 + _("IDS_EMAIL_OPT_HUGE_M_TEXTSIZE"), // 3 + _("IDS_EMAIL_POP_GIANT_M_TEXTSIZE"), // 4 + }; + switch (value) + { + case SYSTEM_SETTINGS_FONT_SIZE_SMALL: + return (char *)font_size_arr[0]; + case SYSTEM_SETTINGS_FONT_SIZE_NORMAL: + return (char *)font_size_arr[1]; + case SYSTEM_SETTINGS_FONT_SIZE_LARGE: + return (char *)font_size_arr[2]; + case SYSTEM_SETTINGS_FONT_SIZE_HUGE: + return (char *)font_size_arr[3]; + case SYSTEM_SETTINGS_FONT_SIZE_GIANT: + return (char *)font_size_arr[4]; + default: + return (char *)font_size_arr[1]; + } +} + +static Eina_List *__setting_font_main_available_list_get() +{ + SETTING_TRACE_BEGIN + FcObjectSet *os = NULL; + FcFontSet *fs = NULL; + FcPattern *pat = NULL; + Eina_List *list = NULL; + FcConfig *font_config = NULL; + + font_config = FcInitLoadConfigAndFonts(); + + setting_retvm_if(font_config == NULL, NULL, "Failed: FcInitLoadConfigAndFonts"); + + pat = FcPatternCreate(); + + os = FcObjectSetBuild(FC_FAMILY, FC_FILE, (char *) 0); + + if (os) { + fs = FcFontList(font_config, pat, os); + FcObjectSetDestroy(os); + os = NULL; + } + + if (pat) { + FcPatternDestroy(pat); + pat = NULL; + } + + if (fs) { + int j; + SETTING_TRACE_DEBUG("fs->nfont = %d", fs->nfont); + + for (j = 0; j < fs->nfont; j++) { + FcChar8 *family = NULL; + FcChar8 *file = NULL; + + if (FcPatternGetString(fs->fonts[j], FC_FILE, 0, &file) == FcResultMatch) { + //SETTING_TRACE_DEBUG("FC_FILE : %s\n", file); + int preload_path_len = safeStrLen(SETTING_FONT_PRELOAD_FONT_PATH); + int download_path_len = safeStrLen(SETTING_FONT_DOWNLOADED_FONT_PATH); + if (!safeStrNCmp((const char*)file, SETTING_FONT_PRELOAD_FONT_PATH, preload_path_len) || + !safeStrNCmp((const char*)file, SETTING_FONT_DOWNLOADED_FONT_PATH, download_path_len)) { + if (FcPatternGetString(fs->fonts[j], FC_FAMILY, 0, &family) != FcResultMatch) { + SETTING_TRACE_DEBUG("Family name is invalid"); + continue; + } + + //SETTING_TRACE_DEBUG("family = %s", (char *)family); + if (eina_list_data_find(list, family) == NULL) { + list = eina_list_append(list, family); + /* list = eina_list_append(list, family); */ + // for TEST because there's 1 font on target. + } + } + } + } + FcFontSetDestroy(fs); + fs = NULL; + } + + FcConfigDestroy(font_config); + font_config = NULL; + return list; +} + +void __setting_font_main_launch_ug_destroy_cb(ui_gadget_h ug, void *priv) +{ + SETTING_TRACE_BEGIN; + /* if(ug) ug_destroy(ug); */ + /* restore the '<-' button on the navigate bar */ + retm_if(priv == NULL, "priv is NULL"); + SettingFontUG *ad = (SettingFontUG *) priv; + if (ug) { + ug_destroy(ug); + } + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navibar); + retm_if(navi_it == NULL, "navi_it is NULL"); + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + + if (back_btn != NULL) { + elm_object_style_set(back_btn, NAVI_BACK_BUTTON_STYLE); /* take into effect */ + } + + // update font size item + int value = -1; + int err = -1; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, &value, &err); + retm_if(ret != 0, "get vconf failed"); + + if (ad->font_size) { + G_FREE(ad->font_size->sub_desc); + ad->font_size->sub_desc = g_strdup(__setting_font_main_get_font_size(value)); + + elm_object_item_data_set(ad->font_size->item, ad->font_size); + elm_genlist_item_update(ad->font_size->item); + } +} + +void __setting_font_main_launch_ug_layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) +{ + SETTING_TRACE_BEGIN; + retm_if(priv == NULL, "priv is NULL"); + SettingFontUG *ad = (SettingFontUG *) priv; + Evas_Object *base = NULL; + base = (Evas_Object *) ug_get_layout(ug); + retm_if(base == NULL, "base is NULL"); + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + break; + } + SETTING_TRACE_END; +} + + +static void __setting_font_main_launch_ug(void *data) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingFontUG *ad = (SettingFontUG *) data; + + service_h svc; + if (service_create(&svc)) { + return; + } + + service_add_extra_data(svc, "caller", "font_size"); + + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + if (!cbs) { + SETTING_TRACE_ERROR("calloc failed"); + service_destroy(svc); + return; + } + cbs->layout_cb = __setting_font_main_launch_ug_layout_cb; + cbs->result_cb = NULL; + cbs->destroy_cb = __setting_font_main_launch_ug_destroy_cb; + cbs->priv = (void *)ad; + + ui_gadget_h ug = ug_create(ad->ug, "setting-accessibility-efl", UG_MODE_FULLVIEW, svc, cbs); + if (NULL == ug) { /* error handling */ + SETTING_TRACE_ERROR("NULL == ug"); + } + + //bundle_free(b); + service_destroy(svc); + FREE(cbs); +} + +static void __setting_font_main_genlist_sel_cb(void *data, Evas_Object * obj, void *event_info) +{ + //error check + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)elm_object_item_data_get(item); + + SettingFontUG *ad = (SettingFontUG *)data; + + if (ad->font_size == list_item) { + __setting_font_main_launch_ug(ad); + } +} + +static void __setting_font_main_genlist_item_create(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "data is NULL"); + + SettingFontUG *ad = (SettingFontUG *)data; + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(ad->genlist, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + char *font_type_name = NULL; + font_type_name = cur_font_get(); + + ad->font_type = setting_create_Gendial_exp_parent_field(ad->genlist, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + SETTING_FONT_TYPE_STR, + font_type_name); + if (ad->font_type) { + ad->font_type->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->font_type is NULL"); + } + G_FREE(ad->font_name); + ad->font_name = g_strdup(font_type_name); + G_FREE(font_type_name); + + if (ad->viewmode == FONT_SEL_VIEW_APPCONTROL) + return; + //-------------------------------------------------------------------- + + // [UI] Font Size + int value = -1; + int err = -1; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE, &value, &err); + if (ret != 0) { + SETTING_TRACE_ERROR("get vconf failed"); + } + + + + ad->font_size = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_2), + __setting_font_main_genlist_sel_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, value, SETTING_FONT_SIZE_STR, + __setting_font_main_get_font_size(value), NULL); + if (ad->font_size) { + ad->font_size->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->font_size is NULL"); + } + + setting_create_Gendial_field_def(ad->genlist, &(ad->itc_bg_1icon), NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, SETTING_FONT_SIZE_DESC, NULL, + NULL); +} + + +/** + * font change + */ +static void __setting_font_main_font_set(char *font_name) +{ + retm_if(font_name == NULL, "Invalid argument: font_name is NULL"); + xmlDocPtr doc = (xmlDocPtr)font_conf_doc_parse(SETTING_FONT_CONF_FILE, font_name); + + if(doc != NULL) { + xmlSaveFormatFile(SETTING_FONT_CONF_FILE, doc, 0); + xmlFreeDoc(doc); + doc = NULL; + } + + font_config_set(font_name); + + /* notification */ + Ecore_X_Window ecore_win = ecore_x_window_root_first_get(); + Ecore_X_Atom atom = ecore_x_atom_get("FONT_TYPE_change"); + ecore_x_window_prop_string_set(ecore_win, atom, "slp"); +} + +static void __setting_font_main_popup_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingFontUG *ad = (SettingFontUG *) data; + + switch (btn_type(obj)) { + case POPUP_RESPONSE_OK: + { + ad->font_type->sub_desc = (char *)g_strdup(_(ad->subitem->keyStr)); + elm_object_item_data_set(ad->font_type->item, ad->font_type); + elm_genlist_item_update(ad->font_type->item); + + ad->prev_font = ad->subitem->chk_status; + G_FREE(ad->font_name); + ad->font_name = (char *)g_strdup(_(ad->subitem->keyStr)); + SETTING_TRACE("ad->subitem->keyStr = %s", ad->subitem->keyStr); + __setting_font_main_font_set(ad->subitem->keyStr); + ug_destroy_me(ad->ug); + break; + } + case POPUP_RESPONSE_CANCEL: + { + elm_radio_value_set(ad->subitem->rgd, ad->prev_font); + + break; + } + default: + { + break; + } + } + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } +} + +static void __setting_font_main_popup(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingFontUG *ad = (SettingFontUG *) data; + + char popup_desc[SETTING_STR_SLP_LEN + 1] = {0,}; + snprintf(popup_desc, SETTING_STR_SLP_LEN, "%s %s?", _(SETTING_FONT_POPUP_DESC), ad->subitem->keyStr); + + ad->popup = setting_create_popup_with_btn(ad, ad->win_get, NULL, + popup_desc, + __setting_font_main_popup_cb, 0, + 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); +} + + +/** + * [UI][expandable list][event handler:selection][font change] + */ +void __setting_font_main_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *subitem = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(subitem, 0); + Setting_GenGroupItem_Data *data_subItem = elm_object_item_data_get(subitem); + ret_if(NULL == data_subItem); + + SettingFontUG *ad = (SettingFontUG *) data; + + /* if not change, return */ + if (ad->prev_font == data_subItem->chk_status) { + SETTING_TRACE("NOT CHANGED "); + return; + } + + ad->subitem = data_subItem; + elm_radio_value_set(ad->subitem->rgd, ad->subitem->chk_status); + + __setting_font_main_popup(ad); +} + +static void __setting_font_main_exp_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(NULL == data || NULL == event_info); + SETTING_TRACE_BEGIN; + SettingFontUG *ad = (SettingFontUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd = NULL; + if (data_parentItem == ad->font_type) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + + Eina_List *font_list = NULL; + Eina_List *l = NULL; + FcChar8 *font_data = NULL; + font_list = __setting_font_main_available_list_get(); + + int i = 0; + int matched_font = -1; + Setting_GenGroupItem_Data *item = NULL; + EINA_LIST_FOREACH(font_list, l, font_data) + { + item = setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), + __setting_font_main_sub_list_sel_cb, ad, + parentItem, SWALLOW_Type_1RADIO, rgd, + i, (const char*)font_data, + NULL); + + if (item) { + item->userdata = ad; + if (!safeStrCmp(ad->font_name, (const char*)font_data)) { + matched_font = i; + } + } + + i++; + } + + /* update check status */ + if (matched_font != -1) { + elm_radio_value_set(rgd, matched_font); + } + + ad->prev_font = matched_font; + } +} + + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static int setting_font_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingFontUG *ad = (SettingFontUG *) cb; + + retvm_if(ad->win_main_layout == NULL, SETTING_DRAW_ERR_FAIL_LOAD_EDJ, + "win_main_layout is NULL"); + + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_Font), + _("IDS_COM_BODY_BACK"), + NULL, + __setting_font_main_click_softkey_back_cb, + NULL, + ad, &ad->genlist, &ad->navibar); + + setting_enable_expandable_genlist(ad->genlist, ad, + __setting_font_main_exp_cb, NULL); + + __setting_font_main_genlist_item_create(ad); + + setting_view_font_main.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_font_main_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingFontUG *ad = (SettingFontUG *) cb; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + setting_view_font_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_font_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingFontUG *ad = (SettingFontUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + + setting_font_update_vconf_key(ad, SETTING_VCONF_INT_TYPE, + INT_SLP_SETTING_LCD_TIMEOUT_NORMAL); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_font_main_cleanup(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingFontUG *ad = (SettingFontUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_hide(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void __setting_font_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + ret_if(data == NULL); + + SettingFontUG *ad = (SettingFontUG *) data; + + if (ad->viewmode == FONT_SEL_VIEW_APPCONTROL) + { + service_h svc; + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "category", "FontType"); + service_add_extra_data(svc, "FontType", ad->font_name); + + SETTING_TRACE(" SERVICE_ADD_EXTRA : %s %s","category", "FontType"); + SETTING_TRACE(" SERVICE_ADD_EXTRA : %s %s","FontType", ad->font_name); + + + ug_send_result(ad->ug, svc); + service_destroy(svc); + } + + /* Send destroy request */ + ug_destroy_me(ad->ug); +} diff --git a/setting-font/src/setting-font.c b/setting-font/src/setting-font.c new file mode 100755 index 0000000..0d77033 --- /dev/null +++ b/setting-font/src/setting-font.c @@ -0,0 +1,303 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +static void setting_font_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, + void *event_info) +{ + SettingFontUG *ad = (SettingFontUG *) data; + setting_view_update(&setting_view_font_main, ad); +} + +static void *setting_font_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) +{ + setting_retvm_if((!priv), NULL, "!priv"); + SettingFontUG *fontUG = priv; + + appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + fontUG->ug = ug; + fontUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + fontUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(fontUG->win_main_layout); + fontUG->evas = evas_object_evas_get(fontUG->win_main_layout); + + setting_retvm_if(fontUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + fontUG->itc_seperator.item_style = "dialogue/separator/21/with_line"; + fontUG->itc_seperator.func.text_get = NULL; + fontUG->itc_seperator.func.content_get = NULL; + fontUG->itc_seperator.func.state_get = NULL; + fontUG->itc_seperator.func.del = NULL; + + setting_create_Gendial_itc("dialogue/2text.3/expandable", &(fontUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", &(fontUG->itc_1icon_1text_sub)); + setting_create_Gendial_itc("dialogue/2text.3", &(fontUG->itc_2text_2)); + setting_create_Gendial_itc("dialogue/1text.1icon.2", &(fontUG->itc_1text_1icon_2)); + setting_create_Gendial_itc("dialogue/title", &(fontUG->itc_group_item)); + setting_create_Gendial_itc("multiline/1text", &(fontUG->itc_bg_1icon)); + + // view type checking + + char *category = NULL; + service_get_extra_data(service, "category", &category); + + if (0 == safeStrCmp(category, "FontType")) { + SETTING_TRACE("LAUNCHED BY APP-CONTROL MODE"); + fontUG->viewmode = FONT_SEL_VIEW_APPCONTROL; + // here + setting_view_create(&setting_view_font_main, (void *)fontUG); + } else { + SETTING_TRACE("HERE ?? <<<<< "); + fontUG->viewmode = FONT_SIZE_AND_FONT_SEL_UG; // set default + /* creating a view. */ + setting_view_create(&setting_view_font_main, (void *)fontUG); + } + + + /* creating a view. */ + //setting_view_create(&setting_view_font_main, (void *)fontUG); + evas_object_event_callback_add(fontUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_font_ug_cb_resize, fontUG); + return fontUG->ly_main; +} + +static void setting_font_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_font_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_font_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_font_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingFontUG *fontUG = priv; + + evas_object_event_callback_del(fontUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_font_ug_cb_resize); /* fix flash issue for gallery */ + fontUG->ug = ug; + + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_font_main, fontUG); + if (NULL != ug_get_layout(fontUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(fontUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(fontUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_font_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_font_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + switch (event) { + case UG_EVENT_LOW_MEMORY: + break; + case UG_EVENT_LOW_BATTERY: + break; + case UG_EVENT_LANG_CHANGE: + break; + case UG_EVENT_ROTATE_PORTRAIT: + break; + case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN: + break; + case UG_EVENT_ROTATE_LANDSCAPE: + break; + case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN: + break; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_font_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + if (!ug) + return; + + switch (event) { + case UG_KEY_EVENT_END: + ug_destroy_me(ug); + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingFontUG *fontUG = calloc(1, sizeof(SettingFontUG)); + setting_retvm_if(!fontUG, -1, "Create SettingFontUG obj failed"); + + ops->create = setting_font_ug_on_create; + ops->start = setting_font_ug_on_start; + ops->pause = setting_font_ug_on_pause; + ops->resume = setting_font_ug_on_resume; + ops->destroy = setting_font_ug_on_destroy; + ops->message = setting_font_ug_on_message; + ops->event = setting_font_ug_on_event; + ops->key_event = setting_font_ug_on_key_event; + ops->priv = fontUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingFontUG *fontUG; + setting_retm_if(!ops, "ops == NULL"); + + fontUG = ops->priv; + if (fontUG) { + FREE(fontUG); + } +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +int setting_font_update_vconf_key_int_type(void *data, + setting_int_slp_list slp_key) +{ + SETTING_TRACE_BEGIN; + /* error check */ + if (data == NULL) { + return SETTING_GENERAL_ERR_NULL_DATA_PARAMETER; + } + + int ret = SETTING_RETURN_FAIL; + int value; + int err; + /* SettingFontUG *ad = (SettingFontUG *)data; */ + + ret = setting_get_int_slp_key(slp_key, &value, &err); + + switch (slp_key) { + /* + case INT_SLP_SETTING_LCD_TIMEOUT_NORMAL: + { + if (ret == SETTING_RETURN_FAIL) value = SETTING_BACKLIGHT_TIME_15SEC; + + switch(value) + { + case SETTING_BACKLIGHT_TIME_8SEC: edje_object_part_text_set(_EDJ(ad->eo_DC_backlight), DC_ITEM_SUB_STR_BACKLIGHT, _(STR_SETTING_8SEC)); break; + case SETTING_BACKLIGHT_TIME_15SEC: edje_object_part_text_set(_EDJ(ad->eo_DC_backlight), DC_ITEM_SUB_STR_BACKLIGHT, _(STR_SETTING_15SEC)); break; + case SETTING_BACKLIGHT_TIME_30SEC: edje_object_part_text_set(_EDJ(ad->eo_DC_backlight), DC_ITEM_SUB_STR_BACKLIGHT, _(STR_SETTING_30SEC)); break; + case SETTING_BACKLIGHT_TIME_1MIN: edje_object_part_text_set(_EDJ(ad->eo_DC_backlight), DC_ITEM_SUB_STR_BACKLIGHT, _(STR_SETTING_1MIN)); break; + case SETTING_BACKLIGHT_TIME_3MIN: edje_object_part_text_set(_EDJ(ad->eo_DC_backlight), DC_ITEM_SUB_STR_BACKLIGHT, _(STR_SETTING_3MIN)); break; + case SETTING_BACKLIGHT_TIME_10MIN: edje_object_part_text_set(_EDJ(ad->eo_DC_backlight), DC_ITEM_SUB_STR_BACKLIGHT, _(STR_SETTING_10MIN)); break; + default: ret = SETTING_GENERAL_ERR_NOT_FIND_VALUE_SWITCH; + } + } + break; + */ + + default: + ret = SETTING_GENERAL_ERR_NOT_FIND_VALUE_SWITCH; + break; + } + + return ret; +} + +int setting_font_update_vconf_key(void *data, setting_vconf_type type, + int slp_key) +{ + SETTING_TRACE_BEGIN; + /* error check */ + if (data == NULL) { + return SETTING_GENERAL_ERR_NULL_DATA_PARAMETER; + } + + int ret = SETTING_RETURN_FAIL; + SettingFontUG *ad = (SettingFontUG *) data; + + switch (type) { + case SETTING_VCONF_INT_TYPE: + ret = setting_font_update_vconf_key_int_type(ad, slp_key); + break; + + case SETTING_VCONF_BOOL_TYPE: + break; + + case SETTING_VCONF_STR_TYPE: + break; + default: + /* do nothing */ + break; + } + + return ret; +} +/** +* Reset function to 'reset' the settings of the UG, it will be invoked by 'Reset' UG +*/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + //int ret = vconf_set_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR, "Fraser"); + int ret = 0; +#if SUPPORT_RUN_SYSTEM_COMMAND + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "font"); +#else + /* reset font type, default is HelveticaNeue */ + font_config_set("HelveticaNeue"); + + /* reset font size */ + ret += vconf_set_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, 1); + setting_retvm_if(ret == -1, -1, "Failed to set vconf"); + font_size_set(); +#endif + return ret; +} + diff --git a/setting-livebox/CMakeLists.txt b/setting-livebox/CMakeLists.txt new file mode 100755 index 0000000..e4e94d8 --- /dev/null +++ b/setting-livebox/CMakeLists.txt @@ -0,0 +1,45 @@ + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_livebox REQUIRED + evas ecore edje + elementary + appcore-common + appcore-efl + ecore-imf ui-gadget-1 + json-glib-1.0 + capi-appfw-application dlog) + +FOREACH(flag ${pkgs_livebox_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl, --rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_LIVEBOX_UG} SHARED + ./src/setting-livebox.c + ./src/setting-livebox-main.c +) + +TARGET_LINK_LIBRARIES(${SETTING_LIVEBOX_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_LIVEBOX_UG} ${pkgs_livebox_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_LIVEBOX_UG} DESTINATION /opt/ug/lib) + + + + diff --git a/setting-livebox/include/setting-livebox-main.h b/setting-livebox/include/setting-livebox-main.h new file mode 100755 index 0000000..4aa181c --- /dev/null +++ b/setting-livebox/include/setting-livebox-main.h @@ -0,0 +1,27 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef _SETTING_LIVEBOX_MAIN_H_ +#define _SETTING_LIVEBOX_MAIN_H_ + +#include + + +#endif diff --git a/setting-livebox/include/setting-livebox.h b/setting-livebox/include/setting-livebox.h new file mode 100755 index 0000000..76a2883 --- /dev/null +++ b/setting-livebox/include/setting-livebox.h @@ -0,0 +1,64 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef _SETTING_LIVEBOX_H_ +#define _SETTING_LIVEBOX_H_ +#include + +#include +#include +#include + +#include + +#include +#include +#include + +#define MAX_MENU_NUM 100 +#define MAX_SELECTION_NUM 4 + +typedef struct _SettingLiveboxUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + Evas_Object *ly_main; + + Elm_Object_Item *navi_it; + Evas_Object *controllbar; + Evas_Object *navi_bar; + Evas_Object *sub_layout; + + Evas_Object *search_bar; + Evas_Object *scroller; + + unsigned int select_count; + unsigned int menu_count; + Setting_GenGroupItem_Data *item[MAX_MENU_NUM]; +} SettingLiveboxUG; + +extern setting_view setting_view_livebox_main; + + + +#endif diff --git a/setting-livebox/src/setting-livebox-main.c b/setting-livebox/src/setting-livebox-main.c new file mode 100755 index 0000000..61679b3 --- /dev/null +++ b/setting-livebox/src/setting-livebox-main.c @@ -0,0 +1,421 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#include +#include + +static int setting_livebox_main_create(void *cb); +static int setting_livebox_main_destroy(void *cb); +static int setting_livebox_main_update(void *cb); +static int setting_livebox_main_cleanup(void *cb); + +setting_view setting_view_livebox_main = { + .create = setting_livebox_main_create, + .destroy = setting_livebox_main_destroy, + .update = setting_livebox_main_update, + .cleanup = setting_livebox_main_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static void setting_livebox_main_sk_done_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + ret_if(data == NULL); + + SettingLiveboxUG *ad = (SettingLiveboxUG *)data; + + /* send information of selected items to live-setting */ + if(ad->select_count > 0) + { + SETTING_TRACE_DEBUG("select_count : %u", ad->select_count); + int idx = 0; + int check_count = 0; + char *result_array[MAX_SELECTION_NUM*2]; + service_h svc; + + if (service_create(&svc)) { + return; + } + + for(; idx < ad->menu_count; idx++) + { + if(ad->item[idx]->chk_status) + { + if(check_count > ad->select_count) + { + SETTING_TRACE_DEBUG("exceed count: %u", check_count); + break; + } + SETTING_TRACE_DEBUG("item[%u] is checked", idx); + result_array[check_count*2] = setting_gettext(ad->item[idx]->keyStr); + result_array[check_count*2+1] = (char *)ad->item[idx]->r_swallow_path; + SETTING_TRACE_DEBUG("app_name : %s, icon_path : %s", result_array[check_count*2], result_array[check_count*2+1]); + check_count++; + } + } + service_add_extra_data_array(svc, "result", (const char**)result_array, ad->select_count*2); + ug_send_result(ad->ug, svc); + + service_destroy(svc); + } + /* Send destroy request */ + ug_destroy_me(ad->ug); +} + +static void setting_livebox_main_sk_cancel_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + ret_if(data == NULL); + + SettingLiveboxUG *ad = (SettingLiveboxUG *)data; + /* Send destroy request */ + ug_destroy_me(ad->ug); +} + +static void __searchbar_changed_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); +#if DISABLED_CODE + SettingLiveboxUG *ad = (SettingLiveboxUG *)data; + + setting_searchbar_redraw(ad, ad->search_bar, NULL/*ad->search_text*/, + &(ad->search_idler), + NULL); //__region_genlist_update); +#endif +} + +static void __create_navibar(void *data, Evas_Object *content, Evas_Object *navibar, Evas_Object *controlbar) +{ + SETTING_TRACE_BEGIN; + ret_if(data == NULL || content == NULL || navibar == NULL); + + SettingLiveboxUG *ad = (SettingLiveboxUG *)data; + + setting_create_navi_bar_buttons("Customize setting Livebox", + "Done", "Cancel", NULL, + setting_livebox_main_sk_done_cb, + setting_livebox_main_sk_cancel_cb, + NULL, + ad, content, navibar, controlbar); +} + +static int __create_frame(void *data) +{ + SETTING_TRACE_BEGIN; + retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingLiveboxUG *ad = (SettingLiveboxUG *)data; + Evas_Object *navi_bar = NULL; + Evas_Object *control_bar = NULL; + + Evas_Object *content_list = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(content_list, "dialogue"); + if(content_list == NULL) + return SETTING_RETURN_FAIL; + + elm_genlist_clear(content_list); /* first to clear list */ + elm_genlist_mode_set(content_list, ELM_LIST_COMPRESS); + + ad->ly_main = setting_create_win_layout(ad->win_main_layout, ad->win_get); + retv_if(!ad->ly_main, SETTING_RETURN_FAIL); + + navi_bar = setting_create_navi_bar(ad->ly_main); + retv_if(!navi_bar, SETTING_RETURN_FAIL); + Evas_Object *sub_layout = elm_layout_add(navi_bar); + elm_layout_theme_set(sub_layout, "layout", "application", "searchbar_base"); + elm_object_signal_emit(sub_layout, "elm,state,show,searchbar", "elm"); + elm_object_part_content_set(sub_layout, "elm.swallow.content", content_list); + + ad->search_bar = setting_create_searchbar(ad, sub_layout, __searchbar_changed_cb, NULL); + + control_bar = elm_toolbar_add(navi_bar); + setting_retvm_if(control_bar == NULL, -1, "controlbar == NULL"); + elm_toolbar_shrink_mode_set(control_bar, ELM_TOOLBAR_SHRINK_EXPAND); + + __create_navibar(ad, sub_layout, navi_bar, control_bar); + + ad->navi_bar = navi_bar; + ad->navi_it = elm_naviframe_top_item_get(ad->navi_bar); + ad->sub_layout = sub_layout; + ad->scroller = content_list; + + return SETTING_RETURN_SUCCESS; +} + +static void +setting_livebox_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + + if(data == NULL) + return; + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + + SettingLiveboxUG *ad = (SettingLiveboxUG*)data; + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SETTING_TRACE_DEBUG("%s selected", list_item->keyStr); + + int current_status = elm_check_state_get(list_item->eo_check); + + if((current_status == 0) && (ad->select_count < MAX_SELECTION_NUM)) + { + elm_check_state_set(list_item->eo_check, 1); + list_item->chk_status = 1; + ad->select_count++; + // show selection Info : "selected %u items" + } + else if(current_status == 0) + { + // show popup : "be over the count, 4" + } + else if((current_status == 1) && (ad->select_count > 0)) + { + elm_check_state_set(list_item->eo_check, 0); + list_item->chk_status = 0; + ad->select_count--; + } + else + { + // nothing to be selected. + } + SETTING_TRACE_DEBUG("select_count : %u", ad->select_count); +} + +static void +setting_livebox_main_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + + if(data == NULL) + return; + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingLiveboxUG *ad = list_item->userdata; + + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + + if((list_item->chk_status == 1) && (ad->select_count < MAX_SELECTION_NUM)) + { + ad->select_count++; + // show selection Info : "selected %u items" + } + else if(list_item->chk_status == 1) + { + // recover status of checkbox + // And show popup : "be over the count, 4" + elm_check_state_set(obj, 0); + list_item->chk_status = elm_check_state_get(obj); + } + else if((list_item->chk_status == 0) && (ad->select_count > 0)) + { + ad->select_count--; + } + else + { + // nothing to be selected. + } + SETTING_TRACE_DEBUG("select_count : %u", ad->select_count); +} + +void setting_livebox_add_genlist_items(void *data) +{ + SETTING_TRACE_BEGIN; + if(data == NULL) + return; + + SettingLiveboxUG *ad = (SettingLiveboxUG*)data; + + int i = 0; + int j = 0; + int cnt = 0; + char *keyStr = NULL; + char *icon_path = NULL; + + // itc_sel_all + + for (i = 0; i < setting_cfg_get_category_length(); i++) + { + SETTING_TRACE_DEBUG("category name : %s", setting_cfg_get_category_name(i)); + if (safeStrCmp(setting_cfg_get_category_name(i), KeyStr_Connectivity) == 0) + { + (void)setting_create_Gendial_field_titleItem(ad->scroller, + &(itc_group_item), + KeyStr_Connectivity, NULL); + + for (j = 0; j < setting_cfg_get_menu_length(i); j++) + { + keyStr = setting_cfg_get_keyname_idx(i, j); + SETTING_TRACE_DEBUG("menu name : [%d] %s", j, keyStr); + icon_path = setting_cfg_get_icon_path_idx(i, j); + + ad->item[cnt] = setting_create_Gendial_field_def(ad->scroller, &(itc_1text_1icon_2), + setting_livebox_main_mouse_up_Gendial_list_cb, NULL, + SWALLOW_Type_1CHECKICON, + NULL, icon_path, 0, keyStr, NULL, + setting_livebox_main_chk_btn_cb); + if(ad->item[cnt]) + ad->item[cnt++]->userdata = ad; + } + continue; + } + else if (safeStrCmp(setting_cfg_get_category_name(i), KeyStr_System) == 0) + { + (void)setting_create_Gendial_field_titleItem(ad->scroller, + &(itc_group_item), + KeyStr_System, NULL); + for (j = 0; j < setting_cfg_get_menu_length(i); j++) + { + keyStr = setting_cfg_get_keyname_idx(i, j); + SETTING_TRACE_DEBUG("menu name : [%d] %s", j, keyStr); + icon_path = setting_cfg_get_icon_path_idx(i, j); + + ad->item[cnt] = setting_create_Gendial_field_def(ad->scroller, &(itc_1text_1icon_2), + setting_livebox_main_mouse_up_Gendial_list_cb, NULL, + SWALLOW_Type_1CHECKICON, + NULL, icon_path, 0, keyStr, NULL, + setting_livebox_main_chk_btn_cb); + ad->item[cnt++]->userdata = ad; + } + continue; + } + else if (safeStrCmp(setting_cfg_get_category_name(i), KeyStr_Applications) == 0) + { + (void)setting_create_Gendial_field_titleItem(ad->scroller, + &(itc_group_item), + KeyStr_Applications, NULL); + for (j = 0; j < setting_cfg_get_menu_length(i); j++) + { + keyStr = setting_cfg_get_keyname_idx(i, j); + SETTING_TRACE_DEBUG("menu name : [%d] %s", j, keyStr); + icon_path = setting_cfg_get_icon_path_idx(i, j); + + ad->item[cnt] = setting_create_Gendial_field_def(ad->scroller, &(itc_1text_1icon_2), + setting_livebox_main_mouse_up_Gendial_list_cb, NULL, + SWALLOW_Type_1CHECKICON, + NULL, icon_path, 0, keyStr, NULL, + setting_livebox_main_chk_btn_cb); + ad->item[cnt++]->userdata = ad; + } + continue; + } + else if (safeStrCmp(setting_cfg_get_category_name(i), KeyStr_DownloadedAPPs) == 0) + { + (void)setting_create_Gendial_field_titleItem(ad->scroller, + &(itc_group_item), + KeyStr_DownloadedAPPs, NULL); + for (j = 0; j < setting_cfg_get_menu_length(i); j++) + { + keyStr = setting_cfg_get_keyname_idx(i, j); + SETTING_TRACE_DEBUG("menu name : [%d] %s", j, keyStr); + icon_path = setting_cfg_get_icon_path_idx(i, j); + + ad->item[cnt] = setting_create_Gendial_field_def(ad->scroller, &(itc_1text_1icon_2), + setting_livebox_main_mouse_up_Gendial_list_cb, NULL, + SWALLOW_Type_1CHECKICON, + NULL, icon_path, 0, keyStr, NULL, + setting_livebox_main_chk_btn_cb); + ad->item[cnt++]->userdata = ad; + } + continue; + } + } + ad->menu_count = cnt; + SETTING_TRACE_DEBUG("total : %u menues ", ad->menu_count); +} + +static int +setting_livebox_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingLiveboxUG *ad = (SettingLiveboxUG *) cb; + int ret = 0; + + ret = __create_frame(ad); + + if(ret < 0) + return SETTING_RETURN_FAIL; + + setting_livebox_add_genlist_items(ad); + + setting_view_livebox_main.is_create = 1; + SETTING_TRACE_END; + return SETTING_RETURN_SUCCESS; +} + +static int setting_livebox_main_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingLiveboxUG *ad = (SettingLiveboxUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + ad->ly_main = NULL; + setting_view_livebox_main.is_create = 0; + } + return SETTING_RETURN_SUCCESS; +} + +static int setting_livebox_main_update(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingLiveboxUG *ad = (SettingLiveboxUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_livebox_main_cleanup(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingLiveboxUG *ad = (SettingLiveboxUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_hide(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} diff --git a/setting-livebox/src/setting-livebox.c b/setting-livebox/src/setting-livebox.c new file mode 100755 index 0000000..f060ce8 --- /dev/null +++ b/setting-livebox/src/setting-livebox.c @@ -0,0 +1,169 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + + +static void setting_livebox_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + SettingLiveboxUG *ad = (SettingLiveboxUG *) data; + setting_view_update(&setting_view_livebox_main, ad); +} + +static void *setting_livebox_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if((!priv), NULL, "!priv"); + + SettingLiveboxUG *liveboxUG = (SettingLiveboxUG *)priv; + liveboxUG->ug = ug; + liveboxUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + liveboxUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(liveboxUG->win_main_layout); + liveboxUG->evas = evas_object_evas_get(liveboxUG->win_main_layout); + + setting_retvm_if(liveboxUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + /* --------------------------------------------------------- */ + /* set launguage */ + appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + /* --------------------------------------------------------- */ + int ret = setting_cfg_init(); + if(ret != 0) + SETTING_TRACE_DEBUG("cfg_init failed. %d", ret); + + /* creating a view. */ + setting_view_create(&setting_view_livebox_main,(void *)liveboxUG); + evas_object_event_callback_add(liveboxUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_livebox_ug_cb_resize, + liveboxUG); + return liveboxUG->ly_main; +} + +static void setting_livebox_ug_on_start(ui_gadget_h ug, service_h service, void *priv) +{ +} + +static void setting_livebox_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) +{ +} + +static void setting_livebox_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) +{ +} + +static void setting_livebox_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) +{ + SettingLiveboxUG *liveboxUG = (SettingLiveboxUG *)priv; + + evas_object_event_callback_del(liveboxUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_livebox_ug_cb_resize); /* fix flash issue for gallery */ + liveboxUG->ug = ug; + + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_livebox_main, liveboxUG); + if (NULL != ug_get_layout(liveboxUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(liveboxUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(liveboxUG->ug)); + } +} + +static void setting_livebox_ug_on_message(ui_gadget_h ug, service_h msg, service_h service, void *priv) +{ + +} + +static void setting_livebox_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + void *priv) +{ + switch (event) { + case UG_EVENT_LOW_MEMORY: + break; + case UG_EVENT_LOW_BATTERY: + break; + case UG_EVENT_LANG_CHANGE: + break; + case UG_EVENT_ROTATE_PORTRAIT: + break; + case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN: + break; + case UG_EVENT_ROTATE_LANDSCAPE: + break; + case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN: + break; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_livebox_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + if (!ug || !priv) + return; + + switch (event) { + case UG_KEY_EVENT_END: + ug_destroy_me(ug); + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SettingLiveboxUG *liveboxUG = calloc(1, sizeof(SettingLiveboxUG)); + setting_retvm_if(!liveboxUG, -1, "Create SettingPasswordUG obj failed"); + + ops->create = setting_livebox_ug_on_create; + ops->start = setting_livebox_ug_on_start; + ops->pause = setting_livebox_ug_on_pause; + ops->resume = setting_livebox_ug_on_resume; + ops->destroy = setting_livebox_ug_on_destroy; + ops->message = setting_livebox_ug_on_message; + ops->event = setting_livebox_ug_on_event; + ops->key_event = setting_livebox_ug_on_key_event; + ops->priv = liveboxUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + struct SettingLiveboxUG *liveboxUG; + setting_retm_if(!ops, "ops == NULL"); + + liveboxUG = ops->priv; + if (liveboxUG) + FREE(liveboxUG); +} diff --git a/setting-memory/CMakeLists.txt b/setting-memory/CMakeLists.txt old mode 100644 new mode 100755 index 742b873..dd4c1dd --- a/setting-memory/CMakeLists.txt +++ b/setting-memory/CMakeLists.txt @@ -3,7 +3,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs_memory REQUIRED elementary appcore-common appcore-efl ui-gadget bundle tapi devman contacts-service calendar memo msg-service heynoti sysman) +pkg_check_modules(pkgs_memory REQUIRED elementary appcore-common appcore-efl ui-gadget-1 capi-appfw-application tapi devman heynoti sysman) FOREACH(flag ${pkgs_memory_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") diff --git a/setting-memory/include/setting-memory-common.h b/setting-memory/include/setting-memory-common.h old mode 100644 new mode 100755 index 535b968..da9e844 --- a/setting-memory/include/setting-memory-common.h +++ b/setting-memory/include/setting-memory-common.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_MEMORY_COMMON_H__ #define __SETTING_MEMORY_COMMON_H__ diff --git a/setting-memory/include/setting-memory-default-memory.h b/setting-memory/include/setting-memory-default-memory.h old mode 100644 new mode 100755 index adfacb5..60a4d86 --- a/setting-memory/include/setting-memory-default-memory.h +++ b/setting-memory/include/setting-memory-default-memory.h @@ -1,19 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_MEMORY_DEFAULT_MEMORY_H__ #define __SETTING_MEMORY_DEFAULT_MEMORY_H__ diff --git a/setting-memory/include/setting-memory-main.h b/setting-memory/include/setting-memory-main.h old mode 100644 new mode 100755 index 4dceaf9..a0054ac --- a/setting-memory/include/setting-memory-main.h +++ b/setting-memory/include/setting-memory-main.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_MEMORY_MAIN_H__ #define __SETTING_MEMORY_MAIN_H__ diff --git a/setting-memory/include/setting-memory-status.h b/setting-memory/include/setting-memory-status.h old mode 100644 new mode 100755 index 83d2931..f27465b --- a/setting-memory/include/setting-memory-status.h +++ b/setting-memory/include/setting-memory-status.h @@ -1,39 +1,37 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_MEMORY_STATUS_H__ #define __SETTING_MEMORY_STATUS_H__ #include +#include #ifndef _A_PROJECT_ #define _A_PROJECT_ #endif -#include -#include -#include -#include -#include + #include #include #include -#include - #define SETTING_MEMORY_EMAIL_MAX "5000" #define SETTING_MEMORY_MSG_SMS_MAX "2600" #define SETTING_MEMORY_MSG_MMS_MAX "800" @@ -50,9 +48,10 @@ #define SETTING_MEMORY_STATUS_UNMOUNT_SD_CARD_DESC "IDS_ST_BODY_UNMOUNT_SD_CARD" #define SETTING_MEMORY_STATUS_FORMAT_SD_CARD_DESC "IDS_ST_BODY_FORMAT_SD_CARD" #define SETTING_MEMORY_STATUS_INTERNAL_SD_CARD_DESC "Internal SD card" -#define SETTING_MEMORY_STATUS_INTERNAL_PHONE_STORAGE_DESC "IDS_COM_BODY_SYSTEM_STORAGE" #define SETTING_MEMORY_STATUS_MAIN_STORAGE_DESC "Main storage" +#define SETTING_MEMORY_STATUS_SYSTEM_SPACE_DESC "IDS_COM_BODY_SYSTEM_STORAGE" + #define SETTING_MEMORY_STATUS_FORMAT_ASK_MSG "This action will erase the
external storage in the phone.
You will lost ALL data on the card!
Format?" #define SETTING_MEMORY_STATUS_PROGRESSBAR_TIMEOUT 10 diff --git a/setting-memory/include/setting-memory.h b/setting-memory/include/setting-memory.h old mode 100644 new mode 100755 index 6f0eb97..e483df6 --- a/setting-memory/include/setting-memory.h +++ b/setting-memory/include/setting-memory.h @@ -1,38 +1,45 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_MEMORY_H__ #define __SETTING_MEMORY_H__ #include -#include #include #include -#include -#include -#include #include #include #include #include +#include #include +#ifdef SUPPORT_MDM +#include +#define MDM_POLICY_STORAGE_RESTRICTED_STR "Security policy restricts use of SD card" +#endif + + typedef void (*setting_memory_mmc_cb) (int val, void *data); typedef struct _SettingMemoryUG SettingMemoryUG; @@ -54,12 +61,12 @@ typedef struct __setting_mem_status { /** * Setting Memory UG context - * all UG function has void* as an agument. this is casted back to SettingMemoryUG + * all UG function has void* as an agument. this is casted back to SettingMemoryUG * and the functions access app context. */ struct _SettingMemoryUG { - struct ui_gadget *ug; - struct ui_gadget *ug_loading; + ui_gadget_h ug; + ui_gadget_h ug_loading; Evas *evas; Evas_Object *win_main_layout; @@ -74,10 +81,22 @@ struct _SettingMemoryUG { float progress_bar_rate; Evas_Object *navi_bar; +#ifdef SUPPORT_MDM + mdm_result_t mdm_server_state; + mdm_status_t storage_policy_status; +#endif + Evas_Object *msg_intial_popup; Evas_Object *ly_main; Setting_GenGroupItem_Data *data_wap; + Setting_GenGroupItem_Data *data_bt; + Setting_GenGroupItem_Data *data_cmr; + Setting_GenGroupItem_Data *data_vrec; + Setting_GenGroupItem_Data *data_rdo; + Setting_GenGroupItem_Data *data_shr; + Setting_GenGroupItem_Data *data_adobeAir; + Setting_GenGroupItem_Data *data_dvb_h; setting_memory_umem_size_t umem_size; Elm_Genlist_Item_Class itc_1text_1icon_2; @@ -99,6 +118,7 @@ struct _SettingMemoryUG { Setting_GenGroupItem_Data *data_in_format; Setting_GenGroupItem_Data *data_phone_storage_available; Setting_GenGroupItem_Data *data_main_storage_available; + Setting_GenGroupItem_Data *data_system_storage_available; struct mmc_contents *mmc_content; }; diff --git a/setting-memory/src/setting-memory-common.c b/setting-memory/src/setting-memory-common.c old mode 100644 new mode 100755 index b66ffa5..ebf6b38 --- a/setting-memory/src/setting-memory-common.c +++ b/setting-memory/src/setting-memory-common.c @@ -1,19 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #include diff --git a/setting-memory/src/setting-memory-default-memory.c b/setting-memory/src/setting-memory-default-memory.c old mode 100644 new mode 100755 index 47aa976..fb1bc4d --- a/setting-memory/src/setting-memory-default-memory.c +++ b/setting-memory/src/setting-memory-default-memory.c @@ -1,22 +1,26 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include - +#define SUPPORT_DVB_B 1 +#define DVB_H_STR "DVB-H" static int setting_memory_default_memory_create(void *cb); static int setting_memory_default_memory_destroy(void *cb); static int setting_memory_default_memory_update(void *cb); @@ -57,7 +61,15 @@ static void __setting_memory_default_exp_cb(void *data, Evas_Object *obj, Evas_Object *scroller = elm_object_item_widget_get(parentItem); Evas_Object *rgd; - if (data_parentItem == ad->data_wap) { + if (data_parentItem == ad->data_wap + || data_parentItem == ad->data_bt + || data_parentItem == ad->data_cmr + || data_parentItem == ad->data_vrec + || data_parentItem == ad->data_rdo + || data_parentItem == ad->data_shr + || data_parentItem == ad->data_dvb_h) { + + SETTING_TRACE_DEBUG("start drawing exp menu."); rgd = elm_radio_add(scroller); elm_radio_value_set(rgd, -1); @@ -70,7 +82,7 @@ static void __setting_memory_default_exp_cb(void *data, Evas_Object *obj, NULL); Setting_GenGroupItem_Data *data_memory_card = NULL; - data_memory_card = + data_memory_card = setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, @@ -85,7 +97,7 @@ static void __setting_memory_default_exp_cb(void *data, Evas_Object *obj, setting_retm_if(ret != 0, "Get vconf failed"); /* if mmc card is not mounted, set item disable */ - if (mmc_mode == VCONFKEY_SYSMAN_MMC_REMOVED || + if (mmc_mode == VCONFKEY_SYSMAN_MMC_REMOVED || mmc_mode == VCONFKEY_SYSMAN_MMC_INSERTED_NOT_MOUNTED) { setting_disable_genlist_item(data_memory_card->item); } @@ -135,6 +147,135 @@ static int setting_memory_default_memory_create(void *cb) SETTING_TRACE_ERROR("ad->data_wap is NULL"); } + /* 2 bt */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_bt = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_COM_BODY_BLUETOOTH", + setting_default_memory_get_desc_str_by_vconf + (INT_SLP_SETTING_DEFAULT_MEM_BLUETOOTH)); + if (ad->data_bt) { + ad->data_bt->int_slp_setting_binded = + INT_SLP_SETTING_DEFAULT_MEM_BLUETOOTH; + } else { + SETTING_TRACE_ERROR("ad->data_bt is NULL"); + } + + /* 3 cmr */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_cmr = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_COM_BODY_CAMERA", + setting_default_memory_get_desc_str_by_vconf + (INT_SLP_SETTING_DEFAULT_MEM_CAMERA)); + if (ad->data_cmr) { + ad->data_cmr->int_slp_setting_binded = + INT_SLP_SETTING_DEFAULT_MEM_CAMERA; + } else { + SETTING_TRACE_ERROR("ad->data_cmr is NULL"); + } + /* 4 vrec */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_vrec = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_COM_BODY_VOICE_RECORDER", + setting_default_memory_get_desc_str_by_vconf + (INT_SLP_SETTING_DEFAULT_MEM_VOICE_RECORDER)); + if (ad->data_vrec) { + ad->data_vrec->int_slp_setting_binded = + INT_SLP_SETTING_DEFAULT_MEM_VOICE_RECORDER; + } else { + SETTING_TRACE_ERROR("ad->data_vrec is NULL"); + } + +#if SUPPORT_FMradio + /* 5 rdo */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_rdo = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_COM_BODY_FM_RADIO", + setting_default_memory_get_desc_str_by_vconf + (INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO)); + if (ad->data_rdo) { + ad->data_rdo->int_slp_setting_binded = + INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO; + } else { + SETTING_TRACE_ERROR("ad->data_rdo is NULL"); + } +#endif + +#if SUPPORT_AllShare_Memory + + /* 6 shr */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_shr = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + "IDS_COM_BODY_ALLSHARE", + setting_default_memory_get_desc_str_by_vconf + (INT_SLP_SETTING_DEFAULT_MEM_ALL_SHARE)); + if (ad->data_shr) { + ad->data_shr->int_slp_setting_binded = + INT_SLP_SETTING_DEFAULT_MEM_ALL_SHARE; + } else { + SETTING_TRACE_ERROR("ad->data_shr is NULL"); + } +#endif +#if SUPPORT_DVB_B + /* 7 DVB-H */ + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + ad->data_dvb_h = + setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + NULL, NULL, + SWALLOW_Type_INVALID, + DVB_H_STR, + setting_default_memory_get_desc_str_by_vconf + (INT_SLP_SETTING_DEFAULT_MEM_DVB_H)); + if (ad->data_dvb_h) { + ad->data_dvb_h->int_slp_setting_binded = + INT_SLP_SETTING_DEFAULT_MEM_DVB_H; + } else { + SETTING_TRACE_ERROR("ad->data_shr is NULL"); + } +#endif + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + int ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, __setting_memory_default_memory_vconf_change_cb, ad); if (ret != 0) { @@ -188,7 +329,7 @@ char *setting_default_memory_get_desc_str_by_vconf(setting_int_slp_list slp_key) setting_retvm_if(ret != 0, NULL, "Get vconf failed"); /* if mmc card is not mounted, set vconf by 0(phone) */ - if (mmc_mode == VCONFKEY_SYSMAN_MMC_REMOVED || + if (mmc_mode == VCONFKEY_SYSMAN_MMC_REMOVED || mmc_mode == VCONFKEY_SYSMAN_MMC_INSERTED_NOT_MOUNTED) { ret = setting_set_int_slp_key(slp_key, 0, &err); setting_retvm_if(ret != 0, NULL, "Set vconf failed"); @@ -204,6 +345,7 @@ char *setting_default_memory_get_desc_str_by_vconf(setting_int_slp_list slp_key) case INT_SLP_SETTING_DEFAULT_MEM_FM_RADIO: case INT_SLP_SETTING_DEFAULT_MEM_ALL_SHARE: case INT_SLP_SETTING_DEFAULT_MEM_ADOBE_AIR: + case INT_SLP_SETTING_DEFAULT_MEM_DVB_H: { if (ret == SETTING_RETURN_FAIL || value >= SETTING_DEF_MEMORY_MAX) @@ -315,8 +457,18 @@ static void __setting_memory_default_memory_update_item_status( } /* if mmc is not mounted, update vconf*/ + setting_retm_if(NULL == ad->data_bt, "ad->data_wap is NULL"); + setting_retm_if(NULL == ad->data_cmr, "ad->data_wap is NULL"); + setting_retm_if(NULL == ad->data_vrec, "ad->data_wap is NULL"); + setting_retm_if(NULL == ad->data_rdo, "ad->data_wap is NULL"); + setting_retm_if(NULL == ad->data_shr, "ad->data_wap is NULL"); if (disable_mmc_flag) { __setting_memory_default_memory_update_vconf(ad->data_wap); + __setting_memory_default_memory_update_vconf(ad->data_bt); + __setting_memory_default_memory_update_vconf(ad->data_cmr); + __setting_memory_default_memory_update_vconf(ad->data_vrec); + __setting_memory_default_memory_update_vconf(ad->data_rdo); + __setting_memory_default_memory_update_vconf(ad->data_shr); } } diff --git a/setting-memory/src/setting-memory-main.c b/setting-memory/src/setting-memory-main.c old mode 100644 new mode 100755 index fa8982d..1695e19 --- a/setting-memory/src/setting-memory-main.c +++ b/setting-memory/src/setting-memory-main.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #define VCONFKEY_MEMORY_STATUS "memory/msg/ready" @@ -69,12 +72,15 @@ static int setting_memory_main_create(void *cb) ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + // [UI] Default Memory setting_create_Gendial_field_def(scroller, &(ad->itc_1text), setting_memory_main_mouse_up_Gendial_list_cb, ad, SWALLOW_Type_INVALID, NULL, NULL, 0, "IDS_ST_BODY_MEMORYSETTINGS_DEFAULT_MEMORY", NULL, NULL); + + // [UI] Memory Status setting_create_Gendial_field_def(scroller, &(ad->itc_1text), setting_memory_main_mouse_up_Gendial_list_cb, ad, SWALLOW_Type_INVALID, NULL, NULL, @@ -109,6 +115,9 @@ static int setting_memory_main_update(void *cb) static int setting_memory_main_cleanup(void *cb) { SETTING_TRACE_BEGIN; + /* SettingMemoryUG *ad = (SettingMemoryUG *)cb; */ + /* evas_object_hide(ad->ly_main); */ + return 0; } @@ -123,6 +132,7 @@ setting_memory_main_memory_status_change_cb(keynode_t *key, void *data) SETTING_TRACE_BEGIN; SettingMemoryUG *ad = data; int status = vconf_keynode_get_bool(key); + /* char *vconf_name = vconf_keynode_get_name(key); */ if (1 == status) { if (ad->msg_intial_popup != NULL) { @@ -174,8 +184,8 @@ setting_memory_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, ad->msg_intial_popup = setting_create_popup_without_btn(ad, ad->win_get, - _(SETTING_MEMORY_MSG_SERVER_POPUP_INFO_MSG), - NULL, NULL, 0); + NULL, _(SETTING_MEMORY_MSG_SERVER_POPUP_INFO_MSG), + NULL, 0, TRUE, TRUE); } else { /* ready */ setting_view_change(&setting_view_memory_main, diff --git a/setting-memory/src/setting-memory-status.c b/setting-memory/src/setting-memory-status.c old mode 100644 new mode 100755 index fb767c8..5261f00 --- a/setting-memory/src/setting-memory-status.c +++ b/setting-memory/src/setting-memory-status.c @@ -1,23 +1,28 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #define MAX_STR_LEN_ON_MEMORY_STATUS 32 +#define MAIN_STORAGE 0 + static int setting_memory_status_create(void *cb); static int setting_memory_status_destroy(void *cb); static int setting_memory_status_update(void *cb); @@ -30,17 +35,64 @@ setting_view setting_view_memory_status = { .cleanup = setting_memory_status_cleanup, }; -static void __setting_memory_status_vconf_change_cb( - keynode_t *key, void *data); +static void __setting_memory_status_vconf_change_cb( keynode_t *key, void *data); static int __setting_memory_status_check_mmc_status(); static int __setting_memory_status_mmc_content_init(void *data, setting_memory_mmc_cb cb); +static void __setting_memory_status_system_storage_available_size_get(char *szAvail) +{ + SETTING_TRACE_BEGIN; + + double dTotal = 0.0; + double dAvail = 0.0; + int ret = SETTING_RETURN_SUCCESS; + setting_mem_status internal_mem_stat; + + ret = __fs_stat(&dTotal, &dAvail, SETTING_MEMORY_STATUS_APP_PATH); + setting_retm_if(ret == SETTING_RETURN_FAIL, "get app_mem stat failed"); + internal_mem_stat.dTotal = dTotal; + internal_mem_stat.dAvail = dAvail; + + ret = setting_memory_status_size_transition(internal_mem_stat.dAvail, szAvail); + setting_retm_if(ret == SETTING_RETURN_FAIL, "setting_memory_status_size_transition fail"); +} + static int setting_memory_status_create(void *cb) { SETTING_TRACE_BEGIN; SettingMemoryUG *ad = (SettingMemoryUG *) cb; Evas_Object *scroller; + +#ifdef SUPPORT_MDM + if(ad->mdm_server_state == MDM_RESULT_SUCCESS) + { + ad->storage_policy_status = mdm_get_allow_sd_card(); + if(ad->storage_policy_status == MDM_STATUS_ERROR) + { + SETTING_TRACE("function error - mdm_get_allow_sd_card() "); + } + else + { + SETTING_TRACE("function success - mdm_get_allow_sd_card() "); + if (ad->storage_policy_status == MDM_ALLOWED) + { + SETTING_TRACE(">>> MDM ALLOWED "); + } + else if (ad->storage_policy_status == MDM_RESTRICTED) + { + SETTING_TRACE(">>> MDM RESTRICTED "); + } + } + } +#endif + + /* Evas_Object *user_mem_fr, *phone_mem_fr, *fr_bx1, *fr_bx2; */ + /* Evas_Object *sp; */ + /* float tmp_free_size, tmp_total_size; */ + /* char free_str[MAX_STR_LEN_ON_MEMORY_STATUS] = {0, }; */ + /* char total_str[MAX_STR_LEN_ON_MEMORY_STATUS] = {0, }; */ + /* char size_str[MAX_STR_LEN_ON_MEMORY_STATUS*2] = {0, }; */ setting_push_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, _("IDS_ST_BODY_MEMORY_STATUS"), S_("IDS_COM_BODY_BACK"), NULL, @@ -88,14 +140,14 @@ static int setting_memory_status_create(void *cb) SETTING_TRACE_ERROR("ad->data_ex_available is NULL"); } - if (! isEmulBin()) + if(!isEmulBin()) { ad->data_ex_mount = - setting_create_Gendial_field_def(scroller, &(ad->itc_1text), - setting_memory_status_mouse_up_Gendial_list_cb, - ad, SWALLOW_Type_INVALID, NULL, - NULL, 0, ex_mount_status, NULL, - NULL); + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_memory_status_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, ex_mount_status, NULL, + NULL); if (ad->data_ex_mount) { ad->data_ex_mount->userdata = ad; } else { @@ -103,29 +155,45 @@ static int setting_memory_status_create(void *cb) } ad->data_ex_format = - setting_create_Gendial_field_def(scroller, &(ad->itc_1text), - setting_memory_status_mouse_up_Gendial_list_cb, - ad, SWALLOW_Type_INVALID, NULL, - NULL, 0, - SETTING_MEMORY_STATUS_FORMAT_SD_CARD_DESC, - NULL, NULL); + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_memory_status_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, + SETTING_MEMORY_STATUS_FORMAT_SD_CARD_DESC, + NULL, NULL); if (ad->data_ex_format) { ad->data_ex_format->userdata = ad; } else { SETTING_TRACE_ERROR("ad->data_ex_format is NULL"); } - } else { - ad->data_ex_mount = NULL; - ad->data_ex_format = NULL; - } - setting_memory_status_list_item_enable_set_by_mmc_status(ad, - ex_mmc_status); + setting_memory_status_list_item_enable_set_by_mmc_status(ad, ex_mmc_status); + } + /* System storage */ + setting_create_Gendial_field_titleItem(scroller, &(ad->itc_group_item), + SETTING_MEMORY_STATUS_SYSTEM_SPACE_DESC, + NULL); + char system_storage_available[SETTING_MEMORY_MMC_MAX_MEM_STR_LEN] = {0,}; + __setting_memory_status_system_storage_available_size_get(system_storage_available); + ad->data_system_storage_available = + setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, system_storage_available, + SETTING_MEMORY_STATUS_AVAILABLE_SPACE_DESC, + NULL); + if (ad->data_system_storage_available) { + ad->data_system_storage_available->userdata = ad; + elm_genlist_item_select_mode_set(ad->data_system_storage_available-> + item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->data_system_storage_available is NULL"); + } +#if MAIN_STORAGE /* Internal phone storage */ setting_create_Gendial_field_titleItem(scroller, &(ad->itc_group_item), - SETTING_MEMORY_STATUS_INTERNAL_PHONE_STORAGE_DESC, + SETTING_MEMORY_STATUS_MAIN_STORAGE_DESC, NULL); char phone_storage_available[SETTING_MEMORY_MMC_MAX_MEM_STR_LEN] = {0,}; @@ -144,13 +212,19 @@ static int setting_memory_status_create(void *cb) } else { SETTING_TRACE_ERROR("ad->data_phone_storage_available is NULL"); } +#endif + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); int ret = vconf_notify_key_changed(VCONFKEY_USB_STORAGE_STATUS, __setting_memory_status_vconf_change_cb, ad); if (ret != 0) { SETTING_TRACE_ERROR("call vconf_notify_key_changed failed"); } - + ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, __setting_memory_status_vconf_change_cb, ad); if (ret != 0) { @@ -186,7 +260,7 @@ static int setting_memory_status_destroy(void *cb) __setting_memory_status_vconf_change_cb); if (ret != 0) { SETTING_TRACE_ERROR("call vconf_ignore_key_changed failed"); - } + } if (ad->mmc_content) { FREE(ad->mmc_content); @@ -207,14 +281,17 @@ static int setting_memory_status_update(void *cb) SETTING_TRACE_ERROR("ad is null."); } // update sd card statistic - setting_memory_status_ex_sd_card_refresh_card_details_cb(ad, NULL, NULL); + if (ad) + setting_memory_status_ex_sd_card_refresh_card_details_cb(ad, NULL, NULL); // update internal phone storage statistic char phone_storage_available[SETTING_MEMORY_MMC_MAX_MEM_STR_LEN] = {0,}; setting_memory_status_get_phone_storage_available_size(ad, phone_storage_available); - if ( ad && ad->data_phone_storage_available) - setting_memory_status_list_item_data_set(ad->data_phone_storage_available, phone_storage_available); +#if MAIN_STORAGE + if (ad->data_phone_storage_available) + setting_memory_status_list_item_data_set(ad->data_phone_storage_available, phone_storage_available); +#endif SETTING_TRACE_END; return 0; } @@ -233,7 +310,7 @@ static int setting_memory_status_cleanup(void *cb) static int __fs_stat(double* pdTotal, double* pdAvail, const char* szPath) { SETTING_TRACE_BEGIN; - setting_retvm_if(NULL == pdTotal || NULL == pdAvail, + setting_retvm_if(NULL == pdTotal || NULL == pdAvail, SETTING_RETURN_FAIL, "Null output parameters"); struct statvfs s; @@ -359,8 +436,9 @@ setting_memory_status_ex_sd_card_format_promt_popup_create(void *data) ad->popup = NULL; } - ad->popup = setting_create_popup_with_btn(ad, ad->win_get, _(SETTING_MEMORY_STATUS_FORMAT_ASK_MSG), - NULL, ad->curr_popup_cb, 0, + ad->popup = setting_create_popup_with_btn(ad, ad->win_get, NULL, + _(SETTING_MEMORY_STATUS_FORMAT_ASK_MSG), + ad->curr_popup_cb, 0, 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); } @@ -402,7 +480,7 @@ setting_memory_status_ex_sd_card_format_promt_popup_left_btn_cb(void *data, "list_process", _("IDS_ST_POP_MSG_FORMATTING"), NULL, NULL, - SETTING_MEMORY_STATUS_PROGRESSBAR_TIMEOUT); + SETTING_MEMORY_STATUS_PROGRESSBAR_TIMEOUT, TRUE, TRUE); int ret = __setting_memory_status_mmc_content_init(ad, setting_memory_status_ex_sd_card_format_cb); if (ret == SETTING_RETURN_FAIL) { @@ -411,10 +489,10 @@ setting_memory_status_ex_sd_card_format_promt_popup_left_btn_cb(void *data, evas_object_del(ad->popup); ad->popup = NULL; } - ad->popup = setting_create_popup_without_btn(ad, ad->win_get, - _("IDS_COM_POP_FAILED"), - NULL, NULL, - SETTING_MEMORY_POPUP_TIMER); + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED"), + NULL, + SETTING_MEMORY_POPUP_TIMER, FALSE, FALSE); return; } @@ -427,9 +505,9 @@ setting_memory_status_ex_sd_card_format_promt_popup_left_btn_cb(void *data, ad->popup = NULL; } ad->popup = setting_create_popup_without_btn(ad, ad->win_get, - _("IDS_COM_POP_FAILED"), - NULL, NULL, - SETTING_MEMORY_POPUP_TIMER); + NULL, _("IDS_COM_POP_FAILED"), + NULL, + SETTING_MEMORY_POPUP_TIMER, FALSE, FALSE); } } @@ -465,10 +543,10 @@ static void setting_memory_status_ex_sd_card_mount_unmount(void *data) } /* Show progressbar popup */ - ad->popup = setting_create_popup_with_progressbar(ad, ad->win_get, + ad->popup = setting_create_popup_with_progressbar(ad, ad->win_get, "pending_list", NULL, NULL, NULL, - SETTING_MEMORY_STATUS_PROGRESSBAR_TIMEOUT); + SETTING_MEMORY_STATUS_PROGRESSBAR_TIMEOUT, TRUE, TRUE); int ret = -1; /* Does not mounted, same st_dev */ @@ -481,9 +559,9 @@ static void setting_memory_status_ex_sd_card_mount_unmount(void *data) ad->popup = NULL; } ad->popup = setting_create_popup_without_btn(ad, ad->win_get, - _("IDS_COM_POP_FAILED"), - NULL, NULL, - SETTING_MEMORY_POPUP_TIMER); + NULL, _("IDS_COM_POP_FAILED"), + NULL, + SETTING_MEMORY_POPUP_TIMER, FALSE, FALSE); return; } ret = sysman_request_mount_mmc(ad->mmc_content); @@ -501,9 +579,9 @@ static void setting_memory_status_ex_sd_card_mount_unmount(void *data) ad->popup = NULL; } ad->popup = setting_create_popup_without_btn(ad, ad->win_get, - _("IDS_COM_POP_FAILED"), - NULL, NULL, - SETTING_MEMORY_POPUP_TIMER); + NULL, _("IDS_COM_POP_FAILED"), + NULL, + SETTING_MEMORY_POPUP_TIMER, FALSE, FALSE); return; } @@ -520,10 +598,10 @@ static void setting_memory_status_ex_sd_card_mount_unmount(void *data) evas_object_del(ad->popup); ad->popup = NULL; } - ad->popup = setting_create_popup_without_btn(ad, ad->win_get, - _("IDS_COM_POP_FAILED"), - NULL, NULL, - SETTING_MEMORY_POPUP_TIMER); + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, + NULL, _("IDS_COM_POP_FAILED"), + NULL, + SETTING_MEMORY_POPUP_TIMER, FALSE, FALSE); } } @@ -550,8 +628,10 @@ setting_memory_status_ex_sd_card_refresh_card_details_cb(void *data, setting_memory_status_list_item_data_set(ad->data_ex_total, ex_total_space); setting_memory_status_list_item_data_set(ad->data_ex_available, ex_available_space); - setting_memory_status_list_item_data_set(ad->data_ex_mount, ex_mount_status); - + if(!isEmulBin()) + { + setting_memory_status_list_item_data_set(ad->data_ex_mount, ex_mount_status); + } setting_memory_status_list_item_enable_set_by_mmc_status(ad, ex_mmc_status); } @@ -567,11 +647,10 @@ setting_memory_status_ex_sd_card_operate_complete(void *data, char *desc, if (ad->popup) { evas_object_del(ad->popup); ad->popup = NULL; - } - ad->popup = setting_create_popup_without_btn(ad, ad->win_get, desc, - NULL, + } + ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, desc, setting_memory_status_ex_sd_card_refresh_card_details_cb, - SETTING_MEMORY_POPUP_TIMER); + SETTING_MEMORY_POPUP_TIMER, FALSE, FALSE); } } @@ -583,42 +662,65 @@ setting_memory_status_list_item_enable_set_by_mmc_status(void *data, setting_retm_if(data == NULL, "Data parameter is NULL"); SettingMemoryUG *ad = (SettingMemoryUG *) data; - setting_retm_if(ad->data_ex_mount == NULL, "Data parameter is NULL"); - setting_retm_if(ad->data_ex_format == NULL, "Data parameter is NULL"); - - Eina_Bool ex_mount_disabled = elm_object_item_disabled_get(ad->data_ex_mount->item); - Eina_Bool ex_format_disabled = elm_object_item_disabled_get(ad->data_ex_format->item); - if (ex_mmc_status == VCONFKEY_SYSMAN_MMC_REMOVED) { - if (ex_mount_disabled == EINA_FALSE) { + setting_disable_genlist_item(ad->data_ex_total->item); + setting_disable_genlist_item(ad->data_ex_available->item); + if(!isEmulBin()) + { setting_disable_genlist_item(ad->data_ex_mount->item); - } - if (ex_format_disabled == EINA_FALSE) { setting_disable_genlist_item(ad->data_ex_format->item); } } else if (ex_mmc_status == VCONFKEY_SYSMAN_MMC_INSERTED_NOT_MOUNTED) { - if (ex_mount_disabled == EINA_TRUE) { + setting_disable_genlist_item(ad->data_ex_total->item); + setting_disable_genlist_item(ad->data_ex_available->item); + if(!isEmulBin()) + { setting_enable_genlist_item(ad->data_ex_mount->item); - } - if (ex_format_disabled == EINA_FALSE) { setting_disable_genlist_item(ad->data_ex_format->item); } - } else { - if (ex_mount_disabled == EINA_TRUE) { - setting_enable_genlist_item(ad->data_ex_mount->item); - } - if (ex_format_disabled == EINA_TRUE) { - setting_enable_genlist_item(ad->data_ex_format->item); + } else if (ex_mmc_status == VCONFKEY_SYSMAN_MMC_MOUNTED){ +#ifdef SUPPORT_MDM + if(ad->mdm_server_state == MDM_RESULT_SUCCESS) + { + if(ad->storage_policy_status == MDM_ALLOWED) + { + setting_enable_genlist_item(ad->data_ex_total->item); + setting_enable_genlist_item(ad->data_ex_available->item); + if(!isEmulBin()) + { + setting_enable_genlist_item(ad->data_ex_mount->item); + setting_enable_genlist_item(ad->data_ex_format->item); + } + } + else if(ad->storage_policy_status == MDM_RESTRICTED) + { + setting_disable_genlist_item(ad->data_ex_total->item); + setting_disable_genlist_item(ad->data_ex_available->item); + if(!isEmulBin()) + { + setting_disable_genlist_item(ad->data_ex_mount->item); + setting_disable_genlist_item(ad->data_ex_format->item); + } + setting_create_popup_without_btn(ad, ad->ly_main, NULL, MDM_POLICY_STORAGE_RESTRICTED_STR, + NULL, + POPUP_INTERVAL, FALSE, FALSE); + } } +#endif + } else { + SETTING_TRACE_DEBUG("abnormal status of MMC"); } int storage_status = VCONFKEY_USB_STORAGE_STATUS_OFF; int ret = vconf_get_int(VCONFKEY_USB_STORAGE_STATUS, &storage_status); setting_retm_if(ret != 0, "Get VCONFKEY_USB_STORAGE_STATUS failed"); - + if (storage_status == VCONFKEY_USB_STORAGE_STATUS_UMS_MMC_ON) { - setting_disable_genlist_item(ad->data_ex_mount->item); - setting_disable_genlist_item(ad->data_ex_format->item); + if(!isEmulBin()) + { + setting_disable_genlist_item(ad->data_ex_mount->item); + setting_disable_genlist_item(ad->data_ex_format->item); + } } } @@ -658,7 +760,7 @@ setting_memory_status_get_phone_storage_available_size(void *data, setting_retm_if(ret == SETTING_RETURN_FAIL, "get media_mem stat failed"); internal_mem_stat.dTotal += dTotal; internal_mem_stat.dAvail += dAvail; - + ret = setting_memory_status_size_transition(internal_mem_stat.dAvail, szAvail); setting_retm_if(ret == SETTING_RETURN_FAIL, "setting_memory_status_size_transition fail"); @@ -684,7 +786,7 @@ setting_memory_status_size_transition(double size, char *size_desc) ret = snprintf(size_desc, SETTING_MEMORY_MMC_MAX_MEM_STR_LEN, "%4.2lf%s", tmp_size, "GB"); retv_if(ret < 0, SETTING_RETURN_FAIL); } - + return SETTING_RETURN_SUCCESS; } @@ -738,8 +840,7 @@ static void setting_memory_status_ex_sd_card_unmount_cb(int val, void *data) } } -static void __setting_memory_status_vconf_change_cb( - keynode_t *key, void *data) +static void __setting_memory_status_vconf_change_cb( keynode_t *key, void *data) { SETTING_TRACE_BEGIN; setting_retm_if(NULL == key, "key is NULL"); @@ -757,8 +858,10 @@ static void __setting_memory_status_vconf_change_cb( char phone_storage_available[SETTING_MEMORY_MMC_MAX_MEM_STR_LEN] = {0,}; setting_memory_status_get_phone_storage_available_size(ad, phone_storage_available); - setting_memory_status_list_item_data_set(ad->data_phone_storage_available, - phone_storage_available); + +#if MAIN_STORAGE + setting_memory_status_list_item_data_set(ad->data_phone_storage_available, phone_storage_available); +#endif } else if (!safeStrCmp(vconf_name, VCONFKEY_SYSMAN_MMC_STATUS)) { SETTING_TRACE("status:%d", status); setting_memory_status_ex_sd_card_refresh_card_details_cb(ad, @@ -781,11 +884,13 @@ static int __setting_memory_status_check_mmc_status() setting_retvm_if(ret != 0, -1, "get stat error : /opt/storage/sdcard/.."); /* Does not mounted, same st_dev */ - if (mount_stat.st_dev == parent_stat.st_dev) { + if(mount_stat.st_dev == parent_stat.st_dev) + { return 0; } - /* MMC mounted, diff st_dev */ - else { + /* MMC mounted, diff st_dev */ + else + { return 1; } } diff --git a/setting-memory/src/setting-memory.c b/setting-memory/src/setting-memory.c old mode 100644 new mode 100755 index 43bbf57..ab742e4 --- a/setting-memory/src/setting-memory.c +++ b/setting-memory/src/setting-memory.c @@ -1,19 +1,28 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +/** + *@defgroup setting-memory + *UG creation code for setting-memory + */ #include @@ -28,12 +37,12 @@ static void setting_memory_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, setting_view_update(&setting_view_memory_main, ad); } -static void *setting_memory_ug_on_create(struct ui_gadget *ug, - enum ug_mode mode, bundle *data, +static void *setting_memory_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, void *priv) { SETTING_TRACE_BEGIN; - setting_retvm_if((!ug || !priv), NULL, "!ug || !priv"); + setting_retvm_if((!priv), NULL, "!priv"); SettingMemoryUG *memoryUG = priv; memoryUG->ug = ug; @@ -46,6 +55,11 @@ static void *setting_memory_ug_on_create(struct ui_gadget *ug, setting_retvm_if(memoryUG->win_main_layout == NULL, NULL, "cannot get main window "); +#ifdef SUPPORT_MDM + memoryUG->mdm_server_state = mdm_get_service(); + SETTING_TRACE("mdm server status: %d", memoryUG->mdm_server_state); +#endif + /* register view node table */ setting_view_node_table_intialize(); setting_view_node_table_register(&setting_view_memory_main, NULL); @@ -85,17 +99,17 @@ static void *setting_memory_ug_on_create(struct ui_gadget *ug, return memoryUG->ly_main; } -static void setting_memory_ug_on_start(struct ui_gadget *ug, bundle *data, +static void setting_memory_ug_on_start(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_memory_ug_on_pause(struct ui_gadget *ug, bundle *data, +static void setting_memory_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_memory_ug_on_resume(struct ui_gadget *ug, bundle *data, +static void setting_memory_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) { SETTING_TRACE_BEGIN; @@ -106,22 +120,29 @@ static void setting_memory_ug_on_resume(struct ui_gadget *ug, bundle *data, if (TRUE == setting_view_memory_status.is_create) { setting_view_update(&setting_view_memory_status, ad); } - + SETTING_TRACE_END; } -static void setting_memory_ug_on_destroy(struct ui_gadget *ug, bundle *data, +static void setting_memory_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) { SETTING_TRACE_BEGIN; - setting_retm_if((!ug || !priv), "!ug || !priv"); + setting_retm_if((!priv), "!priv"); SettingMemoryUG *memoryUG = priv; evas_object_event_callback_del(memoryUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_memory_ug_cb_resize); /* fix flash issue for gallery */ memoryUG->ug = ug; +#ifdef SUPPORT_MDM + if(memoryUG->mdm_server_state == MDM_RESULT_SUCCESS) + { + mdm_release_service(); + } +#endif + /* delete the allocated objects. */ - + if (TRUE == setting_view_memory_default_memory.is_create) { setting_view_destroy(&setting_view_memory_default_memory, memoryUG); } @@ -131,7 +152,7 @@ static void setting_memory_ug_on_destroy(struct ui_gadget *ug, bundle *data, if (TRUE == setting_view_memory_main.is_create) { setting_view_destroy(&setting_view_memory_main, memoryUG); } - + if (NULL != ug_get_layout(memoryUG->ug)) { evas_object_hide((Evas_Object *) ug_get_layout(memoryUG->ug)); evas_object_del((Evas_Object *) ug_get_layout(memoryUG->ug)); @@ -140,14 +161,14 @@ static void setting_memory_ug_on_destroy(struct ui_gadget *ug, bundle *data, SETTING_TRACE_END; } -static void setting_memory_ug_on_message(struct ui_gadget *ug, bundle *msg, - bundle *data, void *priv) +static void setting_memory_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) { SETTING_TRACE_BEGIN; } -static void setting_memory_ug_on_event(struct ui_gadget *ug, - enum ug_event event, bundle *data, +static void setting_memory_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, void *priv) { SETTING_TRACE_BEGIN; @@ -173,9 +194,9 @@ static void setting_memory_ug_on_event(struct ui_gadget *ug, } } -static void setting_memory_ug_on_key_event(struct ui_gadget *ug, +static void setting_memory_ug_on_key_event(ui_gadget_h ug, enum ug_key_event event, - bundle *data, void *priv) + service_h service, void *priv) { SETTING_TRACE_BEGIN; if (!ug) @@ -203,6 +224,7 @@ static void setting_memory_ug_on_key_event(struct ui_gadget *ug, elm_naviframe_bottom_item_get(ad->navi_bar)) { ug_destroy_me(ug); } else { + /* elm_naviframe_item_pop(ad->navi_bar); */ setting_view_cb_at_endKey(ad); } } @@ -250,12 +272,12 @@ UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) * @param[in] data * @param[in] priv */ -UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) { SETTING_TRACE_BEGIN; int ret = 0; #if SUPPORT_RUN_SYSTEM_COMMAND - ret += excuteCmd(SETTING_POSTINST_FILE, 1, "memory"); + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "memory"); #else int value = SETTING_DEF_MEMORY_PHONE; ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_WAP_INT, value); @@ -266,6 +288,7 @@ UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_FM_RADIO_INT, value); ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_ALL_SHARE_INT, value); ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_ADOBE_AIR_INT, value); + ret += vconf_set_int(VCONFKEY_SETAPPL_DEFAULT_MEM_DVB_H_INT, value); #endif return ret; } diff --git a/setting-menuscreen/CMakeLists.txt b/setting-menuscreen/CMakeLists.txt new file mode 100755 index 0000000..c6d7d00 --- /dev/null +++ b/setting-menuscreen/CMakeLists.txt @@ -0,0 +1,33 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_menuscreen REQUIRED elementary ecore ecore-x edje evas appcore-common appcore-efl ui-gadget-1 capi-appfw-application dlog eina aul) + +FOREACH(flag ${pkgs_menuscreen_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_MENUSCREEN_UG} SHARED + ./src/setting-menuscreen.c + ./src/setting-menuscreen-main.c + ./src/setting-menuscreen-password.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_MENUSCREEN_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_MENUSCREEN_UG} ${pkgs_menuscreen_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_MENUSCREEN_UG} DESTINATION /opt/ug/lib) diff --git a/setting-menuscreen/include/setting-menuscreen-main.h b/setting-menuscreen/include/setting-menuscreen-main.h new file mode 100755 index 0000000..fb9004a --- /dev/null +++ b/setting-menuscreen/include/setting-menuscreen-main.h @@ -0,0 +1,28 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_MENUSCREEN_MAIN_H__ +#define __SETTING_MENUSCREEN_MAIN_H__ + +#include + +/** @todo need to i18n string registration */ + +#endif /* __SETTING_MENUSCREEN_MAIN_H__ */ diff --git a/setting-menuscreen/include/setting-menuscreen-password.h b/setting-menuscreen/include/setting-menuscreen-password.h new file mode 100755 index 0000000..b2dd98e --- /dev/null +++ b/setting-menuscreen/include/setting-menuscreen-password.h @@ -0,0 +1,33 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_MENUSCREEN_PASSWORD_H__ +#define __SETTING_MENUSCREEN_PASSOWRD_H__ + +#include + +/** @todo need to i18n string registration */ + +static void setting_menuscreen_password_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info); + +static void setting_menuscreen_password_entry_change_cb (void *data, Evas_Object *obj, void *event_info); +static void setting_menuscreen_password_click_softkey_done_cb(void *data, Evas_Object *obj, void *event_info); + +#endif /* __SETTING_MENUSCREEN_PASSWORD_H__ */ diff --git a/setting-menuscreen/include/setting-menuscreen.h b/setting-menuscreen/include/setting-menuscreen.h new file mode 100755 index 0000000..1940568 --- /dev/null +++ b/setting-menuscreen/include/setting-menuscreen.h @@ -0,0 +1,114 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_MENUSCREEN_H__ +#define __SETTING_MENUSCREEN_H__ + +#include +#include + +#include + +#include + +#include +#include +#include + +#include +#include + +#define SETTING_PW_STR "16777216" +#define SETTING_THEME_LIVE_MAGAZINE "com.samsung.live-magazine" +#define SETTING_THEME_CLUSTER_HOME "com.samsung.cluster-home" + +#define SETTING_MENUSCREEN_FOLDER "/opt/share/install-info/" +#define SETTING_MENUSCREEN_FILE_EXTENSION "desktop" +#define SETTING_MENUSCREEN_INDEX_NAME "name" + +#define SETTING_MENUSCREEN_SELECTED_PACKAGE_VCONF_KEY VCONFKEY_SETAPPL_SELECTED_PACKAGE_NAME + +#define SETTING_MENUSCREEN_TABLE_NAME "menu" +#define SETTING_MENUSCREEN_CLAUSE "categories = '?'" +#define SETTING_MENUSCREEN_VALUE_CATEGORY "home-screen" +#define SETTING_MENUSCREEN_COLUMN_NAME "name" +#define SETTING_MENUSCREEN_COLUMN_PKGNAME "package" +#define SETTING_MENUSCREEN_COLUMN_CATEGORY "category" + + +typedef struct tag_ug_menuscreen_info { + char* pkgname; + char* appname; +}ug_menuscreen_info ; + +typedef struct _SettingMenuscreenUG SettingMenuscreenUG; + +/** + * Setting Menuscreen UG context + * all UG function has void* as an agument. this is casted back to SettingMenuscreenUG + * and the functions access app context. + */ +struct _SettingMenuscreenUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + + Evas_Object *scroller; + + ui_gadget_h ug_loading; + + Evas_Object *ly_main; + Evas_Object *ly_wall; + + Evas_Object *navi_bar; /* for navigation effect */ + Elm_Object_Item *navi_it; + + /* entries in Genlist */ + setting_view *view_to_load; + + // page 1 : main list + Evas_Object* chk_radio; + int pkglist_cnt; + int chk_menuscreen; // selcted item + char* selected_theme; + Eina_List * menuscreen_list; + + // page 2 : password + Setting_GenGroupItem_Data* data_pwd; + + Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_1text_1icon_2; + Elm_Genlist_Item_Class itc_layout; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + Elm_Genlist_Item_Class itc_1text; + Elm_Genlist_Item_Class itc_variable_height; +}; + +extern setting_view setting_view_menuscreen_main; +extern setting_view setting_view_menuscreen_password; + +void setting_menuscreen_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv); + +#endif /* __SETTING_MENUSCREEN_H__ */ diff --git a/setting-menuscreen/src/setting-menuscreen-main.c b/setting-menuscreen/src/setting-menuscreen-main.c new file mode 100755 index 0000000..cca2777 --- /dev/null +++ b/setting-menuscreen/src/setting-menuscreen-main.c @@ -0,0 +1,284 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#include + +static int setting_menuscreen_main_create(void *cb); +static int setting_menuscreen_main_destroy(void *cb); +static int setting_menuscreen_main_update(void *cb); +static int setting_menuscreen_main_cleanup(void *cb); + + +// BUSINESS LOGIC --- +static void _get_menuscreen_info2(/*[OUT]*/int* pkglist_cnt, void* data); +ail_cb_ret_e appinfo_menuscreen_func(const ail_appinfo_h appinfo, void *user_data); +// BUSINESS LOGIC --- +static void setting_menuscreen_main_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info); + +static void setting_menuscreen_mouse_up_Gendial_list_radio_cb(void *data, Evas_Object *obj, void *event_info); + +setting_view setting_view_menuscreen_main = { + .create = setting_menuscreen_main_create, + .destroy = setting_menuscreen_main_destroy, + .update = setting_menuscreen_main_update, + .cleanup = setting_menuscreen_main_cleanup, +}; + +static int setting_menuscreen_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) cb; + Evas_Object *scroller = NULL; + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("IDS_ST_HEADER_HOME_SCREEN_ABB"), _("IDS_COM_BODY_BACK"), + NULL, + setting_menuscreen_main_click_softkey_back_cb, + NULL, ad, &scroller, + &(ad->navi_bar)); + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int* pkglist_cnt = &ad->pkglist_cnt; + + _get_menuscreen_info2(pkglist_cnt, ad); + + // radio button + ad->chk_radio = elm_radio_add(scroller); + elm_radio_state_value_set(ad->chk_radio, -1); + + Setting_GenGroupItem_Data *item_data = NULL; + Eina_List* elist = NULL; + ug_menuscreen_info* pnode = NULL; + int idx = 0; + char *sel_str = vconf_get_str(VCONFKEY_SETAPPL_SELECTED_PACKAGE_NAME); + + EINA_LIST_FOREACH( ad->menuscreen_list, elist, pnode) + { + item_data = setting_create_Gendial_field_2radio(scroller, + &(ad->itc_1text_1icon_2), + setting_menuscreen_mouse_up_Gendial_list_radio_cb, + ad->chk_radio, + SWALLOW_Type_1RADIO, + ad->chk_radio, + idx, + pnode->appname, + pnode->pkgname, + NULL); + + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + SETTING_TRACE("pkgname[%s] sel_str[%s]", pnode->pkgname, sel_str); + if (0 == safeStrCmp(pnode->pkgname, sel_str)) + { + elm_radio_value_set(ad->chk_radio, idx); + } + + idx++; + } + FREE(sel_str); + + + setting_view_menuscreen_main.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_menuscreen_main_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + /* if(ad->back_dialData) FREE(ad->back_dialData); */ + setting_view_menuscreen_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_menuscreen_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_menuscreen_main_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) cb; + + if (ad->ly_main != NULL) { + /* evas_object_hide(ad->ly_main); */ + } + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +static void +setting_menuscreen_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, + "[Setting > Menuscreen] Data parameter is NULL"); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) data; + + /* Send destroy request */ + ug_destroy_me(ad->ug); + SETTING_TRACE_END; + +} + + +static void _get_menuscreen_info2(/*[OUT]*/int* pkglist_cnt, void* data) +{ + SETTING_TRACE_BEGIN; + SettingMenuscreenUG *ugd = (SettingMenuscreenUG *) data; + + ail_filter_h filter; + ail_error_e ret; + // int i=0; + int n=0; + + ret = ail_filter_new(&filter); + if (ret != AIL_ERROR_OK) { + return ; + } + + ret = ail_filter_count_appinfo(filter, &n); + //printf("count =%d \n", n); + *pkglist_cnt = n; + + ret = ail_filter_add_str(filter, AIL_PROP_CATEGORIES_STR, "home-screen"); + if (ret != AIL_ERROR_OK) { + return ; + } + + ail_filter_list_appinfo_foreach(filter, appinfo_menuscreen_func, (void *)ugd); + ail_filter_destroy(filter); +} + +/* + /opt/home/root/aaa/cprog/ail_test # ./ail_test + i=0 List Menu + i=1 BEAT +*/ +ail_cb_ret_e appinfo_menuscreen_func(const ail_appinfo_h appinfo, void *user_data) +{ + SETTING_TRACE_BEGIN; + SettingMenuscreenUG *ugd = (SettingMenuscreenUG *) user_data; + + char *package; + char *appname; + static int s_i = 0 ; + + ail_appinfo_get_str(appinfo, AIL_PROP_PACKAGE_STR, &package); + ail_appinfo_get_str(appinfo, AIL_PROP_NAME_STR, &appname); + + Eina_List** d_menuscreen_list = &ugd->menuscreen_list; + + ug_menuscreen_info* pnode = (ug_menuscreen_info*)malloc(sizeof(ug_menuscreen_info)); + pnode->pkgname = strdup(package); + pnode->appname = strdup(appname); + + SETTING_TRACE(" >>>>>>>>>> s_i=%d %s\n", s_i++, package); + + *d_menuscreen_list = eina_list_append(*d_menuscreen_list, pnode); + + if (s_i > 30) + return AIL_CB_RET_CANCEL; + + return AIL_CB_RET_CONTINUE; +} + +static void setting_menuscreen_mouse_up_Gendial_list_radio_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + + Evas_Object *radio = (Evas_Object *) data; + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + if (list_item->chk_status == elm_radio_value_get(radio)) + {//select the same item + return; + } + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) list_item->userdata; + + SETTING_TRACE("---------------------------------------------"); + SETTING_TRACE("chk_status = %d ", list_item->chk_status); + SETTING_TRACE("sub_desc= %s", list_item->sub_desc); + SETTING_TRACE("KeyStr= %s", list_item->keyStr); + SETTING_TRACE("---------------------------------------------"); + + // store list_itemdata + ad->selected_theme = list_item->sub_desc; + + if ( 0 == strcmp(list_item->sub_desc, SETTING_THEME_LIVE_MAGAZINE)) + { + setting_view_change(&setting_view_menuscreen_main, &setting_view_menuscreen_password, ad); + return; + } + else if (0 == strcmp(list_item->sub_desc, SETTING_THEME_CLUSTER_HOME)) + { + setting_view_change(&setting_view_menuscreen_main, &setting_view_menuscreen_password, ad); + return; + } + else { + elm_radio_value_set(radio, list_item->chk_status); + vconf_set_str( VCONFKEY_SETAPPL_SELECTED_PACKAGE_NAME, ad->selected_theme); + } + ug_destroy_me(ad->ug); +} + + diff --git a/setting-menuscreen/src/setting-menuscreen-password.c b/setting-menuscreen/src/setting-menuscreen-password.c new file mode 100755 index 0000000..b127346 --- /dev/null +++ b/setting-menuscreen/src/setting-menuscreen-password.c @@ -0,0 +1,228 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include + +#define SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH 4 +#define SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH 16 +#define SETTING_PW_UG_PRIVACY_PASSWORD_MIN_LENGTH 4 +#define SETTING_PW_UG_PRIVACY_PASSWORD_MAX_LENGTH 16 + + + +static int setting_menuscreen_password_create(void *cb); +static int setting_menuscreen_password_destroy(void *cb); +static int setting_menuscreen_password_update(void *cb); +static int setting_menuscreen_password_cleanup(void *cb); + + +setting_view setting_view_menuscreen_password = { + .create = setting_menuscreen_password_create, + .destroy = setting_menuscreen_password_destroy, + .update = setting_menuscreen_password_update, + .cleanup = setting_menuscreen_password_cleanup, +}; +static Eina_Bool __focus_on_idler(void *data) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(data == NULL, FALSE); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) data; + retv_if(ad->data_pwd == NULL, EINA_FALSE); + if (ad->data_pwd->isFocusFlag || (ad->data_pwd->eo_check != NULL)) + { + //no matter how many edifileds, it only need focus on 1st editfiled + elm_object_focus_set(ad->data_pwd->eo_check, EINA_TRUE); + } + + SETTING_TRACE_END; + return ECORE_CALLBACK_CANCEL; + //return EINA_FALSE; +} + +static int setting_menuscreen_password_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) cb; + Evas_Object *scroller = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(scroller, "dialogue"); + if(scroller == NULL) + return SETTING_RETURN_FAIL; + + elm_genlist_clear(scroller); /* first to clear list */ + elm_genlist_homogeneous_set(scroller, EINA_TRUE); + + ad->navi_it = setting_create_navi_bar_top_buttons(_("IDS_COM_BODY_AUTH_PASSWORD"), + _("IDS_COM_SK_CANCEL"), + _("IDS_COM_SK_DONE"), NULL, + setting_menuscreen_password_click_softkey_back_cb, + setting_menuscreen_password_click_softkey_done_cb, + NULL, ad, scroller, ad->navi_bar); + retv_if(!ad->navi_it, SETTING_RETURN_FAIL); + Evas_Object *done_btn = elm_object_item_part_content_get(ad->navi_it, "title_right_btn"); + setting_disable_evas_object(done_btn); + setting_dim_evas_object(done_btn, TRUE); + + Elm_Object_Item *item = NULL;; + item =elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + //--------------------------------------------------------------------- + // draw password UG code + //--------------------------------------------------------------------- + ad->data_pwd= + setting_create_Gendial_field_entry(scroller, + & (ad->itc_variable_height), + NULL, ad, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_COM_BODY_PASSWORD", + NULL, + setting_menuscreen_password_entry_change_cb, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, + TRUE, TRUE, + SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH, + 0, NULL, NULL); + elm_object_focus_set(ad->data_pwd->eo_check, EINA_TRUE); + ecore_idler_add(__focus_on_idler, ad); + + setting_view_menuscreen_password.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_menuscreen_password_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) cb; + elm_naviframe_item_pop(ad->navi_bar); + + setting_view_menuscreen_password.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + + +static int setting_menuscreen_password_update(void *cb) +{ + return SETTING_RETURN_SUCCESS; +} + +static int setting_menuscreen_password_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + return setting_menuscreen_password_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ +static void +setting_menuscreen_password_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, + "[Setting > Menuscreen] Data parameter is NULL"); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) data; + + /* Send destroy request */ + setting_view_change(&setting_view_menuscreen_password, &setting_view_menuscreen_main, ad); + SETTING_TRACE_END; + +} + +static void +setting_menuscreen_password_click_softkey_done_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "[Setting > Password] Data parameter is NULL"); + + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) data; + const char *entry_str = ad->data_pwd->sub_desc; + if (0 == safeStrCmp(entry_str, SETTING_PW_STR)) + { + // choose the value from radio button state. + vconf_set_str( VCONFKEY_SETAPPL_SELECTED_PACKAGE_NAME, ad->selected_theme); + ug_destroy_me(ad->ug); + } + else + { + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_INCORRECT_PASSWORD"),NULL, 2, FALSE, FALSE); + ad->data_pwd->sub_desc = NULL; + elm_entry_entry_set(obj, ad->data_pwd->sub_desc); + elm_entry_cursor_end_set(obj); + elm_object_focus_set(ad->data_pwd->eo_check, EINA_TRUE); + return; + } +} + +static void setting_menuscreen_password_entry_change_cb (void *data, Evas_Object *obj, void *event_info) +{ + retm_if(data == NULL, "[Setting > Password] Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) list_item->userdata; + const char *entry_str = elm_entry_entry_get(obj); + /* SETTING_TRACE("entry_str:%s", entry_str); */ + list_item->sub_desc = (char *)g_strdup(entry_str); + + /* Evas_Object *eo_entry = NULL; */ + bool isFoundEmptyEntry = FALSE; + + do { + if (ad->data_pwd) { + entry_str = ad->data_pwd->sub_desc; + if (NULL == entry_str || '\0' == entry_str[0]) { + isFoundEmptyEntry = TRUE; + break; + } + } + + } while (0); + + bool disableFlag = isFoundEmptyEntry; + + Evas_Object *done_btn = elm_object_item_part_content_get(ad->navi_it, "title_right_btn"); + if (disableFlag) { + if (!evas_object_pass_events_get(done_btn)) {//it had not yet been disabled + setting_disable_evas_object(done_btn); + setting_dim_evas_object(done_btn, TRUE); + }//else already disabled + } else { + setting_enable_evas_object(done_btn); + setting_undo_dim_evas_object(done_btn, TRUE); + } +} + diff --git a/setting-menuscreen/src/setting-menuscreen.c b/setting-menuscreen/src/setting-menuscreen.c new file mode 100755 index 0000000..5e45758 --- /dev/null +++ b/setting-menuscreen/src/setting-menuscreen.c @@ -0,0 +1,287 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +setting_view *__get_menuscreen_view_to_load(service_h service) +{ + SETTING_TRACE_BEGIN; + //setting_retvm_if(NULL == data, NULL, "NULL == data"); + return &setting_view_menuscreen_main; +} + +Evas_Object *__get_menuscreen_layout_to_return(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingMenuscreenUG *menuscreenUG = priv; + return menuscreenUG->ly_main; +} + +static void setting_menuscreen_ug_cb_resize(void *data, Evas *e, + Evas_Object *obj, void *event_info) +{ + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) data; + /* setting_view_update(&setting_view_about_main, ad); */ + setting_view_update(ad->view_to_load, ad); +} + +static void *setting_menuscreen_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + setting_retvm_if((!priv), NULL, "!priv"); + + SettingMenuscreenUG *menuscreenUG = priv; + menuscreenUG->ug = ug; + + appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + menuscreenUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + menuscreenUG->win_get = (Evas_Object *) ug_get_window(); + + evas_object_show(menuscreenUG->win_main_layout); + menuscreenUG->evas = evas_object_evas_get(menuscreenUG->win_main_layout); + + setting_retvm_if(menuscreenUG->win_main_layout == NULL, NULL, "cannot get main window "); + + /* register view node table */ + setting_view_node_table_intialize(); + setting_view_node_table_register(&setting_view_menuscreen_main, NULL); + setting_view_node_table_register(&setting_view_menuscreen_password, &setting_view_menuscreen_main); + + //setting_create_Gendial_itc("dialogue/1text.1icon.2", &(menuscreenUG->itc_1text_1icon)); + setting_create_Gendial_itc("dialogue/1text.1icon.2", &(menuscreenUG->itc_1text_1icon_2)); + //setting_create_Gendial_itc("dialogue/1icon", &(menuscreenUG->itc_variable_height)); + setting_create_Gendial_itc("dialogue/1icon", &(menuscreenUG->itc_variable_height)); + + menuscreenUG->itc_seperator.item_style = "dialogue/separator/21/with_line"; + menuscreenUG->itc_seperator.func.text_get = NULL; + menuscreenUG->itc_seperator.func.content_get = NULL; + menuscreenUG->itc_seperator.func.state_get = NULL; + menuscreenUG->itc_seperator.func.del = NULL; + + + setting_create_Gendial_itc("dialogue/1text", &(menuscreenUG->itc_1text)); + + /* creating a view. */ + menuscreenUG->view_to_load = __get_menuscreen_view_to_load(service); + setting_retvm_if(NULL == menuscreenUG->view_to_load, NULL, "NULL == menuscreenUG->view_to_load"); + setting_view_node_set_cur_view(menuscreenUG->view_to_load); + setting_view_create(menuscreenUG->view_to_load, (void *)menuscreenUG); + evas_object_event_callback_add(menuscreenUG->win_main_layout,EVAS_CALLBACK_RESIZE, setting_menuscreen_ug_cb_resize, menuscreenUG); + return __get_menuscreen_layout_to_return(service, menuscreenUG); +} + +static void setting_menuscreen_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_menuscreen_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_menuscreen_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + + +static void _clear_menuscreen_list(Eina_List *menu_screen_list) +{ + SETTING_TRACE_BEGIN; + Eina_List *elist = NULL; + ug_menuscreen_info* pnode = NULL; + + EINA_LIST_FOREACH( menu_screen_list, elist, pnode ) { + menu_screen_list = eina_list_remove(menu_screen_list, pnode); + } + eina_list_free( menu_screen_list ); +} + +static void setting_menuscreen_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingMenuscreenUG *menuscreenUG = priv; + + evas_object_event_callback_del(menuscreenUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_menuscreen_ug_cb_resize); /* fix flash issue for gallery */ + menuscreenUG->ug = ug; + + if (!ug || !priv) + return; + + if(menuscreenUG->menuscreen_list) { + _clear_menuscreen_list( menuscreenUG->menuscreen_list); + menuscreenUG->menuscreen_list = NULL; + } + + /* called when this shared gadget is terminated. similar with app_exit */ + if (&setting_view_menuscreen_main == menuscreenUG->view_to_load) { + setting_view_destroy(&setting_view_menuscreen_main, menuscreenUG); + } + + if (NULL != ug_get_layout(menuscreenUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(menuscreenUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(menuscreenUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_menuscreen_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_menuscreen_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + switch (event) { + case UG_EVENT_LOW_MEMORY: + break; + case UG_EVENT_LOW_BATTERY: + break; + case UG_EVENT_LANG_CHANGE: + break; + case UG_EVENT_ROTATE_PORTRAIT: + break; + case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN: + break; + case UG_EVENT_ROTATE_LANDSCAPE: + break; + case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN: + break; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_menuscreen_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) priv; + + switch (event) { + case UG_KEY_EVENT_END: + { + if (elm_naviframe_top_item_get(ad->navi_bar) == + elm_naviframe_bottom_item_get(ad->navi_bar)) { + ug_destroy_me(ug); + } else { + /* elm_naviframe_item_pop(ad->navi_bar); */ + setting_view_cb_at_endKey(ad); + } + } + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingMenuscreenUG *menuscreenUG = calloc(1, sizeof(SettingMenuscreenUG)); + setting_retvm_if(!menuscreenUG, -1, "Create SettingMenuscreenUG obj failed"); + + ops->create = setting_menuscreen_ug_on_create; + ops->start = setting_menuscreen_ug_on_start; + ops->pause = setting_menuscreen_ug_on_pause; + ops->resume = setting_menuscreen_ug_on_resume; + ops->destroy = setting_menuscreen_ug_on_destroy; + ops->message = setting_menuscreen_ug_on_message; + ops->event = setting_menuscreen_ug_on_event; + ops->key_event = setting_menuscreen_ug_on_key_event; + ops->priv = menuscreenUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingMenuscreenUG *menuscreenUG; + setting_retm_if(!ops, "ops == NULL"); + + menuscreenUG = ops->priv; + if (menuscreenUG) { + FREE(menuscreenUG); + } +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +void setting_menuscreen_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, + void *priv) +{ + SettingMenuscreenUG *ad = (SettingMenuscreenUG *) priv; + Evas_Object *base; + + if (!priv) + return; + SETTING_TRACE_BEGIN; + + base = (Evas_Object *) ug_get_layout(ug); + if (!base) + return; + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + break; + } + + SETTING_TRACE_END; +} + + +/*****/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + return 0; +} + +/*****/ diff --git a/setting-network/CMakeLists.txt b/setting-network/CMakeLists.txt index 8a585db..4cdc723 100755 --- a/setting-network/CMakeLists.txt +++ b/setting-network/CMakeLists.txt @@ -3,7 +3,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs_network REQUIRED elementary evas ecore ecore-imf eina edje appcore-common appcore-efl ui-gadget bundle network tapi dlog) +pkg_check_modules(pkgs_network REQUIRED elementary evas ecore ecore-imf eina edje appcore-common appcore-efl ui-gadget-1 capi-appfw-application network tapi dlog) FOREACH(flag ${pkgs_network_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") @@ -26,6 +26,7 @@ ADD_LIBRARY(${SETTING_NETWORK_UG} SHARED ./src/setting-network.c ./src/setting-network-main.c ./src/setting-network-select-network.c + ./src/setting-network-con.c ./src/setting-network-connection-create.c ./src/setting-network-3gcon-option.c ./src/setting-network-main-help.c diff --git a/setting-network/include/setting-network-3gcon-option.h b/setting-network/include/setting-network-3gcon-option.h index d7b8cc4..48517c0 100755 --- a/setting-network/include/setting-network-3gcon-option.h +++ b/setting-network/include/setting-network-3gcon-option.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_NETWORK_CONNECTION_CREATE_H__ #define __SETTING_NETWORK_CONNECTION_CREATE_H__ diff --git a/setting-network/include/setting-network-con.h b/setting-network/include/setting-network-con.h new file mode 100755 index 0000000..9417a5a --- /dev/null +++ b/setting-network/include/setting-network-con.h @@ -0,0 +1,31 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_NETWORK_CON_CREATE_H__ +#define __SETTING_NETWORK_CON_CREATE_H__ + +#include +static void setting_network_con_click_softkey_set_cb(void *data, Evas_Object *obj, void *event_info); +static void setting_network_con_click_softkey_reset_cb(void *data, Evas_Object *obj, void *event_info); + +static void setting_network_con_click_softkey_cancel_cb(void *data, Evas_Object *obj, void *event_info); +static void setting_network_con_item_Gendial_mouse_up_cb(void *data, Evas_Object *obj, void *event_info); + +#endif /* __SETTING_NETWORK_CON_CREATE_H__ */ diff --git a/setting-network/include/setting-network-connection-create.h b/setting-network/include/setting-network-connection-create.h index 747a169..eb69726 100755 --- a/setting-network/include/setting-network-connection-create.h +++ b/setting-network/include/setting-network-connection-create.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_NETWORK_CONNECTION_CREATE_H__ #define __SETTING_NETWORK_CONNECTION_CREATE_H__ @@ -37,5 +40,14 @@ static void setting_network_edit_connection_click_softkey_cancel_cb(void *data, Evas_Object *obj, void *event_info); - +static void setting_network_edit_connection_click_softkey_back_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_network_edit_connection_click_softkey_eidt_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_network_edit_connection_click_softkey_reset_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_network_connection_hide_input_pannel(void *data); #endif /* __SETTING_NETWORK_CONNECTION_CREATE_H__ */ diff --git a/setting-network/include/setting-network-main-help.h b/setting-network/include/setting-network-main-help.h index 20227e3..8dcc633 100755 --- a/setting-network/include/setting-network-main-help.h +++ b/setting-network/include/setting-network-main-help.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_NETWORK_MAIN_HELP_H__ #define __SETTING_NETWORK_MAIN_HELP_H__ diff --git a/setting-network/include/setting-network-main.h b/setting-network/include/setting-network-main.h index 6db9c03..0fb3eb5 100755 --- a/setting-network/include/setting-network-main.h +++ b/setting-network/include/setting-network-main.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_NETWORK_MAIN_H__ #define __SETTING_NETWORK_MAIN_H__ diff --git a/setting-network/include/setting-network-preferred-network-delete.h b/setting-network/include/setting-network-preferred-network-delete.h index 769e963..0268925 100755 --- a/setting-network/include/setting-network-preferred-network-delete.h +++ b/setting-network/include/setting-network-preferred-network-delete.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_NETWORK_PREFERRED_NETWORK_DELETE_H__ #define __SETTING_NETWORK_PREFERRED_NETWORK_DELETE_H__ diff --git a/setting-network/include/setting-network-preferred-network-edit.h b/setting-network/include/setting-network-preferred-network-edit.h index f88d175..b4cb154 100755 --- a/setting-network/include/setting-network-preferred-network-edit.h +++ b/setting-network/include/setting-network-preferred-network-edit.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_NETWORK_PREFERRED_NETWORK_EDIT_H__ #define __SETTING_NETWORK_PREFERRED_NETWORK_EDIT_H__ diff --git a/setting-network/include/setting-network-preferred-network-list.h b/setting-network/include/setting-network-preferred-network-list.h index a849a79..ff716af 100755 --- a/setting-network/include/setting-network-preferred-network-list.h +++ b/setting-network/include/setting-network-preferred-network-list.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef _SETTINGS_NETWORK_PREFERRED_NETWORK_LIST_H_ #define _SETTINGS_NETWORK_PREFERRED_NETWORK_LIST_H_ diff --git a/setting-network/include/setting-network-preferred-network-new.h b/setting-network/include/setting-network-preferred-network-new.h index 8d22f04..c57cd55 100755 --- a/setting-network/include/setting-network-preferred-network-new.h +++ b/setting-network/include/setting-network-preferred-network-new.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_NETWORK_PREFERRED_NETWORK_NEW_H__ #define __SETTING_NETWORK_PREFERRED_NETWORK_NEW_H__ diff --git a/setting-network/include/setting-network-preferred-network.h b/setting-network/include/setting-network-preferred-network.h index ee5288f..c3923bd 100755 --- a/setting-network/include/setting-network-preferred-network.h +++ b/setting-network/include/setting-network-preferred-network.h @@ -1,19 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_NETWORK_PREFERRED_NETWORK_H__ #define __SETTING_NETWORK_PREFERRED_NETWORK_H__ diff --git a/setting-network/include/setting-network-select-network.h b/setting-network/include/setting-network-select-network.h index 3a769f9..0ad2a2d 100755 --- a/setting-network/include/setting-network-select-network.h +++ b/setting-network/include/setting-network-select-network.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_NETWORK_SELECT_NETWORK_H__ #define __SETTING_NETWORK_SELECT_NETWORK_H__ diff --git a/setting-network/include/setting-network.h b/setting-network/include/setting-network.h old mode 100644 new mode 100755 index 66c3b2b..4f68eb3 --- a/setting-network/include/setting-network.h +++ b/setting-network/include/setting-network.h @@ -1,36 +1,37 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_NETWORK_H__ #define __SETTING_NETWORK_H__ #include #include #include -#include #include #include #include #include -#include -#include -#include +//#include +//#include #include #include #include @@ -38,13 +39,9 @@ #include #include +#include -#ifdef Status -#undef Status -#endif - -#include - +#include #include #include @@ -52,6 +49,34 @@ #include +#define SUPPORT_CON_RESET +#define NET_CON_RESET_DBUS_PARA "--system --print-reply --dest=com.tcore.ps / com.tcore.ps.master.ResetProfile" + +#ifdef SUPPORT_MDM +#include +#define MDM_POLICY_DATA_ROAMING_RESTRICTED_STR "Security policy restricts use of Data roaming" +#endif + +#define Data_packet_Desc "Data packet through 3G network will be consumed, if you use data download or upload without Wi-Fi connection." +#define SETTING_NETWORK_DATA_ROMING_DESC "Connect to data services when roaming" +#define SETTING_NETWORK_DATA_ROMING_OFF_DESC "When data roaming is disabled, the application that uses the data connection may not work" + +#define SETTING_NETWORK_USE_PACKET_DATA_OFF_DESC "Data packet through 3G network will be consumed, if you use data download or upload without Wi-Fi connection. Continue?" +#define SETTING_NETWORK_USE_PACKET_DATA_ON_DESC "Use data services when roaming. Roaming will charge extra data fee" + +#define CONNECTION_DSC "Connections" +#define KeyStr_Reset_Def "Reset to default" +#define KeyStr_Edit "Edit" +#define KeyStr_Saved "IDS_ST_BODY_SAVED" +#define keyStr_Searched "Searched" +#define keyStr_Failed_Searched "Searching network failed" +#define keyStr_Failed_Select_Network "Select network failed" +#define keyStr_Failed_Get_PreferNetwork "Get preferred network failed" + +#define Insert_Access_Name_desc "Please input access name !" +#define Insert_User_Name_Desc "Please input User name !" +#define Invok_API_Failed_Desc "Failed to invoke API" + #define SETTING_ADD_PROFILE_INDEX -1 #define Invoking_TAPI_Timeout 8 #define COUNTRY_CODE_LEN 3 @@ -83,7 +108,8 @@ struct gl_network_data { * and the functions access app context. */ struct _SettingNetworkUG { - struct ui_gadget *ug; + ui_gadget_h ug; + TapiHandle *handle; /* add more variables here (move your appdata to here) */ Evas *evas; @@ -91,17 +117,34 @@ struct _SettingNetworkUG { Evas_Object *win_get; Evas_Object *popup; Evas_Object *navi_bar; + + //connection, Elm_Object_Item *navi_it; + Evas_Object *controlbar; + Evas_Object *conformant; + Evas_Object *back_btn; + Evas_Object *l_button; + Evas_Object *r_button; + Evas_Object *m_button; + bool has_form_changed; Evas_Object *genlist_sel_network; Evas_Object *network_ug_pop; Evas_Object *controllbar; + char *view_type_string; +#ifdef SUPPORT_MDM + mdm_result_t mdm_server_state; + mdm_status_t roaming_policy_status; + policy_receiver_handle mdm_handle; +#endif + Evas_Object *ly_main; unsigned int subs_id_net[SETTING_NETWORK_SUBS_ID_NET_LEN]; - Setting_GenGroupItem_Data* data_selected_network_item; + //net_event_callbacks net_evt_cbs; + Setting_GenGroupItem_Data* data_auto_network_item; Setting_GenGroupItem_Data* data_search_network_item; bool b_searching_network; @@ -111,8 +154,7 @@ struct _SettingNetworkUG { Setting_GenGroupItem_Data *data_sel_net; Setting_GenGroupItem_Data *data_net_mode; Setting_GenGroupItem_Data *data_use_packet; - - unsigned int sel_net_plmn_id; + Setting_GenGroupItem_Data *data_roaming; Evas_Object *chk_sel; Evas_Object *chk_mode; @@ -120,11 +162,11 @@ struct _SettingNetworkUG { Evas_Object *chk_3gcon; int sel_net; /* like vconf key */ + int sel_act; /* like vconf key */ + char *sel_network; int net_mode; /* like vconf key */ - Evas_Object *pop_sch; TelNetworkPlmnList_t plmn_info; - Evas_Object *pop_reg; int is_show_user; net_service_type_t con_type; @@ -135,6 +177,7 @@ struct _SettingNetworkUG { Evas_Object *chk_type; const char *ed_acs_name_desc; + const char *ed_auth_type_desc; const char *ed_user_name_desc; const char *ed_pwd_desc; const char *ed_pxy_addr_desc; @@ -157,9 +200,7 @@ struct _SettingNetworkUG { Evas_Object *scl_edit; /* Preferred network common */ - Evas_Object *pop_save; - Evas_Object *pop_del; - TelNetworkPrefferedPlmnList_t pref_list; + TelNetworkPreferredPlmnList_t pref_list; int sel_pref_idx; setting_network_preferred_network_operation_type_t op_type; @@ -187,20 +228,6 @@ struct _SettingNetworkUG { Elm_Genlist_Item_Class itc; struct gl_network_data *cur_sel_mem; int cur_sel_index; - Elm_Genlist_Item_Class itc_1text_1icon_2; - Elm_Genlist_Item_Class itc_seperator; - Elm_Genlist_Item_Class itc_variable_height; - Elm_Genlist_Item_Class itc_bg_1icon; - Elm_Genlist_Item_Class itc_2text_3_parent; - Elm_Genlist_Item_Class itc_1icon_1text_sub; - Elm_Genlist_Item_Class itc_2text_2; - Elm_Genlist_Item_Class itc_1text; - Elm_Genlist_Item_Class itc_group_item; - Elm_Genlist_Item_Class itc_1text_1icon; - Elm_Genlist_Item_Class itc_sel_all; - Elm_Genlist_Item_Class itc_1icon_1text; - Elm_Genlist_Item_Class itc_1text_2icon; - Elm_Genlist_Item_Class itc_2text_2icon_3; Setting_GenGroupItem_Data *data_cl_select_all; Evas_Object *sub_clear_layout; @@ -212,6 +239,7 @@ struct _SettingNetworkUG { extern setting_view setting_view_network_main; extern setting_view setting_view_network_select_network; extern setting_view setting_view_network_main_help; +extern setting_view setting_view_network_con; extern setting_view setting_view_network_connection_create; extern setting_view setting_view_network_3gcon; @@ -221,20 +249,24 @@ extern setting_view setting_view_network_preferred_network_list; extern setting_view setting_view_network_preferred_network_edit; extern setting_view setting_view_network_preferred_network_delete; -void setting_network_tapi_event_callback(TelTapiEvent_t *event, void *data); -void setting_network_select_network_chk_changed(void *data, Evas_Object *obj, - void *event_info); -void setting_network_Gendial_select_plmn_cb(void *data, Evas_Object *obj, - void *event_info); -void setting_network_register_network(Setting_GenGroupItem_Data *list_item); +const char *setting_network_get_act_str(TelNetworkSystemType_t type); +void setting_network_update_sel_network(void *data); + +void setting_tapi_get_preferred_plmn_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_tapi_set_preferred_plmn_cb(TapiHandle *handle, int result, void *data, void *user_data); + +void setting_tapi_cancel_manual_search_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_tapi_search_network_cb(TapiHandle *handle, int result, void *data, void *user_data); + +void setting_tapi_get_serving_network_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_tapi_get_plmn_mode_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_tapi_set_plmn_mode_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_tapi_get_band_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_tapi_set_band_cb(TapiHandle *handle, int result, void *data, void *user_data); -void setting_network_popup_create(void *data, char *str_content, bool keep); -void setting_network_popup_update(void *data, char *str_content, bool keep); +void setting_network_select_network_chk_changed(void *data, Evas_Object *obj, void *event_info); +void setting_network_Gendial_select_plmn_cb(void *data, Evas_Object *obj, void *event_info); void setting_network_popup_delete(void *data); -Evas_Object *setting_network_create_register_popup(void *data); -Evas_Object *setting_network_preferred_network_create_save_popup(void *data); -Evas_Object *setting_network_preferred_network_create_delete_popup(void *data); -void setting_network_preferred_network_create_isf(Evas_Object *entry); #endif /* __SETTING_NETWORK_H__ */ diff --git a/setting-network/src/setting-network-3gcon-option.c b/setting-network/src/setting-network-3gcon-option.c index a62c7ba..cdbbfc5 100755 --- a/setting-network/src/setting-network-3gcon-option.c +++ b/setting-network/src/setting-network-3gcon-option.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include static int setting_network_3gcon_create(void *cb); @@ -62,20 +65,20 @@ static int setting_network_3gcon_create(void *cb) ad->chk_3gcon = elm_radio_add(scroller); elm_radio_state_value_set(ad->chk_3gcon, -1); - setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_1icon_2), + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, setting_mouse_up_Gendial_list_radio_cb, ad->chk_3gcon, SWALLOW_Type_1RADIO, ad->chk_3gcon, SETTING_NETWORK_3GCON_NOT_USE, "Do not use", NULL); - setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_1icon_2), + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, setting_mouse_up_Gendial_list_radio_cb, ad->chk_3gcon, SWALLOW_Type_1RADIO, ad->chk_3gcon, SETTING_NETWORK_3GCON_ASK_ON_CON, _("IDS_ST_BODY_USB_ASK_ON_CONNECTION"), NULL); - setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_1icon_2), + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, setting_mouse_up_Gendial_list_radio_cb, ad->chk_3gcon, SWALLOW_Type_1RADIO, ad->chk_3gcon, diff --git a/setting-network/src/setting-network-con.c b/setting-network/src/setting-network-con.c new file mode 100755 index 0000000..9a735f3 --- /dev/null +++ b/setting-network/src/setting-network-con.c @@ -0,0 +1,279 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include + +static int setting_network_con_create(void *cb); +static int setting_network_con_destroy(void *cb); +static int setting_network_con_update(void *cb); +static int setting_network_con_cleanup(void *cb); + +setting_view setting_view_network_con = { + .create = setting_network_con_create, + .destroy = setting_network_con_destroy, + .update = setting_network_con_update, + .cleanup = setting_network_con_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_network_con_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + Evas_Object *scroller = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(scroller, "dialogue"); + retvm_if(scroller == NULL, SETTING_DRAW_ERR_FAIL_SCROLLER, + "Cannot set scroller object as contento of layout"); + elm_genlist_clear(scroller); /* first to clear list */ + Evas_Object *controlbar = NULL; + + setting_push_layout_navi_bar(CONNECTION_DSC, + _("IDS_COM_BODY_BACK"), + _(KeyStr_Reset_Def), + _("Create"), + setting_network_con_click_softkey_cancel_cb, + setting_network_con_click_softkey_reset_cb, + setting_network_con_click_softkey_set_cb, + ad, scroller, ad->navi_bar, &controlbar); + Elm_Object_Item *item = NULL; +#ifndef SUPPORT_CON_RESET + item = elm_toolbar_last_item_get(controlbar); + elm_object_item_disabled_set(item, EINA_TRUE); +#endif + item = elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* scroller is a genlist */ + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_network_con_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, "IDS_ST_BODY_INTERNET_CONNECTION", + NULL, NULL); + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_network_con_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, STR_SETTING_MMS_CONNECTIONS, NULL, + NULL); +#ifdef ENABLED_PREFERRED_NETWORKS + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_network_con_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, "IDS_ST_BODY_PREFERRED_NETWORKS", + NULL, NULL); +#endif +#ifdef ENABLED_2G3G_NETWORK + /* create 3g connection option */ + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_network_con_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, "2G/3G Connection", NULL, NULL); + + /* add blank rectangle */ +#endif + + setting_view_network_con.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_con_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_network_con.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_con_update(void *cb) +{ + return SETTING_RETURN_SUCCESS; +} + +static int setting_network_con_cleanup(void *cb) +{ + return setting_network_con_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_network_con_item_Gendial_mouse_up_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + int ret; + + if (!safeStrCmp("IDS_ST_BODY_SELECT_NETWORK", list_item->keyStr)) { + ret = + setting_view_change(&setting_view_network_main, + &setting_view_network_select_network, + ad); + } else if (!safeStrCmp + ("IDS_ST_BODY_INTERNET_CONNECTION", list_item->keyStr)) { + + ad->con_type = NET_SERVICE_INTERNET; + ret = + setting_view_change(&setting_view_network_main, + &setting_view_network_connection_create, + ad); + } else if (!safeStrCmp(STR_SETTING_MMS_CONNECTIONS, list_item->keyStr)) { + ad->con_type = NET_SERVICE_MMS; + + ret = + setting_view_change(&setting_view_network_main, + &setting_view_network_connection_create, + ad); + } +#ifdef ENABLED_PREFERRED_NETWORKS + else if (!safeStrCmp("IDS_ST_BODY_PREFERRED_NETWORKS", + list_item->keyStr)) { + + int value = -1; + int err = -1; + ret = + setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, + &err); + /** @todo check 'err' variable for exception handling */ + SETTING_TRACE("INT_SLP_SETTING_SIM_SLOT value:%d", value); + switch (value) { + case VCONFKEY_TELEPHONY_SIM_INSERTED: + /* To Recreate the view in order to search the perferred network again. */ + /* ret = setting_view_destroy(&setting_view_network_preferred_network, ad); */ + ret = + setting_view_change(&setting_view_network_main, + &setting_view_network_preferred_network, + ad); + + break; + + case VCONFKEY_TELEPHONY_SIM_NOT_PRESENT: + + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_ST_SECURITY_BODY_NOIMSI")); + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", + SETTING_FONT_RED, value, SETTING_FONT_BLACK); + return; + + break; + + case VCONFKEY_TELEPHONY_SIM_CARD_ERROR: + case VCONFKEY_TELEPHONY_SIM_UNKNOWN: + + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_COM_BODY_INVALID_SIM_CARD")); + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", + SETTING_FONT_RED, value, SETTING_FONT_BLACK); + return; + + break; + default: + SETTING_TRACE("Unknown SIM information from vconf"); + break; + } + } +#endif +#ifdef ENABLED_2G3G_NETWORK + else if (!safeStrCmp("2G/3G Connection", list_item->keyStr)) { + ret = + setting_view_change(&setting_view_network_main, + &setting_view_network_3gcon, ad); + } +#endif +} + +static void +setting_network_con_click_softkey_reset_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + //Reset connections info.. + excuteCmd("/usr/bin/dbus-send", 1, NET_CON_RESET_DBUS_PARA); + setting_create_simple_popup(ad, ad->win_get, NULL, _("Reseted!")); +} + +static void +setting_network_con_click_softkey_set_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + setting_create_simple_popup(ad, ad->win_get, NULL, _("UX Undefined")); + return; + + //to add a new connection + ad->con_type = NET_SERVICE_UNKNOWN; + setting_view_change(&setting_view_network_main, &setting_view_network_connection_create, ad); +} + +static void +setting_network_con_click_softkey_cancel_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + + setting_view_change(&setting_view_network_con, + &setting_view_network_main, ad); +} diff --git a/setting-network/src/setting-network-connection-create.c b/setting-network/src/setting-network-connection-create.c old mode 100644 new mode 100755 index 0e0c970..b9973bd --- a/setting-network/src/setting-network-connection-create.c +++ b/setting-network/src/setting-network-connection-create.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include static int setting_network_connection_create(void *cb); @@ -31,7 +34,7 @@ setting_view setting_view_network_connection_create = { SettingNetworkUG *g_networkUG = NULL; #define SUPPORT_EXPANDABLE_AUTHTYPE 1 - +#define URL_HEAD "http://" /* *************************************************** * *basic func @@ -127,25 +130,25 @@ static void __setting_network_connection_exp_cb(void *data, Evas_Object *obj, elm_radio_value_set(rgd, -1); setting_create_Gendial_exp_sub_field(scroller, - &(ad->itc_1icon_1text_sub), + &itc_1icon_1text_sub, __sub_list_sel_cb, ad, parentItem, SWALLOW_Type_1RADIO, rgd, NET_PDP_AUTH_PAP, - "IDS_IDLE_BODY_NORMAL", + "IDS_ST_MBODY_PAP", __sub_list_rd_change); setting_create_Gendial_exp_sub_field(scroller, - &(ad->itc_1icon_1text_sub), + &itc_1icon_1text_sub, __sub_list_sel_cb, ad, parentItem, SWALLOW_Type_1RADIO, rgd, NET_PDP_AUTH_CHAP, - "IDS_ST_BODY_SECURE", + "IDS_ST_POP_CHAP", __sub_list_rd_change); setting_create_Gendial_exp_sub_field(scroller, - &(ad->itc_1icon_1text_sub), + &itc_1icon_1text_sub, __sub_list_sel_cb, ad, parentItem, SWALLOW_Type_1RADIO, rgd, @@ -157,61 +160,59 @@ static void __setting_network_connection_exp_cb(void *data, Evas_Object *obj, } } -static int setting_network_connection_create(void *cb) +static void __genlist_disable_set(Evas_Object *genlist, bool disabled) { SETTING_TRACE_BEGIN; - retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); - - SettingNetworkUG *ad = (SettingNetworkUG *) cb; - - setting_retvm_if(NET_SERVICE_INTERNET != ad->con_type, - SETTING_GENERAL_ERR_WRONG_PARAMETER, - "Invalid connection type[%d]", ad->con_type) + ret_if (!genlist); + Elm_Object_Item *item = elm_genlist_first_item_get(genlist); + for(;item != elm_genlist_last_item_get(genlist); + item = elm_genlist_item_next_get(item)) + { + elm_object_item_disabled_set(item, disabled); - const char *title = NULL; - if (ad->con_type == NET_SERVICE_INTERNET) { - title = _("IDS_ST_BODY_INTERNET_CONNECTION"); + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *)elm_object_item_data_get(item); + if (item_data == NULL) { + SETTING_TRACE("item_data is null"); + continue; + } + if (item_data->swallow_type == SWALLOW_Type_LAYOUT_ENTRY) { + elm_entry_context_menu_disabled_set(item_data->eo_check, disabled); + } + //elm_object_item_signal_emit(item, "elm,state,enabled", "elm"); } - - Evas_Object *scroller = elm_genlist_add(ad->win_main_layout); - retvm_if(scroller == NULL, SETTING_DRAW_ERR_FAIL_SCROLLER, - "Cannot set scroller object as contento of layout"); - elm_genlist_clear(scroller); /* first to clear list */ - - /* Enabling illume notification property for window */ - elm_win_conformant_set(ad->win_main_layout, 1); - Evas_Object *conformant = elm_conformant_add(ad->win_main_layout); - elm_object_style_set(conformant, "internal_layout"); /* By Kollus. 2011-01-04 */ - evas_object_show(conformant); - elm_object_content_set(conformant, scroller); - - ad->navi_it = setting_create_navi_bar_top_buttons((char *)title, - _("IDS_COM_SK_CANCEL"), - _("IDS_COM_SK_DONE"), NULL, - setting_network_edit_connection_click_softkey_cancel_cb, - setting_network_edit_connection_click_softkey_save_cb, - NULL, ad, conformant, ad->navi_bar); - retv_if(!ad->navi_it, SETTING_RETURN_FAIL); - ad->has_form_changed = FALSE; - - setting_enable_expandable_genlist(scroller, ad, - __setting_network_connection_exp_cb, - NULL); - evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_UP, - __network_connection_gl_mouse_up, ad); - + elm_object_item_disabled_set(item, disabled);//the last one item + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *)elm_object_item_data_get(item); + if (item_data == NULL) { + SETTING_TRACE("item_data is null"); + return; + } + if (item_data->swallow_type == SWALLOW_Type_LAYOUT_ENTRY) { + elm_entry_context_menu_disabled_set(item_data->eo_check, disabled); + } +} +static Eina_Bool __connection_idler(void *data) +{ + SETTING_TRACE_BEGIN; + retv_if (!data, FALSE); + SettingNetworkUG *ad = data; + __genlist_disable_set(ad->scl_edit, TRUE); + setting_network_connection_hide_input_pannel(ad); + return FALSE; +} +void __get_connection_info(void *cb) +{ + SETTING_TRACE_BEGIN; + ret_if(cb == NULL); + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + //int ret; ad->ed_acs_name_desc = NULL; ad->ed_user_name_desc = NULL; ad->ed_pwd_desc = NULL; - ad->ed_pxy_addr_desc = NULL; - ad->ed_pxy_port_desc = NULL; + G_FREE(ad->ed_pxy_addr_desc); + G_FREE(ad->ed_pxy_port_desc); ad->ed_hm_url_desc = NULL; ad->chkType = NET_PDP_AUTH_NONE; - - /* other intializes */ - ad->data_hm_url = NULL; - ad->data_pwd = NULL; - ad->data_user_name = NULL; + ad->ed_auth_type_desc = NULL; if (NULL == ad->prof_list) { @@ -223,6 +224,7 @@ static int setting_network_connection_create(void *cb) } } + //SETTING_TRACE("NET_ERR_UNKNOWN_METHOD:%d", NET_ERR_UNKNOWN_METHOD); ad->prof_sel_idx = SETTING_ADD_PROFILE_INDEX;//need add new configuration if (ad->prof_list) @@ -253,26 +255,175 @@ static int setting_network_connection_create(void *cb) ad->ed_pwd_desc = ad->prof_list[ad->prof_sel_idx].ProfileInfo.Pdp.AuthInfo.Password; - char *full_addr; - char *addr; - char *port; + switch (ad->chkType) { + case NET_PDP_AUTH_PAP: + ad->ed_auth_type_desc = _("IDS_ST_MBODY_PAP"); + break; + case NET_PDP_AUTH_CHAP: + ad->ed_auth_type_desc = _("IDS_ST_POP_CHAP"); + break; + case NET_PDP_AUTH_NONE: + ad->ed_auth_type_desc = _("IDS_COM_BODY_NONE"); + break; + default: + ad->chkType = NET_PDP_AUTH_NONE; + ad->ed_auth_type_desc = _("IDS_COM_BODY_NONE"); + break; + } + + + char *full_addr = NULL; + char *addr = NULL; + char *port = NULL; //Fix the Port 'NULL' issue when enter connection view repeatly.. full_addr = safeCopyStr(ProxyAddr, ad->prof_list[ad->prof_sel_idx].ProfileInfo.Pdp.net_info.ProxyAddr, NET_PROXY_LEN_MAX); + int url_head_len = strlen(URL_HEAD); + if (0 == safeStrNCmp(full_addr, URL_HEAD, url_head_len)) + { + full_addr += url_head_len; + } addr = strsep(&full_addr, ":"); - port = strsep(&full_addr, ":"); - ad->ed_pxy_addr_desc = addr; - ad->ed_pxy_port_desc = port; + if (NULL == full_addr)//format like "http://127.0.0.1/" or "http://127.0.0.1" + { + SETTING_TRACE("NULL == full_addr"); + addr = strsep(&addr, "/"); + } + if (is_ip_string(addr)) + { + port = strsep(&full_addr, "/"); + } + else //invalid format,let addr and port to be NULL. + { + addr = NULL; + } + + ad->ed_pxy_addr_desc = g_strdup(addr); + ad->ed_pxy_port_desc = g_strdup(port); + + if (ad->con_type == NET_SERVICE_MMS) { /* Message Connection */ + ad->ed_hm_url_desc = + ad->prof_list[ad->prof_sel_idx].ProfileInfo.Pdp.HomeURL; + } + } else { + ad->ed_auth_type_desc = _("IDS_COM_BODY_NONE"); + ad->chkType = NET_PDP_AUTH_NONE; + } + return; +} +void __update_genlist_info(void *cb) +{ + SETTING_TRACE_BEGIN; + ret_if(cb == NULL); + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + if (ad->data_acs_name) + { + ad->data_acs_name->sub_desc = g_strdup(ad->ed_acs_name_desc); } + if (ad->data_auth_type) + { + ad->data_auth_type->sub_desc = g_strdup(ad->ed_auth_type_desc); + if (ad->prof_list) { + int authType = ad->prof_list[ad->prof_sel_idx].ProfileInfo.Pdp.AuthInfo.AuthType; + ad->chkType = !ad->chkType; + setting_network_edit_connection_display_auth_type(ad, authType); + } + } + if (ad->data_user_name) + { + ad->data_user_name->sub_desc = g_strdup(ad->ed_user_name_desc); + } + if (ad->data_pwd) + { + ad->data_pwd->sub_desc = g_strdup(ad->ed_pwd_desc); + } + + if (ad->data_pxy_addr) + { + ad->data_pxy_addr->sub_desc = g_strdup(ad->ed_pxy_addr_desc); + } + if (ad->data_pxy_port) + { + ad->data_pxy_port->sub_desc = g_strdup(ad->ed_pxy_port_desc); + } + if (ad->data_hm_url) + { + ad->data_hm_url->sub_desc = g_strdup(ad->ed_hm_url_desc); + } + elm_genlist_realized_items_update(ad->scl_edit); + return; +} + +static int setting_network_connection_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingNetworkUG *ad = (SettingNetworkUG *) cb; + + setting_retvm_if(NET_SERVICE_MMS != ad->con_type && NET_SERVICE_INTERNET != ad->con_type, + SETTING_GENERAL_ERR_WRONG_PARAMETER, + "Invalid connection type[%d]", ad->con_type) + + const char *title = NULL; + if (ad->con_type == NET_SERVICE_INTERNET) + { /* Internet Connection & MMS Connection Head Title should be different. */ + title = _("IDS_ST_BODY_INTERNET_CONNECTION"); + } + else + { + title = _(STR_SETTING_MMS_CONNECTIONS); + } + + Evas_Object *scroller = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(scroller, "dialogue"); + retvm_if(scroller == NULL, SETTING_DRAW_ERR_FAIL_SCROLLER, + "Cannot set scroller object as contento of layout"); + elm_genlist_clear(scroller); /* first to clear list */ + + /* Enabling illume notification property for window */ + elm_win_conformant_set(ad->win_main_layout, 1); + Evas_Object *conformant = elm_conformant_add(ad->win_main_layout); + elm_object_style_set(conformant, "internal_layout"); /* By Kollus. 2011-01-04 */ + evas_object_show(conformant); + elm_object_content_set(conformant, scroller); + ad->conformant = conformant; + /* connection intializes */ + ad->data_hm_url = NULL; + ad->data_pwd = NULL; + ad->data_user_name = NULL; + ad->data_pxy_addr = NULL; + ad->data_acs_name = NULL; + ad->data_auth_type = NULL; + + ad->navi_it = setting_push_layout_navi_bar((char *)title, + _("IDS_COM_BODY_BACK"), + _(KeyStr_Edit), + NULL,//_(KeyStr_Reset_Def), + setting_network_edit_connection_click_softkey_back_cb, + setting_network_edit_connection_click_softkey_eidt_cb, + setting_network_edit_connection_click_softkey_reset_cb, + ad, conformant, ad->navi_bar, &ad->controlbar); + + retv_if(!ad->navi_it, SETTING_RETURN_FAIL); + ad->has_form_changed = FALSE; + + setting_enable_expandable_genlist(scroller, ad, + __setting_network_connection_exp_cb, + NULL); + evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_UP, + __network_connection_gl_mouse_up, ad); + __get_connection_info(ad); Elm_Object_Item *item; + /* item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL); */ item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); ad->data_acs_name = setting_create_Gendial_field_def(scroller, - &(ad->itc_variable_height), NULL, + &itc_1icon, NULL, NULL, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, "IDS_ST_BODY_ACCESS_NAME", @@ -286,7 +437,7 @@ static int setting_network_connection_create(void *cb) #if !SUPPORT_EXPANDABLE_AUTHTYPE (void)setting_create_Gendial_field_titleItem(scroller, - &(ad->itc_group_item), + &itc_group_item, "IDS_ST_BODY_AUTH_TYPE", NULL); ad->chk_type = elm_radio_add(scroller); @@ -294,12 +445,12 @@ static int setting_network_connection_create(void *cb) ad->data_type_nor = setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), + &itc_1text_1icon_2, setting_network_connection_mouse_up_Gendial_list_radio_cb, ad->chk_type, SWALLOW_Type_1RADIO, ad->chk_type, NET_PDP_AUTH_PAP, - "IDS_IDLE_BODY_NORMAL", + "IDS_ST_MBODY_PAP", setting_network_edit_connection_chk_changed); if (ad->data_type_nor) { ad->data_type_nor->userdata = ad; @@ -309,12 +460,12 @@ static int setting_network_connection_create(void *cb) ad->data_type_sec = setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), + &itc_1text_1icon_2, setting_network_connection_mouse_up_Gendial_list_radio_cb, ad->chk_type, SWALLOW_Type_1RADIO, ad->chk_type, NET_PDP_AUTH_CHAP, - "IDS_ST_BODY_SECURE", + "IDS_ST_POP_CHAP", setting_network_edit_connection_chk_changed); if (ad->data_type_sec) { ad->data_type_sec->userdata = ad; @@ -324,7 +475,7 @@ static int setting_network_connection_create(void *cb) ad->data_type_none = setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), + &itc_1text_1icon_2, setting_network_connection_mouse_up_Gendial_list_radio_cb, ad->chk_type, SWALLOW_Type_1RADIO, @@ -340,37 +491,22 @@ static int setting_network_connection_create(void *cb) elm_radio_value_set(ad->chk_type, ad->chkType); ad->item_above_user_name = item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); #else item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - char *auth_type_desc = NULL; - switch (ad->chkType) { - case NET_PDP_AUTH_PAP: - auth_type_desc = _("IDS_IDLE_BODY_NORMAL"); - break; - case NET_PDP_AUTH_CHAP: - auth_type_desc = _("IDS_ST_BODY_SECURE"); - break; - case NET_PDP_AUTH_NONE: - auth_type_desc = _("IDS_COM_BODY_NONE"); - break; - default: - ad->chkType = NET_PDP_AUTH_NONE; - auth_type_desc = _("IDS_COM_BODY_NONE"); - break; - } + ad->data_auth_type = setting_create_Gendial_exp_parent_field(scroller, - &(ad->itc_2text_3_parent), + &itc_2text_3_parent, NULL, NULL, SWALLOW_Type_INVALID, "IDS_ST_BODY_AUTH_TYPE", - auth_type_desc); + (char *)ad->ed_auth_type_desc); /* ad->data_auth_type->int_slp_setting_binded = INT_SLP_SETTING_INVALID; */ if (ad->data_auth_type) { ad->data_auth_type->userdata = ad; @@ -379,7 +515,7 @@ static int setting_network_connection_create(void *cb) } ad->item_above_user_name = item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); #endif @@ -387,7 +523,7 @@ static int setting_network_connection_create(void *cb) if (NET_PDP_AUTH_NONE != ad->chkType) { ad->data_user_name = setting_create_Gendial_field_def(scroller, - &(ad->itc_variable_height), + &itc_1icon, NULL, NULL, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, @@ -403,7 +539,7 @@ static int setting_network_connection_create(void *cb) ad->data_pwd = setting_create_Gendial_field_def(scroller, - &(ad->itc_variable_height), + &itc_1icon, NULL, NULL, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, @@ -419,7 +555,7 @@ static int setting_network_connection_create(void *cb) } ad->item_above_proxy_add = item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); @@ -427,7 +563,7 @@ static int setting_network_connection_create(void *cb) ad->data_pxy_addr = setting_create_Gendial_field_def(scroller, - &(ad->itc_variable_height), NULL, + &itc_1icon, NULL, NULL, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, "IDS_ST_BODY_CONNECTIONSETTINGS_PROXY_ADDRESS", @@ -442,7 +578,7 @@ static int setting_network_connection_create(void *cb) ad->data_pxy_port = setting_create_Gendial_field_def(scroller, - &(ad->itc_variable_height), NULL, + &itc_1icon, NULL, NULL, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, "IDS_ST_BODY_PROXY_PORT", @@ -455,9 +591,33 @@ static int setting_network_connection_create(void *cb) SETTING_TRACE_ERROR("ad->data_pxy_port is NULL"); } + if (ad->con_type == NET_SERVICE_MMS) { /* mms Connection */ + ad->data_hm_url = + setting_create_Gendial_field_def(scroller, + &itc_1icon, + NULL, NULL, + SWALLOW_Type_LAYOUT_ENTRY, + NULL, NULL, 0, + "IDS_ST_BODY_HOME_URL", + (char *)ad->ed_hm_url_desc, + setting_network_connection_entry_changed_cb); + if (ad->data_hm_url) { + ad->data_hm_url->userdata = ad; + ad->data_hm_url->input_type = ELM_INPUT_PANEL_LAYOUT_URL; + } else { + SETTING_TRACE_ERROR("ad->data_hm_url is NULL"); + } + /* ad->is_show_url = 1; */ + } + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + setting_view_network_connection_create.is_create = 1; ad->scl_edit = scroller; - + __genlist_disable_set(ad->scl_edit, TRUE); + ecore_idler_add(__connection_idler, ad); return SETTING_RETURN_SUCCESS; } @@ -468,6 +628,25 @@ static int setting_network_connection_destroy(void *cb) retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); SettingNetworkUG *ad = (SettingNetworkUG *) cb; + ad->navi_it = NULL; + ad->controlbar = NULL; + ad->back_btn = NULL; + //manager separatly, + if (ad->l_button) + { + evas_object_del(ad->l_button); + ad->l_button = NULL; + } + if (ad->m_button) + { + evas_object_del(ad->m_button); + ad->m_button = NULL; + } + if (ad->r_button) + { + evas_object_del(ad->r_button); + ad->r_button = NULL; + } elm_naviframe_item_pop(ad->navi_bar); setting_view_network_connection_create.is_create = 0; @@ -545,12 +724,10 @@ static int setting_network_edit_connection_save_connection(void *data) } else { con_info = (net_profile_info_t *)calloc(1, sizeof(net_profile_info_t)); } - /* save access name */ if (!safeStrCmp(acs_name, "")) { - setting_create_popup_without_title(ad, ad->win_get, - _ - ("Please input access name !")); + setting_create_simple_popup(ad, ad->win_get, + NULL, _(Insert_Access_Name_desc)); return SETTING_DNET_RETURN_NULL_ACCESS_NAME; } else { safeCopyStr(con_info->ProfileInfo.Pdp.Apn, acs_name, @@ -558,6 +735,7 @@ static int setting_network_edit_connection_save_connection(void *data) } /* save auth type */ + /* type = elm_radio_value_get(ad->chk_type); */ type = ad->chkType; switch (type) { @@ -585,13 +763,11 @@ static int setting_network_edit_connection_save_connection(void *data) /* do nothing*/ break; } - /* save user name */ if (!safeStrCmp(usr_name, "") && NET_PDP_AUTH_NONE != type) { - setting_create_popup_without_title(ad, ad->win_get, - _ - ("Please input User name !")); + setting_create_simple_popup(ad, ad->win_get, + NULL, _(Insert_User_Name_Desc)); return SETTING_DNET_RETURN_NULL_USER_NAME; } else { safeCopyStr(con_info->ProfileInfo.Pdp.AuthInfo.UserName, @@ -600,8 +776,8 @@ static int setting_network_edit_connection_save_connection(void *data) /* save password */ if (!safeStrCmp(pwd, "") && NET_PDP_AUTH_NONE != type) { - setting_create_popup_without_title(ad, ad->win_get, - _("IDS_ST_BODY_ENTER_PASSWORD")); + setting_create_simple_popup(ad, ad->win_get, + NULL, _("IDS_ST_BODY_ENTER_PASSWORD")); return SETTING_DNET_RETURN_NULL_PASSWORD; } else { safeCopyStr(con_info->ProfileInfo.Pdp.AuthInfo.Password, pwd, @@ -610,25 +786,39 @@ static int setting_network_edit_connection_save_connection(void *data) /* save proxy addr */ if (!safeStrCmp(addr, "")) { + /* addr = "0.0.0.0"; */ ret = SETTING_DNET_RETURN_NULL_PROXY_ADDR; } else if (!is_ip_string(addr)) { - setting_create_popup_without_title(ad, ad->win_get, - _("IDS_ST_HEADER_INCORRECT_PROXY_ADDRESS")); + setting_create_simple_popup(ad, ad->win_get, + NULL, _("IDS_ST_HEADER_INCORRECT_PROXY_ADDRESS")); return SETTING_DNET_RETURN_INVALID_PROXY_ADDR; } /* check proxy port */ if (!safeStrCmp(port, "")) { + /* port = "80"; */ ret = SETTING_DNET_RETURN_NULL_PROXY_PORT; } - if (!safeStrCmp(addr, "") && !safeStrCmp(port, "")) { - memset(con_info->ProfileInfo.Pdp.net_info.ProxyAddr, 0, - sizeof(con_info->ProfileInfo.Pdp.net_info.ProxyAddr)); - } else { - ret = snprintf(sz_text, sizeof(sz_text), "%s:%s", addr, port); - retv_if(ret < 0, SETTING_DNET_RETURN_ERR); - safeCopyStr(con_info->ProfileInfo.Pdp.net_info.ProxyAddr, sz_text, - NET_PROXY_LEN_MAX); + ret = snprintf(sz_text, sizeof(sz_text), "%s:%s", addr, port); + retv_if(ret < 0, SETTING_DNET_RETURN_ERR); + safeCopyStr(con_info->ProfileInfo.Pdp.net_info.ProxyAddr, sz_text, + NET_PROXY_LEN_MAX); + + /* save home url(message connection only) */ + if (ad->con_type == NET_SERVICE_MMS) { /* Message Connection */ + home = ad->data_hm_url->sub_desc; + if (home == (char *)NULL) { + safeCopyStr(con_info->ProfileInfo.Pdp.HomeURL, + URL_HEAD, NET_HOME_URL_LEN_MAX); + } else { + if (!safeStrCmp(home, "")) { + home = URL_HEAD; + ret = SETTING_DNET_RETURN_NULL_HOMEURL; + } + + safeCopyStr(con_info->ProfileInfo.Pdp.HomeURL, home, + NET_HOME_URL_LEN_MAX); + } } SETTING_TRACE("ad->con_type:%d", ad->con_type); @@ -637,8 +827,13 @@ static int setting_network_edit_connection_save_connection(void *data) /* add connection */ if (ad->con_type == NET_SERVICE_INTERNET) { /* Internet Connection */ safeCopyStr(con_info->ProfileName, - "Internet connection", - strlen("Internet connection")); + "IDS_ST_BODY_INTERNET_CONNECTION", + strlen("IDS_ST_BODY_INTERNET_CONNECTION")); + //con_info->ProfileInfo.Pdp.ServiceCategoryId = 1; + } else { + safeCopyStr(con_info->ProfileName, STR_SETTING_MMS_CONNECTIONS, + strlen(STR_SETTING_MMS_CONNECTIONS)); + //con_info->ProfileInfo.Pdp.ServiceCategoryId = 2; } /** Specifies a protocol type */ @@ -648,16 +843,14 @@ static int setting_network_edit_connection_save_connection(void *data) con_info->profile_type = NET_DEVICE_CELLULAR; con_info->ProfileState = NET_STATE_TYPE_UNKNOWN; con_info->ProfileInfo.Pdp.ProtocolType = NET_PDP_TYPE_GPRS; - err = net_add_profile(ad->con_type, con_info); if (err != NET_ERR_NONE) { SETTING_TRACE_DEBUG ("%s*** [ERR] net_add_profile. err=%d ***%s", SETTING_FONT_RED, err, SETTING_FONT_BLACK); ret = SETTING_DNET_RETURN_ERR; - setting_create_popup_without_title(ad, ad->win_get, - _ - ("Failed to invoke net_add_profile()")); + setting_create_simple_popup(ad, ad->win_get, + NULL, _(Invok_API_Failed_Desc)); return ret; } FREE(con_info); @@ -678,6 +871,163 @@ static int setting_network_edit_connection_save_connection(void *data) *call back func * ***************************************************/ + #define BTN_STYLE_DEF "naviframe/title/default" +static void +setting_network_edit_connection_click_softkey_eidt_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + //setting_enable_evas_object(ad->scl_edit); + __genlist_disable_set(ad->scl_edit, FALSE); + /* create buttons */ + if (!ad->l_button) //go into first time + { + ad->l_button = setting_create_button(ad->navi_bar, _("IDS_COM_SK_DONE"), + BTN_STYLE_DEF, + setting_network_edit_connection_click_softkey_save_cb, + ad); + } + + if (!ad->r_button) //go into first time + { + ad->r_button = setting_create_button(ad->navi_bar, _("IDS_COM_SK_CANCEL"), + BTN_STYLE_DEF, + setting_network_edit_connection_click_softkey_cancel_cb, + ad); + } + if (!ad->m_button) //go into first time + { + ad->m_button = setting_create_button(ad->navi_bar, NULL, + BTN_STYLE_DEF, + NULL, ad); + } + if (ad->l_button) { + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_LEFT, ad->l_button); + evas_object_show(ad->l_button); + } + if (ad->r_button) { + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_RIGHT, ad->r_button); + ad->has_form_changed = TRUE;//intialize + setting_network_connection_check_entry_empty(ad); + ad->has_form_changed = FALSE;//restore + } + if (ad->m_button) { + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_MORE, ad->m_button); + evas_object_show(ad->r_button); + } + + //remove '<-' button + ad->back_btn = elm_object_item_part_content_unset(ad->navi_it, NAVI_BTN_STYLE_PREV); + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_PREV, NULL); + evas_object_hide(ad->back_btn); + + //remove other buttons on controlbar + ad->controlbar = elm_object_item_part_content_unset(ad->navi_it, NAVI_CONTROLBAR_PART); + elm_object_item_part_content_set(ad->navi_it, NAVI_CONTROLBAR_PART, NULL); + evas_object_hide(ad->controlbar); +} +static void +setting_network_edit_connection_click_softkey_reset_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + net_profile_info_t *con_info = NULL; + int err = -1; + if (ad->prof_sel_idx != SETTING_ADD_PROFILE_INDEX) { + con_info = &(ad->prof_list[ad->prof_sel_idx]); + } else { + con_info = (net_profile_info_t *)calloc(1, sizeof(net_profile_info_t)); + setting_retm_if(!con_info, "Failed to alloc for net_profile_info_t"); + } + + const char *access_name = _("Connection"); + int auth_type = NET_PDP_AUTH_NONE; + safeCopyStr(con_info->ProfileInfo.Pdp.Apn, access_name, NET_PDP_APN_LEN_MAX); + con_info->ProfileInfo.Pdp.AuthInfo.AuthType = auth_type; + + safeCopyStr(con_info->ProfileInfo.Pdp.net_info.ProxyAddr, "0.0.0.0:80", + NET_PROXY_LEN_MAX); + safeCopyStr(con_info->ProfileInfo.Pdp.HomeURL, + URL_HEAD, NET_HOME_URL_LEN_MAX); + + SETTING_TRACE("ad->con_type:%d", ad->con_type); + /* save connection */ + if (ad->prof_sel_idx == SETTING_ADD_PROFILE_INDEX) + { + /* add connection */ + if (ad->con_type == NET_SERVICE_INTERNET) + { /* Internet Connection */ + safeCopyStr(con_info->ProfileName, + "IDS_ST_BODY_INTERNET_CONNECTION", + strlen("IDS_ST_BODY_INTERNET_CONNECTION")); + //con_info->ProfileInfo.Pdp.ServiceCategoryId = 1; + } + else + { + safeCopyStr(con_info->ProfileName, STR_SETTING_MMS_CONNECTIONS, + strlen(STR_SETTING_MMS_CONNECTIONS)); + //con_info->ProfileInfo.Pdp.ServiceCategoryId = 2; + } + /** Specifies a protocol type */ + + /** network information */ + con_info->ProfileInfo.Pdp.ServiceType = ad->con_type; + + con_info->profile_type = NET_DEVICE_CELLULAR; + con_info->ProfileState = NET_STATE_TYPE_UNKNOWN; + con_info->ProfileInfo.Pdp.ProtocolType = NET_PDP_TYPE_GPRS; + + err = net_add_profile(ad->con_type, con_info); + if (err != NET_ERR_NONE) + { + SETTING_TRACE_DEBUG + ("%s*** [ERR] net_add_profile. err=%d ***%s", + SETTING_FONT_RED, err, SETTING_FONT_BLACK); + setting_create_simple_popup(ad, ad->win_get, + NULL, _(Invok_API_Failed_Desc)); + } + FREE(con_info); + } + else + { + err = net_modify_profile(con_info->ProfileName, con_info); + if (err != NET_ERR_NONE) + { + SETTING_TRACE_DEBUG + ("%s*** [ERR] net_modify_profile. err=%d ***%s", + SETTING_FONT_RED, err, SETTING_FONT_BLACK); + } + } + + if (err == NET_ERR_NONE) //update genlist when it operaters sucessfully + { + if (!ad->prof_list) __get_connection_info(ad);//maybe new added + ad->ed_acs_name_desc = access_name; + ad->ed_user_name_desc = NULL; + ad->ed_pwd_desc = NULL; + ad->ed_pxy_addr_desc = g_strdup("0.0.0.0"); + ad->ed_pxy_port_desc = g_strdup("80"); + ad->ed_hm_url_desc = URL_HEAD; + ad->chkType = NET_PDP_AUTH_NONE; + ad->ed_auth_type_desc = _("IDS_COM_BODY_NONE"); + __update_genlist_info(ad); + } + else + { + elm_genlist_realized_items_update(ad->scl_edit);//refresh genlist + } + ecore_idler_add(__connection_idler, ad); +} static void setting_network_edit_connection_click_softkey_save_cb(void *data, @@ -689,6 +1039,8 @@ setting_network_edit_connection_click_softkey_save_cb(void *data, retm_if(data == NULL, "Data parameter is NULL"); SettingNetworkUG *ad = (SettingNetworkUG *) data; + /* elm_box_unpack_all(ad->bx_blk); */ + /* elm_dialoguegroup_remove_all(ad->dg_blk); */ int ret = setting_network_edit_connection_save_connection(ad); /* need special handle */ @@ -704,13 +1056,16 @@ setting_network_edit_connection_click_softkey_save_cb(void *data, SETTING_FONT_RED, SETTING_FONT_BLACK); } - setting_network_popup_create(ad, _("Saved!"), FALSE); - setting_view_change(&setting_view_network_connection_create, - &setting_view_network_main, ad); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(KeyStr_Saved), NULL, POPUP_INTERVAL, FALSE, FALSE); + //re-fetch connection info.. + FREE(ad->prof_list); + __get_connection_info(ad); + + setting_network_edit_connection_click_softkey_cancel_cb(ad, ad->r_button, NULL); } static void -setting_network_edit_connection_click_softkey_cancel_cb(void *data, +setting_network_edit_connection_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info) { @@ -719,10 +1074,45 @@ setting_network_edit_connection_click_softkey_cancel_cb(void *data, retm_if(data == NULL, "Data parameter is NULL"); SettingNetworkUG *ad = (SettingNetworkUG *) data; + /* elm_box_unpack_all(ad->bx_blk); */ + /* elm_dialoguegroup_remove_all(ad->dg_blk); */ setting_view_change(&setting_view_network_connection_create, &setting_view_network_main, ad); } +static void +setting_network_edit_connection_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + SettingNetworkUG *ad = (SettingNetworkUG *) data; + ad->l_button = elm_object_item_part_content_unset(ad->navi_it, NAVI_BTN_STYLE_LEFT); + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_LEFT, NULL); + evas_object_hide(ad->l_button); + + ad->m_button = elm_object_item_part_content_unset(ad->navi_it, NAVI_BTN_STYLE_MORE); + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_MORE, NULL); + evas_object_hide(ad->m_button); + + ad->r_button = elm_object_item_part_content_unset(ad->navi_it, NAVI_BTN_STYLE_RIGHT); + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_RIGHT, NULL); + evas_object_hide(ad->r_button); + //setting_disable_evas_object(ad->r_button); + setting_undo_dim_evas_object(ad->r_button, TRUE); + + elm_object_item_part_content_set(ad->navi_it, NAVI_BTN_STYLE_PREV, ad->back_btn); + elm_object_item_part_content_set(ad->navi_it, NAVI_CONTROLBAR_PART, ad->controlbar); + evas_object_show(ad->back_btn); + evas_object_show(ad->controlbar); + + __get_connection_info(ad); + __update_genlist_info(ad); + if(ad->data_auth_type) elm_genlist_item_expanded_set(ad->data_auth_type->item, FALSE); + ecore_idler_add(__connection_idler, ad); +} static void _gl_Gendial_sel(void *data, Evas_Object *obj, void *event_info) { /* SETTING_TRACE_BEGIN; */ @@ -735,48 +1125,36 @@ static void _gl_Gendial_sel(void *data, Evas_Object *obj, void *event_info) static void setting_network_connection_check_entry_empty(SettingNetworkUG *ad) { SETTING_TRACE_BEGIN; - if(!ad->has_form_changed ) return; - const char *entry_str = NULL; + if (!ad->has_form_changed) + { + SETTING_TRACE_DEBUG("ad->has_form_changed == FALSE!"); + return; + } bool isFoundEmptyEntry = FALSE; do { - if (ad->data_acs_name) { - entry_str = ad->data_acs_name->sub_desc; - - if (NULL == entry_str || '\0' == entry_str[0]) { - isFoundEmptyEntry = TRUE; - break; - } - + if (ad->data_acs_name && isEmptyStr(ad->data_acs_name->sub_desc)) { + SETTING_TRACE("entry_str:%s", ad->data_acs_name->sub_desc); + isFoundEmptyEntry = TRUE; + break; } - if(ad->chkType != NET_PDP_AUTH_NONE) - { - if (ad->data_user_name) { - entry_str = ad->data_user_name->sub_desc; - - if (NULL == entry_str || '\0' == entry_str[0]) { - isFoundEmptyEntry = TRUE; - break; - } - } - if (ad->data_pwd) { - entry_str = ad->data_pwd->sub_desc; - if (NULL == entry_str || '\0' == entry_str[0]) { - isFoundEmptyEntry = TRUE; - break; - } - } + if (ad->data_user_name && isEmptyStr(ad->data_user_name->sub_desc)) { + SETTING_TRACE("entry_str:%s", ad->data_user_name->sub_desc); + isFoundEmptyEntry = TRUE; + break; } - if (ad->data_hm_url) { - entry_str = ad->data_hm_url->sub_desc; - if (NULL == entry_str || '\0' == entry_str[0]) { - isFoundEmptyEntry = TRUE; - break; - } + if (ad->data_pwd && isEmptyStr(ad->data_pwd->sub_desc)) { + SETTING_TRACE("entry_str:%s", ad->data_pwd->sub_desc); + isFoundEmptyEntry = TRUE; + break; + } + if (ad->data_hm_url && isEmptyStr(ad->data_hm_url->sub_desc)) { + SETTING_TRACE("entry_str:%s", ad->data_hm_url->sub_desc); + isFoundEmptyEntry = TRUE; + break; } } while (0); - - Evas_Object *done_btn = elm_object_item_part_content_get(ad->navi_it, "title_right_btn"); + Evas_Object *done_btn = elm_object_item_part_content_get(ad->navi_it, NAVI_BTN_STYLE_LEFT); if (isFoundEmptyEntry) { if (!evas_object_pass_events_get(done_btn)) {//it had not yet been disabled setting_disable_evas_object(done_btn); @@ -823,8 +1201,7 @@ setting_network_edit_connection_display_auth_type(SettingNetworkUG *ad, setting_network_connection_entry_changed_cb; ad->data_user_name->item = elm_genlist_item_insert_after(ad->scl_edit, - & - (ad->itc_variable_height), + &itc_1icon, ad->data_user_name, NULL, ad->item_above_user_name, @@ -846,10 +1223,10 @@ setting_network_edit_connection_display_auth_type(SettingNetworkUG *ad, ad->data_pwd->chk_change_cb = setting_network_connection_entry_changed_cb; ad->data_pwd->isPasswordFlag = TRUE; + /* ad->data_pwd->chk_change_cb = chk_change_cb; */ ad->data_pwd->item = elm_genlist_item_insert_after(ad->scl_edit, - & - (ad->itc_variable_height), + &itc_1icon, ad->data_pwd, NULL, ad-> data_user_name->item, @@ -858,7 +1235,7 @@ setting_network_edit_connection_display_auth_type(SettingNetworkUG *ad, ad->item_above_proxy_add = elm_genlist_item_insert_after(ad->scl_edit, - &(ad->itc_seperator), + &itc_seperator, NULL, NULL, ad->data_pwd->item, ELM_GENLIST_ITEM_NONE, @@ -866,11 +1243,9 @@ setting_network_edit_connection_display_auth_type(SettingNetworkUG *ad, elm_genlist_item_select_mode_set (ad->item_above_proxy_add, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - Evas_Object *done_btn = elm_object_item_part_content_get(ad->navi_it, "title_right_btn"); - if (!evas_object_pass_events_get(done_btn)) {//it had not yet been disabled - setting_disable_evas_object(done_btn); - setting_dim_evas_object(done_btn, TRUE); - } + ad->has_form_changed = TRUE; + setting_network_connection_check_entry_empty(ad); + /* ad->is_show_user = 1; */ } ad->is_show_user = 1; } else { /* to hide */ @@ -909,16 +1284,33 @@ setting_network_connection_entry_changed_cb(void *data, Evas_Object *obj, (Setting_GenGroupItem_Data *) data; SettingNetworkUG *ad = list_item->userdata; const char *entry_str = elm_entry_entry_get(obj); - if (0 != safeStrCmp(entry_str, list_item->sub_desc)) - { - list_item->sub_desc = (char *)g_strdup(entry_str); - ad->has_form_changed = TRUE; + list_item->sub_desc = (char *)g_strdup(entry_str); + ad->has_form_changed = TRUE; + setting_network_connection_check_entry_empty(ad); +} +static void +setting_network_connection_hide_input_pannel(void *data) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + SettingNetworkUG *ad = data; + if (ad->data_acs_name) { + setting_hide_input_pannel_cb(ad->data_acs_name->eo_check); } - - if (NULL == entry_str || 0 == safeStrLen(entry_str)) { - Evas_Object *layout = elm_object_parent_widget_get(list_item->eo_check); - if (layout) elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); + if (ad->data_user_name) { + setting_hide_input_pannel_cb(ad->data_user_name->eo_check); + } + if (ad->data_pwd) { + setting_hide_input_pannel_cb(ad->data_pwd->eo_check); + } + if (ad->data_pxy_addr) { + setting_hide_input_pannel_cb(ad->data_pxy_addr->eo_check); + } + if (ad->data_pxy_port) { + setting_hide_input_pannel_cb(ad->data_pxy_port->eo_check); + } + if (ad->data_hm_url) { + setting_hide_input_pannel_cb(ad->data_hm_url->eo_check); } - - setting_network_connection_check_entry_empty(ad); } + diff --git a/setting-network/src/setting-network-main-help.c b/setting-network/src/setting-network-main-help.c index 51f02cb..5f6c3c2 100755 --- a/setting-network/src/setting-network-main-help.c +++ b/setting-network/src/setting-network-main-help.c @@ -1,19 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #define SELECT_NETWORK "1. Select network
"/*1. Select network*/\ @@ -83,34 +87,34 @@ static int setting_network_main_help_create(void *cb) ad->navi_bar); //SELECT_NETWORK - setting_create_Gendial_field_def(genlist, &(ad->itc_bg_1icon), + setting_create_Gendial_field_def(genlist, &itc_multiline_text, NULL, - ad, SWALLOW_Type_LAYOUT_SPECIALIZTION, NULL, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, 0, SELECT_NETWORK, NULL, NULL); //NETWORK_MODE - setting_create_Gendial_field_def(genlist, &(ad->itc_bg_1icon), + setting_create_Gendial_field_def(genlist, &itc_multiline_text, NULL, - ad, SWALLOW_Type_LAYOUT_SPECIALIZTION, NULL, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, 0, NETWORK_MODE, NULL, NULL); //PERFER_NETWORKS #ifdef ENABLED_PREFERRED_NETWORKS - setting_create_Gendial_field_def(genlist, &(ad->itc_bg_1icon), + setting_create_Gendial_field_def(genlist, &itc_multiline_text, NULL, - ad, SWALLOW_Type_LAYOUT_SPECIALIZTION, NULL, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, 0, PERFER_NETWORKS, NULL, NULL); #endif //DATA_ROAMING - setting_create_Gendial_field_def(genlist, &(ad->itc_bg_1icon), + setting_create_Gendial_field_def(genlist, &itc_multiline_text, NULL, - ad, SWALLOW_Type_LAYOUT_SPECIALIZTION, NULL, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, 0, DATA_ROAMING, NULL, NULL); diff --git a/setting-network/src/setting-network-main.c b/setting-network/src/setting-network-main.c old mode 100644 new mode 100755 index 8e28727..744232b --- a/setting-network/src/setting-network-main.c +++ b/setting-network/src/setting-network-main.c @@ -1,22 +1,29 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include +#define MOBILE_DATA_WITHOUT_WIFI_STR "IDS_ST_BODY_MOBILE_DATA_WILL_BE_USED_IF_YOU_DOWNLOAD_OR_UPLOAD_DATA_WITHOUT_WI_FI_CONNECTION" +#define UMTS_MODE_WORK_OUTSIDE_STR "IDS_ST_BODY_UMTS_MODE_ONLY_WORKS_INSIDE_3G_COVERAGE_AREA" +#define BAND_OPERATE_OUTSIDE_USA_CANADA_STR "IDS_ST_BODY_THIS_BAND_MAY_NOT_WORK_OUTSIDE_THE_USA_AND_CANADA" + static int setting_network_main_create(void *cb); static int setting_network_main_destroy(void *cb); static int setting_network_main_update(void *cb); @@ -42,30 +49,33 @@ static void setting_network_main_chk_btn_cb(void *data, Evas_Object *obj, void *event_info); static void setting_network_use_packet_resp_cb(void *data, Evas_Object *obj, void *event_info); +static void __setting_network_data_roaming_resp_cb(void *data, Evas_Object *obj, + void *event_info); + /* *************************************************** * *basic func * ***************************************************/ + #if DISABLED_CODE static void __ask_create_gsm_resp_cb(void *data, Evas_Object *obj, void *event_info) { SETTING_TRACE_BEGIN; - + SettingNetworkUG *ad = (SettingNetworkUG *) data; ret_if(NULL == data); int response_type = btn_type(obj); bool rollback_flag = FALSE; if (POPUP_RESPONSE_OK == response_type) { int tapi_ret = TAPI_API_INVALID_INPUT; - int request_id; - + //async: TAPI_EVENT_NETWORK_SETNWBAND_CNF tapi_ret = - tel_set_network_band(TAPI_NETWORK_BAND_MODE_ONLY, + tel_set_network_band(ad->handle, TAPI_NETWORK_BAND_MODE_ONLY, TAPI_NETWORK_BAND_TYPE_GSM_850_1900, - &request_id); + setting_tapi_set_band_cb, ad); if (tapi_ret != TAPI_API_SUCCESS) { SETTING_TRACE_DEBUG ("%s*** [ERR] tel_set_network_band. tapi_ret=%d ***%s", @@ -91,6 +101,7 @@ static void __ask_create_gsm_resp_cb(void *data, Evas_Object *obj, ad->pop_gsm = NULL; } +#endif void __network_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) { SETTING_TRACE_BEGIN; @@ -108,7 +119,6 @@ void __network_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) elm_radio_value_set(ad->data_net_mode->rgd, data_subItem->chk_status); int tapi_ret = TAPI_API_INVALID_INPUT; - int request_id = 0; TelNetworkBand_t band = TAPI_NETWORK_BAND_TYPE_ANY; switch (data_subItem->chk_status) { @@ -122,18 +132,17 @@ void __network_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) break; case TAPI_NETWORK_BAND_TYPE_GSM_850_1900: - ad->pop_gsm = setting_create_popup_with_btn(ad, + /*ad->pop_gsm = setting_create_popup_with_btn(ad, ad->win_get, - _("This band may not operate
outside the USA or Canada"), - NULL, + NULL, _(BAND_OPERATE_OUTSIDE_USA_CANADA_STR), __ask_create_gsm_resp_cb, 0, 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); + */ + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(BAND_OPERATE_OUTSIDE_USA_CANADA_STR), NULL, POPUP_INTERVAL, FALSE, FALSE); return; case TAPI_NETWORK_BAND_TYPE_WCDMA: - setting_network_popup_create(ad, - _("UTMS mode works inside
3G coverage area only"), - FALSE); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(UMTS_MODE_WORK_OUTSIDE_STR), NULL, POPUP_INTERVAL, FALSE, FALSE); band = TAPI_NETWORK_BAND_TYPE_WCDMA; break; default: @@ -143,8 +152,8 @@ void __network_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) //async: TAPI_EVENT_NETWORK_SETNWBAND_CNF tapi_ret = - tel_set_network_band(TAPI_NETWORK_BAND_MODE_ONLY, band, - &request_id); + tel_set_network_band(ad->handle, TAPI_NETWORK_BAND_MODE_ONLY, band, + setting_tapi_set_band_cb, ad); if (tapi_ret != TAPI_API_SUCCESS) { SETTING_TRACE_DEBUG ("%s*** [ERR] tel_set_network_band. tapi_ret=%d ***%s", @@ -178,32 +187,32 @@ __setting_network_main_exp_cb(void *data, Evas_Object *obj, void *event_info) elm_radio_value_set(rgd, -1); setting_create_Gendial_exp_sub_field(scroller, - &(ad->itc_1icon_1text_sub), - __network_sub_list_sel_cb, + &itc_1icon_1text_sub, + __network_sub_list_sel_cb, ad, parentItem, SWALLOW_Type_1RADIO, rgd, TAPI_NETWORK_BAND_TYPE_ANY, "IDS_COM_BODY_AUTOMATIC", NULL); setting_create_Gendial_exp_sub_field(scroller, - &(ad->itc_1icon_1text_sub), - __network_sub_list_sel_cb, + &itc_1icon_1text_sub, + __network_sub_list_sel_cb, ad, parentItem, SWALLOW_Type_1RADIO, rgd, TAPI_NETWORK_BAND_TYPE_GSM_900_1800, STR_SETTING_GSM_900_1800, NULL); setting_create_Gendial_exp_sub_field(scroller, - &(ad->itc_1icon_1text_sub), - __network_sub_list_sel_cb, + &itc_1icon_1text_sub, + __network_sub_list_sel_cb, ad, parentItem, SWALLOW_Type_1RADIO, rgd, TAPI_NETWORK_BAND_TYPE_GSM_850_1900, STR_SETTING_GSM_850_1900, NULL); setting_create_Gendial_exp_sub_field(scroller, - &(ad->itc_1icon_1text_sub), - __network_sub_list_sel_cb, + &itc_1icon_1text_sub, + __network_sub_list_sel_cb, ad, parentItem, SWALLOW_Type_1RADIO, rgd, TAPI_NETWORK_BAND_TYPE_WCDMA, @@ -215,22 +224,42 @@ __setting_network_main_exp_cb(void *data, Evas_Object *obj, void *event_info) } } - -#define Data_packet_Desc _("IDS_ST_BODY_MOBILE_DATA_WILL_BE_USED_IF_YOU_DOWNLOAD_OR_UPLOAD_DATA_WITHOUT_WI_FI_CONNECTION") static int setting_network_main_create(void *cb) { SETTING_TRACE_BEGIN; retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); SettingNetworkUG *ad = (SettingNetworkUG *) cb; - + /* ***BEGIN*** Fixed the problem of word twinkle SAMSUNG 2010/7/21 add */ int value = 0; int k = -1; + /* ****END**** Fixed the problem of word twinkle SAMSUNG 2010/7/21 add */ - Evas_Object *scroller; +#ifdef SUPPORT_MDM + if(ad->mdm_server_state == MDM_RESULT_SUCCESS) + { + ad->roaming_policy_status = mdm_get_allow_roaming_data(); + if(ad->roaming_policy_status == MDM_STATUS_ERROR) + { + SETTING_TRACE_DEBUG(">>>>>> function error - mdm_get_allow_roaming_data() "); + } + else + { + SETTING_TRACE_DEBUG("function success - mdm_get_allow_roaming_data() --> %d ", ad->roaming_policy_status ); - int tapi_ret; - int request_id = 0; + if (ad->roaming_policy_status == MDM_ALLOWED) + { + SETTING_TRACE_DEBUG(">>> MDM ALLOWED "); + } + else if (ad->roaming_policy_status == MDM_RESTRICTED) + { + SETTING_TRACE_DEBUG(">>> MDM RESTRICTED "); + } + } + } +#endif + + Evas_Object *scroller; ad->ly_main = setting_create_layout_navi_bar_genlist(ad->win_main_layout, @@ -238,19 +267,18 @@ static int setting_network_main_create(void *cb) _("IDS_ST_BODY_NETWORK"), dgettext("sys_string", "IDS_COM_BODY_BACK"), - dgettext("sys_string", - "IDS_COM_BODY_HELP"), + NULL,//_("IDS_COM_BODY_HELP"), setting_network_main_click_softkey_back_cb, setting_network_main_click_softkey_help_cb, ad, &scroller, &ad->navi_bar); - + setting_enable_expandable_genlist(scroller, ad, __setting_network_main_exp_cb, NULL); Elm_Object_Item *item = NULL;; item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); @@ -259,89 +287,116 @@ static int setting_network_main_create(void *cb) setting_get_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, &value_use_packet, &err_use_packet); /** @todo check 'err_use_packet' variable for exception handling */ - // Under emulator environment, it fails to control data network connections - if (!isEmulBin()) { - ad->data_use_packet = - setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + ad->data_use_packet = + setting_create_Gendial_field_def(scroller, &itc_1text_1icon, setting_network_main_item_Gendial_mouse_up_cb, ad, SWALLOW_Type_1TOGGLE, NULL, NULL, value_use_packet, KeyStr_UsePacketData, NULL, setting_network_main_chk_btn_cb); - if (ad->data_use_packet) { - ad->data_use_packet->userdata = ad; - } else { - SETTING_TRACE_ERROR("ad->data_use_packet is NULL"); - } + if (ad->data_use_packet) { + ad->data_use_packet->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_packet is NULL"); + } - setting_create_Gendial_field_def(scroller, &(ad->itc_bg_1icon), NULL, + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, ad, SWALLOW_Type_LAYOUT_SPECIALIZTION, NULL, NULL, 0, Data_packet_Desc, NULL, NULL); - } - char *sub_des = NULL; - /* NO flight mode - default */ - tapi_ret = tel_get_network_selection_mode(&request_id); - if (tapi_ret != TAPI_API_SUCCESS) { - SETTING_TRACE - ("%s*** [ERR] tel_get_network_selection_mode. tapi_ret=%d ***%s", - SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); - sub_des = _("IDS_COM_BODY_AUTOMATIC"); + /* data roaming */ + int value_data_roaming = 0; + int err_data_roaming = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, + &value_data_roaming, &err_data_roaming); + if (err_data_roaming != 0) { + SETTING_TRACE_ERROR("get vconf failed"); } - - k = vconf_get_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, &value); - if (-1 != k) { - switch (value) { - case TAPI_NETWORK_SELECTIONMODE_AUTOMATIC: - { - sub_des = _("IDS_COM_BODY_AUTOMATIC"); - break; - } - case TAPI_NETWORK_SELECTIONMODE_MANUAL: + ad->data_roaming = setting_create_Gendial_field_def(scroller, &itc_1text_1icon, + setting_network_main_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, value_data_roaming, + KeyStr_DataRoaming, NULL, + setting_network_main_chk_btn_cb); + if (ad->data_roaming) { + ad->data_roaming->userdata = ad; +#ifdef SUPPORT_MDM + if(ad->mdm_server_state == MDM_RESULT_SUCCESS) + { + if (ad->roaming_policy_status == MDM_ALLOWED) { - sub_des = _("IDS_COM_BODY_MANUAL"); - break; + setting_enable_genlist_item(ad->data_roaming->item); } - default: + else if (ad->roaming_policy_status == MDM_RESTRICTED) { - break; + setting_disable_genlist_item(ad->data_roaming->item); + setting_create_popup_without_btn(ad, ad->ly_main, NULL, MDM_POLICY_DATA_ROAMING_RESTRICTED_STR, + NULL, POPUP_INTERVAL, FALSE, FALSE); } } - } - ad->sel_net = value; - const char *pa_net_name = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); - SETTING_TRACE("pa_net_name:%s", pa_net_name); - if (NULL == pa_net_name) { - pa_net_name = "IDS_ST_BODY_NOSERVICE"; - } - - char sel_network_desc[MAX_COMMON_BUFFER_LEN] = { 0, }; - snprintf(sel_network_desc, MAX_COMMON_BUFFER_LEN, - "%s. %s", sub_des, _(pa_net_name)); - FREE(pa_net_name); - - ad->data_sel_net = setting_create_Gendial_field_def(scroller, - &(ad->itc_2text_2), - setting_network_main_item_Gendial_mouse_up_cb, - ad, SWALLOW_Type_INVALID, - NULL, NULL, 0, - "IDS_ST_BODY_SELECT_NETWORK", - sel_network_desc, NULL); - if (ad->data_sel_net) { - ad->data_sel_net->userdata = ad; +#endif } else { - SETTING_TRACE_ERROR("ad->data_sel_net is NULL"); + SETTING_TRACE_ERROR("ad->data_roaming is NULL"); } - tapi_ret = tel_get_network_band(&request_id); - if (tapi_ret != TAPI_API_SUCCESS) { - SETTING_TRACE - ("%s*** [ERR] tel_get_network_band. tapi_ret=%d ***%s", - SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); - sub_des = _("IDS_COM_BODY_AUTOMATIC"); - } + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION, + NULL, NULL, 0, SETTING_NETWORK_DATA_ROMING_DESC, NULL, + NULL); + + + /* (void)setting_create_Gendial_field_titleItem(scroller, &(ad->itc_group_item), speciliztion, NULL); */ + /* check flight mode */ + int flight_mode, err; + setting_get_bool_slp_key(BOOL_SLP_SETTING_FLIGHT_MODE, &flight_mode, + &err); + /** @todo check 'err' variable for exception handling */ + SETTING_TRACE("flight_mode:%d", flight_mode); + char *sub_des = NULL; + if (flight_mode == 0) { + /* ***BEGIN*** Fixed the problem of word twinkle SAMSUNG 2010/7/21 add */ + ad->sel_net = TAPI_NETWORK_SELECTIONMODE_AUTOMATIC; + ad->sel_act = TAPI_NETWORK_SYSTEM_NO_SRV; + vconf_get_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, &ad->sel_net); + vconf_get_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, &ad->sel_act); + + FREE(ad->sel_network); + ad->sel_network = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); + SETTING_TRACE("pa_sel_net_name:%s", ad->sel_network); + if (NULL == ad->sel_network) { + ad->sel_network = strndup("IDS_ST_BODY_NOSERVICE", strlen("IDS_ST_BODY_NOSERVICE")+1); + } + SETTING_TRACE("pa_net_name:%s", ad->sel_network); + SETTING_TRACE("old act:%d", ad->sel_act); + SETTING_TRACE("old network mode:%d", ad->sel_net); + + char sel_network_desc[MAX_COMMON_BUFFER_LEN] = { 0, }; + if (TAPI_NETWORK_SELECTIONMODE_MANUAL == value) { + snprintf(sel_network_desc, MAX_COMMON_BUFFER_LEN, + "%s. %s (%s)", _("IDS_COM_BODY_MANUAL"), _(ad->sel_network), + setting_network_get_act_str(ad->sel_act)); + } + else{ + snprintf(sel_network_desc, MAX_COMMON_BUFFER_LEN, + "%s. %s", _("IDS_COM_BODY_AUTOMATIC"), _(ad->sel_network)); + } + + ad->data_sel_net = setting_create_Gendial_field_def(scroller, + &itc_2text_3, + setting_network_main_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, + NULL, NULL, 0, + "IDS_ST_BODY_SELECT_NETWORK", + sel_network_desc, NULL); + if (ad->data_sel_net) { + ad->data_sel_net->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_sel_net is NULL"); + } + } + /* ***BEGIN*** Fixed the problem of word twinkle SAMSUNG 2010/7/21 add */ k = vconf_get_int(VCONFKEY_SETAPPL_NETWORK_MODE_INT, &value); if (-1 != k) { SETTING_TRACE("value:%d", value); @@ -365,7 +420,7 @@ static int setting_network_main_create(void *cb) ad->data_net_mode = setting_create_Gendial_exp_parent_field(scroller, - &(ad->itc_2text_3_parent), + &itc_2text_3_parent, NULL, NULL, SWALLOW_Type_INVALID, "IDS_ST_BODY_NETWORK_MODE", @@ -378,13 +433,24 @@ static int setting_network_main_create(void *cb) SETTING_TRACE_ERROR("ad->data_back is NULL"); } - setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_network_main_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, CONNECTION_DSC, + NULL, NULL); +#if DISABLED_CODE + setting_create_Gendial_field_def(scroller, &itc_1text, setting_network_main_item_Gendial_mouse_up_cb, ad, SWALLOW_Type_INVALID, NULL, NULL, 0, "IDS_ST_BODY_INTERNET_CONNECTION", NULL, NULL); + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_network_main_item_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, STR_SETTING_MMS_CONNECTIONS, NULL, + NULL); #ifdef ENABLED_PREFERRED_NETWORKS - setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_create_Gendial_field_def(scroller, &itc_1text, setting_network_main_item_Gendial_mouse_up_cb, ad, SWALLOW_Type_INVALID, NULL, NULL, 0, "IDS_ST_BODY_PREFERRED_NETWORKS", @@ -392,13 +458,19 @@ static int setting_network_main_create(void *cb) #endif #ifdef ENABLED_2G3G_NETWORK /* create 3g connection option */ - setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_create_Gendial_field_def(scroller, &itc_1text, setting_network_main_item_Gendial_mouse_up_cb, ad, SWALLOW_Type_INVALID, NULL, NULL, 0, "2G/3G Connection", NULL, NULL); /* add blank rectangle */ #endif +#endif + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + setting_view_network_main.is_create = 1; return SETTING_RETURN_SUCCESS; } @@ -438,6 +510,17 @@ static int setting_network_main_update(void *cb) static int setting_network_main_cleanup(void *cb) { + /* error check */ + /* retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); */ + + /* SettingNetworkUG *ad = (SettingNetworkUG *)cb; */ + + /* all the view in view stack shared the ad->ly_main, it cannot be hided!!! */ + /* if(ad->ly_main != NULL) */ + /* { */ + /* evas_object_hide(ad->ly_main); */ + /* } */ + return SETTING_RETURN_SUCCESS; } @@ -510,11 +593,18 @@ setting_network_main_item_Gendial_mouse_up_cb(void *data, Evas_Object *obj, setting_view_change(&setting_view_network_main, &setting_view_network_connection_create, ad); + } else if (!safeStrCmp(STR_SETTING_MMS_CONNECTIONS, list_item->keyStr)) { + ad->con_type = NET_SERVICE_MMS; + + ret = + setting_view_change(&setting_view_network_main, + &setting_view_network_connection_create, + ad); } -#ifdef ENABLED_PREFERRED_NETWORKS - else if (!safeStrCmp("IDS_ST_BODY_PREFERRED_NETWORKS", +#ifdef ENABLED_PREFERRED_NETWORKS + else if (!safeStrCmp("IDS_ST_BODY_PREFERRED_NETWORKS", list_item->keyStr)) { - + int value = -1; int err = -1; ret = @@ -535,9 +625,8 @@ setting_network_main_item_Gendial_mouse_up_cb(void *data, Evas_Object *obj, case VCONFKEY_TELEPHONY_SIM_NOT_PRESENT: - setting_create_popup_without_title(NULL, ad->win_get, - _ - ("IDS_ST_SECURITY_BODY_NOIMSI")); + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_ST_SECURITY_BODY_NOIMSI")); SETTING_TRACE_DEBUG ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", SETTING_FONT_RED, value, SETTING_FONT_BLACK); @@ -548,9 +637,8 @@ setting_network_main_item_Gendial_mouse_up_cb(void *data, Evas_Object *obj, case VCONFKEY_TELEPHONY_SIM_CARD_ERROR: case VCONFKEY_TELEPHONY_SIM_UNKNOWN: - setting_create_popup_without_title(NULL, ad->win_get, - _ - ("IDS_COM_BODY_INVALID_SIM_CARD")); + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_COM_BODY_INVALID_SIM_CARD")); SETTING_TRACE_DEBUG ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", SETTING_FONT_RED, value, SETTING_FONT_BLACK); @@ -575,20 +663,55 @@ setting_network_main_item_Gendial_mouse_up_cb(void *data, Evas_Object *obj, /* new status */ list_item->chk_status = !old_status; elm_check_state_set(list_item->eo_check, list_item->chk_status); - int err = 0; if (!list_item->chk_status) { - setting_set_bool_slp_key - (BOOL_SLP_SETTING_USE_PACKET_DATA, - SETTING_ON_OFF_BTN_OFF, &err); - /** @todo check 'err' variable for exception handling */ - } else { ad->popup = setting_create_popup_with_btn(ad, ad->win_get, - _("Data packet through 3G network will be consumed, if you use data download or upload without Wi-Fi connection.Continue?"), - NULL, + NULL, _(SETTING_NETWORK_USE_PACKET_DATA_OFF_DESC), setting_network_use_packet_resp_cb, 0, 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); + } else { + ad->popup = + setting_create_popup_with_btn(ad, ad->win_get, + NULL, _(SETTING_NETWORK_USE_PACKET_DATA_ON_DESC), + setting_network_use_packet_resp_cb, + 0, 1, _("IDS_COM_SK_OK")); } + + } else if (!safeStrCmp(KeyStr_DataRoaming, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + + char *notify_str = NULL; + if (!list_item->chk_status) { + notify_str = SETTING_NETWORK_DATA_ROMING_OFF_DESC; + ad->popup = setting_create_popup_with_btn(ad, ad->win_get, + NULL, notify_str, + __setting_network_data_roaming_resp_cb, 0, + 1, _("IDS_COM_SK_OK")); + } else { + int err = 0; + setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, + SETTING_ON_OFF_BTN_ON, &err); + setting_retm_if(err != 0, "set vconf failed"); + + /* should set use_packet_data as same as the status of data_roming */ + int value = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, &value, &err); + setting_retm_if(err != 0, "get vconf failed"); + if (!value) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, + SETTING_ON_OFF_BTN_ON, &err); + setting_retm_if(err != 0, "set vconf failed"); + + elm_check_state_set(ad->data_use_packet->eo_check, 1); + ad->data_use_packet->chk_status = 1; + } + } + } else if(!safeStrCmp(CONNECTION_DSC, list_item->keyStr)) { + ret = setting_view_change(&setting_view_network_main, + &setting_view_network_con, ad); } } @@ -605,22 +728,45 @@ setting_network_main_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ if (obj == ad->data_use_packet->eo_check) { - int err; - /* int value; */ - if (list_item->chk_status) { + if (!list_item->chk_status) { ad->popup = setting_create_popup_with_btn(ad, ad->win_get, - _("Data packet through 3G network will be consumed, if you use data download or upload without Wi-Fi connection.Continue?"), - NULL, + NULL, _(SETTING_NETWORK_USE_PACKET_DATA_OFF_DESC), setting_network_use_packet_resp_cb, 0, 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); } else { - setting_set_bool_slp_key - (BOOL_SLP_SETTING_USE_PACKET_DATA, - SETTING_ON_OFF_BTN_OFF, &err); - /** @todo check 'err' variable for exception handling */ - elm_check_state_set(ad->data_use_packet->eo_check, 0); - ad->data_use_packet->chk_status = 0; + ad->popup = + setting_create_popup_with_btn(ad, ad->win_get, + NULL, _(SETTING_NETWORK_USE_PACKET_DATA_ON_DESC), + setting_network_use_packet_resp_cb, + 0, 1, _("IDS_COM_SK_OK")); + } + }else if (obj == ad->data_roaming->eo_check) { + char *notify_str = NULL; + if (!list_item->chk_status) { + notify_str = SETTING_NETWORK_DATA_ROMING_OFF_DESC; + ad->popup = setting_create_popup_with_btn(ad, ad->win_get, + NULL, notify_str, + __setting_network_data_roaming_resp_cb, 0, + 1, _("IDS_COM_SK_OK")); + } else { + int err = 0; + setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, + SETTING_ON_OFF_BTN_ON, &err); + setting_retm_if(err != 0, "set vconf failed"); + + /* should set use_packet_data as same as the status of data_roming */ + int value = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, &value, &err); + setting_retm_if(err != 0, "get vconf failed"); + if (!value) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, + SETTING_ON_OFF_BTN_ON, &err); + setting_retm_if(err != 0, "set vconf failed"); + + elm_check_state_set(ad->data_use_packet->eo_check, 1); + ad->data_use_packet->chk_status = 1; + } } } } @@ -633,20 +779,61 @@ setting_network_use_packet_resp_cb(void *data, Evas_Object *obj, retm_if(data == NULL, "Data parameter is NULL"); SettingNetworkUG *ad = (SettingNetworkUG *) data; - int err; /* error check */ + int err = 0; /* error check */ int response_type = btn_type(obj); + + int value = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, &value, &err); + setting_retm_if(err != 0, "get vconf failed"); + SETTING_TRACE("value = %d", value); if (POPUP_RESPONSE_OK == response_type) { - setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, - SETTING_ON_OFF_BTN_ON, &err); - /** @todo check 'err' variable for exception handling */ - elm_check_state_set(ad->data_use_packet->eo_check, 1); - ad->data_use_packet->chk_status = 1; + if (value == 0) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, + SETTING_ON_OFF_BTN_ON, &err); + setting_retm_if(err != 0, "set vconf failed"); + + elm_check_state_set(ad->data_use_packet->eo_check, 1); + ad->data_use_packet->chk_status = 1; + + /* if called by other apps, destroy ug */ + if (!safeStrCmp(ad->view_type_string, "DATA_ROAMING")) { + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ug_destroy_me(ad->ug); + return; + } + } else { + setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, + SETTING_ON_OFF_BTN_OFF, &err); + setting_retm_if(err != 0, "set vconf failed"); + + elm_check_state_set(ad->data_use_packet->eo_check, 0); + ad->data_use_packet->chk_status = 0; + + /* should set data_roming as same as status of use_packet_data */ + int data_roaming_value = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, &data_roaming_value, &err); + setting_retm_if(err != 0, "get vconf failed"); + if (data_roaming_value) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, + SETTING_ON_OFF_BTN_OFF, &err); + setting_retm_if(err != 0, "set vconf failed"); + + elm_check_state_set(ad->data_roaming->eo_check, 0); + ad->data_roaming->chk_status = 0; + } + } } else if (POPUP_RESPONSE_CANCEL == response_type) { - setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, - SETTING_ON_OFF_BTN_OFF, &err); - /** @todo check 'err' variable for exception handling */ - elm_check_state_set(ad->data_use_packet->eo_check, 0); - ad->data_use_packet->chk_status = 0; + /* rollback */ + if (value == 1) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_USE_PACKET_DATA, + SETTING_ON_OFF_BTN_ON, &err); + setting_retm_if(err != 0, "set vconf failed"); + elm_check_state_set(ad->data_use_packet->eo_check, 1); + ad->data_use_packet->chk_status = 1; + } } if (ad->popup) { @@ -655,3 +842,54 @@ setting_network_use_packet_resp_cb(void *data, Evas_Object *obj, } } + +static void __setting_network_data_roaming_resp_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + + SettingNetworkUG *ad = (SettingNetworkUG *) data; + int response_type = btn_type(obj); + SETTING_TRACE("elm_object_parent_widget_get(obj):%p", elm_object_parent_widget_get(obj)); + SETTING_TRACE("obj:%p", obj); + if (POPUP_RESPONSE_OK == response_type) { + int value = 0; + int err = 0; + setting_get_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, &value, &err); + + if (value == 0) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, + SETTING_ON_OFF_BTN_ON, &err); + setting_retm_if(err != 0, "set vconf failed"); + + elm_check_state_set(ad->data_roaming->eo_check, 1); + ad->data_roaming->chk_status = 1; + + /* if called by other apps, destroy ug */ + if (!safeStrCmp(ad->view_type_string, "DATA_ROAMING")) { + if (ad->popup) + { + evas_object_del(ad->popup); + ad->popup = NULL; + } + ug_destroy_me(ad->ug); + return; + } + } else { + setting_set_bool_slp_key(BOOL_SLP_SETTING_DATA_ROAMING, + SETTING_ON_OFF_BTN_OFF, &err); + setting_retm_if(err != 0, "set vconf failed"); + + elm_check_state_set(ad->data_roaming->eo_check, 0); + ad->data_roaming->chk_status = 0; + } + } + + if (ad->popup) + { + evas_object_del(ad->popup); + ad->popup = NULL; + } +} + diff --git a/setting-network/src/setting-network-preferred-network-delete.c b/setting-network/src/setting-network-preferred-network-delete.c old mode 100644 new mode 100755 index a9be514..dbc2bc4 --- a/setting-network/src/setting-network-preferred-network-delete.c +++ b/setting-network/src/setting-network-preferred-network-delete.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include static int setting_network_preferred_network_delete_create(void *cb); @@ -81,11 +84,12 @@ static int setting_network_preferred_network_delete_create(void *cb) setting_push_layout_navi_bar(_("IDS_COM_SK_DELETE"), dgettext("sys_string", "IDS_COM_SK_CANCEL"), - dgettext("sys_string", "IDS_COM_SK_DELETE"), + dgettext("sys_string", "IDS_COM_SK_DELETE"), NULL, setting_network_preferred_network_delete_click_softkey_cancel_cb, setting_network_preferred_network_delete_click_softkey_delete_cb, NULL, ad, layout, ad->navi_bar, NULL); + /* elm_object_item_disabled_set(elm_toolbar_last_item_get(ad->controllbar_clear), EINA_TRUE); */ Evas_Object *sub_layout = elm_layout_add(ad->win_main_layout); elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, @@ -94,12 +98,14 @@ static int setting_network_preferred_network_delete_create(void *cb) evas_object_show(sub_layout); ad->gl_sel_all = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(ad->gl_sel_all, "dialogue"); retvm_if(ad->gl_sel_all == NULL, SETTING_RETURN_FAIL, "gl_sel_all == NULL"); elm_genlist_clear(ad->gl_sel_all); /* first to clear list */ elm_genlist_bounce_set(ad->gl_sel_all, 0, 0); ad->scl_pref_del = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(ad->scl_pref_del, "dialogue"); elm_genlist_clear(ad->scl_pref_del); /* first to clear list */ elm_object_part_content_set(sub_layout, "search_list", ad->scl_pref_del); @@ -157,6 +163,7 @@ void setting_network_preferred_network_delete_refresh_view(SettingNetworkUG *ad) { SETTING_TRACE_BEGIN; + /* int i =0; */ if (ad->item_check_list) { eina_list_free(ad->item_check_list); @@ -190,7 +197,7 @@ setting_network_preferred_network_delete_draw_network_list(SettingNetworkUG * check_count = 0; ad->data_cl_select_all = - setting_create_Gendial_field_def(ad->gl_sel_all, &(ad->itc_sel_all), + setting_create_Gendial_field_def(ad->gl_sel_all, &itc_sel_all, setting_network_perferred_network_delete_mouse_up_cb, ad, SWALLOW_Type_1CHECK, NULL, NULL, 0, KeyStr_Select_All, NULL, @@ -201,7 +208,7 @@ setting_network_preferred_network_delete_draw_network_list(SettingNetworkUG * SETTING_TRACE_ERROR("ad->data_cl_select_all is NULL"); } - for (i = 0; i < ad->pref_list.NumOfPreffPlmns; i++) { + for (i = 0; i < ad->pref_list.NumOfPrefPlmns; i++) { list_item = calloc(1, sizeof(preferred_list_item_t)); setting_retm_if(!list_item, "calloc failed"); list_item->prefer_idx = i; @@ -209,13 +216,11 @@ setting_network_preferred_network_delete_draw_network_list(SettingNetworkUG * list_item->data_Genitem = setting_create_Gendial_field_def(ad->scl_pref_del, - &(ad->itc_1icon_1text), + &itc_cm_1text_1icon_2, setting_network_perferred_network_delete_mouse_up_cb, ad, SWALLOW_Type_1CHECK, NULL, NULL, 0, - _(ad-> - pref_list.PreffPlmnRecord - [i].network_name), NULL, + _(ad->pref_list.PrefPlmnRecord[i].network_name), NULL, setting_network_preferred_network_delete_check_cb); if (list_item->data_Genitem) { list_item->data_Genitem->userdata = ad; @@ -257,7 +262,7 @@ setting_network_preferred_network_delete_select_all_cb(void *data, pre_list_item->data_Genitem->chk_status = 1; check_list = eina_list_next(check_list); } - check_count = ad->pref_list.NumOfPreffPlmns; + check_count = ad->pref_list.NumOfPrefPlmns; char text[MAX_DISPLAY_NAME_LEN_ON_UI]; snprintf(text, sizeof(text), "%d Items Selected", check_count); @@ -301,7 +306,7 @@ setting_network_preferred_network_delete_check_cb(void *data, Evas_Object *obj, check_count--; } - if (check_count < ad->pref_list.NumOfPreffPlmns) { + if (check_count < ad->pref_list.NumOfPrefPlmns) { elm_check_state_set(ad->data_cl_select_all->eo_check, 0); ad->data_cl_select_all->chk_status = 0; } else { @@ -315,11 +320,9 @@ setting_network_preferred_network_delete_check_cb(void *data, Evas_Object *obj, return; } - char text[MAX_DISPLAY_NAME_LEN_ON_UI]; - if (check_count == 1) - snprintf(text, sizeof(text), "%d Item Selected", check_count); - else - snprintf(text, sizeof(text), "%d Items Selected", check_count); + char text[MAX_DISPLAY_NAME_LEN_ON_UI +1] = {0, }; + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%d %s", check_count, KeyStr_Item_Sel); + /* text set and timeout set */ edje_object_part_text_set(_EDJ(ad->selInfoPop_layout), "elm.text", @@ -368,7 +371,7 @@ setting_network_perferred_network_delete_mouse_up_cb(void *data, pre_list_item->data_Genitem->chk_status = 1; check_list = eina_list_next(check_list); } - check_count = ad->pref_list.NumOfPreffPlmns; + check_count = ad->pref_list.NumOfPrefPlmns; char text[MAX_DISPLAY_NAME_LEN_ON_UI]; snprintf(text, sizeof(text), "%d Items Selected", @@ -397,7 +400,7 @@ setting_network_perferred_network_delete_mouse_up_cb(void *data, check_count--; } - if (check_count < ad->pref_list.NumOfPreffPlmns) { + if (check_count < ad->pref_list.NumOfPrefPlmns) { elm_check_state_set(ad->data_cl_select_all->eo_check, 0); ad->data_cl_select_all->chk_status = 0; @@ -412,13 +415,8 @@ setting_network_perferred_network_delete_mouse_up_cb(void *data, return; } - char text[MAX_DISPLAY_NAME_LEN_ON_UI]; - if (check_count == 1) - snprintf(text, sizeof(text), "%d Item Selected", - check_count); - else - snprintf(text, sizeof(text), "%d Items Selected", - check_count); + char text[MAX_DISPLAY_NAME_LEN_ON_UI +1] = {0, }; + snprintf(text, MAX_DISPLAY_NAME_LEN_ON_UI, "%d %s", check_count, KeyStr_Item_Sel); /* text set and timeout set */ edje_object_part_text_set(_EDJ(ad->selInfoPop_layout), @@ -433,23 +431,22 @@ setting_network_preferred_network_delete_one(SettingNetworkUG *ad, { retvm_if(list_item == NULL, FALSE, "list_item parameter is NULL"); bool ret = TRUE; - int request_id = -1; int tapi_ret = TAPI_API_SUCCESS; - TelNetworkPrefferedPlmnInfo_t preff_plmn_info = { 0, }; + TelNetworkPreferredPlmnInfo_t preff_plmn_info = { 0, }; memcpy(&preff_plmn_info, - &ad->pref_list.PreffPlmnRecord[list_item->prefer_idx], - sizeof(TelNetworkPrefferedPlmnInfo_t)); + &ad->pref_list.PrefPlmnRecord[list_item->prefer_idx], + sizeof(TelNetworkPreferredPlmnInfo_t)); SETTING_TRACE_WARNING ("preff_plmn_info.network_name = %s, preff_plmn_info.Index = %d", preff_plmn_info.network_name, preff_plmn_info.Index); tapi_ret = - tel_set_network_preferred_plmn(TAPI_NETWORK_PREF_PLMN_DELETE, - &preff_plmn_info, &request_id); + tel_set_network_preferred_plmn(ad->handle, TAPI_NETWORK_PREF_PLMN_DELETE, + &preff_plmn_info, setting_tapi_set_preferred_plmn_cb, ad); if (tapi_ret != TAPI_API_SUCCESS) { SETTING_TRACE_DEBUG ("%s*** [ERR] tel_set_network_preferred_plmn(PLMN_DEL) err=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); - setting_network_popup_update(ad, _("Delete Failed"), FALSE); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Delete Failed"), NULL, POPUP_INTERVAL, FALSE, FALSE); ret = FALSE; } return ret; @@ -469,12 +466,11 @@ void setting_network_preferred_network_delete_ok(void *data) evas_object_del(ad->network_ug_pop); ad->network_ug_pop = NULL; } - setting_network_popup_create(ad, _("IDS_COM_POP_SUCCESS"), FALSE); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_SUCCESS"), NULL, POPUP_INTERVAL, FALSE, FALSE); - int request_id = -1; int tapi_ret = TAPI_API_SUCCESS; - tapi_ret = tel_get_network_preferred_plmn(&request_id); + tapi_ret = tel_get_network_preferred_plmn(ad->handle, setting_tapi_get_preferred_plmn_cb, ad); if (tapi_ret != TAPI_API_SUCCESS) { SETTING_TRACE_DEBUG ("%s*** [ERR] tel_get_network_preferred_plmn. err=%d ***%s", @@ -507,12 +503,12 @@ void setting_network_preferred_network_delete_failed(void *data) evas_object_del(ad->network_ug_pop); ad->network_ug_pop = NULL; } - setting_network_popup_create(ad, _("Failed!"), FALSE); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Failed!"), NULL, POPUP_INTERVAL, FALSE, FALSE); + - int request_id = -1; int tapi_ret = TAPI_API_SUCCESS; - tapi_ret = tel_get_network_preferred_plmn(&request_id); + tapi_ret = tel_get_network_preferred_plmn(ad->handle, setting_tapi_get_preferred_plmn_cb, ad); if (tapi_ret != TAPI_API_SUCCESS) { SETTING_TRACE_DEBUG ("%s*** [ERR] tel_get_network_preferred_plmn. err=%d ***%s", @@ -642,9 +638,9 @@ setting_network_preferred_network_delete_click_softkey_delete_cb(void *data, SettingNetworkUG *ad = (SettingNetworkUG *) data; - if (ad->pref_list.NumOfPreffPlmns == 1) { - setting_create_popup_without_title(ad, ad->win_get, - _("Do not Delete!")); + if (ad->pref_list.NumOfPrefPlmns == 1) { + setting_create_simple_popup(ad, ad->win_get, + NULL, _("Do not Delete!")); } else { int sel_count = 0; Eina_List *check_list = ad->item_check_list; @@ -664,9 +660,8 @@ setting_network_preferred_network_delete_click_softkey_delete_cb(void *data, } if (0 == sel_count) { - setting_create_popup_without_title(ad, ad->win_get, - _ - ("Please select item(s) to process!")); + setting_create_simple_popup(ad, ad->win_get, + NULL, _("Please select item(s) to process!")); return; } @@ -679,8 +674,7 @@ setting_network_preferred_network_delete_click_softkey_delete_cb(void *data, "%s %d networks?", _("IDS_COM_SK_DELETE"), sel_count); } - ad->popup = setting_create_popup_with_btn(ad, ad->win_get, notify_str, - NULL, + ad->popup = setting_create_popup_with_btn(ad, ad->win_get, NULL, notify_str, setting_preferred_network_delete_resp_cb, 0, 2, _("IDS_COM_SK_OK"),_("IDS_COM_SK_CANCEL")); } diff --git a/setting-network/src/setting-network-preferred-network-edit.c b/setting-network/src/setting-network-preferred-network-edit.c old mode 100644 new mode 100755 index 34fc70d..4b941c9 --- a/setting-network/src/setting-network-preferred-network-edit.c +++ b/setting-network/src/setting-network-preferred-network-edit.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include static int setting_network_preferred_network_edit_create(void *cb); @@ -43,9 +46,10 @@ static int setting_network_preferred_network_edit_create(void *cb) SettingNetworkUG *ad = (SettingNetworkUG *) cb; Evas_Object *scroller = NULL; + /* Evas_Object *outer_box = NULL; */ setting_push_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, _(ad-> - pref_list.PreffPlmnRecord + pref_list.PrefPlmnRecord [ad->sel_pref_idx].network_name), dgettext("sys_string", "IDS_COM_SK_CANCEL"), @@ -57,18 +61,19 @@ static int setting_network_preferred_network_edit_create(void *cb) Elm_Object_Item *item = NULL;; item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); char mcc[SETTING_NETWORK_PREFERRED_NETWORK_CODE_LEN] = { 0, }; char mnc[SETTING_NETWORK_PREFERRED_NETWORK_CODE_LEN] = { 0, }; int network_type = 0; - memcpy(&mcc, ad->pref_list.PreffPlmnRecord[ad->sel_pref_idx].Plmn, 3); - memcpy(&mnc, ad->pref_list.PreffPlmnRecord[ad->sel_pref_idx].Plmn + 3, + /* SETTING_TRACE("Plmn:%s", ad->pref_list.PrefPlmnRecord[ad->sel_pref_idx].Plmn); */ + memcpy(&mcc, ad->pref_list.PrefPlmnRecord[ad->sel_pref_idx].Plmn, 3); + memcpy(&mnc, ad->pref_list.PrefPlmnRecord[ad->sel_pref_idx].Plmn + 3, 3); - if (ad->pref_list.PreffPlmnRecord[ad->sel_pref_idx].SystemType == + if (ad->pref_list.PrefPlmnRecord[ad->sel_pref_idx].SystemType == TAPI_NETWORK_SYSTEM_GSM) { network_type = 0; } else { @@ -76,7 +81,7 @@ static int setting_network_preferred_network_edit_create(void *cb) } ad->data_edit_mcc = setting_create_Gendial_field_def(scroller, - &(ad->itc_variable_height), NULL, + &itc_1icon, NULL, NULL, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, "IDS_ST_BODY_COUNTRY_CODE", _(mcc), @@ -90,7 +95,7 @@ static int setting_network_preferred_network_edit_create(void *cb) ad->data_edit_mnc = setting_create_Gendial_field_def(scroller, - &(ad->itc_variable_height), NULL, + &itc_1icon, NULL, NULL, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, "IDS_ST_BODY_NETWORK_CODE", _(mnc), @@ -103,19 +108,19 @@ static int setting_network_preferred_network_edit_create(void *cb) } (void)setting_create_Gendial_field_titleItem(scroller, - &(ad->itc_group_item), + &itc_group_item, "IDS_ST_BODY_NETWORK_TYPE", NULL); ad->chk_edit_type = elm_radio_add(scroller); elm_radio_state_value_set(ad->chk_edit_type, -1); - setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_1icon_2), + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, setting_mouse_up_Gendial_list_radio_cb, ad->chk_edit_type, SWALLOW_Type_1RADIO, ad->chk_edit_type, 0, "IDS_ST_BODY_GSM", NULL); - setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_1icon_2), + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, setting_mouse_up_Gendial_list_radio_cb, ad->chk_edit_type, SWALLOW_Type_1RADIO, @@ -168,6 +173,7 @@ setting_network_preffered_network_edit_entry_changed_cb(void *data, Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; const char *entry_str = elm_entry_entry_get(obj); + /* SETTING_TRACE("entry_str:%s", entry_str); */ list_item->sub_desc = (char *)g_strdup(entry_str); } @@ -181,9 +187,8 @@ setting_network_preffered_network_edit_click_softkey_save_cb(void *data, "[Setting > Network > Preferred Net] Data parameter for setting_network_preffered_network_edit_click_softkey_save_cb is NULL"); SettingNetworkUG *ad = (SettingNetworkUG *) data; - int request_id = -1; int tapi_ret = TAPI_API_SUCCESS; - TelNetworkPrefferedPlmnInfo_t pref_plmn_info = { 0, }; + TelNetworkPreferredPlmnInfo_t pref_plmn_info = { 0, }; int network_type = 0; const char *mcc = NULL; @@ -204,29 +209,29 @@ setting_network_preffered_network_edit_click_softkey_save_cb(void *data, if (COUNTRY_CODE_LEN != mcc_len) { if ((NETWORK_CODE_LEN < mnc_len) || (mnc_len <= 0)) { setting_create_popup_without_btn(ad, ad->win_get, - _("please input country code made up of 3 digital number and network code made up of 1 ~ 3 digital number"), - NULL, NULL, POPUP_INTERVAL); + NULL, _("please input country code made up of 3 digital number and network code made up of 1 ~ 3 digital number"), + NULL, POPUP_INTERVAL, FALSE, FALSE); } else { setting_create_popup_without_btn(ad, ad->win_get, - _("please input country code made up of 3 digital number"), - NULL, NULL, POPUP_INTERVAL); + NULL, _("please input country code made up of 3 digital number"), + NULL, POPUP_INTERVAL, FALSE, FALSE); } return; } if ((NETWORK_CODE_LEN < mnc_len) || (mnc_len <= 0)) { setting_create_popup_without_btn(ad, ad->win_get, - _("please input network code made up of 1 ~ 3 digital number"), - NULL, NULL, POPUP_INTERVAL); + NULL, _("please input network code made up of 1 ~ 3 digital number"), + NULL, POPUP_INTERVAL, FALSE, FALSE); return; } network_type = elm_radio_value_get(ad->chk_edit_type); - memset(&pref_plmn_info, 0x00, sizeof(TelNetworkPrefferedPlmnInfo_t)); + memset(&pref_plmn_info, 0x00, sizeof(TelNetworkPreferredPlmnInfo_t)); memcpy(&pref_plmn_info, - &ad->pref_list.PreffPlmnRecord[ad->sel_pref_idx], - sizeof(TelNetworkPrefferedPlmnInfo_t)); + &ad->pref_list.PrefPlmnRecord[ad->sel_pref_idx], + sizeof(TelNetworkPreferredPlmnInfo_t)); safeCopyStr((char *)pref_plmn_info.Plmn, mcc, 3); safeCopyStr((char *)pref_plmn_info.Plmn + 3, mnc, 3); @@ -237,16 +242,18 @@ setting_network_preffered_network_edit_click_softkey_save_cb(void *data, } else { pref_plmn_info.SystemType = TAPI_NETWORK_SYSTEM_UMTS; } - setting_network_popup_create(ad, _("IDS_ST_POP_SAVING"), TRUE); + ad->network_ug_pop = + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_ST_POP_SAVING"), + NULL, 0.0, TRUE, TRUE); tapi_ret = - tel_set_network_preferred_plmn(TAPI_NETWORK_PREF_PLMN_EDIT, - &pref_plmn_info, &request_id); - if (tapi_ret != TAPI_API_SUCCESS || request_id < 0) { + tel_set_network_preferred_plmn(ad->handle, TAPI_NETWORK_PREF_PLMN_EDIT, + &pref_plmn_info, setting_tapi_set_preferred_plmn_cb, ad); + if (tapi_ret != TAPI_API_SUCCESS) { SETTING_TRACE_DEBUG ("%s*** [ERR] tel_set_network_preferred_plmn(PLMN_EDIT) err=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); - setting_network_popup_update(ad, _("Save Failed!"), FALSE); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Save Failed!"), NULL, POPUP_INTERVAL, FALSE, FALSE); } ad->op_type = SETTING_NETWORK_PREFERRED_NETWORK_EDIT; diff --git a/setting-network/src/setting-network-preferred-network-list.c b/setting-network/src/setting-network-preferred-network-list.c old mode 100644 new mode 100755 index fee810d..84819b5 --- a/setting-network/src/setting-network-preferred-network-list.c +++ b/setting-network/src/setting-network-preferred-network-list.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include static int setting_network_preferred_network_list_create(void *cb); @@ -70,6 +73,8 @@ static char *gl_network_genlist_text_get(void *data, Evas_Object *obj, struct gl_network_data *sel_mem = (struct gl_network_data *)data; if (safeStrCmp(part, "elm.text") == 0) { + /* strcpy(buf, data); */ + /* sprintf(buf, "%s", sel_mem->name); */ snprintf(buf, sizeof(buf), "%s", sel_mem->name); return strdup(buf); } else { @@ -121,6 +126,7 @@ static void gl_network_genlist_select(void *data, Evas_Object *obj, ad->cur_sel_index = ad->cur_sel_mem->index; elm_radio_value_set(__gl_network_radio_group, ad->cur_sel_index); + /* SETTING_TRACE_WARNING("******sel_mem->index = %d, elm_radio_value_get = %d", ad->cur_sel_index, elm_radio_value_get(__gl_network_radio_group)); */ return; } @@ -192,11 +198,14 @@ static Eina_Bool __genlist_update(void *data) gl_network_data)); setting_retvm_if(!one_item, FALSE, "calloc failed"); one_item->index = i; + /* one_item->name = __get_preferred_network_list_item_name(network_table[i]); */ __get_preferred_network_list_item_name(one_item->name, network_table[i]); if ('\0' == ad->search_text[0] || (one_item->name && is_substr_ncase(one_item->name, ad->search_text))) { /* is substring */ + /* SETTING_TRACE("Adding item[%s]", one_item->name); */ + /* SETTING_TRACE("ad->gl_network:%p", ad->gl_network); */ gl_item = elm_genlist_item_append(ad->gl_network, &ad->itc, one_item, NULL, @@ -228,30 +237,46 @@ static void __searchbar_changed_cb(void *data, Evas_Object *obj, } const char *str = elm_object_text_get(obj); + /* SETTING_TRACE("the string in searchbar:%s, len(str):%d", str, strlen(str)); */ + /* SETTING_TRACE("ad->search_text: %s", ad->search_text); */ + if (str == NULL) { SETTING_TRACE_ERROR("Searchbar text is NULL!"); return; } + /* if(!safeStrCmp(str, dgettext("sys_string", "IDS_COM_SK_SEARCH"))) return; */ if (!safeStrCmp(str, ad->search_text)) { return; } + /* Evas_Object *entry = elm_searchbar_entry_get(ad->nw_search_bar); */ if (strlen(str) > MAX_SEARCH_STR_LEN) { /* the content of entry won't change if enter too many characters */ elm_object_text_set(obj, ad->search_text); /* elm_entry_cursor_end_set(entry); */ /* if input too long, show popup */ - setting_network_popup_create(ad, _("Input too long!"), FALSE); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Input too long!"), NULL, POPUP_INTERVAL, FALSE, FALSE); + return; } memset(ad->search_text, '\0', MAX_SEARCH_STR_LEN + 1); safeCopyStr(ad->search_text, str, MAX_SEARCH_STR_LEN); + /* SETTING_TRACE("ad->search_text:%s", ad->search_text); */ + /* if(safeStrCmp(ad->search_text, dgettext("sys_string", "IDS_COM_SK_SEARCH"))) */ + /* { */ SETTING_TRACE("Update the search view text, search_text=%s", ad->search_text); + if (ad->add_view_timer) { + /* ecore_idler_del(ad->add_view_timer); */ + /* ad->add_view_timer = NULL; */ + } + ad->add_view_timer = ecore_idler_add(__genlist_update, ad); + /* } */ + } static void __searchbar_cancel_clicked_cb(void *data, Evas_Object *obj, @@ -260,11 +285,17 @@ static void __searchbar_cancel_clicked_cb(void *data, Evas_Object *obj, SETTING_TRACE_BEGIN; SettingNetworkUG *ad = (SettingNetworkUG *) data; + /* memset(ad->search_text, '\0', MAX_SEARCH_STR_LEN + 1); */ + /* safeCopyStr(ad->search_text, dgettext("sys_string", "IDS_COM_SK_SEARCH"), MAX_SEARCH_STR_LEN); */ + /* elm_searchbar_text_set(ad->nw_search_bar, dgettext("sys_string", "IDS_COM_SK_SEARCH")); */ + Evas_Object *entry = elm_object_part_content_get(ad->nw_search_bar, "elm.swallow.content"); - Ecore_IMF_Context *imf_context = (Ecore_IMF_Context *)elm_entry_imf_context_get(entry); + Ecore_IMF_Context *imf_context = (Ecore_IMF_Context*)elm_entry_imf_context_get(entry); if (imf_context) { ecore_imf_context_input_panel_hide(imf_context); } + /* ad->add_view_timer = ecore_idler_add(__genlist_update, ad); */ + } static void __searchbar_focused_cb(void *data, Evas_Object *obj, @@ -349,6 +380,7 @@ static int setting_network_preferred_network_list_create(void *cb) ad->itc.func.del = gl_network_genlist_delete; ad->gl_network = gl_network = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(ad->gl_network, "dialogue"); elm_genlist_clear(gl_network); evas_object_show(gl_network); @@ -397,6 +429,12 @@ static int setting_network_preferred_network_list_update(void *cb) /* error check */ retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + /* SettingNetworkUG *ad = (SettingNetworkUG*)cb; */ + + /* change background style */ + /* if (ad->bg) */ + /* elm_object_style_set(ad->bg, "list"); */ + return SETTING_RETURN_SUCCESS; } @@ -445,10 +483,9 @@ setting_network_preferred_network_list_click_softkey_add(void *data, SettingNetworkUG *ad = (SettingNetworkUG *) data; - int request_id = -1; int sel = 0; int tapi_ret = TAPI_API_SUCCESS; - TelNetworkPrefferedPlmnInfo_t pref_plmn_info = { 0, }; + TelNetworkPreferredPlmnInfo_t pref_plmn_info = { 0, }; /* sel = ad->cur_sel_index; */ sel = elm_radio_value_get(__gl_network_radio_group); @@ -457,12 +494,13 @@ setting_network_preferred_network_list_click_softkey_add(void *data, sel); if (sel < 0) { - setting_network_popup_create(ad, - _("Please select item(s) to process!"), - FALSE); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Please select item(s) to process!"), NULL, POPUP_INTERVAL, FALSE, FALSE); + return; } + /* sprintf((char *)pref_plmn_info.Plmn, "%d", network_table[sel].mcc); */ + /* sprintf((char *)pref_plmn_info.Plmn+3, "%d", network_table[sel].mnc); */ int ret = 0; ret = snprintf((char *)pref_plmn_info.Plmn, MAX_PLMN_LEN / 2, "%d", network_table[sel].mcc); @@ -491,22 +529,24 @@ setting_network_preferred_network_list_click_softkey_add(void *data, } pref_plmn_info.Index = - ad->pref_list.PreffPlmnRecord[ad->pref_list.NumOfPreffPlmns - + ad->pref_list.PrefPlmnRecord[ad->pref_list.NumOfPrefPlmns - 1].Index + 1; - setting_network_popup_create(ad, _("IDS_ST_POP_SAVING"), TRUE); + ad->network_ug_pop = + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_ST_POP_SAVING"), + NULL, 0.0, TRUE, TRUE); SETTING_TRACE_DEBUG("%s*** plmn=%s, index=%d ***%s", SETTING_FONT_BGREEN, pref_plmn_info.Plmn, (int)(pref_plmn_info.Index), SETTING_FONT_BLACK); tapi_ret = - tel_set_network_preferred_plmn(TAPI_NETWORK_PREF_PLMN_ADD, - &pref_plmn_info, &request_id); + tel_set_network_preferred_plmn(ad->handle, TAPI_NETWORK_PREF_PLMN_ADD, + &pref_plmn_info, setting_tapi_set_preferred_plmn_cb, ad); if (tapi_ret != TAPI_API_SUCCESS) { SETTING_TRACE_DEBUG ("%s*** [ERR] tel_set_network_preferred_plmn(PLMN_ADD) err=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); - setting_network_popup_update(ad, _("Save Failed!"), FALSE); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Save Failed!"), NULL, POPUP_INTERVAL, FALSE, FALSE); } ad->op_type = SETTING_NETWORK_PREFERRED_NETWORK_LIST; diff --git a/setting-network/src/setting-network-preferred-network-new.c b/setting-network/src/setting-network-preferred-network-new.c old mode 100644 new mode 100755 index 6447cc5..39bc520 --- a/setting-network/src/setting-network-preferred-network-new.c +++ b/setting-network/src/setting-network-preferred-network-new.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #include @@ -55,13 +58,13 @@ static int setting_network_preferred_network_new_create(void *cb) Elm_Object_Item *item = NULL;; item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); ad->data_new_mcc = setting_create_Gendial_field_def(scroller, - &(ad->itc_variable_height), NULL, + &itc_1icon, NULL, NULL, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, "IDS_ST_BODY_COUNTRY_CODE", @@ -76,7 +79,7 @@ static int setting_network_preferred_network_new_create(void *cb) ad->data_new_mnc = setting_create_Gendial_field_def(scroller, - &(ad->itc_variable_height), NULL, + &itc_1icon, NULL, NULL, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, "IDS_ST_BODY_NETWORK_CODE", @@ -90,19 +93,19 @@ static int setting_network_preferred_network_new_create(void *cb) } (void)setting_create_Gendial_field_titleItem(scroller, - &(ad->itc_group_item), + &itc_group_item, "IDS_ST_BODY_NETWORK_TYPE", NULL); ad->chk_new_type = elm_radio_add(scroller); elm_radio_state_value_set(ad->chk_new_type, 0); - setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_1icon_2), + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, setting_mouse_up_Gendial_list_radio_cb, ad->chk_new_type, SWALLOW_Type_1RADIO, ad->chk_new_type, 0, "IDS_ST_BODY_GSM", NULL); - setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_1icon_2), + setting_create_Gendial_field_1radio(scroller, &itc_1text_1icon_2, setting_mouse_up_Gendial_list_radio_cb, ad->chk_new_type, SWALLOW_Type_1RADIO, @@ -152,7 +155,9 @@ setting_network_preferred_network_new_entry_changed_cb(void *data, retm_if(data == NULL, "Data parameter is NULL"); Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + /* SettingNetworkUG *ad = list_item->userdata; */ const char *entry_str = elm_entry_entry_get(obj); + /* SETTING_TRACE("entry_str:%s", entry_str); */ list_item->sub_desc = (char *)g_strdup(entry_str); } @@ -168,10 +173,9 @@ setting_network_preffered_network_new_click_softkey_save_cb(void *data, SettingNetworkUG *ad = (SettingNetworkUG *) data; - int request_id = -1; int tapi_ret = TAPI_API_SUCCESS; - TelNetworkPrefferedPlmnInfo_t pref_plmn_info = { 0, }; + TelNetworkPreferredPlmnInfo_t pref_plmn_info = { 0, }; int network_type = 0; const char *mcc = NULL; @@ -191,20 +195,20 @@ setting_network_preffered_network_new_click_softkey_save_cb(void *data, if (COUNTRY_CODE_LEN != mcc_len) { if ((NETWORK_CODE_LEN < mnc_len) || (mnc_len <= 0)) { setting_create_popup_without_btn(ad, ad->win_get, - _("please input country code made up of 3 digital number and network code made up of 1 ~ 3 digital number"), - NULL, NULL, POPUP_INTERVAL); + NULL, _("please input country code made up of 3 digital number and network code made up of 1 ~ 3 digital number"), + NULL, POPUP_INTERVAL, FALSE, FALSE); } else { setting_create_popup_without_btn(ad, ad->win_get, - _("please input country code made up of 3 digital number"), - NULL, NULL, POPUP_INTERVAL); + NULL, _("please input country code made up of 3 digital number"), + NULL, POPUP_INTERVAL, FALSE, FALSE); } return; } if ((NETWORK_CODE_LEN < mnc_len) || (mnc_len <= 0)) { setting_create_popup_without_btn(ad, ad->win_get, - _("please input network code made up of 1 ~ 3 digital number"), - NULL, NULL, POPUP_INTERVAL); + NULL, _("please input network code made up of 1 ~ 3 digital number"), + NULL, POPUP_INTERVAL, FALSE, FALSE); return; } @@ -226,18 +230,20 @@ setting_network_preffered_network_new_click_softkey_save_cb(void *data, } pref_plmn_info.Index = - ad->pref_list.PreffPlmnRecord[ad->pref_list.NumOfPreffPlmns - + ad->pref_list.PrefPlmnRecord[ad->pref_list.NumOfPrefPlmns - 1].Index + 1; - setting_network_popup_create(ad, _("IDS_ST_POP_SAVING"), TRUE); + ad->network_ug_pop = + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_ST_POP_SAVING"), + NULL, 0.0, TRUE, TRUE); tapi_ret = - tel_set_network_preferred_plmn(TAPI_NETWORK_PREF_PLMN_ADD, - &pref_plmn_info, &request_id); + tel_set_network_preferred_plmn(ad->handle, TAPI_NETWORK_PREF_PLMN_ADD, + &pref_plmn_info, setting_tapi_set_preferred_plmn_cb, ad); if (tapi_ret != TAPI_API_SUCCESS) { SETTING_TRACE_DEBUG ("%s*** [ERR] tel_set_network_preferred_plmn(PLMN_ADD) err=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); - setting_network_popup_update(ad, _("Save Failed!"), FALSE); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("Save Failed!"), NULL, POPUP_INTERVAL, FALSE, FALSE); } ad->op_type = SETTING_NETWORK_PREFERRED_NETWORK_NEW; diff --git a/setting-network/src/setting-network-preferred-network.c b/setting-network/src/setting-network-preferred-network.c old mode 100644 new mode 100755 index 1d3323e..5115ac9 --- a/setting-network/src/setting-network-preferred-network.c +++ b/setting-network/src/setting-network-preferred-network.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include static int setting_network_preferred_network_create(void *cb); @@ -77,11 +80,10 @@ static int setting_network_preferred_network_create(void *cb) retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); SettingNetworkUG *ad = (SettingNetworkUG *) cb; - int request_id = -1; int tapi_ret = TAPI_API_SUCCESS; bool keep = TRUE; - tapi_ret = tel_get_network_preferred_plmn(&request_id); + tapi_ret = tel_get_network_preferred_plmn(ad->handle, setting_tapi_get_preferred_plmn_cb, ad); if (tapi_ret != TAPI_API_SUCCESS) { SETTING_TRACE_DEBUG ("%s*** [ERR] tel_get_network_preferred_plmn. err=%d ***%s", @@ -90,6 +92,7 @@ static int setting_network_preferred_network_create(void *cb) } ad->scl_pref = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(ad->scl_pref , "dialogue"); retvm_if(ad->scl_pref == NULL, SETTING_RETURN_FAIL, "Cannot set scroller object as contento of layout"); elm_genlist_clear(ad->scl_pref); /* first to clear list */ @@ -104,7 +107,10 @@ static int setting_network_preferred_network_create(void *cb) /* create preffered network list */ setting_network_preferred_network_draw_network_list(ad); - setting_network_popup_create(ad, _("IDS_COM_POP_SEARCHING"), keep); + /* ad->pop_pref_sch = setting_network_preferred_network_create_search_popup(ad); */ + ad->network_ug_pop = + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_SEARCHING"), + NULL, 0.0, TRUE, TRUE); setting_view_network_preferred_network.is_create = 1; @@ -168,13 +174,13 @@ static int setting_network_preferred_network_draw_network_list(void *data) int i = 0; elm_genlist_clear(ad->scl_pref); /* first to clear list */ - for (i = 0; i < ad->pref_list.NumOfPreffPlmns; i++) { - setting_create_Gendial_field_def(ad->scl_pref, &(ad->itc_1text), + for (i = 0; i < ad->pref_list.NumOfPrefPlmns; i++) { + setting_create_Gendial_field_def(ad->scl_pref, &itc_1text, setting_network_preferred_network_Gendial_list_item_mouse_up_cb, ad, SWALLOW_Type_INVALID, NULL, NULL, 0, ad-> - pref_list.PreffPlmnRecord + pref_list.PrefPlmnRecord [i].network_name, NULL, NULL); } @@ -206,16 +212,16 @@ setting_network_preferred_network_Gendial_list_item_mouse_up_cb(void *data, SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); int i; - for (i = 0; i < ad->pref_list.NumOfPreffPlmns; i++) { + for (i = 0; i < ad->pref_list.NumOfPrefPlmns; i++) { if (!safeStrCmp - (ad->pref_list.PreffPlmnRecord[i].network_name, + (ad->pref_list.PrefPlmnRecord[i].network_name, list_item->keyStr)) { break; } } SETTING_TRACE("i:%d", i); - ad->sel_pref_idx = ad->pref_list.PreffPlmnRecord[i].Index; + ad->sel_pref_idx = ad->pref_list.PrefPlmnRecord[i].Index; setting_view_change(&setting_view_network_preferred_network, &setting_view_network_preferred_network_edit, ad); } @@ -281,6 +287,7 @@ setting_network_preferred_network_click_softkey_add_cb(void *data, SettingNetworkUG *ad = (SettingNetworkUG *) data; ad->popup = elm_ctxpopup_add(ad->navi_bar); + /* evas_object_smart_callback_add(ad->popup, "hide", _ctxpopup_cb, ad->popup); */ elm_ctxpopup_item_append(ad->popup, _("IDS_ST_BODY_NETWORK_LIST"), NULL, setting_network_preferred_network_click_ctxpopup_menu_1_cb, @@ -311,9 +318,9 @@ setting_network_preferred_network_click_softkey_delete_cb(void *data, SettingNetworkUG *ad = (SettingNetworkUG *) data; - if (ad->pref_list.NumOfPreffPlmns == 0) { - setting_create_popup_without_title(ad, ad->win_get, - _("No Network to delete!")); + if (ad->pref_list.NumOfPrefPlmns == 0) { + setting_create_simple_popup(ad, ad->win_get, + NULL, _("No Network to delete!")); } else { setting_view_change(&setting_view_network_preferred_network, &setting_view_network_preferred_network_delete, diff --git a/setting-network/src/setting-network-select-network.c b/setting-network/src/setting-network-select-network.c index 40bc0ff..4ffd0dc 100755 --- a/setting-network/src/setting-network-select-network.c +++ b/setting-network/src/setting-network-select-network.c @@ -1,19 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include static int setting_network_select_network_create(void *cb); @@ -48,124 +52,113 @@ static int setting_network_select_network_create(void *cb) setting_network_select_network_click_softkey_cancel_cb, NULL, ad, &ad->genlist_sel_network, ad->navi_bar); - - Elm_Object_Item *item = elm_genlist_item_append(ad->genlist_sel_network, - &(ad->itc_seperator), NULL, NULL, + + Elm_Object_Item *item = elm_genlist_item_append(ad->genlist_sel_network, + &(itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); /* scroller is a genlist */ ad->chk_sel = elm_radio_add(ad->genlist_sel_network); elm_radio_state_value_set(ad->chk_sel, -1); + vconf_get_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, &ad->sel_net);//retrieve here + SETTING_TRACE("ad->sel_net:%d", ad->sel_net); + + vconf_get_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, &ad->sel_act);//retrieve here + SETTING_TRACE("ad->sel_act:%d", ad->sel_act); - const char *pa_sel_net_name = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); - SETTING_TRACE("pa_sel_net_name:%s", pa_sel_net_name); - if (NULL == pa_sel_net_name) { - pa_sel_net_name = strndup("IDS_ST_BODY_NOSERVICE", strlen("IDS_ST_BODY_NOSERVICE")+1); - } - - int tapi_ret; - int request_id = 0; - //searching list - tapi_ret = tel_search_network(&request_id); //ASYNC API - TAPI_EVENT_NETWORK_SEARCH_CNF - if(tapi_ret != TAPI_API_SUCCESS) { // error handling.. - SETTING_TRACE_DEBUG("%s*** [ERR] tel_search_network. tapi_ret=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); - setting_network_popup_create(ad, _(STR_SETTING_OPERATION_FAILED), FALSE); - // put error handler on the end of this function. - goto err_handle; + FREE(ad->sel_network); + ad->sel_network = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); + SETTING_TRACE("pa_sel_net_name:%s", ad->sel_network); + if (NULL == ad->sel_network) { + ad->sel_network = strndup("IDS_ST_BODY_NOSERVICE", strlen("IDS_ST_BODY_NOSERVICE")+1); } - ad->b_searching_network = TRUE; if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net) { ad->data_auto_network_item = setting_create_Gendial_field_1radio( - ad->genlist_sel_network, - &(ad->itc_2text_2icon_3), + ad->genlist_sel_network, + &(itc_2text_1icon_6), setting_network_Gendial_select_plmn_cb, - ad, SWALLOW_Type_1RADIO, - ad->chk_sel, - TAPI_NETWORK_SELECTIONMODE_AUTOMATIC, - "IDS_COM_BODY_AUTOMATIC", + ad, SWALLOW_Type_1TOGGLE, + NULL, TRUE, + "IDS_COM_BODY_AUTOMATIC", setting_network_select_network_chk_changed); - setting_retvm_if(NULL == ad->data_auto_network_item, + setting_retvm_if(NULL == ad->data_auto_network_item, SETTING_RETURN_FAIL, "Failed to calloc memory"); - ad->data_auto_network_item->sub_desc = (char *)g_strdup(pa_sel_net_name); + ad->data_auto_network_item->sub_desc = (char *)g_strdup(ad->sel_network); ad->data_auto_network_item->userdata = ad; - ad->data_selected_network_item = ad->data_auto_network_item; - - ad->data_search_network_item = setting_create_Gendial_field_1radio( - ad->genlist_sel_network, - &(ad->itc_1text_2icon), - NULL, NULL, - SWALLOW_Type_0RADIO_1SEARCH, - ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL+1, - NULL, - NULL); - - elm_radio_value_set(ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_AUTOMATIC); + } else if(TAPI_NETWORK_SELECTIONMODE_MANUAL == ad->sel_net) { + int tapi_ret; + //searching list + tapi_ret = tel_search_network(ad->handle, setting_tapi_search_network_cb, ad); //ASYNC API - TAPI_EVENT_NETWORK_SEARCH_CNF + if(tapi_ret != TAPI_API_SUCCESS) { // error handling.. + SETTING_TRACE_DEBUG("%s*** [ERR] tel_search_network. tapi_ret=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(STR_SETTING_OPERATION_FAILED), NULL, POPUP_INTERVAL, FALSE, FALSE); + // put error handler on the end of this function. + goto err_handle; + } + ad->b_searching_network = TRUE; + ad->data_auto_network_item = setting_create_Gendial_field_1radio( - ad->genlist_sel_network, - &(ad->itc_1text_2icon), + ad->genlist_sel_network, + &(itc_2text_1icon_7), setting_network_Gendial_select_plmn_cb, - ad, SWALLOW_Type_1RADIO, - ad->chk_sel, - TAPI_NETWORK_SELECTIONMODE_AUTOMATIC, - "IDS_COM_BODY_AUTOMATIC", + ad, SWALLOW_Type_1TOGGLE, + NULL, FALSE, "IDS_COM_BODY_AUTOMATIC", setting_network_select_network_chk_changed); - setting_retvm_if(NULL == ad->data_auto_network_item, + setting_retvm_if(NULL == ad->data_auto_network_item, SETTING_RETURN_FAIL, "Failed to calloc memory"); - + ad->data_auto_network_item->sub_desc = (char *)g_strdup(ad->sel_network);//just a simple display ad->data_auto_network_item->userdata = ad; - if (0 != safeStrCmp("IDS_ST_BODY_NOSERVICE", pa_sel_net_name)) + if (0 != safeStrCmp("IDS_ST_BODY_NOSERVICE", ad->sel_network) + && 0 != safeStrCmp("EMERGENCY", ad->sel_network)) { //normal case: - ad->data_selected_network_item = setting_create_Gendial_field_1radio( - ad->genlist_sel_network, - &(ad->itc_1text_2icon), + Setting_GenGroupItem_Data *item_Data = NULL; + + char sel_network_desc[MAX_COMMON_BUFFER_LEN] = { 0, }; + snprintf(sel_network_desc, MAX_COMMON_BUFFER_LEN, "%s (%s)", + _(ad->sel_network),setting_network_get_act_str(ad->sel_act)); + + item_Data = setting_create_Gendial_field_1radio( + ad->genlist_sel_network, + &itc_1text_2icon_2, setting_network_Gendial_select_plmn_cb, ad, SWALLOW_Type_1RADIO, ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL, - pa_sel_net_name, + sel_network_desc, setting_network_select_network_chk_changed); - setting_retvm_if(NULL == ad->data_selected_network_item, - SETTING_RETURN_FAIL, "Failed to calloc memory"); - ad->data_selected_network_item->userdata = ad; - + setting_retvm_if(NULL == item_Data, SETTING_RETURN_FAIL, "Failed to calloc memory"); + item_Data->userdata = ad; + ad->data_search_network_item = setting_create_Gendial_field_1radio( - ad->genlist_sel_network, - &(ad->itc_1text_2icon), + ad->genlist_sel_network, + &itc_1text_2icon_2, NULL, NULL, - SWALLOW_Type_0RADIO_1SEARCH, - ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL+1, - NULL, - NULL); - + SWALLOW_Type_1RADIO_1SEARCH, + ad->chk_sel, -1, NULL, NULL); + elm_radio_value_set(ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL); } else { //no service case: - ad->data_selected_network_item = ad->data_auto_network_item; ad->data_search_network_item = setting_create_Gendial_field_1radio( - ad->genlist_sel_network, - &(ad->itc_1text_2icon), + ad->genlist_sel_network, + &itc_1text_2icon_2, NULL, NULL, - SWALLOW_Type_0RADIO_1SEARCH, - ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL, - NULL, - NULL); + SWALLOW_Type_1RADIO_1SEARCH, + ad->chk_sel, -1, NULL, NULL); - elm_radio_value_set(ad->chk_sel, TAPI_NETWORK_SELECTIONMODE_MANUAL); } } - - FREE(pa_sel_net_name); + setting_view_network_select_network.is_create = TRUE; return SETTING_RETURN_SUCCESS; err_handle: - FREE(pa_sel_net_name); setting_view_network_select_network.is_create = TRUE; return SETTING_RETURN_FAIL; } @@ -180,10 +173,9 @@ static int setting_network_select_network_destroy(void *cb) //cancel the searching operation if (ad->b_searching_network) { int tapi_ret; - int request_id = 0; - tapi_ret = tel_cancel_network_manual_search(&request_id); + tapi_ret = tel_cancel_network_manual_search(ad->handle, setting_tapi_cancel_manual_search_cb, ad); if (tapi_ret != TAPI_API_SUCCESS) { - SETTING_TRACE_ERROR("*** [ERR] tel_search_network. "\ + SETTING_TRACE_ERROR("*** [ERR] tel_cancel_network_manual_search. "\ "tapi_ret=%d ***", tapi_ret); } ad->b_searching_network = FALSE; @@ -192,15 +184,28 @@ static int setting_network_select_network_destroy(void *cb) if (0 != vconf_get_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, &ad->sel_net)) { SETTING_TRACE_ERROR("vconf get failed"); } + + if (0 != vconf_get_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, &ad->sel_act)) { + SETTING_TRACE_ERROR("vconf get failed"); + } + + FREE(ad->sel_network); + ad->sel_network = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); + if (NULL == ad->sel_network) { + ad->sel_network = strndup("IDS_ST_BODY_NOSERVICE", strlen("IDS_ST_BODY_NOSERVICE")+1); + } + /*reset..*/ ad->b_set_manul_network = FALSE; ad->b_set_auto_network = FALSE; + setting_network_update_sel_network(ad); elm_naviframe_item_pop(ad->navi_bar); //Following handlers will be used by async listening callback. They must be reset after genlist is 'popuped'. ad->data_auto_network_item = NULL; //data_sel_net was created in main view, it won't be destoryed. + //ad->data_sel_net = NULL; setting_view_network_select_network.is_create = FALSE; return SETTING_RETURN_SUCCESS; @@ -211,6 +216,10 @@ static int setting_network_select_network_update(void *cb) SETTING_TRACE_BEGIN; /* error check */ retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + //SettingNetworkUG *ad = (SettingNetworkUG *) cb; + //elm_radio_value_set(ad->chk_sel, ad->sel_net); + return SETTING_RETURN_SUCCESS; } diff --git a/setting-network/src/setting-network.c b/setting-network/src/setting-network.c old mode 100644 new mode 100755 index fa3630c..c54cd99 --- a/setting-network/src/setting-network.c +++ b/setting-network/src/setting-network.c @@ -1,23 +1,27 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #include #include +#include #ifndef UG_MODULE_API #define UG_MODULE_API __attribute__ ((visibility("default"))) @@ -36,39 +40,17 @@ static void __selected_network_change_cb(keynode_t *key, void *data) if (NULL == value) { value = "IDS_ST_BODY_NOSERVICE"; } - SETTING_TRACE("value:%s", value); + ad->sel_network = strdup(value); - if (ad->data_auto_network_item) { - if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net) - { - elm_genlist_item_item_class_update( - ad->data_auto_network_item->item, - &ad->itc_2text_2icon_3); - - ad->data_auto_network_item->sub_desc = - (char *)g_strdup(_(value)); - elm_object_item_data_set( ad->data_auto_network_item->item, ad->data_auto_network_item); - elm_genlist_item_update( ad->data_auto_network_item->item); - } + if (0 != vconf_set_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, ad->sel_net)) { + SETTING_TRACE_ERROR("vconf[%s] set failed"); } - char sub_desc[MAX_COMMON_BUFFER_LEN] = { 0, }; - if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net) { - snprintf(sub_desc, MAX_COMMON_BUFFER_LEN, - "%s. %s", _("IDS_COM_BODY_AUTOMATIC"), - _(value)); - - } else { - snprintf(sub_desc, MAX_COMMON_BUFFER_LEN, - "%s. %s", _("IDS_COM_BODY_MANUAL"), - _(value)); - } - if (ad->data_sel_net && !isEmptyStr(sub_desc)) { - ad->data_sel_net->sub_desc = - (char *)g_strdup(sub_desc); - elm_object_item_data_set(ad->data_sel_net->item, ad->data_sel_net); - elm_genlist_item_update(ad->data_sel_net->item); + + if (0 != vconf_set_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, ad->sel_act)) { + SETTING_TRACE_ERROR("vconf[%s] set failed"); } + setting_network_update_sel_network(ad); } } @@ -82,18 +64,34 @@ static void setting_network_ug_cb_resize(void *data, Evas *e, void __network_evt_cb(net_event_info_t *event_cb, void *data) { +} + +#ifdef SUPPORT_MDM +static void __mdm_policy_roaming_sync_receiver_cb(int result, void *p_user_data) +{ SETTING_TRACE_BEGIN; - ret_if(!event_cb || !data); + ret_if(p_user_data == NULL); + mdm_status_t policy_status = (mdm_status_t)result; + SettingNetworkUG *ad = (SettingNetworkUG*)p_user_data; - SETTING_TRACE("event_cb->Event:%d", event_cb->Event); - SETTING_TRACE("event_cb->ProfileName:%s", event_cb->ProfileName); - SETTING_TRACE("event_cb->Error:%d", event_cb->Error); + if(policy_status == MDM_ALLOWED) + { + setting_enable_genlist_item(ad->data_roaming->item); + } + else if(policy_status == MDM_RESTRICTED) + { + setting_disable_genlist_item(ad->data_roaming->item); + setting_create_popup_without_btn(ad, ad->ly_main, NULL, MDM_POLICY_DATA_ROAMING_RESTRICTED_STR, + NULL, + POPUP_INTERVAL, FALSE, FALSE); + } } -static void *setting_network_ug_on_create(struct ui_gadget *ug, - enum ug_mode mode, bundle *data, +#endif +static void *setting_network_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, void *priv) { - setting_retvm_if((!ug || !priv), NULL, "!ug || !priv"); + setting_retvm_if((!priv), NULL, "!priv"); SettingNetworkUG *networkUG = priv; networkUG->ug = ug; @@ -110,11 +108,24 @@ static void *setting_network_ug_on_create(struct ui_gadget *ug, /* init */ ecore_imf_init(); - /* subscribe tapi events */ - if (setting_network_subscribe_tapi_events(networkUG) != SETTING_RETURN_SUCCESS) { - SETTING_TRACE_DEBUG - ("%s*** [ERR] setting_network_subscribe_tapi_events. ***%s", - SETTING_FONT_RED, SETTING_FONT_BLACK); +#ifdef SUPPORT_MDM + networkUG->mdm_server_state = mdm_get_service(); + SETTING_TRACE("mdm server status: %d", networkUG->mdm_server_state); + + if(networkUG->mdm_server_state == MDM_RESULT_SUCCESS) + { + networkUG->mdm_handle = mdm_register_policy_receiver(MDM_POLICY_ON_ROAMING_SYNC, networkUG, __mdm_policy_roaming_sync_receiver_cb); + if(networkUG->mdm_handle == -1) + SETTING_TRACE_DEBUG("[ERR] failed to register mdm policy receiver"); + } +#endif + + //pass NULL to let TAPI access default module + networkUG->handle = tel_init(NULL); + if (!networkUG->handle) { + SETTING_TRACE_DEBUG("%s*** [ERR] tel_init. ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + //return NULL; } int err_code = -1; @@ -132,9 +143,9 @@ static void *setting_network_ug_on_create(struct ui_gadget *ug, &setting_view_network_main); setting_view_node_table_register(&setting_view_network_main_help, &setting_view_network_main); - setting_view_node_table_register - (&setting_view_network_connection_create, - &setting_view_network_main); + + setting_view_node_table_register(&setting_view_network_con, &setting_view_network_main); + setting_view_node_table_register(&setting_view_network_connection_create, &setting_view_network_con); setting_view_node_table_register(&setting_view_network_3gcon, &setting_view_network_main); @@ -154,37 +165,17 @@ static void *setting_network_ug_on_create(struct ui_gadget *ug, (&setting_view_network_preferred_network_delete, &setting_view_network_preferred_network); - setting_create_Gendial_itc("dialogue/1text.1icon.2", - &(networkUG->itc_1text_1icon_2)); - setting_create_Gendial_itc("dialogue/1text", &(networkUG->itc_1text)); - setting_create_Gendial_itc("dialogue/2text.3", - &(networkUG->itc_2text_2)); - setting_create_Gendial_itc("dialogue/title", - &(networkUG->itc_group_item)); - setting_create_Gendial_itc("dialogue/1text.1icon", - &(networkUG->itc_1text_1icon)); - setting_create_Gendial_itc("select_all", &(networkUG->itc_sel_all)); - setting_create_Gendial_itc("1text.1icon.2", - &(networkUG->itc_1icon_1text)); - - setting_create_Gendial_itc("dialogue/1icon", - &(networkUG->itc_variable_height)); - setting_create_Gendial_itc("multiline/1text", - &(networkUG->itc_bg_1icon)); - networkUG->itc_seperator.item_style = "dialogue/separator/21/with_line"; - networkUG->itc_seperator.func.text_get = NULL; - networkUG->itc_seperator.func.content_get = NULL; - networkUG->itc_seperator.func.state_get = NULL; - networkUG->itc_seperator.func.del = NULL; - - setting_create_Gendial_itc("dialogue/2text.3/expandable", - &(networkUG->itc_2text_3_parent)); - setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", - &(networkUG->itc_1icon_1text_sub)); - setting_create_Gendial_itc("dialogue/1text.2icon.2", - &(networkUG->itc_1text_2icon)); - setting_create_Gendial_itc("dialogue/2text.2icon.3", - &(networkUG->itc_2text_2icon_3)); + if (tel_get_network_band(networkUG->handle, setting_tapi_get_band_cb, networkUG) != TAPI_API_SUCCESS) { + SETTING_TRACE_ERROR("*** [ERR] tel_get_network_band. ***"); + } + + if (tel_get_network_selection_mode(networkUG->handle, setting_tapi_get_plmn_mode_cb, networkUG) != TAPI_API_SUCCESS) { + SETTING_TRACE_ERROR("*** [ERR] tel_get_network_selection_mode. ***"); + } + + if (tel_get_network_serving(networkUG->handle, setting_tapi_get_serving_network_cb, networkUG) != TAPI_API_SUCCESS) { + SETTING_TRACE_ERROR("*** [ERR] tel_get_network_serving. ***"); + } /* creating a view. */ setting_view_node_set_cur_view(&setting_view_network_main); @@ -192,43 +183,61 @@ static void *setting_network_ug_on_create(struct ui_gadget *ug, evas_object_event_callback_add(networkUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_network_ug_cb_resize, networkUG); - + (void)vconf_notify_key_changed(VCONFKEY_TELEPHONY_NWNAME, __selected_network_change_cb, networkUG); + + networkUG->view_type_string = NULL; + service_get_extra_data(service, "viewtype", &(networkUG->view_type_string)); + if(networkUG->view_type_string) { + SETTING_TRACE("viewtype:%s", networkUG->view_type_string); + } return networkUG->ly_main; } -static void setting_network_ug_on_start(struct ui_gadget *ug, bundle *data, +static void setting_network_ug_on_start(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_network_ug_on_pause(struct ui_gadget *ug, bundle *data, +static void setting_network_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_network_ug_on_resume(struct ui_gadget *ug, bundle *data, +static void setting_network_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_network_ug_on_destroy(struct ui_gadget *ug, bundle *data, +static void setting_network_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) { SETTING_TRACE_BEGIN; - setting_retm_if((!ug || !priv), "!ug || !priv"); + setting_retm_if((!priv), "!priv"); SettingNetworkUG *networkUG = priv; - + (void)vconf_ignore_key_changed(VCONFKEY_TELEPHONY_NWNAME, __selected_network_change_cb); evas_object_event_callback_del(networkUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_network_ug_cb_resize); /* fix flash issue for gallery */ networkUG->ug = ug; + + G_FREE(networkUG->ed_pxy_addr_desc); + G_FREE(networkUG->ed_pxy_port_desc); FREE(networkUG->prof_list); + FREE(networkUG->sel_network); /* release */ ecore_imf_shutdown(); +#ifdef SUPPORT_MDM + if(networkUG->mdm_server_state == MDM_RESULT_SUCCESS) + { + mdm_deregister_policy_receiver(networkUG->mdm_handle); + mdm_release_service(); + } +#endif + /* unregister dnet client */ int err_code = net_deregister_client(); if (err_code != NET_ERR_NONE) { @@ -236,18 +245,19 @@ static void setting_network_ug_on_destroy(struct ui_gadget *ug, bundle *data, ("%s*** [ERR] net_deregister_client. err=%d ***%s", SETTING_FONT_RED, err_code, SETTING_FONT_BLACK); } - /* unsubscribe sim events */ - if (setting_network_unsubscribe_tapi_events(networkUG) != SETTING_RETURN_SUCCESS) { + + if (networkUG->handle && tel_deinit(networkUG->handle) != TAPI_API_SUCCESS) { SETTING_TRACE_DEBUG ("%s*** [ERR] setting_network_unsubscribe_tapi_events. ***%s", SETTING_FONT_RED, SETTING_FONT_BLACK); } - SETTING_TRACE("Unsubscribing TAPI event is succeeded"); setting_network_popup_delete(networkUG); /* delete the allocated objects. */ setting_view_destroy(&setting_view_network_select_network, networkUG); setting_view_destroy(&setting_view_network_main_help, networkUG); + + setting_view_destroy(&setting_view_network_con, networkUG); setting_view_destroy(&setting_view_network_connection_create, networkUG); setting_view_destroy(&setting_view_network_3gcon, networkUG); @@ -272,14 +282,13 @@ static void setting_network_ug_on_destroy(struct ui_gadget *ug, bundle *data, SETTING_TRACE_END; } -static void setting_network_ug_on_message(struct ui_gadget *ug, bundle *msg, - bundle *data, void *priv) +static void setting_network_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) { - SETTING_TRACE_BEGIN; } -static void setting_network_ug_on_event(struct ui_gadget *ug, - enum ug_event event, bundle *data, +static void setting_network_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, void *priv) { SETTING_TRACE_BEGIN; @@ -305,14 +314,12 @@ static void setting_network_ug_on_event(struct ui_gadget *ug, } } -static void setting_network_ug_on_key_event(struct ui_gadget *ug, +static void setting_network_ug_on_key_event(ui_gadget_h ug, enum ug_key_event event, - bundle *data, void *priv) + service_h service, void *priv) { SETTING_TRACE_BEGIN; SettingNetworkUG *ad = (SettingNetworkUG *) priv; - if (!ug) - return; switch (event) { case UG_KEY_EVENT_END: @@ -322,6 +329,7 @@ static void setting_network_ug_on_key_event(struct ui_gadget *ug, elm_naviframe_bottom_item_get(ad->navi_bar)) { ug_destroy_me(ug); } else { + /* elm_naviframe_item_pop(ad->navi_bar); */ setting_view_cb_at_endKey(ad); } } @@ -366,805 +374,476 @@ UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) *general func * ***************************************************/ - - -int setting_network_subscribe_tapi_events(void *data) +void setting_network_popup_delete(void *data) { SETTING_TRACE_BEGIN; - retv_if(data == NULL, SETTING_TAPI_REG_EVENT_ECORE_ERR); + /* error check */ + retm_if(data == NULL, + "setting_network_tapi_popup_create Data parameter is NULL"); SettingNetworkUG *ad = (SettingNetworkUG *) data; - - int i = 0; - int ret = SETTING_RETURN_SUCCESS; - int iNumOfSSEvt = 0; - int tapi_ret = TAPI_API_SUCCESS; - - int EvtList[] = { - TAPI_EVENT_NETWORK_SEARCH_CNF, - TAPI_EVENT_NETWORK_SELECT_CNF, - TAPI_EVENT_NETWORK_SETNWBAND_CNF, - TAPI_EVENT_NETWORK_GETNWBAND_CNF, - TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF, - TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF, - TAPI_EVENT_NETWORK_SETPREFFEREDPLMN_CNF - }; - - if (tel_init() != TAPI_API_SUCCESS) { - SETTING_TRACE_DEBUG("%s*** [ERR] tel_init. ***%s", - SETTING_FONT_RED, SETTING_FONT_BLACK); - return SETTING_TAPI_INIT_ECORE_ERR; - } - /* iNumOfSSEvt = sizeof(EvtList)/sizeof(TelTapiEventType_t); */ - iNumOfSSEvt = sizeof(EvtList) / sizeof(int); - - for (i = 0; i < iNumOfSSEvt; i++) { - tapi_ret = - tel_register_event(EvtList[i], &(ad->subs_id_net[i]), - (TelAppCallback) & - setting_network_tapi_event_callback, - data); - if (tapi_ret != TAPI_API_SUCCESS) - SETTING_TRACE_ERROR - ("passing event[%d] to invoke tel_register_event failed[%d]", - ad->subs_id_net[i], tapi_ret); - } - - if (tel_register_app_name("org.tizen.setting") != TAPI_API_SUCCESS) { - SETTING_TRACE_ERROR("tel_register_app_name failed[tapi_ret=%d]", - tapi_ret); - return SETTING_TAPI_REG_EVENT_ECORE_ERR; + if (ad->network_ug_pop != NULL) { + evas_object_del(ad->network_ug_pop); + ad->network_ug_pop = NULL; } - - return ret; } -int setting_network_unsubscribe_tapi_events(void *data) +/* *************************************************** + * + *call back func + * + ***************************************************/ + +void setting_tapi_set_band_cb(TapiHandle *handle, int result, void *data, void *user_data) { SETTING_TRACE_BEGIN; - retv_if(data == NULL, SETTING_TAPI_DEREG_EVENT_ECORE_ERR); - SettingNetworkUG *ad = (SettingNetworkUG *) data; - - int i = 0; - int ret = SETTING_RETURN_SUCCESS; - int iNumOfSSEvt = 0; - int tapi_ret = TAPI_API_SUCCESS; - - int EvtList[] = { - TAPI_EVENT_NETWORK_SEARCH_CNF, - TAPI_EVENT_NETWORK_SELECT_CNF, - TAPI_EVENT_NETWORK_SETNWBAND_CNF, - TAPI_EVENT_NETWORK_GETNWBAND_CNF, - TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF, - TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF, - TAPI_EVENT_NETWORK_SETPREFFEREDPLMN_CNF - }; + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + SettingNetworkUG *ad = user_data; + + int err; + if (result == TAPI_NETWORK_NO_ERR) { + ret_if(NULL == ad->data_net_mode); + ad->net_mode = elm_radio_value_get(ad->data_net_mode->rgd);//get value from radio + setting_set_int_slp_key(ad->data_net_mode->int_slp_setting_binded, + ad->net_mode, &err); + char *sub_des = NULL; + + switch (ad->net_mode) { + case TAPI_NETWORK_BAND_TYPE_ANY: + sub_des = _("IDS_COM_BODY_AUTOMATIC"); + break; - iNumOfSSEvt = sizeof(EvtList) / sizeof(int); + case TAPI_NETWORK_BAND_TYPE_GSM_900_1800: + sub_des = _(STR_SETTING_GSM_900_1800); + break; - for (i = 0; i < iNumOfSSEvt; i++) { - tapi_ret = tel_deregister_event(ad->subs_id_net[i]); + case TAPI_NETWORK_BAND_TYPE_GSM_850_1900: + sub_des = _(STR_SETTING_GSM_850_1900); + break; - if (tapi_ret != TAPI_API_SUCCESS) { - SETTING_TRACE_ERROR - ("*** [ERR] tel_deregister_event. subs_id_net=%d, tapi_ret=%d ***", - ad->subs_id_net[i], tapi_ret); - continue; + case TAPI_NETWORK_BAND_TYPE_WCDMA: + sub_des = _(STR_SETTING_UMTS); + break; + default: + break; + } + if (ad->data_net_mode) { + ad->data_net_mode->sub_desc = (char *)g_strdup(sub_des); + elm_object_item_data_set(ad->data_net_mode->item, ad->data_net_mode); + elm_genlist_item_update(ad->data_net_mode->item); } - } - tapi_ret = tel_deinit(); - if (tapi_ret != TAPI_API_SUCCESS) { - SETTING_TRACE_ERROR("tel_deinit failed[tapi_ret = %d]", - tapi_ret); - return SETTING_TAPI_DEREG_EVENT_ECORE_ERR; + + } else { + //rollback + //get value from vconf + setting_get_int_slp_key(ad->data_net_mode->int_slp_setting_binded, + &(ad->net_mode), &err); + elm_radio_value_set(ad->data_net_mode->rgd, ad->net_mode); } - return ret; } - -static void -setting_network_popup_response_cb(void *data, Evas_Object *obj, - void *event_info) +void setting_tapi_get_band_cb(TapiHandle *handle, int result, void *data, void *user_data) { SETTING_TRACE_BEGIN; - if (obj) { - evas_object_del(obj); - obj = NULL; + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + SettingNetworkUG *ad = user_data; + + if (result == TAPI_NETWORK_NO_ERR) { + TelNetworkBand_t band; + int temp_net_mode = 0; + memcpy(&band, data, sizeof(TelNetworkBand_t)); + temp_net_mode = (int)band; + /* ***BEGIN*** Fixed the problem of word twinkle SAMSUNG 2010/7/21 modify */ + if (temp_net_mode != ad->net_mode) { + ad->net_mode = temp_net_mode; + const char *sub_desc = NULL; + switch (ad->net_mode) { + case TAPI_NETWORK_BAND_TYPE_ANY: + sub_desc = _("IDS_COM_BODY_AUTOMATIC"); + break; + case TAPI_NETWORK_BAND_TYPE_GSM_900_1800: + sub_desc = _(STR_SETTING_GSM_900_1800); + break; + case TAPI_NETWORK_BAND_TYPE_GSM_850_1900: + sub_desc = _(STR_SETTING_GSM_850_1900); + break; + case TAPI_NETWORK_BAND_TYPE_WCDMA: + sub_desc = _(STR_SETTING_UMTS); + break; + default: + break; + } + if (ad->data_net_mode) { + ad->data_net_mode->sub_desc = (char *)g_strdup(sub_desc); + elm_object_item_data_set (ad->data_net_mode->item, ad->data_net_mode); + elm_genlist_item_update(ad->data_net_mode->item); + + } + vconf_set_int(VCONFKEY_SETAPPL_NETWORK_MODE_INT, ad->net_mode); + } + /* ****END**** Fixed the problem of word twinkle SAMSUNG 2010/7/21 modify */ + } else { } - SettingNetworkUG *ad = (SettingNetworkUG *) data; - ad->pop_del = NULL; - ad->pop_reg = NULL; - ad->pop_save = NULL; - ad->network_ug_pop = NULL; - SETTING_TRACE_END; } -void setting_network_popup_delete(void *data) + +void setting_tapi_set_plmn_mode_cb(TapiHandle *handle, int result, void *data, void *user_data) { SETTING_TRACE_BEGIN; - /* error check */ - retm_if(data == NULL, - "setting_network_tapi_popup_create Data parameter is NULL"); - SettingNetworkUG *ad = (SettingNetworkUG *) data; - if (ad->network_ug_pop != NULL) { - evas_object_del(ad->network_ug_pop); - ad->network_ug_pop = NULL; + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + SettingNetworkUG *ad = user_data; + + setting_network_popup_delete(ad); + + if ((TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net + && !ad->b_set_auto_network) || + (TAPI_NETWORK_SELECTIONMODE_MANUAL == ad->sel_net + && !ad->b_set_manul_network)) + { + /*The requeset has already been canceled, return directly*/ + return; } -} -void setting_network_popup_create(void *data, char *str_content, bool keep) + if(result != TAPI_NETWORK_NO_ERR) {/*roolback..*/ + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(keyStr_Failed_Select_Network), NULL, POPUP_INTERVAL, FALSE, FALSE); + + //rollback sel_act and sel_net in setting_view_network_select_network.destroy() + setting_view_change( + &setting_view_network_select_network, + &setting_view_network_main, ad); + + return; + + } + + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(KeyStr_Saved), NULL, POPUP_INTERVAL, FALSE, FALSE); + if (0 != vconf_set_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, ad->sel_net)) { + SETTING_TRACE_ERROR("vconf[%s] set failed"); + } + if (0 != vconf_set_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, ad->sel_act)) { + SETTING_TRACE_ERROR("vconf[%s] set failed"); + } + + ad->b_set_auto_network = FALSE; + ad->b_set_manul_network = FALSE; + setting_network_update_sel_network(ad); +} +void setting_tapi_get_plmn_mode_cb(TapiHandle *handle, int result, void *data, void *user_data) { SETTING_TRACE_BEGIN; - /* error check */ - retm_if(data == NULL, - "setting_network_tapi_popup_create Data parameter is NULL"); - SettingNetworkUG *ad = (SettingNetworkUG *) data; - if (ad->network_ug_pop != NULL) { - elm_popup_timeout_set(ad->network_ug_pop, 0); - setting_network_popup_update(data, str_content, keep); - } else { - ad->network_ug_pop = - setting_create_popup_without_btn(ad, ad->win_get, str_content, NULL, - setting_network_popup_response_cb, - 0.0); - if (!keep) { - elm_popup_timeout_set(ad->network_ug_pop, 2.0); + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + SettingNetworkUG *ad = user_data; + + if (result == TAPI_NETWORK_NO_ERR) { + TelNetworkSelectionMode_t sel; + memcpy(&sel, data, sizeof(TelNetworkSelectionMode_t)); + SETTING_TRACE_DEBUG("ad->sel_net[%d] %s sel[%d]", ad->sel_net, ad->sel_net == sel ? "==" : "!=", sel); + if (ad->sel_net != sel) { + ad->sel_net = sel; + vconf_set_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, ad->sel_net); + setting_network_update_sel_network(ad); } + } else { } } -void setting_network_popup_update(void *data, char *str_content, bool keep) +void setting_tapi_search_network_cb(TapiHandle *handle, int result, void *data, void *user_data) { + ret_if(!data || !user_data); + SettingNetworkUG *ad = user_data; SETTING_TRACE_BEGIN; - /* error check */ - retm_if(data == NULL, - "setting_network_tapi_popup_create Data parameter is NULL"); - SettingNetworkUG *ad = (SettingNetworkUG *) data; - if (ad->network_ug_pop == NULL) { - setting_network_popup_create(ad, str_content, keep); + SETTING_TRACE(" - result = %d", result); + setting_network_popup_delete(ad); + + if (!ad->b_searching_network) { + /*The requeset has already been canceled, don't do detail process*/ return; } - if (str_content) { - char r_str_text[HELP_MSG_BUFF_SIZE] = { 0, }; - snprintf(r_str_text, HELP_MSG_BUFF_SIZE-1-strlen(""), "%s", str_content); - g_strlcat(r_str_text, "", HELP_MSG_BUFF_SIZE); - elm_object_text_set(ad->network_ug_pop, r_str_text); - } - if (!keep) { - elm_popup_timeout_set(ad->network_ug_pop, 2.0); + //setting_finish_progress_genlist_item(ad->data_selected_network_item); + if (ad->data_search_network_item) + { + elm_object_item_del(ad->data_search_network_item->item); + ad->data_search_network_item = NULL; } -} -Evas_Object *setting_network_create_register_popup(void *data) -{ - SETTING_TRACE_BEGIN; - /* error check */ - retvm_if(data == NULL, NULL, - "[Setting > Network] Data parameter is NULL"); + ad->b_searching_network = FALSE; + int valid_cnt = 0; + if (result == TAPI_NETWORK_NO_ERR) { + int cnt = 0; + memcpy(&(ad->plmn_info), data, sizeof(TelNetworkPlmnList_t)); - SettingNetworkUG *ad = (SettingNetworkUG *) data; - Evas_Object *popup = NULL; - popup = - setting_create_popup_without_btn(ad, ad->win_get, _("Registering"), NULL, - setting_network_popup_response_cb, POPUP_INTERVAL); - ad->pop_reg = popup; - return popup; -} + Setting_GenGroupItem_Data *item_data = NULL; -Evas_Object *setting_network_preferred_network_create_save_popup(void *data) -{ - SETTING_TRACE_BEGIN; - /* error check */ - retvm_if(data == NULL, NULL, - "[Setting > Network] Data parameter is NULL"); + const char *pa_net_name = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); + SETTING_TRACE("VCONFKEY_TELEPHONY_NWNAME:pa_net_name:%s", pa_net_name); - SettingNetworkUG *ad = (SettingNetworkUG *) data; - Evas_Object *popup = NULL; - popup = - setting_create_popup_without_btn(ad, ad->win_get, _("IDS_ST_POP_SAVING"), NULL, - setting_network_popup_response_cb, POPUP_INTERVAL); - ad->pop_save = popup; - return popup; -} + char name[MAX_COMMON_BUFFER_LEN] = {0, }; + while(cnt < ad->plmn_info.networks_count) { + SETTING_TRACE("network name from TAPI[%d]:%s(%s)", cnt, + ad->plmn_info.network_list[cnt].network_name, + setting_network_get_act_str(ad->plmn_info.network_list[cnt].access_technology)); -Evas_Object *setting_network_preferred_network_create_delete_popup(void *data) -{ - SETTING_TRACE_BEGIN; - /* error check */ - retvm_if(data == NULL, NULL, - "[Setting > Network] Data parameter is NULL"); + if (TAPI_FORBIDDEN_PLMN == ad->plmn_info.network_list[cnt].type_of_plmn) { + cnt++; + continue; + } - SettingNetworkUG *ad = (SettingNetworkUG *) data; - Evas_Object *popup = NULL; - popup = - setting_create_popup_without_btn(ad, ad->win_get, _("IDS_COM_SK_DELETE"), NULL, - setting_network_popup_response_cb, 0); - ad->pop_del = popup; - return popup; + if (TAPI_NETWORK_SELECTIONMODE_MANUAL == ad->sel_net + && 0 == safeStrCmp(pa_net_name, ad->plmn_info.network_list[cnt].network_name) + && ad->plmn_info.network_list[cnt].access_technology == ad->sel_act) + { + //already displayed. + cnt++; + continue; + } + + memset(name, 0, MAX_COMMON_BUFFER_LEN); + snprintf(name, MAX_COMMON_BUFFER_LEN, "%s (%s)", + ad->plmn_info.network_list[cnt].network_name, + setting_network_get_act_str(ad->plmn_info.network_list[cnt].access_technology)); + + item_data = setting_create_Gendial_field_1radio( + ad->genlist_sel_network, + &itc_1text_2icon_2, + setting_network_Gendial_select_plmn_cb, + ad, + SWALLOW_Type_1RADIO, + ad->chk_sel, + TAPI_NETWORK_SELECTIONMODE_MANUAL+valid_cnt+1, + name, + setting_network_select_network_chk_changed); + if (NULL == item_data) + { + SETTING_TRACE_ERROR("Failed to calloc memory"); + cnt++; + continue; + } + item_data->userdata = ad; + if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC != ad->sel_net + && 0 == safeStrCmp(pa_net_name, ad->plmn_info.network_list[cnt].network_name) + && ad->plmn_info.network_list[cnt].access_technology == ad->sel_act) + { + elm_radio_value_set(ad->chk_sel, item_data->chk_status);//let select nothing + } + cnt++; + valid_cnt++; + } + FREE(pa_net_name); + + SETTING_TRACE("Found %d valid networks in total[%d]", valid_cnt, cnt); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(keyStr_Searched), NULL, POPUP_INTERVAL, FALSE, FALSE); + } else { + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(keyStr_Failed_Searched), NULL, POPUP_INTERVAL, FALSE, FALSE); + } + if (0 == valid_cnt && TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net && ad->data_auto_network_item) + { + ad->data_auto_network_item->chk_status = TRUE; + elm_object_item_data_set(ad->data_auto_network_item->item, ad->data_auto_network_item); + elm_genlist_item_item_class_update(ad->data_auto_network_item->item, &(itc_2text_1icon_6)); + } } -Evas_Object *setting_network_select_network_create_search_popup(void *data) + +void setting_tapi_get_serving_network_cb(TapiHandle *handle, int result, void *data, void *user_data) { SETTING_TRACE_BEGIN; - /* error check */ - retv_if(data == NULL, NULL); - - SettingNetworkUG *ad = (SettingNetworkUG *) data; - Evas_Object *popup = NULL; - popup = - setting_create_popup_without_btn(ad, ad->win_get, _("IDS_COM_POP_SEARCHING"), - NULL, NULL, 0); - ad->pop_sch = popup; - return popup; + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data || !data); + SettingNetworkUG *ad = user_data; + TelNetworkServing_t *srv_nt = data; + + if (result == TAPI_NETWORK_NO_ERR) + { + ad->sel_act = srv_nt->act; + vconf_set_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, ad->sel_act); + + FREE(ad->sel_network); + ad->sel_network = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); + if (NULL == ad->sel_network) { + ad->sel_network = strndup("IDS_ST_BODY_NOSERVICE", strlen("IDS_ST_BODY_NOSERVICE")+1); + } + setting_network_update_sel_network(ad); + } + else + { + //if failed, do nothing.. + } + SETTING_TRACE_END; + } -void setting_network_preferred_network_create_isf(Evas_Object *entry) + +void setting_tapi_cancel_manual_search_cb(TapiHandle *handle, int result, void *data, void *user_data) { SETTING_TRACE_BEGIN; - ecore_imf_init(); - SETTING_TRACE_DEBUG - ("Given focus to the entry and then soft keyboard will be shown automatically !"); - elm_object_focus_set(entry, EINA_TRUE); + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + //SettingNetworkUG *ad = user_data; } -/* *************************************************** - * - *call back func - * - ***************************************************/ - -#ifdef Status -#undef Status -#endif - -void setting_network_tapi_event_callback(TelTapiEvent_t *event, void *data) +void setting_tapi_set_preferred_plmn_cb(TapiHandle *handle, int result, void *data, void *user_data) { SETTING_TRACE_BEGIN; - ret_if(data == NULL || event == NULL); - SETTING_TRACE("event->EventClass=\t%d", (int)(event->EventClass)); - SETTING_TRACE("event->EventType=\t%d", event->EventType); - SETTING_TRACE("event->Status=\t%d", event->Status); - SETTING_TRACE("event->RequestId=\t%d", event->RequestId); - SettingNetworkUG *ad = (SettingNetworkUG *) data; - - switch (event->EventClass) { - case TAPI_EVENT_CLASS_NETWORK: - { - switch (event->EventType) { - /* search network list */ - case TAPI_EVENT_NETWORK_SEARCH_CNF: + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + SettingNetworkUG *ad = user_data; + setting_network_popup_delete(ad); + + if (result != TAPI_NETWORK_NO_ERR) { + switch (ad->op_type) { + case SETTING_NETWORK_PREFERRED_NETWORK_DELETE: { - SETTING_TRACE_DEBUG("Case: TAPI_EVENT_NETWORK_SEARCH_CNF"); - - setting_network_popup_delete(ad); - ad->pop_sch = NULL; - - if (!ad->b_searching_network) { - /*The requeset has already been canceled, don't do detail process*/ - return; - } - bool need_reset_flag = FALSE; - if (ad->data_search_network_item) - { - if (ad->data_search_network_item->chk_status == - elm_radio_value_get(ad->chk_sel)) { - elm_radio_value_set(ad->chk_sel, -1);//let select nothing - need_reset_flag = TRUE; - } - elm_object_item_del(ad->data_search_network_item->item); - ad->data_search_network_item = NULL; - } - - ad->b_searching_network = FALSE; - - if (event->Status == TAPI_NETWORK_NO_ERR) { - int cnt = 0; - int valid_cnt = 0; - ret_if(NULL == event->pData); - memcpy(&(ad->plmn_info), event->pData, - sizeof(TelNetworkPlmnList_t)); - - Setting_GenGroupItem_Data *item_data = NULL; - - const char *pa_net_name = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); - SETTING_TRACE("VCONFKEY_TELEPHONY_NWNAME:pa_net_name:%s", pa_net_name); - //SETTING_TRACE("Selected network name:%s",ad->data_selected_network_item->keyStr); - while(cnt < ad->plmn_info.networks_count) { - SETTING_TRACE("network name from TAPI[%d]:%s", cnt, ad->plmn_info.network_list[cnt].network_name); - if (TAPI_FORBIDDEN_PLMN == - ad->plmn_info.network_list[cnt].type_of_plmn) { - cnt++; - continue; - } - - if (ad->data_selected_network_item && - 0 == safeStrCmp(ad->data_selected_network_item->keyStr, - ad->plmn_info.network_list[cnt].network_name)) { - cnt++; - continue; - } - item_data = setting_create_Gendial_field_1radio( - ad->genlist_sel_network, - &(ad->itc_1text_2icon), - setting_network_Gendial_select_plmn_cb, - ad, - SWALLOW_Type_1RADIO, - ad->chk_sel, - TAPI_NETWORK_SELECTIONMODE_MANUAL+valid_cnt+1, - ad->plmn_info.network_list[cnt].network_name, - setting_network_select_network_chk_changed); - if (NULL == item_data) - { - SETTING_TRACE_ERROR("Failed to calloc memory"); - cnt++; - continue; - } - item_data->userdata = ad; - if (need_reset_flag && - 0 == safeStrCmp(pa_net_name, ad->plmn_info.network_list[cnt].network_name)) - { - elm_radio_value_set(ad->chk_sel, item_data->chk_status);//let select nothing - } - cnt++; - valid_cnt++; - } - FREE(pa_net_name); - - SETTING_TRACE("Found %d valid networks in total[%d]", valid_cnt, cnt); - setting_network_popup_update(ad, _("Searched"), FALSE); - } else { - setting_network_popup_update(ad, _("Searching network failed"), FALSE); - } - break; + setting_network_preferred_network_delete_failed(ad); + break; } - /*set plmn*/ - case TAPI_EVENT_NETWORK_SELECT_CNF: + default: { - SETTING_TRACE_DEBUG("Case: set plmn(ad->sel_net:%d)", - ad->sel_net); - - if ((TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net - && !ad->b_set_auto_network) || - (TAPI_NETWORK_SELECTIONMODE_MANUAL == ad->sel_net - && !ad->b_set_manul_network)) - { - /*The requeset has already been canceled, return directly*/ - return; - } - - if(event->Status != TAPI_NETWORK_NO_ERR) {/*roolback..*/ - setting_network_popup_update(ad, - _("Select network failed"), FALSE); - if (0 != vconf_get_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, &ad->sel_net)) { - SETTING_TRACE_ERROR("vconf get failed"); - } - - setting_view_change( - &setting_view_network_select_network, - &setting_view_network_main, ad); - - return; - - } - setting_finish_progress_genlist_item(ad->data_selected_network_item); - - setting_network_popup_update(ad, _("Saved!"), FALSE); - if (0 != vconf_set_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, ad->sel_net)) { - SETTING_TRACE_ERROR("vconf[%s] set failed"); - } - const char *pa_net_name = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); - SETTING_TRACE("sel_net_name:%s", pa_net_name); - if (NULL == pa_net_name) { - pa_net_name = "IDS_ST_BODY_NOSERVICE"; - } - - if (ad->data_auto_network_item) { - if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net) - { - elm_genlist_item_item_class_update( - ad->data_auto_network_item->item, - &ad->itc_2text_2icon_3); - - SETTING_TRACE_DEBUG("After set as Automatic, update "\ - "ad->data_auto_network_item to be [%s]", - pa_net_name); - ad->data_auto_network_item->sub_desc = - (char *)g_strdup(_(pa_net_name)); - elm_object_item_data_set( ad->data_auto_network_item->item, ad->data_auto_network_item); - elm_genlist_item_update( ad->data_auto_network_item->item); - } else { - elm_genlist_item_item_class_update( - ad->data_auto_network_item->item, - &ad->itc_1text_2icon); - } - } - char sub_desc[MAX_COMMON_BUFFER_LEN] = { 0, }; - if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net) { - snprintf(sub_desc, MAX_COMMON_BUFFER_LEN, - "%s. %s", _("IDS_COM_BODY_AUTOMATIC"), - _(pa_net_name)); - - } else { - snprintf(sub_desc, MAX_COMMON_BUFFER_LEN, - "%s. %s", _("IDS_COM_BODY_MANUAL"), - _(pa_net_name)); - } - SETTING_TRACE_DEBUG("After set as Automatic, update "\ - "ad->data_sel_net to be [%s]", sub_desc); - if (ad->data_sel_net && !isEmptyStr(sub_desc)) { - ad->data_sel_net->sub_desc = - (char *)g_strdup(sub_desc); - elm_object_item_data_set(ad->data_sel_net->item, ad->data_sel_net); - elm_genlist_item_update(ad->data_sel_net->item); - } - ad->b_set_auto_network = FALSE; - ad->b_set_manul_network = FALSE; - - FREE(pa_net_name); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_ERROR"), NULL, POPUP_INTERVAL, FALSE, FALSE); break; } - /*get select network*/ - case TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF: + } + } else { + int tapi_ret = TAPI_API_SUCCESS; + switch (ad->op_type) { + case SETTING_NETWORK_PREFERRED_NETWORK_NEW: { - SETTING_TRACE_DEBUG("Case: get select network"); - - - if (event->Status == TAPI_NETWORK_NO_ERR) { - TelNetworkSelectionMode_t sel; - memcpy(&sel, event->pData, - sizeof(TelNetworkSelectionMode_t)); - SETTING_TRACE_DEBUG("ad->sel_net[%d] %s sel[%d]", - ad->sel_net, - ad->sel_net == sel ? "==" : "!=", - sel); - if (ad->sel_net != sel) { - char sub_desc[MAX_COMMON_BUFFER_LEN] = { 0, }; - const char *pa_net_name = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME); - SETTING_TRACE("pa_net_name:%s", pa_net_name); - if (NULL == pa_net_name) { - pa_net_name = "IDS_ST_BODY_NOSERVICE"; - } - - if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == sel) { - snprintf(sub_desc, MAX_COMMON_BUFFER_LEN, - "%s. %s", _("IDS_COM_BODY_AUTOMATIC"), - _(pa_net_name)); - - } else if(TAPI_NETWORK_SELECTIONMODE_MANUAL == sel) { - snprintf(sub_desc, MAX_COMMON_BUFFER_LEN, - "%s. %s", _("IDS_COM_BODY_MANUAL"), - _(pa_net_name)); - } - SETTING_TRACE_DEBUG("Update "\ - "ad->data_sel_net to be [%s]", - sub_desc); - if (ad->data_sel_net && !isEmptyStr(sub_desc)) - { - ad->data_sel_net->sub_desc = - (char *)g_strdup(sub_desc); - elm_object_item_data_set(ad->data_sel_net->item, ad->data_sel_net); - elm_genlist_item_update(ad->data_sel_net->item); - } - - ad->sel_net = sel; - } - - } else { - SETTING_TRACE - ("*** [ERR] TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF, STATUS=0x%x ***", - event->Status); - } + setting_view_change + (&setting_view_network_preferred_network_new, + &setting_view_network_preferred_network,ad); + tapi_ret = + tel_get_network_preferred_plmn + (ad->handle, setting_tapi_get_preferred_plmn_cb, ad); break; } - /* get network mode */ - case TAPI_EVENT_NETWORK_GETNWBAND_CNF: + + case SETTING_NETWORK_PREFERRED_NETWORK_LIST: { - SETTING_TRACE_DEBUG("Case: TAPI_EVENT_NETWORK_GETNWBAND_CNF"); - - if (event->Status == - TAPI_NETWORK_NO_ERR) { - TelNetworkBand_t band; - int temp_net_mode = 0; - memcpy(&band, event->pData, - sizeof - (TelNetworkBand_t)); - temp_net_mode = (int)band; - /* ***BEGIN*** Fixed the problem of word twinkle SAMSUNG 2010/7/21 modify */ - if (temp_net_mode != - ad->net_mode) { - ad->net_mode = - temp_net_mode; - const char *sub_desc = - NULL; - switch (ad->net_mode) { - case TAPI_NETWORK_BAND_TYPE_ANY: - sub_desc = - _("IDS_COM_BODY_AUTOMATIC"); - break; - case TAPI_NETWORK_BAND_TYPE_GSM_900_1800: - sub_desc = - _(STR_SETTING_GSM_900_1800); - break; - case TAPI_NETWORK_BAND_TYPE_GSM_850_1900: - sub_desc = - _(STR_SETTING_GSM_850_1900); - break; - case TAPI_NETWORK_BAND_TYPE_WCDMA: - sub_desc = - _(STR_SETTING_UMTS); - break; - default: - break; - } - if (ad->data_net_mode) { - ad->data_net_mode->sub_desc = (char *)g_strdup(sub_desc); - elm_object_item_data_set (ad->data_net_mode->item, ad->data_net_mode); - elm_genlist_item_update(ad->data_net_mode->item); - - } - vconf_set_int - (VCONFKEY_SETAPPL_NETWORK_MODE_INT, - ad->net_mode); - } - /* ****END**** Fixed the problem of word twinkle SAMSUNG 2010/7/21 modify */ - } else { - SETTING_TRACE_ERROR - ("*** [ERR] TAPI_EVENT_NETWORK_GETNWBAND_CNF, STATUS=0x%x ***", - event->Status); - } + setting_view_change + (&setting_view_network_preferred_network_list, + &setting_view_network_preferred_network, + ad); + tapi_ret = + tel_get_network_preferred_plmn + (ad->handle, setting_tapi_get_preferred_plmn_cb, ad); break; } - /* set network mode */ - case TAPI_EVENT_NETWORK_SETNWBAND_CNF: - { - SETTING_TRACE_DEBUG("Case: TAPI_EVENT_NETWORK_SETNWBAND_CNF"); - - int err; - if (event->Status == - TAPI_NETWORK_NO_ERR) { - ret_if(NULL == ad->data_net_mode); - ad->net_mode = //get value from radio - elm_radio_value_get(ad->data_net_mode->rgd); - setting_set_int_slp_key(ad->data_net_mode->int_slp_setting_binded, - ad->net_mode, &err); - char *sub_des = NULL; - - switch (ad->net_mode) { - case TAPI_NETWORK_BAND_TYPE_ANY: - sub_des = _("IDS_COM_BODY_AUTOMATIC"); - break; - - case TAPI_NETWORK_BAND_TYPE_GSM_900_1800: - sub_des = _(STR_SETTING_GSM_900_1800); - break; - - case TAPI_NETWORK_BAND_TYPE_GSM_850_1900: - sub_des = _(STR_SETTING_GSM_850_1900); - break; - - case TAPI_NETWORK_BAND_TYPE_WCDMA: - sub_des = _(STR_SETTING_UMTS); - break; - default: - break; - } - if (ad->data_net_mode) { - ad->data_net_mode->sub_desc = (char *)g_strdup(sub_des); - elm_object_item_data_set(ad->data_net_mode->item, ad->data_net_mode); - elm_genlist_item_update(ad->data_net_mode->item); - } - - - } else { - SETTING_TRACE_ERROR - ("*** [ERR] TAPI_EVENT_NETWORK_SETNWBAND_CNF, STATUS=0x%x ***", - event->Status); - - //rollback - //get value from vconf - setting_get_int_slp_key(ad->data_net_mode->int_slp_setting_binded, - &(ad->net_mode), &err); - elm_radio_value_set(ad->data_net_mode->rgd, ad->net_mode); - } + case SETTING_NETWORK_PREFERRED_NETWORK_EDIT: + { + setting_view_change + (&setting_view_network_preferred_network_edit, + &setting_view_network_preferred_network, + ad); + tapi_ret = + tel_get_network_preferred_plmn + (ad->handle, setting_tapi_get_preferred_plmn_cb, ad); break; } - /* get preferred network */ - case TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF: + case SETTING_NETWORK_PREFERRED_NETWORK_DELETE: { - SETTING_TRACE_DEBUG("Case: TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF"); - - if (event->Status == - TAPI_NETWORK_NO_ERR) { - memset(&(ad->pref_list), 0x00, - sizeof - (TelNetworkPrefferedPlmnList_t)); - memcpy(&(ad->pref_list), - event->pData, - sizeof - (TelNetworkPrefferedPlmnList_t)); - - SETTING_TRACE - ("*********** ad->op_type = %d", - ad->op_type); - SETTING_TRACE - ("ad->pref_list.NumOfPreffPlmns:%d", - ad-> - pref_list.NumOfPreffPlmns); - switch (ad->op_type) { - case SETTING_NETWORK_PREFERRED_NETWORK_DELETE: - { - setting_network_preferred_network_delete_draw_network_list - (ad); - break; - } - default: - { - setting_network_preferred_network_refresh_view - (ad); - char info - [MAX_DISPLAY_NAME_LEN_ON_UI] - = { 0 }; - if (ad->pref_list.NumOfPreffPlmns > 1) { - snprintf(info, sizeof(info), - "Get %d preferred networks", - ad->pref_list.NumOfPreffPlmns); - } else { - snprintf(info, sizeof(info), - "Get %d preferred network", - ad->pref_list.NumOfPreffPlmns); - } - setting_network_popup_update(ad, info, - FALSE); - break; - } - } - } else { - switch (ad->op_type) { - case SETTING_NETWORK_PREFERRED_NETWORK_DELETE: - { - setting_network_preferred_network_delete_failed - (ad); - break; - } - default: - { - setting_network_popup_update(ad, - _("Get preferred network failed"), - FALSE); - break; - } - } - } + setting_network_preferred_network_delete_ok + (ad); + return; + } + default: + { + SETTING_TRACE_DEBUG + (" Unknown prederred network type"); + break; + } + } + + if (tapi_ret != + TAPI_API_SUCCESS) { + SETTING_TRACE_ERROR + ("*** [ERR] tel_get_network_preferred_plmn. err=%d ***", + tapi_ret); + } + } + +} + +void setting_tapi_get_preferred_plmn_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE(" - result = 0x%x", result); + ret_if(!user_data); + SettingNetworkUG *ad = user_data; + + SETTING_TRACE_DEBUG("Case: TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF"); + setting_network_popup_delete(ad); + + if (result == TAPI_NETWORK_NO_ERR) { + memcpy(&(ad->pref_list), data,sizeof(TelNetworkPreferredPlmnList_t)); + + SETTING_TRACE("*********** ad->op_type = %d",ad->op_type); + SETTING_TRACE("ad->pref_list.NumOfPrefPlmns:%d",ad->pref_list.NumOfPrefPlmns); + switch (ad->op_type) { + case SETTING_NETWORK_PREFERRED_NETWORK_DELETE: + { + setting_network_preferred_network_delete_draw_network_list(ad); break; } - /* set preferred network */ - case TAPI_EVENT_NETWORK_SETPREFFEREDPLMN_CNF: + default: { - SETTING_TRACE_DEBUG("Case: TAPI_EVENT_NETWORK_SETPREFFEREDPLMN_CNF"); - - if (event->Status != - TAPI_NETWORK_NO_ERR) { - switch (ad->op_type) { - case SETTING_NETWORK_PREFERRED_NETWORK_DELETE: - { - setting_network_preferred_network_delete_failed - (ad); - break; - } - default: - { - setting_network_popup_update - (ad, _("IDS_COM_POP_ERROR"), - FALSE); - break; - } - } + setting_network_preferred_network_refresh_view + (ad); + char info[MAX_DISPLAY_NAME_LEN_ON_UI] = { 0 }; + if (ad->pref_list.NumOfPrefPlmns > 1) { + snprintf(info, sizeof(info), "Get %d preferred networks", + ad->pref_list.NumOfPrefPlmns); } else { - int request_id = -1; - int tapi_ret = TAPI_API_SUCCESS; - switch (ad->op_type) { - case SETTING_NETWORK_PREFERRED_NETWORK_NEW: - { - setting_view_change - (&setting_view_network_preferred_network_new, - &setting_view_network_preferred_network, - ad); - tapi_ret = - tel_get_network_preferred_plmn - (&request_id); - break; - } - - case SETTING_NETWORK_PREFERRED_NETWORK_LIST: - { - - setting_view_change - (&setting_view_network_preferred_network_list, - &setting_view_network_preferred_network, - ad); - tapi_ret = - tel_get_network_preferred_plmn - (&request_id); - break; - } - - case SETTING_NETWORK_PREFERRED_NETWORK_EDIT: - { - setting_view_change - (&setting_view_network_preferred_network_edit, - &setting_view_network_preferred_network, - ad); - tapi_ret = - tel_get_network_preferred_plmn - (&request_id); - break; - } - case SETTING_NETWORK_PREFERRED_NETWORK_DELETE: - { - setting_network_preferred_network_delete_ok - (ad); - return; - } - default: - { - SETTING_TRACE_DEBUG - (" Unknown prederred network type"); - break; - } - } - - if (tapi_ret != - TAPI_API_SUCCESS) { - SETTING_TRACE_ERROR - ("*** [ERR] tel_get_network_preferred_plmn. err=%d ***", - tapi_ret); - } + snprintf(info, sizeof(info), "Get %d preferred network", + ad->pref_list.NumOfPrefPlmns); } + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(info), NULL, POPUP_INTERVAL, FALSE, FALSE); break; } - default: + } + } else { + switch (ad->op_type) { + case SETTING_NETWORK_PREFERRED_NETWORK_DELETE: { - SETTING_TRACE_DEBUG - ("Unkonwn TAPI event"); + setting_network_preferred_network_delete_failed + (ad); break; } - } - break; - } - default: + default: { - SETTING_TRACE_DEBUG("Unkonwn TAPI event class"); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(keyStr_Failed_Get_PreferNetwork), NULL, POPUP_INTERVAL, FALSE, FALSE); break; } + } } - SETTING_TRACE_END; } -void setting_network_register_network(Setting_GenGroupItem_Data* list_item) +void __register_network(Setting_GenGroupItem_Data* list_item) { SETTING_TRACE_BEGIN; ret_if(list_item == NULL); SETTING_TRACE("process item [%s]", list_item->keyStr); SettingNetworkUG *ad = list_item->userdata; ret_if(ad == NULL); - + int tapi_ret = TAPI_API_INVALID_INPUT; - int request_id = 0; //cancel the searching operation - + if (ad->data_search_network_item) { elm_object_item_del(ad->data_search_network_item->item); ad->data_search_network_item = NULL; } - setting_finish_progress_genlist_item(ad->data_selected_network_item); if (ad->b_searching_network) { - tapi_ret = tel_cancel_network_manual_search(&request_id); + SETTING_TRACE("Sending tel_cancel_network_manual_search.."); + tapi_ret = tel_cancel_network_manual_search(ad->handle, setting_tapi_cancel_manual_search_cb, ad); if (tapi_ret != TAPI_API_SUCCESS) { - SETTING_TRACE_ERROR("*** [ERR] tel_search_network. "\ + SETTING_TRACE_ERROR("*** [ERR] tel_cancel_network_manual_search. "\ "tapi_ret=%d ***", tapi_ret); } else @@ -1175,15 +854,25 @@ void setting_network_register_network(Setting_GenGroupItem_Data* list_item) if (0 == safeStrCmp(list_item->keyStr, "IDS_COM_BODY_AUTOMATIC")) { ad->sel_net = TAPI_NETWORK_SELECTIONMODE_AUTOMATIC; - tapi_ret = tel_select_network_automatic(&request_id); + SETTING_TRACE("Sending tel_select_network_automatic.."); + tapi_ret = tel_select_network_automatic(ad->handle, setting_tapi_set_plmn_mode_cb, ad); if (tapi_ret != TAPI_API_SUCCESS) { SETTING_TRACE_DEBUG("*** [ERR] tel_select_network_automatic."\ " tapi_ret=%d ***",tapi_ret); } else { - setting_begin_progress_genlist_item(list_item); - ad->data_selected_network_item = list_item; + ad->network_ug_pop = setting_create_popup_without_btn(ad, ad->win_get, NULL, + _("IDS_COM_POP_PROCESSING"), NULL, + 0.0, TRUE, TRUE); + + if (ad->data_auto_network_item) + { + ad->data_auto_network_item->sub_desc = (char *)g_strdup("...."); + elm_genlist_item_item_class_update(ad->data_auto_network_item->item, &(itc_2text_1icon_6)); + } + ad->b_set_manul_network = FALSE; ad->b_set_auto_network = TRUE; + ad->sel_act = -1;//means "Automatic" } } else { ad->sel_net = TAPI_NETWORK_SELECTIONMODE_MANUAL; @@ -1191,92 +880,259 @@ void setting_network_register_network(Setting_GenGroupItem_Data* list_item) ad->b_set_auto_network = FALSE; int cnt = 0; - SETTING_TRACE("ad->plmn_info.networks_count:%d", + SETTING_TRACE("ad->plmn_info.networks_count:%d", ad->plmn_info.networks_count); + char name[MAX_COMMON_BUFFER_LEN] = {0, }; for(; cnt < ad->plmn_info.networks_count; cnt++) { - SETTING_TRACE("ad->plmn_info.network_list[cnt].network_name:%s", + SETTING_TRACE("ad->plmn_info.network_list[cnt].network_name:%s", ad->plmn_info.network_list[cnt].network_name); - if(!safeStrCmp(list_item->keyStr, - ad->plmn_info.network_list[cnt].network_name)) + memset(name, 0, MAX_COMMON_BUFFER_LEN); + snprintf(name, MAX_COMMON_BUFFER_LEN, "%s (%s)", + ad->plmn_info.network_list[cnt].network_name, + setting_network_get_act_str(ad->plmn_info.network_list[cnt].access_technology)); + + if(!safeStrCmp(list_item->keyStr, name)) { break; } - } + } - SETTING_TRACE_DEBUG("%s*** [Selected PLMN] name=%s, "\ + SETTING_TRACE_DEBUG("*** [Selected PLMN] name=%s, "\ "srv provider=%s, PLMN ID=%u, type=%d, "\ - "access tech=%d ***%s", SETTING_FONT_BGREEN, - ad->plmn_info.network_list[cnt].network_name, - ad->plmn_info.network_list[cnt].service_provider_name, + "access tech=%d ***", + ad->plmn_info.network_list[cnt].network_name, + ad->plmn_info.network_list[cnt].service_provider_name, ad->plmn_info.network_list[cnt].plmn_id, - (int)(ad->plmn_info.network_list[cnt].type_of_plmn), - (int)(ad->plmn_info.network_list[cnt].access_technology), - SETTING_FONT_BLACK); + (int)(ad->plmn_info.network_list[cnt].type_of_plmn), + (int)(ad->plmn_info.network_list[cnt].access_technology)); //ASYNC API - TAPI_EVENT_NETWORK_SELECT_CNF - tapi_ret = tel_select_network_manual( - ad->plmn_info.network_list[cnt].plmn_id, - &request_id); + SETTING_TRACE("Sending tel_select_network_manual.."); + char plmn_id[MAX_COMMON_BUFFER_LEN] = {0, }; + snprintf(plmn_id, MAX_COMMON_BUFFER_LEN, "%d", ad->plmn_info.network_list[cnt].plmn_id); + + tapi_ret = tel_select_network_manual(ad->handle, + plmn_id, ad->plmn_info.network_list[cnt].access_technology, + setting_tapi_set_plmn_mode_cb, ad); if(tapi_ret != TAPI_API_SUCCESS) { SETTING_TRACE_DEBUG("%s*** [ERR] "\ "tel_select_network_manual. "\ - "tapi_ret=%d ***%s", SETTING_FONT_RED, + "tapi_ret=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); - setting_network_popup_create(ad, - _("IDS_ST_BODY_FAILED_TO_SELECT_NETWORK"), - FALSE); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_ST_BODY_FAILED_TO_SELECT_NETWORK"), NULL, POPUP_INTERVAL, FALSE, FALSE); + return; } else { - ad->sel_net_plmn_id = - ad->plmn_info.network_list[cnt].plmn_id; - setting_begin_progress_genlist_item(list_item); - ad->data_selected_network_item = list_item; + ad->network_ug_pop = setting_create_popup_without_btn(ad, ad->win_get, NULL, + _("IDS_COM_POP_PROCESSING"), NULL, + 0.0, TRUE, TRUE); + ad->sel_act = ad->plmn_info.network_list[cnt].access_technology; + FREE(ad->sel_network); + ad->sel_network = strdup(ad->plmn_info.network_list[cnt].network_name); } } } -void setting_network_select_network_chk_changed(void *data, Evas_Object *obj, - void *event_info) +void __switch_automatic_network(Setting_GenGroupItem_Data *list_item) +{ + SETTING_TRACE_BEGIN; + ret_if(!list_item || !list_item->userdata || !list_item->keyStr); + ret_if(0 != safeStrCmp(list_item->keyStr, "IDS_COM_BODY_AUTOMATIC")); + SettingNetworkUG *ad = list_item->userdata; + SETTING_TRACE("The value of toogle changes to be %d", list_item->chk_status); + if (list_item->chk_status) //set automatic + { + Elm_Object_Item *last_item = elm_genlist_last_item_get(ad->genlist_sel_network); + SETTING_TRACE("ad->data_auto_network_item->item:%p", ad->data_auto_network_item->item); + for (;;) { + last_item = elm_genlist_last_item_get(ad->genlist_sel_network); + SETTING_TRACE("last_item:%p", last_item); + if (last_item == ad->data_auto_network_item->item) { + break; + } + elm_object_item_del(last_item); + } + + __register_network(list_item); + } + else //select a plmn + { + //__register_network(list_item); + int tapi_ret; + //searching list + tapi_ret = tel_search_network(ad->handle, setting_tapi_search_network_cb, ad); //ASYNC API - TAPI_EVENT_NETWORK_SEARCH_CNF + if(tapi_ret != TAPI_API_SUCCESS) { // error handling.. + SETTING_TRACE_ERROR("%s*** [ERR] tel_search_network. tapi_ret=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _(STR_SETTING_OPERATION_FAILED), NULL, POPUP_INTERVAL, FALSE, FALSE); + + // put error handler on the end of this function. + //rollback.. + list_item->chk_status = TRUE; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + return; + } + ad->b_searching_network = TRUE; + ad->data_search_network_item = setting_create_Gendial_field_1radio( + ad->genlist_sel_network, + &itc_1text_2icon_2, + NULL, NULL, + SWALLOW_Type_1RADIO_1SEARCH, + ad->chk_sel, -1, NULL, NULL); + if (ad->data_auto_network_item) + { + elm_genlist_item_item_class_update(ad->data_auto_network_item->item, &(itc_2text_1icon_7)); + } + } +} + +void setting_network_select_network_chk_changed(void *data, Evas_Object *obj, void *event_info) { SETTING_TRACE_BEGIN; retm_if(data == NULL || obj == NULL, "Parameter is NULL"); - Setting_GenGroupItem_Data* list_item = (Setting_GenGroupItem_Data *)data; - - list_item->chk_status = elm_radio_value_get(obj); - SETTING_TRACE("The value of radio changes to be %d", - list_item->chk_status); - setting_network_register_network(list_item); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)data; + if (0 == safeStrCmp(list_item->keyStr, "IDS_COM_BODY_AUTOMATIC")) + { + list_item->chk_status = elm_check_state_get(obj); + __switch_automatic_network(list_item); + } + else //"IDS_COM_BODY_AUTOMATIC" + { + list_item->chk_status = elm_radio_value_get(obj); + SETTING_TRACE("The value of radio changes to be %d", list_item->chk_status); + __register_network(list_item); + } + } -void setting_network_Gendial_select_plmn_cb(void *data, Evas_Object *obj, - void *event_info) +void setting_network_Gendial_select_plmn_cb(void *data, Evas_Object *obj, void *event_info) { SETTING_TRACE_BEGIN; retm_if(data == NULL || event_info == NULL, "Parameter is NULL"); - + SettingNetworkUG *ad = (SettingNetworkUG*)data; Elm_Object_Item *item = (Elm_Object_Item*)event_info; elm_genlist_item_selected_set(item, 0); - Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data*)elm_object_item_data_get(item); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data*)elm_object_item_data_get(item); + + SETTING_TRACE("list_item->keyStr:%s", list_item->keyStr); + if (0 == safeStrCmp(list_item->keyStr, "IDS_COM_BODY_AUTOMATIC")) + { + list_item->chk_status = !elm_check_state_get(list_item->eo_check); + elm_check_state_set(list_item->eo_check, list_item->chk_status); + __switch_automatic_network(list_item); + return; + } + else + { + int old_chk_status = elm_radio_value_get(ad->chk_sel); + if (old_chk_status != list_item->chk_status) + { + SETTING_TRACE("The value of radio changes to be %d", + list_item->chk_status); + elm_radio_value_set(ad->chk_sel, list_item->chk_status); + __register_network(list_item); + } + } +} +void setting_network_update_sel_network(void *data) +{ + SETTING_TRACE_BEGIN; + SettingNetworkUG *ad = data; + SETTING_TRACE("ad->sel_net:%d", ad->sel_net); + SETTING_TRACE("ad->sel_network:%s", ad->sel_network); + SETTING_TRACE("sel_act = [%s(%d)]", setting_network_get_act_str(ad->sel_act),ad->sel_act); - int old_chk_status = elm_radio_value_get(ad->chk_sel); - if (old_chk_status != list_item->chk_status) + if (ad->data_auto_network_item) { + if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net) + { + SETTING_TRACE_DEBUG("After set as Automatic, update "\ + "ad->data_auto_network_item to be [%s]", + ad->sel_network); + ad->data_auto_network_item->sub_desc = (char *)g_strdup(_(ad->sel_network)); + elm_object_item_data_set( ad->data_auto_network_item->item, ad->data_auto_network_item); + elm_genlist_item_update( ad->data_auto_network_item->item); + } else { + } + } + + if (ad->data_sel_net)//it indicates TAPI is not responsed in time { - SETTING_TRACE("The value of radio changes to be %d", - list_item->chk_status); - elm_radio_value_set(ad->chk_sel, list_item->chk_status); - setting_network_register_network(list_item); + char sel_network_desc[MAX_COMMON_BUFFER_LEN] = { 0, }; + if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == ad->sel_net) { + snprintf(sel_network_desc, MAX_COMMON_BUFFER_LEN, + "%s. %s", _("IDS_COM_BODY_AUTOMATIC"), _(ad->sel_network)); + + } else { + snprintf(sel_network_desc, MAX_COMMON_BUFFER_LEN, + "%s. %s (%s)", _("IDS_COM_BODY_MANUAL"), _(ad->sel_network), + setting_network_get_act_str(ad->sel_act)); + } + + SETTING_TRACE("sel_network_desc:%s", sel_network_desc); + + G_FREE(ad->data_sel_net->sub_desc); + ad->data_sel_net->sub_desc = (char *)g_strdup(_(sel_network_desc)); + + elm_object_item_data_set(ad->data_sel_net->item, ad->data_sel_net); + elm_genlist_item_update(ad->data_sel_net->item); } } -/*****/ -UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) + +const char *setting_network_get_act_str(TelNetworkSystemType_t type) +{ + switch (type) + { + case TAPI_NETWORK_SYSTEM_NO_SRV: //0 + return "NO SERVICE"; + case TAPI_NETWORK_SYSTEM_GSM: //1 + return "GSM"; + case TAPI_NETWORK_SYSTEM_GPRS: //2 + return "GPRS"; + case TAPI_NETWORK_SYSTEM_EGPRS: //3 + return "EGPRS"; + case TAPI_NETWORK_SYSTEM_PCS1900: //4 + return "PCS1900"; + case TAPI_NETWORK_SYSTEM_UMTS: //5 + return "UMTS"; + case TAPI_NETWORK_SYSTEM_GSM_AND_UMTS: + return "GSM and UMTS"; + case TAPI_NETWORK_SYSTEM_HSDPA: + return "HSDPA"; + case TAPI_NETWORK_SYSTEM_IS95A: + return "IS95A"; + case TAPI_NETWORK_SYSTEM_IS95B: + return "IS95B"; + case TAPI_NETWORK_SYSTEM_CDMA_1X: + return "CDMA 1X"; + case TAPI_NETWORK_SYSTEM_EVDO_REV_0: + return "EV-DO rev0"; + case TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID: + return "1X and EV-DO rev0"; + case TAPI_NETWORK_SYSTEM_EVDO_REV_A: + return "EV-DO revA"; + case TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID: + return "1X and EV-DO revA"; + case TAPI_NETWORK_SYSTEM_EVDV: + return "EV-DV"; + default: + return "NO SERVICE"; + } +} + + +void __default_tapi_response_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ +} + + +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) { SETTING_TRACE_BEGIN; int ret = 0; @@ -1285,34 +1141,52 @@ UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) ret += excuteCmd(SETTING_POSTINST_FILE, 1, "network"); #else ret += vconf_set_int(VCONFKEY_SETAPPL_SELECT_NETWORK_INT, TAPI_NETWORK_SELECTIONMODE_AUTOMATIC); + ret += vconf_set_int(VCONFKEY_SETAPPL_SELECT_OLD_NT_ACT, 0); ret += vconf_set_int(VCONFKEY_SETAPPL_NETWORK_MODE_INT, TAPI_NETWORK_BAND_TYPE_ANY); ret += vconf_set_bool(VCONFKEY_3G_ENABLE, TRUE); + ret += vconf_set_bool(VCONFKEY_SETAPPL_STATE_DATA_ROAMING_BOOL, TRUE); #endif if (net_register_client((net_event_cb_t)__network_evt_cb, NULL) != NET_ERR_NONE) { SETTING_TRACE_ERROR("net_register_client. failed"); } - int request_id = 0; - int tapi_ret = tel_select_network_automatic(&request_id); - if (tapi_ret != TAPI_API_SUCCESS) { - ret++; - SETTING_TRACE_ERROR("tel_select_network_automatic. tapi_ret=%d", tapi_ret); - } - - request_id = 0; - tapi_ret = tel_set_network_band(TAPI_NETWORK_BAND_MODE_ONLY, - TAPI_NETWORK_BAND_TYPE_ANY, - &request_id); - if (tapi_ret != TAPI_API_SUCCESS) { - ret++; - SETTING_TRACE_ERROR("tel_set_network_band. tapi_ret=%d", tapi_ret); + + TapiHandle *tapi_handle = tel_init(NULL); + if (tapi_handle) { + SETTING_TRACE_DEBUG("tel_init sucessfull"); + //1.tel_select_network_automatic + int tapi_ret = tel_select_network_automatic(tapi_handle, __default_tapi_response_cb, NULL); + if (tapi_ret != TAPI_API_SUCCESS) { + ret++; + SETTING_TRACE_ERROR("tel_select_network_automatic. tapi_ret=%d", tapi_ret); + } + + //2.tel_set_network_band + tapi_ret = tel_set_network_band(tapi_handle, TAPI_NETWORK_BAND_MODE_ONLY, + TAPI_NETWORK_BAND_TYPE_ANY, + __default_tapi_response_cb, NULL); + if (tapi_ret != TAPI_API_SUCCESS) { + ret++; + SETTING_TRACE_ERROR("tel_set_network_band. tapi_ret=%d", tapi_ret); + } + + //3.don't need to receive + if (tel_deinit(tapi_handle) == TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG("tel_deinit sucessfull"); + } + } + + if (net_deregister_client() != NET_ERR_NONE) { ret++; SETTING_TRACE_ERROR("net_deregister_client failed"); } - + + //Reset connections info.. + ret += excuteCmd("/usr/bin/dbus-send", 1, NET_CON_RESET_DBUS_PARA); + SETTING_TRACE_END; return ret; } diff --git a/setting-password/CMakeLists.txt b/setting-password/CMakeLists.txt index 68e5d5a..4765fb7 100755 --- a/setting-password/CMakeLists.txt +++ b/setting-password/CMakeLists.txt @@ -4,7 +4,8 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs_password REQUIRED evas ecore edje elementary appcore-common appcore-efl ecore-imf ui-gadget bundle tapi dlog security-server) +pkg_check_modules(pkgs_password REQUIRED evas ecore edje elementary appcore-common appcore-efl ecore-imf +ui-gadget-1 capi-appfw-application tapi dlog security-server) FOREACH(flag ${pkgs_password_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") diff --git a/setting-password/include/setting-password-main.h b/setting-password/include/setting-password-main.h index 797c134..7c05c63 100755 --- a/setting-password/include/setting-password-main.h +++ b/setting-password/include/setting-password-main.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef _SETTING_PASSWORD_MAIN_H_ #define _SETTING_PASSWORD_MAIN_H_ diff --git a/setting-password/include/setting-password.h b/setting-password/include/setting-password.h old mode 100644 new mode 100755 index 5057eec..7bfeb24 --- a/setting-password/include/setting-password.h +++ b/setting-password/include/setting-password.h @@ -1,41 +1,58 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef _SETTING_PASSWORD_H_ #define _SETTING_PASSWORD_H_ #include -#include #include #include #include #include #include -#include +#include #include -#include -#include -#include #include #include +#include + #include +#ifdef SUPPORT_MDM +#include +#define MAX_DESC_BUF_SIZE 2048 +#define DESC_BUF1_SIZE 256 +#define DESC_BUF2_SIZE 128 + +#define NEW_PASSWORD_NECESSARY "New password is necessary because of new security policy." +#define PASSWORD_MUST_DIGITS "Password must consist of at least %d digit(s)." +#define PASSWORD_MUST_ALPHANUMERIC "Password must consist of at least %d alphanumeric character(s)." +#define PASSWORD_MUST_NOT_MATCH_PREV "Password must not match previous passwords." +#define ENTER_ANOTHER_PASSWORD "Enter another password." +#define PASSWORD_EXPIRED "Password expired." +#define MAX_NUM_REACHED "Maxinum number of password entry attempts reached." +#endif + #define SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH 4 #define SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH 16 #define SETTING_PW_UG_PRIVACY_PASSWORD_MIN_LENGTH 4 @@ -48,6 +65,7 @@ #define SETTING_PW_UG_PUK_MAX_LENGTH 8 #define SETTING_PW_MAX_TITLE_LENGTH MAX_DISPLAY_NAME_LEN_ON_UI +#define PASSWORD_EMPTY _("IDS_ST_BODY_PASSWORD_EMPTY") #define ATTEMPT_DESC _("IDS_ST_POP_PD_ATTEMPT_LEFT") /* "%d attempt left" */ #define ATTEMPTS_DESC _("IDS_ST_POP_PD_ATTEMPTS_LEFT") /* "%d attempts left" */ #define PIN_ERR_DESC _("IDS_ST_POP_INCORRECT_PIN_PD_ATTEMPTS_LEFT") /* "Incorrect PIN. %d attempts left" */ @@ -56,30 +74,54 @@ #define PW_ERR_DESC _("IDS_ST_POP_INCORRECT_PASSWORD") /* "Incorrect password" */ #define PW_ERR_DELAY_DESC _("IDS_ST_BODY_ENTER_PASSWORD_AGAIN_AFTER_PD_SECONDS") /* "Please enter password again after %d seconds" */ #define PW_ERR_DELAY_TIME 30 +#define ATTEMPT_INFINITE 999999 + +#define PW_SHORT_GUIDE_CURRENT "IDS_ST_BODY_CURRENT" +#define PW_SHORT_GUIDE_NEW "IDS_ST_BODY_NEW" +#define PW_SHORT_GUIDE_CONFIRM "IDS_ST_BODY_CONFIRM" typedef enum { - SETTING_PW_TYPE_POWER_ON_LOCK, - SETTING_PW_TYPE_PHONE_LOCK, - SETTING_PW_TYPE_PHONE_LOCK_ON, + SETTING_PW_TYPE_PASSWORD, SETTING_PW_TYPE_SET_PASSWORD, - SETTING_PW_TYPE_SIMPLE_PASSWORD, SETTING_PW_TYPE_CHANGE_PASSWORD, + SETTING_PW_TYPE_SIMPLE_PASSWORD, + SETTING_PW_TYPE_SET_SIMPLE_PASSWORD, + SETTING_PW_TYPE_CHANGE_SIMPLE_PASSWORD, + SETTING_PW_TYPE_ENTER_LOCK_TYPE, SETTING_PW_TYPE_SIM_LOCK_ON, SETTING_PW_TYPE_SIM_LOCK_OFF, SETTING_PW_TYPE_PIN_LOCK_ON, SETTING_PW_TYPE_PIN_LOCK_OFF, SETTING_PW_TYPE_CHANGE_PIN1, - SETTING_PW_TYPE_FDN_MODE_ON, - SETTING_PW_TYPE_FDN_MODE_OFF, SETTING_PW_TYPE_CHANGE_PIN2, SETTING_PW_TYPE_PIN1_BLOCKED, SETTING_PW_TYPE_PIN2_BLOCKED, SETTING_PW_TYPE_RESET, - SETTING_PW_TYPE_CLEAR, - SETTING_PW_TYPE_LOCK_FOR_APP, +#ifdef SUPPORT_MDM + SETTING_PW_TYPE_MDM_NEW_POLICY, /* for setting password according to new policy */ + SETTING_PW_TYPE_MDM_CHANGE_PASSWORD, /* for changing password by force : mdm_enforce_password_change() */ + SETTING_PW_TYPE_MDM_TO_SIMPLE, +#endif SETTING_PW_TYPE_MAX, } setting_pw_type; + +#ifdef SUPPORT_MDM +typedef enum { + SETTING_PW_ERROR_INVALID_LENGTH = -1, /* if length of password is wrong, */ + SETTING_PW_ERROR_INCLUDE_NO_LETTER = -2, /* if password that user enter has no letter, */ + SETTING_PW_ERROR_NO_MATCH_WITH_POLICY = -3, /* if password that user enter does not match with policy, */ + SETTING_PW_ERROR_NO_MATCH_MIN_COMPLEX = -4, /* if password that user enter has no letter, */ +} setting_pw_errors_for_mdm; + +typedef enum { + SETTING_PW_STATUS_OK = 0, + SETTING_PW_STATUS_EXPIRED, + SETTING_PW_STATUS_MAX_FAILED, + SETTING_PW_STATUS_MAX, +} setting_pw_status_for_mdm; +#endif + struct _pw_item { int pw_type_num; char *pw_type_string; @@ -116,6 +158,13 @@ typedef enum { SIM_UNKNOWN_ERROR, } sim_stat_value; +typedef enum { + SETTING_PW_NAVIBAR_WITH_NO_BTN, + SETTING_PW_NAVIBAR_WITH_LEFT_BTN, + SETTING_PW_NAVIBAR_WITH_RIGHT_BTN, + SETTING_PW_NAVIBAR_WITH_BOTH_BTN, +} setting_pw_navibar_style_t; + typedef struct _tapi_request_event { unsigned int sid; int event; @@ -136,11 +185,13 @@ typedef struct _tapi_request_tapi_info { /** * Setting Password UG context - * all UG function has void* as an agument. this is casted back to SettingPasswordUG + * all UG function has void* as an agument. this is casted back to SettingPasswordUG * and the functions access app context. */ typedef struct _SettingPasswordUG { - struct ui_gadget *ug; + ui_gadget_h ug; + TapiHandle *handle; + TelSimSecResult_t *verify_puks_result; /* add more variables here (move your appdata to here) */ Evas *evas; @@ -149,7 +200,7 @@ typedef struct _SettingPasswordUG { Evas_Object *ly_main; setting_pw_type view_type; - const char *view_type_string; + char *view_type_string; Setting_GenGroupItem_Data *ed_pw1; Setting_GenGroupItem_Data *ed_pw2; @@ -172,6 +223,19 @@ typedef struct _SettingPasswordUG { Evas_Object *scroller; int disable_item_type; +#ifdef SUPPORT_MDM + int is_expired; + Elm_Object_Item *mdm_desc; + Elm_Genlist_Item_Class itc_mdm_desc; + /* for support mdm policy */ + mdm_result_t mdm_status; + mdm_data_t *mdm_data; + mdm_password_policy_t *mdm_policy; + Ecore_Event_Handler *event_handler; + char *guide_str; + char *step1_str; +#endif + /* for simple password */ Elm_Genlist_Item_Class itc_title; Elm_Genlist_Item_Class itc_sp_bg_1icon; @@ -179,35 +243,43 @@ typedef struct _SettingPasswordUG { Evas_Object *sp_entry1; Evas_Object *sp_entry2; Evas_Object *sp_entry3; - Evas_Object *sp_entry4; + Evas_Object *sp_entry4; Evas_Object *sp_focused; int sp_title_index; char *cur_pwd; - int is_simple_password_on; + //int is_simple_password_on; + int screen_lock_type; int is_description; + int is_empty; bool destroy; Ecore_Timer *remove_timer; + Ecore_Timer *set_history_timer; /* end */ - + } SettingPasswordUG; extern setting_view setting_view_password_main; -int setting_password_ug_subscribe_sim_events(SettingPasswordUG *ad); -int setting_password_ug_unsubscribe_sim_events(SettingPasswordUG *ad); +void setting_sim_change_pins_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_sim_verify_puks_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_sim_facility_enable_cb(TapiHandle *handle, int result, void *data, void *user_data); +void setting_sim_facility_disable_cb(TapiHandle *handle, int result, void *data, void *user_data); void setting_password_ug_popup_resp_cb(void *data, Evas_Object *obj, void *event_info); void setting_password_ug_create_popup_notitle_nobtn(void *data, char *str, int destroy); void setting_password_ug_display_desc(void *data, char *desc, int destroy); +#ifdef SUPPORT_MDM +void setting_password_ug_display_mdm_desc(void *data, const char* guide_text); +#endif extern void setting_password_ug_check_attemps_left(void *data); int setting_password_is_password_empty(); -int setting_password_check_password(const char *challenge); +int setting_password_check_password(const char *challenge, unsigned int *remain_attempt, unsigned int *valid_sec); int setting_password_set_password(const char *cur_pwd, const char *new_pwd, void *data); #endif diff --git a/setting-password/src/setting-password-main.c b/setting-password/src/setting-password-main.c old mode 100644 new mode 100755 index 41f97ea..f523084 --- a/setting-password/src/setting-password-main.c +++ b/setting-password/src/setting-password-main.c @@ -1,24 +1,34 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #include +#include #include +#include + +#ifdef SUPPORT_MDM +#include +#include +#endif static int setting_password_main_create(void *cb); static int setting_password_main_destroy(void *cb); @@ -32,7 +42,6 @@ setting_view setting_view_password_main = { .cleanup = setting_password_main_cleanup, }; -/** @todo add i18n supports */ const char *sp_titles[5] = { "IDS_ST_BODY_ENTER_PASSWORD", "IDS_ST_BODY_ENTER_NEW_PASSWORD", "IDS_ST_BODY_ENTER_PASSWORD_AGAIN", @@ -50,6 +59,10 @@ static void _sp_changed_cb2(void *data, Evas_Object *obj, void *event_info); static void _sp_changed_cb3(void *data, Evas_Object *obj, void *event_info); static void _sp_changed_cb4(void *data, Evas_Object *obj, void *event_info); +#ifdef SUPPORT_MDM +int _count_string(const char *str, int *cnt_letter, int *cnt_digit, int *cnt_sym); +#endif + /* *************************************************** * *basic func @@ -61,6 +74,7 @@ __password_main_gl_mouse_up(void *data, Evas *e, Evas_Object *obj, { ret_if(!data); SettingPasswordUG *ad = (SettingPasswordUG *) data; + if (ad->ed_pw1) { setting_hide_input_pannel_cb(ad->ed_pw1->eo_check); } @@ -78,32 +92,22 @@ static char *setting_password_main_get_title_str(void *data) retvm_if(data == NULL, NULL, "[Setting > Password] Data parameter is NULL"); SettingPasswordUG *ad = (SettingPasswordUG *) data; - char title[MAX_DISPLAY_NAME_LEN_ON_UI] ={0,}; switch (ad->view_type) { - case SETTING_PW_TYPE_POWER_ON_LOCK: - case SETTING_PW_TYPE_PHONE_LOCK: - case SETTING_PW_TYPE_RESET: - case SETTING_PW_TYPE_CLEAR: - case SETTING_PW_TYPE_SIMPLE_PASSWORD: + case SETTING_PW_TYPE_PASSWORD: + case SETTING_PW_TYPE_SET_PASSWORD: case SETTING_PW_TYPE_CHANGE_PASSWORD: + case SETTING_PW_TYPE_SIMPLE_PASSWORD: + case SETTING_PW_TYPE_SET_SIMPLE_PASSWORD: + case SETTING_PW_TYPE_CHANGE_SIMPLE_PASSWORD: +#ifdef SUPPORT_MDM + case SETTING_PW_TYPE_MDM_NEW_POLICY: + case SETTING_PW_TYPE_MDM_CHANGE_PASSWORD: + case SETTING_PW_TYPE_MDM_TO_SIMPLE: +#endif return _("IDS_COM_BODY_AUTH_PASSWORD"); break; - case SETTING_PW_TYPE_SET_PASSWORD: - if(safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_LOCK_FOR_APP") == 0) - { - snprintf(title, sizeof(title), "%s %s", _("IDS_ST_BODY_PHONE_LOCK"), _("IDS_COM_BODY_AUTH_PASSWORD")); - return strdup(title); - } - else - { - return _("IDS_COM_BODY_AUTH_PASSWORD"); - } - break; - case SETTING_PW_TYPE_LOCK_FOR_APP: - snprintf(title, sizeof(title), "%s %s", _("IDS_ST_BODY_PHONE_LOCK"), _("IDS_COM_BODY_AUTH_PASSWORD")); - return strdup(title); - break; + case SETTING_PW_TYPE_SIM_LOCK_ON: case SETTING_PW_TYPE_SIM_LOCK_OFF: return _("IDS_COM_BODY_AUTH_PASSWORD"); @@ -116,11 +120,6 @@ static char *setting_password_main_get_title_str(void *data) return _("IDS_ST_BODY_CHANGE_PIN1"); break; - case SETTING_PW_TYPE_FDN_MODE_ON: - case SETTING_PW_TYPE_FDN_MODE_OFF: - return _("IDS_ST_BODY_PIN2"); - break; - case SETTING_PW_TYPE_CHANGE_PIN2: return _("IDS_ST_BODY_CHANGE_PIN2"); break; @@ -150,10 +149,10 @@ _sp_back_key_up(void *data, Evas *e, Evas_Object *obj, void *event) ret_if(ad->sp_focused == NULL || ad->sp_entry1 == NULL || ad->sp_entry2 == NULL || ad->sp_entry3 == NULL || ad->sp_entry4 == NULL); - - Evas_Object *cur_entry = NULL; + + Evas_Object *cur_entry = NULL; Evas_Object *move_to = NULL; - + Evas_Event_Key_Up *ev = (Evas_Event_Key_Up*)event; cur_entry = ad->sp_focused; @@ -179,9 +178,10 @@ _sp_back_key_up(void *data, Evas *e, Evas_Object *obj, void *event) { return; } - - if(strcmp(ev->keyname, "BackSpace") == 0) + + if(strcmp(ev->keyname, "BackSpace") == 0) { + SETTING_TRACE_DEBUG("BackSpace Key Up"); elm_object_focus_set(move_to, EINA_TRUE); elm_entry_entry_set(move_to, ""); elm_entry_cursor_end_set(move_to); @@ -189,46 +189,65 @@ _sp_back_key_up(void *data, Evas *e, Evas_Object *obj, void *event) } } -Elm_Object_Item* __create_navi_bar_with_left_button(void *data, Evas_Object *content, Evas_Object *navibar) +Elm_Object_Item* __create_navibar(void *data, Evas_Object *content, Evas_Object *navibar, setting_pw_navibar_style_t style) { + SETTING_TRACE_BEGIN; retv_if(data == NULL || content == NULL || navibar == NULL, NULL); SettingPasswordUG *ad = (SettingPasswordUG *)data; - Elm_Object_Item *navi_item = setting_create_navi_bar_top_buttons(setting_password_main_get_title_str(ad), - _("IDS_COM_SK_CANCEL"), NULL, NULL, + Elm_Object_Item *navi_item = NULL; + Evas_Object *done_btn = NULL; + + switch(style) + { + case SETTING_PW_NAVIBAR_WITH_LEFT_BTN : + SETTING_TRACE_DEBUG("with left btn"); + navi_item = setting_create_navi_bar_top_buttons(setting_password_main_get_title_str(ad), + NULL, _("IDS_COM_SK_CANCEL"), NULL, + NULL, setting_password_main_click_softkey_cancel_cb, - setting_password_main_click_softkey_done_cb, NULL, ad, content, navibar); - retv_if(!navi_item, NULL); - return navi_item; -} - -Elm_Object_Item* __create_navi_bar_with_both_button(void *data, Evas_Object *content, Evas_Object *navibar) -{ - retv_if(data == NULL || content == NULL || navibar == NULL, NULL); - - SettingPasswordUG *ad = (SettingPasswordUG *)data; - - Elm_Object_Item *navi_item = setting_create_navi_bar_top_buttons(setting_password_main_get_title_str(ad), - _("IDS_COM_SK_CANCEL"), _("IDS_COM_SK_DONE"), NULL, - setting_password_main_click_softkey_cancel_cb, + break; + case SETTING_PW_NAVIBAR_WITH_RIGHT_BTN : + SETTING_TRACE_DEBUG("with right btn"); + navi_item = setting_create_navi_bar_top_buttons(setting_password_main_get_title_str(ad), + _("IDS_COM_SK_DONE"), NULL, NULL, + setting_password_main_click_softkey_done_cb, NULL, + NULL, ad, content, navibar); + break; + case SETTING_PW_NAVIBAR_WITH_BOTH_BTN: + SETTING_TRACE_DEBUG("with both btn"); + navi_item = setting_create_navi_bar_top_buttons(setting_password_main_get_title_str(ad), + _("IDS_COM_SK_DONE"), _("IDS_COM_SK_CANCEL"), NULL, setting_password_main_click_softkey_done_cb, + setting_password_main_click_softkey_cancel_cb, NULL, ad, content, navibar); - + break; + case SETTING_PW_NAVIBAR_WITH_NO_BTN: + SETTING_TRACE_DEBUG("with no btn"); + navi_item = setting_create_navi_bar_top_buttons(setting_password_main_get_title_str(ad), + NULL, NULL, NULL, + NULL, + NULL, + NULL, ad, content, navibar); + default: + break; + } retv_if(!navi_item, NULL); - Evas_Object *done_btn = elm_object_item_part_content_get(navi_item, "title_right_btn"); + done_btn = elm_object_item_part_content_get(navi_item, NAVI_BTN_STYLE_LEFT); if(done_btn != NULL) { - setting_disable_evas_object(done_btn); - setting_dim_evas_object(done_btn, TRUE); + setting_disable_evas_object(done_btn); + setting_dim_evas_object(done_btn, TRUE); } return navi_item; } static int __create_common_password_frame(void *data) { + SETTING_TRACE_BEGIN; retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); SettingPasswordUG *ad = (SettingPasswordUG *)data; @@ -241,54 +260,49 @@ static int __create_common_password_frame(void *data) { evas_object_del(ad->scroller); } - + Evas_Object *pw_list = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(pw_list, "dialogue"); if(pw_list == NULL) return SETTING_RETURN_FAIL; elm_genlist_clear(pw_list); /* first to clear list */ - elm_genlist_homogeneous_set(pw_list, EINA_TRUE); elm_genlist_mode_set(pw_list, ELM_LIST_COMPRESS); #if SUPPORT_BOTTOM_BTNS ad->ly_main = setting_create_win_layout(ad->win_main_layout, ad->win_get); retv_if(!ad->ly_main, SETTING_RETURN_FAIL); - + navi_bar = setting_create_navi_bar(ad->ly_main); retv_if(!navi_bar, SETTING_RETURN_FAIL); - - - if((ad->is_simple_password_on == 1) && - ((ad->view_type == SETTING_PW_TYPE_PHONE_LOCK) - || (ad->view_type == SETTING_PW_TYPE_SET_PASSWORD) - || (ad->view_type == SETTING_PW_TYPE_SIMPLE_PASSWORD) - || (ad->view_type == SETTING_PW_TYPE_CHANGE_PASSWORD) - || (ad->view_type == SETTING_PW_TYPE_RESET) - || (ad->view_type == SETTING_PW_TYPE_LOCK_FOR_APP) )) + +#ifdef SUPPORT_MDM + if((ad->view_type == SETTING_PW_TYPE_MDM_NEW_POLICY) + || (ad->view_type == SETTING_PW_TYPE_MDM_CHANGE_PASSWORD)) + { + ad->navi_it = __create_navibar(ad, pw_list, navi_bar, SETTING_PW_NAVIBAR_WITH_BOTH_BTN); + } + else if(ad->view_type == SETTING_PW_TYPE_MDM_TO_SIMPLE) + { + ad->navi_it = __create_navibar(ad, pw_list, navi_bar, SETTING_PW_NAVIBAR_WITH_LEFT_BTN); + } + else + { +#endif + if( (ad->view_type == SETTING_PW_TYPE_SIMPLE_PASSWORD) + || (ad->view_type == SETTING_PW_TYPE_SET_SIMPLE_PASSWORD) + || (ad->view_type == SETTING_PW_TYPE_CHANGE_SIMPLE_PASSWORD)) { - if((ad->view_type == SETTING_PW_TYPE_SIMPLE_PASSWORD) && count == 2) - { - /* from simple password to normal password */ - ad->navi_it = __create_navi_bar_with_both_button(ad, pw_list, navi_bar); - } - else - { - ad->navi_it = __create_navi_bar_with_left_button(ad, pw_list, navi_bar); - } + ad->navi_it = __create_navibar(ad, pw_list, navi_bar, SETTING_PW_NAVIBAR_WITH_LEFT_BTN); } else { - if((ad->view_type == SETTING_PW_TYPE_SIMPLE_PASSWORD) && count == 2) - { - /* from normal password to simple password */ - ad->navi_it = __create_navi_bar_with_left_button(ad, pw_list, navi_bar); - } - else - { - ad->navi_it = __create_navi_bar_with_both_button(ad, pw_list, navi_bar); - } + ad->navi_it = __create_navibar(ad, pw_list, navi_bar, SETTING_PW_NAVIBAR_WITH_BOTH_BTN); + } +#ifdef SUPPORT_MDM } +#endif retv_if(!ad->navi_it, SETTING_RETURN_FAIL); #else @@ -310,7 +324,7 @@ static int __create_common_password_frame(void *data) evas_object_event_callback_add(pw_list, EVAS_CALLBACK_MOUSE_UP, __password_main_gl_mouse_up, ad); - Elm_Object_Item *item = elm_genlist_item_append(pw_list, + Elm_Object_Item *item = elm_genlist_item_append(pw_list, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); @@ -329,7 +343,7 @@ static void _copy_chars_from_sp_entries(void *data, char *collection) if(ad->sp_entry1 == NULL || ad->sp_entry2 == NULL || ad->sp_entry3 == NULL || ad->sp_entry4 == NULL) return; - + strncpy(&collection[0], elm_entry_entry_get(ad->sp_entry1), 1); strncpy(&collection[1], elm_entry_entry_get(ad->sp_entry2), 1); strncpy(&collection[2], elm_entry_entry_get(ad->sp_entry3), 1); @@ -347,7 +361,7 @@ static int _handle_step1(void *data, char *collection) char svalue[SHA256_DIGEST_LENGTH]; memset(svalue, 0x0, SHA256_DIGEST_LENGTH); - _copy_chars_from_sp_entries(ad, collection); + _copy_chars_from_sp_entries(ad, collection); ret = setting_password_main_check_simple_password(collection); if(ret < 0) @@ -355,24 +369,21 @@ static int _handle_step1(void *data, char *collection) setting_password_main_draw_simple_password(ad, 3); return SETTING_RETURN_FAIL; } - - ret = setting_password_check_password(collection); + + ret = setting_password_check_password(collection, NULL, NULL); if(ret != SETTING_RETURN_SUCCESS) { setting_password_main_draw_simple_password(ad, 3); - return SETTING_COMPARE_PW_FAIL; + return SETTING_COMPARE_PW_FAIL; } - - /* reset static variables */ - memset(collection, 0x00, SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH+1); int value = 0; - if (0 == safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_PHONE_LOCK")) + if ( 0 == safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_SIMPLE_PASSWORD")) { setting_get_bool_slp_key(BOOL_SLP_SETTING_POWER_ON_LOCK, &value, &err); SETTING_TRACE_DEBUG("get VCONF POWER_ON_LOCK : %d", value); - + if (value == 0) ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_POWER_ON_LOCK, SETTING_ON_OFF_BTN_ON, &err); @@ -387,24 +398,31 @@ static int _handle_step1(void *data, char *collection) /* Correct Password. Send Bundle to caller for status change */ } - - bundle *b = bundle_create(); - if (!b) + + service_h svc; + if (service_create(&svc)) { setting_password_main_draw_simple_password(ad, 3); return SETTING_RETURN_FAIL; } - bundle_add(b, "result", ad->view_type_string); - ug_send_result(ad->ug, b); + service_add_extra_data(svc, "result", ad->view_type_string); + + if(0 == safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_ENTER_LOCK_TYPE")) + service_add_extra_data(svc, "current", collection); + + /* reset static variables */ + memset(collection, 0x00, SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH+1); + + ug_send_result(ad->ug, svc); SETTING_TRACE("Send Result : %s\n", ad->view_type_string); - bundle_free(b); + service_destroy(svc); /* Send destroy request */ ug_destroy_me(ad->ug); return SETTING_RETURN_SUCCESS; } - +#if DISABLED_CODE static int _handle_step_sp(void *data, int *step, char *collection1, char *collection2) { retv_if(data == NULL, SETTING_RETURN_FAIL); @@ -429,7 +447,7 @@ static int _handle_step_sp(void *data, int *step, char *collection1, char *colle SETTING_TRACE_DEBUG("collection_step1 : %s", collection1); - ret = setting_password_check_password(collection1); + ret = setting_password_check_password(collection1, NULL, NULL); if(ret != SETTING_RETURN_SUCCESS) { setting_password_main_draw_simple_password(ad, 3); @@ -463,11 +481,22 @@ static int _handle_step_sp(void *data, int *step, char *collection1, char *colle ecore_timer_del(ad->remove_timer); ad->remove_timer = NULL; } - + +#ifdef SUPPORT_MDM + if((ad->mdm_policy) && (ad->mdm_policy->quality != MDM_PASSWORD_QUALITY_UNSPECIFIED)) + { + ad->view_type = SETTING_PW_TYPE_MDM_NEW_POLICY; + ad->step1_str = ad->cur_pwd; + } + else + { + ad->step1_str = NULL; + } +#endif __create_common_password_frame(ad); setting_password_main_draw_2line_password(ad, NULL); } - else if(ad->is_simple_password_on == 0) + else if(ad->is_simple_password_on == 0) { SETTING_TRACE_DEBUG("case OFF->ON"); if(*step == 0) /* Enter new password */ @@ -493,10 +522,10 @@ static int _handle_step_sp(void *data, int *step, char *collection1, char *colle setting_password_main_draw_simple_password(ad, 2); return SETTING_RETURN_FAIL; } - + SETTING_TRACE_DEBUG("collection_step1 : %s", collection1); SETTING_TRACE_DEBUG("collection_step2 : %s", collection2); - + /* compare two input passwords : collection_step1, collection_step2 */ if(safeStrNCmp(collection1, collection2, 4) == 0) { @@ -506,7 +535,7 @@ static int _handle_step_sp(void *data, int *step, char *collection1, char *colle /* Modify Setting Password */ if (SETTING_RETURN_SUCCESS == ret) { SETTING_TRACE_DEBUG("success to save new password"); - + /* set vconfkey ON : if fail, try one more time. */ if(vconf_set_bool(VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL, 1) < 0) return SETTING_RETURN_FAIL; @@ -523,17 +552,17 @@ static int _handle_step_sp(void *data, int *step, char *collection1, char *colle memset(collection2, 0x00, SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH+1); /* Correct Password. Send Bundle to caller for status change */ - bundle *b = bundle_create(); - if (!b) + service_h svc; + if (service_create(&svc)) { setting_password_main_draw_simple_password(ad, 2); return SETTING_RETURN_FAIL; } - bundle_add(b, "result", ad->view_type_string); - ug_send_result(ad->ug, b); + service_add_extra_data(svc, "result", ad->view_type_string); + ug_send_result(ad->ug, svc); SETTING_TRACE("Send Result : %s\n", ad->view_type_string); - bundle_free(b); + service_destroy(svc); /* Send destroy request */ ug_destroy_me(ad->ug); } @@ -548,11 +577,12 @@ static int _handle_step_sp(void *data, int *step, char *collection1, char *colle setting_password_main_draw_simple_password(ad, 2); return SETTING_RETURN_FAIL; } - } + } } - + return SETTING_RETURN_SUCCESS; } +#endif static int _handle_step2(void *data, int *step, char *collection1, char*collection2) { @@ -568,7 +598,7 @@ static int _handle_step2(void *data, int *step, char *collection1, char*collecti ret = setting_password_main_check_simple_password(collection1); if(ret < 0) { - setting_password_main_draw_simple_password(ad, 2); + setting_password_main_draw_simple_password(ad, 1); return SETTING_RETURN_FAIL; } (*step)++; @@ -588,10 +618,22 @@ static int _handle_step2(void *data, int *step, char *collection1, char*collecti /* compare two input passwords : collection_step1, collection_step2 */ if(safeStrNCmp(collection1, collection2, 4) == 0) { - ret = setting_password_set_password(NULL, collection1, ad); +#ifdef SUPPORT_MDM + if((ad->view_type == SETTING_PW_TYPE_MDM_TO_SIMPLE) && (ad->step1_str)) + { + ret = setting_password_set_password(ad->step1_str, collection1, ad); + } + else +#endif + ret = setting_password_set_password(ad->cur_pwd, collection1, ad); + + if (SETTING_RETURN_SUCCESS == ret) + { +#ifdef SUPPORT_MDM + FREE(ad->step1_str); +#endif - if (SETTING_RETURN_SUCCESS == ret) { - if (0 == safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_PHONE_LOCK")) + if (0 == safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_PASSWORD")) { int err; int ret; @@ -599,38 +641,58 @@ static int _handle_step2(void *data, int *step, char *collection1, char*collecti ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_POWER_ON_LOCK, SETTING_ON_OFF_BTN_ON, &err); retvm_if(ret < 0, SETTING_RETURN_FAIL, "[ERR] setting vconfkey failed."); - - bundle *b = bundle_create(); - if (!b) - return SETTING_RETURN_FAIL; - - bundle_add(b, "result", "SETTING_PW_TYPE_PHONE_LOCK"); - ug_send_result(ad->ug, b); - SETTING_TRACE("Send Result : %s\n", "SETTING_PW_TYPE_PHONE_LOCK"); - bundle_free(b); } - else if (0 == safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_LOCK_FOR_APP")) +#ifdef SUPPORT_MDM + else if (0 == safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_MDM_CHANGE_PASSWORD")) { - bundle *b = bundle_create(); - if (!b) - return SETTING_RETURN_FAIL; - - bundle_add(b, "result", "SETTING_PW_TYPE_LOCK_FOR_APP"); - ug_send_result(ad->ug, b); - SETTING_TRACE("Send Result : %s\n", "SETTING_PW_TYPE_LOCK_FOR_APP"); - bundle_free(b); + int err; + int ret; + + ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_POWER_ON_LOCK, + SETTING_ON_OFF_BTN_ON, &err); + retvm_if(ret < 0, SETTING_RETURN_FAIL, "[ERR] setting vconfkey(phonelock) failed."); + + ret = vconf_set_bool(VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL, TRUE); + retvm_if(ret < 0, SETTING_RETURN_FAIL, "[ERR] setting vconfkey(simplepassword) failed."); + + mdm_set_password_status(MDM_PASSWORD_CHANGED); } - /* Display popup */ - setting_password_ug_create_popup_notitle_nobtn(ad, +#endif + + service_h svc; + if (service_create(&svc)) + return SETTING_RETURN_FAIL; + + service_add_extra_data(svc, "result", ad->view_type_string); + service_add_extra_data(svc, "current", collection1); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", ad->view_type_string); + + service_destroy(svc); + + if(safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_RESET")) + /* Display popup */ + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_POP_NEW_PASSWD_SAVED"), TRUE); + /* Send destroy request */ + ug_destroy_me(ad->ug); + } + else + { +#ifdef SUPPORT_MDM + if(ad->notify) + { + evas_object_del(ad->notify); + ad->notify = NULL; + } +#endif + setting_password_main_draw_simple_password(ad, 1); } - + *step = 0; /* reset static variables */ memset(collection1, 0x00, SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH+1); memset(collection2, 0x00, SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH+1); - /* Send destroy request */ - ug_destroy_me(ad->ug); } else { @@ -663,7 +725,7 @@ static int _handle_step3(void *data, int *step, char *collection1, char *collect return SETTING_RETURN_FAIL; } - ret = setting_password_check_password(collection1); + ret = setting_password_check_password(collection1, NULL, NULL); if(ret != SETTING_RETURN_SUCCESS) { setting_password_main_draw_simple_password(ad, 3); @@ -682,7 +744,7 @@ static int _handle_step3(void *data, int *step, char *collection1, char *collect setting_password_main_draw_simple_password(ad, 1); return SETTING_RETURN_FAIL; } - + (*step)++; setting_password_main_draw_next_simple_password(ad, 2); } @@ -701,7 +763,7 @@ static int _handle_step3(void *data, int *step, char *collection1, char *collect if(safeStrNCmp(collection2, collection3, 4) == 0) { ret = setting_password_set_password(collection1, collection2, ad); - /* Modify Setting Password */ + /* Modify Setting Password */ if (SETTING_RETURN_FAIL != ret) { /* Display popup */ setting_password_ug_create_popup_notitle_nobtn(ad, @@ -710,7 +772,7 @@ static int _handle_step3(void *data, int *step, char *collection1, char *collect /* Error Msg */ SETTING_TRACE_DEBUG("%s*** [ERR] setting_set_string_slp_key err=%d ***%s", SETTING_FONT_RED, err, SETTING_FONT_BLACK); - setting_password_ug_create_popup_notitle_nobtn(ad, + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); } } @@ -746,25 +808,19 @@ static int setting_password_main_done_simple_password(void *data, int on_locking switch(ad->view_type) { - case SETTING_PW_TYPE_RESET: - case SETTING_PW_TYPE_LOCK_FOR_APP: - case SETTING_PW_TYPE_PHONE_LOCK: /* Enter a password */ - SETTING_TRACE_DEBUG("case PHONE_LOCK"); - if(on_locking == 0) - return SETTING_RETURN_FAIL; - - return _handle_step1(ad, collection_step1); - break; - case SETTING_PW_TYPE_SIMPLE_PASSWORD: + case SETTING_PW_TYPE_SIMPLE_PASSWORD: SETTING_TRACE_DEBUG("case SIMPLE_PASSWORD"); - return _handle_step_sp(ad, &step, collection_step1, collection_step2); + return _handle_step1(ad, collection_step1); break; - case SETTING_PW_TYPE_SET_PASSWORD: - SETTING_TRACE_DEBUG("case SET_PASSWORD"); + case SETTING_PW_TYPE_SET_SIMPLE_PASSWORD: +#ifdef SUPPORT_MDM + case SETTING_PW_TYPE_MDM_TO_SIMPLE: +#endif + SETTING_TRACE_DEBUG("case SET_SIMPLE_PASSWORD"); return _handle_step2(ad, &step, collection_step1, collection_step2); break; - case SETTING_PW_TYPE_CHANGE_PASSWORD: - SETTING_TRACE_DEBUG("case CHANGE_PASSWORD"); + case SETTING_PW_TYPE_CHANGE_SIMPLE_PASSWORD: + SETTING_TRACE_DEBUG("case CHANGE_SIMPLE_PASSWORD"); return _handle_step3(ad, &step, collection_step1, collection_step2, collection_step3); break; default: @@ -776,7 +832,7 @@ static int setting_password_main_done_simple_password(void *data, int on_locking static void _sp_changed_cb1(void *data, Evas_Object *obj, void *event_info) { ret_if(data == NULL); - + SettingPasswordUG *ad = (SettingPasswordUG *)data; if((ad->sp_entry1 == NULL) || (ad->sp_entry1 != obj) || (ad->sp_entry2 == NULL)) @@ -791,19 +847,19 @@ static void _sp_changed_cb1(void *data, Evas_Object *obj, void *event_info) elm_object_focus_set(ad->sp_entry2, EINA_TRUE); elm_entry_entry_set(ad->sp_entry2, ""); elm_entry_cursor_end_set(ad->sp_entry2); - ad->sp_focused = ad->sp_entry2; + ad->sp_focused = ad->sp_entry2; } } static void _sp_changed_cb2(void *data, Evas_Object *obj, void *event_info) { ret_if(data == NULL); - + SettingPasswordUG *ad = (SettingPasswordUG *)data; if((ad->sp_entry2 == NULL) || (ad->sp_entry2 != obj) || (ad->sp_entry3 == NULL)) return; - + if(!elm_entry_is_empty(ad->sp_entry2) && elm_entry_is_empty(ad->sp_entry3)) { SETTING_TRACE_DEBUG("entry2 : %s", elm_entry_entry_get(ad->sp_entry2)); @@ -813,19 +869,19 @@ static void _sp_changed_cb2(void *data, Evas_Object *obj, void *event_info) elm_object_focus_set(ad->sp_entry3, EINA_TRUE); elm_entry_entry_set(ad->sp_entry3, ""); elm_entry_cursor_end_set(ad->sp_entry3); - ad->sp_focused = ad->sp_entry3; + ad->sp_focused = ad->sp_entry3; } } static void _sp_changed_cb3(void *data, Evas_Object *obj, void *event_info) { ret_if(data == NULL); - + SettingPasswordUG *ad = (SettingPasswordUG *)data; if((ad->sp_entry3 == NULL) || (ad->sp_entry3 != obj) || (ad->sp_entry4 == NULL)) return; - + if(!elm_entry_is_empty(ad->sp_entry3) && elm_entry_is_empty(ad->sp_entry4)) { SETTING_TRACE_DEBUG("entry3 : %s", elm_entry_entry_get(ad->sp_entry3)); @@ -835,7 +891,7 @@ static void _sp_changed_cb3(void *data, Evas_Object *obj, void *event_info) elm_object_focus_set(ad->sp_entry4, EINA_TRUE); elm_entry_entry_set(ad->sp_entry4, ""); elm_entry_cursor_end_set(ad->sp_entry4); - ad->sp_focused = ad->sp_entry4; + ad->sp_focused = ad->sp_entry4; } } @@ -844,7 +900,7 @@ static void _sp_changed_cb4(void *data, Evas_Object *obj, void *event_info) ret_if(data == NULL); static int counter = 0; - + SettingPasswordUG *ad = (SettingPasswordUG *)data; if((ad->sp_entry4 == NULL) || (ad->sp_entry4 != obj)) @@ -866,7 +922,7 @@ static void _sp_changed_cb4(void *data, Evas_Object *obj, void *event_info) elm_object_focus_set(ad->sp_entry4, EINA_FALSE); /* end */ counter++; - + if(counter == ENTRY_CALLBACK_REPEAT_MAX) { int ret = 0; @@ -879,6 +935,13 @@ static void _sp_changed_cb4(void *data, Evas_Object *obj, void *event_info) } else if(ret == SETTING_COMPARE_PW_FAIL) { + if (0 == safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_RESET") + || 0 == safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_ENTER_LOCK_TYPE")) + { + setting_password_ug_display_desc(ad, _("IDS_ST_BODY_INCORRECT_PASSWORD"), FALSE); + return; + } + /** @todo setting_password_ug_check_attemps_left */ setting_int_slp_list item_attempts_left; setting_str_slp_list item_lock_timestamp; @@ -906,7 +969,7 @@ static void _sp_changed_cb4(void *data, Evas_Object *obj, void *event_info) snprintf(temp, sizeof(temp), "%s. %s.", PW_ERR_DESC, ATTEMPTS_DESC); else snprintf(temp, sizeof(temp), "%s. %s.", PW_ERR_DESC, ATTEMPT_DESC); - + snprintf(speciliztion, sizeof(speciliztion), temp, value); setting_password_ug_display_desc(ad, speciliztion, FALSE); } else if (value == 0) { @@ -930,15 +993,13 @@ static void _sp_changed_cb4(void *data, Evas_Object *obj, void *event_info) char temp[MAX_SPECIALIZITION_LEN] = {0,}; snprintf(temp, sizeof(temp), PW_ERR_DELAY_DESC, PW_ERR_DELAY_TIME); setting_password_ug_create_popup_notitle_nobtn(ad, temp, TRUE); - } + } } else { /* if you have more cases, modify here. */ } counter = 0; - return; - } return; } @@ -1010,7 +1071,7 @@ static Evas_Object* __gl_sp_content_get(void *data, Evas_Object *obj, const char return entry; } -static int +static int setting_password_main_create(void *cb) { SETTING_TRACE_BEGIN; @@ -1026,7 +1087,7 @@ setting_password_main_create(void *cb) ad->itc_sp_bg_1icon.func.state_get = NULL; ad->itc_sp_bg_1icon.func.del = NULL; - ret = __create_common_password_frame(ad); + ret = __create_common_password_frame(ad); if(ret < 0) return SETTING_RETURN_FAIL; @@ -1034,6 +1095,7 @@ setting_password_main_create(void *cb) setting_password_main_create_ui(ad); setting_view_password_main.is_create = 1; + SETTING_TRACE_END; return SETTING_RETURN_SUCCESS; } @@ -1047,39 +1109,34 @@ static int setting_password_main_destroy(void *cb) ecore_timer_del(ad->remove_timer); ad->remove_timer = NULL; } - - if((ad->is_simple_password_on == 1) && - ((ad->view_type == SETTING_PW_TYPE_PHONE_LOCK) - || (ad->view_type == SETTING_PW_TYPE_SET_PASSWORD) - || (ad->view_type == SETTING_PW_TYPE_SIMPLE_PASSWORD) - || (ad->view_type == SETTING_PW_TYPE_CHANGE_PASSWORD) - || (ad->view_type == SETTING_PW_TYPE_RESET) - || (ad->view_type == SETTING_PW_TYPE_LOCK_FOR_APP) )) +#ifdef SUPPORT_MDM + if(ad->set_history_timer) { - if(ad->sp_entry1) - evas_object_event_callback_del(ad->sp_entry1, EVAS_CALLBACK_KEY_UP, _sp_back_key_up); - if(ad->sp_entry2) - evas_object_event_callback_del(ad->sp_entry2, EVAS_CALLBACK_KEY_UP, _sp_back_key_up); - if(ad->sp_entry3) - evas_object_event_callback_del(ad->sp_entry3, EVAS_CALLBACK_KEY_UP, _sp_back_key_up); - if(ad->sp_entry4) - evas_object_event_callback_del(ad->sp_entry4, EVAS_CALLBACK_KEY_UP, _sp_back_key_up); + ecore_timer_del(ad->set_history_timer); + ad->set_history_timer = NULL; } - - if(ad->scroller) +#endif + if( (ad->view_type == SETTING_PW_TYPE_SIMPLE_PASSWORD) + || (ad->view_type == SETTING_PW_TYPE_SET_SIMPLE_PASSWORD) + || (ad->view_type == SETTING_PW_TYPE_CHANGE_SIMPLE_PASSWORD)) { - SETTING_TRACE_DEBUG("delete scroller"); - elm_genlist_clear(ad->scroller); - evas_object_del(ad->scroller); - ad->scroller = NULL; + evas_object_event_callback_del(ad->sp_entry1, EVAS_CALLBACK_KEY_UP, _sp_back_key_up); + evas_object_event_callback_del(ad->sp_entry2, EVAS_CALLBACK_KEY_UP, _sp_back_key_up); + evas_object_event_callback_del(ad->sp_entry3, EVAS_CALLBACK_KEY_UP, _sp_back_key_up); + evas_object_event_callback_del(ad->sp_entry4, EVAS_CALLBACK_KEY_UP, _sp_back_key_up); } +#ifdef SUPPORT_MDM + if(ad->step1_str) + FREE(ad->step1_str); +#endif + if(ad->cur_pwd) + FREE(ad->cur_pwd); if (ad->ly_main != NULL) { evas_object_del(ad->ly_main); ad->ly_main = NULL; setting_view_password_main.is_create = 0; } - return SETTING_RETURN_SUCCESS; } @@ -1128,34 +1185,24 @@ static int setting_password_main_create_ui(void *data) SETTING_TRACE_DEBUG("ad->view_type=%d ***", ad->view_type); switch (ad->view_type) { - case SETTING_PW_TYPE_POWER_ON_LOCK: - case SETTING_PW_TYPE_CLEAR: + case SETTING_PW_TYPE_PASSWORD: case SETTING_PW_TYPE_SIM_LOCK_OFF: case SETTING_PW_TYPE_PIN_LOCK_ON: case SETTING_PW_TYPE_PIN_LOCK_OFF: - case SETTING_PW_TYPE_FDN_MODE_ON: - case SETTING_PW_TYPE_FDN_MODE_OFF: +#ifdef SUPPORT_MDM + case SETTING_PW_TYPE_MDM_CHANGE_PASSWORD: +#endif setting_password_main_draw_1line_password(ad, NULL); break; - case SETTING_PW_TYPE_PHONE_LOCK: - case SETTING_PW_TYPE_RESET: - case SETTING_PW_TYPE_LOCK_FOR_APP: - if(ad->is_simple_password_on == 1) - setting_password_main_draw_simple_password(ad, 3); - else - setting_password_main_draw_1line_password(ad, NULL); - break; - case SETTING_PW_TYPE_SIM_LOCK_ON: - setting_password_main_draw_2line_password(ad, NULL); - break; case SETTING_PW_TYPE_SET_PASSWORD: - if(ad->is_simple_password_on == 1) - setting_password_main_draw_simple_password(ad, 1); - else - setting_password_main_draw_2line_password(ad, NULL); +#ifdef SUPPORT_MDM + case SETTING_PW_TYPE_MDM_NEW_POLICY: +#endif + setting_password_main_draw_2line_password(ad, NULL); break; + case SETTING_PW_TYPE_CHANGE_PASSWORD: case SETTING_PW_TYPE_CHANGE_PIN1: case SETTING_PW_TYPE_CHANGE_PIN2: case SETTING_PW_TYPE_PIN1_BLOCKED: @@ -1163,18 +1210,18 @@ static int setting_password_main_create_ui(void *data) setting_password_main_draw_3line_password(ad, NULL); break; - case SETTING_PW_TYPE_CHANGE_PASSWORD: - if(ad->is_simple_password_on == 1) - setting_password_main_draw_simple_password(ad, 3); - else - setting_password_main_draw_3line_password(ad, NULL); + case SETTING_PW_TYPE_SET_SIMPLE_PASSWORD: +#ifdef SUPPORT_MDM + case SETTING_PW_TYPE_MDM_TO_SIMPLE: + setting_password_main_draw_simple_password(ad, 1); +#endif break; + case SETTING_PW_TYPE_SIMPLE_PASSWORD: - if(ad->is_simple_password_on == 1) /* ON -> OFF */ - setting_password_main_draw_simple_password(ad, 3); - else if(ad->is_simple_password_on == 0) /* OFF -> ON */ - setting_password_main_draw_1line_password(ad, NULL); + case SETTING_PW_TYPE_CHANGE_SIMPLE_PASSWORD: + setting_password_main_draw_simple_password(ad, 3); break; + default: SETTING_TRACE_DEBUG("%s*** Unknown Password Type. ***%s", SETTING_FONT_BGREEN, SETTING_FONT_BLACK); @@ -1196,6 +1243,7 @@ setting_password_main_entry_changed_cb(void *data, Evas_Object *obj, const char *entry_str = elm_entry_entry_get(obj); list_item->sub_desc = (char *)g_strdup(entry_str); bool isFoundEmptyEntry = FALSE; + Evas_Object *layout = elm_object_parent_widget_get(obj); elm_object_part_text_set(layout, "elm.guidetext", ""); @@ -1204,6 +1252,8 @@ setting_password_main_entry_changed_cb(void *data, Evas_Object *obj, entry_str = ad->ed_pw1->sub_desc; if (NULL == entry_str || '\0' == entry_str[0]) { isFoundEmptyEntry = TRUE; + layout = elm_object_parent_widget_get(ad->ed_pw1->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); break; } } @@ -1211,6 +1261,8 @@ setting_password_main_entry_changed_cb(void *data, Evas_Object *obj, entry_str = ad->ed_pw2->sub_desc; if (NULL == entry_str || '\0' == entry_str[0]) { isFoundEmptyEntry = TRUE; + layout = elm_object_parent_widget_get(ad->ed_pw2->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); break; } } @@ -1218,6 +1270,8 @@ setting_password_main_entry_changed_cb(void *data, Evas_Object *obj, entry_str = ad->ed_pw3->sub_desc; if (NULL == entry_str || '\0' == entry_str[0]) { isFoundEmptyEntry = TRUE; + layout = elm_object_parent_widget_get(ad->ed_pw3->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); break; } } @@ -1227,7 +1281,7 @@ setting_password_main_entry_changed_cb(void *data, Evas_Object *obj, bool disableFlag = isFoundEmptyEntry; #if SUPPORT_BOTTOM_BTNS - Evas_Object *done_btn = elm_object_item_part_content_get(ad->navi_it, "title_right_btn"); + Evas_Object *done_btn = elm_object_item_part_content_get(ad->navi_it, NAVI_BTN_STYLE_LEFT); if (disableFlag) { if (!evas_object_pass_events_get(done_btn)) { /* it had not yet been disabled */ setting_disable_evas_object(done_btn); @@ -1244,31 +1298,40 @@ setting_password_main_entry_changed_cb(void *data, Evas_Object *obj, } -static Eina_Bool __focus_on_idler(void *data) -{ - /* error check */ +static Eina_Bool __focus_sp_on_idler(void *data) +{ + /* error check */ retv_if(data == NULL, FALSE); - SettingPasswordUG *ad = (SettingPasswordUG *) data; - + SettingPasswordUG *ad = (SettingPasswordUG *) data; + + if(ad->sp_entry1) + { + elm_object_focus_set(ad->sp_entry1, EINA_TRUE); + ad->sp_focused = ad->sp_entry1; + } + + return ECORE_CALLBACK_CANCEL; +} + +static Eina_Bool __focus_on_idler(void *data) +{ + /* error check */ + retv_if(data == NULL, FALSE); + + SettingPasswordUG *ad = (SettingPasswordUG *) data; - if((ad->is_simple_password_on == FALSE) && (ad->ed_pw1 != NULL)) - { + if(ad->ed_pw1) + { if (ad->ed_pw1->isFocusFlag || (ad->ed_pw1->eo_check != NULL)) - { + { /* no matter how many edifileds, it only need focus on 1st editfiled */ elm_object_focus_set(ad->ed_pw1->eo_check, EINA_TRUE); - } - } - - if((ad->is_simple_password_on == TRUE) && (ad->sp_entry1 != NULL)) - { - elm_object_focus_set(ad->sp_entry1, EINA_TRUE); - ad->sp_focused = ad->sp_entry1; - } + } + } return ECORE_CALLBACK_CANCEL; -} +} static int setting_password_main_draw_next_simple_password(void *data, int title_index) @@ -1293,27 +1356,35 @@ static int setting_password_main_draw_simple_password(void *data, int title_inde SettingPasswordUG *ad = (SettingPasswordUG *) data; switch (ad->view_type) { - case SETTING_PW_TYPE_PHONE_LOCK: - case SETTING_PW_TYPE_SET_PASSWORD: - case SETTING_PW_TYPE_CHANGE_PASSWORD: case SETTING_PW_TYPE_SIMPLE_PASSWORD: - case SETTING_PW_TYPE_RESET: - case SETTING_PW_TYPE_LOCK_FOR_APP: - + case SETTING_PW_TYPE_SET_SIMPLE_PASSWORD: + case SETTING_PW_TYPE_CHANGE_SIMPLE_PASSWORD: +#ifdef SUPPORT_MDM + case SETTING_PW_TYPE_MDM_TO_SIMPLE: +#endif ad->sp_title_index = title_index; if(ad->sp_item != NULL) { elm_genlist_item_update(ad->sp_item); - } + } else { elm_genlist_clear(ad->scroller); ad->sp_item = elm_genlist_item_append(ad->scroller, &(ad->itc_sp_bg_1icon), ad, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + } +#ifdef SUPPORT_MDM + if(ad->view_type == SETTING_PW_TYPE_MDM_TO_SIMPLE) + { + if(ad->is_expired == SETTING_PW_STATUS_EXPIRED) + setting_password_ug_display_mdm_desc(ad, PASSWORD_EXPIRED); + else + setting_password_ug_display_mdm_desc(ad, NEW_PASSWORD_NECESSARY); } +#endif - ecore_idler_add(__focus_on_idler, ad); + ecore_idler_add(__focus_sp_on_idler, ad); default: break; } @@ -1329,12 +1400,10 @@ static int setting_password_main_draw_1line_password(void *data, void *cb) SettingPasswordUG *ad = (SettingPasswordUG *) data; switch (ad->view_type) { - case SETTING_PW_TYPE_POWER_ON_LOCK: - case SETTING_PW_TYPE_PHONE_LOCK: - case SETTING_PW_TYPE_SIMPLE_PASSWORD: - case SETTING_PW_TYPE_RESET: - case SETTING_PW_TYPE_CLEAR: - case SETTING_PW_TYPE_LOCK_FOR_APP: + case SETTING_PW_TYPE_PASSWORD: +#ifdef SUPPORT_MDM + case SETTING_PW_TYPE_MDM_CHANGE_PASSWORD: +#endif ad->ed_pw1 = setting_create_Gendial_field_entry(ad->scroller, & @@ -1384,23 +1453,6 @@ static int setting_password_main_draw_1line_password(void *data, void *cb) 0, "0123456789", NULL); break; - case SETTING_PW_TYPE_FDN_MODE_ON: - case SETTING_PW_TYPE_FDN_MODE_OFF: - ad->ed_pw1 = - setting_create_Gendial_field_entry(ad->scroller, - & - (ad->itc_variable_height), - NULL, ad, - SWALLOW_Type_LAYOUT_ENTRY, - NULL, NULL, 0, - "IDS_ST_BODY_PIN2", NULL, - setting_password_main_entry_changed_cb, - ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, - TRUE, TRUE, - SETTING_PW_UG_PIN_MAX_LENGTH, - 0, "0123456789", NULL); - break; - default: break; } @@ -1421,6 +1473,8 @@ static int setting_password_main_clear_1line_password(void *data) ad->ed_pw1->isFocusFlag = FALSE; elm_entry_entry_set(ad->ed_pw1->eo_check, ""); + Evas_Object *layout = elm_object_parent_widget_get(ad->ed_pw1->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); return 0; } @@ -1433,7 +1487,9 @@ static int setting_password_main_draw_2line_password(void *data, void *cb) switch (ad->view_type) { case SETTING_PW_TYPE_SET_PASSWORD: - case SETTING_PW_TYPE_SIMPLE_PASSWORD: +#ifdef SUPPORT_MDM + case SETTING_PW_TYPE_MDM_NEW_POLICY: +#endif ad->ed_pw1 = setting_create_Gendial_field_entry(ad->scroller, & @@ -1441,7 +1497,7 @@ static int setting_password_main_draw_2line_password(void *data, void *cb) NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, - "IDS_ST_BODY_NEW_PASSWORD", + PW_SHORT_GUIDE_NEW, NULL, setting_password_main_entry_changed_cb, ELM_INPUT_PANEL_LAYOUT_NORMAL, @@ -1456,13 +1512,27 @@ static int setting_password_main_draw_2line_password(void *data, void *cb) NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, - "IDS_ST_BODY_CONFIRM_PASSWORD", + PW_SHORT_GUIDE_CONFIRM, NULL, setting_password_main_entry_changed_cb, ELM_INPUT_PANEL_LAYOUT_NORMAL, TRUE, FALSE, SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH, 0, NULL, NULL); +#ifdef SUPPORT_MDM + if(ad->view_type == SETTING_PW_TYPE_MDM_NEW_POLICY) + { + if(ad->is_expired == SETTING_PW_STATUS_EXPIRED) + { + setting_password_ug_display_mdm_desc(ad, PASSWORD_EXPIRED); + } + else + { + setting_password_ug_display_mdm_desc(ad, NEW_PASSWORD_NECESSARY); + } + } + +#endif break; case SETTING_PW_TYPE_SIM_LOCK_ON: @@ -1473,7 +1543,7 @@ static int setting_password_main_draw_2line_password(void *data, void *cb) NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, - "IDS_ST_BODY_SIM_PASSWORD", + PW_SHORT_GUIDE_NEW, NULL, setting_password_main_entry_changed_cb, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, @@ -1488,7 +1558,7 @@ static int setting_password_main_draw_2line_password(void *data, void *cb) NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, - "IDS_ST_BODY_CONFIRM_SIM_PASSWORD", + PW_SHORT_GUIDE_CONFIRM, NULL, setting_password_main_entry_changed_cb, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, @@ -1511,16 +1581,21 @@ static int setting_password_main_clear_2line_password(void *data) "[Setting > Password] Data parameter is NULL"); SettingPasswordUG *ad = (SettingPasswordUG *) data; + Evas_Object *layout = NULL; retv_if(NULL == ad->ed_pw1, -1); ad->ed_pw1->sub_desc = NULL; ad->ed_pw1->isFocusFlag = FALSE; elm_entry_entry_set(ad->ed_pw1->eo_check, ""); + layout = elm_object_parent_widget_get(ad->ed_pw1->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); retv_if(NULL == ad->ed_pw2, -1); ad->ed_pw2->sub_desc = NULL; ad->ed_pw2->isFocusFlag = FALSE; elm_entry_entry_set(ad->ed_pw2->eo_check, ""); + layout = elm_object_parent_widget_get(ad->ed_pw2->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); return 0; } @@ -1531,60 +1606,74 @@ static int setting_password_main_draw_3line_password(void *data, void *cb) "[Setting > Password] Data parameter is NULL"); SettingPasswordUG *ad = (SettingPasswordUG *) data; + Elm_Input_Panel_Layout ime_style = ELM_INPUT_PANEL_LAYOUT_NORMAL; switch (ad->view_type) { case SETTING_PW_TYPE_CHANGE_PASSWORD: ad->ed_pw1 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, "IDS_ST_BODY_CURRENT_PASSWORD", NULL, setting_password_main_entry_changed_cb, - ELM_INPUT_PANEL_LAYOUT_NORMAL, + ime_style, TRUE, TRUE, SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH, 0, NULL, NULL); ad->ed_pw2 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, "IDS_ST_BODY_NEW_PASSWORD", NULL, setting_password_main_entry_changed_cb, - ELM_INPUT_PANEL_LAYOUT_NORMAL, + ime_style, TRUE, FALSE, SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH, 0, NULL, NULL); ad->ed_pw3 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, "IDS_ST_BODY_CONFIRM_PASSWORD", NULL, setting_password_main_entry_changed_cb, - ELM_INPUT_PANEL_LAYOUT_NORMAL, + ime_style, TRUE, FALSE, SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH, 0, NULL, NULL); +#ifdef SUPPORT_MDM + if(ad->mdm_data != NULL) + { + ad->mdm_policy = (mdm_password_policy_t*)(ad->mdm_data->data); + + if(ad->mdm_policy->quality != MDM_PASSWORD_QUALITY_UNSPECIFIED) + elm_genlist_item_append(ad->scroller, &(ad->itc_mdm_desc), ad, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + } +#endif break; case SETTING_PW_TYPE_CHANGE_PIN1: ad->ed_pw1 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, - "IDS_ST_BODY_CURRENT_PIN1", + PW_SHORT_GUIDE_CURRENT, NULL, setting_password_main_entry_changed_cb, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, @@ -1594,11 +1683,12 @@ static int setting_password_main_draw_3line_password(void *data, void *cb) ad->ed_pw2 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, - "IDS_ST_BODY_NEW_PIN1", + PW_SHORT_GUIDE_NEW, NULL, setting_password_main_entry_changed_cb, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, @@ -1608,11 +1698,12 @@ static int setting_password_main_draw_3line_password(void *data, void *cb) ad->ed_pw3 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, - "IDS_ST_BODY_CONFIRM_NEW_PIN1", + PW_SHORT_GUIDE_CONFIRM, NULL, setting_password_main_entry_changed_cb, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, @@ -1624,11 +1715,12 @@ static int setting_password_main_draw_3line_password(void *data, void *cb) case SETTING_PW_TYPE_CHANGE_PIN2: ad->ed_pw1 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, - "IDS_ST_BODY_CURRENT_PIN2", + PW_SHORT_GUIDE_CURRENT, NULL, setting_password_main_entry_changed_cb, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, @@ -1638,11 +1730,12 @@ static int setting_password_main_draw_3line_password(void *data, void *cb) ad->ed_pw2 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, - "IDS_ST_BODY_NEW_PIN2", + PW_SHORT_GUIDE_NEW, NULL, setting_password_main_entry_changed_cb, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, @@ -1652,11 +1745,12 @@ static int setting_password_main_draw_3line_password(void *data, void *cb) ad->ed_pw3 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, - "IDS_ST_BODY_CONFIRM_NEW_PIN2", + PW_SHORT_GUIDE_CONFIRM, NULL, setting_password_main_entry_changed_cb, ELM_INPUT_PANEL_LAYOUT_NUMBERONLY, @@ -1668,7 +1762,8 @@ static int setting_password_main_draw_3line_password(void *data, void *cb) case SETTING_PW_TYPE_PIN1_BLOCKED: ad->ed_pw1 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, @@ -1682,7 +1777,8 @@ static int setting_password_main_draw_3line_password(void *data, void *cb) ad->ed_pw2 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, @@ -1696,7 +1792,8 @@ static int setting_password_main_draw_3line_password(void *data, void *cb) ad->ed_pw3 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, @@ -1712,7 +1809,8 @@ static int setting_password_main_draw_3line_password(void *data, void *cb) case SETTING_PW_TYPE_PIN2_BLOCKED: ad->ed_pw1 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, @@ -1725,7 +1823,8 @@ static int setting_password_main_draw_3line_password(void *data, void *cb) ad->ed_pw2 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, @@ -1739,7 +1838,8 @@ static int setting_password_main_draw_3line_password(void *data, void *cb) ad->ed_pw3 = setting_create_Gendial_field_entry(ad->scroller, - &(ad->itc_variable_height), + & + (ad->itc_variable_height), NULL, ad, SWALLOW_Type_LAYOUT_ENTRY, NULL, NULL, 0, @@ -1766,21 +1866,28 @@ static int setting_password_main_clear_3line_password(void *data) "[Setting > Password] Data parameter is NULL"); SettingPasswordUG *ad = (SettingPasswordUG *) data; + Evas_Object *layout = NULL; retv_if(NULL == ad->ed_pw1, -1); ad->ed_pw1->sub_desc = NULL; ad->ed_pw1->isFocusFlag = FALSE; elm_entry_entry_set(ad->ed_pw1->eo_check, ""); + layout = elm_object_parent_widget_get(ad->ed_pw1->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); retv_if(NULL == ad->ed_pw2, -1); ad->ed_pw2->sub_desc = NULL; ad->ed_pw2->isFocusFlag = FALSE; elm_entry_entry_set(ad->ed_pw2->eo_check, ""); + layout = elm_object_parent_widget_get(ad->ed_pw2->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); retv_if(NULL == ad->ed_pw3, -1); ad->ed_pw3->sub_desc = NULL; ad->ed_pw3->isFocusFlag = FALSE; elm_entry_entry_set(ad->ed_pw3->eo_check, ""); + layout = elm_object_parent_widget_get(ad->ed_pw3->eo_check); + elm_object_part_text_set(layout, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT")); return 0; } @@ -1793,10 +1900,10 @@ static int setting_password_main_check_simple_password(const char *collection) char temp; SETTING_TRACE_DEBUG("collection length is %d", sp_len); - + if(sp_len != 4) return SETTING_RETURN_FAIL; - + /* check if digit. */ for(index = 0; index < sp_len; index++) { @@ -1806,7 +1913,7 @@ static int setting_password_main_check_simple_password(const char *collection) else SETTING_TRACE_DEBUG("temp %c", temp); } - + return SETTING_RETURN_SUCCESS; } @@ -1819,34 +1926,47 @@ static int setting_password_main_check_1line_password(void *data) const char *entry_str = ad->ed_pw1->sub_desc; ad->focus_data = ad->ed_pw1; - + /* Empty Check */ if (isEmptyStr(entry_str)) { +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_ST_BODY_PASSWORD_EMPTY"), + FALSE); +#else setting_password_ug_display_desc(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); + +#endif return SETTING_ENTRY_RETURN_NULL_STR_ERR; } - + /* Length Check */ int entry_str_len = safeStrLen(entry_str); switch (ad->view_type) { - case SETTING_PW_TYPE_POWER_ON_LOCK: - case SETTING_PW_TYPE_PHONE_LOCK: - case SETTING_PW_TYPE_RESET: - case SETTING_PW_TYPE_CLEAR: - case SETTING_PW_TYPE_LOCK_FOR_APP: + case SETTING_PW_TYPE_PASSWORD: { - if (entry_str_len < SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH - || entry_str_len > SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH) { - setting_password_main_warning_entry_added_byte_popup - (ad, SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH, SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH); + if (entry_str_len < SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH + || entry_str_len > SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH) + { + setting_password_main_warning_entry_added_byte_popup(ad, + SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH, SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH); return SETTING_ENTRY_REQUIRED_CORRECT_DIGIT_PW; } +#ifdef SUPPORT_MDM + int letter = 0; + int digit = 0; + int symbol = 0; + + if( _count_string(entry_str, &letter, &digit, &symbol) == SETTING_RETURN_SUCCESS) + { + if(letter < 1) + return SETTING_PW_ERROR_INCLUDE_NO_LETTER; + } +#endif } break; case SETTING_PW_TYPE_PIN_LOCK_ON: case SETTING_PW_TYPE_PIN_LOCK_OFF: - case SETTING_PW_TYPE_FDN_MODE_ON: - case SETTING_PW_TYPE_FDN_MODE_OFF: { if (entry_str_len < SETTING_PW_UG_PIN_MIN_LENGTH || entry_str_len > SETTING_PW_UG_PIN_MAX_LENGTH) { @@ -1871,6 +1991,233 @@ static int setting_password_main_check_1line_password(void *data) return SETTING_RETURN_SUCCESS; } +#ifdef SUPPORT_MDM +int _count_string(const char *str, int *cnt_letter, int *cnt_digit, int *cnt_sym) +{ + SETTING_TRACE_BEGIN; + retv_if(str == NULL || cnt_letter == NULL || cnt_digit == NULL || cnt_sym == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + int length = strlen(str); + int index = 0; + char temp = 0; + int letter = 0; + int digit = 0; + int symbol = 0; + + if(length <= 0) + { + SETTING_TRACE_DEBUG("[DEBUG] invalid input length"); + return SETTING_RETURN_FAIL; + } + + for(index = 0; index < length; index++) + { + temp = (char)(str[index]); + SETTING_TRACE_DEBUG("temp %c", temp); + + if((temp >= '0') && (temp <= '9')) /* digit */ + { + digit++; + } + else if((temp >= 'a') && (temp <= 'z')) /* lower letter */ + { + letter++; + } + else if((temp >= 'A') && (temp <= 'Z')) /* upper letter */ + { + letter++; + } + else if((temp >= ' ') && (temp <= '~')) /* symbol means special char that enables to input from IME. */ + { + symbol++; + } + } + SETTING_TRACE_DEBUG("%s includes %d letters, %d digits, and %d symbols", str, letter, digit, symbol); + *cnt_letter = letter; + *cnt_digit = digit; + *cnt_sym = symbol; + return SETTING_RETURN_SUCCESS; +} + +int _check_min_length(int str_length, int min_length) +{ + /* if min_length is 0~3, it operates the same as 4. */ + if((min_length < SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH) + && (str_length < SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH)) + { + return SETTING_RETURN_FAIL; + } + else if(min_length < SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH) + { + /* do nothing */ + } + else if((min_length > SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH) + || (str_length > SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH)) + { + return SETTING_RETURN_FAIL; + } + else if(min_length > str_length) + { + return SETTING_RETURN_FAIL; + } + + return SETTING_RETURN_SUCCESS; +} + +int _check_min_complex(int min_complex, int digit, int symbol) +{ + switch(min_complex) + { + case 0: + case 1: + if(digit < 1) + { + SETTING_TRACE_DEBUG("[ERROR] should include 1 digit at list."); + return SETTING_RETURN_FAIL; + } + break; + case 2: + if((digit < 1) || (symbol < 1)) + { + SETTING_TRACE_DEBUG("[ERROR] should include 1 digit and 1 symbol at list."); + return SETTING_RETURN_FAIL; + } + break; + case 3: + if((digit >= 1) && (symbol >= 2)) + { + /* do nothing */ + } + else if((digit >= 2) && (symbol >= 1)) + { + /* do nothing */ + } + else + { + SETTING_TRACE_DEBUG("[ERROR] digits or symbols are not enough."); + return SETTING_RETURN_FAIL; + } + break; + case 4: + if((digit >= 1) && (symbol >= 3)) + { + /* do nothing */ + } + else if((digit >= 3) && (symbol >= 1)) + { + /* do nothing */ + } + else if((digit >= 2) && (symbol >= 2)) + { + /* do nothing */ + } + else + { + SETTING_TRACE_DEBUG("[ERROR] digits or symbols are not enough."); + return SETTING_RETURN_FAIL; + } + break; + default: + SETTING_TRACE_DEBUG("unknown value of min_complex, %d", min_complex); + } + return SETTING_RETURN_SUCCESS; +} + +int _is_numeric(const char *str) +{ + SETTING_TRACE_BEGIN; + int length = strlen(str); + int index = 0; + char temp = 0; + + if(length <= 0) + { + SETTING_TRACE_DEBUG("[DEBUG] invalid input length"); + return SETTING_RETURN_FAIL; + } + for(index = 0; index < length; index++) + { + temp = (char)(str[index]); + if((temp < '0') || ( temp > '9')) + { + SETTING_TRACE_DEBUG("[DEBUG] %c is not a digit", temp); + return SETTING_RETURN_FAIL; + } + else + SETTING_TRACE_DEBUG("temp %c", temp); + } + return SETTING_RETURN_SUCCESS; +} + +static int setting_password_main_match_with_mdm_policy(const char* input, mdm_password_policy_t *policy) +{ + retv_if(input == NULL || policy == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + int letter = 0; + int digit = 0; + int symbol = 0; + int length = strlen(input); + int ret = 0; + + if(_count_string(input, &letter, &digit, &symbol) != SETTING_RETURN_SUCCESS) + return SETTING_RETURN_FAIL; + + if(letter < 1) /* should include 1 letter at least. */ + return SETTING_PW_ERROR_INCLUDE_NO_LETTER; + + ret = _check_min_length(length, policy->min_length); + if(ret != SETTING_RETURN_SUCCESS) + { + SETTING_TRACE_DEBUG("[ERROR] _check_min_length(): invalid return %d", ret); + return SETTING_PW_ERROR_INVALID_LENGTH; + } + + if(policy->quality == MDM_PASSWORD_QUALITY_ALPHANUMERIC) + { + ret = _check_min_complex(policy->min_complex, digit, symbol); + if(ret != SETTING_RETURN_SUCCESS) + { + SETTING_TRACE_DEBUG("[ERROR] _check_min_complex(): invalid return %d", ret); + return SETTING_PW_ERROR_NO_MATCH_MIN_COMPLEX; + } + } + + // check pattern + int cflags = REG_EXTENDED; + int eflags = 0; + int match_len = 0; + regex_t reg; + regmatch_t pmatch; + + if((policy->pattern != NULL) && (strlen(policy->pattern) > 0)) + { + ret = regcomp(®, policy->pattern, cflags); + if(ret != 0) + { + SETTING_TRACE_DEBUG("[DEBUG] fail to compile pattern"); + return SETTING_RETURN_FAIL; + } + ret = regexec(®, policy->pattern, 1, &pmatch, eflags); + if(ret != 0) + { + SETTING_TRACE_DEBUG("[DEBUG] input does not match with pattern"); + return SETTING_RETURN_FAIL; + } + match_len = pmatch.rm_eo - pmatch.rm_so; + if((pmatch.rm_so != 0) || (match_len != strlen(policy->pattern))) + { + SETTING_TRACE_DEBUG("[DEBUG] input does not match with pattern"); + return SETTING_RETURN_FAIL; + } + regfree(®); + } + + // 3. no need to check max_num_wipe, expire time, and history count + + return SETTING_RETURN_SUCCESS; +} +#endif + static int setting_password_main_check_2line_password(void *data) { /* error check */ @@ -1881,16 +2228,24 @@ static int setting_password_main_check_2line_password(void *data) const char *entry_str1 = ad->ed_pw1->sub_desc; const char *entry_str2 = ad->ed_pw2->sub_desc; ad->focus_data = ad->ed_pw1; - + /* Empty Check */ if (isEmptyStr(entry_str1)) { +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); +#else setting_password_ug_display_desc(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); +#endif return SETTING_ENTRY_RETURN_NULL_STR_ERR; } if (isEmptyStr(entry_str2)) { ad->focus_data = ad->ed_pw2; +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); +#else setting_password_ug_display_desc(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); +#endif return SETTING_ENTRY_RETURN_NULL_STR_ERR; } @@ -1899,8 +2254,9 @@ static int setting_password_main_check_2line_password(void *data) switch (ad->view_type) { case SETTING_PW_TYPE_SET_PASSWORD: { - if (entry_str_len < SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH - || entry_str_len > SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH) { + if (entry_str_len < SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH + || entry_str_len > SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH) + { setting_password_main_warning_entry_added_byte_popup (ad, SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH, SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH); return SETTING_ENTRY_REQUIRED_CORRECT_DIGIT_PW; @@ -1924,10 +2280,38 @@ static int setting_password_main_check_2line_password(void *data) /* Match Check */ if (0 != safeStrCmp(entry_str1, entry_str2)) { +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_POP_PASSWORDS_DO_NOT_MATCH"), FALSE); +#else setting_password_ug_display_desc(ad, _("IDS_ST_POP_PASSWORDS_DO_NOT_MATCH"), FALSE); +#endif return SETTING_ENTRY_NOT_MATCH_NEW_CONF_PW; } +#ifdef SUPPORT_MDM + if(ad->view_type == SETTING_PW_TYPE_SET_PASSWORD) + { + int letter = 0; + int digit = 0; + int symbol = 0; + + if( _count_string(entry_str1, &letter, &digit, &symbol) == SETTING_RETURN_SUCCESS) + { + if(letter < 1) + return SETTING_PW_ERROR_INCLUDE_NO_LETTER; + } + } +#endif + +#ifdef SUPPORT_MDM + if(ad->view_type == SETTING_PW_TYPE_MDM_NEW_POLICY) + { + int ret = 0; + ret = setting_password_main_match_with_mdm_policy(entry_str1, ad->mdm_policy); + if(ret == SETTING_RETURN_FAIL) + return SETTING_ENTRY_NOT_MATCH_NEW_CONF_PW; + } +#endif return SETTING_RETURN_SUCCESS; } @@ -1938,8 +2322,13 @@ setting_password_main_warning_entry_added_byte_popup(SettingPasswordUG *ad, char str[MAX_SPECIALIZITION_LEN + 1] = { 0 }; snprintf(str, MAX_SPECIALIZITION_LEN, "%d~%d %s", min, max, _("characters required")); - + + /* SETTING_TRACE("str:%s", str); */ +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, str, FALSE); +#else setting_password_ug_display_desc(ad, str, FALSE); +#endif } static int setting_password_main_check_3line_password(void *data) @@ -1956,19 +2345,31 @@ static int setting_password_main_check_3line_password(void *data) /* Empty Check */ if (isEmptyStr(entry_str1)) { +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); +#else setting_password_ug_display_desc(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); +#endif return SETTING_ENTRY_RETURN_NULL_STR_ERR; } if (isEmptyStr(entry_str2)) { ad->focus_data = ad->ed_pw2; +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); +#else setting_password_ug_display_desc(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); +#endif return SETTING_ENTRY_RETURN_NULL_STR_ERR; } if (isEmptyStr(entry_str3)) { ad->focus_data = ad->ed_pw3; +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); +#else setting_password_ug_display_desc(ad, _("IDS_ST_BODY_PASSWORD_EMPTY"), FALSE); +#endif return SETTING_ENTRY_RETURN_NULL_STR_ERR; } @@ -1979,20 +2380,20 @@ static int setting_password_main_check_3line_password(void *data) switch (ad->view_type) { case SETTING_PW_TYPE_CHANGE_PASSWORD: { - if (entry_str1_len < SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH + if (entry_str1_len < SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH || entry_str1_len > SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH) { setting_password_main_warning_entry_added_byte_popup (ad, SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH, SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH); return SETTING_ENTRY_REQUIRED_CORRECT_DIGIT_PW; } - if (entry_str2_len < SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH + if (entry_str2_len < SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH || entry_str2_len > SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH) { ad->focus_data = ad->ed_pw2; setting_password_main_warning_entry_added_byte_popup (ad, SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH, SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH); return SETTING_ENTRY_REQUIRED_CORRECT_DIGIT_PW; } - if (entry_str3_len < SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH + if (entry_str3_len < SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH || entry_str3_len > SETTING_PW_UG_NORMAL_PASSWORD_MAX_LENGTH) { ad->focus_data = ad->ed_pw3; setting_password_main_warning_entry_added_byte_popup @@ -2036,10 +2437,29 @@ static int setting_password_main_check_3line_password(void *data) /* Match Check */ if (0 != safeStrCmp(entry_str2, entry_str3)) { ad->focus_data = ad->ed_pw2; +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_POP_PASSWORDS_DO_NOT_MATCH"), FALSE); +#else setting_password_ug_display_desc(ad, _("IDS_ST_POP_PASSWORDS_DO_NOT_MATCH"), FALSE); +#endif return SETTING_ENTRY_NOT_MATCH_NEW_CONF_PW; } - + +#ifdef SUPPORT_MDM + if(ad->view_type == SETTING_PW_TYPE_CHANGE_PASSWORD) + { + int letter = 0; + int digit = 0; + int symbol = 0; + + if( _count_string(entry_str2, &letter, &digit, &symbol) == SETTING_RETURN_SUCCESS) + { + if(letter < 1) + return SETTING_PW_ERROR_INCLUDE_NO_LETTER; + } + } +#endif + return SETTING_RETURN_SUCCESS; } @@ -2060,17 +2480,17 @@ setting_password_main_click_softkey_cancel_cb(void *data, Evas_Object *obj, /* end */ } - /* for updating toggle button of simple password in security menu correctly. */ - if(ad->view_type == SETTING_PW_TYPE_SIMPLE_PASSWORD) - { - bundle *b = bundle_create(); - if(b == NULL) - return; - bundle_add(b, "result", ad->view_type_string); - ug_send_result(ad->ug, b); - SETTING_TRACE("Send Result : %s\n", ad->view_type_string); - bundle_free(b); - } + /* send result : Cancel */ + service_h svc; + if(service_create(&svc)) + return; + + service_add_extra_data(svc, "result", "Cancel"); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", "Cancel"); + + service_destroy(svc); + /* Send destroy request */ ug_destroy_me(ad->ug); @@ -2090,65 +2510,60 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, memset(svalue, 0x0, SHA256_DIGEST_LENGTH); SettingPasswordUG *ad = (SettingPasswordUG *) data; - bundle *b = NULL; + service_h svc; + if (service_create(&svc)) + return; SETTING_TRACE("ad->view_type:%d", ad->view_type); switch (ad->view_type) { - case SETTING_PW_TYPE_RESET: - case SETTING_PW_TYPE_CLEAR: - case SETTING_PW_TYPE_POWER_ON_LOCK: - case SETTING_PW_TYPE_PHONE_LOCK: - case SETTING_PW_TYPE_LOCK_FOR_APP: + case SETTING_PW_TYPE_PASSWORD: ret = setting_password_main_check_1line_password(ad); if (ret == SETTING_RETURN_SUCCESS) { const char *entry_str; entry_str = ad->ed_pw1->sub_desc; - ret = setting_password_check_password(entry_str); + ret = setting_password_check_password(entry_str, NULL, NULL); if(ret == SETTING_RETURN_SUCCESS) { - int value; int err; - int ret; - - if (SETTING_PW_TYPE_PHONE_LOCK == ad->view_type) { - /* Change Status */ - setting_get_bool_slp_key(BOOL_SLP_SETTING_POWER_ON_LOCK, &value, &err); - if (value == 0) - ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_POWER_ON_LOCK, - SETTING_ON_OFF_BTN_ON, &err); - else - ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_POWER_ON_LOCK, - SETTING_ON_OFF_BTN_OFF, &err); + if(safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_PASSWORD") == 0) { /* reset VCONF */ setting_set_int_slp_key(INT_SLP_SETTING_PHONE_LOCK_ATTEMPTS_LEFT, PHONE_LOCK_ATTEMPS_MAX, &err); setting_retm_if(err == SETTING_RETURN_FAIL, "[Error] set value of vconf fail."); } - /* Correct Password. Send Bundle to caller for status change */ - b = bundle_create(); - if (!b) - return; - - bundle_add(b, "result", ad->view_type_string); - ug_send_result(ad->ug, b); - SETTING_TRACE("Send Result : %s\n", ad->view_type_string); - bundle_free(b); - /* Send destroy request */ - ug_destroy_me(ad->ug); + else if(0 == safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_ENTER_LOCK_TYPE")) + { + service_add_extra_data(svc, "current", entry_str); + } } else { /* Incorrect Password. Display Popup. */ setting_password_main_clear_1line_password(ad); ad->focus_data = ad->ed_pw1; - if (SETTING_PW_TYPE_PHONE_LOCK == ad->view_type) { + if (safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_PASSWORD") == 0) { setting_password_ug_check_attemps_left(ad); return; } +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, + _("IDS_COM_POP_INCORRECT_PASSWORD"), FALSE); +#else setting_password_ug_display_desc(ad, PW_ERR_DESC, FALSE); +#endif + if(safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_RESET") == 0) + { + service_add_extra_data(svc, "result", "Fail"); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", "Fail"); + + service_destroy(svc); + /* Send destroy request */ + ug_destroy_me(ad->ug); + } return; } } else { @@ -2156,84 +2571,75 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, return; } break; - case SETTING_PW_TYPE_SIMPLE_PASSWORD: - if(ad->is_simple_password_on == 0) /* OFF -> ON */ - { - SETTING_TRACE("case SIMPLE_PASSWORD OFF->ON"); - ret = setting_password_main_check_1line_password(ad); - if (ret == SETTING_RETURN_SUCCESS) { - const char *entry_str = ad->ed_pw1->sub_desc; - - ret = setting_password_check_password(entry_str); - if(ret == SETTING_RETURN_SUCCESS) - { - ad->cur_pwd = (char*)strdup(entry_str); +#ifdef SUPPORT_MDM + case SETTING_PW_TYPE_MDM_NEW_POLICY: + SETTING_TRACE("case SETTING_PW_TYPE_MDM_NEW_POLICY"); + ret = setting_password_main_check_2line_password(ad); - elm_genlist_clear(ad->scroller); - /* disable "Done" button of navigation bar */ - - if (ad->ly_main != NULL) { - evas_object_del(ad->ly_main); - } - __create_common_password_frame(ad); - setting_password_main_draw_simple_password(ad, 1); - } - else { - /* Incorrect Password. Display Popup. */ - setting_password_main_clear_1line_password(ad); - ad->focus_data = ad->ed_pw1; - setting_password_ug_display_desc(ad, PW_ERR_DESC, FALSE); + if (SETTING_RETURN_SUCCESS == ret) + { + const char *entry_str; + entry_str = ad->ed_pw1->sub_desc; - return; - } - } else { - setting_password_main_clear_1line_password(ad); + if (isEmptyStr(entry_str)) { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_DEBUG("%s*** [ERR] elm_entry_entry_get return NULL ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + return; } - } - else if(ad->is_simple_password_on == 1) /* ON -> OFF */ - { - SETTING_TRACE("case SIMPLE_PASSWORD ON->OFF"); - ret = setting_password_main_check_2line_password(ad); - if (SETTING_RETURN_SUCCESS == ret) { - const char *entry_str; - entry_str = ad->ed_pw1->sub_desc; + if(ad->step1_str) + ret = setting_password_set_password(ad->step1_str, entry_str, ad); + else + ret = setting_password_set_password(NULL, entry_str, ad); - if (isEmptyStr(entry_str)) { - ad->focus_data = ad->ed_pw1; - SETTING_TRACE_DEBUG("%s*** [ERR] elm_entry_entry_get return NULL ***%s", - SETTING_FONT_RED, SETTING_FONT_BLACK); - setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); - return; - } + if(ret == SETTING_RETURN_SUCCESS) + { + FREE(ad->step1_str); - ret = setting_password_set_password(ad->cur_pwd, entry_str, ad); - FREE(ad->cur_pwd); + SETTING_TRACE_DEBUG("[DEBUG] success to set password"); - /* Modify Setting Password */ - if (SETTING_RETURN_FAIL != ret) { - /* Display popup */ - /* set vconfkey OFF */ - if(vconf_set_bool(VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL, 0) < 0) - vconf_set_bool(VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL, 0); - setting_password_ug_create_popup_notitle_nobtn(ad, + /* To Do : 1. phone lock on */ + /* 2. if quality is something, simple password on.*/ + /* 3. else, simple password off */ + setting_set_bool_slp_key(BOOL_SLP_SETTING_POWER_ON_LOCK, + SETTING_ON_OFF_BTN_ON, &err); + setting_retm_if(err == SETTING_RETURN_FAIL, "[Error] set value of vconf fail."); + + setting_set_int_slp_key(INT_SLP_SETTING_PHONE_LOCK_ATTEMPTS_LEFT, + ad->mdm_policy->max_num_wipe, &err); + setting_retm_if(err == SETTING_RETURN_FAIL, "[Error] set value of vconf fail."); + + vconf_set_bool(VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL, FALSE); + + /* End */ + + SETTING_TRACE_DEBUG("[DEBUG] send status to mdm"); + mdm_set_password_status(MDM_PASSWORD_CHANGED); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_POP_NEW_PASSWD_SAVED"), TRUE); - return; - } else { - ad->focus_data = ad->ed_pw1; - /* Error Msg */ - SETTING_TRACE_DEBUG("%s*** [ERR] setting_set_string_slp_key err=%d ***%s", - SETTING_FONT_RED, err, SETTING_FONT_BLACK); - setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); - return; - } - } else { + } + else if(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED) + { + setting_password_ug_display_mdm_desc(ad, PASSWORD_MUST_NOT_MATCH_PREV); + return; + } + else + { + setting_password_ug_display_mdm_desc(ad, ENTER_ANOTHER_PASSWORD); setting_password_main_clear_2line_password(ad); return; } } + else + { + setting_password_ug_display_mdm_desc(ad, ENTER_ANOTHER_PASSWORD); + setting_password_main_clear_2line_password(ad); + return; + } break; +#endif case SETTING_PW_TYPE_SET_PASSWORD: { SETTING_TRACE("case SETTING_PW_TYPE_SET_PASSWORD"); @@ -2251,65 +2657,12 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, return; } - ret = setting_password_set_password(NULL, entry_str,ad); + ret = setting_password_set_password(ad->cur_pwd, entry_str,ad); /* Modify Setting Password */ if (SETTING_RETURN_FAIL != ret) { - if (0 == safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_PHONE_LOCK")) { - int err = 0; - int ret = 0; - - ret = setting_set_bool_slp_key(BOOL_SLP_SETTING_POWER_ON_LOCK, - SETTING_ON_OFF_BTN_ON, &err); - retm_if(ret < 0, "[ERR] setting vconfkey failed."); - - b = bundle_create(); - if (!b) - return; - - bundle_add(b, "result", "SETTING_PW_TYPE_PHONE_LOCK"); - ug_send_result(ad->ug, b); - SETTING_TRACE("Send Result : %s\n", "SETTING_PW_TYPE_PHONE_LOCK"); - bundle_free(b); - ug_destroy_me(ad->ug); - } - else if ( 0 == safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_SIMPLE_PASSWORD")){ - if (ad->ly_main != NULL) { - evas_object_del(ad->ly_main); - } - - b = bundle_create(); - if (!b) - return; - - bundle_add(b, "result", "SETTING_PW_TYPE_SET_PASSWORD"); - ug_send_result(ad->ug, b); - SETTING_TRACE("Send Result : %s\n", "SETTING_PW_TYPE_SET_PASSWORD"); - bundle_free(b); - /* Send destroy request */ - ug_destroy_me(ad->ug); - - return; - } - else if ( 0 == safeStrCmp(ad->view_type_string, "SETTING_PW_TYPE_LOCK_FOR_APP")){ - if (ad->ly_main != NULL) { - evas_object_del(ad->ly_main); - } - - b = bundle_create(); - if (!b) - return; - - bundle_add(b, "result", "SETTING_PW_TYPE_LOCK_FOR_APP"); - ug_send_result(ad->ug, b); - SETTING_TRACE("Send Result : %s\n", "SETTING_PW_TYPE_LOCK_FOR_APP"); - bundle_free(b); - /* Send destroy request */ - ug_destroy_me(ad->ug); - - return; - } /* Display popup */ + service_add_extra_data(svc, "current", entry_str); setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_POP_NEW_PASSWD_SAVED"), TRUE); } else { ad->focus_data = ad->ed_pw1; @@ -2325,7 +2678,98 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, } } break; +#ifdef SUPPORT_MDM + case SETTING_PW_TYPE_MDM_CHANGE_PASSWORD: + { + SETTING_TRACE_DEBUG("case MDM_CHANGE_PASSWORD_STEP1"); + ad->step1_str = strdup(ad->ed_pw1->sub_desc); + SETTING_TRACE_DEBUG("step1_str : %s", ad->step1_str); + unsigned int remain_attempt = ATTEMPT_INFINITE; + unsigned int valid_seconds = 0; + char guide_text[DESC_BUF1_SIZE] = {0,}; + + if(ad->step1_str == NULL) + { + SETTING_TRACE_DEBUG("step1_str is NULL"); + } + else + { + ret = setting_password_check_password(ad->step1_str, &remain_attempt, &valid_seconds); + // check current password + if(ret != SETTING_RETURN_SUCCESS){ + setting_password_main_clear_1line_password(ad); + ad->focus_data = ad->ed_pw1; + FREE(ad->step1_str); + + if(valid_seconds == 0) + { + mdm_set_password_status(MDM_PASSWORD_EXPIRED); + setting_password_ug_display_mdm_desc(ad, PASSWORD_EXPIRED); + return; + } + + if((remain_attempt > 0) && (ad->mdm_policy->recoverable == TRUE)) + { + // display guide text. remain_attempt with recovery mode + char temp[DESC_BUF1_SIZE] = {0,}; + snprintf(temp, sizeof(temp), ATTEMPTS_DESC, remain_attempt); + snprintf(guide_text, sizeof(guide_text), "%s. %s.", PW_ERR_DESC, temp); + setting_password_ug_display_mdm_desc(ad, guide_text); + } + else if((remain_attempt > 0) && (ad->mdm_policy->recoverable == FALSE)) + { + // display guide text. remain_attempt with wipe mode + char temp[DESC_BUF1_SIZE] = {0,}; + snprintf(temp, sizeof(temp), ATTEMPTS_DESC, remain_attempt); + snprintf(guide_text, sizeof(guide_text), "%s. %s.", PW_ERR_DESC, temp); + setting_password_ug_display_mdm_desc(ad, guide_text); + } + else if((remain_attempt == 0) && (ad->mdm_policy->recoverable == TRUE)) + { + mdm_set_password_status(MDM_PASSWORD_FAILED); + setting_password_ug_display_mdm_desc(ad, MAX_NUM_REACHED); + } + else if((remain_attempt == 0) && (ad->mdm_policy->recoverable == FALSE)) + { + mdm_set_password_status(MDM_RECOVERY_PASSWORD_FAILED); + setting_password_ug_display_mdm_desc(ad, MAX_NUM_REACHED); + } + return; + } + SETTING_TRACE_DEBUG("Success to check step1_str"); + + elm_genlist_clear(ad->scroller); + if(((ad->mdm_policy->quality == MDM_PASSWORD_QUALITY_SOMETHING) + || (ad->mdm_policy->quality == MDM_PASSWORD_QUALITY_NUMERIC))) + { + if(ad->mdm_policy->min_length <= SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH) + { + ad->view_type = SETTING_PW_TYPE_MDM_TO_SIMPLE; + __create_common_password_frame(ad); + setting_password_main_draw_simple_password(ad, 1); + } + else + { + ad->view_type = SETTING_PW_TYPE_MDM_NEW_POLICY; + setting_password_main_draw_2line_password(ad, NULL); + } + } + else if(ad->mdm_policy->quality == MDM_PASSWORD_QUALITY_UNSPECIFIED) + { + ad->view_type = SETTING_PW_TYPE_MDM_TO_SIMPLE; + __create_common_password_frame(ad); + setting_password_main_draw_simple_password(ad, 1); + } + else + { + ad->view_type = SETTING_PW_TYPE_MDM_NEW_POLICY; + setting_password_main_draw_2line_password(ad, NULL); + } + } + } + break; +#endif case SETTING_PW_TYPE_CHANGE_PASSWORD: { SETTING_TRACE("case SETTING_PW_TYPE_CHANGE_PASSWORD"); @@ -2333,16 +2777,24 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, if (SETTING_RETURN_SUCCESS == ret) { const char *entry_str; -#if OLD +#if LEGACY entry_str = ad->ed_pw1->sub_desc; - ret = setting_password_check_password(entry_str); + + ret = setting_password_check_password(entry_str, NULL, NULL); + if(ret != SETTING_RETURN_SUCCESS){ setting_password_main_clear_3line_password(ad); ad->focus_data = ad->ed_pw1; + +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_INCORRECT_PASSWORD"), FALSE); +#else setting_password_ug_display_desc(ad, PW_ERR_DESC, FALSE); +#endif return; } #endif + entry_str = ad->ed_pw2->sub_desc; if (isEmptyStr(entry_str)) { @@ -2353,6 +2805,24 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, return; } +#ifdef SUPPORT_MDM + if(ad->mdm_data != NULL) + { + ad->mdm_policy = (mdm_password_policy_t*)(ad->mdm_data->data); + + if(ad->mdm_policy->quality != MDM_PASSWORD_QUALITY_UNSPECIFIED) + { + SETTING_TRACE_DEBUG("checking policy"); + ret = setting_password_main_match_with_mdm_policy(entry_str, ad->mdm_policy); + if(ret != SETTING_RETURN_SUCCESS) + { + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + } + } +#endif + ret = setting_password_set_password(ad->ed_pw1->sub_desc, entry_str, ad); /* Modify Setting Password */ @@ -2370,6 +2840,7 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, } else { setting_password_main_clear_3line_password(ad); + setting_password_ug_display_desc(ad, PW_ERR_DESC, FALSE); return; } } @@ -2381,9 +2852,8 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, ret = setting_password_main_check_1line_password(ad); if (ret == SETTING_RETURN_SUCCESS) { - TelSimSecPw_t sim_sec_data = { 0, }; + TelSimFacilityPw_t sim_sec_data = { 0, }; int tapi_ret = TAPI_API_SUCCESS; - int ReqId; const char *entry_str; entry_str = ad->ed_pw1->sub_desc; @@ -2394,29 +2864,27 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, return; } - sim_sec_data.type = TAPI_SIM_PTYPE_PIN1; + sim_sec_data.lock_type = TAPI_SIM_LOCK_SC;//TAPI_SIM_PTYPE_PIN1; sim_sec_data.pw = (unsigned char *)entry_str; sim_sec_data.pw_len = safeStrLen(entry_str); - tapi_ret = tel_enable_sim_security(&sim_sec_data, &ReqId); + tapi_ret = tel_enable_sim_facility(ad->handle, &sim_sec_data, setting_sim_facility_enable_cb, ad); setting_password_main_clear_1line_password(ad); if (TAPI_API_SUCCESS != tapi_ret) { ad->focus_data = ad->ed_pw1; - SETTING_TRACE_DEBUG("%s*** [ERR] tel_enable_sim_security err=%d ***%s", + SETTING_TRACE_DEBUG("%s*** [ERR] tel_enable_sim_facility err=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); - return; } else { /* Success. Send Message to Caller for Modify Pin Lock slider status */ - SETTING_TRACE_DEBUG("%s*** [SUCCESS] tel_enable_sim_security err=%d ***%s", - SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); + SETTING_TRACE_DEBUG("*** [SUCCESS] tel_enable_sim_facility err=%d ***", tapi_ret); } } else { setting_password_main_clear_1line_password(ad); } } - break; + return; case SETTING_PW_TYPE_PIN_LOCK_OFF: { SETTING_TRACE("case SETTING_PW_TYPE_PIN_LOCK_OFF"); @@ -2424,9 +2892,8 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, ret = setting_password_main_check_1line_password(ad); if (ret == SETTING_RETURN_SUCCESS) { - TelSimSecPw_t sim_sec_data = { 0, }; + TelSimFacilityPw_t sim_sec_data = { 0, }; int tapi_ret = TAPI_API_SUCCESS; - int ReqId; const char *entry_str; entry_str = ad->ed_pw1->sub_desc; @@ -2437,19 +2904,18 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, return; } - sim_sec_data.type = TAPI_SIM_PTYPE_PIN1; + sim_sec_data.lock_type = TAPI_SIM_LOCK_SC;//TAPI_SIM_PTYPE_PIN1 sim_sec_data.pw = (unsigned char *)entry_str; sim_sec_data.pw_len = safeStrLen(entry_str); - tapi_ret = tel_disable_sim_security(&sim_sec_data, &ReqId); + tapi_ret = tel_disable_sim_facility(ad->handle, &sim_sec_data, setting_sim_facility_disable_cb, ad); setting_password_main_clear_1line_password(ad); if (TAPI_API_SUCCESS != tapi_ret) { ad->focus_data = ad->ed_pw1; - SETTING_TRACE_DEBUG("%s*** [ERR] tel_disable_sim_security err=%d ***%s", + SETTING_TRACE_DEBUG("%s*** [ERR] tel_disable_sim_facility err=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); - return; } else { /* Success. Send Message to Caller for Modify Pin Lock slider status */ } @@ -2457,8 +2923,7 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, setting_password_main_clear_1line_password(ad); } } - break; - + return; case SETTING_PW_TYPE_PIN1_BLOCKED: { /* PIN1 Status is "Blocked": User should input puk code and new pin1 code. */ @@ -2471,7 +2936,6 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, TelSimSecPw_t puk1_data = { 0, }; TelSimSecPw_t pin1_data = { 0, }; int tapi_ret = TAPI_API_SUCCESS; - int ReqId; const char *puk; const char *new_pin1; @@ -2497,7 +2961,7 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, pin1_data.pw = (unsigned char *)new_pin1; pin1_data.pw_len = safeStrLen(new_pin1); - tapi_ret = tel_verify_sim_puks(&puk1_data, &pin1_data, &ReqId); + tapi_ret = tel_verify_sim_puks(ad->handle, &puk1_data, &pin1_data, setting_sim_verify_puks_cb, ad); setting_password_main_clear_3line_password(ad); if (TAPI_API_SUCCESS != tapi_ret) { @@ -2505,16 +2969,15 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, SETTING_TRACE_DEBUG("%s*** [ERR] tel_verify_sim_puks err=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); - return; } else { /* Success. Send Message to Caller for Modify Pin Lock slider status */ } - } else { + } else { setting_password_main_clear_3line_password(ad); } } - break; + return; case SETTING_PW_TYPE_PIN2_BLOCKED: { SETTING_TRACE("case SETTING_PW_TYPE_PIN2_BLOCKED"); @@ -2524,7 +2987,6 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, TelSimSecPw_t puk2_data = { 0, }; TelSimSecPw_t pin2_data = { 0, }; int tapi_ret = TAPI_API_SUCCESS; - int ReqId; const char *puk; const char *new_pin2; @@ -2550,7 +3012,7 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, pin2_data.pw = (unsigned char *)new_pin2; pin2_data.pw_len = safeStrLen(new_pin2); - tapi_ret = tel_verify_sim_puks(&puk2_data, &pin2_data, &ReqId); + tapi_ret = tel_verify_sim_puks(ad->handle, &puk2_data, &pin2_data, setting_sim_verify_puks_cb, ad); setting_password_main_clear_3line_password(ad); if (TAPI_API_SUCCESS != tapi_ret) { @@ -2558,16 +3020,15 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, SETTING_TRACE_DEBUG("%s*** [ERR] tel_verify_sim_puks err=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); - return; } else { /* Success. Send Message to Caller for Modify Pin Lock slider status */ } - } else { + } else { setting_password_main_clear_3line_password(ad); } } - break; + return; case SETTING_PW_TYPE_CHANGE_PIN1: { SETTING_TRACE("case SETTING_PW_TYPE_CHANGE_PIN1"); @@ -2579,7 +3040,6 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, TelSimSecPw_t sim_old_sec_data = { 0, }; TelSimSecPw_t sim_new_sec_data = { 0, }; int tapi_ret = TAPI_API_SUCCESS; - int ReqId; old_pw = ad->ed_pw1->sub_desc; new_pw = ad->ed_pw2->sub_desc; @@ -2601,7 +3061,7 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, sim_new_sec_data.pw = (unsigned char *)new_pw; sim_new_sec_data.pw_len = safeStrLen(new_pw); - tapi_ret = tel_change_sim_pins(&sim_old_sec_data, &sim_new_sec_data, &ReqId); + tapi_ret = tel_change_sim_pins(ad->handle, &sim_old_sec_data, &sim_new_sec_data, setting_sim_change_pins_cb, ad); setting_password_main_clear_3line_password(ad); if (TAPI_API_SUCCESS != tapi_ret) { @@ -2609,17 +3069,15 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, SETTING_TRACE_DEBUG("%s*** [ERR] TelTapiSimChangePIN err=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); - return; } else { /* Success popup and send message to caller */ /* setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_POP_PIN1_CHANGED")); */ } } else { setting_password_main_clear_3line_password(ad); - return; } } - break; + return; case SETTING_PW_TYPE_CHANGE_PIN2: { SETTING_TRACE("case SETTING_PW_TYPE_CHANGE_PIN2"); @@ -2630,7 +3088,6 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, TelSimSecPw_t sim_old_sec_data = { 0, }; TelSimSecPw_t sim_new_sec_data = { 0, }; int tapi_ret = TAPI_API_SUCCESS; - int ReqId; old_pw = ad->ed_pw1->sub_desc; new_pw = ad->ed_pw2->sub_desc; @@ -2652,7 +3109,7 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, sim_new_sec_data.pw = (unsigned char *)new_pw; sim_new_sec_data.pw_len = safeStrLen(new_pw); - tapi_ret = tel_change_sim_pins(&sim_old_sec_data, &sim_new_sec_data, &ReqId); + tapi_ret = tel_change_sim_pins(ad->handle, &sim_old_sec_data, &sim_new_sec_data, setting_sim_change_pins_cb, ad); setting_password_main_clear_3line_password(ad); if (TAPI_API_SUCCESS != tapi_ret) { @@ -2660,18 +3117,15 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, SETTING_TRACE_DEBUG("%s*** [ERR] TelTapiSimChangePIN err=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); - return; } else { /* Success popup and send message to caller */ /* setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_ST_POP_PIN2_CHANGED")); */ } - } else { + } else { setting_password_main_clear_3line_password(ad); - return; } } - break; - + return; case SETTING_PW_TYPE_SIM_LOCK_ON: { SETTING_TRACE("case SETTING_PW_TYPE_SIM_LOCK_ON"); @@ -2679,9 +3133,8 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, ret = setting_password_main_check_2line_password(ad); if (ret == SETTING_RETURN_SUCCESS) { - TelSimSecPw_t sim_sec_data = { 0, }; + TelSimFacilityPw_t sim_sec_data = { 0, }; int tapi_ret = TAPI_API_SUCCESS; - int ReqId; const char *entry_str; entry_str = ad->ed_pw1->sub_desc; if (isEmptyStr(entry_str)) { @@ -2690,39 +3143,36 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, return; } - sim_sec_data.type = TAPI_SIM_PTYPE_SIM; + sim_sec_data.lock_type = TAPI_SIM_LOCK_PS;//TAPI_SIM_PTYPE_SIM sim_sec_data.pw = (unsigned char *)entry_str; sim_sec_data.pw_len = safeStrLen(entry_str); - tapi_ret = tel_enable_sim_security(&sim_sec_data, &ReqId); + tapi_ret = tel_enable_sim_facility(ad->handle, &sim_sec_data, setting_sim_facility_enable_cb, ad); setting_password_main_clear_2line_password(ad); SETTING_TRACE("SIM Lock password : %s\n", (char *)(sim_sec_data.pw)); if (TAPI_API_SUCCESS != tapi_ret) { ad->focus_data = ad->ed_pw1; - SETTING_TRACE_DEBUG("%s*** [ERR] tel_enable_sim_security err=%d ***%s", + SETTING_TRACE_DEBUG("%s*** [ERR] tel_enable_sim_facility err=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); - return; } else { /* Success. Send Message to Caller for Modify Pin Lock slider status */ } - } else { + } else { setting_password_main_clear_2line_password(ad); } } - break; - + return; case SETTING_PW_TYPE_SIM_LOCK_OFF: { SETTING_TRACE("case SETTING_PW_TYPE_SIM_LOCK_OFF"); ret = setting_password_main_check_1line_password(ad); if (ret == SETTING_RETURN_SUCCESS) { - TelSimSecPw_t sim_sec_data = { 0, }; + TelSimFacilityPw_t sim_sec_data = { 0, }; int tapi_ret = TAPI_API_SUCCESS; - int ReqId; const char *entry_str; entry_str = ad->ed_pw1->sub_desc; @@ -2732,32 +3182,145 @@ setting_password_main_click_softkey_done_cb(void *data, Evas_Object *obj, return; } - sim_sec_data.type = TAPI_SIM_PTYPE_SIM; + sim_sec_data.lock_type = TAPI_SIM_LOCK_PS;//TAPI_SIM_PTYPE_SIM sim_sec_data.pw = (unsigned char *)entry_str; sim_sec_data.pw_len = safeStrLen(entry_str); - tapi_ret = tel_disable_sim_security(&sim_sec_data, &ReqId); + tapi_ret = tel_disable_sim_facility(ad->handle, &sim_sec_data, setting_sim_facility_disable_cb, ad); setting_password_main_clear_1line_password(ad); if (TAPI_API_SUCCESS != tapi_ret) { ad->focus_data = ad->ed_pw1; - SETTING_TRACE_DEBUG("%s*** [ERR] tel_disable_sim_security err=%d ***%s", + SETTING_TRACE_DEBUG("%s*** [ERR] tel_disable_sim_facility err=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); - return; } else { /* Success. Send Message to Caller for Modify Pin Lock slider status */ } - } else { + } else { + setting_password_main_clear_1line_password(ad); + } + } + return; +#if SUPPORT_FDN + case SETTING_PW_TYPE_FDN_MODE_ON: + { + SETTING_TRACE("case SETTING_PW_TYPE_FDN_MODE_ON"); + ret = setting_password_main_check_1line_password(ad); + + if(ret == SETTING_RETURN_SUCCESS) + { + const char *entry_str; + int tapi_ret = TAPI_API_INVALID_INPUT; + + TelSimFacilityPw_t sim_sec_data = {0,}; + int ReqId; + + entry_str = ad->ed_pw1->sub_desc; + if(isEmptyStr(entry_str)) + { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_ERROR("[ERR] elm_entry_entry_get(ad->ed_pw1) return NULL!"); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + sim_sec_data.lock_type = TAPI_SIM_LOCK_FD;//TAPI_SIM_PTYPE_PIN2; + sim_sec_data.pw_len = safeStrLen(entry_str); + sim_sec_data.pw = (unsigned char*)entry_str; + + tapi_ret = tel_enable_sim_facility(ad->handle, &sim_sec_data, setting_sim_facility_enable_cb, ad); setting_password_main_clear_1line_password(ad); + + if(tapi_ret != TAPI_API_SUCCESS) + { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_ERROR("[ERR] Failed to enable FDN. Tapi return %d", tapi_ret); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + /* Success */ + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "result", ad->view_type_string); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", ad->view_type_string); + service_destroy(svc); + //ug_destroy_me(ad->ug); + } + else + { + /* check failed */ + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), TRUE); } } break; + case SETTING_PW_TYPE_FDN_MODE_OFF: + { + SETTING_TRACE("case SETTING_PW_TYPE_FDN_MODE_OFF"); + ret = setting_password_main_check_1line_password(ad); + if(ret == SETTING_RETURN_SUCCESS) + { + const char *entry_str; + int tapi_ret = TAPI_API_INVALID_INPUT; + + TelSimFacilityPw_t sim_sec_data = {0,}; + + entry_str = ad->ed_pw1->sub_desc; + if(isEmptyStr(entry_str)) + { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_ERROR("[ERR] elm_entry_entry_get(ad->ed_pw1) return NULL!"); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + sim_sec_data.lock_type = TAPI_SIM_LOCK_FD;//TAPI_SIM_PTYPE_PIN2 + sim_sec_data.pw_len = safeStrLen(entry_str); + sim_sec_data.pw = (unsigned char*)entry_str; + + tapi_ret = tel_disable_sim_facility(ad->handle, &sim_sec_data, setting_sim_facility_disable_cb, ad); + setting_password_main_clear_1line_password(ad); + + if(tapi_ret != TAPI_API_SUCCESS) + { + ad->focus_data = ad->ed_pw1; + SETTING_TRACE_ERROR("[ERR] Failed to disable FDN. Tapi return %d", tapi_ret); + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); + return; + } + + /* Success */ + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "result", ad->view_type_string); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", ad->view_type_string); + + service_destroy(svc); + //ug_destroy_me(ad->ug); + } + else + { + /* check failed */ + setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), TRUE); + } + } + break; + +#endif default: - /* Send destroy request */ - ug_destroy_me(ad->ug); break; } + + service_add_extra_data(svc, "result", ad->view_type_string); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", ad->view_type_string); + + service_destroy(svc); + /* Send destroy request */ + ug_destroy_me(ad->ug); } diff --git a/setting-password/src/setting-password.c b/setting-password/src/setting-password.c old mode 100644 new mode 100755 index c3f7ef0..f9efb9e --- a/setting-password/src/setting-password.c +++ b/setting-password/src/setting-password.c @@ -1,64 +1,62 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#ifdef SUPPORT_MDM +#include +#include +#endif -#include #ifndef UG_MODULE_API #define UG_MODULE_API __attribute__ ((visibility("default"))) #endif -static tapi_request_event tapi_req_events[] = { - {-1, TAPI_EVENT_SIM_CHANGE_PINS_CNF}, - {-1, TAPI_EVENT_SIM_DISABLE_SEC_CNF}, - {-1, TAPI_EVENT_SIM_ENABLE_SEC_CNF}, - {-1, TAPI_EVENT_SIM_VERIFY_SEC_CNF}, - {-1, TAPI_EVENT_SIM_VERIFY_PUK_CNF}, - {-1, TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF}, - {-1, TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF}, - {-1, TAPI_EVENT_SIM_ENABLE_PERS_CNF}, - {-1, TAPI_EVENT_SIM_DISABLE_PERS_CNF}, - {-1, TAPI_EVENT_SIM_PERS_STATUS_CNF}, -}; - static struct _pw_item pw_its[] = { - { SETTING_PW_TYPE_POWER_ON_LOCK, "SETTING_PW_TYPE_POWER_ON_LOCK" }, - { SETTING_PW_TYPE_PHONE_LOCK, "SETTING_PW_TYPE_PHONE_LOCK" }, - { SETTING_PW_TYPE_PHONE_LOCK_ON, "SETTING_PW_TYPE_PHONE_LOCK_ON" }, + { SETTING_PW_TYPE_PASSWORD, "SETTING_PW_TYPE_PASSWORD" }, { SETTING_PW_TYPE_SET_PASSWORD, "SETTING_PW_TYPE_SET_PASSWORD" }, - { SETTING_PW_TYPE_SIMPLE_PASSWORD, "SETTING_PW_TYPE_SIMPLE_PASSWORD" }, { SETTING_PW_TYPE_CHANGE_PASSWORD, "SETTING_PW_TYPE_CHANGE_PASSWORD" }, + { SETTING_PW_TYPE_SIMPLE_PASSWORD, "SETTING_PW_TYPE_SIMPLE_PASSWORD" }, + { SETTING_PW_TYPE_SET_SIMPLE_PASSWORD, "SETTING_PW_TYPE_SET_SIMPLE_PASSWORD" }, + { SETTING_PW_TYPE_CHANGE_SIMPLE_PASSWORD, "SETTING_PW_TYPE_CHANGE_SIMPLE_PASSWORD" }, + { SETTING_PW_TYPE_ENTER_LOCK_TYPE, "SETTING_PW_TYPE_ENTER_LOCK_TYPE" }, { SETTING_PW_TYPE_SIM_LOCK_ON, "SETTING_PW_TYPE_SIM_LOCK_ON" }, { SETTING_PW_TYPE_SIM_LOCK_OFF, "SETTING_PW_TYPE_SIM_LOCK_OFF" }, { SETTING_PW_TYPE_PIN_LOCK_ON, "SETTING_PW_TYPE_PIN_LOCK_ON" }, { SETTING_PW_TYPE_PIN_LOCK_OFF, "SETTING_PW_TYPE_PIN_LOCK_OFF" }, { SETTING_PW_TYPE_CHANGE_PIN1, "SETTING_PW_TYPE_CHANGE_PIN1" }, - { SETTING_PW_TYPE_FDN_MODE_ON, "SETTING_PW_TYPE_FDN_MODE_ON" }, - { SETTING_PW_TYPE_FDN_MODE_OFF, "SETTING_PW_TYPE_FDN_MODE_OFF" }, { SETTING_PW_TYPE_CHANGE_PIN2, "SETTING_PW_TYPE_CHANGE_PIN2" }, { SETTING_PW_TYPE_PIN1_BLOCKED, "SETTING_PW_TYPE_PIN1_BLOCKED" }, { SETTING_PW_TYPE_PIN2_BLOCKED, "SETTING_PW_TYPE_PIN2_BLOCKED" }, { SETTING_PW_TYPE_RESET, "SETTING_PW_TYPE_RESET" }, - { SETTING_PW_TYPE_CLEAR, "SETTING_PW_TYPE_CLEAR"}, - { SETTING_PW_TYPE_LOCK_FOR_APP, "SETTING_PW_TYPE_LOCK_FOR_APP"}, /* used by other app */ +#ifdef SUPPORT_MDM + { SETTING_PW_TYPE_MDM_NEW_POLICY, "SETTING_PW_TYPE_MDM_NEW_POLICY" }, /*for mdm policy */ + { SETTING_PW_TYPE_MDM_CHANGE_PASSWORD, "SETTING_PW_TYPE_MDM_CHANGE_PASSWORD" }, + { SETTING_PW_TYPE_MDM_TO_SIMPLE, "SETTING_PW_TYPE_MDM_TO_SIMPLE" }, +#endif { SETTING_PW_TYPE_MAX, NULL } }; static void setting_tapi_init(SettingPasswordUG *ad); static void setting_password_ug_display_result_popup(tapi_receive_info *result, SettingPasswordUG *ad); -static int setting_password_ug_sim_event_callback(const TelTapiEvent_t *event, void *data); static void setting_password_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info) { @@ -76,19 +74,17 @@ static void setting_tapi_init(SettingPasswordUG *ad) case SETTING_PW_TYPE_PIN_LOCK_OFF: case SETTING_PW_TYPE_CHANGE_PIN1: case SETTING_PW_TYPE_CHANGE_PIN2: - case SETTING_PW_TYPE_FDN_MODE_ON: - case SETTING_PW_TYPE_FDN_MODE_OFF: case SETTING_PW_TYPE_PIN1_BLOCKED: case SETTING_PW_TYPE_PIN2_BLOCKED: - /* subscribe tapi events */ - if (setting_password_ug_subscribe_sim_events(ad) != SETTING_RETURN_SUCCESS) { - SETTING_TRACE_DEBUG - ("%s*** [ERR] setting_security_subscribe_sim_events. ***%s", + ad->handle = tel_init(NULL); + if (!ad->handle) { + SETTING_TRACE_DEBUG("%s*** [ERR] tel_init. ***%s", SETTING_FONT_RED, SETTING_FONT_BLACK); setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), FALSE); } + break; default: break; @@ -106,14 +102,11 @@ static void setting_tapi_finize(SettingPasswordUG *ad) case SETTING_PW_TYPE_PIN_LOCK_OFF: case SETTING_PW_TYPE_CHANGE_PIN1: case SETTING_PW_TYPE_CHANGE_PIN2: - case SETTING_PW_TYPE_FDN_MODE_ON: - case SETTING_PW_TYPE_FDN_MODE_OFF: case SETTING_PW_TYPE_PIN1_BLOCKED: case SETTING_PW_TYPE_PIN2_BLOCKED: - /* unsubscribe tapi events */ - if (setting_password_ug_unsubscribe_sim_events(ad) != SETTING_RETURN_SUCCESS) { + if (tel_deinit(ad->handle) != TAPI_API_SUCCESS) { SETTING_TRACE_DEBUG - ("%s*** [ERR] setting_security_subscribe_sim_events. ***%s", + ("%s*** [ERR] setting_network_unsubscribe_tapi_events. ***%s", SETTING_FONT_RED, SETTING_FONT_BLACK); setting_password_ug_create_popup_notitle_nobtn(ad, _("IDS_COM_POP_ERROR"), @@ -126,11 +119,28 @@ static void setting_tapi_finize(SettingPasswordUG *ad) SETTING_TRACE_END; } -setting_pw_type __get_password_view_type(SettingPasswordUG *ad, bundle *data) +setting_pw_type __get_password_view_type(SettingPasswordUG *ad, service_h service) { SETTING_TRACE_BEGIN; - setting_retvm_if(NULL == data, -1, "NULL == data"); - ad->view_type_string = bundle_get_val(data, "viewtype"); + + service_get_extra_data(service, "viewtype", &(ad->view_type_string)); + service_get_extra_data(service, "current", &(ad->cur_pwd)); + + if(ad->cur_pwd) + SETTING_TRACE_DEBUG("Receive current : %s", ad->cur_pwd); +#ifdef SUPPORT_MDM + char *status = NULL; + service_get_extra_data(service, "status", &status); + if(safeStrCmp(status, "expired") == 0) + { + ad->is_expired = SETTING_PW_STATUS_EXPIRED; + } + else + { + ad->is_expired = SETTING_PW_STATUS_OK; + } + SETTING_TRACE_DEBUG("is_expired : %d", ad->is_expired); +#endif SETTING_TRACE("viewtype:%s", ad->view_type_string); setting_pw_type ret_pw_type = 0; int i; @@ -141,24 +151,75 @@ setting_pw_type __get_password_view_type(SettingPasswordUG *ad, bundle *data) { ret_pw_type = pw_its[i].pw_type_num; break; - } + } } - if( (ret_pw_type == SETTING_PW_TYPE_PHONE_LOCK) || - (ret_pw_type == SETTING_PW_TYPE_SIMPLE_PASSWORD) || - (ret_pw_type == SETTING_PW_TYPE_LOCK_FOR_APP) || - (ret_pw_type == SETTING_PW_TYPE_CHANGE_PASSWORD) || - (ret_pw_type == SETTING_PW_TYPE_RESET) ) + ad->is_empty = setting_password_is_password_empty(); + + /* exception handle */ + if(ret_pw_type == SETTING_PW_TYPE_PASSWORD) + { + ret_pw_type = SETTING_PW_TYPE_SET_PASSWORD; + } + else if(ret_pw_type == SETTING_PW_TYPE_SIMPLE_PASSWORD) { - if(setting_password_is_password_empty() == TRUE) + ret_pw_type = SETTING_PW_TYPE_SET_SIMPLE_PASSWORD; + } + else if(ret_pw_type == SETTING_PW_TYPE_CHANGE_PASSWORD) + { + if(ad->is_empty == TRUE) { ret_pw_type = SETTING_PW_TYPE_SET_PASSWORD; } } + else if(ret_pw_type == SETTING_PW_TYPE_CHANGE_SIMPLE_PASSWORD) + { + if(ad->is_empty == TRUE) + { + ret_pw_type = SETTING_PW_TYPE_SET_SIMPLE_PASSWORD; + } + } + else if( ret_pw_type == SETTING_PW_TYPE_RESET ) + { + if(ad->is_empty == TRUE) + { + /* To do : check screen lock option key */ + if(ad->screen_lock_type == SETTING_SCREEN_LOCK_TYPE_PASSWORD) + ret_pw_type = SETTING_PW_TYPE_SET_PASSWORD; + else if(ad->screen_lock_type == SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD) + ret_pw_type = SETTING_PW_TYPE_SET_SIMPLE_PASSWORD; + } + else + { + if(ad->screen_lock_type == SETTING_SCREEN_LOCK_TYPE_PASSWORD) + ret_pw_type = SETTING_PW_TYPE_PASSWORD; + else if(ad->screen_lock_type == SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD) + ret_pw_type = SETTING_PW_TYPE_SIMPLE_PASSWORD; + } + } + else if( ret_pw_type == SETTING_PW_TYPE_ENTER_LOCK_TYPE ) + { + if(ad->screen_lock_type == SETTING_SCREEN_LOCK_TYPE_PASSWORD) + ret_pw_type = SETTING_PW_TYPE_PASSWORD; + else if(ad->screen_lock_type == SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD) + ret_pw_type = SETTING_PW_TYPE_SIMPLE_PASSWORD; + } +#ifdef SUPPORT_MDM + else if (ret_pw_type == SETTING_PW_TYPE_MDM_CHANGE_PASSWORD) + { + if((ad->is_empty == TRUE) + || (ad->is_expired == SETTING_PW_STATUS_EXPIRED)) + { + ret_pw_type = SETTING_PW_TYPE_MDM_NEW_POLICY; + } + } +#endif + /* end */ return ret_pw_type; } +#if DISABLED_CODE static void setting_password_ug_set_password_cb(void *data, Evas_Object *obj, void *event_info) { @@ -176,7 +237,7 @@ static void setting_password_ug_set_password_cb(void *data, Evas_Object *obj, EVAS_CALLBACK_RESIZE, setting_password_ug_cb_resize, ad); - if(ad->setpw_notify) + if (ad->setpw_notify) { evas_object_del(ad->setpw_notify); ad->setpw_notify = NULL; @@ -192,6 +253,17 @@ static void setting_password_ug_set_password_cb(void *data, Evas_Object *obj, ad->setpw_notify = NULL; } + /* send result : Cancel */ + service_h svc; + if(service_create(&svc)) + return; + + service_add_extra_data(svc, "result", "Cancel"); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", "Cancel"); + + service_destroy(svc); + ug_destroy_me(ad->ug); } break; @@ -199,22 +271,118 @@ static void setting_password_ug_set_password_cb(void *data, Evas_Object *obj, break; } } - +#endif static char *__gl_err_desc_text_get(void *data, Evas_Object *obj, const char *part) { retv_if(data == NULL, NULL); char buf[256] = {0,}; snprintf(buf, sizeof(buf)-1, "%s", (char*)data); - + + return strdup(buf); +} + +#ifdef SUPPORT_MDM +void setting_password_ug_display_mdm_desc(void *data, const char* guide_text) +{ + SETTING_TRACE_BEGIN; + ret_if(data == NULL || guide_text == NULL); + + SettingPasswordUG *ad = (SettingPasswordUG *)data; + + if(ad->mdm_desc != NULL) + { + elm_object_item_del(ad->mdm_desc); + ad->mdm_desc = NULL; + } + + ad->guide_str = (char *)guide_text; + + ad->mdm_desc = elm_genlist_item_append(ad->scroller, &(ad->itc_mdm_desc), ad, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + + SETTING_TRACE_END; +} + +static char *__gl_mdm_desc_text_get(void *data, Evas_Object *obj, const char *part) +{ + SETTING_TRACE_BEGIN; + retv_if(data == NULL, NULL); + char buf[MAX_DESC_BUF_SIZE] = {0,}; + + SettingPasswordUG *ad = (SettingPasswordUG *)data; + + if(ad->mdm_policy == NULL) + return NULL; + + if(ad->guide_str) + safeCopyStr(buf, ad->guide_str, MAX_DESC_BUF_SIZE); + + SETTING_TRACE_END; return strdup(buf); } -static void *setting_password_ug_on_create(struct ui_gadget *ug, - enum ug_mode mode, bundle *data, +static Eina_Bool __setting_password_ug_keydown_cb(void *data, int type, void *event) +{ + SETTING_TRACE_BEGIN; + + Ecore_Event_Key *ev = event; + + if(!strcmp(ev->keyname, KEY_END) || !strcmp(ev->keyname, KEY_SELECT)) + { + SETTING_TRACE_DEBUG("event key name : %s", ev->keyname); + // nothing to do. + } + return ECORE_CALLBACK_DONE; +} + +static void __setting_password_ug_key_grab(SettingPasswordUG *ad) +{ + SETTING_TRACE_BEGIN; + Ecore_X_Window xwin = 0; + Ecore_X_Display *disp = NULL; + + int ret = 0; + + if(ad == NULL) + return; + + disp = ecore_x_display_get(); + xwin = elm_win_xwindow_get((Evas_Object*)ug_get_window()); + + ret = utilx_grab_key(disp, xwin, KEY_SELECT, EXCLUSIVE_GRAB); + if(ret) + return; + + ad->event_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, __setting_password_ug_keydown_cb, ad); + SETTING_TRACE_END; +} +static void __setting_password_ug_key_ungrab(SettingPasswordUG *ad) +{ + SETTING_TRACE_BEGIN; + Ecore_X_Window xwin = 0; + Ecore_X_Display *disp = NULL; + + int ret = 0; + + if(ad == NULL) + return; + + disp = ecore_x_display_get(); + xwin = elm_win_xwindow_get((Evas_Object*)ug_get_window()); + + ret = utilx_ungrab_key(disp, xwin, KEY_HOME); + if(ret) + return; + + ecore_event_handler_del(ad->event_handler); +} +#endif + +static void *setting_password_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, void *priv) { - setting_retvm_if((!ug || !priv), NULL, "!ug || !priv"); + setting_retvm_if((!priv), NULL, "!priv"); SettingPasswordUG *passwordUG = (SettingPasswordUG *)priv; passwordUG->ug = ug; @@ -237,10 +405,8 @@ static void *setting_password_ug_on_create(struct ui_gadget *ug, return NULL; } /* set launguage */ - setlocale(LC_ALL, ""); - bindtextdomain(SETTING_PACKAGE, SETTING_LOCALEDIR); + appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); FREE(pa_path); - /* --------------------------------------------------------- */ setting_create_Gendial_itc("dialogue/title", &(passwordUG->itc_title)); setting_create_Gendial_itc("dialogue/1icon",&(passwordUG->itc_variable_height)); @@ -255,81 +421,129 @@ static void *setting_password_ug_on_create(struct ui_gadget *ug, passwordUG->itc_err_desc.func.content_get = NULL; passwordUG->itc_err_desc.func.state_get = NULL; passwordUG->itc_err_desc.func.del = NULL; +#ifdef SUPPORT_MDM + passwordUG->itc_mdm_desc.item_style = "multiline/1text"; + passwordUG->itc_mdm_desc.func.text_get = __gl_mdm_desc_text_get; + passwordUG->itc_mdm_desc.func.content_get = NULL; + passwordUG->itc_mdm_desc.func.state_get = NULL; + passwordUG->itc_mdm_desc.func.del = NULL; +#endif + + /* get screen lock type */ + if( vconf_get_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, &(passwordUG->screen_lock_type)) < 0) { + passwordUG->screen_lock_type = 0; + } + SETTING_TRACE_DEBUG("screen lock type : %d", passwordUG->screen_lock_type); + + passwordUG->cur_pwd = NULL; /* init */ - ecore_imf_init(); - passwordUG->view_type = __get_password_view_type(passwordUG, data); + passwordUG->view_type = __get_password_view_type(passwordUG, service); setting_tapi_init(passwordUG); - /* get simple password flag */ - if(vconf_get_bool(VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL, &(passwordUG->is_simple_password_on)) < 0) - passwordUG->is_simple_password_on = 0; +#ifdef SUPPORT_MDM + /* To do : check for MDM server */ + passwordUG->mdm_data = NULL; + passwordUG->mdm_policy = NULL; + + passwordUG->mdm_status = mdm_get_service(); + + if(passwordUG->mdm_status == MDM_RESULT_SUCCESS) + { + passwordUG->mdm_data = mdm_get_password_policy(); - SETTING_TRACE_DEBUG("simple password is %d", passwordUG->is_simple_password_on); + passwordUG->mdm_policy = (mdm_password_policy_t*)(passwordUG->mdm_data->data); - if (SETTING_PW_TYPE_SET_PASSWORD == passwordUG->view_type) + if ((SETTING_PW_TYPE_MDM_NEW_POLICY == passwordUG->view_type) /* support mdm policy */ + || (SETTING_PW_TYPE_MDM_CHANGE_PASSWORD == passwordUG->view_type)) { - if( strcmp(passwordUG->view_type_string, "SETTING_PW_TYPE_RESET") == 0) - { /* no need to set password, in this case.*/ - bundle *b = bundle_create(); - if (!b) - return NULL; - - bundle_add(b, "result", passwordUG->view_type_string); - ug_send_result(passwordUG->ug, b); - SETTING_TRACE("Send Result : %s\n", passwordUG->view_type_string); - bundle_free(b); - /* Send destroy request */ - ug_destroy_me(passwordUG->ug); + if(passwordUG->mdm_policy != NULL) + { + if((passwordUG->mdm_policy->quality == MDM_PASSWORD_QUALITY_SOMETHING) + || (passwordUG->mdm_policy->quality == MDM_PASSWORD_QUALITY_NUMERIC)) + { + if( (passwordUG->view_type == SETTING_PW_TYPE_MDM_NEW_POLICY) + && (passwordUG->screen_lock_type == SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD)) + { + /*if only length is 0~4, apply simple password mode */ + if(passwordUG->mdm_policy->min_length <= SETTING_PW_UG_NORMAL_PASSWORD_MIN_LENGTH) + { + passwordUG->view_type = SETTING_PW_TYPE_MDM_TO_SIMPLE; + } + else + { + if(vconf_set_bool(VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL, FALSE) != 0) + { + SETTING_TRACE_DEBUG("[ERROR] setting VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL failed"); + } + } + } + } + + ecore_x_netwm_window_type_set(elm_win_xwindow_get(passwordUG->win_get), ECORE_X_WINDOW_TYPE_NOTIFICATION); + utilx_set_system_notification_level(ecore_x_display_get(), elm_win_xwindow_get(passwordUG->win_get), UTILX_NOTIFICATION_LEVEL_NORMAL); + + /* creating a view. */ + setting_view_create(&setting_view_password_main,(void *)passwordUG); + evas_object_event_callback_add(passwordUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_password_ug_cb_resize, + passwordUG); + __setting_password_ug_key_grab(passwordUG); + + return passwordUG->ly_main; + } + else + { + /* unexpected case */ + SETTING_TRACE_DEBUG("[ERROR] no policy"); + if (SETTING_PW_TYPE_MDM_NEW_POLICY == passwordUG->view_type) + passwordUG->view_type = SETTING_PW_TYPE_SET_PASSWORD; + else if (SETTING_PW_TYPE_MDM_CHANGE_PASSWORD == passwordUG->view_type) + passwordUG->view_type = SETTING_PW_TYPE_CHANGE_PASSWORD; + } } - /* Make a popup */ - passwordUG->setpw_notify = setting_create_popup_with_btn(passwordUG, - (Evas_Object *) ug_get_window(), - _("IDS_ST_POP_NO_PASSWORD_SET_PASSWORD_Q"), - NULL, - setting_password_ug_set_password_cb, - 0, 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); - - /* Make a Layout */ - passwordUG->ly_main = elm_layout_add(passwordUG->win_main_layout); - if (passwordUG->ly_main == NULL) - return NULL; - evas_object_hide(passwordUG->ly_main); - - return passwordUG->ly_main; - } else { - /* creating a view. */ - setting_view_create(&setting_view_password_main,(void *)passwordUG); - evas_object_event_callback_add(passwordUG->win_main_layout, + else + { + SETTING_TRACE_DEBUG("[ERROR] failed to connect mdm server"); + } + } +#endif +#ifdef SUPPORT_MDM + if (SETTING_PW_TYPE_CHANGE_PASSWORD == passwordUG->view_type) + { + // to do : if policy exist and quality is not unspecified, + // change view type to SETTING_PW_TYPE_MDM_CHANGE_PASSWORD + if((passwordUG->mdm_policy) && (passwordUG->mdm_policy->quality != MDM_PASSWORD_QUALITY_UNSPECIFIED)) + { + passwordUG->view_type = SETTING_PW_TYPE_MDM_CHANGE_PASSWORD; + SETTING_TRACE_DEBUG("change view type to SETTING_PW_TYPE_MDM_CHANGE_PASSWORD"); + } + // end + } +#endif + /* creating a view. */ + setting_view_create(&setting_view_password_main,(void *)passwordUG); + evas_object_event_callback_add(passwordUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_password_ug_cb_resize, passwordUG); - return passwordUG->ly_main; - } + return passwordUG->ly_main; } -static void setting_password_ug_on_start(struct ui_gadget *ug, bundle *data, void *priv) +static void setting_password_ug_on_start(ui_gadget_h ug, service_h service, void *priv) { - SettingPasswordUG *passwordUG = (SettingPasswordUG *)priv; - - /* handle focus of entry */ - if(passwordUG->sp_entry1 != NULL) - { - SETTING_TRACE_DEBUG("sp_entry1 is exist."); - elm_object_focus_set(passwordUG->sp_entry1, EINA_TRUE); - passwordUG->sp_focused = passwordUG->sp_entry1; - } } -static void setting_password_ug_on_pause(struct ui_gadget *ug, bundle *data, void *priv) +static void setting_password_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_password_ug_on_resume(struct ui_gadget *ug, bundle *data, void *priv) +static void setting_password_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_password_ug_on_destroy(struct ui_gadget *ug, bundle *data, void *priv) +static void setting_password_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) { SettingPasswordUG *passwordUG = (SettingPasswordUG *)priv; @@ -340,15 +554,21 @@ static void setting_password_ug_on_destroy(struct ui_gadget *ug, bundle *data, v if (passwordUG->t_info) { FREE(passwordUG->t_info); } - if(passwordUG->remove_timer) { ecore_timer_del(passwordUG->remove_timer); passwordUG->remove_timer = NULL; } - - /* release */ - ecore_imf_shutdown(); +#ifdef SUPPORT_MDM + if(passwordUG->event_handler) + { + __setting_password_ug_key_ungrab(passwordUG); + } + if(passwordUG->mdm_status == MDM_RESULT_SUCCESS) + { + mdm_release_service(); + } +#endif /* delete the allocated objects. */ setting_view_destroy(&setting_view_password_main, passwordUG); @@ -358,14 +578,14 @@ static void setting_password_ug_on_destroy(struct ui_gadget *ug, bundle *data, v } } -static void setting_password_ug_on_message(struct ui_gadget *ug, bundle *msg, - bundle *data, void *priv) +static void setting_password_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) { } -static void setting_password_ug_on_event(struct ui_gadget *ug, - enum ug_event event, bundle *data, +static void setting_password_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, void *priv) { switch (event) { @@ -390,11 +610,11 @@ static void setting_password_ug_on_event(struct ui_gadget *ug, } } -static void setting_password_ug_on_key_event(struct ui_gadget *ug, +static void setting_password_ug_on_key_event(ui_gadget_h ug, enum ug_key_event event, - bundle *data, void *priv) + service_h service, void *priv) { - if (!ug || !priv) + if (!priv) return; SettingPasswordUG *ad = (SettingPasswordUG*)priv; @@ -442,335 +662,198 @@ UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) FREE(passwordUG); } -int setting_password_ug_subscribe_sim_events(SettingPasswordUG *ad) +void setting_sim_change_pins_cb(TapiHandle *handle, int result, void *data, void *user_data) { - int i = 0; - int ret = SETTING_RETURN_SUCCESS; - int tapi_ret = TAPI_API_SUCCESS; - tapi_request_tapi_info *t_info; - - if (tel_init() != TAPI_API_SUCCESS) { - SETTING_TRACE_DEBUG("%s*** [ERR] tel_init. ***%s", - SETTING_FONT_RED, SETTING_FONT_BLACK); - return SETTING_TAPI_INIT_ECORE_ERR; + SETTING_TRACE_BEGIN; + ret_if(!user_data || !data); + TelSimPinOperationResult_t sec_rt = result; + tapi_receive_info result_info = { 0, }; + TelSimSecResult_t *sim_event_data = (TelSimSecResult_t *) data; + SETTING_TRACE("sec_rt[%d]", sec_rt); + SETTING_TRACE("sim_event_data->type:%d", sim_event_data->type); + SETTING_TRACE("sim_event_data->retry_count[%d]", sim_event_data->retry_count); + + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt) { + if (TAPI_SIM_PTYPE_PIN1 == sim_event_data->type) + result_info.stat = SIM_PIN1_CHANGE_SUCCESS; + else if (TAPI_SIM_PTYPE_PIN2 == sim_event_data->type) + result_info.stat = SIM_PIN2_CHANGE_SUCCESS; + } else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == sec_rt) { + if (TAPI_SIM_PTYPE_PIN1 == sim_event_data->type) { + result_info.stat = SIM_INCORRECT_PIN1_CODE; + result_info.retry_cnt = sim_event_data->retry_count; + } else if (TAPI_SIM_PTYPE_PIN2 == sim_event_data->type) { + result_info.stat = SIM_INCORRECT_PIN2_CODE; + result_info.retry_cnt = sim_event_data->retry_count; + } + } else if (TAPI_SIM_PUK_REQUIRED == sec_rt) { + if (TAPI_SIM_PTYPE_PIN1 == sim_event_data->type) + result_info.stat = SIM_PIN1_BLOCKED; + else if (TAPI_SIM_PTYPE_PIN2 == sim_event_data->type) + result_info.stat = SIM_PIN2_BLOCKED; + } else { + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + return; } + setting_password_ug_display_result_popup(&result_info, user_data); +} - SETTING_TRACE_DEBUG("Tapi Init : %d", tapi_ret); - - t_info = calloc(1, sizeof(tapi_request_tapi_info)); +void setting_sim_verify_puks_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; - if (NULL == t_info) { - SETTING_TRACE_DEBUG("Tapi calloc data error\n"); - return SETTING_RETURN_FAIL; - } + ret_if(!user_data || !data); + SettingPasswordUG *ad = user_data; + TelSimPinOperationResult_t sec_rt = result; + tapi_receive_info result_info = { 0, }; + TelSimSecResult_t *sim_event_data = (TelSimSecResult_t *) data; + ad->verify_puks_result = sim_event_data; + SETTING_TRACE("sec_rt[%d]", sec_rt); + SETTING_TRACE("sim_event_data->type:%d", sim_event_data->type); + SETTING_TRACE("sim_event_data->retry_count[%d]", sim_event_data->retry_count); - t_info->evt = tapi_req_events; - t_info->evt_sz = sizeof(tapi_req_events) / sizeof(tapi_req_events[0]); - t_info->cb = NULL; - t_info->cb_data = NULL; - - SETTING_TRACE_DEBUG("Tapi Info Size : %d", t_info->evt_sz); - for (i = 0; i < t_info->evt_sz; i++) { - tapi_ret = - tel_register_event(t_info->evt[i].event, - &(t_info->evt[i].sid), - (TelAppCallback) & - setting_password_ug_sim_event_callback, - ad); - SETTING_TRACE_DEBUG - ("TAPI Register Return : %d Event : %d sid: %d", tapi_ret, - t_info->evt[i].event, t_info->evt[i].sid); + if (TAPI_SIM_PTYPE_PUK1 == sim_event_data->type) + { + //if (TAPI_SIM_PIN_REQUIRED == sec_rt){ + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt){ + setting_password_ug_create_popup_notitle_nobtn(ad, _("Verfy PUK1 Sucessfully"), TRUE); + return; + } else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == sec_rt) { + result_info.stat = SIM_INCORRECT_PUK1_CODE; + result_info.retry_cnt = sim_event_data->retry_count; + } else { + result_info.stat = SIM_UNKNOWN_ERROR; + } } - if (TAPI_API_SUCCESS == tapi_ret) { - tapi_ret = tel_register_app_name("org.tizen.setting"); - - if (tapi_ret != TAPI_API_SUCCESS) { - SETTING_TRACE_DEBUG - ("%s*** [ERR] tel_register_app_name. ***%s", - SETTING_FONT_RED, SETTING_FONT_BLACK); - FREE(t_info); /* memory leak */ - return SETTING_TAPI_REG_EVENT_ECORE_ERR; + else if (TAPI_SIM_PTYPE_PUK2 == sim_event_data->type) + { + //if (TAPI_SIM_PUK_REQUIRED == sec_rt) + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt){ + setting_password_ug_create_popup_notitle_nobtn(ad, _("Verfy PUK2 Sucessfully"), TRUE); + return; + } else if (TAPI_SIM_PUK_INCORRECT_PASSWORD == sec_rt) { + result_info.stat = SIM_INCORRECT_PUK2_CODE; + result_info.retry_cnt = sim_event_data->retry_count; + } else { + result_info.stat = SIM_UNKNOWN_ERROR; } } - ad->t_info = t_info; - return ret; + else + { + result_info.stat = SIM_UNKNOWN_ERROR; + } + setting_password_ug_display_result_popup(&result_info, user_data); } -int setting_password_ug_unsubscribe_sim_events(SettingPasswordUG *ad) +void setting_sim_facility_enable_cb(TapiHandle *handle, int result, void *data, void *user_data) { - retv_if(ad == NULL, SETTING_GENERAL_ERR_WRONG_PARAMETER); - - int i = 0; - int ret = SETTING_RETURN_SUCCESS; - int tapi_ret = TAPI_API_SUCCESS; - - if (ad->t_info) { - tapi_request_tapi_info *t_info = ad->t_info; - SETTING_TRACE("T_INFO size : %d\n", t_info->evt_sz); - for (i = 0; i < t_info->evt_sz; i++) { - if (t_info->evt[i].sid == -1) - continue; - - /* tapi_ret = tel_deregister_event_at_ecore_loop(t_info->evt[i].sid); */ - tapi_ret = tel_deregister_event(t_info->evt[i].sid); - if (tapi_ret != TAPI_API_SUCCESS) { - SETTING_TRACE_DEBUG - ("%s*** [ERR] tel_deregister_event. %dth , sid =%d, tapi_ret=%d ***%s\n", - SETTING_FONT_RED, i, t_info->evt[i].sid, - tapi_ret, SETTING_FONT_BLACK); - return SETTING_TAPI_DEREG_EVENT_ECORE_ERR; - break; - } else { - SETTING_TRACE - ("Event unregistering succeeded [%dth : %d] [subscription ID: %d]", - i, t_info->evt[i].event, - t_info->evt[i].sid); - } + SETTING_TRACE_BEGIN; + ret_if(!user_data || !data); + TelSimPinOperationResult_t sec_rt = result; + tapi_receive_info result_info = { 0, }; + TelSimFacilityResult_t *sim_event_data = (TelSimFacilityResult_t *) data; + + SETTING_TRACE("sec_rt[%d]", sec_rt); + SETTING_TRACE("sim_event_data->type:%d", sim_event_data->type); + SETTING_TRACE("sim_event_data->retry_count[%d]", sim_event_data->retry_count); + + /* Sim Lock */ + if (TAPI_SIM_LOCK_PS == sim_event_data->type) { + SETTING_TRACE("CASE TAPI_SIM_PTYPE_SIM == sim_event_data->type"); + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt) + result_info.stat = SIM_LOCK_ON_SUCCESS; + else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == sec_rt) + result_info.stat = SIM_LOCK_INCORRECT_PASSWORD; + else { + SETTING_TRACE_DEBUG("%s*** [ERR] INCORRECTED ***%s", + SETTING_FONT_RED, + SETTING_FONT_BLACK); + return; } - FREE(ad->t_info); } - - tapi_ret = tel_deinit(); - if (tapi_ret != TAPI_API_SUCCESS) { - SETTING_TRACE_DEBUG("%s*** [ERR] tel_deinit. tapi_ret=%d ***%s", - SETTING_FONT_RED, tapi_ret, - SETTING_FONT_BLACK); - return SETTING_TAPI_DEREG_EVENT_ECORE_ERR; + /* Pin Lock */ + else if (TAPI_SIM_LOCK_SC == sim_event_data->type) { + SETTING_TRACE("CASE TAPI_SIM_PTYPE_PIN1 == sim_event_data->type"); + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt) + result_info.stat = SIM_PIN_LOCK_ON_SUCCESS; + else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == sec_rt) { + result_info.stat = SIM_INCORRECT_PIN1_CODE; + result_info.retry_cnt = sim_event_data->retry_count; + } else if (TAPI_SIM_PUK_REQUIRED == sec_rt) + result_info.stat = SIM_PIN1_BLOCKED; + + /* Pre CCF */ + else if (TAPI_SIM_INCOMPATIBLE_PIN_OPERATION == sec_rt + || TAPI_SIM_CARD_ERROR == sec_rt) { + /* popup */ + result_info.stat = SIM_OPERATION_UNAVAILABLE; + } + else { + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED ***%s", + SETTING_FONT_RED, + SETTING_FONT_BLACK); + return; + } } - return ret; + setting_password_ug_display_result_popup(&result_info, user_data); } - -#ifdef Status -#undef Status -#endif - -static int -setting_password_ug_sim_event_callback(const TelTapiEvent_t *event, void *data) +void setting_sim_facility_disable_cb(TapiHandle *handle, int result, void *data, void *user_data) { - retv_if(data == NULL || event == NULL, SETTING_GENERAL_ERR_WRONG_PARAMETER); - SETTING_TRACE("event->EventClass=\t%d", (int)(event->EventClass)); - SETTING_TRACE("event->EventType=\t%d", event->EventType); - SETTING_TRACE("event->Status=\t%d", event->Status); - SETTING_TRACE("event->RequestId=\t%d", event->RequestId); - SettingPasswordUG *ad = data; - + SETTING_TRACE_BEGIN; + ret_if(!user_data || !data); + TelSimPinOperationResult_t sec_rt = result; tapi_receive_info result_info = { 0, }; - TelSimSecResult_t *sim_event_data = NULL; - sim_event_data = (TelSimSecResult_t *) event->pData; - - if (TAPI_EVENT_CLASS_SIM != event->EventClass || NULL == sim_event_data) { - SETTING_TRACE_DEBUG - ("EventClass is not EVENT_CLASS_SIM or sim_event_data is NULL!\n"); - SETTING_TRACE_DEBUG("sim_event_data %p\n", sim_event_data); - return SETTING_RETURN_FAIL; - } - - switch (event->EventType) { - /* Lock ON */ - case TAPI_EVENT_SIM_ENABLE_SEC_CNF: - { - SETTING_TRACE - ("CASE: TAPI_EVENT_SIM_ENABLE_SEC_CNF [Event Data Type: %d]", - sim_event_data->type); - - /* Sim Lock */ - if (TAPI_SIM_PTYPE_SIM == sim_event_data->type) { - if (TAPI_SIM_PIN_OPERATION_SUCCESS == event->Status) - result_info.stat = SIM_LOCK_ON_SUCCESS; - else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == event->Status) - result_info.stat = SIM_LOCK_INCORRECT_PASSWORD; - else { - SETTING_TRACE_DEBUG("%s*** [ERR] INCORRECTED ***%s", - SETTING_FONT_RED, - SETTING_FONT_BLACK); - return SETTING_RETURN_FAIL; - } - } - /* Pin Lock */ - else if (TAPI_SIM_PTYPE_PIN1 == sim_event_data->type) { - if (TAPI_SIM_PIN_OPERATION_SUCCESS == event->Status) - result_info.stat = SIM_PIN_LOCK_ON_SUCCESS; - else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == event->Status) { - result_info.stat = SIM_INCORRECT_PIN1_CODE; - result_info.retry_cnt = sim_event_data->retry_count; - } else if (TAPI_SIM_PUK_REQUIRED == event->Status) - result_info.stat = SIM_PIN1_BLOCKED; - - /* Pre CCF */ - else if (TAPI_SIM_INCOMPATIBLE_PIN_OPERATION == event->Status - || TAPI_SIM_CARD_ERROR == event->Status) { - /* popup */ - result_info.stat = SIM_OPERATION_UNAVAILABLE; - } - else { - SETTING_TRACE_DEBUG - ("%s*** [ERR] INCORRECTED ***%s", - SETTING_FONT_RED, - SETTING_FONT_BLACK); - return SETTING_RETURN_FAIL; - } - } - } - break; - - /* Lock OFF */ - case TAPI_EVENT_SIM_DISABLE_SEC_CNF: - { - SETTING_TRACE - ("CASE: TAPI_EVENT_SIM_DISABLE_SEC_CNF [Event Data Type: %d]", - sim_event_data->type); - - /* Sim Lock */ - if (TAPI_SIM_PTYPE_SIM == sim_event_data->type) { - if (TAPI_SIM_PIN_OPERATION_SUCCESS == event->Status) - result_info.stat = SIM_LOCK_OFF_SUCCESS; - else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == event->Status) - result_info.stat = SIM_LOCK_INCORRECT_PASSWORD; - else { - SETTING_TRACE_DEBUG - ("%s*** [ERR] INCORRECTED ***%s", - SETTING_FONT_RED, - SETTING_FONT_BLACK); - return SETTING_RETURN_FAIL; - } - } - /* Pin Lock */ - else if (TAPI_SIM_PTYPE_PIN1 == sim_event_data->type) { - if (TAPI_SIM_PIN_OPERATION_SUCCESS == event->Status) - result_info.stat = SIM_PIN_LOCK_OFF_SUCCESS; - else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == event->Status) { - result_info.stat = SIM_INCORRECT_PIN1_CODE; - result_info.retry_cnt = sim_event_data->retry_count; - } else if (TAPI_SIM_PUK_REQUIRED == event->Status) - result_info.stat = SIM_PIN1_BLOCKED; - - /* Pre CCF */ - else if (TAPI_SIM_INCOMPATIBLE_PIN_OPERATION == event->Status - || TAPI_SIM_CARD_ERROR == event->Status) { - /* popup */ - result_info.stat = SIM_OPERATION_UNAVAILABLE; - } - else { - SETTING_TRACE_DEBUG - ("%s*** [ERR] INCORRECTED ***%s", - SETTING_FONT_RED, - SETTING_FONT_BLACK); - return SETTING_RETURN_FAIL; - } - } + TelSimFacilityResult_t *sim_event_data = (TelSimFacilityResult_t *) data; + SETTING_TRACE("sec_rt[%d]", sec_rt); + SETTING_TRACE("sim_event_data->type:%d", sim_event_data->type); + SETTING_TRACE("sim_event_data->retry_count[%d]", sim_event_data->retry_count); + + /* Sim Lock */ + if (TAPI_SIM_LOCK_PS == sim_event_data->type) { + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt) + result_info.stat = SIM_LOCK_OFF_SUCCESS; + else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == sec_rt) + result_info.stat = SIM_LOCK_INCORRECT_PASSWORD; + else { + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED ***%s", + SETTING_FONT_RED, + SETTING_FONT_BLACK); + return; } - break; - - /* Verify PUK1, PUK2 */ - case TAPI_EVENT_SIM_VERIFY_PUK_CNF: - { - SETTING_TRACE - ("CASE: TAPI_EVENT_SIM_VERIFY_PUK_CNF [Event Data Type: %d]", - sim_event_data->type); - - TelSimPinStatus_t pin_status = -1; - TelSimPinType_t pin_type = 0; - - if (TAPI_SIM_PTYPE_PUK1 == sim_event_data->type) - pin_type = TAPI_SIM_PTYPE_PIN1; - else if (TAPI_SIM_PTYPE_PUK2 == sim_event_data->type) - pin_type = TAPI_SIM_PTYPE_PIN2; - else { - SETTING_TRACE_DEBUG - ("%s*** [ERR] Invalid pin_type ***%s", - SETTING_FONT_RED, SETTING_FONT_BLACK); - return SETTING_RETURN_FAIL; - } - - int tapi_ret = tel_get_sim_security_status(pin_type, &pin_status); - SETTING_TRACE - ("TAPI RET : %d PIN_TYPE : %d PIN_STATUS : %d\n", - tapi_ret, pin_type, pin_status); - if (TAPI_API_SUCCESS != tapi_ret) { - SETTING_TRACE_DEBUG - ("%s*** [ERR] tel_get_sim_security_status ***%s", - SETTING_FONT_RED, SETTING_FONT_BLACK); - return SETTING_RETURN_FAIL; - } - /* Puk Blocked */ - if (TAPI_SIM_PIN_STATUS_PUK_BLOCKED == pin_status) { - if (TAPI_SIM_PTYPE_PIN1 == pin_type) - result_info.stat = SIM_PUK1_BLOCKED; - else - result_info.stat = SIM_PUK2_BLOCKED; - } - /* Pin Blocked and verifying puk code */ - else if (TAPI_SIM_PIN_STATUS_ENABLED == pin_status) { - if (TAPI_SIM_PIN_OPERATION_SUCCESS == event->Status) { - if (TAPI_SIM_PTYPE_PIN1 == pin_type) - result_info.stat = SIM_PIN1_UNBLOCKED; - else - result_info.stat = SIM_PIN2_UNBLOCKED; - } - } - /* Pin Block */ - else if (TAPI_SIM_PIN_STATUS_BLOCKED == pin_status) { - if (TAPI_SIM_PTYPE_PIN1 == pin_type) { - result_info.stat = SIM_INCORRECT_PUK1_CODE; - result_info.retry_cnt = sim_event_data->retry_count; - } else { - result_info.stat = SIM_INCORRECT_PUK2_CODE; - result_info.retry_cnt = sim_event_data->retry_count; - } - } else { - SETTING_TRACE_DEBUG - ("%s*** [ERR] INCORRECTED ***%s", - SETTING_FONT_RED, SETTING_FONT_BLACK); - result_info.stat = SIM_UNKNOWN_ERROR; - } + } + /* Pin Lock */ + else if (TAPI_SIM_LOCK_SC == sim_event_data->type) { + if (TAPI_SIM_PIN_OPERATION_SUCCESS == sec_rt) + result_info.stat = SIM_PIN_LOCK_OFF_SUCCESS; + else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == sec_rt) { + result_info.stat = SIM_INCORRECT_PIN1_CODE; + result_info.retry_cnt = sim_event_data->retry_count; + } else if (TAPI_SIM_PUK_REQUIRED == sec_rt) + result_info.stat = SIM_PIN1_BLOCKED; + + /* Pre CCF */ + else if (TAPI_SIM_INCOMPATIBLE_PIN_OPERATION == sec_rt + || TAPI_SIM_CARD_ERROR == sec_rt) { + /* popup */ + result_info.stat = SIM_OPERATION_UNAVAILABLE; } - break; - - /* Change PIN1, PIN2 */ - case TAPI_EVENT_SIM_CHANGE_PINS_CNF: - { - SETTING_TRACE - ("CASE: TAPI_EVENT_SIM_CHANGE_PINS_CNF [Event Data Type: %d]", - sim_event_data->type); - - if (TAPI_SIM_PIN_OPERATION_SUCCESS == event->Status) { - if (TAPI_SIM_PTYPE_PIN1 == sim_event_data->type) - result_info.stat = SIM_PIN1_CHANGE_SUCCESS; - else if (TAPI_SIM_PTYPE_PIN2 == sim_event_data->type) - result_info.stat = SIM_PIN2_CHANGE_SUCCESS; - } else if (TAPI_SIM_PIN_INCORRECT_PASSWORD == event->Status) { - if (TAPI_SIM_PTYPE_PIN1 == sim_event_data->type) { - result_info.stat = SIM_INCORRECT_PIN1_CODE; - result_info.retry_cnt = sim_event_data->retry_count; - } else if (TAPI_SIM_PTYPE_PIN2 == sim_event_data->type) { - result_info.stat = SIM_INCORRECT_PIN2_CODE; - result_info.retry_cnt = sim_event_data->retry_count; - } - } else if (TAPI_SIM_PUK_REQUIRED == event->Status) { - if (TAPI_SIM_PTYPE_PIN1 == sim_event_data->type) - result_info.stat = SIM_PIN1_BLOCKED; - else if (TAPI_SIM_PTYPE_PIN2 == sim_event_data->type) - result_info.stat = SIM_PIN2_BLOCKED; - } else { - SETTING_TRACE_DEBUG - ("%s*** [ERR] INCORRECTED ***%s", - SETTING_FONT_RED, SETTING_FONT_BLACK); - return SETTING_RETURN_FAIL; - } + else { + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED ***%s", + SETTING_FONT_RED, + SETTING_FONT_BLACK); + return; } - break; - - default: - break; } - - setting_password_ug_display_result_popup(&result_info, ad); - - return 0; + setting_password_ug_display_result_popup(&result_info, user_data); } -static void setting_password_ug_display_result_popup(tapi_receive_info *result, +static void setting_password_ug_display_result_popup(tapi_receive_info *result, SettingPasswordUG *ad) { switch (result->stat) { @@ -791,14 +874,15 @@ static void setting_password_ug_display_result_popup(tapi_receive_info *result, "[Error] set value of vconf fail."); } /* Success to Operate */ - bundle *b = NULL; - b = bundle_create(); - if (!b) + service_h svc; + if (service_create(&svc)) return; - bundle_add(b, "result", ad->view_type_string); - ug_send_result(ad->ug, b); + + service_add_extra_data(svc, "result", ad->view_type_string); + ug_send_result(ad->ug, svc); SETTING_TRACE("Send Result : %s\n", ad->view_type_string); - bundle_free(b); + + service_destroy(svc); /* Send destroy request */ ug_destroy_me(ad->ug); } @@ -818,10 +902,14 @@ static void setting_password_ug_display_result_popup(tapi_receive_info *result, setting_retm_if(ret < 0, "snprintf fail"); ret_str = tmp_str; } else { - ret_str = _("IDS_ST_POP_INCORRECT_PIN1_ATTEMPT_LEFT"); + ret_str = _("IDS_ST_POP_INCORRECT_PIN1"); } ad->focus_data = ad->ed_pw1; +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, (char *)ret_str, FALSE); +#else setting_password_ug_display_desc(ad, (char *)ret_str, FALSE); +#endif } break; case SIM_INCORRECT_PIN2_CODE: @@ -835,10 +923,14 @@ static void setting_password_ug_display_result_popup(tapi_receive_info *result, setting_retm_if(ret < 0, "snprintf fail"); ret_str = tmp_str; } else { - ret_str = _("IDS_ST_POP_INCORRECT_PIN1_ATTEMPT_LEFT"); + ret_str = _("IDS_ST_POP_INCORRECT_PIN2"); } ad->focus_data = ad->ed_pw1; +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, ret_str, FALSE); +#else setting_password_ug_display_desc(ad, ret_str, FALSE); +#endif } break; case SIM_INCORRECT_PUK1_CODE: @@ -852,10 +944,14 @@ static void setting_password_ug_display_result_popup(tapi_receive_info *result, setting_retm_if(ret < 0, "snprintf fail"); ret_str = tmp_str; } else { - ret_str = _("IDS_ST_POP_INCORRECT_PUK1_1_ATTEMPT_LEFT"); + ret_str = _("IDS_ST_POP_INCORRECT_PUK1_CODE"); } ad->focus_data = ad->ed_pw1; +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, ret_str, FALSE); +#else setting_password_ug_display_desc(ad, ret_str, FALSE); +#endif } break; case SIM_INCORRECT_PUK2_CODE: @@ -868,10 +964,14 @@ static void setting_password_ug_display_result_popup(tapi_receive_info *result, setting_retm_if(ret < 0, "snprintf fail"); ret_str = tmp_str; } else { - ret_str = _("IDS_ST_POP_INCORRECT_PUK2_1_ATTEMPT_LEFT"); + ret_str = _("IDS_ST_POP_INCORRECT_PUK2"); } ad->focus_data = ad->ed_pw1; +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, ret_str, FALSE); +#else setting_password_ug_display_desc(ad, ret_str, FALSE); +#endif } break; case SIM_PIN1_CHANGE_SUCCESS: @@ -912,7 +1012,7 @@ static void setting_password_ug_display_result_popup(tapi_receive_info *result, break; case SIM_OPERATION_UNAVAILABLE: setting_password_ug_create_popup_notitle_nobtn(ad, - _("IDS_ST_POP_SERVICE_UNAVAILABLE"), TRUE); + _("IDS_ST_HEADER_UNAVAILABLE"), TRUE); break; case SIM_UNKNOWN_ERROR: setting_password_ug_create_popup_notitle_nobtn(ad, @@ -934,49 +1034,53 @@ static void setting_password_ug_display_result_popup(tapi_receive_info *result, void setting_password_ug_popup_resp_cb(void *data, Evas_Object *obj, void *event_info) -{ +{ retm_if(data == NULL, "Data parameter is NULL"); - bundle *b = NULL; + + service_h svc; SettingPasswordUG *ad = (SettingPasswordUG *) data; - if (ad->destroy) { - /* Success to Operate */ - b = bundle_create(); - if (!b) - return; - bundle_add(b, "result", ad->view_type_string); - ug_send_result(ad->ug, b); - SETTING_TRACE("Send Result : %s\n", ad->view_type_string); - bundle_free(b); - - /* Send destroy request */ - ug_destroy_me(ad->ug); - } else { - char *diable_view_type = NULL; - if (ad->disable_item_type == SETTING_PW_TYPE_PHONE_LOCK) { - diable_view_type = "SETTING_PW_TYPE_PHONE_LOCK_DISABLE"; - } else if (ad->disable_item_type == SETTING_PW_TYPE_SIM_LOCK_OFF) { - diable_view_type = "SETTING_PW_TYPE_SIM_LOCK_DISABLE"; - } + if (ad->destroy) { + /* Success to Operate */ - if (diable_view_type) { - /* Success to Operate */ - b = bundle_create(); - if (!b) - return; - bundle_add(b, "result", diable_view_type); - ug_send_result(ad->ug, b); - bundle_free(b); - - /* Send destroy request */ - ug_destroy_me(ad->ug); - } - if (ad->focus_data) { - ad->focus_data->isFocusFlag = TRUE; - elm_object_item_data_set(ad->focus_data->item, ad->focus_data); - elm_genlist_item_update(ad->focus_data->item); - } - } + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "result", ad->view_type_string); + ug_send_result(ad->ug, svc); + SETTING_TRACE("Send Result : %s\n", ad->view_type_string); + + service_destroy(svc); + /* Send destroy request */ + ug_destroy_me(ad->ug); + } else { + char *diable_view_type = NULL; + //if (ad->disable_item_type == SETTING_PW_TYPE_PASSWORD) { + // diable_view_type = "SETTING_PW_TYPE_PHONE_LOCK_DISABLE"; + //} else + if (ad->disable_item_type == SETTING_PW_TYPE_SIM_LOCK_OFF) { + diable_view_type = "SETTING_PW_TYPE_SIM_LOCK_DISABLE"; } + + if (diable_view_type) { + /* Success to Operate */ + + if (service_create(&svc)) + return; + + service_add_extra_data(svc, "result", diable_view_type); + ug_send_result(ad->ug, svc); + + service_destroy(svc); + /* Send destroy request */ + ug_destroy_me(ad->ug); + } + if (ad->focus_data) { + ad->focus_data->isFocusFlag = TRUE; + elm_object_item_data_set(ad->focus_data->item, ad->focus_data); + elm_genlist_item_update(ad->focus_data->item); + } + } +} static Eina_Bool __remove_desc(void *data) { SETTING_TRACE_BEGIN; @@ -998,33 +1102,38 @@ static Eina_Bool __remove_desc(void *data) if (ad->destroy) { /* Success to Operate */ - bundle *b = bundle_create(); - if (!b) + + service_h svc; + if (service_create(&svc)) return EINA_FALSE; - bundle_add(b, "result", ad->view_type_string); - ug_send_result(ad->ug, b); + + service_add_extra_data(svc, "result", ad->view_type_string); + ug_send_result(ad->ug, svc); SETTING_TRACE("Send Result : %s\n", ad->view_type_string); - bundle_free(b); + service_destroy(svc); /* Send destroy request */ ug_destroy_me(ad->ug); } else { char *diable_view_type = NULL; - if (ad->disable_item_type == SETTING_PW_TYPE_PHONE_LOCK) { - diable_view_type = "SETTING_PW_TYPE_PHONE_LOCK_DISABLE"; - } else if (ad->disable_item_type == SETTING_PW_TYPE_SIM_LOCK_OFF) { + //if (ad->disable_item_type == SETTING_PW_TYPE_PASSWORD) { + // diable_view_type = "SETTING_PW_TYPE_PHONE_LOCK_DISABLE"; + //} else + if (ad->disable_item_type == SETTING_PW_TYPE_SIM_LOCK_OFF) { diable_view_type = "SETTING_PW_TYPE_SIM_LOCK_DISABLE"; } if (diable_view_type) { /* Success to Operate */ - bundle *b = bundle_create(); - if (!b) + + service_h svc; + if (service_create(&svc)) return EINA_FALSE; - bundle_add(b, "result", diable_view_type); - ug_send_result(ad->ug, b); - bundle_free(b); + service_add_extra_data(svc, "result", diable_view_type); + ug_send_result(ad->ug, svc); + + service_destroy(svc); /* Send destroy request */ ug_destroy_me(ad->ug); } @@ -1039,7 +1148,12 @@ void setting_password_ug_display_desc(void *data, char *desc, int destroy) SettingPasswordUG *ad = (SettingPasswordUG *)data; - ad->destroy= destroy; +#ifdef SUPPORT_MDM + if(ad->view_type == SETTING_PW_TYPE_MDM_NEW_POLICY) + return; +#endif + + ad->destroy = destroy; if(ad->scroller == NULL) return; @@ -1049,7 +1163,7 @@ void setting_password_ug_display_desc(void *data, char *desc, int destroy) elm_object_item_del(ad->err_desc); ad->err_desc = NULL; } - + ad->err_desc = elm_genlist_item_append(ad->scroller, &(ad->itc_err_desc), desc, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); ad->remove_timer = ecore_timer_add(2.0, __remove_desc, ad); @@ -1072,10 +1186,14 @@ setting_password_ug_create_popup_notitle_nobtn(void *data, char *str, SettingPasswordUG *ad = (SettingPasswordUG *) data; ad->destroy = destroy; - ad->notify = setting_create_popup_without_btn(ad, ad->ly_main, str, - NULL, + if(ad->notify) + { + evas_object_del(ad->notify); + ad->notify = NULL; + } + ad->notify = setting_create_popup_without_btn(ad, ad->ly_main, NULL, str, setting_password_ug_popup_resp_cb, - POPUP_INTERVAL); + POPUP_INTERVAL, FALSE, FALSE); } void setting_password_ug_check_attemps_left(void *data) @@ -1087,7 +1205,7 @@ void setting_password_ug_check_attemps_left(void *data) setting_str_slp_list item_lock_timestamp; int attemps_left_max = 5; - if (ad->view_type == SETTING_PW_TYPE_PHONE_LOCK) { + if (ad->view_type == SETTING_PW_TYPE_PASSWORD) { item_attempts_left = INT_SLP_SETTING_PHONE_LOCK_ATTEMPTS_LEFT; item_lock_timestamp = STR_SLP_SETTING_PHONE_LOCK_TIMESTAMP; attemps_left_max = PHONE_LOCK_ATTEMPS_MAX; @@ -1117,13 +1235,16 @@ void setting_password_ug_check_attemps_left(void *data) snprintf(temp, sizeof(temp), "%s. %s.", PW_ERR_DESC, ATTEMPTS_DESC); else snprintf(temp, sizeof(temp), "%s. %s.", PW_ERR_DESC, ATTEMPT_DESC); - + int ret = snprintf(temp_str, MAX_SPECIALIZITION_LEN, temp, value); - + ret_if(ret < 0); - - setting_password_ug_display_desc(ad, temp_str, FALSE); +#ifdef SUPPORT_POPUP + setting_password_ug_create_popup_notitle_nobtn(ad, temp_str, FALSE); +#else + setting_password_ug_display_desc(ad, temp_str, FALSE); +#endif } else if (value == 0) { /* store the lock timestamp */ time_t cur_time = time(NULL); @@ -1140,10 +1261,10 @@ void setting_password_ug_check_attemps_left(void *data) "[Error] set value of vconf fail."); ad->disable_item_type = ad->view_type; - + char temp[MAX_SPECIALIZITION_LEN] = {0,}; snprintf(temp, sizeof(temp), PW_ERR_DELAY_DESC, PW_ERR_DELAY_TIME); - + setting_password_ug_create_popup_notitle_nobtn(ad, temp, FALSE); } else { setting_password_ug_create_popup_notitle_nobtn(ad, @@ -1168,25 +1289,58 @@ int setting_password_is_password_empty() else return SETTING_RETURN_FAIL; } -int setting_password_check_password(const char *challenge) +int setting_password_check_password(const char *challenge, unsigned int *remain_attempt, unsigned int *valid_sec) { SETTING_TRACE_BEGIN; retv_if(challenge == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + int inner_ret = 0; int ret = 0; unsigned int current_attempt = 0; unsigned int max_attempt = 0; unsigned int valid_secs = 0; - ret = security_server_chk_pwd(challenge, ¤t_attempt, &max_attempt, &valid_secs); + inner_ret = security_server_chk_pwd(challenge, ¤t_attempt, &max_attempt, &valid_secs); - SETTING_TRACE_DEBUG("chk password : %d", ret); + SETTING_TRACE_DEBUG("chk password : %d", inner_ret); + SETTING_TRACE_DEBUG("current_attempt : %d, max_attempt : %d, valid_secs : %d secs", current_attempt, max_attempt, valid_secs); - if(ret == SECURITY_SERVER_API_SUCCESS) - return SETTING_RETURN_SUCCESS; + if(inner_ret == SECURITY_SERVER_API_SUCCESS) + { + ret = SETTING_RETURN_SUCCESS; + } else - return SETTING_RETURN_FAIL; + { + if(remain_attempt != NULL) + { + if(max_attempt > 0) + *remain_attempt = max_attempt - current_attempt; + else + *remain_attempt = ATTEMPT_INFINITE; // infinite + ret = SETTING_RETURN_FAIL; + } + } + + if(valid_sec != NULL) + *valid_sec = valid_secs; + + return ret; +} +#ifdef SUPPORT_MDM +static Eina_Bool __set_history_cb(void *data) +{ + SETTING_TRACE_BEGIN; + retv_if(data == NULL, EINA_FALSE); + + SettingPasswordUG *ad = (SettingPasswordUG *)data; + + if(ad->mdm_policy) + security_server_set_pwd_history(ad->mdm_policy->history_cnt); + + return EINA_FALSE; } +#endif + int setting_password_set_password(const char *cur_pwd, const char *new_pwd, void *data) { SETTING_TRACE_BEGIN; @@ -1195,12 +1349,60 @@ int setting_password_set_password(const char *cur_pwd, const char *new_pwd, void SettingPasswordUG *ad = (SettingPasswordUG*)data; int ret = 0; - /* max attempt count will be handled in passwordug for a while. */ - ret = security_server_set_pwd(cur_pwd, new_pwd, 0, PW_ERR_DELAY_TIME); - SETTING_TRACE_DEBUG("set password : %d", ret); +#ifdef SUPPORT_MDM + if((ad->view_type == SETTING_PW_TYPE_MDM_NEW_POLICY) + || (ad->view_type == SETTING_PW_TYPE_MDM_TO_SIMPLE)) + { + if(cur_pwd) + { + SETTING_TRACE_DEBUG("cur_pwd : %s, new_pwd : %s", cur_pwd, new_pwd); + ret = security_server_set_pwd(cur_pwd, new_pwd, ad->mdm_policy->max_num_wipe, ad->mdm_policy->expire); - if(ret == SECURITY_SERVER_API_SUCCESS) - return SETTING_RETURN_SUCCESS; + if(ret == SECURITY_SERVER_API_ERROR_PASSWORD_REUSED) + { + SETTING_TRACE_DEBUG("[ERROR - security_server_set_pwd()] password reused"); + } + else + { + SETTING_TRACE_DEBUG("[security_server_set_pwd()] returns %d", ret); + } + } + else + { + SETTING_TRACE_DEBUG("new_pwd : %s", new_pwd); + ret = mdm_reset_password((char*)new_pwd); + SETTING_TRACE_DEBUG("[mdm_reset_password()] returns %d", ret); + } + + if((ret == MDM_RESULT_SUCCESS) || (ret == SECURITY_SERVER_API_SUCCESS)) + { + ad->set_history_timer = ecore_timer_add(1, (Ecore_Task_Cb)__set_history_cb, ad); + return SETTING_RETURN_SUCCESS; + } + else + { + return ret; + } + } else - return SETTING_RETURN_FAIL; +#endif + { + /* max attempt count will be handled in passwordug for a while. */ + if(cur_pwd == NULL || ad->is_empty == TRUE) + { + ret = security_server_set_pwd(NULL, new_pwd, 0, PW_ERR_DELAY_TIME); + SETTING_TRACE_DEBUG("new_pwd : %s", new_pwd); + } + else + { + ret = security_server_set_pwd(cur_pwd, new_pwd, 0, PW_ERR_DELAY_TIME); + SETTING_TRACE_DEBUG("cur_pwd : %s, new_pwd : %s", cur_pwd, new_pwd); + } + SETTING_TRACE_DEBUG("set password : %d", ret); + + if(ret == SECURITY_SERVER_API_SUCCESS) + return SETTING_RETURN_SUCCESS; + else + return SETTING_RETURN_FAIL; + } } diff --git a/setting-phone/CMakeLists.txt b/setting-phone/CMakeLists.txt index c8f246c..769b0f4 100755 --- a/setting-phone/CMakeLists.txt +++ b/setting-phone/CMakeLists.txt @@ -3,7 +3,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs_phone REQUIRED evas eina ecore elementary appcore-common appcore-efl devman_haptic heynoti tapi ui-gadget bundle appsvc) +pkg_check_modules(pkgs_phone REQUIRED evas eina ecore elementary appcore-common appcore-efl devman_haptic heynoti tapi ui-gadget-1 capi-appfw-application drm-client drm-trusted appsvc libxml-2.0) FOREACH(flag ${pkgs_phone_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") @@ -26,6 +26,10 @@ ADD_LIBRARY(${SETTING_PHONE_UG} SHARED ./src/setting-phone.c ./src/setting-phone-language-region.c ./src/setting-phone-ticker-notification.c + ./src/setting-phone-ticker-notification-details.c +# ./src/setting-phone-license-main.c +# ./src/setting-phone-license-divx-main.c +# ./src/setting-phone-license-divx-mode.c ./src/setting-phone-display-language.c ./src/setting-phone-region-format.c ) diff --git a/setting-phone/include/setting-phone-display-language.h b/setting-phone/include/setting-phone-display-language.h index 859f151..50ffb11 100755 --- a/setting-phone/include/setting-phone-display-language.h +++ b/setting-phone/include/setting-phone-display-language.h @@ -1,19 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_PHONE_DISPLAY_LANGUAGE_H__ #define __SETTING_PHONE_DISPLAY_LANGUAGE_H__ @@ -32,7 +36,4 @@ static void setting_phone_display_language_mouse_up_Gendial_list_radio_cb(void void *event_info); static void setting_phone_display_language_close_popup_ex(void *data); -static void setting_phone_display_language_exit_cb_ex(void *data, - Evas_Object *obj, - void *event_info); #endif /* __SETTING_PHONE_DISPLAY_LANGUAGE_H__ */ diff --git a/setting-phone/include/setting-phone-language-region.h b/setting-phone/include/setting-phone-language-region.h index 970db00..91aa261 100755 --- a/setting-phone/include/setting-phone-language-region.h +++ b/setting-phone/include/setting-phone-language-region.h @@ -1,26 +1,30 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_PHONE_LANGUAGE_H__ #define __SETTING_PHONE_LANGUAGE_H__ #include #define LANGUAGE_STR_LEN 256 +//#define COUNTRY_STR_LEN 50 #define COUNTRY_STR_LEN 256 #define LANGUAGE_ITEM_MAX 20 diff --git a/setting-phone/include/setting-phone-license-divx-main.h b/setting-phone/include/setting-phone-license-divx-main.h index fd4ef3b..ddc182b 100755 --- a/setting-phone/include/setting-phone-license-divx-main.h +++ b/setting-phone/include/setting-phone-license-divx-main.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_PHONE_LICENSE_DIVX_MAIN_H__ #define __SETTING_PHONE_LICENSE_DIVX_MAIN_H__ diff --git a/setting-phone/include/setting-phone-license-divx-mode.h b/setting-phone/include/setting-phone-license-divx-mode.h index c6e1517..cb26bd7 100755 --- a/setting-phone/include/setting-phone-license-divx-mode.h +++ b/setting-phone/include/setting-phone-license-divx-mode.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_PHONE_LICENSE_DIVX_MODE_H__ #define __SETTING_PHONE_LICENSE_DIVX_MODE_H__ diff --git a/setting-phone/include/setting-phone-license-main.h b/setting-phone/include/setting-phone-license-main.h index 6f8cfd8..3f0fc15 100755 --- a/setting-phone/include/setting-phone-license-main.h +++ b/setting-phone/include/setting-phone-license-main.h @@ -1,27 +1,32 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_PHONE_LICENSE_MAIN_H__ #define __SETTING_PHONE_LICENSE_MAIN_H__ #include #include +#include +#include +#include -#define DRM_V2 0 #define SETTING_DIVX_MODE_REG 0 #define SETTING_DIVX_MODE_DEREG 1 diff --git a/setting-phone/include/setting-phone-region-format.h b/setting-phone/include/setting-phone-region-format.h index 53526d5..15f4b05 100755 --- a/setting-phone/include/setting-phone-region-format.h +++ b/setting-phone/include/setting-phone-region-format.h @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_PHONE_REGION_FORMAT_H__ #define __SETTING_PHONE_REGION_FORMAT_H__ diff --git a/setting-phone/include/setting-phone-ticker-notification-details.h b/setting-phone/include/setting-phone-ticker-notification-details.h new file mode 100644 index 0000000..2b4265a --- /dev/null +++ b/setting-phone/include/setting-phone-ticker-notification-details.h @@ -0,0 +1,38 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_PHONE_TICKER_NOTIFICATION_DETAILS_H__ +#define __SETTING_PHONE_TICKER_NOTIFICATION_DETAILS_H__ + +#include + +#define APP_3RD_LIST 0 + +static void setting_phone_noti_details_chk_btn_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_phone_noti_details_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_phone_noti_details_click_softkey_back_cb(void *data, + Evas_Object *obj, + void *event_info); + +#endif /* __SETTING_PHONE_TICKER_NOTIFICATION_DETAILS_H__ */ diff --git a/setting-phone/include/setting-phone-ticker-notification.h b/setting-phone/include/setting-phone-ticker-notification.h index 324b0b9..19dbe31 100755 --- a/setting-phone/include/setting-phone-ticker-notification.h +++ b/setting-phone/include/setting-phone-ticker-notification.h @@ -1,24 +1,30 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_PHONE_TICKER_NOTIFICATION_H__ #define __SETTING_PHONE_TICKER_NOTIFICATION_H__ #include +#define APP_3RD_LIST 1 + static void setting_phone_noti_mouse_up_chk_btn_cb(void *data, Evas_Object *obj, void *event_info); diff --git a/setting-phone/include/setting-phone.h b/setting-phone/include/setting-phone.h index 4945429..ca8eb5c 100755 --- a/setting-phone/include/setting-phone.h +++ b/setting-phone/include/setting-phone.h @@ -1,32 +1,31 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_PHONE_H__ #define __SETTING_PHONE_H__ #include -#include #include #include #include -#include -#include -#include #include #include @@ -36,9 +35,10 @@ #ifdef Status #undef Status #endif -#include -#include +#include #include +#include + #include #include #include @@ -59,20 +59,31 @@ #define REGION_ITEM_MAX 300 +#define SETTING_PHONE_FONT_CHANGED_POPUP_DESC "Font has been changed." +#define ASK_DEREG_PHONE "Your phone is
already registered.
Are you sure you
wish to deregister?" +#define REGISTRATION_GET_FAILED "Failed to get registration code" +#define REGISTRATION_INDICATOT "



Your device
registration code:

" +#define REGISTRATION_AT "


Register at" +#define DEREGISTRATION_INDICATOT "



Your device
deregistration code:

" +#define EREGISTRATION_AT "


Deregister at" +#define TRANSFER_INFO "Your recommendation information is also sent with the file you transfer" + typedef struct _SettingPhoneUG SettingPhoneUG; /** * Setting Phone UG context - * all UG function has void* as an agument. this is casted back to SettingPhoneUG + * all UG function has void* as an agument. this is casted back to SettingPhoneUG * and the functions access app context. */ struct _SettingPhoneUG { - struct ui_gadget *ug; + ui_gadget_h ug; + TapiHandle* handle; /* add more variables here (move your appdata to here) */ Evas *evas; Evas_Object *win_main_layout; Evas_Object *win_get; + ui_gadget_h ug_loading; Evas_Object *gl_lang_region; Evas_Object *gl_lang; @@ -89,14 +100,22 @@ struct _SettingPhoneUG { Evas_Object *ly_ticker; Evas_Object *ly_license; - Setting_GenGroupItem_Data *data_n_dsp; + + // [UI] notification details + Setting_GenGroupItem_Data *data_details_notification; + Setting_GenGroupItem_Data *data_details_display_content; + Setting_GenGroupItem_Data *data_details_badge; + + char* sel_string; + + // [UI] notification Setting_GenGroupItem_Data *data_n_msg; - Setting_GenGroupItem_Data *data_n_vmail; Setting_GenGroupItem_Data *data_n_email; + Setting_GenGroupItem_Data *data_n_im; + Setting_GenGroupItem_Data *data_n_fb; + Setting_GenGroupItem_Data *data_n_twt; - Setting_GenGroupItem_Data *data_n_sns; - Setting_GenGroupItem_Data *data_n_file; - + // [UI] license Evas_Object *chk_lang; int prev_lang; /** prev is used for special lang. */ Setting_GenGroupItem_Data *data_tracking; @@ -112,7 +131,8 @@ struct _SettingPhoneUG { Evas_Object *chk_tracking; Evas_Object *chk_expiry; - bundle *bundle_data; + //bundle *bundle_data; + service_h bundle_data; setting_view *view_to_load; TelSimImsiInfo_t imsi; const char *sim_lang; /** is just used for '0' (automatic). */ @@ -122,10 +142,13 @@ struct _SettingPhoneUG { Elm_Genlist_Item_Class itc_seperator; Elm_Genlist_Item_Class itc_2text_3_parent; Elm_Genlist_Item_Class itc_1icon_1text_sub; + Elm_Genlist_Item_Class itc_1icon_2text; + // [view] Language & Region Setting_GenGroupItem_Data *data_display_language; Setting_GenGroupItem_Data *data_region_fmt; Setting_GenGroupItem_Data *data_region_fmt_example; + Evas_Object *chk_region; int prev_region; char *region_keyStr[REGION_ITEM_MAX]; @@ -143,7 +166,6 @@ struct _SettingPhoneUG { Elm_Object_Item *selected_item; Eina_List *app_list; Evas_Object *pop_progress; - Eina_List *killed_pid_list; Evas_Object *search_bar; char search_text[MAX_SEARCH_STR_LEN + 1]; Ecore_Idler *search_idler; @@ -153,6 +175,7 @@ struct _SettingPhoneUG { /* extern setting_view setting_view_phone_main; */ extern setting_view setting_view_phone_language_region; extern setting_view setting_view_phone_ticker_notification; +extern setting_view setting_view_phone_ticker_notification_details; extern setting_view setting_view_phone_license_main; extern setting_view setting_view_phone_license_divx_main; extern setting_view setting_view_phone_license_divx_mode; @@ -160,7 +183,6 @@ extern setting_view setting_view_phone_display_language; extern setting_view setting_view_phone_region_format; /* void setting_phone_lang_changed_cb(void *data); */ -int app_terminate_func(const aul_app_info *info, void *data); int app_terminate_dead_cb(int pid, void *data); extern char *setting_phone_lang_get_region_str(const char *region); extern char *setting_phone_lang_get_by_pattern(const char *locale, diff --git a/setting-phone/src/setting-phone-display-language.c b/setting-phone/src/setting-phone-display-language.c old mode 100644 new mode 100755 index 94b55a6..fa6ee59 --- a/setting-phone/src/setting-phone-display-language.c +++ b/setting-phone/src/setting-phone-display-language.c @@ -1,22 +1,26 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include + static int setting_phone_display_language_create(void *cb); static int setting_phone_display_language_destroy(void *cb); static int setting_phone_display_language_cleanup(void *cb); @@ -29,26 +33,6 @@ setting_view setting_view_phone_display_language = { .cleanup = setting_phone_display_language_cleanup, }; -static void setting_phone_display_language_caller_exist_left_cb(void *data, - Evas_Object *obj, - void *event_info) -{ - SETTING_TRACE_BEGIN; - setting_retm_if(data == NULL, "Data parameter is NULL"); - SettingPhoneUG *ad = (SettingPhoneUG *) data; - - /* Create Bundle and send message */ - bundle *b = NULL; - b = bundle_create(); - setting_retm_if(b == NULL, "bundle_create failed"); - - bundle_add(b, "result", "lbutton_click"); - ug_send_result(ad->ug, b); - bundle_free(b); - - ug_destroy_me(ad->ug); -} - /* * exit and save */ @@ -65,6 +49,7 @@ static void setting_phone_display_language_caller_exist_right_cb(void *data, setting_phone_lang_change_lang_value(cur_chk_lang); + //ret = setting_get_int_slp_key(INT_SLP_SETTING_LANG, &chr_chk_lang, &err); SETTING_TRACE("---> cur_chk_lang : %d", cur_chk_lang); ret = setting_set_int_slp_key(INT_SLP_SETTING_LANG, cur_chk_lang, &err); @@ -72,12 +57,14 @@ static void setting_phone_display_language_caller_exist_right_cb(void *data, (void)vconf_set_str(VCONFKEY_LANGSET, ad->sim_lang); } - /* Just filter out Setting App, other Apps stil need to be terminated + /* Just filter out Setting App, other Apps stil need to be terminated until they implement updating language or region automatically */ + +#if 0 if (aul_app_get_running_app_info(app_terminate_func, NULL) < 0) { /* tet_infoline("aul_app_get_running_app_info() failed in positive test case"); */ } - +#endif const char *pa_lang = vconf_get_str(VCONFKEY_LANGSET); if (pa_lang) { char *q = strchr(pa_lang, '.'); @@ -94,13 +81,14 @@ static void setting_phone_display_language_caller_exist_right_cb(void *data, } /* Create Bundle and send message */ - bundle *b = NULL; - b = bundle_create(); - setting_retm_if(b == NULL, "bundle_create failed"); + service_h svc; + if(service_create(&svc)) + return; + + service_add_extra_data(svc, "result", "rbutton_click"); + ug_send_result(ad->ug, svc); - bundle_add(b, "result", "rbutton_click"); - ug_send_result(ad->ug, b); - bundle_free(b); + service_destroy(svc); ug_destroy_me(ad->ug); } @@ -125,40 +113,27 @@ static int setting_phone_display_language_create(void *cb) setting_call_back_func gl_sel_cb = NULL; if (&setting_view_phone_display_language == ad->view_to_load) { - char *l_btn = NULL; - char *r_btn = NULL; - char *temp = NULL; - - setting_call_back_func l_button_cb = NULL; - setting_call_back_func r_button_cb = NULL; - - bundle *data = ad->bundle_data; - if (NULL != (temp = (char *)bundle_get_val(data, "lbutton"))) { - l_btn = temp; - l_button_cb = - setting_phone_display_language_caller_exist_left_cb; - } + char *caller = NULL; - if (NULL != (temp = (char *)bundle_get_val(data, "title"))) { - title = temp; - } + service_h service = ad->bundle_data; - if (NULL != (temp = (char *)bundle_get_val(data, "rbutton"))) { - r_btn = temp; - r_button_cb = - setting_phone_display_language_caller_exist_right_cb; - } - - ad->ly_language = - setting_create_layout_navi_bar_genlist(ad->win_main_layout, - ad->win_get, title, - l_btn, r_btn, - l_button_cb, - r_button_cb, ad, - &scroller, - &ad->navi_bar); - - gl_sel_cb = setting_mouse_up_Gendial_list_radio_cb; + service_get_extra_data(service, "caller", &caller); + + if(caller) + { + ad->ly_language = setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + title, + _("IDS_COM_BODY_BACK"), NULL, + setting_phone_display_language_caller_exist_right_cb, NULL, + ad, &scroller, &ad->navi_bar); + gl_sel_cb = setting_mouse_up_Gendial_list_radio_cb; + } + else + { + SETTING_TRACE_ERROR("[ERROR] caller is empty"); + return SETTING_RETURN_FAIL; + } } else { /* add basic layout */ setting_push_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, @@ -182,10 +157,8 @@ static int setting_phone_display_language_create(void *cb) elm_radio_state_value_set(ad->chk_lang, -1); - // get a table - setting_lang_entry* table = setting_get_language_table(); - + // [UI] Automatic Setting_GenGroupItem_Data *item_data = NULL; item_data = setting_create_Gendial_field_1radio(scroller, @@ -201,170 +174,37 @@ static int setting_phone_display_language_create(void *cb) SETTING_TRACE_ERROR("item_data is NULL"); } - item_data = - setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), - gl_sel_cb, - ad->chk_lang, - SWALLOW_Type_1RADIO, - ad->chk_lang, - SETTING_LANG_KOREA, - table[SETTING_LANG_KOREA].title, NULL); - if (item_data) { - item_data->userdata = ad; - } else { - SETTING_TRACE_ERROR("item_data is NULL"); - } - - item_data = - setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), - gl_sel_cb, - ad->chk_lang, - SWALLOW_Type_1RADIO, - ad->chk_lang, - SETTING_LANG_ENGLISH, - table[SETTING_LANG_ENGLISH].title, NULL); - if (item_data) { - item_data->userdata = ad; - } else { - SETTING_TRACE_ERROR("item_data is NULL"); - } - - item_data = - setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), - gl_sel_cb, - ad->chk_lang, - SWALLOW_Type_1RADIO, - ad->chk_lang, - SETTING_LANG_GERMAN, - table[SETTING_LANG_GERMAN].title, NULL); - if (item_data) { - item_data->userdata = ad; - } else { - SETTING_TRACE_ERROR("item_data is NULL"); - } - - item_data = - setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), - gl_sel_cb, - ad->chk_lang, - SWALLOW_Type_1RADIO, - ad->chk_lang, - SETTING_LANG_DUTCH, - table[SETTING_LANG_DUTCH].title, NULL); - if (item_data) { - item_data->userdata = ad; - } else { - SETTING_TRACE_ERROR("item_data is NULL"); - } - - item_data = - setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), - gl_sel_cb, - ad->chk_lang, - SWALLOW_Type_1RADIO, - ad->chk_lang, - SETTING_LANG_SPAINISH, - table[SETTING_LANG_SPAINISH].title, NULL); - if (item_data) { - item_data->userdata = ad; - } else { - SETTING_TRACE_ERROR("item_data is NULL"); - } - - item_data = - setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), - gl_sel_cb, - ad->chk_lang, - SWALLOW_Type_1RADIO, - ad->chk_lang, - SETTING_LANG_PORTUGUESE, - table[SETTING_LANG_PORTUGUESE].title, NULL); - if (item_data) { - item_data->userdata = ad; - } else { - SETTING_TRACE_ERROR("item_data is NULL"); - } - - item_data = - setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), - gl_sel_cb, - ad->chk_lang, - SWALLOW_Type_1RADIO, - ad->chk_lang, - SETTING_LANG_GREEK, - table[SETTING_LANG_GREEK].title, NULL); - if (item_data) { - item_data->userdata = ad; - } else { - SETTING_TRACE_ERROR("item_data is NULL"); - } - - item_data = - setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), - gl_sel_cb, - ad->chk_lang, - SWALLOW_Type_1RADIO, - ad->chk_lang, - SETTING_LANG_ITALIAN, - table[SETTING_LANG_ITALIAN].title, NULL); - if (item_data) { - item_data->userdata = ad; - } else { - SETTING_TRACE_ERROR("item_data is NULL"); - } - - item_data = - setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), - gl_sel_cb, - ad->chk_lang, - SWALLOW_Type_1RADIO, - ad->chk_lang, - SETTING_LANG_FRENCH, - table[SETTING_LANG_FRENCH].title, NULL); - if (item_data) { - item_data->userdata = ad; - } else { - SETTING_TRACE_ERROR("item_data is NULL"); - } - - item_data = - setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), - gl_sel_cb, - ad->chk_lang, - SWALLOW_Type_1RADIO, - ad->chk_lang, - SETTING_LANG_TURKISH, - table[SETTING_LANG_TURKISH].title, NULL); - if (item_data) { - item_data->userdata = ad; - } else { - SETTING_TRACE_ERROR("item_data is NULL"); - } + // create loop operation here + Eina_List* elist = NULL; + setting_lang_entry* pnode = NULL; + int idx = SETTING_LANG_KOREA; // 2 + + // load language table from XML file + Eina_List* langlist = setting_get_language_list(); + + EINA_LIST_FOREACH( langlist, elist, pnode) + { + item_data = + setting_create_Gendial_field_1radio(scroller, + &(ad->itc_1text_1icon_2), + gl_sel_cb, + ad->chk_lang, + SWALLOW_Type_1RADIO, + ad->chk_lang, + //idx, // <<< WARNING + pnode->number, + pnode->title, NULL); + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + idx++; + } - item_data = - setting_create_Gendial_field_1radio(scroller, - &(ad->itc_1text_1icon_2), - gl_sel_cb, - ad->chk_lang, - SWALLOW_Type_1RADIO, - ad->chk_lang, - SETTING_LANG_RUSSIAN, - table[SETTING_LANG_RUSSIAN].title, NULL); - if (item_data) { - item_data->userdata = ad; - } else { - SETTING_TRACE_ERROR("item_data is NULL"); - } + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); // set radio button to the selected state. int index = -1; @@ -396,12 +236,10 @@ static int setting_phone_display_language_destroy(void *cb) evas_object_del(ad->pop_progress); ad->pop_progress = NULL; } - if (ad->killed_pid_list) { - eina_list_free(ad->killed_pid_list); - ad->killed_pid_list = NULL; - } elm_naviframe_item_pop(ad->navi_bar); setting_view_phone_display_language.is_create = 0; + + setting_get_language_list_destroy(); } return SETTING_RETURN_SUCCESS; @@ -451,7 +289,10 @@ setting_phone_display_language_mouse_up_Gendial_list_radio_cb(void *data, if (ad->popup) { return; } - + //SETTING_TRACE("---------------------------------------------"); + //SETTING_TRACE("ad->prev_lang = %d ", ad->prev_lang); + //SETTING_TRACE("chk_status = %d ", list_item->chk_status); + //SETTING_TRACE("---------------------------------------------"); /* if not change, return */ if (ad->prev_lang == list_item->chk_status) { SETTING_TRACE("NOT CHANGED "); @@ -468,107 +309,33 @@ static void setting_phone_display_language_close_popup_ex(void *data) setting_retm_if(data == NULL, "Data parameter is NULL"); SettingPhoneUG *ad = (SettingPhoneUG *) data; - ad->popup_cb = setting_phone_display_language_exit_cb_ex; - ad->popup = setting_create_popup_with_btn(ad, ad->win_get, - _ - ("IDS_ST_POP_CHANGING_LANGUAGE_WILL_CLOSE_ALL_APPLICATIONS_AND_UNSAVED_DATA_WILL_BE_LOST_CONTINUE_Q"), - NULL, ad->popup_cb, 0, - 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); -} + ad->prev_lang = elm_radio_value_get(ad->chk_lang); + SETTING_TRACE("cur_chk_lang = %d", ad->prev_lang); -static void -setting_phone_display_language_exit_cb_ex(void *data, Evas_Object *obj, - void *event_info) -{ - SETTING_TRACE_BEGIN; - setting_retm_if(data == NULL, "Data parameter is NULL"); - SettingPhoneUG *ad = (SettingPhoneUG *) data; + // 0. change VCONFKEY_LANGSET + setting_phone_lang_change_lang_value(ad->prev_lang); - switch (btn_type(obj)) { - case POPUP_RESPONSE_OK: - { - ad->prev_lang = elm_radio_value_get(ad->chk_lang); - SETTING_TRACE("cur_chk_lang = %d", ad->prev_lang); - - ///////////////////////////////////////////////////////////////// - // 0. change VCONFKEY_LANGSET - ///////////////////////////////////////////////////////////////// - setting_phone_lang_change_lang_value(ad->prev_lang); - - if (ad->killed_pid_list) { - eina_list_free(ad->killed_pid_list); - ad->killed_pid_list = NULL; - } - - ///////////////////////////////////////////////////////////////// - // 1. KILL APPS - ///////////////////////////////////////////////////////////////// - /* just filter out Setting App, other Apps stil need to be terminated untill they implement updating language or region automatically */ - if (aul_app_get_running_app_info (app_terminate_func, ad) < 0) { - /* tet_infoline("aul_app_get_running_app_info() failed in positive test case"); */ - } - - SETTING_TRACE("eina_list_count(ad->killed_pid_list):%d", eina_list_count(ad->killed_pid_list)); - if (0 != eina_list_count(ad->killed_pid_list)) { - if (ad->pop_progress) { - evas_object_del(ad->pop_progress); - ad->pop_progress = NULL; - } - ad->pop_progress = setting_create_popup_with_progressbar(ad, ad->win_get, - "pending_list", - NULL, NULL, NULL, 10); - } - - /* if set automatic */ - if (0 == ad->prev_lang) { - vconf_set_str(VCONFKEY_LANGSET, ad->sim_lang); - } - - ///////////////////////////////////////////////////////////////// - // 2. GET SELECTED LANG - ///////////////////////////////////////////////////////////////// - const char *pa_lang = vconf_get_str(VCONFKEY_LANGSET); - if (pa_lang) { /* remove the */ - char *q = strchr(pa_lang, '.'); - if (q) - *q = '\0'; - } - SETTING_TRACE("pa_lang:%s", pa_lang); - int err = -1; - ///////////////////////////////////////////////////////////////// - // 3. SET DEFAULT - ///////////////////////////////////////////////////////////////// - // default UI language - uloc_setDefault(pa_lang, &err); - FREE(pa_lang); - - /* after lang-change, go back to the previous page*/ - elm_naviframe_item_pop(ad->navi_bar); - setting_view_phone_display_language.is_create = 0; - - break; - } - case POPUP_RESPONSE_CANCEL: - { - elm_radio_value_set(ad->chk_lang, ad->prev_lang); - if (ad->popup) { - evas_object_del(ad->popup); - ad->popup = NULL; - } - return; - } - default: - { - if (ad->popup) { - evas_object_del(ad->popup); - ad->popup = NULL; - } - return; - } + /* if set automatic */ + if (0 == ad->prev_lang) { + vconf_set_str(VCONFKEY_LANGSET, ad->sim_lang); } - if (ad->popup) { - evas_object_del(ad->popup); - ad->popup = NULL; + // 2. GET SELECTED LANG + const char *pa_lang = vconf_get_str(VCONFKEY_LANGSET); + if (pa_lang) { /* remove the */ + char *q = strchr(pa_lang, '.'); + if (q) + *q = '\0'; } + SETTING_TRACE("pa_lang:%s", pa_lang); + int err = -1; + + // 3. SET DEFAULT + // default UI language + uloc_setDefault(pa_lang, &err); + FREE(pa_lang); + + /* after lang-change, go back to the previous page*/ + elm_naviframe_item_pop(ad->navi_bar); + setting_view_phone_display_language.is_create = 0; } diff --git a/setting-phone/src/setting-phone-language-region.c b/setting-phone/src/setting-phone-language-region.c old mode 100644 new mode 100755 index b881b61..899074f --- a/setting-phone/src/setting-phone-language-region.c +++ b/setting-phone/src/setting-phone-language-region.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include static int setting_phone_language_region_create(void *cb); @@ -115,7 +118,7 @@ static int setting_phone_language_region_create(void *cb) setting_create_Gendial_field_def(scroller, &(ad->itc_bg_1icon), NULL, ad, - SWALLOW_Type_LAYOUT_SPECIALIZTION, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, 0, example_desc, NULL, NULL); if (pa_region) { @@ -161,6 +164,8 @@ static int setting_phone_language_region_update(void *cb) if (ad->ly_language != NULL) { evas_object_show(ad->ly_language); + + /* setting_update_chk_status(ad->chk_lang, INT_SLP_SETTING_LANG); */ } return SETTING_RETURN_SUCCESS; @@ -197,23 +202,33 @@ setting_phone_lang_click_softkey_cancel_cb(void *data, Evas_Object *obj, ug_destroy_me(ad->ug); } -// 0 : automatic -void setting_phone_lang_change_lang_value(int cur_chk_lang) +// 0 : automatic +void setting_phone_lang_change_lang_value(int ichk) { SETTING_TRACE_BEGIN; int err, ret; /** @todo ASSERT ( SCOPE CHECK ) */ - setting_lang_entry* table = setting_get_language_table(); - char* locale = table[cur_chk_lang].locale; - SETTING_TRACE("table . locale >>>>>> :: %s ", locale); - //if (cur_chk_lang > 0) { - // CHECK 'AUTO' HERE - ret = setting_set_int_slp_key(INT_SLP_SETTING_LANG, cur_chk_lang, &err); + Eina_List* list = setting_get_language_list(); + Eina_List* elist = NULL; + setting_lang_entry* pnode; + + char locale[128] = {0,}; + + EINA_LIST_FOREACH( list, elist, pnode) + { + if (pnode->number == ichk) { + snprintf(locale, 128,"%s.UTF-8", pnode->locale); + } + } + + SETTING_TRACE("table . locale >>>>>> :: %s ", locale); //en_US.UTF8 + + //if (ichk > 0) { + // CHECK 'AUTO' HERE + ret = setting_set_int_slp_key(INT_SLP_SETTING_LANG, ichk, &err); ret = vconf_set_str(VCONFKEY_LANGSET, locale); - //} - // do nothing on 'auto' } static void setting_phone_lang_item_Gendial_mouse_up_cb(void *data, diff --git a/setting-phone/src/setting-phone-license-divx-main.c b/setting-phone/src/setting-phone-license-divx-main.c old mode 100644 new mode 100755 index c1698e1..97dd726 --- a/setting-phone/src/setting-phone-license-divx-main.c +++ b/setting-phone/src/setting-phone-license-divx-main.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include static int setting_phone_license_divx_main_create(void *cb); @@ -75,15 +78,14 @@ static int setting_phone_license_divx_main_create(void *cb) NULL, 0, "IDS_ST_MBODY_DEREGISTER", NULL, NULL); - - drm_bool_type_e is_allowed = DRM_UNKNOWN; - drm_action_type_e action = DRM_IS_DEVICE_ACTIVATED; - drm_action_allowed_data_s action_data; - int ret = -1; - ret = drm_is_action_allowed(action, &action_data, &is_allowed); - - if (ret == DRM_RETURN_SUCCESS) { - if (is_allowed) { /* disable de-reg */ + int result; + drm_bool_type_e is_first = 0; + result = drm_is_action_allowed(DRM_IS_DEVICE_ACTIVATED, NULL, &is_first); + SETTING_TRACE_DEBUG("%s*** drm status - result=%d, is_first=%d ***%s", + SETTING_FONT_BGREEN, (int)result, is_first, + SETTING_FONT_BLACK); + if (!result) { + if (is_first) { /* disable de-reg */ if (ad->data_dereg) { elm_object_item_disabled_set(ad->data_dereg->item, EINA_TRUE); @@ -93,7 +95,7 @@ static int setting_phone_license_divx_main_create(void *cb) } } else { /* disable reg */ if (ad->data_reg) { - elm_object_item_disabled_set(ad->data_reg->item, + elm_object_item_disabled_set(ad->data_reg->item, EINA_TRUE); } else { SETTING_TRACE_ERROR("ad->data_reg is NULL"); @@ -120,6 +122,21 @@ static int setting_phone_license_divx_main_destroy(void *cb) static int setting_phone_license_divx_main_update(void *cb) { + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPhoneUG *ad = (SettingPhoneUG *) cb; + + if(ad->mode == SETTING_DIVX_MODE_REG) + { + setting_disable_genlist_item(ad->data_reg->item); + setting_enable_genlist_item(ad->data_dereg->item); + } + else if(ad->mode == SETTING_DIVX_MODE_DEREG) + { + setting_enable_genlist_item(ad->data_reg->item); + setting_disable_genlist_item(ad->data_dereg->item); + } + return SETTING_RETURN_SUCCESS; } @@ -157,9 +174,8 @@ static Evas_Object *setting_phone_license_divx_main_create_dereg_popup(void Evas_Object *notify; notify = - setting_create_popup_with_btn(ad, ad->win_get, - "Your phone is
already registered.
Are you sure you
wish to deregister?", - NULL, + setting_create_popup_with_btn(ad, ad->win_get, NULL, + _(ASK_DEREG_PHONE), setting_phone_license_ask_deregistration_resp_cb, 0, 2, _("IDS_COM_SK_OK"),_("IDS_COM_SK_CANCEL")); diff --git a/setting-phone/src/setting-phone-license-divx-mode.c b/setting-phone/src/setting-phone-license-divx-mode.c old mode 100644 new mode 100755 index 45154f3..9737712 --- a/setting-phone/src/setting-phone-license-divx-mode.c +++ b/setting-phone/src/setting-phone-license-divx-mode.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #include @@ -54,16 +57,18 @@ static char *setting_phone_license_divx_mode_get_title_str(void *cb) #if SUPPORT_URL_OPEN static void __url_mouse_down_cb(void *data, Evas *e, Evas_Object *eo, void *event_info) -{ +{ SETTING_TRACE_BEGIN; ret_if(!event_info || !data); - //SettingPhoneUG *ad = (SettingPhoneUG *) data; - bundle *bd = bundle_create(); - retm_if(!bd, "bundle_create()"); - appsvc_set_operation(bd, APPSVC_OPERATION_VIEW); - appsvc_set_uri(bd, DIVX_URL); - appsvc_run_service(bd, 0, NULL, NULL); - if (bundle_free(bd)) { + + service_h svc; + if(service_create(&svc)) + return; + + service_set_operation(svc, APPSVC_OPERATION_VIEW); + service_set_uri(svc, DIVX_URL); + service_send_launch_request(svc, NULL, NULL); + if (service_destroy(svc)) { SETTING_TRACE_ERROR("bundle_free()"); } //elm_win_lower(ad->win_main_layout); @@ -78,57 +83,58 @@ static int setting_phone_license_divx_mode_create(void *cb) retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); SettingPhoneUG *ad = (SettingPhoneUG *) cb; - char str[MAX_COMMON_BUFFER_LEN] = { 0, }; + char str[MAX_DISPLAY_NAME_LEN_ON_UI] = { 0, }; const char *desc = NULL; const char *url = NULL; if (ad->mode == SETTING_DIVX_MODE_REG) { int result; - drm_data_type_e data_type = DRM_DATA_TYPE_DIVX_REGISTRATION_CODE; - drm_code_info_s reg_code_info = {{0,}, 0}; - result = drm_get_data(data_type, NULL, (void*) ®_code_info); + + drm_code_info_s info; + result = drm_get_data(DRM_DATA_TYPE_DIVX_REGISTRATION_CODE, NULL, &info); SETTING_TRACE_DEBUG ("%s*** regiString=%s, codeLength=%d, result=%d ***%s", - SETTING_FONT_BGREEN, reg_code_info.code, reg_code_info.code_len, result, + SETTING_FONT_BGREEN, info.code, info.code_len, (int)result, SETTING_FONT_BLACK); - if (result != DRM_RETURN_SUCCESS || '\0' == reg_code_info.code[0]) { + if (result != 0 || '\0' == info.code[0]) { SETTING_TRACE_ERROR("%s*** [ERR] DRM_FALSE ***%s", SETTING_FONT_RED, SETTING_FONT_BLACK); + ad->mode = SETTING_DIVX_MODE_DEREG; setting_create_popup_without_btn(ad, ad->win_get, - "Failed to get registration code", - NULL, NULL, POPUP_INTERVAL); - snprintf(reg_code_info.code, sizeof(reg_code_info.code), "Unavailable"); + NULL, _(REGISTRATION_GET_FAILED), + NULL, POPUP_INTERVAL, FALSE, FALSE); + snprintf(info.code, sizeof(info.code), "Unavailable"); } - g_strlcat(str, "



Your device
registration code:

", MAX_COMMON_BUFFER_LEN); - g_strlcat(str, reg_code_info.code, MAX_COMMON_BUFFER_LEN); - g_strlcat(str, "


Register at", MAX_COMMON_BUFFER_LEN); + safeStrNCat(str, _(REGISTRATION_INDICATOT), MAX_DISPLAY_NAME_LEN_ON_UI); + safeStrNCat(str, info.code, MAX_DISPLAY_NAME_LEN_ON_UI); + safeStrNCat(str, _(REGISTRATION_AT), MAX_DISPLAY_NAME_LEN_ON_UI); } else { int result; - drm_data_type_e data_type = DRM_DATA_TYPE_DIVX_DEREGISTRATION_CODE; - drm_code_info_s dereg_code_info = {{0,}, 0}; - result = drm_get_data(data_type, NULL, (void*) &dereg_code_info); + + drm_code_info_s info; + result = drm_get_data(DRM_DATA_TYPE_DIVX_DEREGISTRATION_CODE, NULL, &info); SETTING_TRACE_DEBUG ("%s*** deregiString=%s, codeLength=%d, result=%d ***%s", - SETTING_FONT_BGREEN, dereg_code_info.code, dereg_code_info.code_len, result, + SETTING_FONT_BGREEN, info.code, info.code_len, result, SETTING_FONT_BLACK); - if (result != DRM_RETURN_SUCCESS || '\0' == dereg_code_info.code[0]) { + if (result != 0 || '\0' == info.code[0]) { SETTING_TRACE_ERROR("%s*** [ERR] DRM_FALSE ***%s", SETTING_FONT_RED, SETTING_FONT_BLACK); + ad->mode = SETTING_DIVX_MODE_REG; setting_create_popup_without_btn(ad, ad->win_get, - _("IDS_ST_BODY_DE_REGISTRATION_CODE_NOT_FOUND"), - NULL, NULL, POPUP_INTERVAL); - snprintf(dereg_code_info.code, sizeof(dereg_code_info.code), - "Unavailable"); + NULL, _("IDS_ST_BODY_DE_REGISTRATION_CODE_NOT_FOUND"), + NULL, POPUP_INTERVAL, FALSE, FALSE); + snprintf(info.code, sizeof(info.code), "%s", _("IDS_ST_HEADER_UNAVAILABLE")); } - g_strlcat(str, "



Your device
deregistration code:

", MAX_COMMON_BUFFER_LEN); - g_strlcat(str, dereg_code_info.code, MAX_COMMON_BUFFER_LEN); - g_strlcat(str, "


Deregister at", MAX_COMMON_BUFFER_LEN); + safeStrNCat(str, _(DEREGISTRATION_INDICATOT), MAX_DISPLAY_NAME_LEN_ON_UI); + safeStrNCat(str, info.code, MAX_DISPLAY_NAME_LEN_ON_UI); + safeStrNCat(str, _(EREGISTRATION_AT), MAX_DISPLAY_NAME_LEN_ON_UI); } Evas_Object *scroller; @@ -146,12 +152,13 @@ static int setting_phone_license_divx_mode_create(void *cb) url = setting_customize_text(""DIVX_URL"", 0, "#FF0000", "center"); Evas_Object *outer_box = setting_create_client_bx(ad->win_main_layout); #if SUPPORT_URL_OPEN + SETTING_TRACE_DEBUG("str : %s", str); desc = setting_customize_text(str, 0, NULL, "center"); - + Evas_Object *ly_desc = setting_create_textbox(ad->win_main_layout, desc); - setting_disable_evas_object(ly_desc); + setting_disable_evas_object(ly_desc); elm_box_pack_end(outer_box, ly_desc); - + Evas_Object *ly_url = setting_create_textbox(ad->win_main_layout, url); evas_object_event_callback_add(ly_url, EVAS_CALLBACK_MOUSE_DOWN, __url_mouse_down_cb, ad); elm_box_pack_end(outer_box, ly_url); @@ -160,7 +167,7 @@ static int setting_phone_license_divx_mode_create(void *cb) snprintf(tmp_str, sizeof(tmp_str), "%s
%s", str, url); desc = setting_customize_text(tmp_str, 0, NULL, "center"); Evas_Object *ly_desc = setting_create_textbox(ad->win_main_layout, desc); - setting_disable_evas_object(ly_desc); + setting_disable_evas_object(ly_desc); elm_box_pack_end(outer_box, ly_desc); #endif diff --git a/setting-phone/src/setting-phone-license-main.c b/setting-phone/src/setting-phone-license-main.c old mode 100644 new mode 100755 index d9f301a..1476939 --- a/setting-phone/src/setting-phone-license-main.c +++ b/setting-phone/src/setting-phone-license-main.c @@ -1,24 +1,28 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include -#define SUPPORT_TRANSFER_TRACKING 0 +#define SUPPORT_TRANSFER_TRACKING 1 #define SUPPORT_CLEAR_LICENSE 1 -#define SUPPORT_ROAMING_NETWORK 0 +#define SUPPORT_ROAMING_NETWORK 1 #define TEXT_CLEAR_LICENSE "IDS_ST_BODY_REMOVE_LICENCE" static int setting_phone_license_main_create(void *cb); @@ -179,18 +183,30 @@ static int setting_phone_license_main_create(void *cb) G_FREE(pa_roaming); #endif -#if SUPPORT_CLEAR_LICENSE /* Clear license */ item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + // [UI] open source license + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_phone_license_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, NULL, + 0, "IDS_ST_BODY_OPEN_SOURCE_LICENCES", + NULL, NULL); + +#if SUPPORT_CLEAR_LICENSE setting_create_Gendial_field_def(scroller, &(ad->itc_1text), setting_phone_license_main_mouse_up_Gendial_list_cb, ad, SWALLOW_Type_INVALID, NULL, NULL, 0, TEXT_CLEAR_LICENSE, NULL, NULL); #endif + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + setting_view_phone_license_main.is_create = 1; return SETTING_RETURN_SUCCESS; @@ -206,14 +222,14 @@ static int setting_phone_license_main_destroy(void *cb) if (ad->ly_license != NULL) { SETTING_TRACE("ad->ly_license:%p", ad->ly_license); - + /* SETTING_TRACE("ad->roaming_nw_dialData:%p", ad->roaming_nw_dialData); */ if (ad->popup_clear_license) { evas_object_del(ad->popup_clear_license); ad->popup_clear_license = NULL; } evas_object_del(ad->ly_license); - + /* if(ad->roaming_nw_dialData) FREE(ad->roaming_nw_dialData); */ setting_view_phone_license_main.is_create = 0; } return SETTING_RETURN_SUCCESS; @@ -228,6 +244,13 @@ static int setting_phone_license_main_update(void *cb) if (ad->ly_license != NULL) { evas_object_show(ad->ly_license); + /* #if SUPPORT_TRANSFER_TRACKING */ + /* setting_check_onoff_status(ad->chk_tracking, BOOL_SLP_SETTING_TRANSACTION_TRACKING); */ + /* #endif */ + /* setting_check_onoff_status(ad->chk_expiry, BOOL_SLP_SETTING_EXPIRY_REMINDER); */ + + /* setting_update_chk_status(ad->chk_roaming_nw, INT_SLP_SETTING_ROAMING_NETWORK); */ + /* edje_object_part_text_set(_EDJ(ad->li_roaming_nw), "bottom.text", get_pa_roaming_network_str()); */ } return SETTING_RETURN_SUCCESS; @@ -235,6 +258,15 @@ static int setting_phone_license_main_update(void *cb) static int setting_phone_license_main_cleanup(void *cb) { + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPhoneUG *ad = (SettingPhoneUG *) cb; + + if (ad->ly_license != NULL) { + /* evas_object_hide(ad->ly_license); */ + } + return SETTING_RETURN_SUCCESS; } @@ -261,9 +293,8 @@ setting_phone_license_main_chk_btn_cb(void *data, Evas_Object *obj, BOOL_SLP_SETTING_TRANSACTION_TRACKING); if (list_item->chk_status) { ad->popup = - setting_create_popup_with_btn(ad, ad->win_get, - "Your recommendation
information is also
sent with the file you
transfer", - NULL, + setting_create_popup_with_btn(ad, ad->win_get, NULL, + _(TRANSFER_INFO), setting_phone_license_main_popup_resp_cb, 0, 1, _("IDS_COM_SK_OK")); } @@ -275,14 +306,84 @@ setting_phone_license_main_chk_btn_cb(void *data, Evas_Object *obj, BOOL_SLP_SETTING_EXPIRY_REMINDER); if (list_item->chk_status) { ad->popup = - setting_create_popup_with_btn(ad, ad->win_get, + setting_create_popup_with_btn(ad, ad->win_get, NULL, _("IDS_ST_BODY_EXPLANATION_FOR_EXPIRY_REMINDER_MENU"), - NULL, setting_phone_license_main_popup_resp_cb, 0, 1, _("IDS_COM_SK_OK")); } } } +static void __ug_layout_cb(ui_gadget_h ug, enum ug_mode mode,void *priv) +{ + SettingPhoneUG *ad = (SettingPhoneUG *) priv; + Evas_Object *base; + + if (!priv) + return; + SETTING_TRACE_BEGIN; + + base = (Evas_Object *) ug_get_layout(ug); + if (!base) + return; + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + break; + } + + SETTING_TRACE_END; +} + +static void __ug_destroy_cb(ui_gadget_h ug, void *priv) +{ + SETTING_TRACE_BEGIN; + + /* restore the '<-' button on the navigate bar */ + ret_if(!priv); + SettingPhoneUG *ad = (SettingPhoneUG *) priv; /* ad is point to priv */ + + if (ug) { + ug_destroy(ug); + ad->ug_loading = NULL; + } + +} + +static void __main_license_clicked(void *data) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + SettingPhoneUG *ad = (SettingPhoneUG *)data; + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + setting_retm_if(cbs == NULL, "calloc failed"); + cbs->layout_cb = __ug_layout_cb; + cbs->result_cb = NULL; + cbs->destroy_cb = __ug_destroy_cb; + cbs->priv = (void *)ad; + + //bundle *b = bundle_create(); + service_h svc; + if (service_create(&svc)) { + FREE(cbs); + return; + } + service_add_extra_data(svc, "file", SETTING_OPEN_SOURCE_LICENSE_PATH); + service_add_extra_data(svc, "title", "IDS_ST_BODY_OPEN_SOURCE_LICENCES"); + + ad->ug_loading = ug_create(ad->ug, "setting-fileview-efl", UG_MODE_FULLVIEW, svc, cbs); + if (NULL == ad->ug_loading) { /* error handling */ + setting_create_simple_popup(ad, ad->win_get, NULL, _(UNSUPPORTED_FUNCTION)); + } + + service_destroy(svc); + FREE(cbs); +} void setting_phone_license_main_mouse_up_Gendial_list_cb(void *data, @@ -319,9 +420,8 @@ setting_phone_license_main_mouse_up_Gendial_list_cb(void *data, list_item->chk_status, &err); if (list_item->chk_status) { ad->popup = - setting_create_popup_with_btn(ad, ad->win_get, - "Your recommendation information is also sent with the file you transfer", - NULL, + setting_create_popup_with_btn(ad, ad->win_get, NULL, + _(TRANSFER_INFO), setting_phone_license_main_popup_resp_cb, 0, 1, dgettext("sys_string", "IDS_COM_SK_OK")); } @@ -339,22 +439,22 @@ setting_phone_license_main_mouse_up_Gendial_list_cb(void *data, list_item->chk_status, &err); if (list_item->chk_status) { ad->popup = - setting_create_popup_with_btn(ad, ad->win_get, + setting_create_popup_with_btn(ad, ad->win_get, NULL, _("IDS_ST_BODY_EXPLANATION_FOR_EXPIRY_REMINDER_MENU"), - NULL, setting_phone_license_main_popup_resp_cb, 0, 1, dgettext("sys_string", "IDS_COM_SK_OK")); } } else if (!safeStrCmp(TEXT_CLEAR_LICENSE, list_item->keyStr)) { ad->popup_clear_license = - setting_create_popup_with_btn(ad, ad->win_get, + setting_create_popup_with_btn(ad, ad->win_get, NULL, _("IDS_ST_POP_LICENCE_WILL_BE_DELETED_CONTINUE_Q"), - NULL, setting_phone_license_clear_license_resp_cb, 0, 2, _("IDS_COM_SK_DELETE"),_("IDS_COM_SK_CANCEL")); } - + else if (!safeStrCmp("IDS_ST_BODY_OPEN_SOURCE_LICENCES", list_item->keyStr)) { + __main_license_clicked(data); + } } void setting_phone_license_clear_license_resp_cb(void *data, Evas_Object *obj, @@ -363,17 +463,16 @@ void setting_phone_license_clear_license_resp_cb(void *data, Evas_Object *obj, int response_type = btn_type(obj); SettingPhoneUG *ad = (SettingPhoneUG *) data; if (POPUP_RESPONSE_OK == response_type) { -#if DRM_V2 - DRM_RESULT ret = drm_svc_remove_all_ro(); + //DRM_RESULT ret = drm_svc_remove_all_ro(); + int ret = drm_trusted_handle_request(DRM_TRUSTED_REQ_TYPE_REMOVE_ALL_RO, NULL, NULL); SETTING_TRACE("ret = %d", ret); - if (ret == DRM_RESULT_SUCCESS) { - setting_create_popup_without_btn(ad, ad->win_get, _("IDS_COM_POP_SUCCESS"), - NULL, NULL, POPUP_INTERVAL); + if (ret == DRM_TRUSTED_RETURN_SUCCESS) { + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_SUCCESS"), + NULL, POPUP_INTERVAL, FALSE, FALSE); } else { - setting_create_popup_without_btn(ad, ad->win_get, _("IDS_COM_POP_FAILED"), - NULL, NULL, POPUP_INTERVAL); + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_FAILED"), + NULL, POPUP_INTERVAL, FALSE, FALSE); } -#endif } else if (POPUP_RESPONSE_CANCEL == response_type) { } evas_object_del(ad->popup_clear_license); @@ -386,7 +485,7 @@ void setting_phone_license_main_popup_resp_cb(void *data, Evas_Object *obj, int response_type = btn_type(obj); if (POPUP_RESPONSE_OK == response_type) { } - + setting_retm_if(data == NULL, "Data parameter is NULL"); SettingPhoneUG *ad = (SettingPhoneUG *) data; if (ad->popup) @@ -403,8 +502,10 @@ setting_phone_license_main_click_softkey_cancel(void *data, Evas_Object *obj, { /* error check */ retm_if(data == NULL, "Data parameter is NULL"); + SettingPhoneUG *ad = (SettingPhoneUG *) data; + /* modify by kairong78.yin */ /* Send destroy request */ ug_destroy_me(ad->ug); } diff --git a/setting-phone/src/setting-phone-region-format.c b/setting-phone/src/setting-phone-region-format.c index 7317ce1..6c538fb 100755 --- a/setting-phone/src/setting-phone-region-format.c +++ b/setting-phone/src/setting-phone-region-format.c @@ -1,20 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #define MAX_REGION_STRLEN 256 @@ -39,7 +42,7 @@ static void __searchbar_changed_cb(void *data, Evas_Object *obj, void *event_inf static int setting_phone_region_format_get_region_fmt(char *list[], int item_idx[], /*[OUT]*/ char *region_keyStr[], - int *region_num) + int *region_num) { const char *loc_list = NULL; int loc_count = 0; @@ -74,62 +77,50 @@ static int setting_phone_region_format_get_region_fmt(char *list[], loc_list = uloc_getAvailable(i); + /* SETTING_TRACE("loc_list = %s", loc_list); */ uloc_getDisplayLanguage(loc_list, localeID, lang, LANGUAGE_STR_LEN, &language_status); if (U_FAILURE(language_status)) { SETTING_TRACE_ERROR("language_status got an error %s:%d ", language_status,language_status); language_status = U_ZERO_ERROR; /* set the value to the initial value */ - } + } uloc_getDisplayCountry(loc_list, localeID, country, COUNTRY_STR_LEN, &country_status); if (U_FAILURE(country_status)) { SETTING_TRACE_ERROR("country_status got an error %s:%d ", country, country_status); country_status = U_ZERO_ERROR; /* set the value to the initial value */ - } + } uloc_getDisplayVariant(loc_list, localeID, variant, SETTING_STR_SLP_LEN, &variant_status); if (U_FAILURE(variant_status)) { SETTING_TRACE_ERROR("variant_status got an error %s:%d ", variant, variant_status); variant_status = U_ZERO_ERROR; /* set the value to the initial value */ - } + } uloc_getDisplayName(loc_list, localeID, displayname, SETTING_STR_SLP_LEN, &displayname_status); if (U_FAILURE(displayname_status)) { SETTING_TRACE_ERROR("displayname_status got an error %s:%d ", displayname, displayname_status); displayname_status = U_ZERO_ERROR; /* set the value to the initial value */ - } + } str_lang = setting_phone_lang_str_to_utf8(lang); str_country = setting_phone_lang_str_to_utf8(country); str_variant = setting_phone_lang_str_to_utf8(variant); str_displayname = setting_phone_lang_str_to_utf8(displayname); - /* to do : filter Chinese and Japanese */ - SETTING_TRACE_DEBUG("str_lang : %s", str_lang); - if((safeStrCmp(str_lang, _("IDS_ST_BODY_JAPANESE")) == 0) - || (safeStrCmp(str_lang, _("IDS_COM_OPT_CHINESE_VODA")) == 0)) - { - FREE(str_lang); - FREE(str_country); - FREE(str_variant); - FREE(str_displayname); - continue; - } - /* end */ - /* filter which has variant */ if (str_lang != NULL && str_country != NULL && safeStrLen(str_country) > 1 && safeStrLen(str_variant) == 0) { Setting_Region_Table *item_data = (Setting_Region_Table *) calloc(1, sizeof(Setting_Region_Table)); //setting_retvm_if(item_data == NULL, -1, "calloc failed") - if(item_data == NULL) { - SETTING_TRACE_ERROR("calloc failed"); + if(item_data == NULL) { + SETTING_TRACE_ERROR("calloc failed"); FREE(str_lang); FREE(str_country); FREE(str_variant); FREE(str_displayname); return -1; - } + } item_data->desc = (char *)g_strdup(str_displayname); item_data->key = (char *)g_strdup(loc_list); @@ -193,6 +184,7 @@ static char *__region_format_vconf_str_get() static Eina_Bool __region_animator_cb(void *data) { + //SETTING_TRACE_BEGIN; setting_retvm_if(NULL == data, ECORE_CALLBACK_CANCEL, "data is NULL"); SettingPhoneUG *ad = (SettingPhoneUG *) data; @@ -214,6 +206,11 @@ static Eina_Bool __region_animator_cb(void *data) elm_genlist_item_show(ad->selected_item, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); } ad->prev_region = ad->selected_region_idx; + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(ad->gl_region, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); return ECORE_CALLBACK_CANCEL; } @@ -257,12 +254,17 @@ static void __region_genlist_create(void *data) } ad->pop_progress = setting_create_popup_with_progressbar(ad, ad->win_get, "pending_list", - NULL, NULL, NULL, 0); + NULL, NULL, NULL, 0, TRUE, TRUE); elm_genlist_clear(ad->gl_region); G_FREE(ad->region_vconf_str); ad->region_vconf_str = __region_format_vconf_str_get(); + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(ad->gl_region, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + Setting_GenGroupItem_Data *item_data = NULL; ad->gl_region_index = 0; ad->selected_item = NULL; @@ -373,6 +375,7 @@ static Eina_Bool __region_genlist_update(void *data) if (ad->selected_region_idx > -1) { elm_radio_value_set(ad->chk_region, ad->selected_region_idx); } + ad->search_idler = NULL; return ECORE_CALLBACK_CANCEL; } @@ -404,7 +407,7 @@ static int setting_phone_region_format_create(void *cb) elm_layout_theme_set(sub_layout, "layout", "application", "searchbar_base"); elm_object_signal_emit(sub_layout, "elm,state,show,searchbar", "elm"); - setting_push_layout_navi_bar(_("Region format"), + setting_push_layout_navi_bar(_("IDS_ST_BODY_REGION"), _("IDS_COM_BODY_BACK"), NULL, NULL, @@ -413,6 +416,7 @@ static int setting_phone_region_format_create(void *cb) NULL, ad, sub_layout, ad->navi_bar, NULL); ad->gl_region = elm_genlist_add(ad->navi_bar); + elm_object_style_set(ad->gl_region, "dialogue"); ad->chk_region = elm_radio_add(ad->gl_region); elm_radio_state_value_set(ad->chk_region, -1); @@ -539,10 +543,10 @@ static void setting_phone_region_format_close_popup_ex(void *data) SettingPhoneUG *ad = (SettingPhoneUG *) data; char *msg = - "IDS_ST_POP_CHANGING_REGION_WILL_CLOSE_ALL_APPLICATIONS_AND_UNSAVED_DATA_WILL_BE_LOST_CONTINUE_Q"; + "IDS_ST_BODY_CHANGING_REGION_WILL_CLOSE_ALL_APPLICATIONS_AND_UNSAVED_DATA_WILL_BE_LOST_CONTINUE_Q"; ad->popup_cb = setting_phone_region_format_exit_cb_ex; - ad->popup = setting_create_popup_with_btn(ad, ad->win_get, - _(msg), NULL, ad->popup_cb, 0, 2, + ad->popup = setting_create_popup_with_btn(ad, ad->win_get, NULL, + _(msg), ad->popup_cb, 0, 2, _("IDS_COM_SK_YES"), _("IDS_COM_SK_NO")); } @@ -565,12 +569,6 @@ setting_phone_region_format_exit_cb_ex(void *data, Evas_Object *obj, memset(region, 0x00, MAX_REGION_STRLEN); snprintf(region, MAX_REGION_STRLEN, "%s.UTF-8", ad->region_keyStr[ad->prev_region]); - /* just filter out Setting App, other Apps stil need to be terminated untill they implement updating language or region automatically */ - if (aul_app_get_running_app_info - (app_terminate_func, NULL) < 0) { - /* tet_infoline("aul_app_get_running_app_info() failed in positive test case"); */ - } - int ret = setting_phone_region_format_set_dateformat (ad->region_keyStr[ad->prev_region], ad); @@ -583,7 +581,7 @@ setting_phone_region_format_exit_cb_ex(void *data, Evas_Object *obj, "[Error] set value of VCONFKEY_REGIONFORMAT fail"); /* after lang-change, go back to the previous page*/ - setting_view_change(&setting_view_phone_region_format , + setting_view_change(&setting_view_phone_region_format , &setting_view_phone_language_region, ad); break; @@ -662,6 +660,7 @@ static int setting_phone_region_format_set_dateformat(const char *region, ret_str = u_austrcpy(bestPatternString, bestPattern); setting_retvm_if(!ret_str, SETTING_RETURN_FAIL, "u_uastrncpy is fail"); + /* SETTING_TRACE("bestPatternString : %s, bestPatternLength: %d", bestPatternString, bestPatternLength); */ int i = 0; int j = 0; @@ -676,7 +675,7 @@ static int setting_phone_region_format_set_dateformat(const char *region, } region_format[len] = '\0'; - char *date_format_str[DATA_FORMAT_CATEGORY_NUM] = { + char *date_format_str[DATA_FORMAT_CATEGORY_NUM] = { "dMy", "Mdy", "yMd", "ydM" }; int date_format_vconf_value = DATA_FORMAT_DEFAULT; /* default is "Mdy" */ for (i = 0; i < DATA_FORMAT_CATEGORY_NUM; i++) { diff --git a/setting-phone/src/setting-phone-ticker-notification-details.c b/setting-phone/src/setting-phone-ticker-notification-details.c new file mode 100755 index 0000000..ccda58d --- /dev/null +++ b/setting-phone/src/setting-phone-ticker-notification-details.c @@ -0,0 +1,435 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include + +#define NOTIFICATION_STR "IDS_ST_BODY_NOTIFICATION" +#define DISPLAY_CONTENT_STR "IDS_ST_BODY_DISPLAY_CONTENTS" +#define BADGE_STR "IDS_COM_BODY_BADGE_ABB" + +#define STR_NOTIFICATION_DETAILS_HELP1 "You can turn off notification of this application.

" \ + "If you don't want to see contents in notification popup, turn off the display contents.

"\ + "If you don't want to display badge on app icon with a new event number, turn off the Badge." + +static int setting_phone_ticker_notification_details_create(void *cb); +static int setting_phone_ticker_notification_details_destroy(void *cb); +static int setting_phone_ticker_notification_details_update(void *cb); +static int setting_phone_ticker_notification_details_cleanup(void *cb); + +static void setting_phone_noti_details_chk_btn_cb(void *data, Evas_Object *obj, void *event_info); +static void setting_phone_noti_details_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info); + +static int __status_get_notification_str(char* title); +static int __status_get_display_contents_str(char* title); +static int __status_get_badge_str(char* title); +static void __status_set_display_contents_str(void* data); + +setting_view setting_view_phone_ticker_notification_details = { + .create = setting_phone_ticker_notification_details_create, + .destroy = setting_phone_ticker_notification_details_destroy, + .update = setting_phone_ticker_notification_details_update, + .cleanup = setting_phone_ticker_notification_details_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ +char* g_sel_string = NULL; +SettingPhoneUG *g_phone_ad = NULL; + +static int setting_phone_ticker_notification_details_create(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingPhoneUG *ad = (SettingPhoneUG *) cb; + g_phone_ad = ad; + + Evas_Object *scroller; + + /* scroller is a genlist */ + setting_push_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, + _(ad->sel_string), + dgettext("sys_string", "IDS_COM_BODY_BACK"), + NULL, + setting_phone_noti_details_click_softkey_back_cb, + NULL, ad, &scroller, + ad->navi_bar); + + Elm_Object_Item *item; + + g_sel_string = ad->sel_string; + + // [UI] Separator + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + int noti_val = __status_get_notification_str(ad->sel_string); + + // [UI] Notification + ad->data_details_notification = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_phone_noti_details_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, noti_val, + NOTIFICATION_STR, NULL, + setting_phone_noti_details_chk_btn_cb); + if (ad->data_details_notification) { + ad->data_details_notification->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_launch_effect is NULL"); + } + + int display_val = __status_get_display_contents_str(ad->sel_string); + + // [UI] Display contents + ad->data_details_display_content = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_phone_noti_details_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, display_val, + DISPLAY_CONTENT_STR, NULL, + setting_phone_noti_details_chk_btn_cb); + if (ad->data_details_display_content) { + ad->data_details_display_content->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_launch_effect is NULL"); + } + + // [UI] Badge + int badge_val = __status_get_badge_str(ad->sel_string); + ad->data_details_badge = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_phone_noti_details_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, badge_val, + BADGE_STR, NULL, + setting_phone_noti_details_chk_btn_cb); + if (ad->data_details_badge) { + ad->data_details_badge->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_launch_effect is NULL"); + } + // [UI] help text 1 + setting_create_Gendial_field_def(scroller, &(ad->itc_bg_1icon), NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, STR_NOTIFICATION_DETAILS_HELP1, NULL, + NULL); + + setting_view_phone_ticker_notification_details.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_phone_ticker_notification_details_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPhoneUG *ad = (SettingPhoneUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_phone_ticker_notification_details.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_phone_ticker_notification_details_update(void *cb) +{ + SETTING_TRACE_BEGIN; + return SETTING_RETURN_SUCCESS; +} + +static int setting_phone_ticker_notification_details_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + setting_phone_ticker_notification_details_destroy(cb); + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_phone_noti_details_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + SettingPhoneUG *ad = (SettingPhoneUG *) data; + + setting_view_change(&setting_view_phone_ticker_notification_details, &setting_view_phone_ticker_notification, ad); +} + + +// -1 : failed +// 0 : off +// 1 : on +static int __status_get_notification_str(char* title) +{ + SETTING_TRACE_BEGIN; + int err; + int val = -1; + + if ( 0== safeStrCmp (title, "IDS_COM_BODY_MESSAGES")) { + setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_MESSAGES, &val, &err); + + } else if ( 0== safeStrCmp (title, "IDS_ST_BODY_EMAIL")) { + setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_EMAIL, &val, &err); + } + /* add new menu */ + else if ( 0== safeStrCmp (title, "IDS_COM_BODY_INSTANT_MESSENGER")) { + setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_IM, &val, &err); + } else if ( 0== safeStrCmp (title, KeyStr_Twitter)) { + setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_TWITTER, &val, &err); + } else if ( 0== safeStrCmp (title, KeyStr_Facebook)) { + setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_FACEBOOK, &val, &err); + } + + SETTING_TRACE_DEBUG("title : %s, value : %d, err : %d", title, val, err); + + return val; +} + +// -1 : failed +// 0 : off +// 1 : on +static int __status_get_display_contents_str(char* title) +{ + SETTING_TRACE_BEGIN; + int err; + int val = -1; + + if ( 0== safeStrCmp (title, "IDS_COM_BODY_MESSAGES")) { + setting_get_bool_slp_key(BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_MESSASGES, &val, &err); + } else if ( 0== safeStrCmp (title, "IDS_ST_BODY_EMAIL")) { + setting_get_bool_slp_key(BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_EMAIL, &val, &err); + } + /* add new menu */ + else if ( 0== safeStrCmp (title, "IDS_COM_BODY_INSTANT_MESSENGER")) { + setting_get_bool_slp_key(BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_IM, &val, &err); + } else if ( 0== safeStrCmp (title, KeyStr_Twitter)) { + setting_get_bool_slp_key(BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_TWITTER, &val, &err); + } else if ( 0== safeStrCmp (title, KeyStr_Facebook)) { + setting_get_bool_slp_key(BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_FACEBOOK, &val, &err); + } + + SETTING_TRACE_DEBUG("title : %s, value : %d, err : %d", title, val, err); + + return val; +} +static int __status_get_badge_str(char* title) +{ + SETTING_TRACE_BEGIN; + int val = -1; + const char *vconf_key = NULL; + if ( 0== safeStrCmp (title, "IDS_COM_BODY_MESSAGES")) { + vconf_key = VCONFKEY_TICKER_NOTI_BADGE_MESSAGES; + } else if ( 0== safeStrCmp (title, "IDS_ST_BODY_EMAIL")) { + vconf_key = VCONFKEY_TICKER_NOTI_BADGE_EMAIL; + } + /* add new menu */ + else if ( 0== safeStrCmp (title, "IDS_COM_BODY_INSTANT_MESSENGER")) { + vconf_key = VCONFKEY_TICKER_NOTI_BADGE_IM; + } else if ( 0== safeStrCmp (title, KeyStr_Twitter)) { + vconf_key = VCONFKEY_TICKER_NOTI_BADGE_TWITTER; + } else if ( 0== safeStrCmp (title, KeyStr_Facebook)) { + vconf_key = VCONFKEY_TICKER_NOTI_BADGE_FACEBOOK; + } + SETTING_TRACE("vconf_key:%s", vconf_key); + vconf_get_bool(vconf_key, &val); + SETTING_TRACE_DEBUG("title : %s, value : %d", title, val); + return val; +} + +static void __status_set_notification_str(void* data) +{ + SETTING_TRACE_BEGIN; + int err; + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)data; + + // message update in previos page + Setting_GenGroupItem_Data* item_to_update = NULL; + + char* status; + + if (list_item->chk_status == 1) { + status = setting_gettext("IDS_COM_BODY_ON_M_STATUS"); + } else { + status = setting_gettext("IDS_COM_BODY_OFF_M_STATUS"); + } + + if ( 0== safeStrCmp (g_sel_string, "IDS_COM_BODY_MESSAGES")) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_MESSAGES, list_item->chk_status, &err); + item_to_update = g_phone_ad->data_n_msg; + } else if ( 0== safeStrCmp (g_sel_string, "IDS_ST_BODY_EMAIL")) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_EMAIL, list_item->chk_status, &err); + item_to_update = g_phone_ad->data_n_email; + } + /* add new menu */ + else if ( 0== safeStrCmp (g_sel_string, "IDS_COM_BODY_INSTANT_MESSENGER")) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_IM, list_item->chk_status, &err); + item_to_update = g_phone_ad->data_n_im; + } else if ( 0== safeStrCmp (g_sel_string, KeyStr_Twitter)) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_TWITTER, list_item->chk_status, &err); + item_to_update = g_phone_ad->data_n_twt; + } else if ( 0== safeStrCmp (g_sel_string, KeyStr_Facebook)) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_FACEBOOK, list_item->chk_status, &err); + item_to_update = g_phone_ad->data_n_fb; + } + + // update UI + if (item_to_update) { + item_to_update->sub_desc = strdup(status); + elm_object_item_data_set(item_to_update->item,item_to_update); + elm_genlist_item_update(item_to_update->item); + } +} + +static void __status_set_display_contents_str(void* data) +{ + SETTING_TRACE_BEGIN; + int err; + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)data; + + // message update in previos page + + char* status; + + if (list_item->chk_status == 1) { + status = setting_gettext("IDS_COM_BODY_ON_M_STATUS"); + } else { + status = setting_gettext("IDS_COM_BODY_OFF_M_STATUS"); + } + + if ( 0== safeStrCmp (g_sel_string, "IDS_COM_BODY_MESSAGES")) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_MESSASGES, list_item->chk_status, &err); + } else if ( 0== safeStrCmp (g_sel_string, "IDS_ST_BODY_EMAIL")) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_EMAIL, list_item->chk_status, &err); + } + /* add new menu */ + else if ( 0== safeStrCmp (g_sel_string, "IDS_COM_BODY_INSTANT_MESSENGER")) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_IM, list_item->chk_status, &err); + } else if ( 0== safeStrCmp (g_sel_string, KeyStr_Twitter)) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_TWITTER, list_item->chk_status, &err); + } else if ( 0== safeStrCmp (g_sel_string, KeyStr_Facebook)) { + setting_set_bool_slp_key(BOOL_SLP_SETTING_NOTI_DISPLAY_CONTENT_FACEBOOK, list_item->chk_status, &err); + } +} + +static void __status_set_badge_str(void* data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)data; + + char *status = NULL; + + if (list_item->chk_status == 1) { + status = setting_gettext("IDS_COM_BODY_ON_M_STATUS"); + } else { + status = setting_gettext("IDS_COM_BODY_OFF_M_STATUS"); + } + + SETTING_TRACE("g_sel_string:%s", g_sel_string); + const char *vconf_key = NULL; + if ( 0== safeStrCmp (g_sel_string, "IDS_COM_BODY_MESSAGES")) { + vconf_key = VCONFKEY_TICKER_NOTI_BADGE_MESSAGES; + } else if ( 0== safeStrCmp (g_sel_string, "IDS_ST_BODY_EMAIL")) { + vconf_key = VCONFKEY_TICKER_NOTI_BADGE_EMAIL; + } + /* add new menu */ + else if ( 0== safeStrCmp (g_sel_string, "IDS_COM_BODY_INSTANT_MESSENGER")) { + vconf_key = VCONFKEY_TICKER_NOTI_BADGE_IM; + } else if ( 0== safeStrCmp (g_sel_string, KeyStr_Twitter)) { + vconf_key = VCONFKEY_TICKER_NOTI_BADGE_TWITTER; + } else if ( 0== safeStrCmp (g_sel_string, KeyStr_Facebook)) { + vconf_key = VCONFKEY_TICKER_NOTI_BADGE_FACEBOOK; + } + SETTING_TRACE("vconf_key:%s", vconf_key); + int ret = vconf_set_bool(vconf_key, list_item->chk_status); + setting_retm_if(ret != 0, "fail to set vconf"); +} + +/** + * genlist click + */ +static void setting_phone_noti_details_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + + int old_status = elm_check_state_get(list_item->eo_check); + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); /* new status */ + + if ( 0== safeStrCmp (list_item->keyStr, NOTIFICATION_STR)) { + __status_set_notification_str(list_item); + } else if ( 0== safeStrCmp (list_item->keyStr, DISPLAY_CONTENT_STR)) { + // vconf setting by g_sel_string + __status_set_display_contents_str(list_item); + } else if ( 0== safeStrCmp (list_item->keyStr, BADGE_STR)) { + __status_set_badge_str(list_item); + } +} + + +/** + * check box + */ +static void setting_phone_noti_details_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) + { + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + + if ( 0== safeStrCmp (list_item->keyStr, NOTIFICATION_STR)) { + __status_set_notification_str(list_item); + } else if ( 0== safeStrCmp (list_item->keyStr, DISPLAY_CONTENT_STR)) { + __status_set_display_contents_str(list_item); + } else if ( 0== safeStrCmp (list_item->keyStr, BADGE_STR)) { + __status_set_badge_str(list_item); + } + } + diff --git a/setting-phone/src/setting-phone-ticker-notification.c b/setting-phone/src/setting-phone-ticker-notification.c index 48b705c..461fe17 100755 --- a/setting-phone/src/setting-phone-ticker-notification.c +++ b/setting-phone/src/setting-phone-ticker-notification.c @@ -1,23 +1,27 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include #include - +#define SUPPORT_TWITTER 0 +#define SUPPORT_FACEBOOK 0 static void get_3rd_applist(void *data, Evas_Object *scroller); static char *get_appname(char *keyname); @@ -44,134 +48,169 @@ static int setting_phone_ticker_notfication_create(void *cb) { /* error check */ retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); - SettingPhoneUG *ad = (SettingPhoneUG *) cb; - Evas_Object *navi_bar = NULL; Evas_Object *scroller; - /* Evas_Object *outer_box; */ /* scroller is a genlist */ ad->ly_ticker = setting_create_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, - setting_gettext - ("IDS_ST_BODY_EVENTS_NOTIFICATIONS"), + setting_gettext("IDS_ST_BODY_EVENTS_NOTIFICATIONS"), dgettext("sys_string", "IDS_COM_BODY_BACK"), NULL, setting_phone_noti_click_softkey_back_cb, NULL, ad, &scroller, - &navi_bar); + &(ad->navi_bar)); int value; int err; Elm_Object_Item *item; - - item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, - ELM_GENLIST_ITEM_NONE, NULL, NULL); + char* status = ""; + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_DISPLAY_CONTENT, - &value, &err); - ad->data_n_dsp = - setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), - setting_phone_noti_mouse_up_Gendial_list_cb, - ad, SWALLOW_Type_1TOGGLE, NULL, - NULL, value, - "IDS_ST_BODY_DISPLAY_CONTENTS", - NULL, - setting_phone_noti_mouse_up_chk_btn_cb); - if (ad->data_n_dsp) { - ad->data_n_dsp->userdata = ad; + + // [UI] Email + setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_EMAIL, &value, &err); + if (value == 1) { + status = setting_gettext("IDS_COM_BODY_ON_M_STATUS"); } else { - SETTING_TRACE_ERROR("ad->data_n_dsp is NULL"); + status = setting_gettext("IDS_COM_BODY_OFF_M_STATUS"); + } + + ad->data_n_email = + setting_create_Gendial_field_groupitem(scroller, + &(ad->itc_1icon_2text), + NULL, + setting_phone_noti_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_INVALID, + NULL, + NULL, + value, /* chk_status*/ + "IDS_ST_BODY_EMAIL", + status, /* sub_desk*/ + setting_phone_noti_mouse_up_chk_btn_cb); + if (ad->data_n_email) { + ad->data_n_email->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_n_email is NULL"); + } + + // [UI] Messages + setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_MESSAGES, &value, &err); + if (value == 1) { + status = setting_gettext("IDS_COM_BODY_ON_M_STATUS"); + } else { + status = setting_gettext("IDS_COM_BODY_OFF_M_STATUS"); } - item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, - ELM_GENLIST_ITEM_NONE, NULL, NULL); - elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_MESSAGES, &value, - &err); ad->data_n_msg = - setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), - setting_phone_noti_mouse_up_Gendial_list_cb, - ad, SWALLOW_Type_1TOGGLE, NULL, - NULL, value, - "IDS_COM_BODY_MESSAGES", NULL, - setting_phone_noti_mouse_up_chk_btn_cb); + setting_create_Gendial_field_groupitem(scroller, + &(ad->itc_1icon_2text), + NULL, + setting_phone_noti_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_INVALID, + NULL, + NULL, + value, /* chk_status*/ + "IDS_COM_BODY_MESSAGES", + status, /* sub_desk*/ + setting_phone_noti_mouse_up_chk_btn_cb); if (ad->data_n_msg) { ad->data_n_msg->userdata = ad; } else { SETTING_TRACE_ERROR("ad->data_n_msg is NULL"); } - setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_VMAIL, &value, - &err); - ad->data_n_vmail = - setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), - setting_phone_noti_mouse_up_Gendial_list_cb, - ad, SWALLOW_Type_1TOGGLE, NULL, - NULL, value, - "IDS_ST_BODY_VOICE_MAIL", NULL, - setting_phone_noti_mouse_up_chk_btn_cb); - if (ad->data_n_vmail) { - ad->data_n_vmail->userdata = ad; + // [UI] Instant messenger + setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_IM, &value, &err); + if (value == 1) { + status = setting_gettext("IDS_COM_BODY_ON_M_STATUS"); } else { - SETTING_TRACE_ERROR("ad->data_n_vmail is NULL"); + status = setting_gettext("IDS_COM_BODY_OFF_M_STATUS"); } - setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_EMAIL, &value, - &err); - ad->data_n_email = - setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), - setting_phone_noti_mouse_up_Gendial_list_cb, - ad, SWALLOW_Type_1TOGGLE, NULL, - NULL, value, "IDS_ST_BODY_EMAIL", NULL, - setting_phone_noti_mouse_up_chk_btn_cb); - if (ad->data_n_email) { - ad->data_n_email->userdata = ad; + ad->data_n_im = + setting_create_Gendial_field_groupitem(scroller, + &(ad->itc_1icon_2text), + NULL, + setting_phone_noti_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_INVALID, + NULL, + NULL, + value, /* chk_status*/ + "IDS_COM_BODY_INSTANT_MESSENGER", + status, /* sub_desk*/ + setting_phone_noti_mouse_up_chk_btn_cb); + if (ad->data_n_im) { + ad->data_n_im->userdata = ad; } else { - SETTING_TRACE_ERROR("ad->data_n_email is NULL"); + SETTING_TRACE_ERROR("ad->data_n_im is NULL"); } - item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, - ELM_GENLIST_ITEM_NONE, NULL, NULL); - elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_SNS, &value, - &err); - ad->data_n_sns = - setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), - setting_phone_noti_mouse_up_Gendial_list_cb, - ad, SWALLOW_Type_1TOGGLE, NULL, - NULL, value, "IDS_ST_BODY_SNS", NULL, - setting_phone_noti_mouse_up_chk_btn_cb); - if (ad->data_n_sns) { - ad->data_n_sns->userdata = ad; +#if SUPPORT_FACEBOOK + // [UI] Facebook + setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_FACEBOOK, &value, &err); + if (value == 1) { + status = setting_gettext("IDS_COM_BODY_ON_M_STATUS"); } else { - SETTING_TRACE_ERROR("ad->data_n_sns is NULL"); + status = setting_gettext("IDS_COM_BODY_OFF_M_STATUS"); } - item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, - ELM_GENLIST_ITEM_NONE, NULL, NULL); - elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_FILE_TRAN, &value, - &err); - ad->data_n_file = - setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), - setting_phone_noti_mouse_up_Gendial_list_cb, - ad, SWALLOW_Type_1TOGGLE, NULL, - NULL, value, - "IDS_ST_BODY_FILE_TRANSFER", NULL, - setting_phone_noti_mouse_up_chk_btn_cb); - if (ad->data_n_file) { - ad->data_n_file->userdata = ad; + ad->data_n_fb = + setting_create_Gendial_field_groupitem(scroller, + &(ad->itc_1icon_2text), + NULL, + setting_phone_noti_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_INVALID, + NULL, + NULL, + value, /* chk_status*/ + KeyStr_Facebook, + status, /* sub_desk*/ + setting_phone_noti_mouse_up_chk_btn_cb); + if (ad->data_n_fb) { + ad->data_n_fb->userdata = ad; } else { - SETTING_TRACE_ERROR("ad->data_n_file is NULL"); + SETTING_TRACE_ERROR("ad->data_n_msg is NULL"); } +#endif +#if SUPPORT_TWITTER + // [UI] Twitter + setting_get_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_TWITTER, &value, &err); + if (value == 1) { + status = setting_gettext("IDS_COM_BODY_ON_M_STATUS"); + } else { + status = setting_gettext("IDS_COM_BODY_OFF_M_STATUS"); + } + + ad->data_n_twt = + setting_create_Gendial_field_groupitem(scroller, + &(ad->itc_1icon_2text), + NULL, + setting_phone_noti_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_INVALID, + NULL, + NULL, + value, /* chk_status*/ + KeyStr_Twitter, + status, /* sub_desk*/ + setting_phone_noti_mouse_up_chk_btn_cb); + if (ad->data_n_twt) { + ad->data_n_twt->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_n_msg is NULL"); + } +#endif + // [UI] list of 3rd party apps +#if APP_3RD_LIST get_3rd_applist(ad, scroller); +#endif setting_view_phone_ticker_notification.is_create = 1; return SETTING_RETURN_SUCCESS; @@ -187,7 +226,6 @@ static int setting_phone_ticker_notfication_destroy(void *cb) if (ad->ly_ticker != NULL) { evas_object_del(ad->ly_ticker); - setting_view_phone_ticker_notification.is_create = 0; } @@ -234,39 +272,10 @@ static int setting_phone_ticker_notfication_cleanup(void *cb) * ***************************************************/ -static void -setting_phone_noti_mouse_up_chk_btn_cb(void *data, Evas_Object *obj, +static void setting_phone_noti_mouse_up_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) { SETTING_TRACE_BEGIN; - /* error check */ - retm_if(data == NULL, "Data parameter is NULL"); - Setting_GenGroupItem_Data *list_item = - (Setting_GenGroupItem_Data *) data; - SettingPhoneUG *ad = list_item->userdata; - list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ - - int err = -1; - if (list_item->eo_check == ad->data_n_dsp->eo_check) { - setting_set_bool_slp_key - (BOOL_SLP_SETTING_TICKER_NOTI_DISPLAY_CONTENT, - list_item->chk_status, &err); - } else if (list_item->eo_check == ad->data_n_msg->eo_check) { - setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_MESSAGES, - list_item->chk_status, &err); - } else if (list_item->eo_check == ad->data_n_vmail->eo_check) { - setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_VMAIL, - list_item->chk_status, &err); - } else if (list_item->eo_check == ad->data_n_email->eo_check) { - setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_EMAIL, - list_item->chk_status, &err); - } else if (list_item->eo_check == ad->data_n_sns->eo_check) { - setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_SNS, - list_item->chk_status, &err); - } else if (list_item->eo_check == ad->data_n_file->eo_check) { - setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_FILE_TRAN, - list_item->chk_status, &err); - } return; } @@ -274,10 +283,11 @@ static void setting_phone_noti_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info) { + SETTING_TRACE_BEGIN; /* error check */ setting_retm_if(data == NULL, "Data parameter is NULL"); - retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + SettingPhoneUG *ad = (SettingPhoneUG *) data; Elm_Object_Item *item = (Elm_Object_Item *) event_info; @@ -290,27 +300,28 @@ setting_phone_noti_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, list_item->chk_status = !old_status; elm_check_state_set(list_item->eo_check, list_item->chk_status); - int err = -1; - if (list_item->eo_check == ad->data_n_dsp->eo_check) { - setting_set_bool_slp_key - (BOOL_SLP_SETTING_TICKER_NOTI_DISPLAY_CONTENT, - list_item->chk_status, &err); - } else if (list_item->eo_check == ad->data_n_msg->eo_check) { - setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_MESSAGES, - list_item->chk_status, &err); - } else if (list_item->eo_check == ad->data_n_vmail->eo_check) { - setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_VMAIL, - list_item->chk_status, &err); - } else if (list_item->eo_check == ad->data_n_email->eo_check) { - setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_EMAIL, - list_item->chk_status, &err); - } else if (list_item->eo_check == ad->data_n_sns->eo_check) { - setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_SNS, - list_item->chk_status, &err); - } else if (list_item->eo_check == ad->data_n_file->eo_check) { - setting_set_bool_slp_key(BOOL_SLP_SETTING_TICKER_NOTI_FILE_TRAN, - list_item->chk_status, &err); + if ( 0== safeStrCmp (list_item->keyStr, "IDS_ST_BODY_DISPLAY_CONTENTS")) { + ad->sel_string = "IDS_ST_BODY_DISPLAY_CONTENTS"; + + } else if ( 0== safeStrCmp (list_item->keyStr, "IDS_COM_BODY_MESSAGES")) { + ad->sel_string = "IDS_COM_BODY_MESSAGES"; + + } else if ( 0== safeStrCmp (list_item->keyStr, "IDS_ST_BODY_EMAIL")) { + ad->sel_string = "IDS_ST_BODY_EMAIL"; + + } + /* add new menue */ + else if ( 0== safeStrCmp (list_item->keyStr, "IDS_COM_BODY_INSTANT_MESSENGER")) { + ad->sel_string = "IDS_COM_BODY_INSTANT_MESSENGER"; + } else if ( 0== safeStrCmp (list_item->keyStr, KeyStr_Twitter)) { + ad->sel_string = KeyStr_Twitter; + } else if ( 0== safeStrCmp (list_item->keyStr, KeyStr_Facebook)) { + ad->sel_string = KeyStr_Facebook; } + + + // go to 'details' page + setting_view_change(&setting_view_phone_ticker_notification, &setting_view_phone_ticker_notification_details, ad); } static void @@ -337,7 +348,7 @@ setting_phone_noti_3rd_apps_chk_btn_cb(void *data, Evas_Object *obj, retm_if(data == NULL, "Data parameter is NULL"); Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; - + /* SettingPhoneUG *ad = list_item->userdata; */ list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ if (0 != vconf_set_int(list_item->sub_desc, list_item->chk_status)) { @@ -396,6 +407,9 @@ setting_phone_noti_3rd_apps_mouse_up_Gendial_list_cb(void *data, elm_check_state_set(list_item->eo_check, list_item->chk_status); } +/** + * 3rd party apps list + */ static void get_3rd_applist(void *data, Evas_Object *scroller) { SettingPhoneUG *ad = (SettingPhoneUG *) data; @@ -489,12 +503,12 @@ static char* package_get_name(char* package, int* err_ref) ret = ail_package_get_appinfo(package, &handle); if (ret != AIL_ERROR_OK) { err = AIL_ERROR_FAIL; - } + } ret = ail_appinfo_get_str(handle, AIL_PROP_NAME_STR, &str); if (ret != AIL_ERROR_OK) { err = AIL_ERROR_FAIL; - } + } if (str) { ret_str = strdup(str); @@ -506,7 +520,7 @@ static char* package_get_name(char* package, int* err_ref) ret = ail_package_destroy_appinfo(handle); if (ret != AIL_ERROR_OK) { err = AIL_ERROR_FAIL; - } + } *err_ref = err; SETTING_TRACE("2 Package[%s] : %s", package, ret_str); diff --git a/setting-phone/src/setting-phone.c b/setting-phone/src/setting-phone.c index f642918..e954bdb 100755 --- a/setting-phone/src/setting-phone.c +++ b/setting-phone/src/setting-phone.c @@ -1,35 +1,58 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +/** + *@defgroup setting-phone + *UG creation code for setting-phone + * + * - display + * - event notification + * - dispaly language + * - region format + */ #include +#include +#include #ifndef UG_MODULE_API #define UG_MODULE_API __attribute__ ((visibility("default"))) #endif -setting_view *__get_phone_view_to_load(bundle *data) +setting_view *__get_phone_view_to_load(service_h service) { SETTING_TRACE_BEGIN; - setting_retvm_if(NULL == data, NULL, "NULL == data"); - const char *viewtype = bundle_get_val(data, "viewtype"); + + char *viewtype = NULL; + + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + SETTING_TRACE("viewtype:%s", viewtype); if (!safeStrCmp(viewtype, "language")) { - const char *caller = (const char *)bundle_get_val(data, "caller"); + char *caller = NULL; + + service_get_extra_data(service, "caller", &caller); if (caller) { setting_view_node_table_register(&setting_view_phone_display_language, NULL); return &setting_view_phone_display_language; @@ -42,35 +65,29 @@ setting_view *__get_phone_view_to_load(bundle *data) return &setting_view_phone_language_region; } - } else if (!safeStrCmp(viewtype, "license")) { - setting_view_node_table_register(&setting_view_phone_license_main, NULL); - setting_view_node_table_register(&setting_view_phone_license_divx_main, - &setting_view_phone_license_main); - setting_view_node_table_register(&setting_view_phone_license_divx_mode, - &setting_view_phone_license_divx_main); - - return &setting_view_phone_license_main; } else if (!safeStrCmp(viewtype, "notification")) { setting_view_node_table_register(&setting_view_phone_ticker_notification, NULL); - + setting_view_node_table_register(&setting_view_phone_ticker_notification_details, &setting_view_phone_ticker_notification); + return &setting_view_phone_ticker_notification; } else { return NULL; /* &setting_view_phone_main; */ } - } -Evas_Object *__get_phone_layout_to_return(bundle *data, void *priv) +Evas_Object *__get_phone_layout_to_return(service_h service, void *priv) { SETTING_TRACE_BEGIN; SettingPhoneUG *phoneUG = priv; - const char *viewtype = bundle_get_val(data, "viewtype"); + char *viewtype = NULL; + + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; SETTING_TRACE("viewtype:%s", viewtype); if (!safeStrCmp(viewtype, "language")) { return phoneUG->ly_language; - } else if (!safeStrCmp(viewtype, "license")) { - return phoneUG->ly_license; } else if (!safeStrCmp(viewtype, "notification")) { return phoneUG->ly_ticker; } else { @@ -79,135 +96,77 @@ Evas_Object *__get_phone_layout_to_return(bundle *data, void *priv) } + const char *get_language_by_mobile_country_code(int mcc) { const char *simLanguage = NULL; - setting_lang_entry* table = setting_get_language_table(); - switch (mcc) { case 262: /* GERMAN */ - simLanguage = table[SETTING_LANG_GERMAN].locale; + simLanguage = "de_DE.UTF-8"; break; case 204: /* DUTCH */ - simLanguage = table[SETTING_LANG_DUTCH].locale; + simLanguage = "nl_NL.UTF-8"; break; case 214: /* SPAINISH */ - simLanguage = table[SETTING_LANG_SPAINISH].locale; + simLanguage = "es_ES.UTF-8"; break; case 268: /* PORTUGUESE */ - simLanguage = table[SETTING_LANG_PORTUGUESE].locale; + simLanguage = "pt_PT.UTF-8"; break; case 202: /* GREEK */ - simLanguage = table[SETTING_LANG_GREEK].locale; + simLanguage = "el_GR.UTF-8"; break; case 222: /* ITALIAN */ - simLanguage = table[SETTING_LANG_ITALIAN].locale; + simLanguage = "it_IT.UTF-8"; break; case 208: /* FRENCH */ - simLanguage = table[SETTING_LANG_FRENCH].locale; + simLanguage = "fr_FR.UTF-8"; break; case 286: /* TURKISH */ - simLanguage = table[SETTING_LANG_TURKISH].locale; + simLanguage = "tr_TR.UTF-8"; break; case 450: /* KOREAN */ - simLanguage = table[SETTING_LANG_KOREA].locale; + simLanguage = "ko_KR.UTF-8"; break; case 440: /* JAPAN */ - simLanguage = table[SETTING_LANG_JAPAN].locale; + simLanguage = "ja_JP.UTF-8"; break; case 460: /* CHINA */ - simLanguage = table[SETTING_LANG_CHINA].locale; + simLanguage = "zh_CN.UTF-8"; break; case 454: /* CANTONESE */ - simLanguage = table[SETTING_LANG_CANTONESE].locale; + simLanguage = "zh_HK.UTF-8"; break; case 466: /* TAIWAN */ - simLanguage = table[SETTING_LANG_TAIWAN].locale; + simLanguage = "zh_TW.UTF-8"; break; case 250: /* RUSSIAN */ - simLanguage = table[SETTING_LANG_RUSSIAN].locale; + simLanguage = "ru_RU.UTF-8"; break; default: /* get value from db/menu_widget/language at vconf */ - simLanguage = table[SETTING_LANG_ENGLISH].locale; + simLanguage = "en_US.UTF-8"; break; } return simLanguage; } -int app_terminate_func(const aul_app_info *info, void *data) -{ - setting_retvm_if(info == NULL, -1, "info parameter is NULL"); - - SETTING_TRACE(" ===== ITERFUNC: PID=%d , PATH=%s , PKG_NAME=%s ", - (int)(info->pid), info->app_path, info->pkg_name); - - /* temp pid check for org.tizen.setting*/ - if (getpid() == info->pid) { - SETTING_TRACE("Skip Setting(itself) process by PID check"); - return 0; - } - - /* @todo re-implement killing code. */ - if (!safeStrCmp(info->pkg_name, "org.tizen.menu-screen") - || !safeStrCmp(info->pkg_name, "org.tizen.setting") - || !safeStrCmp(info->pkg_name, "org.tizen.live-magazine") - || !safeStrCmp(info->pkg_name, "org.tizen.live-data-provider") - || !safeStrCmp(info->pkg_name, "org.tizen.pwlock") - || !safeStrCmp(info->pkg_name, "org.tizen.quickpanel") - || !safeStrCmp(info->pkg_name, "org.tizen.vtmain") - || !safeStrCmp(info->pkg_name, "org.tizen.call") - ) { - return 0; - } - - int ret = aul_terminate_pid(info->pid); - if (ret == 0) { - SETTING_TRACE("===== aul_termniated_pid successed."); - if (data) { - SettingPhoneUG *ad = (SettingPhoneUG *) data; - SETTING_TRACE("Add pid [%d] to eina_list", info->pid); - ad->killed_pid_list = - eina_list_append(ad->killed_pid_list, - (void *)info->pid); - } - } - return 0; -} - -int app_terminate_dead_cb(int pid, void *data) -{ - SETTING_TRACE_BEGIN; - setting_retvm_if(data == NULL, -1, "Data parameter is NULL"); - SettingPhoneUG *ad = (SettingPhoneUG *)data; - - SETTING_TRACE("pid:%d", pid); - if (ad->killed_pid_list) { - SETTING_TRACE_DEBUG("remove process[%d] from killed_pid_list", pid); - ad->killed_pid_list = - eina_list_remove(ad->killed_pid_list, (void *)pid); - } - SETTING_TRACE("eina_list_count(ad->killed_pid_list):%d", eina_list_count(ad->killed_pid_list)); - if (0 == eina_list_count(ad->killed_pid_list)) { - SETTING_TRACE_DEBUG("All the process nhad been killed"); - if (ad->pop_progress) { - evas_object_del(ad->pop_progress); - ad->pop_progress = NULL; - } - } - return 0; -} static void setting_phone_update_item(void *data) { setting_retm_if(data == NULL, "data is NULL"); SettingPhoneUG *ad = (SettingPhoneUG *) data; - - if (ad->data_display_language) { - ad->data_display_language->sub_desc = get_pa_display_language_str(); - elm_object_item_data_set(ad->data_display_language->item, ad->data_display_language); - elm_genlist_item_update(ad->data_display_language->item); + + Setting_GenGroupItem_Data* item_to_update = NULL; + + item_to_update = ad->data_display_language; + retm_if (!item_to_update, "ad->data_display_language is NULL"); + + if (item_to_update) { + item_to_update->sub_desc = get_pa_display_language_str(); + elm_object_item_data_set(item_to_update->item, item_to_update); + elm_genlist_item_update(item_to_update->item); } char *pa_region = vconf_get_str(VCONFKEY_REGIONFORMAT); @@ -216,10 +175,14 @@ static void setting_phone_update_item(void *data) ("[Error] get value of VCONFKEY_REGIONFORMAT fail."); return; } - if (ad->data_region_fmt) { - ad->data_region_fmt->sub_desc = setting_phone_lang_get_region_str(pa_region); - elm_object_item_data_set(ad->data_region_fmt->item, ad->data_region_fmt); - elm_genlist_item_update(ad->data_region_fmt->item); + + item_to_update = ad->data_region_fmt; + retm_if (!item_to_update, "ad->data_region_fmt is NULL"); + + if (item_to_update) { + item_to_update->sub_desc = setting_phone_lang_get_region_str(pa_region); + elm_object_item_data_set(item_to_update->item, item_to_update); + elm_genlist_item_update(item_to_update->item); } if (ad->data_region_fmt_example) { @@ -230,7 +193,15 @@ static void setting_phone_update_item(void *data) FREE(example_desc); elm_object_item_data_set(ad->data_region_fmt_example->item, ad->data_region_fmt_example); elm_genlist_item_update(ad->data_region_fmt_example->item); - } + } + +#if 0 + if (ad->pop_progress) + { + evas_object_del(ad->pop_progress); + ad->popup = NULL; + } +#endif } char *setting_phone_lang_get_region_str(const char *region) @@ -362,11 +333,12 @@ char *setting_phone_lang_get_example_desc(const char *region, void *data) Eina_Strbuf *temp_str = eina_strbuf_new(); char *r_str_text = NULL; eina_strbuf_append_printf(temp_str, - "%s %s", _("IDS_ST_BODY_REGION"), _("IDS_EMAIL_BODY_EXAMPLE")); - eina_strbuf_append_printf(temp_str, "
%s : %s", _("IDS_COM_POP_DATE"), date); + "%s", _("IDS_ST_BODY_REGIONAL_EXAMPLE")); + eina_strbuf_append_printf(temp_str, "
%s : %s", _("IDS_ST_BODY_DATE"), date); eina_strbuf_append_printf(temp_str, "
%s : %s", _("IDS_COM_BODY_DETAILS_TIME"), time); r_str_text = eina_strbuf_string_steal(temp_str); + /* eina_strbuf_string_free(temp_str); */ eina_strbuf_free(temp_str); G_FREE(date); G_FREE(time); @@ -378,13 +350,14 @@ static void setting_phone_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info) { SettingPhoneUG *ad = (SettingPhoneUG *) data; + /* setting_view_update(&setting_view_about_main, ad); */ setting_view_update(ad->view_to_load, ad); } -static void *setting_phone_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, - bundle *data, void *priv) +static void *setting_phone_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) { - setting_retvm_if((!ug || !priv), NULL, "!ug || !priv"); + setting_retvm_if((!priv), NULL, "!priv"); SETTING_TRACE_BEGIN; SettingPhoneUG *phoneUG = priv; phoneUG->ug = ug; @@ -408,32 +381,32 @@ static void *setting_phone_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, return NULL; } /* set launguage */ - setlocale(LC_ALL, ""); - bindtextdomain(SETTING_PACKAGE, SETTING_LOCALEDIR); - textdomain(SETTING_PACKAGE); + appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); FREE(pa_path); /* --------------------------------------------------------- */ - if (TAPI_API_SUCCESS != tel_init()) { - SETTING_TRACE_DEBUG("%s*** [ERR] tel_init. ***%s", - SETTING_FONT_RED, SETTING_FONT_BLACK); + int value = 0; + int err; + int ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + if (ret != 0) { + SETTING_TRACE("fail to get vconf"); } - - memset(&(phoneUG->imsi), 0, sizeof(TelSimImsiInfo_t)); - - /** @todo once Telephony part supports new method to get language from SIM, this code should be replaced */ - int ret = tel_get_sim_imsi(&(phoneUG->imsi)); - if (TAPI_API_SUCCESS == ret) { - SETTING_TRACE("********************************************"); - SETTING_TRACE("imsi.bValid: [%d]", phoneUG->imsi.bValid); - SETTING_TRACE("imsi.szMcc: [%s]", phoneUG->imsi.szMcc); - SETTING_TRACE("imsi.szMnc: [%s]", phoneUG->imsi.szMnc); - SETTING_TRACE("imsi.szMsin: [%s]", phoneUG->imsi.szMsin); - SETTING_TRACE("********************************************"); - - phoneUG->sim_lang = get_language_by_mobile_country_code(atoi(phoneUG->imsi.szMcc)); - } else { - SETTING_TRACE("TAPI API FAIL: Error Code ret : %d ", ret); - + if (value == VCONFKEY_TELEPHONY_SIM_INSERTED) { + phoneUG->handle = tel_init(NULL); + SETTING_TRACE("phoneUG->handle:%d", phoneUG->handle); + memset(&(phoneUG->imsi), 0, sizeof(TelSimImsiInfo_t)); + if (phoneUG->handle + && TAPI_API_SUCCESS == tel_get_sim_imsi(phoneUG->handle, &(phoneUG->imsi))) { + SETTING_TRACE("********************************************"); + //SETTING_TRACE("imsi.bValid: [%d]", phoneUG->imsi.bValid); + SETTING_TRACE("imsi.szMcc: [%s]", phoneUG->imsi.szMcc); + SETTING_TRACE("imsi.szMnc: [%s]", phoneUG->imsi.szMnc); + SETTING_TRACE("imsi.szMsin: [%s]", phoneUG->imsi.szMsin); + SETTING_TRACE("********************************************"); + + phoneUG->sim_lang = get_language_by_mobile_country_code(atoi(phoneUG->imsi.szMcc)); + } + } + if (!phoneUG->sim_lang) { /* if CSC has updated configuration for setting, initial vconf value changes. */ phoneUG->sim_lang = vconf_get_str(VCONFKEY_LANGSET); /* allocated */ } @@ -446,6 +419,10 @@ static void *setting_phone_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, &(phoneUG->itc_1text_1icon_2)); setting_create_Gendial_itc("dialogue/1text.1icon", &(phoneUG->itc_1text_1icon)); + + // 2 text - genlist > items + setting_create_Gendial_itc("dialogue/2text", &(phoneUG->itc_1icon_2text)); + setting_create_Gendial_itc("dialogue/1text", &(phoneUG->itc_1text)); setting_create_Gendial_itc("dialogue/2text.3/expandable", &(phoneUG->itc_2text_3_parent)); @@ -464,8 +441,8 @@ static void *setting_phone_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, phoneUG->pattern_generator = NULL; phoneUG->prev_locale = NULL; /* creating a view. */ - phoneUG->bundle_data = data; - phoneUG->view_to_load = __get_phone_view_to_load(data); + phoneUG->bundle_data = service; + phoneUG->view_to_load = __get_phone_view_to_load(service); setting_retvm_if(NULL == phoneUG->view_to_load, NULL, "NULL == phoneUG->view_to_load"); setting_view_node_set_cur_view(phoneUG->view_to_load); @@ -473,25 +450,25 @@ static void *setting_phone_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, evas_object_event_callback_add(phoneUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_phone_ug_cb_resize, phoneUG); - return __get_phone_layout_to_return(data, phoneUG); + return __get_phone_layout_to_return(service, phoneUG); } -static void setting_phone_ug_on_start(struct ui_gadget *ug, bundle *data, +static void setting_phone_ug_on_start(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_phone_ug_on_pause(struct ui_gadget *ug, bundle *data, +static void setting_phone_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_phone_ug_on_resume(struct ui_gadget *ug, bundle *data, +static void setting_phone_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_phone_ug_on_destroy(struct ui_gadget *ug, bundle *data, +static void setting_phone_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) { SETTING_TRACE_BEGIN; @@ -501,7 +478,7 @@ static void setting_phone_ug_on_destroy(struct ui_gadget *ug, bundle *data, evas_object_event_callback_del(phoneUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_phone_ug_cb_resize); /* fix flash issue for gallery */ phoneUG->ug = ug; - if (tel_deinit() != TAPI_API_SUCCESS) { + if (phoneUG->handle && tel_deinit(phoneUG->handle) != TAPI_API_SUCCESS) { SETTING_TRACE_ERROR("tel_deinit failed"); } /* called when this shared gadget is terminated. similar with app_exit */ @@ -515,12 +492,7 @@ static void setting_phone_ug_on_destroy(struct ui_gadget *ug, bundle *data, phoneUG->view_to_load) { setting_view_destroy(&setting_view_phone_ticker_notification, phoneUG); - } else if (&setting_view_phone_license_main == phoneUG->view_to_load) { - setting_view_destroy(&setting_view_phone_license_divx_main, - phoneUG); - setting_view_destroy(&setting_view_phone_license_divx_mode, - phoneUG); - setting_view_destroy(&setting_view_phone_license_main, phoneUG); + setting_view_destroy(&setting_view_phone_ticker_notification_details, phoneUG); } if (NULL != ug_get_layout(phoneUG->ug)) { @@ -531,27 +503,28 @@ static void setting_phone_ug_on_destroy(struct ui_gadget *ug, bundle *data, SETTING_TRACE_END; } -static void setting_phone_ug_on_message(struct ui_gadget *ug, bundle *msg, - bundle *data, void *priv) +static void setting_phone_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) { SETTING_TRACE_BEGIN; - setting_retm_if(NULL == msg, "msg is NULL"); setting_retm_if(NULL == priv, "priv is NULL"); - char *pid_str = (char *)bundle_get_val(msg, "DEADPID"); + char *pid_str = NULL; + + service_get_extra_data(msg, "DEADPID", &pid_str); if (pid_str) { - errno = 0; + errno = 0; int pid = (int)g_ascii_strtod(pid_str, NULL); SETTING_TRACE_DEBUG("pid = %d",pid); setting_retm_if(errno == ERANGE, "call g_ascii_strtod fail"); - + int ret = app_terminate_dead_cb(pid, priv); setting_retm_if(ret != 0, "call app_terminate_dead_cb fail"); } } -static void setting_phone_ug_on_event(struct ui_gadget *ug, enum ug_event event, - bundle *data, void *priv) +static void setting_phone_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) { SETTING_TRACE_BEGIN; @@ -562,7 +535,18 @@ static void setting_phone_ug_on_event(struct ui_gadget *ug, enum ug_event event, case UG_EVENT_LOW_BATTERY: break; case UG_EVENT_REGION_CHANGE: + { + if (ad->gl_lang_region && setting_view_phone_language_region.is_create) { + elm_genlist_realized_items_update(ad->gl_lang_region); + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); + ret_if(!navi_it); + elm_object_item_text_set(navi_it, _(KeyStr_LanguageRegion)); + setting_phone_update_item(ad); + } + } + break; case UG_EVENT_LANG_CHANGE: + { if (ad->gl_lang_region && setting_view_phone_language_region.is_create) { elm_genlist_realized_items_update(ad->gl_lang_region); Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); @@ -570,7 +554,13 @@ static void setting_phone_ug_on_event(struct ui_gadget *ug, enum ug_event event, elm_object_item_text_set(navi_it, _(KeyStr_LanguageRegion)); setting_phone_update_item(ad); } - break; + + if (ad->pop_progress) { + evas_object_del(ad->pop_progress); + ad->popup = NULL; + } + } + break; case UG_EVENT_ROTATE_PORTRAIT: break; @@ -585,14 +575,13 @@ static void setting_phone_ug_on_event(struct ui_gadget *ug, enum ug_event event, } } -static void setting_phone_ug_on_key_event(struct ui_gadget *ug, +static void setting_phone_ug_on_key_event(ui_gadget_h ug, enum ug_key_event event, - bundle *data, void *priv) + service_h service, void *priv) { SETTING_TRACE_BEGIN; SettingPhoneUG *ad = (SettingPhoneUG *) priv; - if (!ug) - return; + SETTING_TRACE("event:%d", event); switch (event) { case UG_KEY_EVENT_END: @@ -642,44 +631,52 @@ UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) } /*****/ -UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) { SETTING_TRACE_BEGIN; int ret = 0; - const char *ug_type = bundle_get_val(data, "viewtype"); /* usb */ - // ug_type :"notification" "license" "language".. + char *ug_type = NULL; + + service_get_extra_data(service, "viewtype", &ug_type); #if SUPPORT_RUN_SYSTEM_COMMAND - ret += excuteCmd(SETTING_POSTINST_FILE, 1, ug_type); + ret += excuteCmd(SETTING_POSTINST_FILE, 1, ug_type); #else if (0 == safeStrCmp(ug_type, "notification")) { - ret += vconf_set_bool - (VCONFKEY_SETAPPL_STATE_TICKER_NOTI_DISPLAY_CONTENT_BOOL, FALSE); ret += - vconf_set_bool - (VCONFKEY_SETAPPL_STATE_TICKER_NOTI_MESSAGES_BOOL, TRUE); + vconf_set_bool(VCONFKEY_SETAPPL_STATE_TICKER_NOTI_MESSAGES_BOOL, TRUE); ret += - vconf_set_bool - (VCONFKEY_SETAPPL_STATE_TICKER_NOTI_VMAIL_BOOL, TRUE); + vconf_set_bool(VCONFKEY_SETAPPL_STATE_TICKER_NOTI_EMAIL_BOOL, TRUE); ret += - vconf_set_bool - (VCONFKEY_SETAPPL_STATE_TICKER_NOTI_EMAIL_BOOL, TRUE); + vconf_set_bool(VCONFKEY_SETAPPL_STATE_TICKER_NOTI_IM_BOOL, TRUE); ret += - vconf_set_bool(VCONFKEY_SETAPPL_STATE_TICKER_NOTI_SNS_BOOL, FALSE); + vconf_set_bool(VCONFKEY_SETAPPL_STATE_TICKER_NOTI_FACEBOOK_BOOL, TRUE); ret += - vconf_set_bool - (VCONFKEY_SETAPPL_STATE_TICKER_NOTI_FILE_TRAN_BOOL, TRUE); + vconf_set_bool(VCONFKEY_SETAPPL_STATE_TICKER_NOTI_TWITTER_BOOL, TRUE); + ret += + vconf_set_bool(VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_MESSASGES, TRUE); + ret += + vconf_set_bool(VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_EMAIL, TRUE); + ret += + vconf_set_bool(VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_IM, TRUE); + ret += + vconf_set_bool(VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_FACEBOOK, TRUE); + ret += + vconf_set_bool(VCONFKEY_TICKER_NOTI_DISPLAY_CONTENT_TWITTER, TRUE); - } else if (0 == safeStrCmp(ug_type, "license")) { ret += - vconf_set_bool - (VCONFKEY_SETAPPL_STATE_TRANSACTION_TRACKING_BOOL, FALSE); + vconf_set_bool(VCONFKEY_TICKER_NOTI_BADGE_MESSAGES, TRUE); ret += - vconf_set_bool(VCONFKEY_SETAPPL_STATE_EXPIRY_REMINDER_BOOL, FALSE); + vconf_set_bool(VCONFKEY_TICKER_NOTI_BADGE_EMAIL, TRUE); ret += - vconf_set_int(VCONFKEY_SETAPPL_ROAMING_NETWORK_INT, - SETTING_ROAM_NET_AUTO_DOWNLOAD); + vconf_set_bool(VCONFKEY_TICKER_NOTI_BADGE_IM, TRUE); + ret += + vconf_set_bool(VCONFKEY_TICKER_NOTI_BADGE_FACEBOOK, TRUE); + ret += + vconf_set_bool(VCONFKEY_TICKER_NOTI_BADGE_TWITTER, TRUE); + + } else if (0 == safeStrCmp(ug_type, "language")) { // INT_SLP_SETTING_LANG ret += vconf_set_int(VCONFKEY_SETAPPL_LANG_INT, SETTING_LANG_ENGLISH); @@ -710,7 +707,7 @@ UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) vconf_set_int(VCONFKEY_SETAPPL_DATE_FORMAT_INT, SETTING_DATE_FORMAT_DD_MM_YYYY); //d. terminate other apps - ret += aul_app_get_running_app_info(app_terminate_func, NULL); + // ret += aul_app_get_running_app_info(app_terminate_func, NULL); } /* DO NOTHING */ return ret; diff --git a/setting-powersaving/CMakeLists.txt b/setting-powersaving/CMakeLists.txt new file mode 100755 index 0000000..759389f --- /dev/null +++ b/setting-powersaving/CMakeLists.txt @@ -0,0 +1,38 @@ + + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_powersaving REQUIRED evas ecore edje elementary appcore-common appcore-efl devman ui-gadget-1 capi-appfw-application dlog) + +FOREACH(flag ${pkgs_powersaving_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl, --rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_POWERSAVING_UG} SHARED + ./src/setting-powersaving.c + ./src/setting-powersaving-main.c + ./src/setting-powersaving-about.c + ./src/setting-powersaving-customed.c + ./src/setting-powersaving-brightness.c +) + +TARGET_LINK_LIBRARIES(${SETTING_POWERSAVING_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_POWERSAVING_UG} ${pkgs_powersaving_LDFLAGS}) +INSTALL(TARGETS ${SETTING_POWERSAVING_UG} DESTINATION /opt/ug/lib) + diff --git a/setting-powersaving/include/setting-powersaving-about.h b/setting-powersaving/include/setting-powersaving-about.h new file mode 100755 index 0000000..0237203 --- /dev/null +++ b/setting-powersaving/include/setting-powersaving-about.h @@ -0,0 +1,31 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#ifndef __SETTING_POWERSAVING_ABOUT_H__ +#define __SETTING_POWERSAVING_ABOUT_H__ + +#include + +static void setting_powersaving_about_click_back_cb(void *data, + Evas_Object *obj, + void *event_info); + +#endif /* __SETTING_POWERSAVING_ABOUT_H__ */ diff --git a/setting-powersaving/include/setting-powersaving-brightness.h b/setting-powersaving/include/setting-powersaving-brightness.h new file mode 100755 index 0000000..d172121 --- /dev/null +++ b/setting-powersaving/include/setting-powersaving-brightness.h @@ -0,0 +1,46 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#ifndef __SETTING_POWERSAVING_BRIGHTNESS_H__ +#define __SETTING_POWERSAVING_BRIGHTNESS_H__ + +#include + + +static void setting_powersaving_brightness_click_softkey_cancel_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void setting_powersaving_brightness_chk_btn_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_powersaving_brightness_mouse_up_Gendial_list_cb(void *data, + Evas_Object + *obj, void + *event_info); +static void setting_powersaving_birghtness_bright_slider_value_change_cb(void + *data, + Evas_Object + *obj, + void + *event_info); + +#endif /* __SETTING_POWERSAVING_BRIGHTNESS_H__ */ diff --git a/setting-powersaving/include/setting-powersaving-customed.h b/setting-powersaving/include/setting-powersaving-customed.h new file mode 100755 index 0000000..1ae55de --- /dev/null +++ b/setting-powersaving/include/setting-powersaving-customed.h @@ -0,0 +1,41 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#ifndef __SETTING_POWERSAVING_CUSTOMED_H__ +#define __SETTING_POWERSAVING_CUSTOMED_H__ + +#include + +static void setting_powersaving_customed_click_softkey_cancel_cb(void *data, + Evas_Object * + obj, void + *event_info); + +static void setting_powersaving_customed_mouse_up_Gendial_list_cb(void *data, + Evas_Object * + obj, void + *event_info); + +static void setting_powersaving_customed_use_chk_btn_cb(void *data, + Evas_Object *obj, + void *event_info); + +#endif /* __SETTING_POWERSAVING_CUSTOMED_H__ */ diff --git a/setting-powersaving/include/setting-powersaving-main.h b/setting-powersaving/include/setting-powersaving-main.h new file mode 100755 index 0000000..7d94265 --- /dev/null +++ b/setting-powersaving/include/setting-powersaving-main.h @@ -0,0 +1,36 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#ifndef __SETTING_POWERSAVING_MAIN_H__ +#define __SETTING_POWERSAVING_MAIN_H__ + +#include + +static void setting_powersaving_main_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_powersaving_main_click_softkey_back_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_powersaving_main_motion_active_chk_btn_cb(void *data, + Evas_Object *obj, + void *event_info); +#endif /* __SETTING_POWERSAVING_MAIN_H__ */ diff --git a/setting-powersaving/include/setting-powersaving.h b/setting-powersaving/include/setting-powersaving.h new file mode 100755 index 0000000..617e456 --- /dev/null +++ b/setting-powersaving/include/setting-powersaving.h @@ -0,0 +1,135 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#ifndef __SETTING_POWERSAVING_H__ +#define __SETTING_POWERSAVING_H__ + +#include +#include + +#include + +#include + +#include +#include + +#include +#define SUPPORT_UI0_3 0 +#define SUPPORT_UI0_4 1 + +/* string resources..*/ +//in main view +#define KeyStr_Powersaving_Mode "IDS_ST_BODY_POWER_SAVING_MODE" +#define KeyStr_Powersaving_Mode_DSC "Use default settings for power saving. Settings will be enabled immediately." + +/* To do : strings of custom power saving will be removed. */ +#define KeyStr_Powersaving_Customed_Mode "Custom power saving mode" +#define KeyStr_Powersaving_Customed "Custom power saving settings" +#define KeyStr_Powersaving_Level_DSC "Use settings for power saving. Settings will be enabled when battery level is below the value you set." + +#define KeyStr_Powersaving_Tips "IDS_ST_MBODY_POWER_SAVING_TIPS" +#define KeyStr_Powersaving_About "IDS_ST_BODY_LEARN_ABOUT_POWER_SAVING" + +//in "Custom settings" view +#define __TURN_Off "Turn off " +#define KeyStr_WIFI_Off __TURN_Off"Wi-Fi" +#define KeyStr_BT_Off __TURN_Off"Bluetooth" +#define KeyStr_GPS_Off __TURN_Off"GPS" +#define KeyStr_SYNC_Off __TURN_Off"Data sync" +#define KeyStr_HOTSPOT_Off __TURN_Off"Portable Wi-Fi hotspot" +#define KeyStr_Adjust_Bright "Adjust brightness" + +#define KeyStr_Powersaving_AT "Enable power saving at" +#define KeyStr_Screen_Timeout "IDS_ST_LIGHTSETTINGS_BODY_BACKLIGHTTIME" + +#define SETTING_POWERSAVING_AT_10_STR "10% battery power" +#define SETTING_POWERSAVING_AT_20_STR "20% battery power" +#define SETTING_POWERSAVING_AT_30_STR "30% battery power" +#define SETTING_POWERSAVING_AT_40_STR "40% battery power" +#define SETTING_POWERSAVING_AT_50_STR "50% battery power" +/* To do : end */ + + +//v0.4 +#define KeyStr_PS_SETTINGS "IDS_ST_BODY_POWER_SAVING_MODE_SETTINGS" +#define KeyStr_CPU_PS "IDS_ST_BODY_CPU_POWER_SAVING" +#define KeyStr_CPU_PS_DSC "IDS_ST_BODY_LIMIT_THE_MAXIMUM_PERFORMANCE_OF_THE_CPU" +#define KeyStr_DISPLAY_PS "IDS_ST_BODY_SCREEN_POWER_SAVING" +#define KeyStr_DISPLAY_PS_DSC "IDS_ST_BODY_USE_LOW_POWER_LEVEL_FOR_SCREEN" +#define KeyStr_BG_COLOR "IDS_ST_DISPLAYSETTINGS_BODY_MAINGREETINGEDITSTYLEBGCOLOUR" +#define KeyStr_BG_COLOR_DSC "IDS_ST_BODY_CHANGE_BACKGROUND_COLOUR_TO_SAVE_POWER_IN_EMAIL_AND_INTERNET" +#define KeyStr_SCREEN_VIB "IDS_ST_BODY_TURN_OFF_HAPTIC_FEEDBACK" +#define KeyStr_SCREEN_VIB_DSC "IDS_ST_BODY_TURNING_OFF_HAPTIC_FEEDBACK_CAN_EXTEND_BATTERY_LIFE" + +typedef struct _SettingPowersavingUG SettingPowersavingUG; + +/** + *Setting Powersaving UG context + *all UG function has void * as an agument. this is casted back to SettingPowersavingUG + *and the functions access app context. + */ +struct _SettingPowersavingUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + Evas_Object *popup; + Evas_Object *popup_chk; + + Evas_Object *ly_main; + Evas_Object *navi_bar; + + Setting_GenGroupItem_Data *data_powersaving_active; + Setting_GenGroupItem_Data *data_customed_active; + Setting_GenGroupItem_Data *data_customed_setting; + Setting_GenGroupItem_Data *data_powersaving_about; + //v0.4 + Setting_GenGroupItem_Data *data_cpu_ps; + Setting_GenGroupItem_Data *data_display_ps; + Setting_GenGroupItem_Data *data_bg_color; + Setting_GenGroupItem_Data *data_screen_vib; + + Setting_GenGroupItem_Data *data_saving_at; + Setting_GenGroupItem_Data *data_screen_timeout; + Setting_GenGroupItem_Data *data_wifi_off; + Setting_GenGroupItem_Data *data_bt_off; + Setting_GenGroupItem_Data *data_gps_off; + Setting_GenGroupItem_Data *data_sync_off; + Setting_GenGroupItem_Data *data_hotspot_off; + Setting_GenGroupItem_Data *data_adjust_bright; + Setting_GenGroupItem_Data *data_brightness; + + Setting_GenGroupItem_Data *data_br_auto; + Setting_GenGroupItem_Data *data_br_sli; + +}; + +extern setting_view setting_view_powersaving_main; +extern setting_view setting_view_powersaving_customed; +extern setting_view setting_view_powersaving_about; +extern setting_view setting_view_powersaving_brightness; +extern void setting_powersaving_ug_exp_cb(void *data, Evas_Object *obj, void *event_info); +extern char *setting_powersaving_ug_get_brightness_str(); + +#endif /* __SETTING_POWERSAVING_H__ */ diff --git a/setting-powersaving/src/setting-powersaving-about.c b/setting-powersaving/src/setting-powersaving-about.c new file mode 100755 index 0000000..114d27f --- /dev/null +++ b/setting-powersaving/src/setting-powersaving-about.c @@ -0,0 +1,236 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#include +#if SUPPORT_UI0_4 +#define CPU_PS_DESC_DETAIL "IDS_ST_BODY_THIS_OPTION_LIMITS_THE_MAXIMUM_CPU_PERFORMANCE_AND_HELPS_TO_CONSERVE_BATTERY_LIFE_IT_WILL_NOT_EFFECT_NORMAL_USAGE_LIKE_BROWSING_AND_VIDEO_PLAYBACK_MSG" +#define CPU_PS_DESC KeyStr_CPU_PS + +#define DISPLAY_PS_DESC_DETAIL "IDS_ST_BODY_THIS_OPTION_REDUCES_THE_SCREEN_FRAME_RATE_AND_LOWERS_THE_BRIGHTNESS_IT_HELPS_TO_EXTEND_BATTERY_LIFE_WHEN_THE_SCREEN_IS_TURNED_ON" +#define DISPLAY_PS_DESC KeyStr_DISPLAY_PS + +#define BG_COLOR_DESC_DETAIL "IDS_ST_BODY_THIS_OPTION_CHANGES_THE_BACKGROUND_COLOUR_BRIGHTNESS_LEVEL_SO_THAT_IT_CONSUMES_LESS_BATTERY_MSG" +#define BG_COLOR_DESC KeyStr_BG_COLOR + +#define VIBRATION_DESC_DETAIL "IDS_ST_BODY_THE_VIBRATE_FUNCTION_USES_ADDITIONAL_BATTERY_POWER" +#define VIBRATION_DESC KeyStr_SCREEN_VIB +#else +#define MAIN_DESC "1. System power saving settings
"\ + "Set system functions below
"\ + " 1.Dual core max
"\ + " 2.Brightness
"\ + " 3.UI rendering speed" + +#define WIFI_DESC "2. Wi-Fi
"\ + "Turn off Wi-Fi, Turning off Wi-Fi can extend battery life, "\ + "However, if you surf the Web frequently, using Wi-Fi can "\ + "save more battery than using the cellular network." + +#define BT_DESC "3. Bluetooth
"\ + "Turn off Bluetooth. Not using Bluetooth headset or Car home "\ + "mode can extend battery life" + +#define GPS_DESC "4. GPS
"\ + "Applications using GPS location data reduce battery life. "\ + "Turning off BDU GPS can extend battery life" + +#define SYNC_DESC "5. Data sync
"\ + "Applications such as Gmail, Calendar, and Twitter are auto"\ + "synced via wireless network at specific intervals. Syncing "\ + "data manually can extend battery life" + +#define HOTSPOT_DESC "6. Portable Wi-Fi hotspot
"\ + "Turn off Portable Wi-Fi hotspot. Sharing mobile internet"\ + " connection with other devices can reduce battery life. "\ + "Turn off portable Wi-Fi hotspot to extend battery life." + +#define BRIGHT_DESC "7. Brightness
"\ + "Lowering the brightness of the screen can extend battery life."\ + "Selecting Automatic brightness will adjust screen brightness"\ + " to ambient automatically" + +#define ETC_DESC "8. Etc.
"\ + "1.Disabling Use packet data(Settings > Wireless and network >"\ + " Mobile networks) helps extend battery.
"\ + "2.Disabling Auto sync (Settings > Account and sync) "\ + "helps extend battery" +#endif +static int setting_powersaving_about_create(void *cb); +static int setting_powersaving_about_destroy(void *cb); +static int setting_powersaving_about_update(void *cb); +static int setting_powersaving_about_cleanup(void *cb); + +setting_view setting_view_powersaving_about = { + .create = setting_powersaving_about_create, + .destroy = setting_powersaving_about_destroy, + .update = setting_powersaving_about_update, + .cleanup = setting_powersaving_about_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_powersaving_about_create(void *cb) +{ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + char temp[MAX_COMMON_BUFFER_LEN] ={0,}; + + Evas_Object *genlist; + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_Powersaving_About), + _("IDS_COM_BODY_BACK"), + NULL, + setting_powersaving_about_click_back_cb, + NULL, ad, &genlist, ad->navi_bar); + #if SUPPORT_UI0_4 + snprintf(temp, MAX_COMMON_BUFFER_LEN, "1. %s
%s", _(CPU_PS_DESC), _(CPU_PS_DESC_DETAIL)); + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, temp, NULL, NULL); + + memset(temp, 0x00, MAX_COMMON_BUFFER_LEN); + snprintf(temp, MAX_COMMON_BUFFER_LEN, "2. %s
%s", _(DISPLAY_PS_DESC), _(DISPLAY_PS_DESC_DETAIL)); + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, temp, NULL, NULL); + + memset(temp, 0x00, MAX_COMMON_BUFFER_LEN); + snprintf(temp, MAX_COMMON_BUFFER_LEN, "3. %s
%s", _(BG_COLOR_DESC), _(BG_COLOR_DESC_DETAIL)); + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, temp, NULL, NULL); + + memset(temp, 0x00, MAX_COMMON_BUFFER_LEN); + snprintf(temp, MAX_COMMON_BUFFER_LEN, "4. %s
%s", _(VIBRATION_DESC), _(VIBRATION_DESC_DETAIL)); + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, temp, NULL, NULL); + #else + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, MAIN_DESC, NULL, NULL); + + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, WIFI_DESC, NULL, NULL); + + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, BT_DESC, NULL, NULL); + + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, GPS_DESC, NULL, NULL); + setting_create_Gendial_field_def(genlist, &itc_multiline_text, NULL, ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, SYNC_DESC, NULL, NULL); + + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, HOTSPOT_DESC, NULL, + NULL); + + setting_create_Gendial_field_def(genlist, &itc_multiline_text, + NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, BRIGHT_DESC, NULL, + NULL); + + setting_create_Gendial_field_def(genlist, &itc_multiline_text, NULL, ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, ETC_DESC, NULL, NULL); + #endif + setting_view_powersaving_about.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_about_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_powersaving_about.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_about_update(void *cb) +{ + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_about_cleanup(void *cb) +{ + return setting_powersaving_about_destroy(cb); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_powersaving_about_click_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + setting_retm_if(data == NULL, " Data parameter is NULL"); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + setting_view_change(&setting_view_powersaving_about, + &setting_view_powersaving_main, ad); +} diff --git a/setting-powersaving/src/setting-powersaving-brightness.c b/setting-powersaving/src/setting-powersaving-brightness.c new file mode 100755 index 0000000..6df4996 --- /dev/null +++ b/setting-powersaving/src/setting-powersaving-brightness.c @@ -0,0 +1,290 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#include + +#define Left_Bright_Icon IMG_BRIGTHNESS_LEFT +#define Right_Bright_Icon IMG_BRIGHTNESS_RIGHT + +static int setting_powersaving_brightness_create(void *cb); +static int setting_powersaving_brightness_destroy(void *cb); +static int setting_powersaving_brightness_update(void *cb); +static int setting_powersaving_brightness_cleanup(void *cb); + +setting_view setting_view_powersaving_brightness = { + .create = setting_powersaving_brightness_create, + .destroy = setting_powersaving_brightness_destroy, + .update = setting_powersaving_brightness_update, + .cleanup = setting_powersaving_brightness_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_powersaving_brightness_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + + Evas_Object *navi_bar = ad->navi_bar; + Evas_Object *sub_layout = elm_layout_add(navi_bar); + elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, + "search_layout"); + + Evas_Object *genlist = elm_genlist_add(ad->win_main_layout); + elm_object_style_set(genlist, "dialogue"); + retvm_if(genlist == NULL, SETTING_RETURN_FAIL, + "Cannot set scroller object as contento of layout"); + elm_genlist_clear(genlist); /* first to clear list */ + + setting_push_layout_navi_bar(_(KeyStr_Brightness), + _("IDS_COM_BODY_BACK"), NULL, NULL, + setting_powersaving_brightness_click_softkey_cancel_cb, + NULL, + NULL, ad, sub_layout, navi_bar, NULL);; + elm_object_part_content_set(sub_layout, "search_list2", genlist); + + int auto_value = 0; + int value = 10; + + Elm_Object_Item *item = NULL;; + + item = + elm_genlist_item_append(genlist, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + // [control] AUTOMATIC - boolean - vconf + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_AUTO_STATUS, &auto_value); //if failed, keep intial value + SETTING_TRACE("auto_value:%d", auto_value); + + // [UI] AUTOMATIC - boolean + ad->data_br_auto = + setting_create_Gendial_field_def(genlist, &itc_1text_1icon, + setting_powersaving_brightness_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, auto_value, + "IDS_COM_BODY_AUTOMATIC", NULL, + setting_powersaving_brightness_chk_btn_cb); + if (ad->data_br_auto) { + __BACK_POINTER_SET(ad->data_br_auto); + ad->data_br_auto->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_br_auto is NULL"); + } + + /* check manual */ + vconf_get_int(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_VALUE, &value); //if failed, keep intial value + SETTING_TRACE("auto_value:%d", value); + ad->data_br_sli = + setting_create_Gendial_field_def(genlist, &itc_1icon, NULL, + NULL, SWALLOW_Type_LAYOUT_SLIDER, + Left_Bright_Icon, + Right_Bright_Icon, value, NULL, + NULL, + setting_powersaving_birghtness_bright_slider_value_change_cb); + + if (ad->data_br_sli) { + __BACK_POINTER_SET(ad->data_br_sli); + + ad->data_br_sli->win_main = ad->win_main_layout; + ad->data_br_sli->evas = ad->evas; + ad->data_br_sli->isIndicatorVisible = true; + ad->data_br_sli->slider_min = 1; + ad->data_br_sli->slider_max = 100; + ad->data_br_sli->userdata = ad; + + } else { + SETTING_TRACE_ERROR("ad->data_br_sli is NULL"); + } + + if (auto_value) { + setting_disable_genlist_item(ad->data_br_sli->item); + } + + setting_view_powersaving_brightness.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_brightness_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + elm_naviframe_item_pop(ad->navi_bar); + + setting_view_powersaving_brightness.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_brightness_update(void *cb) +{ + SETTING_TRACE_BEGIN; + return SETTING_RETURN_SUCCESS; + +} + +static int setting_powersaving_brightness_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + setting_powersaving_brightness_destroy(cb); + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_powersaving_brightness_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + + setting_view_change(&setting_view_powersaving_brightness, + &setting_view_powersaving_customed, ad); +} + +static void +setting_powersaving_brightness_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingPowersavingUG *ad = list_item->userdata; + list_item->chk_status = elm_check_state_get(obj);/* for genlist update status */ + + int err; + // enable /disable toggle button + if (list_item->chk_status) { + setting_disable_genlist_item(ad->data_br_sli->item); + } else { + setting_enable_genlist_item(ad->data_br_sli->item); + } + + err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_AUTO_STATUS, + list_item->chk_status); + + return; +} + +/** + *[UI] 'Automatic' toggle + */ +static void setting_powersaving_brightness_mouse_up_Gendial_list_cb(void *data, + Evas_Object + *obj, + void + *event_info) +{ + /* error check */ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + retm_if(data == NULL, "Invalid argument: data is NULL"); + SettingPowersavingUG *ad = data; + + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + int old_status = elm_check_state_get(list_item->eo_check); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + int err; + + if (0 == safeStrCmp("IDS_COM_BODY_AUTOMATIC", list_item->keyStr)) { + err = + vconf_set_bool + (VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_AUTO_STATUS, + list_item->chk_status); + if (err < 0) { + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + + if (list_item->chk_status) { + setting_disable_genlist_item(ad->data_br_sli->item); + } else { + setting_enable_genlist_item(ad->data_br_sli->item); + } + } +} + +static void +setting_powersaving_birghtness_bright_slider_value_change_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + int value = 0; + SettingPowersavingUG *ad = NULL; + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + ad = list_item->userdata; + + value = elm_check_state_get(ad->data_br_auto->eo_check); + if (value == 1) { /* it is automatic setting mode, */ + /* do nothing */ + return; + } + + double val = elm_slider_value_get(obj); + value = (int)(val + 0.5); + SETTING_TRACE("value:%d", value); + + int ret = + vconf_set_int(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_VALUE, value); + if (ret < 0) //rollback + { + elm_check_state_set(ad->data_br_auto->eo_check, + ad->data_br_sli->chk_status); + return; + } + ad->data_br_sli->chk_status = value; +} diff --git a/setting-powersaving/src/setting-powersaving-customed.c b/setting-powersaving/src/setting-powersaving-customed.c new file mode 100755 index 0000000..517edf0 --- /dev/null +++ b/setting-powersaving/src/setting-powersaving-customed.c @@ -0,0 +1,455 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#include + +static int setting_powersaving_customed_create(void *cb); +static int setting_powersaving_customed_destroy(void *cb); +static int setting_powersaving_customed_update(void *cb); +static int setting_powersaving_customed_cleanup(void *cb); + +setting_view setting_view_powersaving_customed = { + .create = setting_powersaving_customed_create, + .destroy = setting_powersaving_customed_destroy, + .update = setting_powersaving_customed_update, + .cleanup = setting_powersaving_customed_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_powersaving_customed_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + + Evas_Object *scroller = NULL; + + /* add basic layout */ + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_Powersaving_Customed), + _("IDS_COM_BODY_BACK"), + NULL, + setting_powersaving_customed_click_softkey_cancel_cb, + NULL, ad, &scroller, ad->navi_bar); + Elm_Object_Item *item = NULL; + /* add separator */ + item = elm_genlist_item_append(scroller, &itc_seperator, + NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + char *str_value = NULL; +#if SUPPORT_UI0_3 + setting_enable_expandable_genlist(scroller, ad, setting_powersaving_ug_exp_cb,NULL); + str_value = get_pa_powersaving_at_str(); + ad->data_saving_at = + setting_create_Gendial_exp_parent_field(scroller, + &itc_2text_3_parent, + NULL, NULL, + SWALLOW_Type_INVALID, + KeyStr_Powersaving_AT, + str_value); + + if (ad->data_saving_at) { + ad->data_saving_at->int_slp_setting_binded = + INT_SLP_SETTING_POWERSAVING_AT; + } else { + SETTING_TRACE_ERROR("ad->data_back is NULL"); + } + __BACK_POINTER_SET(ad->data_saving_at); + G_FREE(str_value); +#endif + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION, + NULL, NULL, 0, + "Turn off each settings when it is not in use.", + NULL, NULL); + + int ret; + int value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_WIFI, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + + + ad->data_wifi_off = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon_2, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1CHECK, + NULL, NULL, value, + KeyStr_WIFI_Off, + NULL, + setting_powersaving_customed_use_chk_btn_cb); + if (ad->data_wifi_off) { + __BACK_POINTER_SET(ad->data_wifi_off); + ad->data_wifi_off->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_tilt is NULL"); + } + + value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BT, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + + ad->data_bt_off = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon_2, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1CHECK, + NULL, NULL, value, + KeyStr_BT_Off, NULL, + setting_powersaving_customed_use_chk_btn_cb); + if (ad->data_bt_off) { + __BACK_POINTER_SET(ad->data_bt_off); + ad->data_bt_off->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_tilt is NULL"); + } + + value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_GPS, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + + ad->data_gps_off = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon_2, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1CHECK, + NULL, NULL, value, + KeyStr_GPS_Off, + NULL, + setting_powersaving_customed_use_chk_btn_cb); + if (ad->data_gps_off) { + __BACK_POINTER_SET(ad->data_gps_off); + ad->data_gps_off->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_tilt is NULL"); + } + value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DATASYNC, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + + ad->data_sync_off = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon_2, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1CHECK, + NULL, NULL, value, + KeyStr_SYNC_Off, + NULL, + setting_powersaving_customed_use_chk_btn_cb); + if (ad->data_sync_off) { + __BACK_POINTER_SET(ad->data_sync_off); + ad->data_sync_off->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_tilt is NULL"); + } + + value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_HOTSPOT, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + + ad->data_hotspot_off = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon_2, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1CHECK, + NULL, NULL, value, + KeyStr_HOTSPOT_Off, + NULL, + setting_powersaving_customed_use_chk_btn_cb); + if (ad->data_hotspot_off) { + __BACK_POINTER_SET(ad->data_hotspot_off); + ad->data_hotspot_off->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_tilt is NULL"); + } + + /* add separator */ + item = elm_genlist_item_append(scroller, &itc_seperator, + NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* ADJUST BRIGHTNESS */ + int adjust_value; + value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_STATUS, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + adjust_value = value; + + ad->data_adjust_bright = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, NULL, value, + KeyStr_Adjust_Bright, + NULL, + setting_powersaving_customed_use_chk_btn_cb); + if (ad->data_adjust_bright) { + __BACK_POINTER_SET(ad->data_adjust_bright); + ad->data_adjust_bright->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_use_tilt is NULL"); + } + + + /* BRIGHTNESS */ + str_value = setting_powersaving_ug_get_brightness_str(); + ad->data_brightness = + setting_create_Gendial_field_def(scroller, &itc_2text_3, + setting_powersaving_customed_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, KeyStr_Brightness, + str_value, NULL); + if (ad->data_brightness) { + ad->data_brightness->userdata = ad; + __BACK_POINTER_SET(ad->data_screen_timeout); + } else { + SETTING_TRACE_ERROR("ad->data_br is NULL"); + } + G_FREE(str_value); + + + /* add separator */ + item = elm_genlist_item_append(scroller, &itc_seperator, + NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + + /* BACKLIGHT */ + str_value = get_pa_screen_timeout_str(); + ad->data_screen_timeout = + setting_create_Gendial_exp_parent_field(scroller, + &itc_2text_3_parent, + NULL, NULL, + SWALLOW_Type_INVALID, + KeyStr_Screen_Timeout, + str_value); + + if (ad->data_screen_timeout) { + ad->data_screen_timeout->int_slp_setting_binded = + INT_SLP_SETTING_POWERSAVING_SCREEN_TIMEOUT; + } else { + SETTING_TRACE_ERROR("ad->data_back is NULL"); + } + __BACK_POINTER_SET(ad->data_screen_timeout); + G_FREE(str_value); + + if (!adjust_value && ad->data_brightness) { + setting_disable_genlist_item(ad->data_brightness->item); + } + + setting_view_powersaving_customed.is_create = 1; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_customed_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + elm_naviframe_item_pop(ad->navi_bar); + + setting_view_powersaving_customed.is_create = 0; + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_customed_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + if (ad->data_brightness) + { + ad->data_brightness->sub_desc = setting_powersaving_ug_get_brightness_str(); + elm_object_item_data_set(ad->data_brightness->item, ad->data_brightness); + elm_genlist_item_update(ad->data_brightness->item); + } + return SETTING_RETURN_SUCCESS; + +} + +static int setting_powersaving_customed_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + setting_powersaving_customed_destroy(cb); + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_powersaving_customed_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + + setting_view_change(&setting_view_powersaving_customed, + &setting_view_powersaving_main, ad); + +} + +static void setting_powersaving_customed_mouse_up_Gendial_list_cb(void *data, + Evas_Object * + obj, void + *event_info) +{ + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if (!safeStrCmp(KeyStr_Brightness, list_item->keyStr)) { + setting_view_change(&setting_view_powersaving_customed, + &setting_view_powersaving_brightness, ad); + return; + } + + const char *vconf = NULL; + if (!safeStrCmp(KeyStr_WIFI_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_WIFI; + } else if (!safeStrCmp(KeyStr_BT_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BT; + } else if (!safeStrCmp(KeyStr_GPS_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_GPS; + } else if (!safeStrCmp(KeyStr_SYNC_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DATASYNC; + } else if (!safeStrCmp(KeyStr_HOTSPOT_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_HOTSPOT; + } else if (!safeStrCmp(KeyStr_Adjust_Bright, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_STATUS; + } + int old_status = elm_check_state_get(list_item->eo_check); + int ret = vconf_set_bool(vconf, !old_status); + setting_retm_if(0 != ret, "Failed to set vconf [%s]", vconf); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + if (!safeStrCmp(KeyStr_Adjust_Bright, list_item->keyStr) && ad->data_brightness) { + if (0 == list_item->chk_status) { + setting_disable_genlist_item(ad->data_brightness->item); + } else { + setting_enable_genlist_item(ad->data_brightness->item); + } + } + + return; +} + +static void +setting_powersaving_customed_use_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingPowersavingUG *ad = list_item->userdata; + + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + + const char *vconf = NULL; + if (!safeStrCmp(KeyStr_WIFI_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_WIFI; + } else if (!safeStrCmp(KeyStr_BT_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BT; + } else if (!safeStrCmp(KeyStr_GPS_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_GPS; + } else if (!safeStrCmp(KeyStr_SYNC_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DATASYNC; + } else if (!safeStrCmp(KeyStr_HOTSPOT_Off, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_HOTSPOT; + } else if (!safeStrCmp(KeyStr_Adjust_Bright, list_item->keyStr)) { + vconf = VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_STATUS; + } + + int err = vconf_set_bool(vconf, list_item->chk_status); + if (0 != err) { /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + } + if (!safeStrCmp(KeyStr_Adjust_Bright, list_item->keyStr) && ad->data_brightness) { + if (0 == list_item->chk_status) { + setting_disable_genlist_item(ad->data_brightness->item); + } else { + setting_enable_genlist_item(ad->data_brightness->item); + } + } + + return; +} diff --git a/setting-powersaving/src/setting-powersaving-main.c b/setting-powersaving/src/setting-powersaving-main.c new file mode 100755 index 0000000..5ade847 --- /dev/null +++ b/setting-powersaving/src/setting-powersaving-main.c @@ -0,0 +1,882 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#include +//#include +#include + +static int setting_powersaving_main_create(void *cb); +static int setting_powersaving_main_destroy(void *cb); +static int setting_powersaving_main_update(void *cb); +static int setting_powersaving_main_cleanup(void *cb); +static void setting_powersaving_view_disable(void *data, bool disable); + +setting_view setting_view_powersaving_main = { + .create = setting_powersaving_main_create, + .destroy = setting_powersaving_main_destroy, + .update = setting_powersaving_main_update, + .cleanup = setting_powersaving_main_cleanup, +}; + +static void __setting_powersaving_main_vconf_change_cb(keynode_t *key, void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == key, "key is NULL"); + setting_retm_if(NULL == data, "data is NULL"); + SettingPowersavingUG *ad = (SettingPowersavingUG *)data; + + int status = vconf_keynode_get_bool(key); + char *vconf_name = vconf_keynode_get_name(key); + + if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS)) { + SETTING_TRACE("status:%d", status); + setting_powersaving_view_disable(ad, !status); + ad->data_powersaving_active->chk_status = status; + elm_check_state_set(ad->data_powersaving_active->eo_check, ad->data_powersaving_active->chk_status); + int ret = 0; + if (status) {//powersaving is on + int pwrsv_vib = 0; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, &pwrsv_vib); + setting_retm_if(ret != 0, "get vconf failed"); + if (pwrsv_vib){ + //touch feedback virbration + int value = 0; + ret = vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &value); + setting_retm_if(ret != 0, "get vconf failed"); + ret = vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, value);//backup + setting_retm_if(ret != 0, "set vconf failed"); + ret = vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, 0); + setting_retm_if(ret != 0, "set vconf failed"); + } + } else {//powersaving is off + //touch feedback virbration + int value = 0; + ret = vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, &value); + setting_retm_if(ret != 0, "get vconf failed"); + ret = vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, value); + setting_retm_if(ret != 0, "set vconf failed"); + } + + } else { + SETTING_TRACE_ERROR("vconf_name is wrong"); + } +} + + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static int setting_powersaving_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + Evas_Object *scroller = NULL; + + /* add basic layout */ + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_Powersaving), + _("IDS_COM_BODY_BACK"), NULL, + setting_powersaving_main_click_softkey_back_cb, + NULL, ad, &scroller, + &(ad->navi_bar)); + Elm_Object_Item *item = NULL;; + /* add separator */ + item = elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* Powersaving Mode Activation */ + int ret; + int value = 1; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + int active_value = value; + + ad->data_powersaving_active = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, + NULL, + value, + KeyStr_Powersaving_Mode, + NULL, + setting_powersaving_main_motion_active_chk_btn_cb); + if (ad->data_powersaving_active) { + __BACK_POINTER_SET(ad->data_powersaving_active); + ad->data_powersaving_active->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_powersaving_active is NULL"); + } +#if SUPPORT_UI0_4 + (void)setting_create_Gendial_field_titleItem(scroller, + &itc_group_item, + KeyStr_PS_SETTINGS, + NULL); + //A. + value = 0; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + ad->data_cpu_ps = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, + NULL, + value, + KeyStr_CPU_PS, + NULL, + setting_powersaving_main_motion_active_chk_btn_cb); + if (ad->data_cpu_ps) { + __BACK_POINTER_SET(ad->data_cpu_ps); + ad->data_cpu_ps->userdata = ad; + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + KeyStr_CPU_PS_DSC, NULL, + NULL); + //B. + value = 0; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DISPLAY, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + ad->data_display_ps = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, + NULL, + value, + KeyStr_DISPLAY_PS, + NULL, + setting_powersaving_main_motion_active_chk_btn_cb); + if (ad->data_display_ps) { + __BACK_POINTER_SET(ad->data_display_ps); + ad->data_display_ps->userdata = ad; + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + KeyStr_DISPLAY_PS_DSC, NULL, + NULL); + //C. + value = 0; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BG_COLOR, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + ad->data_bg_color = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, + NULL, + value, + KeyStr_BG_COLOR, + NULL, + setting_powersaving_main_motion_active_chk_btn_cb); + if (ad->data_bg_color) { + __BACK_POINTER_SET(ad->data_bg_color); + ad->data_bg_color->userdata = ad; + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + KeyStr_BG_COLOR_DSC, NULL, + NULL); + //D. + value = 0; + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + ad->data_screen_vib = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, + NULL, + value, + KeyStr_SCREEN_VIB, + NULL, + setting_powersaving_main_motion_active_chk_btn_cb); + if (ad->data_screen_vib) { + __BACK_POINTER_SET(ad->data_screen_vib); + ad->data_screen_vib->userdata = ad; + } + + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + KeyStr_SCREEN_VIB_DSC, NULL, + NULL); + /****Powersaving Tips*/ + (void)setting_create_Gendial_field_titleItem(scroller, + &itc_group_item, + KeyStr_Powersaving_Tips, + NULL); + + /****Customed Setting*/ + ad->data_powersaving_about = + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, KeyStr_Powersaving_About, + NULL, NULL); + __BACK_POINTER_SET(ad->data_powersaving_about); + + item = elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + setting_powersaving_view_disable(ad, !active_value); +#else +#if SUPPORT_UI0_3 + /****Powersaving Mode description*/ + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION, + NULL, NULL, 0, + KeyStr_Powersaving_Mode_DSC, NULL, + NULL); + /****customed Setting Mode active*/ + ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_STATUS, &value); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + bool customed_flag = (bool) value; + ad->data_customed_active = setting_create_Gendial_field_def(scroller, + &itc_1text_1icon, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, + SWALLOW_Type_1TOGGLE, + NULL, NULL, + value, + KeyStr_Powersaving_Customed_Mode, + NULL, + setting_powersaving_main_motion_active_chk_btn_cb); + if (ad->data_customed_active) { + __BACK_POINTER_SET(ad->data_customed_active); + ad->data_customed_active->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_powersaving_active is NULL"); + } +#else + setting_enable_expandable_genlist(scroller, ad, setting_powersaving_ug_exp_cb,NULL); + char *str_value = get_pa_powersaving_at_str(); + ad->data_saving_at = + setting_create_Gendial_exp_parent_field(scroller, + &itc_2text_3_parent, + NULL, NULL, + SWALLOW_Type_INVALID, + KeyStr_Powersaving_AT, + str_value); + + if (ad->data_saving_at) { + ad->data_saving_at->int_slp_setting_binded = + INT_SLP_SETTING_POWERSAVING_AT; + } else { + SETTING_TRACE_ERROR("ad->data_back is NULL"); + } + __BACK_POINTER_SET(ad->data_saving_at); + G_FREE(str_value); +#endif + /****Customed Setting*/ + ad->data_customed_setting = + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, + KeyStr_Powersaving_Customed, NULL, + NULL); + __BACK_POINTER_SET(ad->data_customed_setting); + + /* Powersaving and battery level Description */ + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, + KeyStr_Powersaving_Level_DSC, NULL, + NULL); + + /****Powersaving Tips*/ + (void)setting_create_Gendial_field_titleItem(scroller, + &itc_group_item, + KeyStr_Powersaving_Tips, + NULL); + + /****Customed Setting*/ + ad->data_powersaving_about = + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_powersaving_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, KeyStr_Powersaving_About, + NULL, NULL); + __BACK_POINTER_SET(ad->data_powersaving_about); +#if SUPPORT_UI0_3 + if (!customed_flag && ad->data_customed_setting) { + setting_disable_genlist_item(ad->data_customed_setting->item); + } +#else + if (!active_value) + { + if (ad->data_saving_at) { + setting_disable_genlist_item(ad->data_saving_at->item); + } + + if (ad->data_customed_setting) { + setting_disable_genlist_item(ad->data_customed_setting->item); + } + } +#endif +#endif + + ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, + __setting_powersaving_main_vconf_change_cb, ad); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_notify_key_changed failed"); + } + + setting_view_powersaving_main.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + + +static int setting_powersaving_main_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) cb; + + int ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, + __setting_powersaving_main_vconf_change_cb); + if (ret != 0) { + SETTING_TRACE_ERROR("call vconf_ignore_key_changed failed"); + } + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + setting_view_powersaving_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + return SETTING_RETURN_SUCCESS; +} + +static int setting_powersaving_main_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +#define NEVER_SHOW_AGAIN "Never show again" +#define POWERSAVING_REMINDER "Battery life extended but performance restricted, brightness low. Tap Power saving tips for more details" + +static void +__powersaving_on_resp_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(NULL == data, "NULL == data"); + int response_type = btn_type(obj); + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + if (POPUP_RESPONSE_OK == response_type) { //need set vconf + int err = + vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, + ad->data_powersaving_active->chk_status); + if (0 != err) { //if set failed, need rollback + SETTING_TRACE_ERROR("Set vconf Failed"); + if (ad->data_powersaving_active) { + ad->data_powersaving_active->chk_status = + !ad->data_powersaving_active->chk_status; + elm_check_state_set(ad-> + data_powersaving_active-> + eo_check, + ad-> + data_powersaving_active-> + chk_status); + } + return; + } + if (ad->data_powersaving_active->chk_status) {//powersaving is on + int pwrsv_vib = 0; + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, &pwrsv_vib); + if (pwrsv_vib){ + //touch feedback virbration + int value = 0; + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, value);//backup + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, 0); + } + } else {//powersaving is off + //touch feedback virbration + int value = 0; + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, value); + } + + if (ad->popup_chk && elm_check_state_get(ad->popup_chk)) { + (void) + vconf_set_bool + (VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS_REMINDER, + FALSE); + } + + } else if (POPUP_RESPONSE_CANCEL == response_type) { //need rollback + if (ad->data_powersaving_active) { + ad->data_powersaving_active->chk_status = + !ad->data_powersaving_active->chk_status; + elm_check_state_set(ad->data_powersaving_active-> + eo_check, + ad->data_powersaving_active-> + chk_status); + if (ad->data_saving_at) { + setting_disable_genlist_item(ad->data_saving_at->item); + } + if (ad->data_customed_setting) { + setting_disable_genlist_item(ad->data_customed_setting->item); + } + if (ad->data_cpu_ps) { + setting_disable_genlist_item(ad->data_cpu_ps->item); + } + if (ad->data_display_ps) { + setting_disable_genlist_item(ad->data_display_ps->item); + } + if (ad->data_bg_color) { + setting_disable_genlist_item(ad->data_bg_color->item); + } + if (ad->data_screen_vib) { + setting_disable_genlist_item(ad->data_screen_vib->item); + } + } + } + + evas_object_del(ad->popup); + ad->popup = NULL; + ad->popup_chk = NULL; +} + +static void +setting_powersaving_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if (!safeStrCmp(KeyStr_Powersaving_Mode, list_item->keyStr)) { + list_item->chk_status = + !elm_check_state_get(list_item->eo_check); + elm_check_state_set(list_item->eo_check, list_item->chk_status); + + setting_powersaving_view_disable(ad, !list_item->chk_status); + + int reminder_flag = TRUE; + int ret = + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS_REMINDER, + &reminder_flag); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + SETTING_TRACE("reminder_flag:%d", reminder_flag); + if (list_item->chk_status && reminder_flag) { + ad->popup = + setting_create_popup_with_check(ad, ad->win_get, + NULL, + _(POWERSAVING_REMINDER), + _(NEVER_SHOW_AGAIN), + &(ad->popup_chk), + __powersaving_on_resp_cb, + 0, + 2, _("IDS_COM_SK_OK"), + _("IDS_COM_SK_CANCEL")); + return; + } + ret = + vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, list_item->chk_status); + if (0 != ret) { /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(list_item->eo_check, + list_item->chk_status); + return; + } + if (list_item->chk_status) {//powersaving is on + int pwrsv_vib = 0; + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, &pwrsv_vib); + if (pwrsv_vib){ + //touch feedback virbration + int value = 0; + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, value);//backup + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, 0); + } + } else {//powersaving is off + //touch feedback virbration + int value = 0; + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, value); + } + + } + else if (!safeStrCmp(KeyStr_Powersaving_Customed_Mode, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + int ret = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_STATUS, !old_status); + setting_retm_if(0 != ret, "Failed to set vconf [%s]", + VCONFKEY_SETAPPL_PWRSV_CUSTMODE_STATUS); + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + if (0 == list_item->chk_status) { + //not active + if (ad->data_customed_setting) { + setting_disable_genlist_item(ad->data_customed_setting->item); + } + } else { + //Powersavings actived + if (ad->data_customed_setting) { + setting_enable_genlist_item(ad->data_customed_setting->item); + } + } + } + else if (!safeStrCmp(KeyStr_Powersaving_Customed, list_item->keyStr)) { + setting_view_change(&setting_view_powersaving_main, + &setting_view_powersaving_customed, ad); + } else if (!safeStrCmp(KeyStr_Powersaving_About, list_item->keyStr)) { + setting_view_change(&setting_view_powersaving_main, + &setting_view_powersaving_about, ad); + } + else if(!safeStrCmp(KeyStr_CPU_PS, list_item->keyStr)) + { + list_item->chk_status = + !elm_check_state_get(list_item->eo_check); + elm_check_state_set(list_item->eo_check, list_item->chk_status); + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + } + else if(!safeStrCmp(KeyStr_DISPLAY_PS, list_item->keyStr)) + { + list_item->chk_status = + !elm_check_state_get(list_item->eo_check); + elm_check_state_set(list_item->eo_check, list_item->chk_status); + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DISPLAY, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + } + else if(!safeStrCmp(KeyStr_BG_COLOR, list_item->keyStr)) + { + list_item->chk_status = + !elm_check_state_get(list_item->eo_check); + elm_check_state_set(list_item->eo_check, list_item->chk_status); + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BG_COLOR, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + } + else if(!safeStrCmp(KeyStr_SCREEN_VIB, list_item->keyStr)) + { + list_item->chk_status = + !elm_check_state_get(list_item->eo_check); + elm_check_state_set(list_item->eo_check, list_item->chk_status); + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + + //take it into effect + int value = 0; + if (list_item->chk_status){ + //touch feedback virbration + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, value);//backup + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, 0); + } else { + //touch feedback virbration + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, value); + } + } +} + +static void +setting_powersaving_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, + "[Setting > Powersaving] Data parameter is NULL"); + + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + + /* Send destroy request */ + ug_destroy_me(ad->ug); + SETTING_TRACE_END; + +} + +static void +setting_powersaving_main_motion_active_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + SettingPowersavingUG *ad = list_item->userdata; + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + if (!safeStrCmp(KeyStr_Powersaving_Mode, list_item->keyStr)) { + setting_powersaving_view_disable(ad, !list_item->chk_status); + int reminder_flag = TRUE; + int ret = + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS_REMINDER, + &reminder_flag); + if (0 != ret) { + SETTING_TRACE_ERROR("Failed to get vconf value"); + } + SETTING_TRACE("reminder_flag:%d", reminder_flag); + if (list_item->chk_status && reminder_flag) { + ad->popup = + setting_create_popup_with_check(ad, ad->win_get, + NULL, + _(POWERSAVING_REMINDER), + _(NEVER_SHOW_AGAIN), + &(ad->popup_chk), + __powersaving_on_resp_cb, + 0, + 2, _("IDS_COM_SK_OK"), + _("IDS_COM_SK_CANCEL")); + return; + } + + ret = + vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, + list_item->chk_status); + if (0 != ret) { /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + if (list_item->chk_status) {//powersaving is on + int pwrsv_vib = 0; + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, &pwrsv_vib); + if (pwrsv_vib){ + //touch feedback virbration + int value = 0; + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, value);//backup + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, 0); + } + } else {//powersaving is off + //touch feedback virbration + int value = 0; + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, value); + } + } + else if(!safeStrCmp(KeyStr_Powersaving_Customed_Mode, list_item->keyStr)) + { + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_STATUS, + list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + if (0 == list_item->chk_status) { + //not active + if (ad->data_customed_setting) + { + setting_disable_genlist_item(ad->data_customed_setting->item); + } + } else { + //Powersavings actived + if (ad->data_customed_setting) { + setting_enable_genlist_item(ad->data_customed_setting->item); + } + } + } + else if(!safeStrCmp(KeyStr_CPU_PS, list_item->keyStr)) + { + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + } + else if(!safeStrCmp(KeyStr_DISPLAY_PS, list_item->keyStr)) + { + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DISPLAY, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + } + else if(!safeStrCmp(KeyStr_BG_COLOR, list_item->keyStr)) + { + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BG_COLOR, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + if (list_item->chk_status) + { + //device_set_acl_control_status(DEV_MAIN_DISPLAY, 1);//it doen't work + #if 0 //it doen't work + int cmd = (DISPLAY_PROP_ACL_CONTROL | (DEV_DISPLAY_0 << 4)); + device_set_property(DEVTYPE_DISPLAY0, cmd, 2); + cmd = (DISPLAY_PROP_ACL_CONTROL | (DEV_DISPLAY_1 << 4)); + device_set_property(DEVTYPE_DISPLAY0, cmd, 2); + #endif + } + } + else if(!safeStrCmp(KeyStr_SCREEN_VIB, list_item->keyStr)) + { + int err = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, list_item->chk_status); + if (0 != err) { + /* rollback */ + SETTING_TRACE_ERROR("Set vconf Failed"); + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + return; + } + + //take it into effect + int value = 0; + if (list_item->chk_status){ + //touch feedback virbration + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, value);//backup + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, 0); + } else { + //touch feedback virbration + vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, &value); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, value); + } + } + + + return; +} +static void setting_powersaving_view_disable(void *data, bool disable) +{ + SETTING_TRACE_BEGIN; + /* error check */ + ret_if(data == NULL); + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + if (disable) + { + if (ad->data_cpu_ps) setting_disable_genlist_item(ad->data_cpu_ps->item); + if (ad->data_display_ps) setting_disable_genlist_item(ad->data_display_ps->item); + if (ad->data_bg_color) setting_disable_genlist_item(ad->data_bg_color->item); + if (ad->data_screen_vib) setting_disable_genlist_item(ad->data_screen_vib->item); + } + else + { + if (ad->data_cpu_ps) setting_enable_genlist_item(ad->data_cpu_ps->item); + if (ad->data_display_ps) setting_enable_genlist_item(ad->data_display_ps->item); + if (ad->data_bg_color) setting_enable_genlist_item(ad->data_bg_color->item); + if (ad->data_screen_vib) setting_enable_genlist_item(ad->data_screen_vib->item); + } +} + diff --git a/setting-powersaving/src/setting-powersaving.c b/setting-powersaving/src/setting-powersaving.c new file mode 100755 index 0000000..5698b84 --- /dev/null +++ b/setting-powersaving/src/setting-powersaving.c @@ -0,0 +1,344 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#include + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +static void setting_powersaving_ug_cb_resize(void *data, Evas *e, + Evas_Object *obj, + void *event_info) +{ + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + setting_view_update(&setting_view_powersaving_main, ad); +} + +static void *setting_powersaving_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if((!priv), NULL, "!priv"); + + SettingPowersavingUG *powersavingUG = priv; + powersavingUG->ug = ug; + appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + + powersavingUG->win_main_layout = + (Evas_Object *) ug_get_parent_layout(ug); + powersavingUG->win_get = (Evas_Object *) ug_get_window(); + + evas_object_show(powersavingUG->win_main_layout); + powersavingUG->evas = + evas_object_evas_get(powersavingUG->win_main_layout); + + setting_retvm_if(powersavingUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + /* register view node table */ + setting_view_node_table_intialize(); /* do detail registering in __get_motion_view_to_load() */ + + /* creating a view. */ + setting_view_node_table_register(&setting_view_powersaving_main, NULL); + setting_view_node_table_register(&setting_view_powersaving_about, + &setting_view_powersaving_main); + setting_view_node_table_register(&setting_view_powersaving_customed, + &setting_view_powersaving_main); + setting_view_node_table_register(&setting_view_powersaving_brightness, + &setting_view_powersaving_customed); + + setting_view_node_set_cur_view(&setting_view_powersaving_main); + setting_view_create(&setting_view_powersaving_main, + (void *)powersavingUG); + evas_object_event_callback_add(powersavingUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_powersaving_ug_cb_resize, + powersavingUG); + return powersavingUG->ly_main; +} + +static void setting_powersaving_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_powersaving_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_powersaving_ug_on_resume(ui_gadget_h ug, + service_h service, void *priv) +{ +} + +static void setting_powersaving_ug_on_destroy(ui_gadget_h ug, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingPowersavingUG *powersavingUG = priv; + + evas_object_event_callback_del(powersavingUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_powersaving_ug_cb_resize); /* fix flash issue for gallery */ + powersavingUG->ug = ug; + /* called when this shared gadget is terminated. similar with app_exit */ + setting_view_destroy(&setting_view_powersaving_brightness, + powersavingUG); + setting_view_destroy(&setting_view_powersaving_customed, powersavingUG); + setting_view_destroy(&setting_view_powersaving_about, powersavingUG); + setting_view_destroy(&setting_view_powersaving_main, powersavingUG); + + if (NULL != ug_get_layout(powersavingUG->ug)) { + evas_object_hide((Evas_Object *) + ug_get_layout(powersavingUG->ug)); + evas_object_del((Evas_Object *) + ug_get_layout(powersavingUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_powersaving_ug_on_message(ui_gadget_h ug, + service_h msg, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_powersaving_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + switch (event) { + case UG_EVENT_LOW_MEMORY: + break; + case UG_EVENT_LOW_BATTERY: + break; + case UG_EVENT_LANG_CHANGE: + break; + case UG_EVENT_ROTATE_PORTRAIT: + break; + case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN: + break; + case UG_EVENT_ROTATE_LANDSCAPE: + break; + case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN: + break; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_powersaving_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + + switch (event) { + case UG_KEY_EVENT_END: + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingPowersavingUG *powersavingUG = + calloc(1, sizeof(SettingPowersavingUG)); + setting_retvm_if(!powersavingUG, -1, + "Create SettingPowersavingUG obj failed"); + + ops->create = setting_powersaving_ug_on_create; + ops->start = setting_powersaving_ug_on_start; + ops->pause = setting_powersaving_ug_on_pause; + ops->resume = setting_powersaving_ug_on_resume; + ops->destroy = setting_powersaving_ug_on_destroy; + ops->message = setting_powersaving_ug_on_message; + ops->event = setting_powersaving_ug_on_event; + ops->key_event = setting_powersaving_ug_on_key_event; + ops->priv = powersavingUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingPowersavingUG *powersavingUG; + setting_retm_if(!ops, "ops == NULL"); + + powersavingUG = ops->priv; + if (powersavingUG) { + FREE(powersavingUG); + } +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +void setting_powersaving_ug_exp_cb(void *data, Evas_Object *obj, void *event_info) +{ + ret_if(NULL == data || NULL == event_info); + SETTING_TRACE_BEGIN; + SettingPowersavingUG *ad = (SettingPowersavingUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd; + if (data_parentItem == ad->data_saving_at) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 10, + SETTING_POWERSAVING_AT_10_STR, + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 20, + SETTING_POWERSAVING_AT_20_STR, + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 30, + SETTING_POWERSAVING_AT_30_STR, + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 40, + SETTING_POWERSAVING_AT_40_STR, + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + 50, + SETTING_POWERSAVING_AT_50_STR, + NULL); + setting_update_chk_status(rgd,data_parentItem->int_slp_setting_binded); + } + else if (data_parentItem == ad->data_screen_timeout) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_BACKLIGHT_TIME_8SEC, + "IDS_ST_BODY_8_SECONDS", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_BACKLIGHT_TIME_15SEC, + "IDS_ST_BODY_15SEC", NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_BACKLIGHT_TIME_30SEC, + "IDS_ST_BODY_30SEC", NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_BACKLIGHT_TIME_1MIN, + "IDS_COM_BODY_1_MINUTE", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_BACKLIGHT_TIME_3MIN, + "IDS_ST_BODY_3MINUTES", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &itc_1icon_1text_sub, + NULL, NULL, parentItem, + SWALLOW_Type_1RADIO, rgd, + SETTING_BACKLIGHT_TIME_10MIN, + "IDS_ST_BODY_10_MINUTES", + NULL); + + setting_update_chk_status(rgd,data_parentItem->int_slp_setting_binded); + } +} + +char *setting_powersaving_ug_get_brightness_str() +{ + int auto_value = 0; + int back_value = 10; + char str_back[MAX_DISPLAY_NAME_LEN_ON_UI + 1] = {0, }; + vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_AUTO_STATUS, &auto_value); //if failed, keep intial value + vconf_get_int(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BRT_VALUE, &back_value); //if failed, keep intial value + if (auto_value) + { + snprintf(str_back, MAX_DISPLAY_NAME_LEN_ON_UI, "%s", _("IDS_COM_BODY_AUTOMATIC")); + } + else + { + snprintf(str_back, MAX_DISPLAY_NAME_LEN_ON_UI, "%d%% %s", back_value, _(KeyStr_Brightness)); + } + return (char *)g_strdup(str_back); +} + + +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + + int ret = 0; + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "powersaving"); + return ret; +} diff --git a/setting-profile/CMakeLists.txt b/setting-profile/CMakeLists.txt index e34cfff..b494354 100755 --- a/setting-profile/CMakeLists.txt +++ b/setting-profile/CMakeLists.txt @@ -3,7 +3,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs_profile REQUIRED ecore ecore-file evas elementary appcore-common appcore-efl devman_haptic ui-gadget bundle vconf mm-player mm-sound dlog svi) +pkg_check_modules(pkgs_profile REQUIRED ecore ecore-file evas elementary appcore-common appcore-efl devman_haptic ui-gadget-1 capi-appfw-application vconf capi-media-player capi-media-sound-manager dlog svi) FOREACH(flag ${pkgs_profile_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") diff --git a/setting-profile/include/setting-profile-sound-main.h b/setting-profile/include/setting-profile-sound-main.h index 7de77b5..d008314 100755 --- a/setting-profile/include/setting-profile-sound-main.h +++ b/setting-profile/include/setting-profile-sound-main.h @@ -1,24 +1,30 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_PROFILE_SOUND_MAIN_H__ #define __SETTING_PROFILE_SOUND_MAIN_H__ #include +// Test comment by rndclub(jungbae.lee@samsung.com) 2012.06 + #define SETTING_SOUND_VIB_TYPE_LEN 5 #define SETTING_SOUND_REPEAT_TYPE_LEN 4 #define SETTING_SOUND_VOLUME_TIMER_INTERVAL 0.2 @@ -43,9 +49,9 @@ #define SETTING_SOUND_TEXT_CALL_RINGTONE "IDS_ST_BODY_INCOMING_CALL_RINGTONE" #define SETTING_SOUND_TEXT_CALL_VIBRATION "IDS_ST_BODY_INCOMING_CALL_VIBRATION" -#define SETTING_SOUND_TEXT_MSG_RINGTONE "IDS_ST_BODY_MESSAGE_RINGTONE" +#define SETTING_SOUND_TEXT_MSG_ALERT "IDS_ST_BODY_MESSAGE_ALERT" #define SETTING_SOUND_TEXT_MSG_RINGTONE_REPEAT "IDS_ST_BODY_MSG_ALERT_REPETITION" -#define SETTING_SOUND_TEXT_EMAIL_RINGTONE "IDS_ST_BODY_EMAIL_ALERT" +#define SETTING_SOUND_TEXT_EMAIL_ALERT "IDS_ST_BODY_EMAIL_ALERT" #define SETTING_SOUND_TEXT_EMAIL_RINGTONE_REPEAT "IDS_ST_BODY_EMAIL_ALERT_REPETITION" #define SETTING_SOUND_TEXT_LOCK_SOUND "IDS_ST_BODY_SCREEN_LOCK_SOUND" diff --git a/setting-profile/include/setting-profile.h b/setting-profile/include/setting-profile.h old mode 100644 new mode 100755 index 041cb95..fbdb8fe --- a/setting-profile/include/setting-profile.h +++ b/setting-profile/include/setting-profile.h @@ -1,18 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_PROFILE_H__ #define __SETTING_PROFILE_H__ @@ -20,17 +25,10 @@ #include #include -#include - #include -#include -#include -#include - -#include -#include -#include +#include +#include #include #include @@ -82,23 +80,25 @@ typedef enum { #define SETTING_DEFAULT_RINGTONE_PATH "/opt/share/settings/Ringtones/" #define SETTING_DEFAULT_ALERT_PATH "/opt/share/settings/Alerts/" +#define SETTING_DEFAULT_PREVIEW_PATH "/opt/share/settings/Previews/" #define SETTING_PROFILE_MMC_PATH "/opt/storage/sdcard/" -#define SETTING_DEFAULT_CALL_TONE SETTING_DEFAULT_RINGTONE_PATH"General_Over the horizon.mp3" -#define SETTING_DEFAULT_MSG_TONE SETTING_DEFAULT_CALL_TONE -#define SETTING_DEFAULT_EMAIL_TONE SETTING_DEFAULT_CALL_TONE -#define SETTING_DEFAULT_CALENDAR_TONE SETTING_DEFAULT_CALL_TONE +#define SETTING_DEFAULT_CALL_TONE SETTING_DEFAULT_RINGTONE_PATH"Over the horizon.mp3" +#define SETTING_DEFAULT_CALL_TONE_SDK SETTING_DEFAULT_RINGTONE_PATH"ringtone_sdk.mp3" +#define SETTING_DEFAULT_MSG_TONE SETTING_DEFAULT_ALERT_PATH"Whistle.mp3" +#define SETTING_DEFAULT_EMAIL_TONE SETTING_DEFAULT_MSG_TONE +#define SETTING_DEFAULT_MEDIA_TONE SETTING_DEFAULT_PREVIEW_PATH"Over the horizon.mp3" typedef struct _SettingProfileUG SettingProfileUG; /** * Setting Profile UG context - * all UG function has void* as an agument. this is casted back to SettingProfileUG + * all UG function has void* as an agument. this is casted back to SettingProfileUG * and the functions access app context. */ struct _SettingProfileUG { - struct ui_gadget *ug; - struct ui_gadget *ug_loading; + ui_gadget_h ug; + ui_gadget_h ug_loading; /* add more variables here (move your appdata to here) */ Evas *evas; @@ -106,7 +106,10 @@ struct _SettingProfileUG { Evas_Object *win_get; Evas_Object *navi_bar; Evas_Object *ctrl_bar; + Evas_Object *view_layout; Evas_Object *ly_main; + Evas_Object *sub_view[SETTING_PROF_VIEW_MAX]; + Elm_Object_Item *ctrl_item[SETTING_SOUND_CONTROLBAR_ITEM_LEN]; Elm_Genlist_Item_Class itc_1text_1icon; Elm_Genlist_Item_Class itc_group_item; @@ -127,10 +130,10 @@ struct _SettingProfileUG { Setting_GenGroupItem_Data *data_touch_vib; Setting_GenGroupItem_Data *data_media_volume; - MMHandleType *mp_ringtone; - MMHandleType *mp_noti; - MMHandleType *mp_sys; - MMHandleType *mp_media; + player_h *mp_ringtone; + player_h *mp_noti; + player_h *mp_sys; + player_h *mp_media; Ecore_Timer *volume_timer; setting_volume_types cur_vol_type; @@ -139,25 +142,35 @@ struct _SettingProfileUG { int playing_volume; char *song_playing; char *ringtone_type; + + /* Ringtone tab */ + Setting_GenGroupItem_Data *data_call_alert_tone; + Setting_GenGroupItem_Data *data_call_alert_vib; + Setting_GenGroupItem_Data *data_msg_alert_tone; + Setting_GenGroupItem_Data *data_email_alert_tone; + Setting_GenGroupItem_Data *data_msg_alert_repeat; + Setting_GenGroupItem_Data *data_email_alert_repeat; + Setting_GenGroupItem_Data *data_lock_sound; + Setting_GenGroupItem_Data *data_touch_sounds; + }; extern setting_view setting_view_profile_sound_main; -void setting_profile_play_sound_origin(MMHandleType **mp_handle, void *data, +void setting_profile_play_sound_origin(player_h **mp_handle, void *data, void *cb, char *ringtone_file, float vol, - enum MMSoftwareVolumeTableType table_type); -void setting_profile_change_player_volume(MMHandleType **mp_handle, void *data, float vol); - + sound_type_e sound_type); int setting_profile_check_file_exist(void *data, const char *file_path); -MMHandleType *setting_profile_play_sound(void *data, void *cb, - char *ringtone_file, - int vol, - enum MMSoftwareVolumeTableType table_type); +player_h *setting_profile_play_sound(void *data, void *cb, + char *ringtone_file, + int vol, + sound_type_e sound_type); -int setting_profile_stop_sound(void *data, MMHandleType *player); +int setting_profile_stop_sound(void *data, player_h *player); +void setting_profile_change_player_volume(player_h **mp_handle, float vol); int setting_profile_close_other_mm_players_but_type(void *data, - volume_type_t type); + sound_type_e type); int setting_profile_close_all_mm_players(void *data); void setting_profile_play_vibration(void *data, int value); diff --git a/setting-profile/src/setting-profile-sound-main.c b/setting-profile/src/setting-profile-sound-main.c old mode 100644 new mode 100755 index 8fd23a8..0108927 --- a/setting-profile/src/setting-profile-sound-main.c +++ b/setting-profile/src/setting-profile-sound-main.c @@ -1,23 +1,27 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ - - + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include -#include +#define VOLUME_STR _("IDS_ST_SK_VOLUME") +#define RINGTONE_STR _("IDS_COM_BODY_RINGTONES") #define SOUND_DESC "IDS_ST_BODY_ADJUST_VOLUME_AND_INTENSITY_FOR_SOUNDS_WHEN_MSG" @@ -26,6 +30,9 @@ static int setting_profile_sound_main_destroy(void *cb); static int setting_profile_sound_main_update(void *cb); static int setting_profile_sound_main_cleanup(void *cb); +static void setting_profile_layout_ug_cb(ui_gadget_h ug, + enum ug_mode mode, void *priv); + setting_view setting_view_profile_sound_main = { .create = setting_profile_sound_main_create, .destroy = setting_profile_sound_main_destroy, @@ -64,7 +71,8 @@ void __change_state_of_sliderbars(void *data) } } - if (vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vibration_on) == 0) { + if (vconf_get_bool + (VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vibration_on) == 0) { if (vibration_on == FALSE) { /* disable slider bar of notification and system vibration */ if (ad->data_vib_volume) { @@ -82,12 +90,13 @@ void __sound_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) /* error check */ retm_if(event_info == NULL, "Invalid argument: event info is NULL"); retm_if(data == NULL, "Invalid argument: data is NULL"); - + SettingProfileUG *ad = (SettingProfileUG *) data; Elm_Object_Item *subitem = (Elm_Object_Item *) event_info; Elm_Object_Item *parentItem = elm_genlist_item_parent_get(subitem); elm_genlist_item_selected_set(subitem, 0); - Setting_GenGroupItem_Data *data_subItem = elm_object_item_data_get(subitem); + Setting_GenGroupItem_Data *data_subItem = + elm_object_item_data_get(subitem); Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); if (NULL == data_subItem || NULL == data_parentItem) return; @@ -108,6 +117,7 @@ void __sound_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) INT_SLP_SETTING_CALL_ALERT_VIB) { if (device_haptic_stop_play(ad->hnd_hpt) != 0) { SETTING_TRACE("ERROR device_haptic_stop_play"); + /* return; */ } setting_profile_play_vibration(ad, setting_profile_get_call_playing_vib_by_vconf_value @@ -115,11 +125,101 @@ void __sound_sub_list_sel_cb(void *data, Evas_Object *obj, void *event_info) } } -static bool __mm_player_msg_cb(int message, MMMessageParamType *param, void *user_param) +static void __sound_exp_cb(void *data, Evas_Object *obj, void *event_info) +{ + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + retm_if(data == NULL, "Invalid argument: data is NULL"); + + SettingProfileUG *ad = (SettingProfileUG *) data; + Elm_Object_Item *parentItem = event_info; /* parent item */ + Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); /* parent data */ + Evas_Object *scroller = elm_object_item_widget_get(parentItem); + + Evas_Object *rgd; + if (data_parentItem == ad->data_call_alert_vib) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 0, + "IDS_ST_BODY_VIBRATION_1", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 1, + "IDS_ST_BODY_VIBRATION_2", + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 2, + "IDS_ST_BODY_VIBRATION_3", + NULL); + + setting_update_chk_status(rgd, + data_parentItem-> + int_slp_setting_binded); + + } else if (data_parentItem == ad->data_msg_alert_repeat + || data_parentItem == ad->data_email_alert_repeat) { + rgd = elm_radio_add(scroller); + elm_radio_value_set(rgd, -1); + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 0, + SETTING_SOUND_TEXT_REPEAT_ONCE, + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 1, + SETTING_SOUND_TEXT_REPEAT_2MIN, + NULL); + + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 2, + SETTING_SOUND_TEXT_REPEAT_5MIN, + NULL); + setting_create_Gendial_exp_sub_field(scroller, + &(ad->itc_1icon_1text_sub), + __sound_sub_list_sel_cb, + ad, parentItem, + SWALLOW_Type_1RADIO, rgd, + 3, + SETTING_SOUND_TEXT_REPEAT_10MIN, + NULL); + + setting_update_chk_status(rgd, + data_parentItem-> + int_slp_setting_binded); + } +} + +static void __mm_player_msg_cb(void *user_param) { - retv_if(user_param == NULL, FALSE); + ret_if(user_param == NULL); SettingProfileUG *ad = (SettingProfileUG *)user_param; - switch(message) + /*switch(message) { case MM_MESSAGE_END_OF_STREAM: SETTING_TRACE_DEBUG("End of Stream"); @@ -127,8 +227,11 @@ static bool __mm_player_msg_cb(int message, MMMessageParamType *param, void *use return TRUE; default: return FALSE; - } + }*/ + SETTING_TRACE("completed_cb is called."); + setting_profile_close_all_mm_players(ad); } + Eina_Bool __volume_timer_cb(void *data) { SETTING_TRACE_BEGIN; @@ -144,28 +247,32 @@ Eina_Bool __volume_timer_cb(void *data) if(ad->data_call_volume) { value = elm_slider_value_get(ad->data_call_volume->eo_check); - mm_sound_volume_set_value(VOLUME_TYPE_RINGTONE, (unsigned int)(value+0.5)); + sound_manager_set_volume(SOUND_TYPE_RINGTONE, (unsigned int)(value+0.5)); + setting_profile_change_player_volume(&ad->mp_ringtone, value); } break; case SETTING_VOL_TYPE_NOTIFICATION: if(ad->data_noti_volume) { value = elm_slider_value_get(ad->data_noti_volume->eo_check); - mm_sound_volume_set_value(VOLUME_TYPE_NOTIFICATION, (unsigned int)(value+0.5)); + sound_manager_set_volume(SOUND_TYPE_NOTIFICATION, (unsigned int)(value+0.5)); + setting_profile_change_player_volume(&ad->mp_noti, value); } break; case SETTING_VOL_TYPE_MEDIA: if(ad->data_media_volume) { value = elm_slider_value_get(ad->data_media_volume->eo_check); - mm_sound_volume_set_value(VOLUME_TYPE_MEDIA, (unsigned int)(value+0.5)); + sound_manager_set_volume(SOUND_TYPE_MEDIA, (unsigned int)(value+0.5)); + setting_profile_change_player_volume(&ad->mp_media, value); } break; case SETTING_VOL_TYPE_SYSTEM: if(ad->data_touch_volume) { value = elm_slider_value_get(ad->data_touch_volume->eo_check); - mm_sound_volume_set_value(VOLUME_TYPE_SYSTEM, (unsigned int)(value+0.5)); + sound_manager_set_volume(SOUND_TYPE_SYSTEM, (unsigned int)(value+0.5)); + setting_profile_change_player_volume(&ad->mp_sys, value); } break; case SETTING_VOL_TYPE_NOTI_VIB: @@ -180,6 +287,8 @@ Eina_Bool __volume_timer_cb(void *data) { value = elm_slider_value_get(ad->data_touch_vib->eo_check); vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, (unsigned int)(value+0.5)); + //It must change synchronizly to avoid the unexpected terminate issue + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, (unsigned int)(value+0.5)); } break; default: @@ -213,7 +322,7 @@ void __ringtone_start_change_cb(void *data, Evas_Object *obj, void *event_info) SettingProfileUG *ad = list_item->userdata; ad->cur_vol_type = SETTING_VOL_TYPE_RINGTONE; - setting_profile_close_other_mm_players_but_type(ad, VOLUME_TYPE_RINGTONE); + setting_profile_close_other_mm_players_but_type(ad, SOUND_TYPE_RINGTONE); } void __noti_start_change_cb(void *data, Evas_Object *obj, void *event_info) { @@ -223,7 +332,7 @@ void __noti_start_change_cb(void *data, Evas_Object *obj, void *event_info) SettingProfileUG *ad = list_item->userdata; ad->cur_vol_type = SETTING_VOL_TYPE_NOTIFICATION; - setting_profile_close_other_mm_players_but_type(ad, VOLUME_TYPE_NOTIFICATION); + setting_profile_close_other_mm_players_but_type(ad, SOUND_TYPE_NOTIFICATION); } void __media_start_change_cb(void *data, Evas_Object *obj, void *event_info) { @@ -233,7 +342,7 @@ void __media_start_change_cb(void *data, Evas_Object *obj, void *event_info) SettingProfileUG *ad = list_item->userdata; ad->cur_vol_type = SETTING_VOL_TYPE_MEDIA; - setting_profile_close_other_mm_players_but_type(ad, VOLUME_TYPE_MEDIA); + setting_profile_close_other_mm_players_but_type(ad, SOUND_TYPE_MEDIA); } void __system_start_change_cb(void *data, Evas_Object *obj, void *event_info) { @@ -243,7 +352,7 @@ void __system_start_change_cb(void *data, Evas_Object *obj, void *event_info) SettingProfileUG *ad = list_item->userdata; ad->cur_vol_type = SETTING_VOL_TYPE_SYSTEM; - setting_profile_close_other_mm_players_but_type(ad, VOLUME_TYPE_SYSTEM); + setting_profile_close_other_mm_players_but_type(ad, SOUND_TYPE_SYSTEM); } void __noti_vib_start_change_cb(void *data, Evas_Object *obj, void *event_info) @@ -256,9 +365,9 @@ void __noti_vib_start_change_cb(void *data, Evas_Object *obj, void *event_info) ad->cur_vol_type = SETTING_VOL_TYPE_NOTI_VIB; setting_profile_close_all_mm_players(ad); } - + void __haptic_vib_start_change_cb(void *data, Evas_Object *obj, void *event_info) -{ + { SETTING_TRACE_BEGIN; ret_if(data == NULL); @@ -277,33 +386,37 @@ void __volume_stop_change_cb(void *data, Evas_Object *obj, void *event_info) Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; SettingProfileUG *ad = list_item->userdata; - char *pa_tone_path = NULL; - MMHandleType **player = NULL; + char *pa_tone_path = NULL; + player_h **player = NULL; - double value = elm_slider_value_get(obj); + double value = elm_slider_value_get(obj); switch(ad->cur_vol_type) { case SETTING_VOL_TYPE_RINGTONE: - mm_sound_volume_set_value(VOLUME_TYPE_RINGTONE, (unsigned int)(value+0.5)); + sound_manager_set_volume(SOUND_TYPE_RINGTONE, (unsigned int)(value+0.5)); player = &(ad->mp_ringtone); if(*player != NULL) return; SETTING_TRACE_DEBUG("ringtone player will be created"); pa_tone_path = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR); if(pa_tone_path == NULL) - { - pa_tone_path = SETTING_DEFAULT_CALL_TONE; - if(vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, SETTING_DEFAULT_CALL_TONE) < 0) - return; - } + { + if(isEmulBin()) + pa_tone_path = SETTING_DEFAULT_CALL_TONE_SDK; + else + pa_tone_path = SETTING_DEFAULT_CALL_TONE; + + if(vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, pa_tone_path) < 0) + return; + } setting_profile_play_sound_origin(player, ad, __mm_player_msg_cb, - pa_tone_path, - (float)value, - MM_SOUND_VOLUME_TYPE_RINGTONE); + pa_tone_path, + (float)value, + SOUND_TYPE_RINGTONE); break; case SETTING_VOL_TYPE_NOTIFICATION: - mm_sound_volume_set_value(VOLUME_TYPE_NOTIFICATION, (unsigned int)(value+0.5)); + sound_manager_set_volume(SOUND_TYPE_NOTIFICATION, (unsigned int)(value+0.5)); player = &(ad->mp_noti); if(*player != NULL) return; @@ -316,47 +429,46 @@ void __volume_stop_change_cb(void *data, Evas_Object *obj, void *event_info) return; } setting_profile_play_sound_origin(player, ad, __mm_player_msg_cb, - pa_tone_path, - (float)value, - MM_SOUND_VOLUME_TYPE_NOTIFICATION); + pa_tone_path, + (float)value, + SOUND_TYPE_NOTIFICATION); break; case SETTING_VOL_TYPE_MEDIA: - mm_sound_volume_set_value(VOLUME_TYPE_MEDIA, (unsigned int)(value+0.5)); + sound_manager_set_volume(SOUND_TYPE_MEDIA, (unsigned int)(value+0.5)); player = &(ad->mp_media); if(*player != NULL) - return; + return; SETTING_TRACE_DEBUG("media player will be created"); - pa_tone_path = vconf_get_str(VCONFKEY_SETAPPL_MEDIA_TONE_PATH_STR); - if(pa_tone_path == NULL) - { - pa_tone_path = SETTING_DEFAULT_CALL_TONE; - if(vconf_set_str(VCONFKEY_SETAPPL_MEDIA_TONE_PATH_STR, SETTING_DEFAULT_CALL_TONE) < 0) - return; - } + if(isEmulBin()) + pa_tone_path = (char*)strdup(SETTING_DEFAULT_CALL_TONE_SDK); + else + pa_tone_path = (char*)strdup(SETTING_DEFAULT_MEDIA_TONE); + setting_profile_play_sound_origin(player, ad, __mm_player_msg_cb, - pa_tone_path, - (float)value, - MM_SOUND_VOLUME_TYPE_MEDIA); + pa_tone_path, + (float)value, + SOUND_TYPE_MEDIA); break; case SETTING_VOL_TYPE_SYSTEM: - mm_sound_volume_set_value(VOLUME_TYPE_SYSTEM, (unsigned int)(value+0.5)); + sound_manager_set_volume(SOUND_TYPE_SYSTEM, (unsigned int)(value+0.5)); player = &(ad->mp_sys); if(*player != NULL) return; SETTING_TRACE_DEBUG("ringtone player will be created"); char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,}; - svi_get_path(SVI_TYPE_SND, SVI_SND_OPERATION_VIBRATION, pattern_file, sizeof(pattern_file)); + svi_get_path(SVI_TYPE_SND, SVI_SND_TOUCH_TOUCH1, pattern_file, sizeof(pattern_file)); setting_profile_play_sound_origin(player, ad, __mm_player_msg_cb, - pattern_file, - (float)value, - MM_SOUND_VOLUME_TYPE_SYSTEM); + pattern_file, + (float)value, + SOUND_TYPE_SYSTEM); break; default: - return; + return; } - + __create_volume_timer(ad, ad->cur_vol_type); + FREE(pa_tone_path); SETTING_TRACE_END; @@ -382,6 +494,10 @@ void __vibration_stop_change_cb(void *data, Evas_Object *obj, void *event_info) { value = elm_slider_value_get(ad->data_vib_volume->eo_check); vconf_set_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, (unsigned int)(value+0.5)); + if(value < 0.5) + elm_slider_value_set(ad->data_vib_volume->eo_check, 0); + else + elm_slider_value_set(ad->data_vib_volume->eo_check, (unsigned int)(value+0.5)); } break; case SETTING_VOL_TYPE_HAPTIC_VIB: @@ -389,6 +505,11 @@ void __vibration_stop_change_cb(void *data, Evas_Object *obj, void *event_info) { value = elm_slider_value_get(ad->data_touch_vib->eo_check); vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, (unsigned int)(value+0.5)); + vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, (unsigned int)(value+0.5)); + if(value < 0.5) + elm_slider_value_set(ad->data_touch_vib->eo_check, 0); + else + elm_slider_value_set(ad->data_touch_vib->eo_check, (unsigned int)(value+0.5)); } break; default: @@ -401,25 +522,26 @@ void __vibration_stop_change_cb(void *data, Evas_Object *obj, void *event_info) static Evas_Object *__get_main_list(void *data) { retv_if(data == NULL, NULL); - + SettingProfileUG *ad = (SettingProfileUG *) data; -#ifdef SUPPORT_TAB + if(ad->sub_view[SETTING_PROF_VIEW_VOL]) return ad->sub_view[SETTING_PROF_VIEW_VOL]; -#endif + Evas_Object *genlist = elm_genlist_add(ad->navi_bar); + elm_object_style_set(genlist, "dialogue"); retvm_if(genlist == NULL, NULL, "Cannot set genlist object as contento of layout"); elm_genlist_clear(genlist); /* first to clear list */ int vconf_value = 0; - unsigned int mm_value = 0; + int mm_value = 0; - Elm_Object_Item *item = elm_genlist_item_append(genlist, + Elm_Object_Item *item = elm_genlist_item_append(genlist, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - + /* a.use sound */ if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &vconf_value) < 0) vconf_value = TRUE; /* default value of sound : on */ @@ -435,8 +557,6 @@ static Evas_Object *__get_main_list(void *data) } else { SETTING_TRACE_ERROR("ad->data_sound is NULL"); } - -#ifdef SUPPORT_VIB /* b.use vib */ if (vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vconf_value) < 0) vconf_value = TRUE; /* default value of vibration : on */ @@ -452,19 +572,18 @@ static Evas_Object *__get_main_list(void *data) } else { SETTING_TRACE_ERROR("ad->data_vibration is NULL"); } -#endif (void)setting_create_Gendial_field_titleItem(genlist, &(ad->itc_group_item), "IDS_ST_BODY_VOLUME", NULL); /* d.call volumn. */ - if(mm_sound_volume_get_value(VOLUME_TYPE_RINGTONE, &mm_value) < 0) + if(sound_manager_get_volume(SOUND_TYPE_RINGTONE, &mm_value) < 0) mm_value = SETTING_DEFAULT_RINGTONE_VOL_INT; ad->data_call_volume = setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL, NULL, - SWALLOW_Type_LAYOUT_SLIDER_WITH_TITLE, + SWALLOW_Type_LAYOUT_SLIDER, IMG_SLIDER_BTN_VOLUME01, IMG_SLIDER_BTN_VOLUME02, mm_value, SETTING_SOUND_TEXT_INCOMING_CALL, @@ -473,6 +592,7 @@ static Evas_Object *__get_main_list(void *data) if (ad->data_call_volume) { ad->data_call_volume->win_main = ad->win_main_layout; ad->data_call_volume->evas = ad->evas; + ad->data_call_volume->isIndicatorVisible = true; ad->data_call_volume->slider_min = 0; ad->data_call_volume->slider_max = SETTING_SOUND_VOL_MAX; ad->data_call_volume->userdata = ad; @@ -484,12 +604,12 @@ static Evas_Object *__get_main_list(void *data) } /* e.noti volumn */ - if(mm_sound_volume_get_value(VOLUME_TYPE_NOTIFICATION, &mm_value) < 0) + if(sound_manager_get_volume(SOUND_TYPE_NOTIFICATION, &mm_value) < 0) mm_value = SETTING_DEFAULT_NOTI_VOL_INT; ad->data_noti_volume = setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL, NULL, - SWALLOW_Type_LAYOUT_SLIDER_WITH_TITLE, + SWALLOW_Type_LAYOUT_SLIDER, IMG_SLIDER_BTN_VOLUME01, IMG_SLIDER_BTN_VOLUME02, mm_value, SETTING_SOUND_TEXT_NOTIFICATION, @@ -498,6 +618,7 @@ static Evas_Object *__get_main_list(void *data) if (ad->data_noti_volume) { ad->data_noti_volume->win_main = ad->win_main_layout; ad->data_noti_volume->evas = ad->evas; + ad->data_noti_volume->isIndicatorVisible = true; ad->data_noti_volume->slider_min = 0; ad->data_noti_volume->slider_max = SETTING_SOUND_VOL_MAX; ad->data_noti_volume->userdata = ad; @@ -509,12 +630,12 @@ static Evas_Object *__get_main_list(void *data) } /* g.media volume */ - if(mm_sound_volume_get_value(VOLUME_TYPE_MEDIA, &mm_value) < 0) + if(sound_manager_get_volume(SOUND_TYPE_MEDIA, &mm_value) < 0) mm_value = SETTING_DEFAULT_MEDIA_VOL_INT; ad->data_media_volume = setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL, NULL, - SWALLOW_Type_LAYOUT_SLIDER_WITH_TITLE, + SWALLOW_Type_LAYOUT_SLIDER, IMG_SLIDER_BTN_VOLUME01, IMG_SLIDER_BTN_VOLUME02, mm_value, SETTING_SOUND_TEXT_MEDIA, NULL, @@ -522,6 +643,7 @@ static Evas_Object *__get_main_list(void *data) if (ad->data_media_volume) { ad->data_media_volume->win_main = ad->win_main_layout; ad->data_media_volume->evas = ad->evas; + ad->data_media_volume->isIndicatorVisible = true; ad->data_media_volume->slider_min = 0; ad->data_media_volume->slider_max = SETTING_SOUND_VOL_MAX; ad->data_media_volume->userdata = ad; @@ -533,12 +655,12 @@ static Evas_Object *__get_main_list(void *data) } /* h.system volume */ - if(mm_sound_volume_get_value(VOLUME_TYPE_SYSTEM, &mm_value) < 0) + if(sound_manager_get_volume(SOUND_TYPE_SYSTEM, &mm_value) < 0) mm_value = SETTING_DEFAULT_SYSTEM_VOL_INT; ad->data_touch_volume = setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL, NULL, - SWALLOW_Type_LAYOUT_SLIDER_WITH_TITLE, + SWALLOW_Type_LAYOUT_SLIDER, IMG_SLIDER_BTN_VOLUME01, IMG_SLIDER_BTN_VOLUME02, mm_value, SETTING_SOUND_TEXT_SYSTEM, NULL, @@ -546,6 +668,7 @@ static Evas_Object *__get_main_list(void *data) if (ad->data_touch_volume) { ad->data_touch_volume->win_main = ad->win_main_layout; ad->data_touch_volume->evas = ad->evas; + ad->data_touch_volume->isIndicatorVisible = true; ad->data_touch_volume->slider_min = 0; ad->data_touch_volume->slider_max = SETTING_SOUND_VOL_MAX; ad->data_touch_volume->userdata = ad; @@ -555,19 +678,19 @@ static Evas_Object *__get_main_list(void *data) } else { SETTING_TRACE_ERROR("ad->data_touch_volume is NULL"); } -#ifdef SUPPORT_VIB + (void)setting_create_Gendial_field_titleItem(genlist, &(ad->itc_group_item), "IDS_ST_BODY_CALLALERTTYPE_VIBRATION", NULL); /* f.noti vib */ - if (vconf_get_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, &vconf_value) < 0) + if (vconf_get_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, &vconf_value) < + 0) vconf_value = SETTING_DEFAULT_NOTI_VIB_INT; /* default value of notification vibration volume : 5 */ - ad->data_vib_volume = setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL, NULL, - SWALLOW_Type_LAYOUT_SLIDER_WITH_TITLE, + SWALLOW_Type_LAYOUT_SLIDER, IMG_VIBRATION_ICON_01, IMG_VIBRATION_ICON_02, vconf_value, SETTING_SOUND_TEXT_NOTIFICATION, @@ -576,6 +699,7 @@ static Evas_Object *__get_main_list(void *data) if (ad->data_vib_volume) { ad->data_vib_volume->win_main = ad->win_main_layout; ad->data_vib_volume->evas = ad->evas; + ad->data_vib_volume->isIndicatorVisible = true; ad->data_vib_volume->slider_min = 0; ad->data_vib_volume->slider_max = SETTING_VIB_VOL_MAX; ad->data_vib_volume->userdata = ad; @@ -593,7 +717,7 @@ static Evas_Object *__get_main_list(void *data) ad->data_touch_vib = setting_create_Gendial_field_def(genlist, &(ad->itc_layout), NULL, NULL, - SWALLOW_Type_LAYOUT_SLIDER_WITH_TITLE, + SWALLOW_Type_LAYOUT_SLIDER, IMG_VIBRATION_ICON_01, IMG_VIBRATION_ICON_02, vconf_value, "IDS_ST_BODY_SOUNDFEEDBACK_HAPTIC_FEEDBACK", NULL, @@ -601,6 +725,7 @@ static Evas_Object *__get_main_list(void *data) if (ad->data_touch_vib) { ad->data_touch_vib->win_main = ad->win_main_layout; ad->data_touch_vib->evas = ad->evas; + ad->data_touch_vib->isIndicatorVisible = true; ad->data_touch_vib->slider_min = 0; ad->data_touch_vib->slider_max = SETTING_VIB_VOL_MAX; ad->data_touch_vib->userdata = ad; @@ -610,17 +735,288 @@ static Evas_Object *__get_main_list(void *data) } else { SETTING_TRACE_ERROR("ad->data_touch_vib is NULL"); } -#endif setting_create_Gendial_field_def(genlist, &(ad->itc_bg_1icon), NULL, ad, - SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + SWALLOW_Type_LAYOUT_SPECIALIZTION, NULL, NULL, 0, SOUND_DESC, NULL, NULL); + /* Touch sounds */ + ad->data_touch_sounds = + setting_create_Gendial_field_def(genlist, &(ad->itc_1text_1icon), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, vconf_value, + "IDS_ST_BODY_TOUCH_SOUNDS", + NULL, + setting_profile_sound_main_Gendial_chk_cb); + if (ad->data_touch_sounds) { + ad->data_touch_sounds->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_lock_sound is NULL"); + } + + setting_create_Gendial_field_def(genlist, &(ad->itc_bg_1icon), + NULL, ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION, + NULL, NULL, 0, "IDS_ST_BODY_PLAY_SOUND_WHEN_MAKING_SCREEN_SELECTION", NULL, NULL); + + /* Screen lock sound */ + if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, &vconf_value) < 0) + vconf_value = 1; /* default value of lock/unlock sound : on */ + ad->data_lock_sound = + setting_create_Gendial_field_def(genlist, &(ad->itc_1text_1icon), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_1TOGGLE, NULL, + NULL, vconf_value, + SETTING_SOUND_TEXT_LOCK_SOUND, + NULL, + setting_profile_sound_main_Gendial_chk_cb); + if (ad->data_lock_sound) { + ad->data_lock_sound->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_lock_sound is NULL"); + } + + item = elm_genlist_item_append(genlist, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + __change_state_of_sliderbars(ad); - return genlist; + ad->sub_view[SETTING_PROF_VIEW_VOL] = genlist; + + return ad->sub_view[SETTING_PROF_VIEW_VOL]; +} + +static Evas_Object *__get_ringtone_list(void *data) +{ + retv_if(data == NULL, NULL); + SettingProfileUG *ad = (SettingProfileUG *) data; + + if(ad->sub_view[SETTING_PROF_VIEW_RTN]) + return ad->sub_view[SETTING_PROF_VIEW_RTN]; + + Evas_Object *genlist = elm_genlist_add(ad->navi_bar); + elm_object_style_set(genlist, "dialogue"); + retvm_if(genlist == NULL, NULL, + "Cannot set genlist object as contento of layout"); + elm_genlist_clear(genlist); /* first to clear list */ + setting_enable_expandable_genlist(genlist, ad, __sound_exp_cb, NULL); + + /* a. incoming call group */ + (void)setting_create_Gendial_field_titleItem(genlist, + &(ad->itc_group_item), + SETTING_SOUND_TEXT_INCOMING_CALL, + NULL); + + /* a-1. ringtone */ + int vconf_ret = 0; + char *sub_desc = NULL; + char *pa_ringtone = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR); + if(setting_profile_check_file_exist(ad, pa_ringtone) == SETTING_RETURN_FAIL) + { + if(isEmulBin()) + pa_ringtone = (char *)strdup(SETTING_DEFAULT_CALL_TONE_SDK); + else + pa_ringtone = (char *)strdup(SETTING_DEFAULT_CALL_TONE); + vconf_ret = vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, pa_ringtone); + if(vconf_ret < 0) + SETTING_TRACE_DEBUG("failed to set vconf"); + } + sub_desc = setting_file_basename(pa_ringtone); + + ad->data_call_alert_tone = + setting_create_Gendial_field_def(genlist, &(ad->itc_2text_2), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_SOUND_TEXT_CALL_RINGTONE, + sub_desc, NULL); + if (ad->data_call_alert_tone) { + ad->data_call_alert_tone->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_call_alert_tone is NULL"); + } + + FREE(pa_ringtone); + G_FREE(sub_desc); + + /* a-2. vibration type */ + char *setting_vib_type[SETTING_SOUND_VIB_TYPE_LEN] = { + _("IDS_ST_BODY_VIBRATION_1"), + _("IDS_ST_BODY_VIBRATION_2"), + _("IDS_ST_BODY_VIBRATION_3"), + _("IDS_ST_BODY_VIBRATION_4"), + _("IDS_ST_BODY_VIBRATION_5") + }; + int value = 0; + vconf_get_int(VCONFKEY_SETAPPL_CALL_VIBRATION_PATTERN_INT, &value); + ad->data_call_alert_vib = + setting_create_Gendial_exp_parent_field(genlist, + &(ad->itc_2text_3_parent), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, + SETTING_SOUND_TEXT_CALL_VIBRATION, + setting_vib_type[value]); + if (ad->data_call_alert_vib) { + ad->data_call_alert_vib->int_slp_setting_binded = + INT_SLP_SETTING_CALL_ALERT_VIB; + } else { + SETTING_TRACE_ERROR("ad->data_call_alert_vib is NULL"); + } + + /* b. notification */ + (void)setting_create_Gendial_field_titleItem(genlist, + &(ad->itc_group_item), + SETTING_SOUND_TEXT_NOTIFICATION, + NULL); + + char *repeat_type[SETTING_SOUND_REPEAT_TYPE_LEN] = { + _(SETTING_SOUND_TEXT_REPEAT_ONCE), + _(SETTING_SOUND_TEXT_REPEAT_2MIN), + _(SETTING_SOUND_TEXT_REPEAT_5MIN), + _(SETTING_SOUND_TEXT_REPEAT_10MIN) + }; + int repeat_value = 0; + + /* b-1. msg ringtone */ + pa_ringtone = vconf_get_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR); + if(setting_profile_check_file_exist(ad, pa_ringtone) == SETTING_RETURN_FAIL) + { + pa_ringtone = (char *)strdup(SETTING_DEFAULT_MSG_TONE); + vconf_ret = vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE); + if(vconf_ret < 0) + SETTING_TRACE_DEBUG("failed to set vconf"); + } + sub_desc = setting_file_basename(pa_ringtone); + + ad->data_msg_alert_tone = + setting_create_Gendial_field_def(genlist, &(ad->itc_2text_2), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, + SETTING_SOUND_TEXT_MSG_ALERT, + sub_desc, NULL); + if (ad->data_msg_alert_tone) { + ad->data_msg_alert_tone->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_msg_alert_tone is NULL"); + } + FREE(pa_ringtone); + G_FREE(sub_desc); + + /* b-2. msg alert repetition */ + if (vconf_get_int + (VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, &repeat_value) != 0) + repeat_value = SETTING_DEFAULT_ALERT_REPEAT_TYPE_INT; /* default 0 : repeat once */ + ad->data_msg_alert_repeat = + setting_create_Gendial_exp_parent_field(genlist, + &(ad->itc_2text_3_parent), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, + SETTING_SOUND_TEXT_MSG_RINGTONE_REPEAT, + repeat_type[repeat_value]); + if (ad->data_msg_alert_repeat) { + ad->data_msg_alert_repeat->int_slp_setting_binded = + INT_SLP_SETTING_MSG_ALERT_REPEAT; + } else { + SETTING_TRACE_ERROR("ad->data_msg_alert_repeat is NULL"); + } + + /* b-3. email ringtone */ + pa_ringtone = vconf_get_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR); + if(setting_profile_check_file_exist(ad, pa_ringtone) == SETTING_RETURN_FAIL) + { + pa_ringtone = (char *)strdup(SETTING_DEFAULT_EMAIL_TONE); + vconf_ret = vconf_set_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, SETTING_DEFAULT_EMAIL_TONE); + if(vconf_ret < 0) + SETTING_TRACE_DEBUG("failed to set vconf"); + } + sub_desc = setting_file_basename(pa_ringtone); + + ad->data_email_alert_tone = + setting_create_Gendial_field_def(genlist, &(ad->itc_2text_2), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, + SETTING_SOUND_TEXT_EMAIL_ALERT, + sub_desc, NULL); + if (ad->data_email_alert_tone) { + ad->data_email_alert_tone->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_email_alert_tone is NULL"); + } + FREE(pa_ringtone); + G_FREE(sub_desc); + + /* b-4. email alert repetition */ + if (vconf_get_int + (VCONFKEY_SETAPPL_NOTI_EMAIL_ALERT_REP_TYPE_INT, + &repeat_value) != 0) + repeat_value = SETTING_DEFAULT_ALERT_REPEAT_TYPE_INT; /* default 0 : repeat once */ + ad->data_email_alert_repeat = + setting_create_Gendial_exp_parent_field(genlist, + &(ad->itc_2text_3_parent), + setting_profile_sound_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, + SETTING_SOUND_TEXT_EMAIL_RINGTONE_REPEAT, + repeat_type[repeat_value]); + if (ad->data_email_alert_repeat) { + ad->data_email_alert_repeat->int_slp_setting_binded = + INT_SLP_SETTING_EMAIL_ALERT_REPEAT; + } else { + SETTING_TRACE_ERROR("ad->data_email_alert_repeat is NULL"); + } + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(genlist, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->sub_view[SETTING_PROF_VIEW_RTN] = genlist; + return ad->sub_view[SETTING_PROF_VIEW_RTN]; +} + +static void __view_change_cb(void *data, Evas_Object *obj, void *event_info) +{ + appcore_measure_start(); + retm_if(event_info == NULL, "Invalid argmuent: event info is NULL"); + retm_if(data == NULL, "Invalid argmuent: data is NULL"); + + SettingProfileUG *ad = (SettingProfileUG *) data; + + if (device_haptic_stop_play(ad->hnd_hpt) != 0) { + SETTING_TRACE("ERROR device_haptic_stop_play"); + /* return; */ + } + setting_profile_close_all_mm_players(ad); + + Evas_Object *sub_view = NULL; + Elm_Object_Item *sel_item = elm_toolbar_selected_item_get(obj); + const char *tab_lable = elm_object_item_text_get(sel_item); + ret_if(!tab_lable); + //SETTING_TRACE("tab_lable:%s", tab_lable); + if (0 == safeStrCmp(tab_lable, VOLUME_STR)) { + if(ad->hnd_hpt) + device_haptic_stop_play(ad->hnd_hpt); + sub_view = __get_main_list(ad); + } else if (0 == safeStrCmp(tab_lable, RINGTONE_STR)) { + sub_view = __get_ringtone_list(ad); + } + + Evas_Object *old_sub_view = elm_object_part_content_get(ad->view_layout, "elm.swallow.content"); + ret_if(old_sub_view == sub_view); + + if (sub_view) { + if (old_sub_view) + { + elm_object_part_content_unset(ad->view_layout, "elm.swallow.content"); + evas_object_hide(old_sub_view); + } + elm_object_part_content_set(ad->view_layout, "elm.swallow.content", sub_view); + evas_object_show(sub_view); + } } static int setting_profile_sound_main_create(void *cb) @@ -632,42 +1028,38 @@ static int setting_profile_sound_main_create(void *cb) ad->ly_main = setting_create_win_layout(ad->win_main_layout, ad->win_get); ad->navi_bar = setting_create_navi_bar(ad->ly_main); -#ifdef SUPPORT_TAB + /* view layout */ + Evas_Object *view_layout = elm_layout_add(ad->win_main_layout); + elm_layout_theme_set(view_layout, "layout", "tabbar", "default"); + evas_object_show(view_layout); + ad->view_layout = view_layout; + Evas_Object *tabbar= elm_toolbar_add(ad->navi_bar); if(tabbar == NULL) return SETTING_RETURN_FAIL; + elm_object_part_content_set(view_layout, "elm.swallow.tabbar", tabbar); ad->ctrl_bar = tabbar; elm_toolbar_shrink_mode_set(tabbar, ELM_TOOLBAR_SHRINK_EXPAND); - elm_object_style_set(tabbar, "top"); - elm_toolbar_select_mode_set(tabbar, ELM_OBJECT_SELECT_MODE_ALWAYS); + elm_object_style_set(tabbar, "tabbar"); ad->ctrl_item[0] = elm_toolbar_item_append(tabbar, NULL, VOLUME_STR, __view_change_cb, ad); - + ad->ctrl_item[1] = elm_toolbar_item_append(tabbar, NULL, RINGTONE_STR, __view_change_cb, ad); + elm_toolbar_select_mode_set(tabbar, ELM_OBJECT_SELECT_MODE_ALWAYS); elm_toolbar_item_selected_set(ad->ctrl_item[0], EINA_TRUE); Evas_Object *ug_back_btn = elm_button_add(ad->navi_bar); elm_object_style_set(ug_back_btn, NAVI_BACK_BUTTON_STYLE); evas_object_smart_callback_add(ug_back_btn, "clicked", setting_profile_sound_main_click_softkey_cancel_cb, ad); - - Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->navi_bar, NULL, ug_back_btn, NULL, ad->ctrl_bar, "tabbar"); + + Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->navi_bar, NULL, ug_back_btn, NULL, ad->view_layout, "tabbar"); elm_naviframe_item_title_visible_set(navi_it, EINA_FALSE); -#else - Evas_Object *genlist = __get_main_list(ad); - - Evas_Object *ug_back_btn = elm_button_add(ad->navi_bar); - elm_object_style_set(ug_back_btn, NAVI_BACK_BUTTON_STYLE); - evas_object_smart_callback_add(ug_back_btn, "clicked", setting_profile_sound_main_click_softkey_cancel_cb, ad); - - Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->navi_bar, _(KeyStr_Sounds), ug_back_btn, NULL, genlist, NULL); - elm_naviframe_item_title_visible_set(navi_it, EINA_TRUE); -#endif setting_view_profile_sound_main.is_create = TRUE; @@ -682,6 +1074,18 @@ static int setting_profile_sound_main_destroy(void *cb) SettingProfileUG *ad = (SettingProfileUG *) cb; if (ad->ly_main != NULL) { + //Fix the memory leak, + //Manage ad->sub_view[] separately, unset first, then delete in together + if (ad->view_layout) + { + elm_object_part_content_unset(ad->view_layout, "elm.swallow.content"); + } + int i = SETTING_PROF_VIEW_VOL; + for (; i < SETTING_PROF_VIEW_MAX; i++ ) + { + evas_object_del(ad->sub_view[i]); + } + evas_object_del(ad->ly_main); setting_view_profile_sound_main.is_create = FALSE; } @@ -737,7 +1141,7 @@ setting_profile_sound_main_click_softkey_cancel_cb(void *data, ret_if(data == NULL); SettingProfileUG *ad = (SettingProfileUG *) data; - + /* close mm plaer */ setting_profile_close_all_mm_players(ad); /* close vibration */ @@ -752,7 +1156,173 @@ setting_profile_sound_main_click_softkey_cancel_cb(void *data, return; } +static void setting_profile_sound_main_destroy_myfile_ug_cb(ui_gadget_h ug, void *priv) +{ + ret_if(priv == NULL); + SettingProfileUG *ad = (SettingProfileUG *) priv; + if (ug) { + ug_destroy(ug); + ad->ug_loading = NULL; + } +} + +static void +setting_profile_sound_main_result_myfile_ug_cb(ui_gadget_h ug, + service_h result, void *priv) +{ + ret_if(priv == NULL); + + SettingProfileUG *ad = (SettingProfileUG *) priv; + char *ringtone_file = NULL; + char *ringtone_path = NULL; + + service_get_extra_data(result, "result", &ringtone_path); + if(!ringtone_path) + return; + + SETTING_TRACE("ringtone_path:%s", ringtone_path); + + if (ringtone_path != NULL) { + ringtone_file = setting_file_basename(ringtone_path); + SETTING_TRACE("ringtone_file:%s", ringtone_file); + + if (0 == safeStrCmp(ad->ringtone_type, SETTING_SOUND_TEXT_CALL_RINGTONE)) { + if (vconf_set_str + (VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, ringtone_path) == 0) { + if (ad->data_call_alert_tone) { + ad->data_call_alert_tone->sub_desc = (char *)g_strdup(ringtone_file); + + elm_object_item_data_set(ad->data_call_alert_tone->item, ad->data_call_alert_tone); + elm_genlist_item_update(ad->data_call_alert_tone->item); + } + } + } else if (0 == + safeStrCmp(ad->ringtone_type, SETTING_SOUND_TEXT_MSG_ALERT)) { + if (vconf_set_str + (VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, ringtone_path) == 0) { + if (ad->data_msg_alert_tone) { + ad->data_msg_alert_tone->sub_desc = (char *)g_strdup(ringtone_file); + + elm_object_item_data_set(ad->data_msg_alert_tone->item, ad->data_msg_alert_tone); + elm_genlist_item_update(ad->data_msg_alert_tone->item); + } + } + } else if (0 == + safeStrCmp(ad->ringtone_type, SETTING_SOUND_TEXT_EMAIL_ALERT)) { + if (vconf_set_str + (VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, ringtone_path) == 0) { + if (ad->data_email_alert_tone) { + ad->data_email_alert_tone->sub_desc = (char *)g_strdup(ringtone_file); + + elm_object_item_data_set(ad->data_email_alert_tone->item, ad->data_email_alert_tone); + elm_genlist_item_update(ad->data_email_alert_tone->item); + } + } + } + } + + G_FREE(ringtone_file); + return; +} + +static void +setting_profile_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, + void *priv) +{ + ret_if(priv == NULL); + + SettingProfileUG *ad = (SettingProfileUG *) priv; + Evas_Object *base; + + base = (Evas_Object *) ug_get_layout(ug); + if (!base) + return; + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + break; + } +} + + +static void setting_profile_sound_main_create_myfile_ug(SettingProfileUG *ad) +{ + ret_if(ad == NULL); + + if(ad->ug_loading) + { + SETTING_TRACE("Myfiles ug is already loaded."); + return; + } + + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + if (!cbs) + return; + + cbs->layout_cb = setting_profile_layout_ug_cb; + cbs->result_cb = setting_profile_sound_main_result_myfile_ug_cb; + cbs->destroy_cb = setting_profile_sound_main_destroy_myfile_ug_cb; + cbs->priv = (void *)ad; + + service_h svc; + if (service_create(&svc)) { + FREE(cbs); + return; + } + + const char *pa_cur_ringtone = NULL; + const char *dir_path = NULL; + if (0 == safeStrCmp(ad->ringtone_type, SETTING_SOUND_TEXT_CALL_RINGTONE)) { + pa_cur_ringtone = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR); + if (pa_cur_ringtone == NULL) + { + if(isEmulBin()) + pa_cur_ringtone = SETTING_DEFAULT_CALL_TONE_SDK; + else + pa_cur_ringtone = SETTING_DEFAULT_CALL_TONE; + } + dir_path = SETTING_PROFILE_SOUND_RINGTONES_PATH; + } else if (0 == safeStrCmp(ad->ringtone_type, SETTING_SOUND_TEXT_MSG_ALERT)) { + pa_cur_ringtone = vconf_get_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR); + if (pa_cur_ringtone == NULL) + pa_cur_ringtone = SETTING_DEFAULT_MSG_TONE; + dir_path = SETTING_PROFILE_SOUND_ALERTS_PATH; + } else if (0 == safeStrCmp(ad->ringtone_type, SETTING_SOUND_TEXT_EMAIL_ALERT)) { + pa_cur_ringtone = vconf_get_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR); + if (pa_cur_ringtone == NULL) + pa_cur_ringtone = SETTING_DEFAULT_EMAIL_TONE; + dir_path = SETTING_PROFILE_SOUND_ALERTS_PATH; + } + SETTING_TRACE("pa_cur_ringtone:\t%s", pa_cur_ringtone); + SETTING_TRACE("dir_path:\t%s", dir_path); + + service_add_extra_data(svc, "marked_mode", pa_cur_ringtone); + service_add_extra_data(svc, "path", dir_path); + service_add_extra_data(svc, "select_type", "SINGLE_FILE"); + service_add_extra_data(svc, "file_type", "SOUND"); + service_add_extra_data(svc, "drm_type", "DRM_ALL"); + + SETTING_TRACE("ad->ug->layout:%p", (void *)ug_get_layout(ad->ug)); + ad->ug_loading = ug_create(ad->ug, "myfile-efl", UG_MODE_FULLVIEW, svc, cbs); + if (NULL == ad->ug_loading) { /* error handling */ + SETTING_TRACE_ERROR("NULL == ad->ug_loading"); + } + + service_destroy(svc); + FREE(cbs); + + /** @todo verify it's valid */ + if(pa_cur_ringtone) + FREE(pa_cur_ringtone); + + return; +} static void setting_profile_sound_main_Gendial_chk_cb(void *data, Evas_Object *obj, @@ -796,6 +1366,16 @@ setting_profile_sound_main_Gendial_chk_cb(void *data, Evas_Object *obj, if (list_item->chk_status) { setting_enable_genlist_item(ad->data_vib_volume->item); setting_enable_genlist_item(ad->data_touch_vib->item); + + /* Play vib if vib turns on */ + int err = 0; + char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,}; + svi_get_path(SVI_TYPE_VIB, SVI_VIB_NOTIFICATION_GENERAL, pattern_file, sizeof(pattern_file)); + device_haptic_stop_play(ad->hnd_hpt); + err = device_haptic_play_file(ad->hnd_hpt, pattern_file, 1, (int)(elm_slider_value_get(ad->data_vib_volume->eo_check)+0.5)); + + if (err < 0) + SETTING_TRACE("Failed to play haptic monotone"); } else { if (device_haptic_stop_play(ad->hnd_hpt) != 0) { SETTING_TRACE("ERROR device_haptic_stop_play"); @@ -804,6 +1384,16 @@ setting_profile_sound_main_Gendial_chk_cb(void *data, Evas_Object *obj, setting_disable_genlist_item(ad->data_touch_vib->item); } } + /* additional items */ + else if (!safeStrCmp(SETTING_SOUND_TEXT_LOCK_SOUND, list_item->keyStr)) { + if (vconf_set_bool(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, list_item->chk_status) < 0) { + list_item->chk_status = !state; + elm_check_state_set(list_item->eo_check, !state); + } + } + + /* end */ + } static void @@ -823,11 +1413,15 @@ setting_profile_sound_main_mouse_up_Gendial_list_cb(void *data, SettingProfileUG *ad = data; if(ad->hnd_hpt) - device_haptic_stop_play(ad->hnd_hpt); + device_haptic_stop_play(ad->hnd_hpt); SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); - - if (!safeStrCmp(SETTING_SOUND_TEXT_SOUND, list_item->keyStr)) { + if (!safeStrCmp(SETTING_SOUND_TEXT_CALL_RINGTONE, list_item->keyStr) + || !safeStrCmp(SETTING_SOUND_TEXT_MSG_ALERT, list_item->keyStr) + || !safeStrCmp(SETTING_SOUND_TEXT_EMAIL_ALERT, list_item->keyStr)) { + ad->ringtone_type = list_item->keyStr; + setting_profile_sound_main_create_myfile_ug(ad); + } else if (!safeStrCmp(SETTING_SOUND_TEXT_SOUND, list_item->keyStr)) { int old_status = elm_check_state_get(list_item->eo_check); if (vconf_set_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, !old_status) == 0) { /* new status */ @@ -856,6 +1450,16 @@ setting_profile_sound_main_mouse_up_Gendial_list_cb(void *data, if (list_item->chk_status) { setting_enable_genlist_item(ad->data_vib_volume->item); setting_enable_genlist_item(ad->data_touch_vib->item); + + /* Play vib if vib turns on */ + int err = 0; + char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,}; + svi_get_path(SVI_TYPE_VIB, SVI_VIB_NOTIFICATION_GENERAL, pattern_file, sizeof(pattern_file)); + device_haptic_stop_play(ad->hnd_hpt); + err = device_haptic_play_file(ad->hnd_hpt, pattern_file, 1, (int)(elm_slider_value_get(ad->data_vib_volume->eo_check)+0.5)); + + if (err < 0) + SETTING_TRACE("Failed to play haptic monotone"); } else { if (device_haptic_stop_play(ad->hnd_hpt) != 0) { SETTING_TRACE("ERROR device_haptic_stop_play"); @@ -866,6 +1470,30 @@ setting_profile_sound_main_mouse_up_Gendial_list_cb(void *data, } return; } + /* additional */ + else if (!safeStrCmp(SETTING_SOUND_TEXT_LOCK_SOUND, list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + if (vconf_set_bool(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, !old_status) == 0) { + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + } + return; + } + else if (!safeStrcmp("IDS_ST_BODY_TOUCH_SOUNDS", list_item->keyStr)) { + int old_status = elm_check_state_get(list_item->eo_check); + /* To do : set vconfkey for touch sounds */ + + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + } + /* end */ + else if (ad->data_call_alert_vib == list_item + || ad->data_msg_alert_repeat == list_item + || ad->data_email_alert_repeat == list_item) { + bool status = !elm_genlist_item_expanded_get(item); + elm_genlist_item_expanded_set(item, status); + } } static void @@ -883,7 +1511,7 @@ setting_profile_sound_main_call_ringtone_sound_slider_value_change_cb(void *data if(ad->mp_ringtone == NULL) return; - + if(list_item->chk_status != (int)(val+0.5)) { list_item->chk_status = (int)(val+0.5); @@ -903,10 +1531,10 @@ setting_profile_sound_main_noti_sound_slider_value_change_cb(void *data, Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; SettingProfileUG *ad = list_item->userdata; - + if(ad->mp_noti == NULL) return; - + if(list_item->chk_status != (int)(val+0.5)) { list_item->chk_status = val; @@ -936,8 +1564,8 @@ setting_profile_sound_main_media_sound_slider_value_change_cb(void *data, static void settings_profile_sound_main_sys_sound_slider_value_change_cb(void *data, - Evas_Object *obj, - void *event_info) + Evas_Object *obj, + void *event_info) { /* error check */ ret_if(data == NULL); diff --git a/setting-profile/src/setting-profile.c b/setting-profile/src/setting-profile.c index 52e22f4..11b9bc0 100755 --- a/setting-profile/src/setting-profile.c +++ b/setting-profile/src/setting-profile.c @@ -1,18 +1,24 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + #include #include @@ -35,85 +41,52 @@ static void setting_profile_ug_cb_resize(void *data, Evas *e, /** *@ To sync Setting App volume with Volume Hard key volume */ -static void __ringtone_volume_callback_fn(void *data) -{ - unsigned int volume = 0; - double old_volume = 0; - - ret_if(data == NULL); - - SettingProfileUG *ad = data; - mm_sound_volume_get_value(VOLUME_TYPE_RINGTONE, &volume); /* call ringtone */ - - ret_if(ad->data_call_volume == NULL); - - old_volume = elm_slider_value_get(ad->data_call_volume->eo_check); - - if ((int)volume != (int)(old_volume+0.5)) { /* reset again */ - elm_slider_value_set(ad->data_call_volume->eo_check, volume); - } -} - -static void __notification_volume_callback_fn(void *data) +void __sound_volume_changed_cb(sound_type_e type, unsigned int volume, void *user_data) { - unsigned int volume = 0; - double old_volume = 0; - - ret_if(data == NULL); - - SettingProfileUG *ad = data; - - mm_sound_volume_get_value(VOLUME_TYPE_NOTIFICATION, &volume); /* notification */ - - ret_if(ad->data_noti_volume == NULL); + ret_if(!user_data); + SettingProfileUG *ad = user_data; - old_volume = elm_slider_value_get(ad->data_noti_volume->eo_check); - - if ((int)volume != (int)(old_volume+0.5)) { /* reset again */ - elm_slider_value_set(ad->data_noti_volume->eo_check, volume); + Evas_Object *slider = NULL; + switch (type) + { + case SOUND_TYPE_SYSTEM: + if (ad->data_touch_volume) + slider = ad->data_touch_volume->eo_check; + break; + case SOUND_TYPE_NOTIFICATION: + if (ad->data_noti_volume) + slider = ad->data_noti_volume->eo_check; + break; + case SOUND_TYPE_RINGTONE: + if (ad->data_call_volume) + slider = ad->data_call_volume->eo_check; + break; + case SOUND_TYPE_MEDIA: + if (ad->data_media_volume) + slider = ad->data_media_volume->eo_check; + break; + //At present, there are only 4 types supported:RINGTONE,NOTIFICATION,SYSTEM,MEDIA + case SOUND_TYPE_CALL: + case SOUND_TYPE_ALARM: + default: + SETTING_TRACE_ERROR("Invalid sound type:%d", type); + return; } -} - -static void __media_volume_callback_fn(void *data) -{ - unsigned int volume = 0; - double old_volume = 0; - ret_if(data == NULL); - - SettingProfileUG *ad = data; - - mm_sound_volume_get_value(VOLUME_TYPE_MEDIA, &volume); /* notification */ - - ret_if(ad->data_media_volume == NULL); - - old_volume = elm_slider_value_get(ad->data_media_volume->eo_check); + if (slider) + { + int volume = 0; + double old_volume = 0; + sound_manager_get_volume(type, &volume); /* system */ - if ((int)volume != (int)(old_volume+0.5)) { /* reset again */ - elm_slider_value_set(ad->data_media_volume->eo_check, volume); + old_volume = elm_slider_value_get(slider); + if ((int)volume != (int)(old_volume + 0.5)) { /* reset again */ + elm_slider_value_set(slider, volume); + } } } -static void __system_volume_callback_fn(void *data) -{ - unsigned int volume = 0; - double old_volume = 0; - - ret_if(data == NULL); - - SettingProfileUG *ad = data; - - mm_sound_volume_get_value(VOLUME_TYPE_SYSTEM, &volume); /* system */ - - ret_if(ad->data_touch_volume == NULL); - - old_volume = elm_slider_value_get(ad->data_touch_volume->eo_check); - - if ((int)volume != (int)(old_volume+0.5)) { /* reset again */ - elm_slider_value_set(ad->data_touch_volume->eo_check, volume); - } -} static char* __gl_sound_slider_text_get(void *data, Evas_Object *obj, const char *part) { @@ -135,6 +108,7 @@ static Evas_Object* __gl_sound_slider_content_get(void *data, Evas_Object *obj, item_data->l_swallow_path, item_data->r_swallow_path, item_data->chk_status, + item_data->isIndicatorVisible, item_data->slider_min, item_data->slider_max, item_data->chk_change_cb, @@ -154,12 +128,12 @@ static Evas_Object* __gl_sound_slider_content_get(void *data, Evas_Object *obj, SettingProfileUG *ad = (SettingProfileUG*)item_data->userdata; - if((item_data->belongs_to == SETTING_VOL_SOUND_GROUP) - && (ad->data_sound) + if((item_data->belongs_to == SETTING_VOL_SOUND_GROUP) + && (ad->data_sound) && (ad->data_sound->chk_status == FALSE)) setting_disable_genlist_item(item_data->item); - else if((item_data->belongs_to == SETTING_VOL_VIBRATION_GROUP) - && (ad->data_vibration) + else if((item_data->belongs_to == SETTING_VOL_VIBRATION_GROUP) + && (ad->data_vibration) && (ad->data_vibration->chk_status == FALSE)) setting_disable_genlist_item(item_data->item); @@ -256,7 +230,7 @@ static void setting_profile_vconf_change_cb(keynode_t *key, void *data) setting_disable_genlist_item(ad->data_vib_volume->item); setting_disable_genlist_item(ad->data_touch_vib->item); } - } + } } int setting_profile_listen_vconf_change(void *data) @@ -267,7 +241,7 @@ int setting_profile_listen_vconf_change(void *data) ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, setting_profile_vconf_change_cb, data); - setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", + setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", (char *)VCONFKEY_SYSMAN_MMC_STATUS, ret); ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, @@ -279,7 +253,7 @@ int setting_profile_listen_vconf_change(void *data) setting_profile_vconf_change_cb, data); setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", (char *)VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, ret); - + return 0; } @@ -296,13 +270,12 @@ int setting_profile_unlisten_vconf_change(void *data) return 0; } -static void *setting_profile_ug_on_create(struct ui_gadget *ug, - enum ug_mode mode, bundle *data, +static void *setting_profile_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, void *priv) { appcore_measure_start(); retv_if(priv == NULL, NULL); - retv_if(ug == NULL, NULL); SettingProfileUG *profileUG = priv; profileUG->ug = ug; @@ -316,14 +289,10 @@ static void *setting_profile_ug_on_create(struct ui_gadget *ug, setting_retvm_if(profileUG->win_main_layout == NULL, NULL, "cannot get main window "); - mm_sound_volume_add_callback(VOLUME_TYPE_RINGTONE, - __ringtone_volume_callback_fn, profileUG); - mm_sound_volume_add_callback(VOLUME_TYPE_NOTIFICATION, - __notification_volume_callback_fn, profileUG); - mm_sound_volume_add_callback(VOLUME_TYPE_MEDIA, - __media_volume_callback_fn, profileUG); - mm_sound_volume_add_callback(VOLUME_TYPE_SYSTEM, - __system_volume_callback_fn, profileUG); + //At present, there are only 4 types supported:RINGTONE,NOTIFICATION,SYSTEM,MEDIA + sound_manager_set_volume_changed_cb(__sound_volume_changed_cb, profileUG); + + appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); /* register view node table */ setting_view_node_table_intialize(); @@ -331,18 +300,18 @@ static void *setting_profile_ug_on_create(struct ui_gadget *ug, setting_create_Gendial_itc("dialogue/1text.1icon", &(profileUG->itc_1text_1icon)); setting_create_Gendial_itc("dialogue/title", &(profileUG->itc_group_item)); - setting_create_Gendial_itc("dialogue/2text.3", &(profileUG->itc_2text_2)); - profileUG->itc_layout.item_style = "dialogue/1text.1icon.5"; + setting_create_Gendial_itc("dialogue/2text.3", &(profileUG->itc_2text_2)); + profileUG->itc_layout.item_style = "dialogue/1text.1icon.5"; profileUG->itc_layout.func.text_get = __gl_sound_slider_text_get; profileUG->itc_layout.func.content_get = __gl_sound_slider_content_get; profileUG->itc_layout.func.state_get = NULL; - profileUG->itc_layout.func.del = __gl_sound_slider_del; + profileUG->itc_layout.func.del = __gl_sound_slider_del; setting_create_Gendial_itc("dialogue/2text.3/expandable", &(profileUG->itc_2text_3_parent)); setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", &(profileUG->itc_1icon_1text_sub)); setting_create_Gendial_itc("multiline/1text", &(profileUG->itc_bg_1icon)); - profileUG->itc_seperator.item_style = "dialogue/separator/21/with_line"; + profileUG->itc_seperator.item_style = "dialogue/separator/21/with_line"; profileUG->itc_seperator.func.text_get = NULL; profileUG->itc_seperator.func.content_get = NULL; profileUG->itc_seperator.func.state_get = NULL; @@ -361,11 +330,11 @@ static void *setting_profile_ug_on_create(struct ui_gadget *ug, return profileUG->ly_main; } -static void setting_profile_ug_on_start(struct ui_gadget *ug, bundle *data, void *priv) +static void setting_profile_ug_on_start(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_profile_ug_on_pause(struct ui_gadget *ug, bundle *data, void *priv) +static void setting_profile_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) { ret_if(priv == NULL); SettingProfileUG *profileUG = (SettingProfileUG*)priv; @@ -374,14 +343,69 @@ static void setting_profile_ug_on_pause(struct ui_gadget *ug, bundle *data, void setting_profile_close_all_mm_players(profileUG); } -static void setting_profile_ug_on_resume(struct ui_gadget *ug, bundle *data, void *priv) +static void setting_profile_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) { + ret_if(priv == NULL); + SettingProfileUG *profileUG = (SettingProfileUG *)priv; + + /* update path of tones */ + char *pa_tone_path = NULL; + /* 1. incoming call ringtone */ + if(profileUG->data_call_alert_tone) + { + SETTING_TRACE_DEBUG("change call_alert_tone %x", profileUG->data_call_alert_tone); + pa_tone_path = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR); + if((pa_tone_path == NULL) || (setting_profile_check_file_exist(profileUG, pa_tone_path) == SETTING_RETURN_FAIL)) + { + if(isEmulBin()) + pa_tone_path = (char *)strdup(SETTING_DEFAULT_CALL_TONE_SDK); + else + pa_tone_path = (char *)strdup(SETTING_DEFAULT_CALL_TONE); + if(vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, pa_tone_path) < 0) + return; + profileUG->data_call_alert_tone->sub_desc = setting_file_basename(pa_tone_path); + elm_genlist_item_update(profileUG->data_call_alert_tone->item); + } + FREE(pa_tone_path); + } + + /* 2. message ringtone */ + if(profileUG->data_msg_alert_tone) + { + SETTING_TRACE_DEBUG("change msg_alert_tone %x", profileUG->data_msg_alert_tone); + pa_tone_path = vconf_get_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR); + if((pa_tone_path == NULL) || (setting_profile_check_file_exist(profileUG, pa_tone_path) == SETTING_RETURN_FAIL)) + { + pa_tone_path = SETTING_DEFAULT_MSG_TONE; + if(vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE) < 0) + return; + + profileUG->data_msg_alert_tone->sub_desc = setting_file_basename(pa_tone_path); + elm_genlist_item_update(profileUG->data_msg_alert_tone->item); + } + FREE(pa_tone_path); + } + + /* 3. email ringtone */ + if(profileUG->data_email_alert_tone) + { + SETTING_TRACE_DEBUG("change email_alert_tone %x", profileUG->data_email_alert_tone); + pa_tone_path = vconf_get_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR); + if((pa_tone_path == NULL) || (setting_profile_check_file_exist(profileUG, pa_tone_path) == SETTING_RETURN_FAIL)) + { + pa_tone_path = SETTING_DEFAULT_MSG_TONE; + if(vconf_set_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE) < 0) + return; + profileUG->data_email_alert_tone->sub_desc = setting_file_basename(pa_tone_path); + elm_genlist_item_update(profileUG->data_email_alert_tone->item); + } + FREE(pa_tone_path); + } } -static void setting_profile_ug_on_destroy(struct ui_gadget *ug, bundle *data, void *priv) +static void setting_profile_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) { - ret_if(ug == NULL); ret_if(priv == NULL); SettingProfileUG *profileUG = priv; @@ -389,10 +413,8 @@ static void setting_profile_ug_on_destroy(struct ui_gadget *ug, bundle *data, vo evas_object_event_callback_del(profileUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_profile_ug_cb_resize); /* fix flash issue for gallery */ profileUG->ug = ug; - mm_sound_volume_remove_callback(MM_SOUND_VOLUME_TYPE_RINGTONE); - mm_sound_volume_remove_callback(MM_SOUND_VOLUME_TYPE_NOTIFICATION); - mm_sound_volume_remove_callback(MM_SOUND_VOLUME_TYPE_SYSTEM); - mm_sound_volume_remove_callback(MM_SOUND_VOLUME_TYPE_MEDIA); + //At present, there are only 4 types supported:RINGTONE,NOTIFICATION,SYSTEM,MEDIA + sound_manager_unset_volume_changed_cb(); int ret = device_haptic_close(profileUG->hnd_hpt); if (ret != 0) { @@ -409,14 +431,14 @@ static void setting_profile_ug_on_destroy(struct ui_gadget *ug, bundle *data, vo } } -static void setting_profile_ug_on_message(struct ui_gadget *ug, bundle *msg, - bundle *data, void *priv) +static void setting_profile_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) { } -static void setting_profile_ug_on_event(struct ui_gadget *ug, - enum ug_event event, bundle *data, void *priv) +static void setting_profile_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, void *priv) { switch (event) { case UG_EVENT_LOW_MEMORY: @@ -440,10 +462,9 @@ static void setting_profile_ug_on_event(struct ui_gadget *ug, } } -static void setting_profile_ug_on_key_event(struct ui_gadget *ug, - enum ug_key_event event, bundle *data, void *priv) +static void setting_profile_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, service_h service, void *priv) { - ret_if(ug == NULL); ret_if(priv == NULL); SettingProfileUG *ad = (SettingProfileUG *) priv; @@ -520,7 +541,7 @@ int setting_profile_check_file_exist(void *data, const char *file_path) { retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); retv_if(file_path == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); - + if (!ecore_file_exists(file_path)) { SETTING_TRACE_ERROR("Cannot find the ringtone file[%s]!", file_path); return SETTING_RETURN_FAIL; @@ -528,9 +549,9 @@ int setting_profile_check_file_exist(void *data, const char *file_path) int mmc_status = VCONFKEY_SYSMAN_MMC_REMOVED; vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &mmc_status); - if (VCONFKEY_SYSMAN_MMC_MOUNTED != mmc_status) + if (VCONFKEY_SYSMAN_MMC_MOUNTED != mmc_status) { - if (!safeStrNCmp(SETTING_PROFILE_MMC_PATH, file_path, safeStrLen(SETTING_PROFILE_MMC_PATH))) + if (!safeStrNCmp(SETTING_PROFILE_MMC_PATH, file_path, safeStrLen(SETTING_PROFILE_MMC_PATH))) { return SETTING_RETURN_FAIL; } @@ -538,11 +559,10 @@ int setting_profile_check_file_exist(void *data, const char *file_path) return SETTING_RETURN_SUCCESS; } -MMHandleType *setting_profile_play_sound(void *data, void *cb, - char *ringtone_file, - int vol, - enum MMSoftwareVolumeTableType - table_type) +player_h *setting_profile_play_sound(void *data, void *cb, + char *ringtone_file, + int vol, + sound_type_e sound_type) { /* error check */ retv_if(data == NULL, NULL); @@ -550,23 +570,36 @@ MMHandleType *setting_profile_play_sound(void *data, void *cb, SettingProfileUG *ad = (SettingProfileUG *) data; int is_existing = setting_profile_check_file_exist(ad, ringtone_file); - if(is_existing == SETTING_RETURN_FAIL) + if(is_existing == SETTING_RETURN_FAIL || NULL == ringtone_file) { char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,}; - switch(table_type) + switch(sound_type) { - case MM_SOUND_VOLUME_TYPE_RINGTONE: - case MM_SOUND_VOLUME_TYPE_MEDIA: - ad->song_playing = (char *)g_strdup(SETTING_DEFAULT_CALL_TONE); + case SOUND_TYPE_RINGTONE: + if(isEmulBin()) + ad->song_playing = (char *)g_strdup(SETTING_DEFAULT_CALL_TONE_SDK); + else + ad->song_playing = (char *)g_strdup(SETTING_DEFAULT_CALL_TONE); + break; + case SOUND_TYPE_MEDIA: + if(isEmulBin()) + ad->song_playing = (char *)g_strdup(SETTING_DEFAULT_CALL_TONE_SDK); + else + ad->song_playing = (char *)g_strdup(SETTING_DEFAULT_MEDIA_TONE); break; - case MM_SOUND_VOLUME_TYPE_NOTIFICATION: + case SOUND_TYPE_NOTIFICATION: ad->song_playing = (char *)g_strdup(SETTING_DEFAULT_MSG_TONE); break; - case MM_SOUND_VOLUME_TYPE_SYSTEM: + case SOUND_TYPE_SYSTEM: svi_get_path(SVI_TYPE_SND, SVI_SND_TOUCH_TOUCH1, pattern_file, sizeof(pattern_file)); + retv_if(pattern_file == NULL, NULL); ad->song_playing = (char *)g_strdup(pattern_file); break; default: + if(isEmulBin()) + ad->song_playing = (char *)g_strdup(SETTING_DEFAULT_CALL_TONE_SDK); + else + ad->song_playing = (char *)g_strdup(SETTING_DEFAULT_CALL_TONE); break; } @@ -575,70 +608,56 @@ MMHandleType *setting_profile_play_sound(void *data, void *cb, ad->song_playing = (char *)g_strdup(ringtone_file); } - MMHandleType *player = calloc(1, sizeof(MMHandleType)); + player_h *player = calloc(1, sizeof(player_h)); if (!player) { - SETTING_TRACE_ERROR("failed to calloc MMHandleType"); + SETTING_TRACE_ERROR("failed to calloc player_h"); return NULL; } int err = 0; - char *err_attr_name= NULL; - err = mm_player_create(player); - if (err != MM_ERROR_NONE) { + err = player_create(player); + if (err != PLAYER_ERROR_NONE) { SETTING_TRACE_ERROR("creating the player handle failed[%d]", err); free(player); return NULL; } - err = mm_player_set_attribute(*player, &err_attr_name, - "sound_volume_type", table_type, - "profile_uri", ad->song_playing, - safeStrLen(ad->song_playing), NULL); - if (err != MM_ERROR_NONE) { + err = player_set_uri(*player, ad->song_playing); + if (err != PLAYER_ERROR_NONE) { SETTING_TRACE_ERROR("error to set attribute---profile_uri[%d]", err); - mm_player_destroy(*player); + player_destroy(*player); free(player); return NULL; } - err = mm_player_set_attribute(*player, &err_attr_name, - "sound_volume_type", table_type, - "profile_play_count", 1, NULL); - if (err != MM_ERROR_NONE) { - SETTING_TRACE_ERROR("error to set attribute---profile_play_count[%d]", err); - mm_player_destroy(*player); - free(player); - return NULL; - } - - err = mm_player_realize(*player); - if (err != MM_ERROR_NONE) { + err = player_prepare(*player); + if (err != PLAYER_ERROR_NONE) { SETTING_TRACE_ERROR("realizing the player handle failed[%d]", err); - mm_player_destroy(*player); + player_destroy(*player); free(player); return NULL; } - MMPlayerStateType state = -1; - mm_player_get_state(*player, &state); + player_state_e state = -1; + player_get_state(*player, &state); SETTING_TRACE("state:%d", state); - if (state != MM_PLAYER_STATE_READY) { + if (state != PLAYER_STATE_READY) { SETTING_TRACE_ERROR("state of player is invalid %d", err); - mm_player_unrealize(*player); - mm_player_destroy(*player); + player_unprepare(*player); + player_destroy(*player); free(player); return NULL; } - mm_player_set_message_callback(*player, cb, ad); - err = mm_player_start(*player); - if (err != MM_ERROR_NONE) { /* if directly return error.. */ - SETTING_TRACE_ERROR("mm_player_start [%d]", err); - mm_player_set_message_callback(*player, NULL, NULL); - mm_player_unrealize(*player); - mm_player_destroy(*player); + player_set_completed_cb(*player, cb, ad); + err = player_start(*player); + if (err != PLAYER_ERROR_NONE) { /* if directly return error.. */ + SETTING_TRACE_ERROR("player_start [%d]", err); + player_unset_completed_cb(*player); + player_unprepare(*player); + player_destroy(*player); free(player); return NULL; } @@ -646,15 +665,22 @@ MMHandleType *setting_profile_play_sound(void *data, void *cb, SETTING_TRACE("waiting.."); ad->playing_volume = vol; + float volumn = vol / VOLUME_DEN; + int ret = player_set_volume(*player, volumn, volumn); + if(ret != PLAYER_ERROR_NONE) + SETTING_TRACE_ERROR("failed to set volume of player [%d]", ret); + + SETTING_TRACE_DEBUG("playing volume is %f", volumn); + return player; } #define EXP 0.001 -void setting_profile_play_sound_origin(MMHandleType **mp_handle, void *data, +void setting_profile_play_sound_origin(player_h **mp_handle, void *data, void *cb, char *ringtone_file, /* int vol, */ float vol, - enum MMSoftwareVolumeTableType table_type) + sound_type_e sound_type) { /* error check */ ret_if(data == NULL); @@ -673,36 +699,32 @@ void setting_profile_play_sound_origin(MMHandleType **mp_handle, void *data, SettingProfileUG *ad = (SettingProfileUG *) data; if (*mp_handle == NULL) { - *mp_handle = setting_profile_play_sound(ad, cb, ringtone_file, vol, table_type); + *mp_handle = setting_profile_play_sound(ad, cb, ringtone_file, vol, sound_type); } } -void setting_profile_change_player_volume(MMHandleType **mp_handle, void *data, float vol) +void setting_profile_change_player_volume(player_h **mp_handle, float vol) { - ret_if(data == NULL); - + SETTING_TRACE_BEGIN; if (*mp_handle == NULL) return; - int ret= 0; + player_state_e state = -1; + player_get_state(*(*mp_handle), &state); - MMPlayerStateType state = -1; - mm_player_get_state(*(*mp_handle), &state); - - if(state != MM_PLAYER_STATE_PLAYING) + if(state != PLAYER_STATE_PLAYING) return; - MMPlayerVolumeType volume; - memset(&volume, 0, sizeof(MMPlayerVolumeType)); float volumn = vol / VOLUME_DEN; - volume.level[MM_CHANNEL_LEFT] = volume.level[MM_CHANNEL_RIGHT] = volumn; - ret = mm_player_set_volume(*(*mp_handle), &volume); - setting_retm_if(ret != MM_ERROR_NONE, "mm player set volume failed"); + ret = player_set_volume(*(*mp_handle), volumn, volumn); + setting_retm_if(ret != PLAYER_ERROR_NONE, "mm player set volume failed"); } -int setting_profile_stop_sound(void *data, MMHandleType *player) + +int setting_profile_stop_sound(void *data, player_h *player) { + SETTING_TRACE_BEGIN; retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); SettingProfileUG *ad = (SettingProfileUG *) data; @@ -711,26 +733,26 @@ int setting_profile_stop_sound(void *data, MMHandleType *player) ad->song_playing = NULL; } - MMPlayerStateType state = -1; + player_state_e state = -1; int ret = SETTING_RETURN_SUCCESS; int prev_behavior = 0; /* instead of do_while(0) and break */ - mm_player_get_state(*player, &state); - if (state == MM_PLAYER_STATE_PLAYING) { - if (mm_player_stop(*player) != MM_ERROR_NONE) { + player_get_state(*player, &state); + if (state == PLAYER_STATE_PLAYING) { + if (player_stop(*player) != PLAYER_ERROR_NONE) { SETTING_TRACE("mm player stop failed"); ret = SETTING_MMPLAYER_STOP_ERR; prev_behavior++; /* instead of do_while(0) and break */ } } - if ((prev_behavior == 0) && (mm_player_unrealize(*player) != MM_ERROR_NONE)) { + if ((prev_behavior == 0) && (player_unprepare(*player) != PLAYER_ERROR_NONE)) { SETTING_TRACE("mm player unrealize failed"); ret = SETTING_MMPLAYER_UNREALIZE_ERR; prev_behavior++; /* instead of do_while(0) and break */ } - if ((prev_behavior == 0) && (mm_player_destroy(*player) != MM_ERROR_NONE)) { + if ((prev_behavior == 0) && (player_destroy(*player) != PLAYER_ERROR_NONE)) { SETTING_TRACE("mm player destroy failed"); ret = SETTING_MMPLAYER_DESTROY_ERR; } @@ -746,41 +768,41 @@ int __close_player(void *data, setting_volume_types type) retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); SettingProfileUG *ad = (SettingProfileUG *) data; - MMHandleType **player= NULL; + player_h **player= NULL; double value = 0.0; switch(type) - { + { case SETTING_VOL_TYPE_RINGTONE: retv_if(ad->mp_ringtone == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); player = &(ad->mp_ringtone); value = elm_slider_value_get(ad->data_call_volume->eo_check); - mm_sound_volume_set_value(VOLUME_TYPE_RINGTONE, (unsigned int)(value+0.5)); + sound_manager_set_volume(SOUND_TYPE_RINGTONE, (unsigned int)(value+0.5)); break; case SETTING_VOL_TYPE_NOTIFICATION: retv_if(ad->mp_noti == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); player = &(ad->mp_noti); value = elm_slider_value_get(ad->data_noti_volume->eo_check); - mm_sound_volume_set_value(VOLUME_TYPE_NOTIFICATION, (unsigned int)(value+0.5)); + sound_manager_set_volume(SOUND_TYPE_NOTIFICATION, (unsigned int)(value+0.5)); break; case SETTING_VOL_TYPE_MEDIA: retv_if(ad->mp_media == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); player = &(ad->mp_media); value = elm_slider_value_get(ad->data_media_volume->eo_check); - mm_sound_volume_set_value(VOLUME_TYPE_MEDIA, (unsigned int)(value+0.5)); + sound_manager_set_volume(SOUND_TYPE_MEDIA, (unsigned int)(value+0.5)); break; case SETTING_VOL_TYPE_SYSTEM: retv_if(ad->mp_sys == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); player = &(ad->mp_sys); value = elm_slider_value_get(ad->data_touch_volume->eo_check); - mm_sound_volume_set_value(VOLUME_TYPE_SYSTEM, (unsigned int)(value+0.5)); + sound_manager_set_volume(SOUND_TYPE_SYSTEM, (unsigned int)(value+0.5)); break; case SETTING_VOL_TYPE_NOTI_VIB: case SETTING_VOL_TYPE_HAPTIC_VIB: default: return SETTING_RETURN_FAIL; - } + } if (*player) { if (setting_profile_stop_sound(ad, *player)) { @@ -794,7 +816,7 @@ int __close_player(void *data, setting_volume_types type) } int -setting_profile_close_other_mm_players_but_type(void *data, volume_type_t type) +setting_profile_close_other_mm_players_but_type(void *data, sound_type_e type) { /* error check */ retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); @@ -803,9 +825,9 @@ setting_profile_close_other_mm_players_but_type(void *data, volume_type_t type) int ret = 0; - switch (type) + switch (type) { - case VOLUME_TYPE_RINGTONE: /* close noti, media and system players */ + case SOUND_TYPE_RINGTONE: /* close noti, media and system players */ if (__close_player(ad, SETTING_VOL_TYPE_NOTIFICATION) != SETTING_RETURN_SUCCESS) ret++; if (__close_player(ad, SETTING_VOL_TYPE_MEDIA) != SETTING_RETURN_SUCCESS) @@ -813,7 +835,7 @@ setting_profile_close_other_mm_players_but_type(void *data, volume_type_t type) if (__close_player(ad, SETTING_VOL_TYPE_SYSTEM) != SETTING_RETURN_SUCCESS) ret++; break; - case VOLUME_TYPE_NOTIFICATION: /* close ringtone, media and system players */ + case SOUND_TYPE_NOTIFICATION: /* close ringtone, media and system players */ if (__close_player(ad, SETTING_VOL_TYPE_RINGTONE) != SETTING_RETURN_SUCCESS) ret++; if (__close_player(ad, SETTING_VOL_TYPE_MEDIA) != SETTING_RETURN_SUCCESS) @@ -821,7 +843,7 @@ setting_profile_close_other_mm_players_but_type(void *data, volume_type_t type) if (__close_player(ad, SETTING_VOL_TYPE_SYSTEM) != SETTING_RETURN_SUCCESS) ret++; break; - case VOLUME_TYPE_MEDIA: /* close ringtone, noti and system players */ + case SOUND_TYPE_MEDIA: /* close ringtone, noti and system players */ if (__close_player(ad, SETTING_VOL_TYPE_RINGTONE) != SETTING_RETURN_SUCCESS) ret++; if (__close_player(ad, SETTING_VOL_TYPE_NOTIFICATION) != SETTING_RETURN_SUCCESS) @@ -829,7 +851,7 @@ setting_profile_close_other_mm_players_but_type(void *data, volume_type_t type) if (__close_player(ad, SETTING_VOL_TYPE_SYSTEM) != SETTING_RETURN_SUCCESS) ret++; break; - case VOLUME_TYPE_SYSTEM: /* close ringtone, noti and media players */ + case SOUND_TYPE_SYSTEM: /* close ringtone, noti and media players */ if (__close_player(ad, SETTING_VOL_TYPE_RINGTONE) != SETTING_RETURN_SUCCESS) ret++; if (__close_player(ad, SETTING_VOL_TYPE_NOTIFICATION) != SETTING_RETURN_SUCCESS) @@ -915,39 +937,44 @@ int setting_profile_get_call_playing_vib_by_vconf_value(int call_vib_value) } } -UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) { SETTING_TRACE_BEGIN; int ret = 0; #if SUPPORT_RUN_SYSTEM_COMMAND - ret += excuteCmd(SETTING_POSTINST_FILE, 1, "sounds"); + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "sounds"); #else ret += vconf_set_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, TRUE); ret += vconf_set_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, TRUE); - + ret += vconf_set_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, SETTING_DEFAULT_NOTI_VIB_INT); ret += vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, SETTING_DEFAULT_HAPTIC_VIB_INT); - - ret += vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, SETTING_DEFAULT_CALL_TONE); + ret += vconf_set_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_BAK_INT, SETTING_DEFAULT_HAPTIC_VIB_INT); + + if(isEmulBin()) + ret += vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, SETTING_DEFAULT_CALL_TONE_SDK); + else + ret += vconf_set_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, SETTING_DEFAULT_CALL_TONE); + ret += vconf_set_int(VCONFKEY_SETAPPL_CALL_VIBRATION_PATTERN_INT, SETTING_CALL_ALERT_VIB_TYPE3); - + ret += vconf_set_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SETTING_DEFAULT_MSG_TONE); ret += vconf_set_int(VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, SETTING_DEFAULT_ALERT_REPEAT_TYPE_INT); - + ret += vconf_set_str(VCONFKEY_SETAPPL_NOTI_EMAIL_RINGTONE_PATH_STR, SETTING_DEFAULT_EMAIL_TONE); ret += vconf_set_int(VCONFKEY_SETAPPL_NOTI_EMAIL_ALERT_REP_TYPE_INT, SETTING_DEFAULT_ALERT_REPEAT_TYPE_INT); - + ret += vconf_set_bool(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, TRUE); /* if ret is 0, finish completely */ /* if ret is minus, it means times of failure */ #endif - mm_sound_volume_set_value(VOLUME_TYPE_RINGTONE, SETTING_DEFAULT_RINGTONE_VOL_INT); - mm_sound_volume_set_value(VOLUME_TYPE_NOTIFICATION, SETTING_DEFAULT_NOTI_VOL_INT); - mm_sound_volume_set_value(VOLUME_TYPE_MEDIA, SETTING_DEFAULT_MEDIA_VOL_INT); - mm_sound_volume_set_value(VOLUME_TYPE_SYSTEM, SETTING_DEFAULT_SYSTEM_VOL_INT); + sound_manager_set_volume(SOUND_TYPE_RINGTONE, SETTING_DEFAULT_RINGTONE_VOL_INT); + sound_manager_set_volume(SOUND_TYPE_NOTIFICATION, SETTING_DEFAULT_NOTI_VOL_INT); + sound_manager_set_volume(SOUND_TYPE_MEDIA, SETTING_DEFAULT_MEDIA_VOL_INT); + sound_manager_set_volume(SOUND_TYPE_SYSTEM, SETTING_DEFAULT_SYSTEM_VOL_INT); return ret; } diff --git a/setting-reset/CMakeLists.txt b/setting-reset/CMakeLists.txt index f9b0759..c617c80 100644 --- a/setting-reset/CMakeLists.txt +++ b/setting-reset/CMakeLists.txt @@ -3,7 +3,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs_reset REQUIRED evas ecore elementary appcore-common appcore-efl tapi json-glib-1.0 ui-gadget bundle mm-sound dlog heynoti utilX ecore-x) +pkg_check_modules(pkgs_reset REQUIRED evas ecore elementary appcore-common appcore-efl tapi json-glib-1.0 ui-gadget-1 capi-appfw-application mm-sound dlog heynoti ) FOREACH(flag ${pkgs_reset_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") @@ -25,7 +25,7 @@ SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") ADD_LIBRARY(${SETTING_RESET_UG} SHARED ./src/setting-reset.c ./src/setting-reset-main.c - ) + ./src/setting-reset-settings.c) TARGET_LINK_LIBRARIES(${SETTING_RESET_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) TARGET_LINK_LIBRARIES(${SETTING_RESET_UG} ${pkgs_reset_LDFLAGS}) diff --git a/setting-reset/include/setting-reset-main.h b/setting-reset/include/setting-reset-main.h index e19ce40..e3d98d9 100755 --- a/setting-reset/include/setting-reset-main.h +++ b/setting-reset/include/setting-reset-main.h @@ -1,18 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_RESET_MAIN_H__ #define __SETTING_RESET_MAIN_H__ diff --git a/setting-reset/include/setting-reset-settings.h b/setting-reset/include/setting-reset-settings.h new file mode 100755 index 0000000..9ee2d06 --- /dev/null +++ b/setting-reset/include/setting-reset-settings.h @@ -0,0 +1,31 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_RESET_SETTINGS_H__ +#define __SETTING_RESET_SETTINGS_H__ + +#include + +#define SUPPORT_ATTEMPT_COUNT 0 + +extern setting_view setting_view_reset_password; + + +#endif /* __SETTING_RESET_SETTINGS_H__ */ diff --git a/setting-reset/include/setting-reset.h b/setting-reset/include/setting-reset.h old mode 100644 new mode 100755 index 10e4975..cf25201 --- a/setting-reset/include/setting-reset.h +++ b/setting-reset/include/setting-reset.h @@ -1,29 +1,30 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_RESET_H__ #define __SETTING_RESET_H__ #include -#include #include #include -#include -#include -#include #include @@ -32,36 +33,41 @@ #define RESET_RESULT_STR "Reset results" #define RESET_SUCESS_STR "IDS_COM_POP_SUCCESS" +#define LOAD_LIB_FAILED_STR "Exception"//"Load LIB failed" +#define UNDEFINE_STR "Undefined" //"Resetting undefined" -//"Load LIB failed" -#define LOAD_LIB_FAILED_STR "Exception" - -//"Resetting undefined" -#define UNDEFINE_STR "Undefined" - -//"Reset failed" -#define RESET_FAILED_STR "IDS_COM_POP_FAILED" - -//"vconf set failed" -#define VCONF_RESET_FAILED_STR "IDS_COM_POP_FAILED" +#define RESET_FAILED_STR "IDS_COM_POP_FAILED"//"Reset failed" +#define VCONF_RESET_FAILED_STR "IDS_COM_POP_FAILED"//"vconf set failed" #define ADN_STR " and " #define CLOSEING_STR " had been reseted just now, Setting will be closed" +//#define RESET_ALL "Reset all" #define RESET_ALL "IDS_ST_BODY_RESET_ALL" -#define RESET_ALL_DESC "IDS_ST_BODY_ALL_SETTINGS_WILL_REVERT_TO_DEFAULT_VALUES" -#define SIMPLY_SUPPORT_ALL_RESET 1 +//#define RESET_ALL_DESC "IDS_ST_BODY_ALL_SETTINGS_WILL_REVERT_TO_DEFAULT_VALUES" +#define RESET_ALL_DESC "IDS_ST_BODY_AFTER_RESETTING_PHONE_WILL_RESTART_AUTOMATICALLY" + +#define RESET_SETTINGS_STR "IDS_ST_HEADER_RESET_SETTINGS" //"Reset settings" +#define SIM_CARD_PROFILE_SETTINGS_STR "IDS_ST_MBODY_SIM_CARD_PROFILE_SETTINGS" //"SIM card profile sttings" +#define FACTORY_RESET_STR "IDS_ST_MBODY_FACTORY_RESET" //"Factory reset" + +#define SIMPLY_SUPPORT_ALL_RESET 0 +#define SUPPORT_RESET_DETAILS 1 +#define SUPPORT_SIM_CARD_PROFILE 1 +#define SUPPORT_FACTORY_RESET 1 +#define SUPPORT_RESET_OLD 0 + typedef struct _SettingResetUG SettingResetUG; /** * Setting Reset UG context - * all UG function has void* as an agument. this is casted back to SettingResetUG + * all UG function has void* as an agument. this is casted back to SettingResetUG * and the functions access app context. */ struct _SettingResetUG { - struct ui_gadget *ug; - struct ui_gadget *ug_loading; + ui_gadget_h ug; + ui_gadget_h ug_loading; /* add more variables here (move your appdata to here) */ Evas *evas; @@ -77,16 +83,26 @@ struct _SettingResetUG { Evas_Object *controllbar; Evas_Object *main_scroller; + Evas_Object *pop_factory_reset; + Setting_Done_List_Data list_data; Ecore_Animator *animator; Ecore_Idler *reset_all_idler; int gl_index; Elm_Genlist_Item_Class itc_1text; Elm_Genlist_Item_Class itc_1icon; +#if SUPPORT_RESET_DETAILS + Elm_Genlist_Item_Class itc_dlg_1text; + Elm_Genlist_Item_Class itc_seperator; + Evas_Object *ly_reset; + Evas_Object *pop; +#endif }; extern setting_view setting_view_reset_main; -int setting_reset_data_roaming(void); +extern setting_view setting_view_reset_settings; + +int setting_reset_flight_mode(); int setting_reset_rotation_lock(void); void setting_reset_result_popup_resp_cb(void *data, Evas_Object *obj, void *event_info); void setting_reset_result_popup_update(void *data); diff --git a/setting-reset/src/setting-reset-main.c b/setting-reset/src/setting-reset-main.c old mode 100644 new mode 100755 index 56422d6..c85280f --- a/setting-reset/src/setting-reset-main.c +++ b/setting-reset/src/setting-reset-main.c @@ -1,26 +1,27 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include -#include -#include -#include -#include -#define RESULT_FONT_SIZE 28 /* 18->28 */ -#define ITEM_NAME_FONT_SIZE 35 /* 22->35 */ +#define RESULT_FONT_SIZE 28//18 +#define ITEM_NAME_FONT_SIZE 35//22 static int setting_reset_main_create(void *cb); static int setting_reset_main_destroy(void *cb); @@ -34,232 +35,40 @@ setting_view setting_view_reset_main = { .cleanup = setting_reset_main_cleanup, }; -static void setting_reset_main_click_softkey_reset_cb(void *data, - Evas_Object *obj, - void *event_info); static void setting_reset_main_click_softkey_cancel_cb(void *data, Evas_Object *obj, void *event_info); - -static gboolean setting_reset_main_create_password_sg(void *data); -static void setting_reset_check_state(Setting_Done_List_Data *list_data); -static void setting_reset_main_result_password_ug_cb(struct ui_gadget *ug, - bundle *result, - void *priv); - -/* *************************************************** - * - *basic func - * - ***************************************************/ - #if SUPPORT_DYNAMIC_THEME_CHANGING -static void setting_reset_vconf_change_cb(keynode_t *key, void *data) -{ - SETTING_TRACE_BEGIN; - - ret_if(data == NULL); - SettingResetUG *ad = data; - char *vconf_name = vconf_keynode_get_name(key); - SETTING_TRACE("the value of [ %s ] just changed", vconf_name); - if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_WIDGET_THEME_STR)) { - //elm_theme_all_set(vconf_get_str(VCONFKEY_SETAPPL_WIDGET_THEME_STR)); - elm_theme_set(NULL, vconf_get_str(VCONFKEY_SETAPPL_WIDGET_THEME_STR)); - elm_config_all_flush(); - - int is_them_changed = FALSE; - vconf_get_bool(VCONFKEY_SETAPPL_THEM_CHANGED, &is_them_changed); - - if (is_them_changed && ad->notify) { - setting_reset_result_popup_update(ad); - if (ad->pop_progress) - { - evas_object_del(ad->pop_progress); - ad->pop_progress = NULL; - } - - ad->pop_progress = setting_create_popup_with_progressbar(ad, ad->win_get, - "list_prosess", - NULL, NULL, NULL, 0); - evas_object_show(ad->pop_progress); - } - return; - } -} +#if SUPPORT_RESET_DETAILS +static void setting_reset_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info); #endif -static char *__result_gl_text_get(void *data, Evas_Object *obj, - const char *part) -{ - retv_if(!data, NULL); - Setting_GenGroupItem_Data *item_data = - (Setting_GenGroupItem_Data *) data; - - if (!safeStrCmp(part, "elm.text.1")) { /* title */ - char label[HELP_MSG_BUFF_SIZE + 1] = { 0, }; - if (item_data->keyStr) - { - const char *key = setting_customize_text(_(item_data->keyStr), ITEM_NAME_FONT_SIZE, NULL, NULL); - safeStrNCat(label, key,HELP_MSG_BUFF_SIZE); - FREE(key); - } - if (item_data->sub_desc) - { - safeStrNCat(label, ": ",HELP_MSG_BUFF_SIZE); - const char *sub_desc = setting_customize_text(_(item_data->sub_desc), RESULT_FONT_SIZE, NULL, NULL); - safeStrNCat(label, sub_desc,HELP_MSG_BUFF_SIZE); - FREE(sub_desc); - } - return (char *)g_strdup(label); - } - return NULL; -} - -static void __processing_popup_response_cb(void *data, Evas_Object *obj, - void *event_info) -{ - ret_if(!data); - SettingResetUG *ad = data; - setting_reset_special_process(ad); - if (ad->notify) { - evas_object_del(ad->notify); - ad->notify = NULL; - } - // key ungrab: after showing the result popup - Ecore_X_Display *disp = ecore_x_display_get(); - Ecore_X_Window xwin = elm_win_xwindow_get((Evas_Object*)ug_get_window()); - int ret = utilx_ungrab_key(disp, xwin, KEY_HOME); - if (ret) { - SETTING_TRACE_ERROR("KEY_HOME ungrab error ret[%d]", ret); - } -} -bool __reset_all_idler(void *data) +#if SUPPORT_FACTORY_RESET +static bool is_factory_reset_installed() { - SETTING_TRACE_BEGIN; - retv_if(!data, FALSE); - SettingResetUG *ad = data; + char *file_name = "/usr/bin/factory-reset"; - int i = 0; - int j = 0; - int idx = 0; - const char *result_str = RESET_SUCESS_STR; - char ug_file[PATH_MAX + 1]; - char *path = NULL; - bundle *b = NULL; - int ret = -1; - char *ug_args; - char *item_name = NULL; - - for (; i < setting_cfg_get_category_length(); i++) { - SETTING_TRACE("group is:%s", _(setting_cfg_get_category_name(i))); - - // init state - result_str = RESET_SUCESS_STR; - - for (j = 0; j < setting_cfg_get_menu_length(i); j++) { - SETTING_TRACE("i:%d\tj:%d", i, j); - if (Cfg_Item_unResetable == - setting_cfg_get_resetable_flag_idx(i, j)) - { - // SETTING_TRACE("process %s:%s skipped",_(item_name), ug_args); - continue; - } - ug_args = setting_cfg_get_ug_args_idx(i, j); - item_name = setting_cfg_get_keyname_idx(i, j); - SETTING_TRACE(">>> process %s:%s",_(item_name), ug_args); - - idx++; - if (NULL == ug_args) /*special process*/ - { - if (!safeStrCmp(KeyStr_DataRoaming, item_name)) { - ret = setting_reset_data_roaming(); - } else if (!safeStrCmp(KeyStr_Landscape, item_name)) { - ret = setting_reset_rotation_lock(); - } - //.. - if (0 > ret) - { - result_str = RESET_FAILED_STR; - } - } - else - { - path = get_ug_path_from_ug_args((void *)ug_args); - b = get_bundle_from_ug_args((void *)ug_args); - - if (snprintf(ug_file, PATH_MAX, "%s/libug-%s.so", SETTING_UG_PATH, path) < 0) { - ad->reset_all_idler = NULL; - return FALSE; - } - - ret = setting_invoke_reset_function(ug_file, b, NULL); - //SETTING_TRACE("load %s[plugin_ret:%d]", ug_file, ret); - - if (OPERATE_LIB_SUCESS > ret) - { - result_str = RESET_FAILED_STR; - - } - - if (b){ - bundle_free(b); - b = NULL; - } - FREE(path); - memset(ug_file, 0, PATH_MAX); - } - SETTING_TRACE("process %s:%s %s",_(item_name), ug_args, _(result_str)); - } + struct stat st; + if(stat(file_name, &st) == 0) + { + return true; + } + else + { + SETTING_TRACE_ERROR(" %s is *NOT* present\n", file_name); + return false; } - - SETTING_TRACE_DEBUG("Reset totally %d items. result_str:%s", idx, result_str); - elm_object_text_set(ad->notify, _(result_str)); - elm_popup_timeout_set(ad->notify, 2); - ad->reset_all_idler = NULL; - return FALSE; } +#endif -static void __reset_all_button_cb(void *data, Evas_Object *obj, void *event_info) -{ - SETTING_TRACE_BEGIN; - ret_if(!data); - Setting_GenGroupItem_Data *item_Data = data; - ret_if(!item_Data->userdata); - SettingResetUG *ad = item_Data->userdata; - - - char pw_pass[SETTING_STR_SLP_LEN] = { 0, }; - int err = 0; - - /* Check Password Setting status */ - int ret = - setting_get_string_slp_key(STR_SLP_LIST_PHONE_PASSWORD, - pw_pass, &err); - SETTING_TRACE("pw_pass:%s", pw_pass); - if (SETTING_RETURN_SUCCESS == ret && '\0' != pw_pass[0]) { - setting_reset_main_create_password_sg(ad); - return; - } - - // key grab: before showing processing popup - Ecore_X_Display *disp = ecore_x_display_get(); - Ecore_X_Window xwin = elm_win_xwindow_get((Evas_Object*)ug_get_window()); - ret = utilx_grab_key(disp, xwin, KEY_HOME, TOP_POSITION_GRAB); - if (ret) { - SETTING_TRACE_ERROR("KEY_HOME grab error ret[%d]", ret); - } - ad->notify = - setting_create_popup_without_btn(ad, ad->win_get, _("IDS_COM_POP_PROCESSING"), NULL, __processing_popup_response_cb, 0); - if (ad->reset_all_idler) { - ecore_idler_del(ad->reset_all_idler); - ad->reset_all_idler = NULL; - } - ad->reset_all_idler = - ecore_idler_add((Ecore_Task_Cb) __reset_all_idler, ad); -} +/* *************************************************** + * + *basic func + * + ***************************************************/ static int setting_reset_main_create(void *cb) { SETTING_TRACE_BEGIN; @@ -268,7 +77,7 @@ static int setting_reset_main_create(void *cb) SettingResetUG *ad = (SettingResetUG *) cb; Evas_Object *scroller = NULL; -#if SIMPLY_SUPPORT_ALL_RESET +#if SIMPLY_SUPPORT_ALL_RESET ad->ly_main = setting_create_layout_navi_bar_genlist(ad->win_main_layout, ad->win_get, @@ -292,9 +101,6 @@ static int setting_reset_main_create(void *cb) item_data->keyStr = (char *)g_strdup(RESET_ALL); item_data->swallow_type = SWALLOW_Type_1BUTTON; - if (Theme_Tizen_Black == setting_get_theme()) - item_data->r_swallow_path = (char *)g_strdup("sweep");//pass button style - item_data->chk_change_cb = __reset_all_button_cb; item_data->item = elm_genlist_item_append(scroller, &(ad->itc_1icon), item_data, NULL, ELM_GENLIST_ITEM_NONE, @@ -304,7 +110,60 @@ static int setting_reset_main_create(void *cb) return SETTING_RETURN_SUCCESS; #endif +#if SUPPORT_RESET_DETAILS + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("IDS_COM_BODY_RESET"), + _("IDS_COM_BODY_BACK"), NULL, + setting_reset_main_click_softkey_cancel_cb, + NULL, ad, &scroller, + &(ad->navi_bar)); + + Elm_Object_Item *item = NULL;; + + item = + elm_genlist_item_append(scroller, &itc_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* 1. Reset settings */ + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_reset_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0, RESET_SETTINGS_STR, NULL, NULL); +#if SUPPORT_SIM_CARD_PROFILE + /* 2. SIM card profile settings */ + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_reset_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0, SIM_CARD_PROFILE_SETTINGS_STR, NULL, NULL); +#endif +#if SUPPORT_FACTORY_RESET + /* 3. Factory reset */ + setting_create_Gendial_field_def(scroller, &itc_1text, + setting_reset_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0,FACTORY_RESET_STR, NULL, NULL); + +#endif +#if DISABLED_CODE + /* Description */ + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, RESET_ALL_DESC, + NULL, NULL); +#endif + setting_view_reset_main.is_create = 1; + ad->main_scroller = scroller; + return SETTING_RETURN_SUCCESS; +#endif + +#if SUPPORT_RESET_OLD Evas_Object *navi_bar = NULL; Evas_Object *controllbar = NULL; @@ -314,9 +173,10 @@ static int setting_reset_main_create(void *cb) "selinfo_bottom"); evas_object_size_hint_weight_set(view_layout, EVAS_HINT_EXPAND, 0.0); + /* Evas_Object * win_layout, Evas_Object * win_obj */ ad->ly_main = setting_create_layout_navi_bar(ad->win_main_layout, ad->win_get, - S_("IDS_COM_BODY_RESET"), + _("IDS_COM_BODY_RESET"), _("IDS_COM_SK_CANCEL"), _("IDS_COM_BODY_RESET"), NULL, setting_reset_main_click_softkey_cancel_cb, @@ -341,21 +201,22 @@ static int setting_reset_main_create(void *cb) int i = 0; int j = 0; - + for (; i < setting_cfg_get_category_length(); i++) { SETTING_TRACE("group is:%s", _(setting_cfg_get_category_name(i))); - + for (j = 0; j < setting_cfg_get_menu_length(i); j++) { - if (Cfg_Item_unResetable == + /*SETTING_TRACE("i:%d\tj:%d", i, j);*/ + if (Cfg_Item_unResetable == setting_cfg_get_resetable_flag_idx(i, j)) { continue; } - list_data->chk_items[idx].ug_args = ug_args = + list_data->chk_items[idx].ug_args = ug_args = setting_cfg_get_ug_args_idx(i, j); - list_data->chk_items[idx].item_name = item_name = + list_data->chk_items[idx].item_name = item_name = setting_cfg_get_keyname_idx(i, j); - + SETTING_TRACE("process %s:\t%s",_(item_name), ug_args); idx++; } @@ -373,11 +234,8 @@ static int setting_reset_main_create(void *cb) setting_view_reset_main.is_create = 1; ad->itc_1text.func.text_get = __result_gl_text_get; - #if SUPPORT_DYNAMIC_THEME_CHANGING - (void) vconf_notify_key_changed(VCONFKEY_SETAPPL_WIDGET_THEME_STR, - setting_reset_vconf_change_cb, ad); - #endif return SETTING_RETURN_SUCCESS; +#endif } static int setting_reset_main_destroy(void *cb) @@ -387,10 +245,6 @@ static int setting_reset_main_destroy(void *cb) retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); SettingResetUG *ad = (SettingResetUG *) cb; - #if SUPPORT_DYNAMIC_THEME_CHANGING - (void)vconf_ignore_key_changed(VCONFKEY_SETAPPL_WIDGET_THEME_STR, - setting_reset_vconf_change_cb); - #endif if (ad->notify) { evas_object_del(ad->notify); ad->notify = NULL; @@ -404,12 +258,12 @@ static int setting_reset_main_destroy(void *cb) evas_object_del(ad->pop_progress); ad->pop_progress = NULL; } - + if (ad->ask_popup) { evas_object_del(ad->ask_popup); ad->ask_popup = NULL; - } + } if (ad->animator) { ecore_animator_del(ad->animator); @@ -454,166 +308,13 @@ static int setting_reset_main_cleanup(void *cb) return SETTING_RETURN_SUCCESS; } -/* *************************************************** - * - *general func - * - ***************************************************/ - -static void __reset_an_item(Setting_Done_List_Data *list_data, - const char *item_name, - const char *ug_args) -{ - SettingResetUG *ad = (SettingResetUG *) list_data->UG_data; - Evas_Object *genlist = elm_object_content_get(ad->notify); - Setting_GenGroupItem_Data *item_data = NULL; - const char *result_str = RESET_SUCESS_STR; - if (NULL == ug_args) /*special process*/ - { - int ret = -1; - if (!safeStrCmp(KeyStr_DataRoaming, item_name)) { - ret = setting_reset_data_roaming(); - } else if (!safeStrCmp(KeyStr_Landscape, item_name)) { - ret = setting_reset_rotation_lock(); - } - //.. - if (0 > ret) - { - result_str = VCONF_RESET_FAILED_STR; - } - - item_data = setting_create_Gendial_field_def(genlist, &(ad->itc_1text), - NULL, ad, - SWALLOW_Type_LAYOUT_SPECIALIZTION, - NULL, NULL, 0, - (char *)item_name, - (char *)result_str, NULL); - - } else - { - char *path = get_ug_path_from_ug_args((void *)ug_args); - bundle *b = get_bundle_from_ug_args((void *)ug_args); - char ug_file[PATH_MAX]; - if (snprintf(ug_file, PATH_MAX, - "%s/libug-%s.so", SETTING_UG_PATH, path) < 0) return; - - int plugin_ret = setting_invoke_reset_function(ug_file, b, NULL); - SETTING_TRACE("load %s[plugin_ret:%d]", ug_file, plugin_ret); - - if (LOAD_LIB_FAILED == plugin_ret) // -1 - { - result_str = LOAD_LIB_FAILED_STR; - - } else if (UNDEFINED_LIB_SYMBOL == plugin_ret) // -2 - { - result_str = UNDEFINE_STR; - } else if (OPERATE_LIB_SUCESS <= plugin_ret){ // 0 - result_str = RESET_SUCESS_STR; - - } else { - result_str = RESET_FAILED_STR; - } - - if (b){ - bundle_free(b); - b = NULL; - } - if (path){ - FREE(path); - path = NULL; - } - - item_data = setting_create_Gendial_field_def(genlist, &(ad->itc_1text), - NULL, ad, - SWALLOW_Type_LAYOUT_SPECIALIZTION, - NULL, NULL, 0, - (char *)item_name, - (char *)result_str, NULL); - } - - if (item_data) - elm_genlist_item_show(item_data->item, ELM_GENLIST_ITEM_SCROLLTO_IN);//show the last item - else - SETTING_TRACE_ERROR("error : item_data is NULL"); -} - -static Eina_Bool __reset_animator_cb(void *data) -{ - SettingResetUG *ad = (SettingResetUG *) data; - - SETTING_TRACE("Processing the %dth of %d", - ad->gl_index, ad->list_data.cur_item_num); - if (ad->gl_index >= ad->list_data.cur_item_num) { - ecore_animator_del(ad->animator); - ad->animator = NULL; - if (ad->pop_progress) { - evas_object_del(ad->pop_progress); - ad->pop_progress = NULL; - } - - return ECORE_CALLBACK_CANCEL; - } - if (ad->list_data.chk_items[ad->gl_index].data_GenItem->chk_status) { - __reset_an_item(&(ad->list_data), - ad->list_data.chk_items[ad->gl_index].item_name, - ad->list_data.chk_items[ad->gl_index].ug_args); - - /*unselect item*/ - elm_check_state_set(ad->list_data.chk_items[ad->gl_index].data_GenItem->eo_check, 0); - ad->list_data.chk_items[ad->gl_index].data_GenItem->chk_status = 0; - } - - ad->gl_index++; - return ECORE_CALLBACK_RENEW; -} - - -static void setting_reset_check_state(Setting_Done_List_Data *list_data) -{ - /* reset */ - SETTING_TRACE_DEBUG("********resetting*******"); - - SettingResetUG *ad = (SettingResetUG *) list_data->UG_data; - - //some item must have been selected, or else cannot go into setting_reset_check_state() - ad->notify = elm_popup_add(ad->win_get); - elm_object_style_set(ad->notify,"menustyle"); - elm_object_part_text_set(ad->notify, "title,text", RESET_RESULT_STR); - evas_object_size_hint_weight_set(ad->notify, - EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - - Evas_Object *btn = setting_create_button(ad->notify, _("IDS_COM_SK_OK"), NULL, setting_reset_result_popup_resp_cb, ad); - elm_object_part_content_set(ad->notify, "button1", btn); - - - Evas_Object *genlist = elm_genlist_add(ad->notify); - 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_object_content_set(ad->notify, genlist); - - evas_object_show(ad->notify); - ad->pop_progress = setting_create_popup_with_progressbar(ad, ad->win_get, - "list_prosess", - NULL, NULL, NULL, 0); - - ad->gl_index = 0; - ad->animator = ecore_animator_add(__reset_animator_cb, ad); - - /* reset sel_all item */ - elm_check_state_set(list_data->chk_items[0].data_GenItem->eo_check, 0); - list_data->chk_items[0].data_GenItem->chk_status = 0; - -} +/* + execute /usr/bin/factory-reset after creating a process with fork() + */ static void -setting_reset_main_result_password_ug_cb(struct ui_gadget *ug, bundle *result, +setting_reset_main_result_password_ug_cb(ui_gadget_h ug, service_h result, void *priv) { SETTING_TRACE_BEGIN; @@ -622,32 +323,36 @@ setting_reset_main_result_password_ug_cb(struct ui_gadget *ug, bundle *result, SettingResetUG *ad = (SettingResetUG *) priv; - const char *ret_str = bundle_get_val(result, "result"); + char *ret_str = NULL; + service_get_extra_data(result, "result", &ret_str); SETTING_TRACE("result:%s", ret_str); retm_if(ret_str == NULL, "result paremeter is NULL"); if (ret_str) { - if (0 == safeStrCmp("SETTING_PW_TYPE_RESET", ret_str)) { - /* Reset */ - #if SIMPLY_SUPPORT_ALL_RESET - ad->notify = - setting_create_popup_without_btn(ad, ad->win_get, _("IDS_COM_POP_PROCESSING"), NULL, __processing_popup_response_cb, 0); - if (ad->reset_all_idler) { - ecore_idler_del(ad->reset_all_idler); - ad->reset_all_idler = NULL; + if (0 == safeStrCmp("Cancel", ret_str)) { + /* Do not reset */ + } + else if (0 == safeStrCmp("SETTING_PW_TYPE_RESET", ret_str)) { + ug_destroy(ad->ug_loading); + ad->ug_loading = NULL; + /* do factory reset here. */ + int pid = -1; + pid = fork(); + setting_retm_if(pid < 0, "failed to fork"); + + if (pid == 0) { + char *environ[] = { NULL }; + char *argv[] = {"factory-reset"}; + execve("/usr/bin/factory-reset", argv, environ); + exit(0); } - ad->reset_all_idler = - ecore_idler_add((Ecore_Task_Cb) __reset_all_idler, ad); - #else - setting_reset_check_state(&(ad->list_data)); - #endif } } } static void -setting_reset_main_layout_ug_cb(struct ui_gadget *ug, enum ug_mode mode, +setting_reset_main_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) { SettingResetUG *ad = (SettingResetUG *) priv; @@ -671,16 +376,14 @@ setting_reset_main_layout_ug_cb(struct ui_gadget *ug, enum ug_mode mode, default: break; } - - /* TODO animation effect here */ SETTING_TRACE_END; } -static void setting_reset_main_destroy_password_ug_cb(struct ui_gadget *ug, +static void setting_reset_main_destroy_password_ug_cb(ui_gadget_h ug, void *priv) { SETTING_TRACE_BEGIN; - + /* if(ug) ug_destroy(ug); */ ret_if(!priv); SettingResetUG *ad = (SettingResetUG *) priv; if (ug) { @@ -690,7 +393,7 @@ static void setting_reset_main_destroy_password_ug_cb(struct ui_gadget *ug, } -static gboolean setting_reset_main_create_password_sg(void *data) +static bool setting_reset_main_create_password_sg(void *data) { SETTING_TRACE_BEGIN; /* error check */ @@ -705,83 +408,133 @@ static gboolean setting_reset_main_create_password_sg(void *data) cbs->result_cb = setting_reset_main_result_password_ug_cb; cbs->destroy_cb = setting_reset_main_destroy_password_ug_cb; cbs->priv = (void *)ad; - bundle *b = bundle_create(); - if (!b) { + service_h svc; + if (service_create(&svc)) { FREE(cbs); return FALSE; } - bundle_add(b, "viewtype", "SETTING_PW_TYPE_RESET"); + service_add_extra_data(svc, "viewtype", "SETTING_PW_TYPE_RESET"); ad->ug_loading = - ug_create(ad->ug, "setting-password-efl", UG_MODE_FULLVIEW, b, cbs); + ug_create(ad->ug, "setting-password-efl", UG_MODE_FULLVIEW, svc, cbs); if (NULL == ad->ug_loading) { /* error handling */ } - bundle_free(b); + service_destroy(svc); FREE(cbs); return TRUE; } -/* *************************************************** - * - *call back func - * - ***************************************************/ - -static void -setting_reset_main_click_softkey_cancel_cb(void *data, Evas_Object *obj, +static void __ask_create_factory_reset_resp_cb(void *data, Evas_Object *obj, void *event_info) { SETTING_TRACE_BEGIN; - /* error check */ - retm_if(data == NULL, "Data parameter is NULL"); SettingResetUG *ad = (SettingResetUG *) data; - if (ad->list_data.selInfoPop) { - evas_object_del(ad->list_data.selInfoPop); - ad->list_data.selInfoPop = NULL; + ret_if(NULL == data); + + int response_type = btn_type(obj); + int screen_lock_type = 0; + + if (POPUP_RESPONSE_OK == response_type) { + SETTING_TRACE("OK"); + vconf_get_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, &screen_lock_type); + if(screen_lock_type == SETTING_SCREEN_LOCK_TYPE_PASSWORD + || screen_lock_type == SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD) + { + setting_reset_main_create_password_sg(ad); + } + else + { + /* do factory reset here. */ + int pid = -1; + pid = fork(); + setting_retm_if(pid < 0, "failed to fork"); + + if (pid == 0) { + char *environ[] = { NULL }; + char *argv[] = {"factory-reset"}; + execve("/usr/bin/factory-reset", argv, environ); + exit(0); + } + } + } else if (POPUP_RESPONSE_CANCEL == response_type) { + SETTING_TRACE("NO"); + // do nothing } - /* Send destroy request */ - ug_destroy_me(ad->ug); + + evas_object_del(ad->pop_factory_reset); + ad->pop_factory_reset = NULL; } +#if SUPPORT_RESET_DETAILS static void -setting_reset_main_click_softkey_reset_cb(void *data, Evas_Object *obj, - void *event_info) +setting_reset_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info) { - SETTING_TRACE_BEGIN; /* error check */ - retm_if(data == NULL, "Data parameter is NULL"); + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); SettingResetUG *ad = (SettingResetUG *) data; - //every time clicking 'Reset' button, restore following VCONFs - vconf_set_bool(VCONFKEY_SETAPPL_FONT_CHANGED, FALSE); - vconf_set_bool(VCONFKEY_SETAPPL_THEM_CHANGED, FALSE); + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); - if (ad->list_data.selInfoPop) { - evas_object_del(ad->list_data.selInfoPop); - ad->list_data.selInfoPop = NULL; + if (!safeStrCmp(RESET_SETTINGS_STR, list_item->keyStr)) + { + setting_view_change(&setting_view_reset_main, &setting_view_reset_settings, ad); } +#if SUPPORT_SIM_CARD_PROFILE + else if (!safeStrCmp(SIM_CARD_PROFILE_SETTINGS_STR, list_item->keyStr)) + { + /* TBD */ + SETTING_TRACE("SIM-CARD PROFILE"); + setting_create_simple_popup(NULL, ad->win_get, NULL, "NOT IMPLMENTED YET"); + } +#endif +#if SUPPORT_FACTORY_RESET + else if (!safeStrCmp(FACTORY_RESET_STR, list_item->keyStr)) + { + /* TBD */ + SETTING_TRACE("FACTORY RESET"); - if (!setting_done_list_is_some_item_selected(&(ad->list_data))) { - setting_create_popup_without_title(NULL, ad->win_get, - "No item selected"); - } else { - char pw_pass[SETTING_STR_SLP_LEN] = { 0, }; - int err = 0; - - /* Check Password Setting status */ - int ret = - setting_get_string_slp_key(STR_SLP_LIST_PHONE_PASSWORD, - pw_pass, &err); - SETTING_TRACE("pw_pass:%s", pw_pass); - if (SETTING_RETURN_SUCCESS == ret && '\0' != pw_pass[0]) { - setting_reset_main_create_password_sg(ad); + if(is_factory_reset_installed()) + { + //setting_create_simple_popup(NULL, ad->win_get, NULL, "NOT IMPLMENTED YET"); + ad->pop_factory_reset = setting_create_popup_with_btn(ad, + ad->win_get, + NULL, _("Reset all settings and delete all data. This cannot be stopped once started"), + __ask_create_factory_reset_resp_cb, + 0, 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); } else { - setting_reset_check_state(&(ad->list_data)); + setting_create_simple_popup(NULL, ad->win_get, NULL, "NOT SUPPORTED"); } + } +#endif + /* to do : */ +} +#endif + +static void +setting_reset_main_click_softkey_cancel_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + SettingResetUG *ad = (SettingResetUG *) data; + if (ad->list_data.selInfoPop) { + evas_object_del(ad->list_data.selInfoPop); + ad->list_data.selInfoPop = NULL; } + /* Send destroy request */ + ug_destroy_me(ad->ug); } + diff --git a/setting-reset/src/setting-reset-settings.c b/setting-reset/src/setting-reset-settings.c new file mode 100755 index 0000000..52a97e7 --- /dev/null +++ b/setting-reset/src/setting-reset-settings.c @@ -0,0 +1,716 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#include +#include +#include + +#define RESULT_FONT_SIZE 28//18 +#define ITEM_NAME_FONT_SIZE 35//22 + +static int setting_reset_settings_create(void *cb); +static int setting_reset_settings_destroy(void *cb); +static int setting_reset_settings_update(void *cb); +static int setting_reset_settings_cleanup(void *cb); + +setting_view setting_view_reset_settings = { + .create = setting_reset_settings_create, + .destroy = setting_reset_settings_destroy, + .update = setting_reset_settings_update, + .cleanup = setting_reset_settings_cleanup, +}; + +static void setting_reset_settings_click_softkey_reset_cb(void *data, + Evas_Object *obj, + void *event_info); +static void setting_reset_settings_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info); + +static bool setting_reset_settings_create_password_sg(void *data); +static void setting_reset_settings_check_state(Setting_Done_List_Data *list_data); +static void setting_reset_settings_result_password_ug_cb(ui_gadget_h ug, + service_h result, + void *priv); + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static char *__result_gl_text_get(void *data, Evas_Object *obj, + const char *part) +{ + retv_if(!data, NULL); + Setting_GenGroupItem_Data *item_data = + (Setting_GenGroupItem_Data *) data; + //SETTING_TRACE("part:%s", part); + + if (!safeStrCmp(part, "elm.text.1")) { /* title */ + char label[HELP_MSG_BUFF_SIZE + 1] = { 0, }; + if (item_data->keyStr) + { + const char *key = setting_customize_text(_(item_data->keyStr), ITEM_NAME_FONT_SIZE, NULL, NULL); + safeStrNCat(label, key,HELP_MSG_BUFF_SIZE); + FREE(key); + } + if (item_data->sub_desc) + { + safeStrNCat(label, ": ",HELP_MSG_BUFF_SIZE); + const char *sub_desc = setting_customize_text(_(item_data->sub_desc), RESULT_FONT_SIZE, NULL, NULL); + safeStrNCat(label, sub_desc,HELP_MSG_BUFF_SIZE); + FREE(sub_desc); + } + return (char *)g_strdup(label); + } + return NULL; +} +#if SIMPLY_SUPPORT_ALL_RESET +static void __processing_popup_response_cb(void *data, Evas_Object *obj, + void *event_info) +{ + ret_if(!data); + SettingResetUG *ad = data; + setting_reset_special_process(ad); + if (obj) { + evas_object_del(obj); + obj = NULL; + } + ad->notify= NULL; + + // key ungrab: after showing the result popup + Ecore_X_Display *disp = ecore_x_display_get(); + Ecore_X_Window xwin = elm_win_xwindow_get((Evas_Object*)ug_get_window()); + int ret = utilx_ungrab_key(disp, xwin, KEY_HOME); + if (ret) { + SETTING_TRACE_ERROR("KEY_HOME ungrab error ret[%d]", ret); + } +} +#endif +#if SIMPLY_SUPPORT_ALL_RESET +bool __reset_all_idler(void *data) +{ + SETTING_TRACE_BEGIN; + retv_if(!data, FALSE); + SettingResetUG *ad = data; + + int i = 0; + int j = 0; + int idx = 0; + const char *result_str = RESET_SUCESS_STR; + char ug_file[PATH_MAX + 1]; + char *path = NULL; + service_h svc; + int ret = -1; + char *ug_args; + char *item_name; + + for (; i < setting_cfg_get_category_length(); i++) { + //SETTING_TRACE("group is:%s", _(setting_cfg_get_category_name(i))); + + result_str = RESET_SUCESS_STR; + for (j = 0; j < setting_cfg_get_menu_length(i); j++) { + /*SETTING_TRACE("i:%d\tj:%d", i, j);*/ + if (Cfg_Item_unResetable == + setting_cfg_get_resetable_flag_idx(i, j)) + { + //SETTING_TRACE("process %s:%s skipped",_(item_name), ug_args); + continue; + } + ug_args = setting_cfg_get_ug_args_idx(i, j); + item_name = setting_cfg_get_keyname_idx(i, j); + if (item_name) + SETTING_TRACE(">>> process %s:%s",_(item_name), ug_args); + + idx++; + if (NULL == ug_args) /*special process*/ + { + ret = -1; + if (!safeStrCmp(KeyStr_FlightMode, item_name)) { + //Invoke aync API and ignore the response message + ret = setting_reset_flight_mode(); + } else if (!safeStrCmp(KeyStr_Landscape, item_name)) { + ret = setting_reset_rotation_lock(); + } + //.. + if (0 > ret) + { + result_str = RESET_FAILED_STR; + } + + + } + else + { + path = get_ug_path_from_ug_args((void *)ug_args); + svc = get_bundle_from_ug_args((void *)ug_args); + + if (snprintf(ug_file, PATH_MAX, "%s/libug-%s.so", SETTING_UG_PATH, path) < 0) + return FALSE; + + ret = setting_invoke_reset_function(ug_file, svc, NULL); + //SETTING_TRACE("load %s[plugin_ret:%d]", ug_file, ret); + + if (OPERATE_LIB_SUCESS > ret) + { + result_str = RESET_FAILED_STR; + + } + + service_destroy(svc); + FREE(path); + memset(ug_file, 0, PATH_MAX); + } + SETTING_TRACE("process %s:%s %s",_(item_name), ug_args, _(result_str)); + } + } + + //list_data->cur_item_num = idx; + SETTING_TRACE_DEBUG("Reset totally %d items. result_str:%s", idx, result_str); + //setting_create_popup_with_notitle(NULL, ad->win_get, _(result_str)); + elm_popup_desc_set(ad->notify, _(result_str)); + elm_popup_mode_set(ad->notify, POPUP_INTERVAL); + elm_popup_timeout_set(ad->notify, 2); + + if (ad->reset_all_idler) { + ecore_idler_del(ad->reset_all_idler); + ad->reset_all_idler = NULL; + } + return FALSE; +} +#endif +#if SIMPLY_SUPPORT_ALL_RESET +static void __reset_all_button_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + ret_if(!data); + Setting_GenGroupItem_Data *item_Data = data; + ret_if(!item_Data->userdata); + SettingResetUG *ad = item_Data->userdata; + + + char pw_pass[SETTING_STR_SLP_LEN] = { 0, }; + int err = 0; + + /* Check Password Setting status */ + int ret = + setting_get_string_slp_key(STR_SLP_LIST_PHONE_PASSWORD, + pw_pass, &err); + SETTING_TRACE("pw_pass:%s", pw_pass); + if (SETTING_RETURN_SUCCESS == ret && '\0' != pw_pass[0]) { + setting_reset_settings_create_password_sg(ad); + return; + } + + // key grab: before showing processing popup + Ecore_X_Display *disp = ecore_x_display_get(); + Ecore_X_Window xwin = elm_win_xwindow_get((Evas_Object*)ug_get_window()); + ret = utilx_grab_key(disp, xwin, KEY_HOME, TOP_POSITION_GRAB); + if (ret) { + SETTING_TRACE_ERROR("KEY_HOME grab error ret[%d]", ret); + } + + ad->notify = + setting_create_popup_without_btn(ad, ad->win_get, NULL, _("IDS_COM_POP_PROCESSING"), __processing_popup_response_cb, 0, 1, 1); + if (ad->reset_all_idler) { + ecore_idler_del(ad->reset_all_idler); + ad->reset_all_idler = NULL; + } + + ad->reset_all_idler = + ecore_idler_add((Ecore_Task_Cb) __reset_all_idler, ad); +} +#endif +static int setting_reset_settings_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingResetUG *ad = (SettingResetUG *) cb; + Evas_Object *scroller = NULL; + Evas_Object *controllbar = NULL; + + Evas_Object *view_layout = elm_layout_add(ad->win_main_layout); + elm_layout_file_set(view_layout, SETTING_THEME_EDJ_NAME, + "selinfo_bottom"); + evas_object_size_hint_weight_set(view_layout, EVAS_HINT_EXPAND, 0.0); + + /* Evas_Object * win_layout, Evas_Object * win_obj */ + setting_push_layout_navi_bar(_(RESET_SETTINGS_STR), + _("IDS_COM_BODY_RESET"), + _("IDS_COM_SK_CANCEL"), NULL, + setting_reset_settings_click_softkey_reset_cb, + setting_reset_settings_click_softkey_cancel_cb, + NULL, ad, view_layout, ad->navi_bar, + &controllbar); + //elm_controlbar_item_disabled_set(elm_controlbar_last_item_get + // (controllbar), EINA_TRUE); + + /* ******************************************create frame */ + Setting_Done_List_Data *list_data = &(ad->list_data); /* define a handle */ + int idx = 0; + list_data->win_main = ad->win_main_layout; + list_data->UG_data = ad; + list_data->ly_parent = view_layout; + list_data->controllbar = controllbar; + list_data->select_all_checked = EINA_FALSE; + + char *ug_args; + char *item_name; + + int i = 0; + int j = 0; + + for (; i < setting_cfg_get_category_length(); i++) { + SETTING_TRACE("group is:%s", _(setting_cfg_get_category_name(i))); + + for (j = 0; j < setting_cfg_get_menu_length(i); j++) { + /*SETTING_TRACE("i:%d\tj:%d", i, j);*/ + if (Cfg_Item_unResetable == + setting_cfg_get_resetable_flag_idx(i, j)) + { + continue; + } + list_data->chk_items[idx].ug_args = ug_args = + setting_cfg_get_ug_args_idx(i, j); + list_data->chk_items[idx].item_name = item_name = + setting_cfg_get_keyname_idx(i, j); + + SETTING_TRACE("process %s:\t%s",_(item_name), ug_args); + idx++; + } + } + + list_data->cur_item_num = idx; + SETTING_TRACE("list_data->cur_item_num:%d", list_data->cur_item_num); + scroller = setting_create_done_list(list_data); + elm_object_part_content_set(view_layout, "elm.swallow.contents", scroller); + + ad->view_layout = view_layout; + ad->controllbar = controllbar; + /* *******************************************update info */ + + setting_view_reset_settings.is_create = 1; + ad->itc_1text.func.text_get = __result_gl_text_get; + return SETTING_RETURN_SUCCESS; +} + +static int setting_reset_settings_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingResetUG *ad = (SettingResetUG *) cb; + + if (ad->list_data.selInfoPop) { + evas_object_del(ad->list_data.selInfoPop); + ad->list_data.selInfoPop = NULL; + } + if (ad->notify) { + evas_object_del(ad->notify); + ad->notify = NULL; + } + if (ad->old_notify) { + evas_object_del(ad->old_notify); + ad->old_notify = NULL; + } + if (ad->pop) + { + evas_object_del(ad->pop); + ad->pop = NULL; + } + if (ad->pop_progress) + { + evas_object_del(ad->pop_progress); + ad->pop_progress = NULL; + } + + if (ad->ask_popup) + { + evas_object_del(ad->ask_popup); + ad->ask_popup = NULL; + } + if (ad->animator) + { + ecore_animator_del(ad->animator); + ad->animator = NULL; + } + + if (ad->reset_all_idler) { + ecore_idler_del(ad->reset_all_idler); + ad->reset_all_idler = NULL; + } + + elm_naviframe_item_pop(ad->navi_bar); + setting_view_reset_settings.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_reset_settings_update(void *cb) +{ + SETTING_TRACE_BEGIN; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_reset_settings_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + //SettingResetUG *ad = (SettingResetUG *) cb; + + setting_reset_settings_destroy(cb); + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +static void __reset_an_item(Setting_Done_List_Data *list_data, + const char *item_name, + const char *ug_args) +{ + SettingResetUG *ad = (SettingResetUG *) list_data->UG_data; + if(ad == NULL) + return; + + Evas_Object *genlist = elm_object_content_get(ad->notify); + Setting_GenGroupItem_Data *item_data = NULL; + const char *result_str = RESET_SUCESS_STR; + if (NULL == ug_args) /*special process*/ + { + int ret = -1; + if (!safeStrCmp(KeyStr_FlightMode, item_name)) { + //Invoke aync API and ignore the response message + ret = setting_reset_flight_mode(); + } else if (!safeStrCmp(KeyStr_Landscape, item_name)) { + ret = setting_reset_rotation_lock(); + } + //.. + if (0 > ret) + { + result_str = VCONF_RESET_FAILED_STR; + } + + item_data = setting_create_Gendial_field_def(genlist, &(ad->itc_1text), + NULL, ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION, + NULL, NULL, 0, + (char *)item_name, + (char *)result_str, NULL); + + } else + { + char *path = get_ug_path_from_ug_args((void *)ug_args); + service_h svc = get_bundle_from_ug_args((void *)ug_args); + char ug_file[PATH_MAX]; + if (snprintf(ug_file, PATH_MAX, + "%s/libug-%s.so", SETTING_UG_PATH, path) < 0) return; + + int plugin_ret = setting_invoke_reset_function(ug_file, svc, NULL); + SETTING_TRACE("load %s[plugin_ret:%d]", ug_file, plugin_ret); + + if (LOAD_LIB_FAILED == plugin_ret) // -1 + { + result_str = LOAD_LIB_FAILED_STR; + + } else if (UNDEFINED_LIB_SYMBOL == plugin_ret) // -2 + { + result_str = UNDEFINE_STR; + } else if (OPERATE_LIB_SUCESS <= plugin_ret){ // 0 + result_str = RESET_SUCESS_STR; + + } else { + result_str = RESET_FAILED_STR; + } + + service_destroy(svc); + if (path){ + FREE(path); + path = NULL; + } + + item_data = setting_create_Gendial_field_def(genlist, &(ad->itc_1text), + NULL, ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION, + NULL, NULL, 0, + (char *)item_name, + (char *)result_str, NULL); + } + + if (item_data) + elm_genlist_item_show(item_data->item, ELM_GENLIST_ITEM_SCROLLTO_IN);//show the last item + else + SETTING_TRACE_ERROR("error : item_data is NULL"); +} + +static Eina_Bool __reset_animator_cb(void *data) +{ + SettingResetUG *ad = (SettingResetUG *) data; + + SETTING_TRACE("Processing the %dth of %d", + ad->gl_index, ad->list_data.cur_item_num); + if (ad->gl_index >= ad->list_data.cur_item_num) { + ecore_animator_del(ad->animator); + ad->animator = NULL; + if (ad->pop_progress) { + evas_object_del(ad->pop_progress); + ad->pop_progress = NULL; + } + + return ECORE_CALLBACK_CANCEL; + } + if (ad->list_data.chk_items[ad->gl_index].data_GenItem->chk_status) { + __reset_an_item(&(ad->list_data), + ad->list_data.chk_items[ad->gl_index].item_name, + ad->list_data.chk_items[ad->gl_index].ug_args); + + /*unselect item*/ + elm_check_state_set(ad->list_data.chk_items[ad->gl_index].data_GenItem->eo_check, 0); + ad->list_data.chk_items[ad->gl_index].data_GenItem->chk_status = 0; + } + + ad->gl_index++; + return ECORE_CALLBACK_RENEW; +} + + +static void setting_reset_settings_check_state(Setting_Done_List_Data *list_data) +{ + /* reset */ + SETTING_TRACE_DEBUG("********resetting*******"); + + SettingResetUG *ad = (SettingResetUG *) list_data->UG_data; + + //some item must have been selected, or else cannot go into setting_reset_check_state() + ad->notify = elm_popup_add(ad->win_get); + elm_object_style_set(ad->notify,"menustyle"); + elm_object_part_text_set(ad->notify, "title,text", _(RESET_RESULT_STR)); + evas_object_size_hint_weight_set(ad->notify, + EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + Evas_Object *btn = setting_create_button(ad->notify, _("IDS_COM_SK_OK"), NULL, setting_reset_result_popup_resp_cb, ad); + elm_object_part_content_set(ad->notify, "button1", btn); + + Evas_Object *genlist = elm_genlist_add(ad->notify); + elm_object_style_set(genlist, "dialogue"); + 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_object_content_set(ad->notify, genlist); + evas_object_show(ad->notify); + + ad->pop_progress = setting_create_popup_with_progressbar(ad, ad->win_get, + "list_process", + NULL, NULL, NULL, 0, 1, 1); + + ad->gl_index = 0; + ad->animator = ecore_animator_add(__reset_animator_cb, ad); + + /* reset sel_all item */ + elm_check_state_set(list_data->select_all_checkbox, 0); + list_data->select_all_checked = EINA_FALSE; + +} + +static void +setting_reset_settings_result_password_ug_cb(ui_gadget_h ug, service_h result, + void *priv) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(priv == NULL, "Data parameter is NULL"); + + SettingResetUG *ad = (SettingResetUG *) priv; + + char *ret_str = NULL; + + service_get_extra_data(result, "result", &ret_str); + + retm_if(ret_str == NULL, "result paremeter is NULL"); + SETTING_TRACE("result:%s", ret_str); + + if (ret_str) { + if (0 == safeStrCmp("Cancel", ret_str)) { + /* Do not reset */ + } + else if (0 == safeStrCmp("SETTING_PW_TYPE_RESET", ret_str)) { + /* Reset */ +#if SIMPLY_SUPPORT_ALL_RESET + ad->notify = + setting_create_popup_witout_btn(ad, ad->win_get, _("IDS_COM_POP_PROCESSING"), NULL, __processing_popup_response_cb, 0); + if (ad->reset_all_idler) { + ecore_idler_del(ad->reset_all_idler); + ad->reset_all_idler = NULL; + } + ad->reset_all_idler = + ecore_idler_add((Ecore_Task_Cb) __reset_all_idler, ad); +#else + /* if return value from passwordUG, create popup for resetting. */ + setting_reset_settings_check_state(&(ad->list_data)); +#endif + } + } +} + +static void +setting_reset_settings_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, + void *priv) +{ + SettingResetUG *ad = (SettingResetUG *) priv; + Evas_Object *base; + + if (!priv) + return; + SETTING_TRACE_BEGIN; + + base = (Evas_Object *) ug_get_layout(ug); + if (!base) + return; + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + break; + } + SETTING_TRACE_END; +} + +static void setting_reset_settings_destroy_password_ug_cb(ui_gadget_h ug, + void *priv) +{ + SETTING_TRACE_BEGIN; + ret_if(!priv); + SettingResetUG *ad = (SettingResetUG *) priv; + if (ug) { + ug_destroy(ug); + ad->ug_loading = NULL; + } + +} + +static bool setting_reset_settings_create_password_sg(void *data) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(data == NULL, FALSE); + + SettingResetUG *ad = (SettingResetUG *) data; + + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + if (!cbs) + return FALSE; + cbs->layout_cb = setting_reset_settings_layout_ug_cb; + cbs->result_cb = setting_reset_settings_result_password_ug_cb; + cbs->destroy_cb = setting_reset_settings_destroy_password_ug_cb; + cbs->priv = (void *)ad; + + service_h svc; + if (service_create(&svc)) { + FREE(cbs); + return FALSE; + } + + service_add_extra_data(svc, "viewtype", "SETTING_PW_TYPE_RESET"); + + ad->ug_loading = + ug_create(ad->ug, "setting-password-efl", UG_MODE_FULLVIEW, svc, cbs); + if (NULL == ad->ug_loading) { /* error handling */ + } + + service_destroy(svc); + FREE(cbs); + + return TRUE; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_reset_settings_click_softkey_cancel_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingResetUG *ad = (SettingResetUG *) data; + + setting_view_change(&setting_view_reset_settings, &setting_view_reset_main, ad); +} + +static void +setting_reset_settings_click_softkey_reset_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingResetUG *ad = (SettingResetUG *) data; + int screen_lock_type = 0; + + //every time clicking 'Reset' button, restore following VCONFs + vconf_set_bool(VCONFKEY_SETAPPL_FONT_CHANGED, FALSE); + + if (ad->list_data.selInfoPop) { + evas_object_del(ad->list_data.selInfoPop); + ad->list_data.selInfoPop = NULL; + } + + if (!setting_done_list_is_some_item_selected(&(ad->list_data))) { + setting_create_simple_popup(NULL, ad->win_get, NULL, "No item selected"); + } else { + vconf_get_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, &screen_lock_type); + if(screen_lock_type == SETTING_SCREEN_LOCK_TYPE_PASSWORD + || screen_lock_type == SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD) + { + setting_reset_settings_create_password_sg(ad); + } + else + { + setting_reset_settings_check_state(&(ad->list_data)); + } + } +} diff --git a/setting-reset/src/setting-reset.c b/setting-reset/src/setting-reset.c old mode 100644 new mode 100755 index bcd09af..47dbe2f --- a/setting-reset/src/setting-reset.c +++ b/setting-reset/src/setting-reset.c @@ -1,21 +1,27 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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 + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include -#include +#include +#include +#include #ifndef UG_MODULE_API #define UG_MODULE_API __attribute__ ((visibility("default"))) @@ -28,10 +34,10 @@ static void setting_reset_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, setting_view_update(&setting_view_reset_main, ad); } -static void *setting_reset_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, - bundle *data, void *priv) +static void *setting_reset_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) { - setting_retvm_if((!ug || !priv), NULL, "!ug || !priv"); + setting_retvm_if((!priv), NULL, "!priv"); SettingResetUG *resetUG = priv; resetUG->ug = ug; @@ -47,8 +53,11 @@ static void *setting_reset_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, setting_create_Gendial_itc("multiline/1text", &(resetUG->itc_1text)); setting_create_Gendial_itc("dialogue/bg/1icon", &(resetUG->itc_1icon)); - /* creating a view. */ + setting_view_node_table_register(&setting_view_reset_main, NULL); + setting_view_node_table_register(&setting_view_reset_settings, &setting_view_reset_main); + setting_view_node_set_cur_view(&setting_view_reset_main); + setting_view_create(&setting_view_reset_main, (void *)resetUG); evas_object_event_callback_add(resetUG->win_main_layout, EVAS_CALLBACK_RESIZE, @@ -56,31 +65,32 @@ static void *setting_reset_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, return resetUG->ly_main; } -static void setting_reset_ug_on_start(struct ui_gadget *ug, bundle *data, +static void setting_reset_ug_on_start(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_reset_ug_on_pause(struct ui_gadget *ug, bundle *data, +static void setting_reset_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_reset_ug_on_resume(struct ui_gadget *ug, bundle *data, +static void setting_reset_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_reset_ug_on_destroy(struct ui_gadget *ug, bundle *data, +static void setting_reset_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) { SETTING_TRACE_BEGIN; - setting_retm_if((!ug || !priv), "!ug || !priv"); + setting_retm_if((!priv), "!priv"); SettingResetUG *resetUG = priv; evas_object_event_callback_del(resetUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_reset_ug_cb_resize); /* fix flash issue for gallery */ resetUG->ug = ug; /* delete the allocated objects. */ + setting_view_destroy(&setting_view_reset_settings, resetUG); setting_view_destroy(&setting_view_reset_main, resetUG); if (NULL != ug_get_layout(resetUG->ug)) { @@ -91,14 +101,14 @@ static void setting_reset_ug_on_destroy(struct ui_gadget *ug, bundle *data, SETTING_TRACE_END; } -static void setting_reset_ug_on_message(struct ui_gadget *ug, bundle *msg, - bundle *data, void *priv) +static void setting_reset_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) { SETTING_TRACE_BEGIN; } -static void setting_reset_ug_on_event(struct ui_gadget *ug, enum ug_event event, - bundle *data, void *priv) +static void setting_reset_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) { SETTING_TRACE_BEGIN; setting_retm_if(!priv, "!priv"); @@ -110,11 +120,16 @@ static void setting_reset_ug_on_event(struct ui_gadget *ug, enum ug_event event, break; case UG_EVENT_LANG_CHANGE: { - + /* navigation item in reset setting view */ Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar); ret_if(!navi_it); + elm_object_item_text_set(navi_it, _(RESET_SETTINGS_STR)); + + /* navigation item in reset main view */ + navi_it = elm_naviframe_bottom_item_get(ad->navi_bar); + ret_if(!navi_it); elm_object_item_text_set(navi_it, _("IDS_COM_BODY_RESET")); - + if (ad->main_scroller) { elm_genlist_realized_items_update(ad->main_scroller); @@ -128,19 +143,19 @@ static void setting_reset_ug_on_event(struct ui_gadget *ug, enum ug_event event, if (item) { #if SUPPORT_BOTTOM_BTNS - elm_object_item_text_set(item, _("IDS_COM_SK_CANCEL")); + elm_object_item_text_set(item, _("IDS_COM_BODY_RESET")); #else Evas_Object *eo_btn = elm_object_item_part_content_get(item, "object"); setting_retm_if(eo_btn == NULL, "get eo_lbtn failed"); elm_object_text_set(eo_btn, _("IDS_COM_SK_CANCEL")); #endif } - + item = elm_toolbar_last_item_get(ad->controllbar); if (item) { #if SUPPORT_BOTTOM_BTNS - elm_object_item_text_set(item, _("IDS_COM_BODY_RESET")); + elm_object_item_text_set(item, _("IDS_COM_SK_CANCEL")); #else Evas_Object *eo_btn = elm_object_item_part_content_get(item, "object"); setting_retm_if(eo_btn == NULL, "get eo_lbtn failed"); @@ -152,18 +167,19 @@ static void setting_reset_ug_on_event(struct ui_gadget *ug, enum ug_event event, Evas_Object *sub_layout = elm_object_part_content_get(ad->view_layout, "elm.swallow.contents"); if (sub_layout) { - Evas_Object *gl_sel_all = elm_object_part_content_get(sub_layout, "search_bar"); - if (gl_sel_all) elm_genlist_realized_items_update(gl_sel_all); + Evas_Object *select_all_layout = elm_object_part_content_get(sub_layout, "search_bar"); + if (select_all_layout) { + elm_object_part_text_set(select_all_layout, "elm.text", _(KeyStr_Select_All)); + } - Evas_Object *scroller = elm_object_part_content_get(sub_layout, "search_list"); if (scroller) elm_genlist_realized_items_update(scroller); SETTING_TRACE("scroller:%p", scroller); - + } setting_reset_result_popup_update(ad); - + break; } @@ -182,13 +198,11 @@ static void setting_reset_ug_on_event(struct ui_gadget *ug, enum ug_event event, } } -static void setting_reset_ug_on_key_event(struct ui_gadget *ug, +static void setting_reset_ug_on_key_event(ui_gadget_h ug, enum ug_key_event event, - bundle *data, void *priv) + service_h service, void *priv) { SETTING_TRACE_BEGIN; - if (!ug) - return; switch (event) { case UG_KEY_EVENT_END: @@ -254,22 +268,9 @@ void setting_reset_special_process(void *data) SETTING_TRACE_BEGIN; ret_if(!data); SettingResetUG *ad = data; - + char speciliztion[MAX_SPECIALIZITION_LEN] = { 0, }; -#if !SUPPORT_DYNAMIC_THEME_CHANGING - int is_them_changed = FALSE; - //if failed, is_them_changed keep FALSE - vconf_get_bool(VCONFKEY_SETAPPL_THEM_CHANGED, &is_them_changed); - if (is_them_changed) - { - elm_theme_set(NULL, vconf_get_str(VCONFKEY_SETAPPL_WIDGET_THEME_STR)); - elm_config_all_flush(); - g_strlcat(speciliztion, _(KeyStr_Theme), MAX_SPECIALIZITION_LEN); - } -#endif - - int is_font_changed = FALSE; //if failed, is_font_changed keep FALSE vconf_get_bool(VCONFKEY_SETAPPL_FONT_CHANGED, &is_font_changed); @@ -282,10 +283,9 @@ void setting_reset_special_process(void *data) if ('\0' != speciliztion[0]) { g_strlcat(speciliztion, _(CLOSEING_STR), MAX_SPECIALIZITION_LEN); - + ad->ask_popup = - setting_create_popup_with_btn(ad, ad->win_main_layout, speciliztion, - NULL, + setting_create_popup_with_btn(ad, ad->win_main_layout, NULL, speciliztion, __ask_popup_response_cb, 0, 1, _("IDS_COM_SK_OK")); @@ -299,7 +299,7 @@ void setting_reset_result_popup_resp_cb(void *data, Evas_Object *obj, void *even ret_if(!data); SettingResetUG *ad = data; if (btn_type(obj) == POPUP_RESPONSE_OK) { - + setting_reset_special_process(ad); } if (ad->notify) { @@ -311,9 +311,6 @@ void setting_reset_result_popup_resp_cb(void *data, Evas_Object *obj, void *even evas_object_del(ad->old_notify); ad->old_notify = NULL; } - - elm_object_item_disabled_set(elm_toolbar_last_item_get(ad->controllbar), EINA_TRUE); - } void setting_reset_result_popup_update(void *data) @@ -329,36 +326,66 @@ void setting_reset_result_popup_update(void *data) Evas_Object *genlist = elm_object_content_get(ad->notify); evas_object_hide(ad->notify); ad->old_notify = ad->notify; - + ad->notify = elm_popup_add(ad->win_get); elm_object_style_set(ad->notify,"menustyle"); + //elm_popup_title_label_set(ad->notify, RESET_RESULT_STR); elm_object_part_text_set(ad->notify, "title,text", RESET_RESULT_STR); - evas_object_size_hint_weight_set(ad->notify, - EVAS_HINT_EXPAND, + evas_object_size_hint_weight_set(ad->notify, + EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - + //elm_popup_buttons_add(ad->notify,1, + // _("IDS_COM_SK_OK"), + // POPUP_RESPONSE_OK,NULL); Evas_Object *btn = setting_create_button(ad->notify, _("IDS_COM_SK_OK"), NULL, setting_reset_result_popup_resp_cb, ad); - elm_object_part_content_set(ad->notify, "button1", btn); - + elm_object_part_content_set(ad->notify, "button1", btn); + SETTING_TRACE("genlist:%p", genlist); if (genlist) { elm_genlist_realized_items_update(genlist); elm_object_content_set(ad->notify, genlist); } - - + + //evas_object_smart_callback_add(ad->notify, + // "response", + // setting_reset_result_popup_resp_cb, + // ad); + evas_object_show(ad->notify); } } -int setting_reset_data_roaming(void) + +static void __tapi_flight_mode_cb(TapiHandle *handle, int result, void *data, void *user_data) { + SETTING_TRACE_BEGIN; + SETTING_TRACE("result:%d", result); +} +int setting_reset_flight_mode() +{ + int ret = -1; + TapiHandle *handle = tel_init(NULL); + if (!handle) { + SETTING_TRACE_ERROR("tel_init error"); + } + + //if callback is NULL,it will return failed directly. + if (tel_set_flight_mode(handle, TAPI_POWER_FLIGHT_MODE_LEAVE, __tapi_flight_mode_cb, NULL) == 0) { #if SUPPORT_RUN_SYSTEM_COMMAND - return excuteCmd(SETTING_POSTINST_FILE, 1, "dataroaming"); + ret = excuteCmd(SETTING_POSTINST_FILE, 1, "flightmode"); #else - return vconf_set_bool(VCONFKEY_SETAPPL_STATE_DATA_ROAMING_BOOL, TRUE); + ret = vconf_set_bool(VCONFKEY_SETAPPL_FLIGHT_MODE_BOOL, FALSE); #endif + } else { + SETTING_TRACE_ERROR("tel_set_flight_mode error"); + } + + + if (tel_deinit(handle) != 0) { + SETTING_TRACE_ERROR("tel_deinit error"); + } + return ret; } int setting_reset_rotation_lock(void) @@ -366,7 +393,7 @@ int setting_reset_rotation_lock(void) #if SUPPORT_RUN_SYSTEM_COMMAND return excuteCmd(SETTING_POSTINST_FILE, 1, "rotationLock"); #else - return vconf_set_bool(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, FALSE); + return vconf_set_bool(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, TRUE); #endif } diff --git a/setting-security/CMakeLists.txt b/setting-security/CMakeLists.txt index 3706ead..c96ecf5 100755 --- a/setting-security/CMakeLists.txt +++ b/setting-security/CMakeLists.txt @@ -3,7 +3,8 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs_security REQUIRED ecore evas appcore-efl elementary tapi dlog ui-gadget bundle appcore-common) +pkg_check_modules(pkgs_security REQUIRED ecore evas elementary tapi dlog +ui-gadget-1 capi-appfw-application appcore-common security-server) FOREACH(flag ${pkgs_security_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") @@ -25,7 +26,9 @@ SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") ADD_LIBRARY(${SETTING_SECURITY_UG} SHARED ./src/setting-security.c ./src/setting-security-main.c - ##./src/setting-security-privacy.c + ./src/setting-security-encryption.c + ./src/setting-security-screen-lock-type.c + ./src/setting-security-sim-settings.c ) TARGET_LINK_LIBRARIES(${SETTING_SECURITY_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) diff --git a/setting-security/include/setting-security-encryption.h b/setting-security/include/setting-security-encryption.h new file mode 100755 index 0000000..5cd074c --- /dev/null +++ b/setting-security/include/setting-security-encryption.h @@ -0,0 +1,32 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_SECURITY_ENCRYPTION_H__ +#define __SETTING_SECURITY_ENCRYPTION_H__ + +#include + + +#define Keystr_DeviceEncryption "IDS_ASEML_BODY_DEVICE_ENCRYPTION" + +static void +setting_security_encryption_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info); +#endif diff --git a/setting-security/include/setting-security-main.h b/setting-security/include/setting-security-main.h index 348c46f..6be3600 100755 --- a/setting-security/include/setting-security-main.h +++ b/setting-security/include/setting-security-main.h @@ -1,34 +1,28 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_SECURITY_MAIN_H__ #define __SETTING_SECURITY_MAIN_H__ #include -static void setting_security_main_click_softkey_back_cb(void *data, - Evas_Object *obj, - void *event_info); -static void setting_security_main_chk_btn_cb(void *data, Evas_Object *obj, - void *event_info); -static void setting_security_main_mouse_up_Gendial_list_cb(void *data, - Evas_Object *obj, - void *event_info); -static void setting_security_main_update_view(void *data, char *keyStr); -static void setting_security_main_create_timer(void *data); -static Eina_Bool setting_security_main_timer_update_cb(void *data); -static void setting_security_main_vconf_change_cb(keynode_t *key, void *data); -static void setting_security_main_check_vconf_value(void *data); +void setting_security_main_vconf_change_cb(keynode_t *key, void *data); +int _handle_sim_exception(void *data, int sim_status); #endif diff --git a/setting-security/include/setting-security-screen-lock-type.h b/setting-security/include/setting-security-screen-lock-type.h new file mode 100755 index 0000000..4ddb7b5 --- /dev/null +++ b/setting-security/include/setting-security-screen-lock-type.h @@ -0,0 +1,33 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_SECURITY_SCREEN_LOCK_TYPE_H__ +#define __SETTING_SECURITY_SCREEN_LOCK_TYPE_H__ + +#include + +static int setting_security_screen_lock_type_create(void *cb); + +static void +setting_security_screen_lock_type_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info); +static void +setting_security_screen_lock_type_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info); + +#endif diff --git a/setting-security/include/setting-security-sim-settings.h b/setting-security/include/setting-security-sim-settings.h new file mode 100755 index 0000000..5eebac6 --- /dev/null +++ b/setting-security/include/setting-security-sim-settings.h @@ -0,0 +1,38 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_SECURITY_SIM_SETTINGS_H__ +#define __SETTING_SECURITY_SIM_SETTINGS_H__ + +#include + + +static void +setting_security_sim_settings_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info); +static void +setting_security_sim_settings_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info); + +static void +setting_security_sim_settings_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info); + +#endif diff --git a/setting-security/include/setting-security.h b/setting-security/include/setting-security.h old mode 100644 new mode 100755 index fa269f4..aa0e1c7 --- a/setting-security/include/setting-security.h +++ b/setting-security/include/setting-security.h @@ -1,74 +1,111 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_SECURITY_H__ #define __SETTING_SECURITY_H__ #include #include -#include #include #include #include #include #include -#include +#include +#include #include -#include -#include -#include #include #include +#include +#ifdef SUPPORT_MDM +#include +#endif + +#define Keystr_FDN "IDS_ST_BODY_FIXED_DIALLING_MODE" + +#if SUPPORT_ENCRYPTION +#define keystr_DeviceDecryption "Device decryption" +#define DEVICE_ENCRYPTION_DESC "IDS_ST_BODY_PASSWORD_REQUIRED_TO_DECRYPT_DEVICE_EACH_TIME_YOU_TURN_IT_ON" +#define DEVICE_DECRYPTION_DESC "IDS_ST_BODY_DEVICE_ENCRYPTED" + +#define Keystr_ConfirmEncryption "Confirm encryption" +#define Keystr_ConfirmDecryption "Confirm decryption" +#endif + +#define USELESS_SIM_CARD "Not useful SIM card" + +#if SUPPORT_SCREEN_SECURITY +#define Keystr_ScreenLockType "IDS_ST_BODY_SCREEN_LOCK_TYPE" +#define Keystr_LockScreenOptions "IDS_ST_BODY_LOCK_SCREEN_OPTIONS" +#define Keystr_Swipe "IDS_ST_MBODY_SWIPE" +#define Keystr_FaceAndVoice "IDS_ST_BODY_FACE_AND_VOICE" +#endif + +#if SUPPORT_PARENTAL_MODE +#define Keystr_ParentalMode "Parental mode" +#endif typedef struct _SettingSecurityUG SettingSecurityUG; typedef enum { - SETTING_SEC_PW_POWER_ON, - SETTING_SEC_PW_PHONE_LOCK, - SETTING_SEC_PW_PHONE_LOCK_ON, + SETTING_SEC_PW_PASSWORD, SETTING_SEC_PW_SIMPLE_PASSWD, SETTING_SEC_PW_CHANGE_PASSWD, + SETTING_SEC_PW_CHANGE_SIMPLE_PASSWD, + SETTING_SEC_PW_ENTER_LOCK_TYPE, SETTING_SEC_PW_SIM_LOCK_ON, SETTING_SEC_PW_SIM_LOCK_OFF, + SETTING_SEC_PW_SIM_LOCK_DISABLED, SETTING_SEC_PW_PIN_LOCK_ON, SETTING_SEC_PW_PIN_LOCK_OFF, SETTING_SEC_PW_CHANGE_PIN1, +#if SUPPORT_FDN SETTING_SEC_PW_FDN_MODE_ON, SETTING_SEC_PW_FDN_MODE_OFF, +#endif SETTING_SEC_PW_CHANGE_PIN2, SETTING_SEC_PW_PIN1_BLOCKED, SETTING_SEC_PW_PIN2_BLOCKED, SETTING_SEC_PW_MAX } setting_sec_pw_type; - struct _security_item { int pw_type_num; char *pw_type_string; + int (*passwd_handler)(SettingSecurityUG *ad, void* data); }; /** * Setting Security UG context - * all UG function has void* as an agument. this is casted back to SettingSecurityUG + * all UG function has void* as an agument. this is casted back to SettingSecurityUG * and the functions access app context. */ struct _SettingSecurityUG { - struct ui_gadget *ug; + ui_gadget_h ug; + TapiHandle *handle; + TelSimFacilityStatus_t sim_status; + TelSimFacilityStatus_t pin1_status; + TelSimFacilityStatus_t pin2_status;//it indicates fdn status too /* add more variables here (move your appdata to here) */ Evas *evas; @@ -78,44 +115,89 @@ struct _SettingSecurityUG { Evas_Object *ly_main; Evas_Object *navi_bar; - struct ui_gadget *ug_passwd; - struct ui_gadget *ug_mt; + ui_gadget_h ug_passwd; + ui_gadget_h ug_mt; Setting_GenGroupItem_Data *data_phone_lk; Setting_GenGroupItem_Data *data_mb; Setting_GenGroupItem_Data *data_sim_lk; Setting_GenGroupItem_Data *data_pin_lk; + Setting_GenGroupItem_Data *data_parental_md; Setting_GenGroupItem_Data *data_simple_pw; + Setting_GenGroupItem_Data *data_change_pin1; + /* for simple password */ + + Setting_GenGroupItem_Data *data_cng_pw; +#if SUPPORT_ENCRYPTION + Setting_GenGroupItem_Data *data_device_enc; + Setting_GenGroupItem_Data *data_mmc_enc; +#endif Elm_Genlist_Item_Class itc_1text; Elm_Genlist_Item_Class itc_1text_1icon; Elm_Genlist_Item_Class itc_seperator; Elm_Genlist_Item_Class itc_2text_2; - Evas_Object *chk_simple_pw; /* for simple password */ - Evas_Object *chk_phone_lk; - Evas_Object *chk_sim_lk; - Evas_Object *chk_pin_lk; + +#if SUPPORT_FDN + Setting_GenGroupItem_Data *data_fdn; + Evas_Object *chk_fdn; +#endif setting_sec_pw_type pw_type; +#ifdef SUPPORT_MDM + mdm_data_t *mdm_data; + mdm_password_policy_t *mdm_policy; + mdm_result_t mdm_status; + policy_receiver_handle mdm_handle; + + Ecore_Pipe *pipe; + pid_t child_pid; +#endif + +#if SUPPORT_SCREEN_SECURITY + Setting_GenGroupItem_Data *data_screen_lock_type; + Evas_Object *lock_type_rd; + Setting_GenGroupItem_Data *data_sl_simple_pw; + Setting_GenGroupItem_Data *data_sl_pw; + ui_gadget_h ug_lockscreen; +#endif + + char *input_pwd; + int sel_item; /**< It's used to check PIN1, PIN2 _BLOCKED. 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ Ecore_Timer *update_view_timer; }; extern setting_view setting_view_security_main; +extern setting_view setting_view_security_encryption; +extern setting_view setting_view_security_screen_lock_type; +extern setting_view setting_view_security_sim_settings; SettingSecurityUG *g_ad; /* for tapi callback */ +char *get_screen_lock_type_str(void * priv); char *get_find_my_mobile_on_off_str(void *priv); +void setting_security_result_password_ug_cb(ui_gadget_h ug, + service_h service, void *priv); +void setting_security_sim_get_facility_cb(TapiHandle *handle, int result, void *data, void *user_data); -void setting_check_onoff_pin_lock_state(TelSimPinType_t type, - Evas_Object *chk_pin_lk); - -void setting_security_result_password_ug_cb(struct ui_gadget *ug, - bundle *result, void *priv); gboolean setting_security_create_password_sg(void *data); void setting_security_create_find_my_mobile_sg(void *cb, int argc, char **argv); -void setting_security_destroy_find_my_mobile_ug_cb(struct ui_gadget *ug, +void setting_security_destroy_find_my_mobile_ug_cb(ui_gadget_h ug, void *priv); +#ifdef TEST_MDM +void setting_security_destroy_password_ug_cb(ui_gadget_h ug, + void *priv); +void setting_security_layout_passwd_ug_cb(ui_gadget_h ug, + enum ug_mode mode, void *priv); +#endif + +#ifdef SUPPORT_MDM +void setting_security_disable_items_for_mdm(void *data); +#endif + +gboolean setting_security_create_lockscreen_options_sg(void *data); + #endif diff --git a/setting-security/src/setting-security-encryption.c b/setting-security/src/setting-security-encryption.c new file mode 100755 index 0000000..adcdedc --- /dev/null +++ b/setting-security/src/setting-security-encryption.c @@ -0,0 +1,128 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#include + +#include +#include + +static int setting_security_encryption_create(void *cb); +static int setting_security_encryption_destroy(void *cb); +static int setting_security_encryption_update(void *cb); +static int setting_security_encryption_cleanup(void *cb); + +setting_view setting_view_security_encryption = { + .create = setting_security_encryption_create, + .destroy = setting_security_encryption_destroy, + .update = setting_security_encryption_update, + .cleanup = setting_security_encryption_cleanup, +}; + +/* *************************************************** + ** + **basic func + ** + ****************************************************/ + +static int setting_security_encryption_create(void *cb) +{ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + + Evas_Object *scroller; + + /* add basic layout */ + char setBtnStr[MAX_DISPLAY_NAME_LEN_ON_UI]; + snprintf(setBtnStr, sizeof(setBtnStr), "%s", + (char *)dgettext("sys_string", "IDS_COM_BODY_BACK")); + + /* there are 2 titles, Device encryption or Device decryption */ + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + Keystr_DeviceEncryption, + setBtnStr, NULL, + setting_security_encryption_click_softkey_back_cb, + NULL, ad, &scroller, + ad->navi_bar); + + (void)setting_create_Gendial_field_titleItem(scroller, + &itc_group_item, + "IDS_ST_HEADER_SCREEN_SECURITY", NULL); + /* To do : Fill this view */ + + /* update info */ + + setting_view_security_encryption.is_create = 1; + + return SETTING_RETURN_SUCCESS; + +} + +static int setting_security_encryption_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + + setting_view_security_encryption.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_security_encryption_update(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_security_encryption_cleanup(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + setting_security_encryption_destroy(cb); + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + ** + **call back func + ** + ****************************************************/ +static void +setting_security_encryption_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + retm_if(data == NULL, "[Setting > Security] Data parameter is NULL"); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + setting_view_change(&setting_view_security_encryption, &setting_view_security_main, ad); +} diff --git a/setting-security/src/setting-security-main.c b/setting-security/src/setting-security-main.c old mode 100644 new mode 100755 index fc87ea7..9e1b4d5 --- a/setting-security/src/setting-security-main.c +++ b/setting-security/src/setting-security-main.c @@ -1,19 +1,31 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#include +#include + #include +#include +#include static int setting_security_main_create(void *cb); static int setting_security_main_destroy(void *cb); @@ -27,6 +39,25 @@ setting_view setting_view_security_main = { .cleanup = setting_security_main_cleanup, }; +static void setting_security_main_click_softkey_back_cb(void *data, + Evas_Object *obj, + void *event_info); +#if DISABLED_CODE +static void setting_security_main_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info); +#endif +static void setting_security_main_mouse_up_Gendial_list_cb(void *data, + Evas_Object *obj, + void *event_info); +#if DISABLED_CODE +static void setting_security_main_update_view(void *data, char *keyStr); +static void setting_security_main_create_timer(void *data); +static Eina_Bool setting_security_main_timer_update_cb(void *data); +#endif + +static void setting_security_main_check_vconf_value(void *data); + + /* *************************************************** ** **basic func @@ -36,7 +67,7 @@ setting_view setting_view_security_main = { static int setting_security_main_create(void *cb) { retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); - + SETTING_TRACE_BEGIN; SettingSecurityUG *ad = (SettingSecurityUG *) cb; Evas_Object *scroller; @@ -45,7 +76,7 @@ static int setting_security_main_create(void *cb) int value = 0; int err = 0; - gboolean b_status = TRUE; + gboolean b_status = FALSE; int tapi_ret; /* add basic layout */ @@ -60,31 +91,48 @@ static int setting_security_main_create(void *cb) setting_security_main_click_softkey_back_cb, NULL, ad, &scroller, &ad->navi_bar); - Elm_Object_Item *item = NULL;; - item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, - ELM_GENLIST_ITEM_NONE, NULL, NULL); - elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + Elm_Object_Item *item = NULL; + + (void)setting_create_Gendial_field_titleItem(scroller, + &itc_group_item, + "IDS_ST_HEADER_SCREEN_SECURITY", NULL); + +#if SUPPORT_SCREEN_SECURITY + /* a. screen lock type */ + ad->data_screen_lock_type = setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), + setting_security_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0, Keystr_ScreenLockType, get_screen_lock_type_str(ad), NULL); + if(ad->data_screen_lock_type) + ad->data_screen_lock_type->userdata = ad; - int state = 0; + /* b. lock screen options */ + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_security_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0, Keystr_LockScreenOptions, NULL, NULL); +#else setting_get_bool_slp_key(BOOL_SLP_SETTING_POWER_ON_LOCK, &value, &err); /* a. phone lock */ - ad->data_phone_lk = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + ad->data_phone_lk = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), setting_security_main_mouse_up_Gendial_list_cb, ad, SWALLOW_Type_1TOGGLE, NULL, NULL, value,"IDS_ST_BODY_PHONE_LOCK", NULL, setting_security_main_chk_btn_cb); - if(ad->data_phone_lk) - ad->data_phone_lk->userdata = ad; + if(ad->data_phone_lk) + ad->data_phone_lk->userdata = ad; else { SETTING_TRACE_ERROR("ad->data_phone_lk is null"); return SETTING_RETURN_FAIL; } setting_security_main_update_view(ad, "IDS_ST_BODY_PHONE_LOCK"); + /* c. change password */ - setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + ad->data_cng_pw = setting_create_Gendial_field_def(scroller, &(ad->itc_1text), setting_security_main_mouse_up_Gendial_list_cb,ad, SWALLOW_Type_INVALID, NULL, NULL, @@ -92,125 +140,112 @@ static int setting_security_main_create(void *cb) setting_get_bool_slp_key(BOOL_SLP_SETTING_SIMPLE_PASSWORD, &value, &err); /* d. simple password */ - ad->data_simple_pw= setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + ad->data_simple_pw= setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), setting_security_main_mouse_up_Gendial_list_cb, ad, SWALLOW_Type_1TOGGLE, NULL, NULL, value, "IDS_ST_BODY_SIMPLE_PASSWORD", NULL, setting_security_main_chk_btn_cb); - if(ad->data_simple_pw) + if(ad->data_simple_pw) ad->data_simple_pw->userdata = ad; else { SETTING_TRACE_ERROR("ad->data_simple_pw is null"); return SETTING_RETURN_FAIL; } +#ifdef SUPPORT_MDM + /* @ for MDM test @ */ +#ifdef TEST_MDM + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_security_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0,"MDM test", NULL, NULL); +#endif + setting_security_disable_items_for_mdm(ad); +#endif +#endif -#ifdef SUPPORT_SIM - /* check status of sim and tapi */ - ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); - tapi_ret = tel_check_service_ready(&b_status); - - if (tapi_ret != TAPI_API_SUCCESS - || value != VCONFKEY_TELEPHONY_SIM_INSERTED) { - SETTING_TRACE_DEBUG - ("%s*** [ERR] TAPI is not ready. err=%d ***%s", - SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); - - setting_view_security_main.is_create = 1; - - g_ad = - (SettingSecurityUG *) malloc(sizeof(SettingSecurityUG) *1); - retv_if(!g_ad, -1); - memcpy(g_ad, ad, sizeof(SettingSecurityUG)); - - vconf_notify_key_changed - (VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT, - setting_security_main_vconf_change_cb, ad); - vconf_notify_key_changed - (VCONFKEY_SETAPPL_SIM_LOCK_ATTEMPTS_LEFT_INT, - setting_security_main_vconf_change_cb, ad); - setting_security_main_check_vconf_value(ad); - return SETTING_RETURN_FAIL; - } - - /* separator */ - item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); - elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - - TelSimPinStatus_t sim_status = -1; - TelSimPinType_t sim_type = TAPI_SIM_PTYPE_SIM; - state = 0; - if (tel_get_sim_security_status(sim_type, &sim_status) != - TAPI_API_SUCCESS) { - SETTING_TRACE_DEBUG - ("%s*** [ERR] tel_get_sim_personalization_status. err=%d ***%s", - SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); - } - - if (sim_status == TAPI_SIM_PIN_STATUS_DISABLED - || sim_status == TAPI_SIM_PIN_STATUS_UNKNOWN) { - state = 0; - } else { - state = 1; - } + (void)setting_create_Gendial_field_titleItem(scroller, + &itc_group_item, + "Phone security", NULL); - /* f. sim lock */ - ad->data_sim_lk = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), +#if SUPPORT_PARENTAL_MODE /* TBD */ + /* b. parental mode */ + ad->data_parental_md = setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), setting_security_main_mouse_up_Gendial_list_cb, ad, - SWALLOW_Type_1TOGGLE, + SWALLOW_Type_INVALID, NULL, NULL, - state,"IDS_ST_BODY_SIM_LOCK", NULL, setting_security_main_chk_btn_cb); - if(ad->data_sim_lk) - ad->data_sim_lk->userdata = ad; - else { - SETTING_TRACE_ERROR("ad->data_sim_lk is null"); - return SETTING_RETURN_FAIL; - } - setting_security_main_update_view(ad, "IDS_ST_BODY_SIM_LOCK"); + 0,Keystr_ParentalMode, "Off"/*get_parental_mode_on_off_str(ad)*/, NULL); + ad->data_parental_md->userdata = ad; + /* separator */ item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - - /* check pin1 status */ - TelSimPinStatus_t pin1_status = -1; - TelSimPinType_t pin_type = TAPI_SIM_PTYPE_PIN1; - state = 0; - if(tel_get_sim_security_status(pin_type, &pin1_status) != TAPI_API_SUCCESS) - { - SETTING_TRACE_DEBUG("%s*** [ERR] tel_get_sim_security_status. err=%d ***%s", SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); - } +#endif - if(pin1_status == TAPI_SIM_PIN_STATUS_ENABLED) + /* check whether binary is slp or not, for mobile tracker */ + if(! is_slp_binary()) { - state = 1; - } - - /* g. pin lock */ - ad->data_pin_lk = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + /* e. find my mobile */ + ad->data_mb = setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), setting_security_main_mouse_up_Gendial_list_cb, ad, - SWALLOW_Type_1TOGGLE, + SWALLOW_Type_INVALID, NULL, NULL, - state,"IDS_COM_BODY_PIN_LOCK", NULL, setting_security_main_chk_btn_cb); - if(ad->data_pin_lk) - ad->data_pin_lk->userdata = ad; + 0,"IDS_ST_HEADER2_FIND_MY_MOBILE", get_find_my_mobile_on_off_str(ad), NULL); + if(ad->data_mb) + ad->data_mb->userdata = ad; + else { + SETTING_TRACE_ERROR("ad->data_mb is null"); + return SETTING_RETURN_FAIL; + } + } + /* SIM settings */ + if(ad->handle && !isEmulBin()) + { + /* check status of sim and tapi */ + ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + tapi_ret = tel_check_modem_power_status(ad->handle, &b_status); + if ((tapi_ret == TAPI_API_SUCCESS) && (b_status == TAPI_PHONE_POWER_STATUS_ON) && (value == VCONFKEY_TELEPHONY_SIM_INSERTED)) + { + /* separator */ + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - /* h. change pin1 */ - setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), setting_security_main_mouse_up_Gendial_list_cb,ad, SWALLOW_Type_INVALID, NULL, NULL, - 0,"IDS_ST_BODY_CHANGE_PIN1", NULL, NULL); + 0,"SIM settings", NULL, NULL); + } + } - /* i. change pin2 */ - setting_create_Gendial_field_def(scroller, &(ad->itc_1text), - setting_security_main_mouse_up_Gendial_list_cb,ad, - SWALLOW_Type_INVALID, - NULL, NULL, - 0,"IDS_ST_BODY_CHANGE_PIN2", NULL, NULL); +#if SUPPORT_ENCRYPTION + /* separator */ + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + /* device encryption */ + ad->data_device_enc = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_security_main_mouse_up_Gendial_list_cb, ad, + SWALLOW_Type_INVALID, + NULL, NULL, + value,"IDS_ASEML_BODY_DEVICE_ENCRYPTION", NULL, NULL); + + /* To do : add description of device encryption */ + setting_create_Gendial_field_def(scroller, &(itc_multiline_text), + NULL, ad, + SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, DEVICE_ENCRYPTION_DESC, NULL, NULL); +#if DISABLED_CODE + /* mmc encryption */ + ad->data_mmc_enc = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_security_main_mouse_up_Gendial_list_cb, ad, + SWALLOW_Type_1TOGGLE, + NULL, NULL, + value,"IDS_ASEML_BODY_MMC_ENCRYPTION", NULL, setting_security_main_chk_btn_cb); +#endif #endif - /* update info */ setting_view_security_main.is_create = 1; @@ -221,15 +256,17 @@ static int setting_security_main_create(void *cb) vconf_notify_key_changed(VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT, setting_security_main_vconf_change_cb, ad); - vconf_notify_key_changed(VCONFKEY_SETAPPL_SIM_LOCK_ATTEMPTS_LEFT_INT, + vconf_notify_key_changed(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, setting_security_main_vconf_change_cb, ad); + setting_security_main_check_vconf_value(ad); + SETTING_TRACE_END; return SETTING_RETURN_SUCCESS; - } static int setting_security_main_destroy(void *cb) { + SETTING_TRACE_BEGIN; /* error check */ retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); @@ -242,43 +279,40 @@ static int setting_security_main_destroy(void *cb) vconf_ignore_key_changed(VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT, setting_security_main_vconf_change_cb); - vconf_ignore_key_changed(VCONFKEY_SETAPPL_SIM_LOCK_ATTEMPTS_LEFT_INT, + vconf_ignore_key_changed(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, setting_security_main_vconf_change_cb); if (ad->ly_main != NULL) { evas_object_del(ad->ly_main); - setting_view_security_main.is_create = 0; FREE(g_ad); } + if(ad->input_pwd) + FREE(ad->input_pwd); + + setting_view_security_main.is_create = 0; return SETTING_RETURN_SUCCESS; } static int setting_security_main_update(void *cb) { + SETTING_TRACE_BEGIN; /* error check */ retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); SettingSecurityUG *ad = (SettingSecurityUG *) cb; - if (ad->ly_main != NULL) { - evas_object_show(ad->ly_main); - } + evas_object_show(ad->ly_main); return SETTING_RETURN_SUCCESS; } static int setting_security_main_cleanup(void *cb) { + SETTING_TRACE_BEGIN; /* error check */ retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); - SettingSecurityUG *ad = (SettingSecurityUG *) cb; - - if (ad->ly_main != NULL) { - evas_object_hide(ad->ly_main); - } - return SETTING_RETURN_SUCCESS; } @@ -291,6 +325,7 @@ static void setting_security_main_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info) { + SETTING_TRACE_BEGIN; /* error check */ retm_if(data == NULL, "[Setting > Security] Data parameter is NULL"); @@ -303,7 +338,7 @@ setting_security_main_click_softkey_back_cb(void *data, Evas_Object *obj, int _handle_sim_exception(void *data, int sim_status) { retv_if(data == NULL, SETTING_RETURN_FAIL); - + SettingSecurityUG *ad = (SettingSecurityUG *) data; switch (sim_status) { @@ -312,9 +347,8 @@ int _handle_sim_exception(void *data, int sim_status) case VCONFKEY_TELEPHONY_SIM_NOT_PRESENT: - setting_create_popup_without_title(NULL, ad->win_get, - _ - ("IDS_ST_SECURITY_BODY_NOIMSI")); + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_ST_SECURITY_BODY_NOIMSI")); SETTING_TRACE_DEBUG ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", SETTING_FONT_RED, sim_status, SETTING_FONT_BLACK); @@ -325,9 +359,8 @@ int _handle_sim_exception(void *data, int sim_status) case VCONFKEY_TELEPHONY_SIM_CARD_ERROR: case VCONFKEY_TELEPHONY_SIM_UNKNOWN: - setting_create_popup_without_title(NULL, ad->win_get, - _ - ("IDS_COM_BODY_INVALID_SIM_CARD")); + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_COM_BODY_INVALID_SIM_CARD")); SETTING_TRACE_DEBUG ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", SETTING_FONT_RED, sim_status, SETTING_FONT_BLACK); @@ -340,97 +373,19 @@ int _handle_sim_exception(void *data, int sim_status) return SETTING_RETURN_SUCCESS; } -void _draw_pin_onoff_status(void *data, Evas_Object *check) +#if SUPPORT_FDN +void _draw_fdn_onoff_status(void *data, Evas_Object *check) { - SETTING_TRACE("PIN Lock"); + SETTING_TRACE_BEGIN; //("Fixed Dialing Number"); ret_if(data == NULL); - - SettingSecurityUG *ad = (SettingSecurityUG *) data; - int value = 0; - int err = 0; - int ret = 0; - - setting_check_onoff_pin_lock_state(TAPI_SIM_PTYPE_PIN1, check); /* reset check state */ - - ad->sel_item = 0; /* 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ - ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); - - ret = _handle_sim_exception(ad, value); - if(ret == SETTING_RETURN_FAIL) - return; - - /* check sim status */ - int tapi_ret = TAPI_API_INVALID_INPUT; - TelSimCardType_t sim_card = TAPI_SIM_CARD_TYPE_UNKNOWN; - - tapi_ret = tel_get_sim_type(&sim_card); - SETTING_TRACE("SIM Type is %d", (int)sim_card); - if (sim_card == (TelSimCardType_t) SETTING_TAPI_UNKNOWN_SIM_TYPE) { - SETTING_TRACE_DEBUG - ("%s*** [ERR] tel_get_sim_type. sim_card=%d ***%s", - SETTING_FONT_RED, sim_card, SETTING_FONT_BLACK); - setting_create_popup_without_title(NULL, ad->win_get, - _("IDS_COM_BODY_INVALID_SIM_CARD")); - return; - } - - TelSimPinStatus_t pin1_status = -1; - TelSimPinType_t pin_type = TAPI_SIM_PTYPE_PIN1; - - tapi_ret = tel_get_sim_security_status(pin_type, &pin1_status); - SETTING_TRACE("PIN Status is %d", pin1_status); - - if (tapi_ret != TAPI_API_SUCCESS) { - SETTING_TRACE_DEBUG - ("%s*** [ERR] tel_get_sim_security_status. err=%d ***%s", - SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); - setting_create_popup_without_title(NULL, ad->win_get, - _("IDS_COM_BODY_INVALID_SIM_CARD")); - return; - } - - SETTING_TRACE_DEBUG("%s*** pin1_status=%d ***%s", - SETTING_FONT_RED, pin1_status, SETTING_FONT_BLACK); - - switch (pin1_status) { - case TAPI_SIM_PIN_STATUS_DISABLED: - ad->pw_type = SETTING_SEC_PW_PIN_LOCK_ON; - setting_security_create_password_sg(ad); - break; - case TAPI_SIM_PIN_STATUS_ENABLED: - ad->pw_type = SETTING_SEC_PW_PIN_LOCK_OFF; - setting_security_create_password_sg(ad); - break; - case TAPI_SIM_PIN_STATUS_BLOCKED: - - ad->pw_type = SETTING_SEC_PW_PIN1_BLOCKED; - setting_security_create_password_sg(ad); - break; - case TAPI_SIM_PIN_STATUS_PUK_BLOCKED: - setting_create_popup_without_title(NULL, ad->win_get, - _("IDS_ST_BODY_PUK1_BLOCKED")); - break; - case TAPI_SIM_PIN_STATUS_UNKNOWN: - setting_create_popup_without_title(NULL, ad->win_get, - _("Not useful sim card")); - break; - default: - break; - } -} - -void _draw_sim_onoff_status(void *data, Evas_Object *check) -{ - ret_if(data == NULL); - SettingSecurityUG *ad = (SettingSecurityUG *) data; int value = 0; int err = 0; int ret = 0; - - setting_check_onoff_pin_lock_state(TAPI_SIM_PTYPE_SIM, check); /* reset check state */ + + ad->sel_item = 2; ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); @@ -438,159 +393,102 @@ void _draw_sim_onoff_status(void *data, Evas_Object *check) if(ret == SETTING_RETURN_FAIL) return; - int state = 0; - state = elm_check_state_get(check); - - if (state) { + int old_state = elm_check_state_get(check); + if (old_state) { SETTING_TRACE("Current status of SIM Lock is ON"); - ad->pw_type = SETTING_SEC_PW_SIM_LOCK_OFF; + ad->pw_type = SETTING_SEC_PW_FDN_MODE_OFF; setting_security_create_password_sg(ad); } else { SETTING_TRACE("Current status of SIM Lock is OFF"); - ad->pw_type = SETTING_SEC_PW_SIM_LOCK_ON; + ad->pw_type = SETTING_SEC_PW_FDN_MODE_ON; setting_security_create_password_sg(ad); } } +#endif -static void -setting_security_main_draw_onoff_status(void *data, Evas_Object *check) -{ - ret_if(data == NULL || check == NULL); - SettingSecurityUG *ad = (SettingSecurityUG *) data; - - if (ad->data_sim_lk) - ad->chk_sim_lk = ad->data_sim_lk->eo_check; - if (ad->data_pin_lk) - ad->chk_pin_lk = ad->data_pin_lk->eo_check; - if (ad->data_phone_lk) - ad->chk_phone_lk = ad->data_phone_lk->eo_check; - if (ad->data_simple_pw) - ad->chk_simple_pw = ad->data_simple_pw->eo_check; - if (check == ad->chk_phone_lk) { /* Phone Lock */ - setting_check_onoff_status(check, BOOL_SLP_SETTING_POWER_ON_LOCK); /* reset check state */ - ad->pw_type = SETTING_SEC_PW_PHONE_LOCK; - setting_security_create_password_sg(ad); - }else if(check == ad->chk_simple_pw) // Simple Password - { - setting_check_onoff_status(check, BOOL_SLP_SETTING_SIMPLE_PASSWORD); /* reset check state */ - ad->pw_type = SETTING_SEC_PW_SIMPLE_PASSWD; - setting_security_create_password_sg(ad); - }else if (check == ad->chk_sim_lk) /* Sim Lock */ - { - _draw_sim_onoff_status(ad, check); - }else if (check == ad->chk_pin_lk) { /* Pin Lock */ - _draw_pin_onoff_status(ad, check); - } -} - +#if DISABLED_CODE /* Check Btn Call Back : Phone Lock, SIm Lock, PIN Lock, FDN, */ static void setting_security_main_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) { + SETTING_TRACE_BEGIN; /* error check */ retm_if(data == NULL, "[Setting > Reset] Data parameter is NULL"); Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; SettingSecurityUG *ad = list_item->userdata; - - list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ - setting_security_main_draw_onoff_status(ad, obj); -} -void _mouse_up_change_pin(void *data, int sel_item) -{ - ret_if(data == NULL); - - SettingSecurityUG *ad = (SettingSecurityUG *) data; - - ad->sel_item = sel_item; /* 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ - int ret; - int value = 0; - int err; + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ - ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + // create password-ug + //setting_security_main_draw_onoff_status(ad, obj); + if (!safeStrCmp("IDS_ST_BODY_PHONE_LOCK", list_item->keyStr)) { + #if !SUPPORT_SCREEN_SECURITY + setting_check_onoff_status(list_item->eo_check, BOOL_SLP_SETTING_POWER_ON_LOCK); /* reset check state */ + ad->pw_type = SETTING_SEC_PW_PHONE_LOCK; + setting_security_create_password_sg(ad); + #endif + }else if (!safeStrCmp("IDS_ST_BODY_SIMPLE_PASSWORD", list_item->keyStr)) { + setting_check_onoff_status(list_item->eo_check, BOOL_SLP_SETTING_SIMPLE_PASSWORD); /* reset check state */ + ad->pw_type = SETTING_SEC_PW_SIMPLE_PASSWD; + setting_security_create_password_sg(ad); - switch (value) { - case VCONFKEY_TELEPHONY_SIM_INSERTED: - break; - case VCONFKEY_TELEPHONY_SIM_NOT_PRESENT: - setting_create_popup_without_title(NULL, ad->win_get, - _("IDS_ST_SECURITY_BODY_NOIMSI")); - SETTING_TRACE_DEBUG - ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", - SETTING_FONT_RED, value, SETTING_FONT_BLACK); - return; - break; - case VCONFKEY_TELEPHONY_SIM_CARD_ERROR: - case VCONFKEY_TELEPHONY_SIM_UNKNOWN: - setting_create_popup_without_title(NULL, ad->win_get, - _("IDS_COM_BODY_INVALID_SIM_CARD")); - SETTING_TRACE_DEBUG - ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", - SETTING_FONT_RED, value, SETTING_FONT_BLACK); - return; - break; - default: - break; } +} +#endif - /* check sim status */ - TapiResult_t tapi_ret = TAPI_API_INVALID_INPUT; - TelSimCardType_t sim_card = TAPI_SIM_CARD_TYPE_UNKNOWN; +#ifdef TEST_MDM +#define SETTING_MDM_TEST_MENU_NAME_STR 65 +/* @ for MDM test @ */ +gboolean setting_security_create_password_sg_for_mdm(void *data) +{ + /* error check */ + retv_if(data == NULL, FALSE); - tapi_ret = tel_get_sim_type(&sim_card); + SettingSecurityUG *ad = (SettingSecurityUG *) data; /* ad is point to data */ - if (sim_card == (TelSimCardType_t) SETTING_TAPI_UNKNOWN_SIM_TYPE) { - SETTING_TRACE_DEBUG - ("%s*** [ERR] tel_get_sim_type. sim_card=%d ***%s", - SETTING_FONT_RED, sim_card, SETTING_FONT_BLACK); - setting_create_popup_without_title(NULL, ad->win_get, - _("IDS_COM_BODY_INVALID_SIM_CARD")); - return; + if (ad->ug_passwd) { + SETTING_TRACE("Password UG is already loaded."); + return FALSE; } - TelSimPinStatus_t pin_status = -1; - TelSimPinType_t pin_type = 0; + char str[SETTING_MDM_TEST_MENU_NAME_STR] = { 0, }; + safeCopyStr(str, "SETTING_PW_TYPE_MDM_CHANGE_PASSWORD", SETTING_MDM_TEST_MENU_NAME_STR-1); - if(sel_item == 1) - pin_type = TAPI_SIM_PTYPE_PIN1; - else if(sel_item == 3) - pin_type = TAPI_SIM_PTYPE_PIN2; + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); - tapi_ret = tel_get_sim_security_status(pin_type, &pin_status); - SETTING_TRACE("pin_status is [%d]", pin_status); + if (!cbs) + return FALSE; + cbs->layout_cb = setting_security_layout_passwd_ug_cb; + cbs->result_cb = setting_security_result_password_ug_cb; + cbs->destroy_cb = setting_security_destroy_password_ug_cb; + cbs->priv = (void *)ad; - if (tapi_ret != TAPI_API_SUCCESS) { - SETTING_TRACE_DEBUG - ("%s*** [ERR] tel_get_sim_security_status. err=%d ***%s", - SETTING_FONT_RED, tapi_ret, SETTING_FONT_BLACK); - setting_create_popup_without_title(NULL, ad->win_get, - _("IDS_COM_BODY_INVALID_SIM_CARD")); - return; + service_h svc; + if (service_create(&svc)) { + FREE(cbs); + return FALSE; } - if (pin_status == TAPI_SIM_PIN_STATUS_ENABLED) { - if(sel_item == 1) - ad->pw_type = SETTING_SEC_PW_CHANGE_PIN1; - else if(sel_item == 3) - ad->pw_type = SETTING_SEC_PW_CHANGE_PIN2; - setting_security_create_password_sg(ad); - } else if (pin_status == TAPI_SIM_PIN_STATUS_BLOCKED) { - if(sel_item == 1) - ad->pw_type = SETTING_SEC_PW_PIN1_BLOCKED; - else if(sel_item == 3) - ad->pw_type = SETTING_SEC_PW_PIN2_BLOCKED; - setting_security_create_password_sg(ad); - } else { - setting_create_popup_without_title(NULL, ad->win_get, - _("IDS_ST_BODY_UNABLE_TO_CHANGE_PIN")); + service_add_extra_data(svc, "viewtype", str); + + ad->ug_passwd = ug_create(ad->ug, "setting-password-efl", UG_MODE_FULLVIEW, svc, cbs); + if (NULL == ad->ug_passwd) { /* error handling */ + evas_object_show(ad->ly_main); } + + service_destroy(svc); + FREE(cbs); + + return TRUE; } +#endif static void setting_security_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info) { + SETTING_TRACE_BEGIN; /* error check */ setting_retm_if(data == NULL, "Data parameter is NULL"); @@ -604,29 +502,60 @@ setting_security_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); - if (!safeStrCmp("IDS_ST_BODY_PHONE_LOCK", list_item->keyStr) - || !safeStrCmp("IDS_ST_BODY_SIM_LOCK", list_item->keyStr) - || !safeStrCmp("IDS_COM_BODY_PIN_LOCK", list_item->keyStr) - || !safeStrCmp("IDS_ST_BODY_SIMPLE_PASSWORD", list_item->keyStr) - || !safeStrCmp("RCS", list_item->keyStr)) { - int old_status = elm_check_state_get(list_item->eo_check); - /* new status */ - list_item->chk_status = !old_status; - elm_check_state_set(list_item->eo_check, list_item->chk_status); - setting_security_main_draw_onoff_status(ad, list_item->eo_check); - } else - if (!safeStrCmp("IDS_COM_POP_CHANGE_PASSWORD", list_item->keyStr)) { - ad->pw_type = SETTING_SEC_PW_CHANGE_PASSWD; - setting_security_create_password_sg(ad); - } else if (!safeStrCmp("IDS_ST_BODY_CHANGE_PIN1", list_item->keyStr)) { - _mouse_up_change_pin(ad, 1); /* 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ - } else if (!safeStrCmp("IDS_ST_BODY_CHANGE_PIN2", list_item->keyStr)) { - _mouse_up_change_pin(ad, 3); /* 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ + if (!safeStrCmp("IDS_ST_HEADER2_FIND_MY_MOBILE", list_item->keyStr)) { + setting_security_create_find_my_mobile_sg(ad, 0, NULL); + } +#ifdef TEST_MDM + /* @ for MDM test @ */ + else if(!safeStrCmp("MDM test", list_item->keyStr)) { + setting_security_create_password_sg_for_mdm(ad); + } +#endif +#if SUPPORT_ENCRYPTION + else if(!safeStrCmp("IDS_ASEML_BODY_DEVICE_ENCRYPTION", list_item->keyStr)) + { + /* To do : create device encryption view */ + setting_create_simple_popup(NULL, ad->win_get, + NULL, "NOT IMPLEMENTED YET"); + } +#endif +#if SUPPORT_SCREEN_SECURITY + else if(!safeStrCmp(Keystr_ScreenLockType, list_item->keyStr)) { + /* To do : check current password, if spw or pw set. */ + int lock_type = SETTING_SCREEN_LOCK_TYPE_SWIPE; //elm_radio_value_get(ad->lock_type_rd); + vconf_get_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, &lock_type); + + if(lock_type == SETTING_SCREEN_LOCK_TYPE_PASSWORD + || lock_type == SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD) + { + ad->pw_type = SETTING_SEC_PW_ENTER_LOCK_TYPE; + setting_security_create_password_sg(ad); + } + else + { + setting_view_change(&setting_view_security_main, &setting_view_security_screen_lock_type, ad); + } + } + else if(!safeStrCmp(Keystr_LockScreenOptions, list_item->keyStr)) { + setting_security_create_lockscreen_options_sg(ad); + } +#endif +#if SUPPORT_PARENTAL_MODE + else if(!safeStrCmp(Keystr_ParentalMode, list_item->keyStr)) { + /* to do : call parental mode ug */ + setting_create_simple_popup(NULL, ad->win_get, + NULL, "NOT IMPLEMENTED YET"); + } +#endif + else if(!safeStrCmp("SIM settings", list_item->keyStr)) { + setting_view_change(&setting_view_security_main, &setting_view_security_sim_settings, ad); } } +#if DISABLED_CODE static void setting_security_main_update_view(void *data, char *keyStr) { + SETTING_TRACE_BEGIN; ret_if(!data); SettingSecurityUG *ad = (SettingSecurityUG *) data; @@ -693,6 +622,7 @@ static void setting_security_main_update_view(void *data, char *keyStr) static void setting_security_main_create_timer(void *data) { + SETTING_TRACE_BEGIN; ret_if(!data); SettingSecurityUG *ad = (SettingSecurityUG *) data; @@ -709,23 +639,36 @@ static Eina_Bool setting_security_main_timer_update_cb(void *data) retv_if(!data, EINA_TRUE); SettingSecurityUG *ad = (SettingSecurityUG *) data; - setting_security_main_update_view(ad, "IDS_ST_BODY_PHONE_LOCK"); + //setting_security_main_update_view(ad, "IDS_ST_BODY_PHONE_LOCK"); setting_security_main_update_view(ad, "IDS_ST_BODY_SIM_LOCK"); return EINA_TRUE; } - -static void setting_security_main_vconf_change_cb(keynode_t *key, void *data) +#endif +void setting_security_main_vconf_change_cb(keynode_t *key, void *data) { + SETTING_TRACE_BEGIN; ret_if(NULL == data); SettingSecurityUG *ad = (SettingSecurityUG *) data; + char *str = NULL; + if(ad->data_screen_lock_type) + { + str = (char*)g_strdup(get_screen_lock_type_str(ad)); + if(!str) + str = g_strdup("err"); + + ad->data_screen_lock_type->sub_desc = str; + elm_genlist_item_update(ad->data_screen_lock_type->item); + } + setting_security_main_check_vconf_value(ad); } static void setting_security_main_check_vconf_value(void *data) { + SETTING_TRACE_BEGIN; ret_if(NULL == data); - SettingSecurityUG *ad = (SettingSecurityUG *) data; + //SettingSecurityUG *ad = (SettingSecurityUG *) data; setting_int_slp_list phone_lock_attemps_left = INT_SLP_SETTING_PHONE_LOCK_ATTEMPTS_LEFT; @@ -744,7 +687,7 @@ static void setting_security_main_check_vconf_value(void *data) setting_get_int_slp_key(sim_lock_attemps_left, &sim_lock_value, &err); setting_retm_if(err == SETTING_RETURN_FAIL, "[Error] get the value of vconf fail."); - +/* if (phone_lock_value == 0 || sim_lock_value == 0) { setting_security_main_create_timer(ad); } else { @@ -754,4 +697,5 @@ static void setting_security_main_check_vconf_value(void *data) ad->update_view_timer = NULL; } } +*/ } diff --git a/setting-security/src/setting-security-screen-lock-type.c b/setting-security/src/setting-security-screen-lock-type.c new file mode 100755 index 0000000..d144d9c --- /dev/null +++ b/setting-security/src/setting-security-screen-lock-type.c @@ -0,0 +1,323 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#include +#include + +#include +#include +#include +#include + +static int setting_security_screen_lock_type_create(void *cb); +static int setting_security_screen_lock_type_destroy(void *cb); +static int setting_security_screen_lock_type_update(void *cb); +static int setting_security_screen_lock_type_cleanup(void *cb); + +setting_view setting_view_security_screen_lock_type = { + .create = setting_security_screen_lock_type_create, + .destroy = setting_security_screen_lock_type_destroy, + .update = setting_security_screen_lock_type_update, + .cleanup = setting_security_screen_lock_type_cleanup, +}; + +/* *************************************************** + ** + **basic func + ** + ****************************************************/ + +static int setting_security_screen_lock_type_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + + Evas_Object *scroller; + Elm_Object_Item *item = NULL; + Evas_Object *radio; + Setting_GenGroupItem_Data *item_data = NULL; + + /* add basic layout */ + char setBtnStr[MAX_DISPLAY_NAME_LEN_ON_UI]; + snprintf(setBtnStr, sizeof(setBtnStr), "%s", + (char *)dgettext("sys_string", "IDS_COM_BODY_BACK")); + + + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(Keystr_ScreenLockType), + setBtnStr, NULL, + setting_security_screen_lock_type_click_softkey_back_cb, + NULL, ad, &scroller, ad->navi_bar); + + radio = elm_radio_add(scroller); + elm_radio_state_value_set(radio, -1); + ad->lock_type_rd = radio; + + /* separator */ + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* to do : radio menu */ + /* 1) swipe */ + item_data = + setting_create_Gendial_field_1radio(scroller, + &(itc_1text_1icon_2), + setting_security_screen_lock_type_mouse_up_Gendial_list_cb, /*add to sel_cb */ + ad, /* sel data */ + SWALLOW_Type_1RADIO, + radio, SETTING_SCREEN_LOCK_TYPE_SWIPE, + Keystr_Swipe, + NULL); + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + /* 2) Motion */ + item_data = + setting_create_Gendial_field_1radio(scroller, + &(itc_1text_1icon_2), + setting_security_screen_lock_type_mouse_up_Gendial_list_cb, /*add to sel_cb */ + ad, /* sel data */ + SWALLOW_Type_1RADIO, + radio, SETTING_SCREEN_LOCK_TYPE_MOTION, + KeyStr_Motions, + NULL); + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + + /* 3) Face and voice */ + item_data = + setting_create_Gendial_field_1radio(scroller, + &(itc_1text_1icon_2), + setting_security_screen_lock_type_mouse_up_Gendial_list_cb, /*add to sel_cb */ + ad, /* sel data */ + SWALLOW_Type_1RADIO, + radio, SETTING_SCREEN_LOCK_TYPE_FACE_AND_VOICE, + Keystr_FaceAndVoice, + NULL); + if (item_data) { + item_data->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + + /* 4) simple password */ + //item_data = + ad->data_simple_pw = + setting_create_Gendial_field_1radio(scroller, + &(itc_1text_1icon_2), + setting_security_screen_lock_type_mouse_up_Gendial_list_cb, /*add to sel_cb */ + ad, /* sel data */ + SWALLOW_Type_1RADIO, + radio, SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD, + "IDS_ST_BODY_SIMPLE_PASSWORD", + NULL); + if (ad->data_simple_pw) { + ad->data_simple_pw->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + + /* 5) password */ + //item_data = + ad->data_phone_lk = + setting_create_Gendial_field_1radio(scroller, + &(itc_1text_1icon_2), + setting_security_screen_lock_type_mouse_up_Gendial_list_cb, /*add to sel_cb */ + ad, /* sel data */ + SWALLOW_Type_1RADIO, + radio, SETTING_SCREEN_LOCK_TYPE_PASSWORD, + "IDS_ST_BODY_PASSWORD", + NULL); + if (ad->data_phone_lk) { + ad->data_phone_lk->userdata = ad; + } else { + SETTING_TRACE_ERROR("item_data is NULL"); + } + + /* update info */ + int screen_lock_type = 0; + vconf_get_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, &screen_lock_type); + elm_radio_value_set(radio, screen_lock_type); + + setting_view_security_screen_lock_type.is_create = 1; + + return SETTING_RETURN_SUCCESS; + +} + +static int setting_security_screen_lock_type_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + + setting_view_security_screen_lock_type.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_security_screen_lock_type_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_security_screen_lock_type_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + return setting_security_screen_lock_type_destroy(ad); +} + +/* *************************************************** + ** + **call back func + ** + ****************************************************/ + +static void +setting_security_screen_lock_type_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + int lock_type = SETTING_SCREEN_LOCK_TYPE_SWIPE; + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if(!safeStrCmp("IDS_ST_BODY_SIMPLE_PASSWORD", list_item->keyStr)) + { + lock_type = SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD; + } + else if(!safeStrCmp("IDS_ST_BODY_PASSWORD", list_item->keyStr)) + { + lock_type = SETTING_SCREEN_LOCK_TYPE_PASSWORD; + } + /* To do : Add other cases */ + else if(!safeStrCmp(Keystr_Swipe, list_item->keyStr)) + { + lock_type = SETTING_SCREEN_LOCK_TYPE_SWIPE; + } + else if(!safeStrCmp(KeyStr_Motions, list_item->keyStr)) + { + lock_type = SETTING_SCREEN_LOCK_TYPE_MOTION; + } + else if(!safeStrCmp(Keystr_FaceAndVoice, list_item->keyStr)) + { + lock_type = SETTING_SCREEN_LOCK_TYPE_FACE_AND_VOICE; + } + + int old_type = elm_radio_value_get(list_item->eo_check); + + /* If lock_type is same with old_lock_type, return. */ + if(lock_type == old_type) + { + SETTING_TRACE_DEBUG("[Screen Lock Type] Selected same type"); + return; + } + + switch(lock_type) + { + case SETTING_SCREEN_LOCK_TYPE_SWIPE: + case SETTING_SCREEN_LOCK_TYPE_MOTION: + /* To do : Call security-server API. pw : 0000 */ + if(old_type == SETTING_SCREEN_LOCK_TYPE_PASSWORD + || old_type == SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD) + SETTING_TRACE_DEBUG("set_pwd result : %d", security_server_set_pwd(ad->input_pwd, "0000", 0, 30)); + if(vconf_set_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, lock_type) == 0) + { + /* set radio */ + elm_radio_value_set(list_item->eo_check, lock_type); + } + break; + case SETTING_SCREEN_LOCK_TYPE_FACE_AND_VOICE: + /* To do : Call security-server API. pw : 0000 */ + if(old_type == SETTING_SCREEN_LOCK_TYPE_PASSWORD + || old_type == SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD) + SETTING_TRACE_DEBUG("set_pwd result : %d", security_server_set_pwd(ad->input_pwd, "0000", 0, 30)); + setting_create_simple_popup(NULL, ad->win_get, NULL, "NOT SUPPORT YET"); + if(vconf_set_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, lock_type) == 0) + { + /* set radio */ + elm_radio_value_set(list_item->eo_check, lock_type); + } + break; + case SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD: + ad->pw_type = SETTING_SEC_PW_SIMPLE_PASSWD; + if(old_type != SETTING_SCREEN_LOCK_TYPE_PASSWORD) + ad->input_pwd = (char*)strdup("0000"); + setting_security_create_password_sg(ad); + break; + case SETTING_SCREEN_LOCK_TYPE_PASSWORD: + ad->pw_type = SETTING_SEC_PW_PASSWORD; + if(old_type != SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD) + ad->input_pwd = (char*)strdup("0000"); + setting_security_create_password_sg(ad); + break; + default: + break; + } +} + + + +static void +setting_security_screen_lock_type_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "[Setting > Security] Data parameter is NULL"); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + setting_view_change(&setting_view_security_screen_lock_type, &setting_view_security_main, ad); + SETTING_TRACE_END; +} diff --git a/setting-security/src/setting-security-sim-settings.c b/setting-security/src/setting-security-sim-settings.c new file mode 100755 index 0000000..d852080 --- /dev/null +++ b/setting-security/src/setting-security-sim-settings.c @@ -0,0 +1,422 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#include +#include + +#include +#include +#include + +static int setting_security_sim_settings_create(void *cb); +static int setting_security_sim_settings_destroy(void *cb); +static int setting_security_sim_settings_update(void *cb); +static int setting_security_sim_settings_cleanup(void *cb); + +setting_view setting_view_security_sim_settings = { + .create = setting_security_sim_settings_create, + .destroy = setting_security_sim_settings_destroy, + .update = setting_security_sim_settings_update, + .cleanup = setting_security_sim_settings_cleanup, +}; + +/* *************************************************** + ** + **basic func + ** + ****************************************************/ + +static int setting_security_sim_settings_create(void *cb) +{ + SETTING_TRACE_BEGIN; + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + + Evas_Object *scroller; + Elm_Object_Item *item = NULL; + + /* add basic layout */ + setting_push_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _("SIM settings"), + dgettext("sys_string", "IDS_COM_BODY_BACK"), NULL, + setting_security_sim_settings_click_softkey_back_cb, + NULL, ad, &scroller, ad->navi_bar); + + /* separator */ + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* to do : sim settings menu */ + + /* f. sim lock */ + //if TAPI is responsed in time, ad->sim_status will have invalid value, + //or else ad->data_sim_lk will be updated by setting_security_sim_get_facility_cb + ad->data_sim_lk = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_security_sim_settings_mouse_up_Gendial_list_cb, ad, + SWALLOW_Type_1TOGGLE, + NULL, NULL, + ad->sim_status,"IDS_ST_BODY_SIM_LOCK", NULL, setting_security_sim_settings_chk_btn_cb); + if(ad->data_sim_lk) + ad->data_sim_lk->userdata = ad; + else { + SETTING_TRACE_ERROR("ad->data_sim_lk is null"); + return SETTING_RETURN_FAIL; + } + + //setting_security_main_update_view(ad, "IDS_ST_BODY_SIM_LOCK"); + + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* g. pin lock */ + //if TAPI is responsed in time, ad->sim_status will have invalid value, + //or else ad->data_pin_lk will be updated by setting_security_sim_get_facility_cb + ad->data_pin_lk = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_security_sim_settings_mouse_up_Gendial_list_cb, ad, + SWALLOW_Type_1TOGGLE, + NULL, NULL, + ad->pin1_status,"IDS_COM_BODY_PIN_LOCK", NULL, setting_security_sim_settings_chk_btn_cb); + if(ad->data_pin_lk) + ad->data_pin_lk->userdata = ad; + + /* h. change pin1 */ + ad->data_change_pin1 = setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_security_sim_settings_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0,"IDS_ST_BODY_CHANGE_PIN1", NULL, NULL); + + if(!ad->pin1_status) + setting_disable_genlist_item(ad->data_change_pin1->item); + + /* i. change pin2 */ + setting_create_Gendial_field_def(scroller, &(ad->itc_1text), + setting_security_sim_settings_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0,"IDS_ST_BODY_CHANGE_PIN2", NULL, NULL); +#if SUPPORT_FDN + /* j. FDN */ + //if TAPI is responsed in time, ad->sim_status will have invalid value, + //or else ad->data_fdn will be updated by setting_security_sim_get_facility_cb + ad->data_fdn = setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + setting_security_sim_settings_mouse_up_Gendial_list_cb, ad, + SWALLOW_Type_1TOGGLE, + NULL, NULL, + ad->pin2_status, Keystr_FDN, NULL, setting_security_sim_settings_chk_btn_cb); + if(ad->data_fdn) + ad->data_fdn->userdata = ad; +#endif + + setting_view_security_sim_settings.is_create = 1; + + vconf_notify_key_changed(VCONFKEY_SETAPPL_SIM_LOCK_ATTEMPTS_LEFT_INT, + setting_security_main_vconf_change_cb, ad); + + return SETTING_RETURN_SUCCESS; + +} + +static int setting_security_sim_settings_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + + elm_naviframe_item_pop(ad->navi_bar); + + vconf_ignore_key_changed(VCONFKEY_SETAPPL_SIM_LOCK_ATTEMPTS_LEFT_INT, + setting_security_main_vconf_change_cb); + + setting_view_security_sim_settings.is_create = 0; + + return SETTING_RETURN_SUCCESS; +} + +static int setting_security_sim_settings_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + return SETTING_RETURN_SUCCESS; +} + +static int setting_security_sim_settings_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingSecurityUG *ad = (SettingSecurityUG *) cb; + return setting_security_sim_settings_destroy(ad); +} + +/* *************************************************** + ** + **call back func + ** + ****************************************************/ + void _draw_pin_onoff_status(void *data, Evas_Object *check) +{ + SETTING_TRACE("PIN Lock"); + + ret_if(data == NULL); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + int value = 0; + int err = 0; + int ret = 0; + + ad->sel_item = 0; /* 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ + + ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + + ret = _handle_sim_exception(ad, value); + if(ret == SETTING_RETURN_FAIL) + return; + + /* check sim status */ + int tapi_ret = TAPI_API_INVALID_INPUT; + TelSimCardType_t sim_card = TAPI_SIM_CARD_TYPE_UNKNOWN; + + tapi_ret = tel_get_sim_type(ad->handle, &sim_card); + SETTING_TRACE("SIM Type is %d", (int)sim_card); + if (sim_card == (TelSimCardType_t) SETTING_TAPI_UNKNOWN_SIM_TYPE) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] tel_get_sim_type. sim_card=%d ***%s", + SETTING_FONT_RED, sim_card, SETTING_FONT_BLACK); + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_COM_BODY_INVALID_SIM_CARD")); + return; + } + + int old_state = elm_check_state_get(check); + if (old_state) { + SETTING_TRACE("Current status of SIM Lock is ON"); + ad->pw_type = SETTING_SEC_PW_PIN_LOCK_OFF; + setting_security_create_password_sg(ad); + } else { + SETTING_TRACE("Current status of SIM Lock is OFF"); + ad->pw_type = SETTING_SEC_PW_PIN_LOCK_ON; + setting_security_create_password_sg(ad); + } +} + +void _draw_sim_onoff_status(void *data, Evas_Object *check) +{ + ret_if(data == NULL); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + int value = 0; + int err = 0; + int ret = 0; + + ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + ret = _handle_sim_exception(ad, value); + if(ret == SETTING_RETURN_FAIL) + return; + + int old_state = elm_check_state_get(check); + if (old_state) { + SETTING_TRACE("Current status of SIM Lock is ON"); + ad->pw_type = SETTING_SEC_PW_SIM_LOCK_OFF; + setting_security_create_password_sg(ad); + } else { + SETTING_TRACE("Current status of SIM Lock is OFF"); + ad->pw_type = SETTING_SEC_PW_SIM_LOCK_ON; + setting_security_create_password_sg(ad); + } +} + +void _mouse_up_change_pin(void *data, int sel_item) +{ + ret_if(data == NULL); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + ad->sel_item = sel_item; /* 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ + int ret; + int value = 0; + int err; + + ret = setting_get_int_slp_key(INT_SLP_SETTING_SIM_SLOT, &value, &err); + + switch (value) { + case VCONFKEY_TELEPHONY_SIM_INSERTED: + break; + case VCONFKEY_TELEPHONY_SIM_NOT_PRESENT: + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_ST_SECURITY_BODY_NOIMSI")); + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", + SETTING_FONT_RED, value, SETTING_FONT_BLACK); + return; + break; + case VCONFKEY_TELEPHONY_SIM_CARD_ERROR: + case VCONFKEY_TELEPHONY_SIM_UNKNOWN: + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_COM_BODY_INVALID_SIM_CARD")); + SETTING_TRACE_DEBUG + ("%s*** [ERR] INCORRECTED SIM. sim_slot_type=%d ***%s", + SETTING_FONT_RED, value, SETTING_FONT_BLACK); + return; + break; + default: + break; + } + + /* check sim status */ + TapiResult_t tapi_ret = TAPI_API_INVALID_INPUT; + TelSimCardType_t sim_card = TAPI_SIM_CARD_TYPE_UNKNOWN; + + tapi_ret = tel_get_sim_type(ad->handle, &sim_card); + + if (sim_card == (TelSimCardType_t) SETTING_TAPI_UNKNOWN_SIM_TYPE) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] tel_get_sim_type. sim_card=%d ***%s", + SETTING_FONT_RED, sim_card, SETTING_FONT_BLACK); + setting_create_simple_popup(NULL, ad->win_get, + NULL, _("IDS_COM_BODY_INVALID_SIM_CARD")); + return; + } + if(sel_item == 1) + { + //pin_type = TAPI_SIM_PTYPE_PIN1; + if (TAPI_SIM_FACILITY_ENABLED == ad->pin1_status) + { + ad->pw_type = SETTING_SEC_PW_CHANGE_PIN1; + setting_security_create_password_sg(ad); + } + else + { + ad->pw_type = SETTING_SEC_PW_PIN1_BLOCKED; + setting_security_create_password_sg(ad); + } + } + else if(sel_item == 3) + { + //pin_type = TAPI_SIM_PTYPE_PIN2; + if (TAPI_SIM_FACILITY_ENABLED == ad->pin2_status) + { + ad->pw_type = SETTING_SEC_PW_CHANGE_PIN2; + setting_security_create_password_sg(ad); + } + else + { + ad->pw_type = SETTING_SEC_PW_PIN2_BLOCKED; + setting_security_create_password_sg(ad); + } + } +} + +static void +setting_security_sim_settings_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if (!safeStrCmp("IDS_ST_BODY_SIM_LOCK", list_item->keyStr)) { + //it invokes async TAPIs to enable/disable, so don't change the status at first to avoid rollback + _draw_sim_onoff_status(ad, list_item->eo_check); + + }else if (!safeStrCmp("IDS_COM_BODY_PIN_LOCK", list_item->keyStr)) { + //it invokes async TAPIs to enable/disable, so don't change the status at first to avoid rollback + _draw_pin_onoff_status(ad, list_item->eo_check); + + } else if (!safeStrCmp("IDS_ST_BODY_CHANGE_PIN1", list_item->keyStr)) { + _mouse_up_change_pin(ad, 1); /* 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ + } else if (!safeStrCmp("IDS_ST_BODY_CHANGE_PIN2", list_item->keyStr)) { + _mouse_up_change_pin(ad, 3); /* 0:click pin lock, 1:change pin1 code, 2:fdn, 3: change pin2 code */ + } +} + +static void +setting_security_sim_settings_chk_btn_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "[Setting > Reset] Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data; + SettingSecurityUG *ad = list_item->userdata; + + list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */ + + if (!safeStrCmp("IDS_ST_BODY_SIM_LOCK", list_item->keyStr)) { + //Rollback state of toggle. + //it invokes async TAPIs to enable/disable, so don't change the status at first to avoid rollback + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + _draw_sim_onoff_status(ad, obj); + + }else if (!safeStrCmp("IDS_COM_BODY_PIN_LOCK", list_item->keyStr)) { + //Rollback state of toggle. + //it invokes async TAPIs to enable/disable, so don't change the status at first to avoid rollback + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + _draw_pin_onoff_status(ad, obj); + + } +#if SUPPORT_FDN + else if (!safeStrCmp(Keystr_FDN, list_item->keyStr)){ + //Rollback state of toggle. + //it invokes async TAPIs to enable/disable, so don't change the status at first to avoid rollback + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(obj, list_item->chk_status); + ad->chk_fdn = obj; + _draw_fdn_onoff_status(ad, obj); + } +#endif +} + + +static void +setting_security_sim_settings_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "[Setting > Security] Data parameter is NULL"); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + setting_view_change(&setting_view_security_sim_settings, &setting_view_security_main, ad); + SETTING_TRACE_END; +} diff --git a/setting-security/src/setting-security.c b/setting-security/src/setting-security.c old mode 100644 new mode 100755 index c54bc59..17d76b5 --- a/setting-security/src/setting-security.c +++ b/setting-security/src/setting-security.c @@ -1,43 +1,344 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +/** + *@defgroup setting-security + *UG creation code for setting-security + */ + #include #define Max_Passwd_View_Type_Len 64 #ifndef UG_MODULE_API #define UG_MODULE_API __attribute__ ((visibility("default"))) #endif -static struct _security_item security_its[] = { - { SETTING_SEC_PW_POWER_ON, "SETTING_PW_TYPE_POWER_ON_LOCK" }, - { SETTING_SEC_PW_PHONE_LOCK, "SETTING_PW_TYPE_PHONE_LOCK" }, - { SETTING_SEC_PW_PHONE_LOCK_ON, "SETTING_PW_TYPE_PHONE_LOCK_ON" }, - { SETTING_SEC_PW_SIMPLE_PASSWD, "SETTING_PW_TYPE_SIMPLE_PASSWORD" }, - { SETTING_SEC_PW_CHANGE_PASSWD, "SETTING_PW_TYPE_CHANGE_PASSWORD" }, - { SETTING_SEC_PW_SIM_LOCK_ON, "SETTING_PW_TYPE_SIM_LOCK_ON" }, - { SETTING_SEC_PW_SIM_LOCK_OFF, "SETTING_PW_TYPE_SIM_LOCK_OFF" }, - { SETTING_SEC_PW_PIN_LOCK_ON, "SETTING_PW_TYPE_PIN_LOCK_ON" }, - { SETTING_SEC_PW_PIN_LOCK_OFF, "SETTING_PW_TYPE_PIN_LOCK_OFF" }, - { SETTING_SEC_PW_CHANGE_PIN1, "SETTING_PW_TYPE_CHANGE_PIN1" }, - { SETTING_SEC_PW_FDN_MODE_ON, "SETTING_PW_TYPE_FDN_MODE_ON" }, - { SETTING_SEC_PW_FDN_MODE_OFF, "SETTING_PW_TYPE_FDN_MODE_OFF" }, - { SETTING_SEC_PW_CHANGE_PIN2, "SETTING_PW_TYPE_CHANGE_PIN2" }, - { SETTING_SEC_PW_PIN1_BLOCKED, "SETTING_PW_TYPE_PIN1_BLOCKED" }, - { SETTING_SEC_PW_PIN2_BLOCKED, "SETTING_PW_TYPE_PIN2_BLOCKED" }, - { SETTING_SEC_PW_MAX, NULL } + +int pwd_handler_do_nothing(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + //SettingSecurityUG *ad = (SettingSecurityUG *)data; + // DO NOTHING + return 0; +} + + +int pwd_handler_sec_pw_passwd(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + + if(vconf_set_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, SETTING_SCREEN_LOCK_TYPE_PASSWORD) == 0) + { + /* set radio */ + elm_radio_value_set(ad->lock_type_rd, SETTING_SCREEN_LOCK_TYPE_PASSWORD); + } + else + { + SETTING_TRACE_ERROR("setting vconf value failed : screen_lock_type"); + } + return 0; +} + +int pwd_handler_sec_pw_simple_passwd (SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + + if(vconf_set_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD) == 0) + { + /* set radio */ + elm_radio_value_set(ad->lock_type_rd, SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD); + } + else + { + SETTING_TRACE_ERROR("setting vconf value failed : screen_lock_type"); + } + return 0; +} + +int pwd_handler_sec_pw_sim_lock_on(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_PS, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } + return 0; +} + + +int pwd_handler_sec_pw_sim_lock_off(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_PS, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } + return 0; +} + + +int pwd_handler_sec_pw_pin_lock_on(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_SC, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } + return 0; +} + + +int pwd_handler_sec_pw_pin_lock_off(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_SC, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } + return 0; +} + + +int pwd_handler_sec_pw_sim_lock_disabled(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + // [in] Evas_Object *checkbtn + if (ad->data_sim_lk) + setting_disable_genlist_item(ad->data_sim_lk->item); + + return 0; +} + + +int pwd_handler_sec_pw_change_pin1(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_SC, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } + return 0; +} + +#if SUPPORT_FDN +int pwd_handler_sec_pw_fdn_mode_on(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_FD, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } + return 0; +} + + +int pwd_handler_sec_pw_fdn_mode_off(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_FD, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } + return 0; +} +#endif + +int pwd_handler_sec_pw_change_pin2(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; +#if SUPPORT_FDN + SettingSecurityUG *ad = (SettingSecurityUG *)data; + + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_FD, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } +#endif + return 0; +} + + +int pwd_handler_sec_pw_pin1_blocked(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; + SettingSecurityUG *ad = (SettingSecurityUG *)data; + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_SC, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } + + return 0; +} + + +int pwd_handler_sec_pw_pin2_blocked(SettingSecurityUG *data, void* arg) +{ + SETTING_TRACE_BEGIN; +#if SUPPORT_FDN + SettingSecurityUG *ad = (SettingSecurityUG *)data; + + if (tel_get_sim_facility(ad->handle, TAPI_SIM_LOCK_FD, setting_security_sim_get_facility_cb, ad) != TAPI_API_SUCCESS) + { + SETTING_TRACE_ERROR("tel_get_sim_facility(TAPI_SIM_LOCK_PS) failed"); + } +#endif + return 0; +} + +static struct _security_item security_table[] = { + { SETTING_SEC_PW_PASSWORD, "SETTING_PW_TYPE_PASSWORD", pwd_handler_sec_pw_passwd }, + { SETTING_SEC_PW_SIMPLE_PASSWD, "SETTING_PW_TYPE_SIMPLE_PASSWORD", pwd_handler_sec_pw_simple_passwd }, + { SETTING_SEC_PW_CHANGE_PASSWD, "SETTING_PW_TYPE_CHANGE_PASSWORD", pwd_handler_do_nothing }, + { SETTING_SEC_PW_CHANGE_SIMPLE_PASSWD, "SETTING_PW_TYPE_CHANGE_SIMPLE_PASSWORD", pwd_handler_do_nothing }, + { SETTING_SEC_PW_ENTER_LOCK_TYPE, "SETTING_PW_TYPE_ENTER_LOCK_TYPE", pwd_handler_do_nothing}, + { SETTING_SEC_PW_SIM_LOCK_ON, "SETTING_PW_TYPE_SIM_LOCK_ON", pwd_handler_sec_pw_sim_lock_on }, + { SETTING_SEC_PW_SIM_LOCK_OFF, "SETTING_PW_TYPE_SIM_LOCK_OFF", pwd_handler_sec_pw_sim_lock_off }, + { SETTING_SEC_PW_SIM_LOCK_DISABLED, "SETTING_PW_TYPE_SIM_LOCK_DISABLE", pwd_handler_sec_pw_sim_lock_disabled}, + { SETTING_SEC_PW_PIN_LOCK_ON, "SETTING_PW_TYPE_PIN_LOCK_ON", pwd_handler_sec_pw_pin_lock_on }, + { SETTING_SEC_PW_PIN_LOCK_OFF, "SETTING_PW_TYPE_PIN_LOCK_OFF", pwd_handler_sec_pw_pin_lock_off }, + { SETTING_SEC_PW_CHANGE_PIN1, "SETTING_PW_TYPE_CHANGE_PIN1", pwd_handler_sec_pw_change_pin1}, +#if SUPPORT_FDN + { SETTING_SEC_PW_FDN_MODE_ON, "SETTING_PW_TYPE_FDN_MODE_ON", pwd_handler_sec_pw_fdn_mode_on}, + { SETTING_SEC_PW_FDN_MODE_OFF, "SETTING_PW_TYPE_FDN_MODE_OFF", pwd_handler_sec_pw_fdn_mode_off}, +#endif + { SETTING_SEC_PW_CHANGE_PIN2, "SETTING_PW_TYPE_CHANGE_PIN2", pwd_handler_sec_pw_change_pin2}, + { SETTING_SEC_PW_PIN1_BLOCKED, "SETTING_PW_TYPE_PIN1_BLOCKED", pwd_handler_sec_pw_pin1_blocked}, + { SETTING_SEC_PW_PIN2_BLOCKED, "SETTING_PW_TYPE_PIN2_BLOCKED", pwd_handler_sec_pw_pin2_blocked}, + /*------------------------------------------------------------------------------------------------------------*/ + { SETTING_SEC_PW_MAX, NULL, pwd_handler_do_nothing} }; + +#ifdef SUPPORT_MDM +void setting_security_disable_items_for_mdm(void *data) +{ + SETTING_TRACE_BEGIN; + ret_if(data == NULL); + + SettingSecurityUG *ad = (SettingSecurityUG *)data; + + if(ad->mdm_status != MDM_RESULT_SUCCESS) + { + SETTING_TRACE_DEBUG("[ERROR] status of mdm server is not good"); + return; + } + + ad->mdm_data = mdm_get_password_policy(); + if(ad->mdm_data == NULL) + { + ad->mdm_status = mdm_get_service(); + if(ad->mdm_status == MDM_RESULT_SUCCESS) + { + ad->mdm_data = mdm_get_password_policy(); + if(ad->mdm_data == NULL) + { + SETTING_TRACE_DEBUG("[ERROR] failed to get password policy, too"); + return; + } + } + else + { + SETTING_TRACE_DEBUG("[ERROR] status of mdm server is not good, too"); + return; + } + } + + SETTING_TRACE_DEBUG("[SUCCESS] mdm_get_password_policy() "); + ad->mdm_policy = (mdm_password_policy_t*)(ad->mdm_data->data); + + if(ad->mdm_policy->quality == MDM_PASSWORD_QUALITY_UNSPECIFIED) + { + SETTING_TRACE_DEBUG(" enable simple password, enable phone lock"); + // enable simple password, enable phone lock + setting_enable_genlist_item(ad->data_simple_pw->item); + setting_enable_genlist_item(ad->data_phone_lk->item); + } + else if((ad->mdm_policy->quality == MDM_PASSWORD_QUALITY_SOMETHING) + || (ad->mdm_policy->quality == MDM_PASSWORD_QUALITY_NUMERIC)) + { + // enable simple password, disable phone lock + if(ad->mdm_policy->min_length > 4) + { + SETTING_TRACE_DEBUG(" disable simple password, disable phone lock"); + if(vconf_set_bool(VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL, 0) == 0) + { + elm_check_state_set(ad->data_simple_pw->eo_check, 0); + setting_disable_genlist_item(ad->data_simple_pw->item); + } + } + else + { + SETTING_TRACE_DEBUG(" enable simple password, disable phone lock"); + setting_enable_genlist_item(ad->data_simple_pw->item); + } + setting_disable_genlist_item(ad->data_phone_lk->item); + } + else + { + SETTING_TRACE_DEBUG(" disable simple password, disable phone lock"); + // disable simple password, disable phone lock + if(vconf_set_bool(VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL, 0) == 0) + { + elm_check_state_set(ad->data_simple_pw->eo_check, 0); + setting_disable_genlist_item(ad->data_simple_pw->item); + } + setting_disable_genlist_item(ad->data_phone_lk->item); + } + + SETTING_TRACE_END; +} + + +void _mdm_password_receiver_cb(int status, void *data) +{ + SETTING_TRACE_BEGIN; + ret_if(data == NULL); + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + if((status == MDM_PASSWORD_QUALITY_CHANGED) + ||(status == MDM_PASSWORD_MIN_LENGTH_CHANGED)) + { + ecore_pipe_write(ad->pipe, NULL, 0); + } +} + +static void pipe_handler(void *data, void *buf, unsigned int len) +{ + SETTING_TRACE_BEGIN; + ret_if(data == NULL); + SettingSecurityUG *ad = (SettingSecurityUG *) data; + + setting_security_disable_items_for_mdm(ad); +} +#endif + static void setting_security_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info) { @@ -47,11 +348,11 @@ static void setting_security_ug_cb_resize(void *data, Evas *e, setting_view_update(&setting_view_security_main, ad); } -static void *setting_security_ug_on_create(struct ui_gadget *ug, - enum ug_mode mode, bundle *data, +static void *setting_security_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, void *priv) { - setting_retvm_if((!ug || !priv), NULL, "!ug || !priv"); + setting_retvm_if((!priv), NULL, "!priv"); SettingSecurityUG *securityUG = priv; securityUG->ug = ug; @@ -67,12 +368,15 @@ static void *setting_security_ug_on_create(struct ui_gadget *ug, /* register view node table */ setting_view_node_table_intialize(); setting_view_node_table_register(&setting_view_security_main, NULL); + setting_view_node_table_register(&setting_view_security_encryption, &setting_view_security_main); + setting_view_node_table_register(&setting_view_security_screen_lock_type, &setting_view_security_main); + setting_view_node_table_register(&setting_view_security_sim_settings, &setting_view_security_main); setting_create_Gendial_itc("dialogue/1text", &(securityUG->itc_1text)); setting_create_Gendial_itc("dialogue/2text.3", &(securityUG->itc_2text_2)); setting_create_Gendial_itc("dialogue/1text.1icon", &(securityUG->itc_1text_1icon)); - securityUG->itc_seperator.item_style = "dialogue/separator/21/with_line"; + securityUG->itc_seperator.item_style = "dialogue/separator/21/with_line"; securityUG->itc_seperator.func.text_get = NULL; securityUG->itc_seperator.func.content_get = NULL; securityUG->itc_seperator.func.state_get = NULL; @@ -80,55 +384,125 @@ static void *setting_security_ug_on_create(struct ui_gadget *ug, securityUG->update_view_timer = NULL; /* creating a view. */ + securityUG->handle = tel_init(NULL); + if (!securityUG->handle) { + SETTING_TRACE_ERROR("*** [ERR] tel_init. ***"); + //return NULL; + } + else { + if (TAPI_API_SUCCESS != tel_get_sim_facility(securityUG->handle, TAPI_SIM_LOCK_PS, setting_security_sim_get_facility_cb, securityUG)) { + SETTING_TRACE_ERROR("*** [ERR] tel_get_sim_facility(sim_status). ***"); + } + + if (TAPI_API_SUCCESS != tel_get_sim_facility(securityUG->handle, TAPI_SIM_LOCK_SC, setting_security_sim_get_facility_cb, securityUG)) { + SETTING_TRACE_ERROR("*** [ERR] tel_get_sim_facility(pin1). ***"); + } + + if (TAPI_API_SUCCESS != tel_get_sim_facility(securityUG->handle, TAPI_SIM_LOCK_FD, setting_security_sim_get_facility_cb, securityUG)) { + SETTING_TRACE_ERROR("*** [ERR] tel_get_sim_facility(pin2(/fdn)). ***"); + } + } + +#ifdef SUPPORT_MDM + securityUG->pipe = ecore_pipe_add(pipe_handler, securityUG); + + securityUG->mdm_status = mdm_get_service(); + if(securityUG->mdm_status != MDM_RESULT_SUCCESS) + { + SETTING_TRACE_DEBUG("[ERROR] failed to connect mdm server"); + } + else + { + SETTING_TRACE_DEBUG("[SUCCESS] connect mdm server"); + securityUG->mdm_handle = mdm_register_policy_receiver(MDM_POLICY_ON_PASSWORD, securityUG, _mdm_password_receiver_cb); + + if(securityUG->mdm_handle == -1) + { + SETTING_TRACE_DEBUG("[ERROR] failed to register receiver"); + ecore_pipe_del(securityUG->pipe); + } + else + { + SETTING_TRACE_DEBUG("[SUCCESS] register receiver"); + } + } +#endif + setting_view_node_set_cur_view(&setting_view_security_main); setting_view_create(&setting_view_security_main, (void *)securityUG); evas_object_event_callback_add(securityUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_security_ug_cb_resize, securityUG); + return securityUG->ly_main; } -static void setting_security_ug_on_start(struct ui_gadget *ug, bundle *data, +static void setting_security_ug_on_start(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_security_ug_on_pause(struct ui_gadget *ug, bundle *data, +static void setting_security_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_security_ug_on_resume(struct ui_gadget *ug, bundle *data, +static void setting_security_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) { } -static void setting_security_ug_on_destroy(struct ui_gadget *ug, bundle *data, +static void setting_security_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) { - setting_retm_if((!ug || !priv), "!ug || !priv"); + setting_retm_if((!priv), "!priv"); SettingSecurityUG *securityUG = priv; evas_object_event_callback_del(securityUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_security_ug_cb_resize); /* fix flash issue for gallery */ securityUG->ug = ug; + if (securityUG->handle && tel_deinit(securityUG->handle) != TAPI_API_SUCCESS) { + SETTING_TRACE_DEBUG + ("%s*** [ERR] setting_network_unsubscribe_tapi_events. ***%s", + SETTING_FONT_RED, SETTING_FONT_BLACK); + } /* delete the allocated objects. */ - setting_view_destroy(&setting_view_security_main, securityUG); + if (TRUE == setting_view_security_sim_settings.is_create) { + setting_view_destroy(&setting_view_security_sim_settings, securityUG); + } + if (TRUE == setting_view_security_screen_lock_type.is_create) { + setting_view_destroy(&setting_view_security_screen_lock_type, securityUG); + } + if (TRUE == setting_view_security_main.is_create) { + setting_view_destroy(&setting_view_security_main, securityUG); + } + if (NULL != ug_get_layout(securityUG->ug)) { evas_object_hide((Evas_Object *) ug_get_layout(securityUG->ug)); evas_object_del((Evas_Object *) ug_get_layout(securityUG->ug)); } +#ifdef SUPPORT_MDM + if(securityUG->mdm_status == MDM_RESULT_SUCCESS) + { + if(securityUG->mdm_handle != -1) + mdm_deregister_policy_receiver(securityUG->mdm_handle); + mdm_release_service(); + } + + if(securityUG->pipe) + ecore_pipe_del(securityUG->pipe); +#endif } -static void setting_security_ug_on_message(struct ui_gadget *ug, bundle *msg, - bundle *data, void *priv) +static void setting_security_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) { } -static void setting_security_ug_on_event(struct ui_gadget *ug, - enum ug_event event, bundle *data, +static void setting_security_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, void *priv) { switch (event) { @@ -153,11 +527,11 @@ static void setting_security_ug_on_event(struct ui_gadget *ug, } } -static void setting_security_ug_on_key_event(struct ui_gadget *ug, +static void setting_security_ug_on_key_event(ui_gadget_h ug, enum ug_key_event event, - bundle *data, void *priv) + service_h service, void *priv) { - if (!ug || !priv) + if (!priv) return; SettingSecurityUG *ad = (SettingSecurityUG *) priv; /* ad is point to priv */ switch (event) { @@ -167,6 +541,7 @@ static void setting_security_ug_on_key_event(struct ui_gadget *ug, elm_naviframe_bottom_item_get(ad->navi_bar)) { ug_destroy_me(ug); } else { + /* elm_naviframe_item_pop(ad->navi_bar); */ setting_view_cb_at_endKey(ad); } } @@ -212,10 +587,95 @@ UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) *general func * ***************************************************/ -static void setting_security_layout_passwd_ug_cb(struct ui_gadget *ug, +void setting_security_sim_get_facility_cb(TapiHandle *handle, int result, void *data, void *user_data) +{ + SETTING_TRACE_BEGIN; + ret_if(!data || !user_data); + TelSimPinOperationResult_t sec_rt = result; + TelSimFacilityInfo_t *fi = data; + SettingSecurityUG *ad = user_data; + + SETTING_TRACE("sec_rt[%d]", sec_rt); + SETTING_TRACE("fi->type[%d]", fi->type); + SETTING_TRACE("fi->f_status[%d]", fi->f_status); + if (sec_rt == TAPI_SIM_PIN_OPERATION_SUCCESS) + { + switch (fi->type) + { + case TAPI_SIM_LOCK_PS://sim status + ad->sim_status = fi->f_status; + SETTING_TRACE("Trying to Set sim status"); + if (ad->data_sim_lk)//it indicates TAPI is not responsed in time + { + ad->data_sim_lk->chk_status = fi->f_status; + elm_check_state_set(ad->data_sim_lk->eo_check, fi->f_status); + + } + break; + case TAPI_SIM_LOCK_SC://pin1 status + ad->pin1_status = fi->f_status; + SETTING_TRACE("Trying to Set Pin1 status"); + if (ad->data_pin_lk)//it indicates TAPI is not responsed in time + { + ad->data_pin_lk->chk_status = fi->f_status; + elm_check_state_set(ad->data_pin_lk->eo_check, fi->f_status); + if(ad->data_pin_lk->chk_status == 0) + setting_disable_genlist_item(ad->data_change_pin1->item); + } + break; + case TAPI_SIM_LOCK_FD://pin2/fdn status + ad->pin2_status = fi->f_status; + SETTING_TRACE("Trying to Set pin2/fdn status"); +#if SUPPORT_FDN + if (ad->data_fdn)//it indicates TAPI is not responsed in time + { + ad->data_fdn->chk_status = fi->f_status; + elm_check_state_set(ad->data_fdn->eo_check, fi->f_status); + } +#endif + break; + default: + return; + } + } + else + { + //if failed, do nothing.. + } + SETTING_TRACE_END; +} + +static void setting_security_layout_find_my_mobile_ug_cb(ui_gadget_h ug, + enum ug_mode mode, + void *priv) +{ + SETTING_TRACE_BEGIN; + + if (!priv) + return; + + SettingSecurityUG *ad = (SettingSecurityUG *) priv; /* ad is point to data */ + Evas_Object *base = ug_get_layout(ug); + if (!base) + return; + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + break; + } + return; +} + +void setting_security_layout_passwd_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) { - if (!ug || !priv) + if (!priv) return; SettingSecurityUG *ad = (SettingSecurityUG *) priv; @@ -233,14 +693,14 @@ static void setting_security_layout_passwd_ug_cb(struct ui_gadget *ug, default: break; } - + return; } -static void setting_security_destroy_password_ug_cb(struct ui_gadget *ug, +void setting_security_destroy_password_ug_cb(ui_gadget_h ug, void *priv) { - ret_if(priv == NULL || ug == NULL); + ret_if(priv == NULL); SettingSecurityUG *ad = (SettingSecurityUG *) priv; if (ug) { ug_destroy(ug); @@ -252,21 +712,21 @@ gboolean setting_security_create_password_sg(void *data) { /* error check */ retv_if(data == NULL, FALSE); - + SettingSecurityUG *ad = (SettingSecurityUG *) data; /* ad is point to data */ - + /* prevent the ug from being loaded again due to window event queuing */ /* added by JTS: CQ H0100135346 */ if (ad->ug_passwd) { SETTING_TRACE("Password UG is already loaded."); return FALSE; } - + if((ad->pw_type < 0) || (ad->pw_type > SETTING_SEC_PW_MAX)) return FALSE; - char str[Max_Passwd_View_Type_Len + 1] = { 0, }; - safeCopyStr(str, security_its[ad->pw_type].pw_type_string, Max_Passwd_View_Type_Len); + char str[Max_Passwd_View_Type_Len + 1] = { 0, }; + safeCopyStr(str, security_table[ad->pw_type].pw_type_string, Max_Passwd_View_Type_Len); struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); @@ -276,66 +736,174 @@ gboolean setting_security_create_password_sg(void *data) cbs->result_cb = setting_security_result_password_ug_cb; cbs->destroy_cb = setting_security_destroy_password_ug_cb; cbs->priv = (void *)ad; - bundle *b = bundle_create(); - if (!b) { + + service_h svc; + if (service_create(&svc)) { FREE(cbs); return FALSE; } - bundle_add(b, "viewtype", str); - ad->ug_passwd = ug_create(ad->ug, "setting-password-efl", UG_MODE_FULLVIEW, b, cbs); + service_add_extra_data(svc, "viewtype", str); + if(ad->input_pwd) + { + SETTING_TRACE_DEBUG("Send current : %s", ad->input_pwd); + service_add_extra_data(svc, "current", ad->input_pwd); + } + ad->ug_passwd = ug_create(ad->ug, "setting-password-efl", UG_MODE_FULLVIEW, svc, cbs); if (NULL == ad->ug_passwd) { /* error handling */ evas_object_show(ad->ly_main); } - bundle_free(b); + service_destroy(svc); FREE(cbs); return TRUE; } +void setting_security_create_find_my_mobile_sg(void *cb, int argc, char **argv) +{ + SETTING_TRACE_BEGIN; + ret_if(cb == NULL); -/* *************************************************** - * - *call back func - * - ***************************************************/ -void setting_check_onoff_pin_lock_state(TelSimPinType_t type, - Evas_Object *chk_pin_lk) + SettingSecurityUG *ad = (SettingSecurityUG *) cb; /* ad is point to cb */ + + if (ad->ug_mt) { + SETTING_TRACE("Mobile tracker UG is already loaded."); + return; + } + + + service_h svc_mt_ug = NULL; + + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + setting_retm_if(!cbs, "calloc failed"); + cbs->layout_cb = setting_security_layout_find_my_mobile_ug_cb; + cbs->result_cb = NULL; + cbs->destroy_cb = setting_security_destroy_find_my_mobile_ug_cb; + cbs->priv = (void *)ad; + + if(!service_create(&svc_mt_ug)) + service_add_extra_data(svc_mt_ug, "viewtype", "MTUG_TYPE_DETAIL_SETTING"); + + ad->ug_mt = ug_create(ad->ug, "find-my-mobile-efl", UG_MODE_FULLVIEW, svc_mt_ug, cbs); + if (NULL == ad->ug_mt) { /* error handling */ + } + + FREE(cbs); + service_destroy(svc_mt_ug); + return; +} + +void setting_security_destroy_find_my_mobile_ug_cb(ui_gadget_h ug, + void *priv) { - ret_if(chk_pin_lk == NULL); + SETTING_TRACE_BEGIN; + ret_if(!priv); + + SettingSecurityUG *ad = (SettingSecurityUG *) priv; /* ad is point to priv */ + + if (ug) { + ug_destroy(ug); + ad->ug_mt = NULL; + } - int tapi_ret = TAPI_API_SUCCESS; - TelSimPinStatus_t pin1_status = -1; - elm_check_state_set(chk_pin_lk, 0); /* default state */ + if (ad->data_mb) { + ad->data_mb->sub_desc = + (char *)g_strdup(get_find_my_mobile_on_off_str(priv)); + elm_object_item_data_set(ad->data_mb->item, ad->data_mb); + elm_genlist_item_update(ad->data_mb->item); + } + //evas_object_show((Evas_Object *) ug_get_layout(ad->ug)); +} - tapi_ret = tel_get_sim_security_status(type, &pin1_status); - if (tapi_ret != TAPI_API_SUCCESS) +void setting_security_layout_lockscreen_options_ug_cb(ui_gadget_h ug, + enum ug_mode mode, void *priv) +{ + if (!priv) return; - SETTING_TRACE("setting_check_onoff_pin_lock_state type: %d, status :%d", - type, pin1_status); + SettingSecurityUG *ad = (SettingSecurityUG *) priv; + Evas_Object *base = ug_get_layout(ug); + if (!base) + return; - int state = 0; - switch (pin1_status) { - case TAPI_SIM_PIN_STATUS_ENABLED: - state = 1; - break; - case TAPI_SIM_PIN_STATUS_DISABLED: - case TAPI_SIM_PIN_STATUS_BLOCKED: - case TAPI_SIM_PIN_STATUS_PUK_BLOCKED: - case TAPI_SIM_PIN_STATUS_UNKNOWN: - state = 0; + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); break; default: break; } - elm_check_state_set(chk_pin_lk, state); /* default state */ + return; +} + +void setting_security_destroy_lockscreen_options_ug_cb(ui_gadget_h ug, + void *priv) +{ + ret_if(priv == NULL); + SettingSecurityUG *ad = (SettingSecurityUG *) priv; + if (ug) { + ug_destroy(ug); + ad->ug_lockscreen = NULL; + } +} + +gboolean setting_security_create_lockscreen_options_sg(void *data) +{ + /* error check */ + retv_if(data == NULL, FALSE); + + SettingSecurityUG *ad = (SettingSecurityUG *) data; /* ad is point to data */ + + if (ad->ug_lockscreen) { + SETTING_TRACE("Password UG is already loaded."); + return FALSE; + } + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + + if (!cbs) + return FALSE; + cbs->layout_cb = setting_security_layout_lockscreen_options_ug_cb; + cbs->result_cb = NULL; + cbs->destroy_cb = setting_security_destroy_lockscreen_options_ug_cb; + cbs->priv = (void *)ad; + + ad->ug_lockscreen = ug_create(ad->ug, "lockscreen-options", UG_MODE_FULLVIEW, NULL, cbs); + if (NULL == ad->ug_lockscreen) { /* error handling */ + SETTING_TRACE_ERROR("NULL == ad->ug_lockscreen"); + evas_object_show(ad->ly_main); + } + + FREE(cbs); + + return TRUE; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ +// -1 on fail +// 0~n on success +int _get_security_table_index(char* name) +{ + int i=0; + + for(i=0;idata_sim_lk) - ad->chk_sim_lk = ad->data_sim_lk->eo_check; - if (ad->data_pin_lk) - ad->chk_pin_lk = ad->data_pin_lk->eo_check; - if (ad->data_phone_lk) - ad->chk_phone_lk = ad->data_phone_lk->eo_check; - if (ad->data_simple_pw) - ad->chk_simple_pw= ad->data_simple_pw->eo_check; - const char *result = bundle_get_val(b_result, "result"); + char *result = NULL; + char *current = NULL; + + service_get_extra_data(service, "result", &result); + service_get_extra_data(service, "current", ¤t); /* divided pw view type */ SETTING_TRACE("ad->pw_type: %d result :%s", ad->pw_type, result); ret_if(NULL == result); - if (0 == safeStrCmp(result, "SETTING_PW_TYPE_PHONE_LOCK")) - setting_check_onoff_status(ad->chk_phone_lk, BOOL_SLP_SETTING_POWER_ON_LOCK); - else if (0 == safeStrCmp(result, "SETTING_PW_TYPE_SIM_LOCK_ON")) - setting_check_onoff_pin_lock_state(TAPI_SIM_PTYPE_SIM, ad->chk_sim_lk); - else if (0 == safeStrCmp(result, "SETTING_PW_TYPE_SIM_LOCK_OFF")) - setting_check_onoff_pin_lock_state(TAPI_SIM_PTYPE_SIM, ad->chk_sim_lk); - else if (0 == safeStrCmp(result, "SETTING_PW_TYPE_PIN_LOCK_ON")) - setting_check_onoff_pin_lock_state(TAPI_SIM_PTYPE_PIN1, ad->chk_pin_lk); - else if (0 == safeStrCmp(result, "SETTING_PW_TYPE_PIN_LOCK_OFF")) - setting_check_onoff_pin_lock_state(TAPI_SIM_PTYPE_PIN1, ad->chk_pin_lk); - else if (0 == safeStrCmp(result, "SETTING_PW_TYPE_SIMPLE_PASSWORD")) + if(safeStrCmp(result, "Cancel") == 0) { - setting_check_onoff_status(ad->chk_simple_pw, BOOL_SLP_SETTING_SIMPLE_PASSWORD); /* reset check state */ + /* To do : rollback previouse status. */ } - else if (0 == safeStrCmp(result, "SETTING_PW_TYPE_CHANGE_PIN1")) - setting_check_onoff_pin_lock_state(TAPI_SIM_PTYPE_PIN1, ad->chk_pin_lk); - else if (0 == safeStrCmp(result, "SETTING_PW_TYPE_PIN1_BLOCKED")) - setting_check_onoff_pin_lock_state(TAPI_SIM_PTYPE_PIN1, ad->chk_pin_lk); - else if (0 == safeStrCmp(result, "SETTING_PW_TYPE_POWER_ON_LOCK")) + else if(safeStrCmp(result, "SETTING_PW_TYPE_ENTER_LOCK_TYPE") == 0) { - } - else if (0 == safeStrCmp(result, "SETTING_PW_TYPE_PHONE_LOCK_DISABLE")) + ug_destroy(ug); + ad->ug_passwd = NULL; + setting_view_change(&setting_view_security_main, &setting_view_security_screen_lock_type, ad); + } + else { - if (ad->data_phone_lk) - setting_disable_genlist_item(ad->data_phone_lk->item); + int index = _get_security_table_index(result); + int ret; + if (index != -1) + { + ret = security_table[index].passwd_handler(ad, NULL); + } else { + SETTING_TRACE_ERROR("no table entry"); + } + if(ad->input_pwd) + FREE(ad->input_pwd); } - else if (0 == safeStrCmp(result, "SETTING_PW_TYPE_SIM_LOCK_DISABLE")) + + if(current) { - if (ad->data_sim_lk) - setting_disable_genlist_item(ad->data_sim_lk->item); + SETTING_TRACE_DEBUG("current : %s", current); + ad->input_pwd = (char*)strdup(current); } + evas_object_show(ad->ly_main); } @@ -395,17 +958,58 @@ setting_security_result_password_ug_cb(struct ui_gadget *ug, bundle *b_result, #undef Status #endif -UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) +char *get_screen_lock_type_str(void *priv) +{ + int lock_type = 0; + + vconf_get_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, &lock_type); + + switch(lock_type) + { + case SETTING_SCREEN_LOCK_TYPE_SWIPE: + return setting_gettext(Keystr_Swipe); + case SETTING_SCREEN_LOCK_TYPE_MOTION: + return setting_gettext(KeyStr_Motions); + case SETTING_SCREEN_LOCK_TYPE_FACE_AND_VOICE: + return setting_gettext(Keystr_FaceAndVoice); + case SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD: + return setting_gettext("IDS_ST_BODY_SIMPLE_PASSWORD"); + case SETTING_SCREEN_LOCK_TYPE_PASSWORD: + return setting_gettext("IDS_ST_BODY_PASSWORD"); + default: + return NULL; + } +} + + + +char *get_find_my_mobile_on_off_str(void *priv) +{ + int value1 = 0; + int value2 = 0; + + vconf_get_bool(VCONFKEY_SETAPPL_FIND_MY_MOBILE_SIM_CHANGE_ALERT_BOOL, &value1); + vconf_get_bool(VCONFKEY_SETAPPL_FIND_MY_MOBILE_REMOTE_CONTROL_BOOL, &value2); + + if (value1 || value2) { + return setting_gettext("IDS_COM_BODY_ON_M_STATUS"); + } else { + return setting_gettext("IDS_COM_BODY_OFF_M_STATUS"); + } +} + +/*****/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) { SETTING_TRACE_BEGIN; int ret = 0; #if SUPPORT_RUN_SYSTEM_COMMAND - ret += excuteCmd(SETTING_POSTINST_FILE, 1, "security"); + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "security"); #else - ret += vconf_set_str(VCONFKEY_SETAPPL_PHONE_PASSWD_STR, ""); /* it may write some stragne thing into /opt/data/setting/set_info */ - struct stat st; + /* setting_store_init_password(""); */ + struct stat st; if (stat(PWD_FILE, &st) == 0)//file exist { if (remove(PWD_FILE) != 0) //delete the file @@ -417,6 +1021,14 @@ UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) } ret += vconf_set_bool(VCONFKEY_SETAPPL_STATE_POWER_ON_LOCK_BOOL, FALSE); ret += vconf_set_bool(VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL, TRUE); + ret += vconf_set_bool(VCONFKEY_SETAPPL_FIND_MY_MOBILE_SIM_CHANGE_ALERT_BOOL, FALSE); + ret += vconf_set_str(VCONFKEY_SETAPPL_FIND_MY_MOBILE_RECIPIENTS_STR, ""); + ret += vconf_set_str(VCONFKEY_SETAPPL_FIND_MY_MOBILE_SENDER_STR, ""); + ret += vconf_set_str(VCONFKEY_SETAPPL_FIND_MY_MOBILE_MESSAGE_STR, ""); + + #if SUPPORT_RCS_FOR_DEMO + ret += vconf_set_bool("db/setting/rcs", FALSE); + #endif #endif return ret; } diff --git a/setting-shortcut/CMakeLists.txt b/setting-shortcut/CMakeLists.txt new file mode 100755 index 0000000..0bed848 --- /dev/null +++ b/setting-shortcut/CMakeLists.txt @@ -0,0 +1,44 @@ + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_shortcut REQUIRED + evas ecore edje + elementary + appcore-common + appcore-efl + ecore-imf ui-gadget-1 + capi-appfw-application dlog) + +FOREACH(flag ${pkgs_shortcut_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl, --rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_SHORTCUT_UG} SHARED + ./src/setting-shortcut.c + ./src/setting-shortcut-main.c +) + +TARGET_LINK_LIBRARIES(${SETTING_SHORTCUT_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_SHORTCUT_UG} ${pkgs_shortcut_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_SHORTCUT_UG} DESTINATION /opt/ug/lib) + + + + diff --git a/setting-shortcut/include/setting-shortcut-main.h b/setting-shortcut/include/setting-shortcut-main.h new file mode 100644 index 0000000..eb0e8d9 --- /dev/null +++ b/setting-shortcut/include/setting-shortcut-main.h @@ -0,0 +1,27 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef _SETTING_SHORTCUT_MAIN_H_ +#define _SETTING_SHORTCUT_MAIN_H_ + +#include + + +#endif diff --git a/setting-shortcut/include/setting-shortcut.h b/setting-shortcut/include/setting-shortcut.h new file mode 100755 index 0000000..bb149d8 --- /dev/null +++ b/setting-shortcut/include/setting-shortcut.h @@ -0,0 +1,62 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef _SETTING_SHORTCUT_H_ +#define _SETTING_SHORTCUT_H_ + +#include +#include +#include + +#include + +#include +#include +#include + +typedef struct _SettingShortcutUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + Evas_Object *ly_main; + + Elm_Object_Item *navi_it; + Evas_Object *controllbar; + Evas_Object *navi_bar; + Evas_Object *sub_layout; + + Evas_Object *scroller; + + Setting_GenGroupItem_Data *acc_negative_color; + Setting_GenGroupItem_Data *acc_screen_reader; + Setting_GenGroupItem_Data *acc_zoom; + Setting_GenGroupItem_Data *acc_led_notification; + Setting_GenGroupItem_Data *acc_mono_audio; + Setting_GenGroupItem_Data *acc_assistive_light; +} SettingShortcutUG; + +extern setting_view setting_view_shortcut_main; + + + +#endif diff --git a/setting-shortcut/src/setting-shortcut-main.c b/setting-shortcut/src/setting-shortcut-main.c new file mode 100755 index 0000000..3e042fc --- /dev/null +++ b/setting-shortcut/src/setting-shortcut-main.c @@ -0,0 +1,197 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#include + +static int setting_shortcut_main_create(void *cb); +static int setting_shortcut_main_destroy(void *cb); +static int setting_shortcut_main_update(void *cb); +static int setting_shortcut_main_cleanup(void *cb); + +setting_view setting_view_shortcut_main = { + .create = setting_shortcut_main_create, + .destroy = setting_shortcut_main_destroy, + .update = setting_shortcut_main_update, + .cleanup = setting_shortcut_main_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static void setting_shortcut_main_sk_cancel_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + ret_if(data == NULL); + + SettingShortcutUG *ad = (SettingShortcutUG *)data; + /* Send destroy request */ + ug_destroy_me(ad->ug); +} + +static void +setting_shortcut_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + + if(data == NULL) + return; + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + + //SettingShortcutUG *ad = (SettingShortcutUG*)data; + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SETTING_TRACE_DEBUG("%s selected", list_item->keyStr); + +} + +void setting_shortcut_add_genlist_items(void *data) +{ + SETTING_TRACE_BEGIN; + if(data == NULL) + return; + + SettingShortcutUG *ad = (SettingShortcutUG*)data; + + /* separator */ + Elm_Object_Item *item = elm_genlist_item_append(ad->scroller, &itc_seperator, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* To do : Add 6 items */ + ad->acc_assistive_light = setting_create_Gendial_field_def(ad->scroller, &itc_1text, + setting_shortcut_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0, _("IDS_ST_MBODY_ASSISTIVE_LIGHT"), NULL, NULL); + + ad->acc_led_notification = setting_create_Gendial_field_def(ad->scroller, &itc_1text, + setting_shortcut_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0, _("LED notification"), NULL, NULL); + + ad->acc_mono_audio = setting_create_Gendial_field_def(ad->scroller, &itc_1text, + setting_shortcut_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0, _("IDS_ST_MBODY_MONO_AUDIO"), NULL, NULL); + + ad->acc_negative_color = setting_create_Gendial_field_def(ad->scroller, &itc_1text, + setting_shortcut_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0, _("IDS_ST_BODY_NEGATIVE_COLOURS"), NULL, NULL); + + ad->acc_screen_reader = setting_create_Gendial_field_def(ad->scroller, &itc_1text, + setting_shortcut_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0, _("IDS_ST_MBODY_SCREEN_READER_HTTS"), NULL, NULL); + + ad->acc_zoom = setting_create_Gendial_field_def(ad->scroller, &itc_1text, + setting_shortcut_main_mouse_up_Gendial_list_cb,ad, + SWALLOW_Type_INVALID, + NULL, NULL, + 0, _("IDS_ST_MBODY_ZOOM"), NULL, NULL); +} + +static int +setting_shortcut_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingShortcutUG *ad = (SettingShortcutUG *) cb; + + char setBtnStr[MAX_DISPLAY_NAME_LEN_ON_UI]; + snprintf(setBtnStr, sizeof(setBtnStr), "%s", + (char *)dgettext("sys_string", "IDS_COM_BODY_BACK")); + + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + "Accessibility shortcut list", + setBtnStr, NULL, + setting_shortcut_main_sk_cancel_cb, + NULL, ad, &(ad->scroller), + &(ad->navi_bar)); + + if(ad->ly_main == NULL) + return SETTING_RETURN_FAIL; + + setting_shortcut_add_genlist_items(ad); + + setting_view_shortcut_main.is_create = 1; + SETTING_TRACE_END; + return SETTING_RETURN_SUCCESS; +} + +static int setting_shortcut_main_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingShortcutUG *ad = (SettingShortcutUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + ad->ly_main = NULL; + setting_view_shortcut_main.is_create = 0; + } + return SETTING_RETURN_SUCCESS; +} + +static int setting_shortcut_main_update(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingShortcutUG *ad = (SettingShortcutUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_shortcut_main_cleanup(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingShortcutUG *ad = (SettingShortcutUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_hide(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} diff --git a/setting-shortcut/src/setting-shortcut.c b/setting-shortcut/src/setting-shortcut.c new file mode 100755 index 0000000..eabb853 --- /dev/null +++ b/setting-shortcut/src/setting-shortcut.c @@ -0,0 +1,167 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + +#include + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + + +static void setting_shortcut_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + SettingShortcutUG *ad = (SettingShortcutUG *) data; + setting_view_update(&setting_view_shortcut_main, ad); +} + +static void *setting_shortcut_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if((!priv), NULL, "!priv"); + + SettingShortcutUG *shortcutUG = (SettingShortcutUG *)priv; + shortcutUG->ug = ug; + shortcutUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + shortcutUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(shortcutUG->win_main_layout); + shortcutUG->evas = evas_object_evas_get(shortcutUG->win_main_layout); + + setting_retvm_if(shortcutUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + /* --------------------------------------------------------- */ + /* set launguage */ + appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); + /* --------------------------------------------------------- */ + + /* creating a view. */ + setting_view_create(&setting_view_shortcut_main,(void *)shortcutUG); + evas_object_event_callback_add(shortcutUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_shortcut_ug_cb_resize, + shortcutUG); + return shortcutUG->ly_main; +} + +static void setting_shortcut_ug_on_start(ui_gadget_h ug, service_h service, void *priv) +{ +} + +static void setting_shortcut_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) +{ +} + +static void setting_shortcut_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) +{ +} + +static void setting_shortcut_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) +{ + SettingShortcutUG *shortcutUG = (SettingShortcutUG *)priv; + + evas_object_event_callback_del(shortcutUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_shortcut_ug_cb_resize); /* fix flash issue for gallery */ + shortcutUG->ug = ug; + + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_shortcut_main, shortcutUG); + if (NULL != ug_get_layout(shortcutUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(shortcutUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(shortcutUG->ug)); + } +} + +static void setting_shortcut_ug_on_message(ui_gadget_h ug, service_h msg, service_h service, void *priv) +{ + +} + +static void setting_shortcut_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + void *priv) +{ + switch (event) { + case UG_EVENT_LOW_MEMORY: + break; + case UG_EVENT_LOW_BATTERY: + break; + case UG_EVENT_LANG_CHANGE: + break; + case UG_EVENT_ROTATE_PORTRAIT: + break; + case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN: + break; + case UG_EVENT_ROTATE_LANDSCAPE: + break; + case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN: + break; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_shortcut_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + if (!ug || !priv) + return; + + switch (event) { + case UG_KEY_EVENT_END: + ug_destroy_me(ug); + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SettingShortcutUG *shortcutUG = calloc(1, sizeof(SettingShortcutUG)); + setting_retvm_if(!shortcutUG, -1, "Create SettingShortcutUG obj failed"); + + ops->create = setting_shortcut_ug_on_create; + ops->start = setting_shortcut_ug_on_start; + ops->pause = setting_shortcut_ug_on_pause; + ops->resume = setting_shortcut_ug_on_resume; + ops->destroy = setting_shortcut_ug_on_destroy; + ops->message = setting_shortcut_ug_on_message; + ops->event = setting_shortcut_ug_on_event; + ops->key_event = setting_shortcut_ug_on_key_event; + ops->priv = shortcutUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + struct SettingShortcutUG *shortcutUG; + setting_retm_if(!ops, "ops == NULL"); + + shortcutUG = ops->priv; + if (shortcutUG) + FREE(shortcutUG); +} diff --git a/setting-storage/CMakeLists.txt b/setting-storage/CMakeLists.txt new file mode 100755 index 0000000..13f2153 --- /dev/null +++ b/setting-storage/CMakeLists.txt @@ -0,0 +1,33 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_storage REQUIRED ecore ecore-file evas elementary appcore-common appcore-efl ui-gadget-1 capi-appfw-application sysman fontconfig libxml-2.0) + +FOREACH(flag ${pkgs_storage_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_STORAGE_UG} SHARED + ./src/setting-storage.c + ./src/setting-storage-main.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_STORAGE_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_STORAGE_UG} ${pkgs_storage_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_STORAGE_UG} DESTINATION /opt/ug/lib) diff --git a/setting-storage/cscope.files b/setting-storage/cscope.files new file mode 100644 index 0000000..5ea24df --- /dev/null +++ b/setting-storage/cscope.files @@ -0,0 +1,4 @@ +./src/setting-storage.c +./src/setting-storage-main.c +./include/setting-storage.h +./include/setting-storage-main.h diff --git a/setting-storage/cscope.out b/setting-storage/cscope.out new file mode 100644 index 0000000..43f2359 --- /dev/null +++ b/setting-storage/cscope.out @@ -0,0 +1,17021 @@ +cscope 15 $HOME/scp-image/settings-beat/setting-storage 0000094857 + @include/setting-storage-main.h + +21 #iâdeà +__SETTING_STORAGE_MAIN_H__ + + +22  + #__SETTING_STORAGE_MAIN_H__ + + + ) + +24  + ~<£‰šg-¡Üage.h +> + + @include/setting-storage.h + +21 #iâdeà +__SETTING_STORAGE_H__ + + +22  + #__SETTING_STORAGE_H__ + + + ) + +24  + ~<¡dio.h +> + +25  + ~<­pcÜe-eæ.h +> + +26  + ~ + +28  + ~ + +29  + ~ + +30  + ~ + +31  + ~ + +33  + ~<£‰šg-commÚ-d¿w-widg‘.h +> + +34  + ~<£‰šg-commÚ-v›w.h +> + +36  +_S‘tšgStÜageUG + + tS‘tšgStÜageUG +; + +43  + s_S‘tšgStÜageUG + { + +44  +ui_gadg‘ + * + mug +; + +47 +Evas + * + mevas +; + +48 +Evas_Objeù + * + mwš_maš_Ïyout +; + +49 +Evas_Objeù + * + mwš_g‘ +; + +51 +Evas_Objeù + * + mly_maš +; + +53 +Evas_Objeù + * + mg’li¡ +; + +54 +Evas_Objeù + * + mÇvib¬ +; + +57 +Evas_Objeù + * + mpÝup +; + +58 +Elm_G’li¡_I‹m_CÏss + + m™c_2‹xt_3_·»Á +; + +59 +Elm_G’li¡_I‹m_CÏss + + m™c_1icÚ_1‹xt_sub +; + +60 +Elm_G’li¡_I‹m_CÏss + + m™c_1‹xt_1icÚ_2 +; + +61 +Elm_G’li¡_I‹m_CÏss + + m™c_2‹xt_2 +; + +62 +Elm_G’li¡_I‹m_CÏss + + m™c_group_™em +; + +63 +Elm_G’li¡_I‹m_CÏss + + m™c_bg_1icÚ +; + +64 +Elm_G’li¡_I‹m_CÏss + + m™c_£³¿tÜ +; + +66 +S‘tšg_G’GroupI‹m_D©a + * + msub™em +; + +67 +S‘tšg_G’GroupI‹m_D©a + * + m¡Üage_ty³ +; + +68 +S‘tšg_G’GroupI‹m_D©a + * + m¡Üage_size +; + +70  + m´ev_¡Üage +; + +71 * + m¡Üage_Çme +; + +74 +£‰šg_v›w + +£‰šg_v›w_¡Üage_maš +; + +76  +£‰šg_¡Üage_upd©e_vcÚf_key +(* +d©a +, +£‰šg_vcÚf_ty³ + +ty³ +, + +77  +¦p_key +); + + @src/setting-storage-main.c + +21  + ~<£‰šg-¡Üage-maš.h +> + +22  + ~ + +23  + ~<¡ÜagecÚfig/¡ÜagecÚfig.h +> + +24  + ~ + +25  + ~ + +26  + ~ + +27  + ~ + +29  +£‰šg_¡Üage_maš_ü—‹ +(* +cb +); + +30  +£‰šg_¡Üage_maš_de¡roy +(* +cb +); + +31  +£‰šg_¡Üage_maš_upd©e +(* +cb +); + +32  +£‰šg_¡Üage_maš_þ—nup +(* +cb +); + +34  +__£‰šg_¡Üage_maš_þick_soákey_back_cb +(* +d©a +, +Evas_Objeù + * +obj +, + +35 * +ev’t_šfo +); + +37 +£‰šg_v›w + + g£‰šg_v›w_¡Üage_maš + = { + +38 . +ü—‹ + = +£‰šg_¡Üage_maš_ü—‹ +, + +39 . + gde¡roy + = +£‰šg_¡Üage_maš_de¡roy +, + +40 . + gupd©e + = +£‰šg_¡Üage_maš_upd©e +, + +41 . + gþ—nup + = +£‰šg_¡Üage_maš_þ—nup +, + +44 * + $__£‰šg_¡Üage_maš_g‘_¡Üage_size +( +v®ue +) + +46 cÚ¡ * +¡Üage_size_¬r +[] = { + +47 + `_ +("IDS_ST_BODY_SMALL_M_TEXTSIZE"), + +48 + `_ +("IDS_ST_BODY_NORMAL_T_PROFILE"), + +49 + `_ +("IDS_ST_BODY_TEXTSTYLE_LARGE"), + +50 + `_ +("Huge"), + +51 + `_ +("Giant"), + +53  +v®ue +) + +55  +SYSTEM_SETTINGS_FONT_SIZE_SMALL +: + +56  (*) +¡Üage_size_¬r +[0]; + +57  +SYSTEM_SETTINGS_FONT_SIZE_NORMAL +: + +58  (*) +¡Üage_size_¬r +[1]; + +59  +SYSTEM_SETTINGS_FONT_SIZE_LARGE +: + +60  (*) +¡Üage_size_¬r +[2]; + +61  +SYSTEM_SETTINGS_FONT_SIZE_HUGE +: + +62  (*) +¡Üage_size_¬r +[3]; + +63  +SYSTEM_SETTINGS_FONT_SIZE_GIANT +: + +64  (*) +¡Üage_size_¬r +[4]; + +66  (*) +¡Üage_size_¬r +[1]; + +68 + } +} + +70  +Eša_Li¡ + * + $__£‰šg_¡Üage_maš_avažabË_li¡_g‘ +() + +72 +SETTING_TRACE_BEGIN + + +73 +FcObjeùS‘ + * +os + = +NULL +; + +74 +FcStÜageS‘ + * +fs + = +NULL +; + +75 +FcP©‹º + * +·t + = +NULL +; + +76 +Eša_Li¡ + * +li¡ + = +NULL +; + +77 +FcCÚfig + * +¡Üage_cÚfig + = +NULL +; + +79 +¡Üage_cÚfig + = + `FcIn™LßdCÚfigAndStÜages +(); + +81 + `£‰šg_»tvm_if +( +¡Üage_cÚfig + =ð +NULL +, NULL, "Failed: FcInitLoadConfigAndStorages"); + +83 +·t + = + `FcP©‹ºC»©e +(); + +85 +os + = + `FcObjeùS‘Bužd +( +FC_FAMILY +, +FC_FILE +, (*) 0); + +87 ià( +os +) { + +88 +fs + = + `FcStÜageLi¡ +( +¡Üage_cÚfig +, +·t +, +os +); + +89 + `FcObjeùS‘De¡roy +( +os +); + +90 +os + = +NULL +; + +93 ià( +·t +) { + +94 + `FcP©‹ºDe¡roy +( +·t +); + +95 +·t + = +NULL +; + +98 ià( +fs +) { + +99  +j +; + +100 + `SETTING_TRACE_DEBUG +("fs->n¡Üagð%d", +fs +-> +n¡Üage +); + +102  +j + = 0; j < +fs +-> +n¡Üage +; j++) { + +103 +FcCh¬8 + * +çmžy + = +NULL +; + +104 +FcCh¬8 + * +fže + = +NULL +; + +106 ià( + `FcP©‹ºG‘SŒšg +( +fs +-> +¡Üages +[ +j +], +FC_FILE +, 0, & +fže +è=ð +FcResuÉM©ch +) { + +108  +´–ßd_·th_Ën + = + `§ãSŒL’ +( +SETTING_FONT_PRELOAD_FONT_PATH +); + +109  +dowÆßd_·th_Ën + = + `§ãSŒL’ +( +SETTING_FONT_DOWNLOADED_FONT_PATH +); + +110 ià(! + `§ãSŒNCmp +((cÚ¡ *) +fže +, +SETTING_FONT_PRELOAD_FONT_PATH +, +´–ßd_·th_Ën +) || + +111 ! + `§ãSŒNCmp +((cÚ¡ *) +fže +, +SETTING_FONT_DOWNLOADED_FONT_PATH +, +dowÆßd_·th_Ën +)) { + +112 ià( + `FcP©‹ºG‘SŒšg +( +fs +-> +¡Üages +[ +j +], +FC_FAMILY +, 0, & +çmžy +è!ð +FcResuÉM©ch +) { + +113 + `SETTING_TRACE_DEBUG +("Family‚ame is invalid"); + +118 ià( + `eša_li¡_d©a_fšd +( +li¡ +, +çmžy +è=ð +NULL +) { + +119 +li¡ + = + `eša_li¡_­³nd +Öi¡, +çmžy +); + +126 + `FcStÜageS‘De¡roy +( +fs +); + +127 +fs + = +NULL +; + +130 + `FcCÚfigDe¡roy +( +¡Üage_cÚfig +); + +131 +¡Üage_cÚfig + = +NULL +; + +132  +li¡ +; + +133 + } +} + +135  + $__£‰šg_¡Üage_maš_Ïunch_ug_de¡roy_cb +( +ui_gadg‘ + * +ug +, * +´iv +) + +137 +SETTING_TRACE_BEGIN +; + +140 + `»tm_if +( +´iv + =ð +NULL +, "priv is NULL"); + +141 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +´iv +; + +142 ià( +ug +) { + +143 + `ug_de¡roy +( +ug +); + +145 +Elm_Objeù_I‹m + * +Çvi_™ + = + `–m_Çviäame_tÝ_™em_g‘ +( +ad +-> +Çvib¬ +); + +146 + `»tm_if +( +Çvi_™ + =ð +NULL +, "navi_it is NULL"); + +147 +Evas_Objeù + * +back_bŠ + = + `–m_objeù_™em_·¹_cڋÁ_g‘ +( +Çvi_™ +, "prev_btn"); + +149 ià( +back_bŠ + !ð +NULL +) { + +150 + `–m_objeù_¡yË_£t +( +back_bŠ +, +NAVI_BACK_BUTTON_STYLE +); + +154  +v®ue + = -1; + +155  +”r + = -1; + +156  +»t + = + `£‰šg_g‘_št_¦p_key +( +INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE +, & +v®ue +, & +”r +); + +157 + `»tm_if +( +»t + != 0, "get vconf failed"); + +159 ià( +ad +-> +¡Üage_size +) { + +160 + `G_FREE +( +ad +-> +¡Üage_size +-> +sub_desc +); + +161 +ad +-> +¡Üage_size +-> +sub_desc + = + `g_¡rdup +( + `__£‰šg_¡Üage_maš_g‘_¡Üage_size +( +v®ue +)); + +163 + `–m_objeù_™em_d©a_£t +( +ad +-> +¡Üage_size +-> +™em +,‡d->storage_size); + +164 + `–m_g’li¡_™em_upd©e +( +ad +-> +¡Üage_size +-> +™em +); + +166 + } +} + +168  + $__£‰šg_¡Üage_maš_Ïunch_ug_Ïyout_cb +( +ui_gadg‘ + * +ug +, +ug_mode + +mode +, * +´iv +) + +170 +SETTING_TRACE_BEGIN +; + +171 + `»tm_if +( +ug + =ð +NULL +, "ug is NULL"); + +172 + `»tm_if +( +´iv + =ð +NULL +, "priv is NULL"); + +173 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +´iv +; + +174 +Evas_Objeù + * +ba£ + = +NULL +; + +175 +ba£ + = ( +Evas_Objeù + *è + `ug_g‘_Ïyout +( +ug +); + +176 + `»tm_if +( +ba£ + =ð +NULL +, "base is NULL"); + +178  +mode +) { + +179  +UG_MODE_FULLVIEW +: + +180 + `evas_objeù_size_hšt_weight_£t +( +ba£ +, +EVAS_HINT_EXPAND +, EVAS_HINT_EXPAND); + +181 + `–m_wš_»size_objeù_add +( +ad +-> +wš_g‘ +, +ba£ +); + +182 + `evas_objeù_show +( +ba£ +); + +187 +SETTING_TRACE_END +; + +188 + } +} + +191  + $__£‰šg_¡Üage_maš_Ïunch_ug +(* +d©a +) + +193 +SETTING_TRACE_BEGIN +; + +195 + `»tm_if +( +d©a + =ð +NULL +, "Data…arameter is NULL"); + +197 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +199 +bundË + * +b + = + `bundË_ü—‹ +(); + +200 ià(! +b +) { + +204 + `bundË_add +( +b +, "caller", "storage_size"); + +206  +ug_cbs + * +cbs + = (ug_cb *) + `ÿÎoc +(1, (ug_cbs)); + +207 ià(! +cbs +) { + +208 + `SETTING_TRACE_ERROR +("calloc failed"); + +209 + `bundË_ä“ +( +b +); + +212 +cbs +-> +Ïyout_cb + = +__£‰šg_¡Üage_maš_Ïunch_ug_Ïyout_cb +; + +213 +cbs +-> +»suÉ_cb + = +NULL +; + +214 +cbs +-> +de¡roy_cb + = +__£‰šg_¡Üage_maš_Ïunch_ug_de¡roy_cb +; + +215 +cbs +-> +´iv + = (*) +ad +; + +217  +ui_gadg‘ + * +ug + = + `ug_ü—‹ +( +ad +->ug, "£‰šg-acûssibž™y-eæ", +UG_MODE_FULLVIEW +, +b +, +cbs +); + +218 ià( +NULL + =ð +ug +) { + +219 + `SETTING_TRACE_ERROR +("NULL == ug"); + +222 + `bundË_ä“ +( +b +); + +223 + `FREE +( +cbs +); + +224 + } +} + +226  + $__£‰šg_¡Üage_maš_g’li¡_£l_cb +(* +d©a +, +Evas_Objeù + * +obj +, * +ev’t_šfo +) + +229 + `£‰šg_»tm_if +( +d©a + =ð +NULL +, "Data…arameter is NULL"); + +231 + `»tm_if +( +ev’t_šfo + =ð +NULL +, "Invalid‡rgument:ƒvent info is NULL"); + +232 +Elm_Objeù_I‹m + * +™em + = (Elm_Objeù_I‹m *è +ev’t_šfo +; + +233 + `–m_g’li¡_™em_£Ëùed_£t +( +™em +, 0); + +234 +S‘tšg_G’GroupI‹m_D©a + * +li¡_™em + = (S‘tšg_G’GroupI‹m_D©¨*) + `–m_objeù_™em_d©a_g‘ +( +™em +); + +236 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *) +d©a +; + +238 ià( +ad +-> +¡Üage_size + =ð +li¡_™em +) { + +239 + `__£‰šg_¡Üage_maš_Ïunch_ug +( +ad +); + +241 + } +} + +243  + $__£‰šg_¡Üage_maš_g’li¡_™em_ü—‹ +(* +d©a +) + +245 +SETTING_TRACE_BEGIN +; + +246 + `£‰šg_»tm_if +( +NULL + =ð +d©a +, "data is NULL"); + +248 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *) +d©a +; + +249 +Elm_Objeù_I‹m + * +™em + = +NULL +; + +250 +™em + = + `–m_g’li¡_™em_­³nd +( +ad +-> +g’li¡ +, &×d-> +™c_£³¿tÜ +), +NULL +, NULL, + +251 +ELM_GENLIST_ITEM_NONE +, +NULL +, NULL); + +252 + `–m_g’li¡_™em_£Ëù_mode_£t +( +™em +, +ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY +); + +254 * +¡Üage_ty³_Çme + = +NULL +; + +255 +¡Üage_ty³_Çme + = + `cur_¡Üage_g‘ +(); + +257 +ad +-> +¡Üage_ty³ + = + `£‰šg_ü—‹_G’dŸl_exp_·»Á_f›ld +×d-> +g’li¡ +, + +258 &( +ad +-> +™c_2‹xt_3_·»Á +), + +259 +NULL +, NULL, + +260 +SWALLOW_Ty³_INVALID +, + +261 +SETTING_FONT_TYPE_STR +, + +262 +¡Üage_ty³_Çme +); + +263 ià( +ad +-> +¡Üage_ty³ +) { + +264 +ad +-> +¡Üage_ty³ +-> +u£rd©a + =‡d; + +266 + `SETTING_TRACE_ERROR +("ad->storage_type is NULL"); + +268 + `G_FREE +( +ad +-> +¡Üage_Çme +); + +269 +ad +-> +¡Üage_Çme + = + `g_¡rdup +( +¡Üage_ty³_Çme +); + +270 + `G_FREE +( +¡Üage_ty³_Çme +); + +273  +v®ue + = -1; + +274  +”r + = -1; + +275  +»t + = + `£‰šg_g‘_št_¦p_key +( +INT_SLP_SETTING_ACCESSIBILITY_FONT_SIZE +, & +v®ue +, & +”r +); + +276 ià( +»t + != 0) { + +277 + `SETTING_TRACE_ERROR +("get vconf failed"); + +280 +ad +-> +¡Üage_size + = + `£‰šg_ü—‹_G’dŸl_f›ld_def +×d-> +g’li¡ +, &×d-> +™c_2‹xt_2 +), + +281 +__£‰šg_¡Üage_maš_g’li¡_£l_cb +, + +282 +ad +, +SWALLOW_Ty³_INVALID +, +NULL +, + +283 +NULL +, +v®ue +, +SETTING_FONT_SIZE_STR +, + +284 + `__£‰šg_¡Üage_maš_g‘_¡Üage_size +( +v®ue +), +NULL +); + +285 ià( +ad +-> +¡Üage_size +) { + +286 +ad +-> +¡Üage_size +-> +u£rd©a + =‡d; + +288 + `SETTING_TRACE_ERROR +("ad->storage_size is NULL"); + +291 + `£‰šg_ü—‹_G’dŸl_f›ld_def +( +ad +-> +g’li¡ +, &×d-> +™c_bg_1icÚ +), +NULL +, + +292 +ad +, +SWALLOW_Ty³_LAYOUT_SPECIALIZTION +, + +293 +NULL +, NULL, 0, +SETTING_FONT_SIZE_DESC +, NULL, + +294 +NULL +); + +295 + } +} + +301  + $__£‰šg_¡Üage_maš_¡Üage_£t +(* +¡Üage_Çme +) + +303 + `»tm_if +( +¡Üage_Çme + =ð +NULL +, "Invalid‡rgument: storage_name is NULL"); + +304 +xmlDocPŒ + +doc + = (xmlDocPŒ) + `¡Üage_cÚf_doc_·r£ +( +SETTING_FONT_CONF_FILE +, +¡Üage_Çme +); + +306 if( +doc + !ð +NULL +) { + +307 + `xmlSaveFÜm©Fže +( +SETTING_FONT_CONF_FILE +, +doc +, 0); + +308 + `xmlF»eDoc +( +doc +); + +309 +doc + = +NULL +; + +312 + `¡Üage_cÚfig_£t +( +¡Üage_Çme +); + +315 +EcÜe_X_Wšdow + +ecÜe_wš + = + `ecÜe_x_wšdow_roÙ_fœ¡_g‘ +(); + +316 +EcÜe_X_Atom + +©om + = + `ecÜe_x_©om_g‘ +("FONT_TYPE_change"); + +317 + `ecÜe_x_wšdow_´Ý_¡ršg_£t +( +ecÜe_wš +, +©om +, "slp"); + +318 + } +} + +320  + $__£‰šg_¡Üage_maš_pÝup_cb +(* +d©a +, +Evas_Objeù + * +obj +, * +ev’t_šfo +) + +322 +SETTING_TRACE_BEGIN +; + +323 + `£‰šg_»tm_if +( +d©a + =ð +NULL +, "Data…arameter is NULL"); + +324 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +326  + `bŠ_ty³ +( +obj +)) { + +327  +POPUP_RESPONSE_OK +: + +329 +ad +-> +¡Üage_ty³ +-> +sub_desc + = (*) + `g_¡rdup +( + `_ +×d-> +sub™em +-> +keySŒ +)); + +330 + `–m_objeù_™em_d©a_£t +( +ad +-> +¡Üage_ty³ +-> +™em +,‡d->storage_type); + +331 + `–m_g’li¡_™em_upd©e +( +ad +-> +¡Üage_ty³ +-> +™em +); + +333 +ad +-> +´ev_¡Üage + =‡d-> +sub™em +-> +chk_¡©us +; + +334 + `G_FREE +( +ad +-> +¡Üage_Çme +); + +335 +ad +-> +¡Üage_Çme + = (*) + `g_¡rdup +( + `_ +×d-> +sub™em +-> +keySŒ +)); + +336 + `SETTING_TRACE +("ad->sub™em->keySŒ = %s", +ad +-> +sub™em +-> +keySŒ +); + +337 + `__£‰šg_¡Üage_maš_¡Üage_£t +( +ad +-> +sub™em +-> +keySŒ +); + +338 + `ug_de¡roy_me +( +ad +-> +ug +); + +341  +POPUP_RESPONSE_CANCEL +: + +343 + `–m_¿dio_v®ue_£t +( +ad +-> +sub™em +-> +rgd +,‡d-> +´ev_¡Üage +); + +353 ià( +ad +-> +pÝup +) { + +354 + `evas_objeù_d– +( +ad +-> +pÝup +); + +355 +ad +-> +pÝup + = +NULL +; + +357 + } +} + +359  + $__£‰šg_¡Üage_maš_pÝup +(* +d©a +) + +361 +SETTING_TRACE_BEGIN +; + +362 + `£‰šg_»tm_if +( +d©a + =ð +NULL +, "Data…arameter is NULL"); + +363 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +365  +pÝup_desc +[ +SETTING_STR_SLP_LEN + + 1] = {0,}; + +366 + `¢´štf +( +pÝup_desc +, +SETTING_STR_SLP_LEN +, "% %s?", + `_ +( +SETTING_FONT_POPUP_DESC +), +ad +-> +sub™em +-> +keySŒ +); + +368 +ad +-> +pÝup + = + `£‰šg_ü—‹_pÝup_w™h_bŠ +×d,‡d-> +wš_g‘ +, +NULL +, + +369 +pÝup_desc +, + +370 +__£‰šg_¡Üage_maš_pÝup_cb +, 0, + +371 2, + `_ +("IDS_COM_SK_YES"),_("IDS_COM_SK_NO")); + +372 + } +} + +378  + $__£‰šg_¡Üage_maš_sub_li¡_£l_cb +(* +d©a +, +Evas_Objeù + * +obj +, * +ev’t_šfo +) + +380 +SETTING_TRACE_BEGIN +; + +382 + `»tm_if +( +ev’t_šfo + =ð +NULL +, "Invalid‡rgument:ƒvent info is NULL"); + +383 +Elm_Objeù_I‹m + * +sub™em + = (Elm_Objeù_I‹m *è +ev’t_šfo +; + +384 + `–m_g’li¡_™em_£Ëùed_£t +( +sub™em +, 0); + +385 +S‘tšg_G’GroupI‹m_D©a + * +d©a_subI‹m + = + `–m_objeù_™em_d©a_g‘ +( +sub™em +); + +386 + `»t_if +( +NULL + =ð +d©a_subI‹m +); + +388 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +391 ià( +ad +-> +´ev_¡Üage + =ð +d©a_subI‹m +-> +chk_¡©us +) { + +392 + `SETTING_TRACE +("NOT CHANGED "); + +396 +ad +-> +sub™em + = +d©a_subI‹m +; + +397 + `–m_¿dio_v®ue_£t +( +ad +-> +sub™em +-> +rgd +,‡d->sub™em-> +chk_¡©us +); + +399 + `__£‰šg_¡Üage_maš_pÝup +( +ad +); + +400 + } +} + +402  + $__£‰šg_¡Üage_maš_exp_cb +(* +d©a +, +Evas_Objeù + * +obj +, * +ev’t_šfo +) + +404 + `»t_if +( +NULL + =ð +d©a + || NULL =ð +ev’t_šfo +); + +405 +SETTING_TRACE_BEGIN +; + +406 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +407 +Elm_Objeù_I‹m + * +·»ÁI‹m + = +ev’t_šfo +; + +408 +S‘tšg_G’GroupI‹m_D©a + * +d©a_·»ÁI‹m + = + `–m_objeù_™em_d©a_g‘ +( +·»ÁI‹m +); + +409 +Evas_Objeù + * +süÞËr + = + `–m_objeù_™em_widg‘_g‘ +( +·»ÁI‹m +); + +411 +Evas_Objeù + * +rgd + = +NULL +; + +412 ià( +d©a_·»ÁI‹m + =ð +ad +-> +¡Üage_ty³ +) { + +413 +rgd + = + `–m_¿dio_add +( +süÞËr +); + +414 + `–m_¿dio_v®ue_£t +( +rgd +, -1); + +416 +Eša_Li¡ + * +¡Üage_li¡ + = +NULL +; + +417 +Eša_Li¡ + * +l + = +NULL +; + +418 +FcCh¬8 + * +¡Üage_d©a + = +NULL +; + +419 +¡Üage_li¡ + = + `__£‰šg_¡Üage_maš_avažabË_li¡_g‘ +(); + +421  +i + = 0; + +422  +m©ched_¡Üage + = -1; + +423 +S‘tšg_G’GroupI‹m_D©a + * +™em + = +NULL +; + +424 + `EINA_LIST_FOREACH +( +¡Üage_li¡ +, +l +, +¡Üage_d©a +) + +426 +™em + = + `£‰šg_ü—‹_G’dŸl_exp_sub_f›ld +( +süÞËr +, &( +ad +-> +™c_1icÚ_1‹xt_sub +), + +427 +__£‰šg_¡Üage_maš_sub_li¡_£l_cb +, +ad +, + +428 +·»ÁI‹m +, +SWALLOW_Ty³_1RADIO +, +rgd +, + +429 +i +, (cÚ¡ *) +¡Üage_d©a +, + +430 +NULL +); + +432 ià( +™em +) { + +433 +™em +-> +u£rd©a + = +ad +; + +434 ià(! + `§ãSŒCmp +( +ad +-> +¡Üage_Çme +, (cÚ¡ *) +¡Üage_d©a +)) { + +435 +m©ched_¡Üage + = +i +; + +439 +i +++; + +443 ià( +m©ched_¡Üage + != -1) { + +444 + `–m_¿dio_v®ue_£t +( +rgd +, +m©ched_¡Üage +); + +447 +ad +-> +´ev_¡Üage + = +m©ched_¡Üage +; + +449 + } +} + +457  + $£‰šg_¡Üage_maš_ü—‹ +(* +cb +) + +459 +SETTING_TRACE_BEGIN +; + +461 + `»tv_if +( +cb + =ð +NULL +, +SETTING_GENERAL_ERR_NULL_DATA_PARAMETER +); + +463 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +cb +; + +465 + `»tvm_if +( +ad +-> +wš_maš_Ïyout + =ð +NULL +, +SETTING_DRAW_ERR_FAIL_LOAD_EDJ +, + +468 +ad +-> +ly_maš + = + +469 + `£‰šg_ü—‹_Ïyout_Çvi_b¬_g’li¡ +( +ad +-> +wš_maš_Ïyout +, + +470 +ad +-> +wš_g‘ +, + +471 + `_ +( +KeySŒ_StÜage +), + +472 + `_ +("IDS_COM_BODY_BACK"), + +473 +NULL +, + +474 +__£‰šg_¡Üage_maš_þick_soákey_back_cb +, + +475 +NULL +, + +476 +ad +, &ad-> +g’li¡ +, &ad-> +Çvib¬ +); + +478 + `£‰šg_’abË_ex·ndabË_g’li¡ +( +ad +-> +g’li¡ +,‡d, + +479 +__£‰šg_¡Üage_maš_exp_cb +, +NULL +); + +481 + `__£‰šg_¡Üage_maš_g’li¡_™em_ü—‹ +( +ad +); + +483 +£‰šg_v›w_¡Üage_maš +. +is_ü—‹ + = 1; + +484  +SETTING_RETURN_SUCCESS +; + +485 + } +} + +487  + $£‰šg_¡Üage_maš_de¡roy +(* +cb +) + +490 + `»tv_if +( +cb + =ð +NULL +, +SETTING_GENERAL_ERR_NULL_DATA_PARAMETER +); + +492 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +cb +; + +494 ià( +ad +-> +pÝup +) { + +495 + `evas_objeù_d– +( +ad +-> +pÝup +); + +496 +ad +-> +pÝup + = +NULL +; + +499 ià( +ad +-> +ly_maš + !ð +NULL +) { + +500 + `evas_objeù_d– +( +ad +-> +ly_maš +); + +501 +£‰šg_v›w_¡Üage_maš +. +is_ü—‹ + = 0; + +504  +SETTING_RETURN_SUCCESS +; + +505 + } +} + +507  + $£‰šg_¡Üage_maš_upd©e +(* +cb +) + +509 +SETTING_TRACE_BEGIN +; + +511 + `»tv_if +( +cb + =ð +NULL +, +SETTING_GENERAL_ERR_NULL_DATA_PARAMETER +); + +513 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +cb +; + +515 ià( +ad +-> +ly_maš + !ð +NULL +) { + +516 + `evas_objeù_show +( +ad +-> +ly_maš +); + +518 + `£‰šg_¡Üage_upd©e_vcÚf_key +( +ad +, +SETTING_VCONF_INT_TYPE +, + +519 +INT_SLP_SETTING_LCD_TIMEOUT_NORMAL +); + +522  +SETTING_RETURN_SUCCESS +; + +523 + } +} + +525  + $£‰šg_¡Üage_maš_þ—nup +(* +cb +) + +528 + `»tv_if +( +cb + =ð +NULL +, +SETTING_GENERAL_ERR_NULL_DATA_PARAMETER +); + +530 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +cb +; + +532 ià( +ad +-> +ly_maš + !ð +NULL +) { + +533 + `evas_objeù_hide +( +ad +-> +ly_maš +); + +536  +SETTING_RETURN_SUCCESS +; + +537 + } +} + +545  + $__£‰šg_¡Üage_maš_þick_soákey_back_cb +(* +d©a +, +Evas_Objeù + * +obj +, + +546 * +ev’t_šfo +) + +549 + `»t_if +( +d©a + =ð +NULL +); + +551 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +553 + `ug_de¡roy_me +( +ad +-> +ug +); + +554 + } +} + + @src/setting-storage.c + +21  + ~<£‰šg-¡Üage.h +> + +22 #iâdeà +UG_MODULE_API + + +23  + #UG_MODULE_API + + `__©Œibu‹__ + (( + `visibž™y +("deçuÉ"))) + + ) + +26  + $£‰šg_¡Üage_ug_cb_»size +(* +d©a +, +Evas + * +e +, +Evas_Objeù + * +obj +, + +27 * +ev’t_šfo +) + +29 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +30 + `£‰šg_v›w_upd©e +(& +£‰šg_v›w_¡Üage_maš +, +ad +); + +31 + } +} + +33 * + $£‰šg_¡Üage_ug_Ú_ü—‹ +( +ui_gadg‘ + * +ug +, +ug_mode + +mode +, + +34 +bundË + * +d©a +, * +´iv +) + +36 + `£‰šg_»tvm_if +((! +ug + || ! +´iv +), +NULL +, "!ug || !priv"); + +38 +S‘tšgStÜageUG + * +¡ÜageUG + = +´iv +; + +39 +¡ÜageUG +-> +ug + = ug; + +40 +¡ÜageUG +-> +wš_maš_Ïyout + = ( +Evas_Objeù + *è + `ug_g‘_·»Á_Ïyout +( +ug +); + +41 +¡ÜageUG +-> +wš_g‘ + = ( +Evas_Objeù + *è + `ug_g‘_wšdow +(); + +42 + `evas_objeù_show +( +¡ÜageUG +-> +wš_maš_Ïyout +); + +43 +¡ÜageUG +-> +evas + = + `evas_objeù_evas_g‘ +(¡ÜageUG-> +wš_maš_Ïyout +); + +45 + `£‰šg_»tvm_if +( +¡ÜageUG +-> +wš_maš_Ïyout + =ð +NULL +, NULL, + +48 +¡ÜageUG +-> +™c_£³¿tÜ +. +™em_¡yË + = "dialogue/separator/21/with_line"; + +49 +¡ÜageUG +-> +™c_£³¿tÜ +. +func +. +‹xt_g‘ + = +NULL +; + +50 +¡ÜageUG +-> +™c_£³¿tÜ +. +func +. +cڋÁ_g‘ + = +NULL +; + +51 +¡ÜageUG +-> +™c_£³¿tÜ +. +func +. +¡©e_g‘ + = +NULL +; + +52 +¡ÜageUG +-> +™c_£³¿tÜ +. +func +. +d– + = +NULL +; + +54 + `£‰šg_ü—‹_G’dŸl_™c +("dŸlogue/2‹xt.3/ex·ndabË", &( +¡ÜageUG +-> +™c_2‹xt_3_·»Á +)); + +55 + `£‰šg_ü—‹_G’dŸl_™c +("dŸlogue/1‹xt.1icÚ/ex·ndabË2", &( +¡ÜageUG +-> +™c_1icÚ_1‹xt_sub +)); + +56 + `£‰šg_ü—‹_G’dŸl_™c +("dŸlogue/2‹xt.3", &( +¡ÜageUG +-> +™c_2‹xt_2 +)); + +57 + `£‰šg_ü—‹_G’dŸl_™c +("dŸlogue/1‹xt.1icÚ.2", &( +¡ÜageUG +-> +™c_1‹xt_1icÚ_2 +)); + +58 + `£‰šg_ü—‹_G’dŸl_™c +("dŸlogue/t™Ë", &( +¡ÜageUG +-> +™c_group_™em +)); + +59 + `£‰šg_ü—‹_G’dŸl_™c +("muɞše/1‹xt", &( +¡ÜageUG +-> +™c_bg_1icÚ +)); + +62 + `£‰šg_v›w_ü—‹ +(& +£‰šg_v›w_¡Üage_maš +, (*) +¡ÜageUG +); + +63 + `evas_objeù_ev’t_ÿÎback_add +( +¡ÜageUG +-> +wš_maš_Ïyout +, + +64 +EVAS_CALLBACK_RESIZE +, + +65 +£‰šg_¡Üage_ug_cb_»size +, +¡ÜageUG +); + +66  +¡ÜageUG +-> +ly_maš +; + +67 + } +} + +69  + $£‰šg_¡Üage_ug_Ú_¡¬t +( +ui_gadg‘ + * +ug +, +bundË + * +d©a +, + +70 * +´iv +) + +72 + } +} + +74  + $£‰šg_¡Üage_ug_Ú_·u£ +( +ui_gadg‘ + * +ug +, +bundË + * +d©a +, + +75 * +´iv +) + +77 + } +} + +79  + $£‰šg_¡Üage_ug_Ú_»sume +( +ui_gadg‘ + * +ug +, +bundË + * +d©a +, + +80 * +´iv +) + +82 + } +} + +84  + $£‰šg_¡Üage_ug_Ú_de¡roy +( +ui_gadg‘ + * +ug +, +bundË + * +d©a +, + +85 * +´iv +) + +87 +SETTING_TRACE_BEGIN +; + +88 + `£‰šg_»tm_if +((! +ug + || ! +´iv +), "!ug || !priv"); + +89 +S‘tšgStÜageUG + * +¡ÜageUG + = +´iv +; + +91 + `evas_objeù_ev’t_ÿÎback_d– +( +¡ÜageUG +-> +wš_maš_Ïyout +, +EVAS_CALLBACK_RESIZE +, +£‰šg_¡Üage_ug_cb_»size +); + +92 +¡ÜageUG +-> +ug + = ug; + +95 + `£‰šg_v›w_de¡roy +(& +£‰šg_v›w_¡Üage_maš +, +¡ÜageUG +); + +96 ià( +NULL + !ð + `ug_g‘_Ïyout +( +¡ÜageUG +-> +ug +)) { + +97 + `evas_objeù_hide +(( +Evas_Objeù + *è + `ug_g‘_Ïyout +( +¡ÜageUG +-> +ug +)); + +98 + `evas_objeù_d– +(( +Evas_Objeù + *è + `ug_g‘_Ïyout +( +¡ÜageUG +-> +ug +)); + +101 +SETTING_TRACE_END +; + +102 + } +} + +104  + $£‰šg_¡Üage_ug_Ú_mes§ge +( +ui_gadg‘ + * +ug +, +bundË + * +msg +, + +105 +bundË + * +d©a +, * +´iv +) + +107 +SETTING_TRACE_BEGIN +; + +108 + } +} + +110  + $£‰šg_¡Üage_ug_Ú_ev’t +( +ui_gadg‘ + * +ug +, +ug_ev’t + +ev’t +, + +111 +bundË + * +d©a +, * +´iv +) + +113 +SETTING_TRACE_BEGIN +; + +114  +ev’t +) { + +115  +UG_EVENT_LOW_MEMORY +: + +117  +UG_EVENT_LOW_BATTERY +: + +119  +UG_EVENT_LANG_CHANGE +: + +121  +UG_EVENT_ROTATE_PORTRAIT +: + +123  +UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN +: + +125  +UG_EVENT_ROTATE_LANDSCAPE +: + +127  +UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN +: + +129  +UG_EVENT_REGION_CHANGE +: + +134 + } +} + +136  + $£‰šg_¡Üage_ug_Ú_key_ev’t +( +ui_gadg‘ + * +ug +, + +137 +ug_key_ev’t + +ev’t +, +bundË + * +d©a +, + +138 * +´iv +) + +140 +SETTING_TRACE_BEGIN +; + +141 ià(! +ug +) + +144  +ev’t +) { + +145  +UG_KEY_EVENT_END +: + +146 + `ug_de¡roy_me +( +ug +); + +151 + } +} + +153 +UG_MODULE_API +  + $UG_MODULE_INIT +( +ug_moduË_Ýs + * +Ýs +) + +155 +SETTING_TRACE_BEGIN +; + +156 +S‘tšgStÜageUG + * +¡ÜageUG + = + `ÿÎoc +(1, (SettingStorageUG)); + +157 + `£‰šg_»tvm_if +(! +¡ÜageUG +, -1, "Create SettingStorageUG obj failed"); + +159 +Ýs +-> +ü—‹ + = +£‰šg_¡Üage_ug_Ú_ü—‹ +; + +160 +Ýs +-> +¡¬t + = +£‰šg_¡Üage_ug_Ú_¡¬t +; + +161 +Ýs +-> +·u£ + = +£‰šg_¡Üage_ug_Ú_·u£ +; + +162 +Ýs +-> +»sume + = +£‰šg_¡Üage_ug_Ú_»sume +; + +163 +Ýs +-> +de¡roy + = +£‰šg_¡Üage_ug_Ú_de¡roy +; + +164 +Ýs +-> +mes§ge + = +£‰šg_¡Üage_ug_Ú_mes§ge +; + +165 +Ýs +-> +ev’t + = +£‰šg_¡Üage_ug_Ú_ev’t +; + +166 +Ýs +-> +key_ev’t + = +£‰šg_¡Üage_ug_Ú_key_ev’t +; + +167 +Ýs +-> +´iv + = +¡ÜageUG +; + +168 +Ýs +-> +Ýt + = +UG_OPT_INDICATOR_ENABLE +; + +171 + } +} + +173 +UG_MODULE_API +  + $UG_MODULE_EXIT +( +ug_moduË_Ýs + * +Ýs +) + +175 +SETTING_TRACE_BEGIN +; + +176  +S‘tšgStÜageUG + * +¡ÜageUG +; + +177 + `£‰šg_»tm_if +(! +Ýs +, "ops == NULL"); + +179 +¡ÜageUG + = +Ýs +-> +´iv +; + +180 ià( +¡ÜageUG +) { + +181 + `FREE +( +¡ÜageUG +); + +183 + } +} + +191  + $£‰šg_¡Üage_upd©e_vcÚf_key_št_ty³ +(* +d©a +, + +192 +£‰šg_št_¦p_li¡ + +¦p_key +) + +194 +SETTING_TRACE_BEGIN +; + +196 ià( +d©a + =ð +NULL +) { + +197  +SETTING_GENERAL_ERR_NULL_DATA_PARAMETER +; + +200  +»t + = +SETTING_RETURN_FAIL +; + +201  +v®ue +; + +202  +”r +; + +205 +»t + = + `£‰šg_g‘_št_¦p_key +( +¦p_key +, & +v®ue +, & +”r +); + +207  +¦p_key +) { + +228 +»t + = +SETTING_GENERAL_ERR_NOT_FIND_VALUE_SWITCH +; + +232  +»t +; + +233 + } +} + +235  + $£‰šg_¡Üage_upd©e_vcÚf_key +(* +d©a +, +£‰šg_vcÚf_ty³ + +ty³ +, + +236  +¦p_key +) + +238 +SETTING_TRACE_BEGIN +; + +240 ià( +d©a + =ð +NULL +) { + +241  +SETTING_GENERAL_ERR_NULL_DATA_PARAMETER +; + +244  +»t + = +SETTING_RETURN_FAIL +; + +245 +S‘tšgStÜageUG + * +ad + = (S‘tšgStÜageUG *è +d©a +; + +247  +ty³ +) { + +248  +SETTING_VCONF_INT_TYPE +: + +249 +»t + = + `£‰šg_¡Üage_upd©e_vcÚf_key_št_ty³ +( +ad +, +¦p_key +); + +252  +SETTING_VCONF_BOOL_TYPE +: + +255  +SETTING_VCONF_STR_TYPE +: + +262  +»t +; + +263 + } +} + +267 +UG_MODULE_API +  + $£‰šg_¶ugš_»£t +( +bundË + * +d©a +, * +´iv +) + +269 +SETTING_TRACE_BEGIN +; + +271  +»t + = 0; + +272 #ià +SUPPORT_RUN_SYSTEM_COMMAND + + +273 +»t + +ð + `excu‹Cmd +( +SETTING_POSTINST_FILE +, 1, "storage"); + +275 +»t + +ð + `vcÚf_£t_št +( +VCONFKEY_SETAPPL_FONT_SIZE_INT +, +SETTING_FONT_SIZE_SMALL +); + +276 +»t + +ð + `vcÚf_£t_št +( +VCONFKEY_SETAPPL_FONT_TYPE_INT +, 0); + +278  +»t +; + +279 + } +} + + @/usr/include/stdio.h + +24 #iâdeà +_STDIO_H + + +26 #ià! +defšed + +__Ãed_FILE + && !defšed +__Ãed___FILE + + +27  + #_STDIO_H + 1 + + ) + +28  + ~<ã©u»s.h +> + +30 + g__BEGIN_DECLS + + +32  + #__Ãed_size_t + + + ) + +33  + #__Ãed_NULL + + + ) + +34  + ~<¡ddef.h +> + +36  + ~ + +37  + #__Ãed_FILE + + + ) + +38  + #__Ãed___FILE + + + ) + +42 #ià! +defšed + +__FILE_defšed + && defšed +__Ãed_FILE + + +45  + g_IO_FILE +; + +47 +__BEGIN_NAMESPACE_STD + + +49  +_IO_FILE + + tFILE +; + +50 + g__END_NAMESPACE_STD + + +51 #ià +defšed + +__USE_LARGEFILE64 + || defšed +__USE_SVID + || defšed +__USE_POSIX + \ + +52 || +defšed + + g__USE_BSD + || defšed + g__USE_ISOC99 + || defšed + g__USE_XOPEN + \ + +53 || +defšed + +__USE_POSIX2 + + +54 + $__USING_NAMESPACE_STD +( +FILE +) + +57  + #__FILE_defšed + 1 + + ) + +59 #undeà +__Ãed_FILE + + +62 #ià! +defšed + +____FILE_defšed + && defšed +__Ãed___FILE + + +65  +_IO_FILE + + t__FILE +; + +67  + #____FILE_defšed + 1 + + ) + +69 #undeà +__Ãed___FILE + + +72 #ifdef +_STDIO_H + + +73  + #_STDIO_USES_IOSTREAM + + + ) + +75  + ~ + +77 #ià +defšed + +__USE_XOPEN + || defšed +__USE_XOPEN2K8 + + +78 #ifdeà +__GNUC__ + + +79 #iâdeà +_VA_LIST_DEFINED + + +80  +_G_va_li¡ + + tva_li¡ +; + +81  + #_VA_LIST_DEFINED + + + ) + +84  + ~<¡d¬g.h +> + +88 #ifdeà +__USE_XOPEN2K8 + + +89 #iâdeà +__off_t_defšed + + +90 #iâdeà +__USE_FILE_OFFSET64 + + +91  +__off_t + + toff_t +; + +93  +__off64_t + + toff_t +; + +95  + #__off_t_defšed + + + ) + +97 #ià +defšed + +__USE_LARGEFILE64 + && !defšed +__off64_t_defšed + + +98  +__off64_t + + toff64_t +; + +99  + #__off64_t_defšed + + + ) + +102 #iâdeà +__ssize_t_defšed + + +103  +__ssize_t + + tssize_t +; + +104  + #__ssize_t_defšed + + + ) + +109 +__BEGIN_NAMESPACE_STD + + +110 #iâdeà +__USE_FILE_OFFSET64 + + +111  +_G_åos_t + + tåos_t +; + +113  +_G_åos64_t + + tåos_t +; + +115 +__END_NAMESPACE_STD + + +116 #ifdeà +__USE_LARGEFILE64 + + +117  +_G_åos64_t + + tåos64_t +; + +121  + #_IOFBF + 0 + + ) + +122  + #_IOLBF + 1 + + ) + +123  + #_IONBF + 2 + + ) + +127 #iâdeà +BUFSIZ + + +128  + #BUFSIZ + +_IO_BUFSIZ + + + ) + +134 #iâdeà +EOF + + +135  + #EOF + (-1) + + ) + +141  + #SEEK_SET + 0 + + ) + +142  + #SEEK_CUR + 1 + + ) + +143  + #SEEK_END + 2 + + ) + +144 #ifdeà +__USE_GNU + + +145  + #SEEK_DATA + 3 + + ) + +146  + #SEEK_HOLE + 4 + + ) + +150 #ià +defšed + +__USE_SVID + || defšed +__USE_XOPEN + + +152  + #P_tmpdœ + "/tmp" + + ) + +165  + ~ + +169  +_IO_FILE + * +¡dš +; + +170  +_IO_FILE + * +¡dout +; + +171  +_IO_FILE + * +¡d”r +; + +173  + #¡dš + +¡dš + + + ) + +174  + #¡dout + +¡dout + + + ) + +175  + #¡d”r + +¡d”r + + + ) + +177 +__BEGIN_NAMESPACE_STD + + +179  + $»move + ( +__cÚ¡ + * +__fž’ame +è +__THROW +; + +181  + $»Çme + ( +__cÚ¡ + * +__Þd +, __cÚ¡ * +__Ãw +è +__THROW +; + +182 +__END_NAMESPACE_STD + + +184 #ifdeà +__USE_ATFILE + + +186  + $»Çm—t + ( +__Þdfd +, +__cÚ¡ + * +__Þd +,  +__Ãwfd +, + +187 +__cÚ¡ + * +__Ãw +è +__THROW +; + +190 +__BEGIN_NAMESPACE_STD + + +195 #iâdeà +__USE_FILE_OFFSET64 + + +196 +FILE + * + $tmpfže + (è +__wur +; + +198 #ifdeà +__REDIRECT + + +199 +FILE + * + `__REDIRECT + ( +tmpfže +, (), +tmpfže64 +è +__wur +; + +201  + #tmpfže + +tmpfže64 + + + ) + +205 #ifdeà +__USE_LARGEFILE64 + + +206 +FILE + * + $tmpfže64 + (è +__wur +; + +210 * + $tm²am + (* +__s +è +__THROW + +__wur +; + +211 +__END_NAMESPACE_STD + + +213 #ifdeà +__USE_MISC + + +216 * + $tm²am_r + (* +__s +è +__THROW + +__wur +; + +220 #ià +defšed + +__USE_SVID + || defšed +__USE_XOPEN + + +228 * + $‹m²am + ( +__cÚ¡ + * +__dœ +, __cÚ¡ * +__pfx +) + +229 +__THROW + +__©Œibu‹_m®loc__ + +__wur +; + +233 +__BEGIN_NAMESPACE_STD + + +238  + `fþo£ + ( +FILE + * +__¡»am +); + +243  + `fæush + ( +FILE + * +__¡»am +); + +244 +__END_NAMESPACE_STD + + +246 #ifdeà +__USE_MISC + + +253  + `fæush_uÆocked + ( +FILE + * +__¡»am +); + +256 #ifdeà +__USE_GNU + + +263  + `fþo£®l + (); + +267 +__BEGIN_NAMESPACE_STD + + +268 #iâdeà +__USE_FILE_OFFSET64 + + +273 +FILE + * + $fݒ + ( +__cÚ¡ + * +__»¡riù + +__fž’ame +, + +274 +__cÚ¡ + * +__»¡riù + +__modes +è +__wur +; + +279 +FILE + * + $äeݒ + ( +__cÚ¡ + * +__»¡riù + +__fž’ame +, + +280 +__cÚ¡ + * +__»¡riù + +__modes +, + +281 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +283 #ifdeà +__REDIRECT + + +284 +FILE + * + `__REDIRECT + ( +fݒ +, ( +__cÚ¡ + * +__»¡riù + +__fž’ame +, + +285 +__cÚ¡ + * +__»¡riù + +__modes +), +fݒ64 +) + +286 +__wur +; + +287 +FILE + * + `__REDIRECT + ( +äeݒ +, ( +__cÚ¡ + * +__»¡riù + +__fž’ame +, + +288 +__cÚ¡ + * +__»¡riù + +__modes +, + +289 +FILE + * +__»¡riù + +__¡»am +), +äeݒ64 +) + +290 +__wur +; + +292  + #fݒ + +fݒ64 + + + ) + +293  + #äeݒ + +äeݒ64 + + + ) + +296 +__END_NAMESPACE_STD + + +297 #ifdeà +__USE_LARGEFILE64 + + +298 +FILE + * + $fݒ64 + ( +__cÚ¡ + * +__»¡riù + +__fž’ame +, + +299 +__cÚ¡ + * +__»¡riù + +__modes +è +__wur +; + +300 +FILE + * + $äeݒ64 + ( +__cÚ¡ + * +__»¡riù + +__fž’ame +, + +301 +__cÚ¡ + * +__»¡riù + +__modes +, + +302 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +305 #ifdef +__USE_POSIX + + +307 +FILE + * + $fdݒ + ( +__fd +, +__cÚ¡ + * +__modes +è +__THROW + +__wur +; + +310 #ifdef +__USE_GNU + + +313 +FILE + * + $fݒcook› + (* +__»¡riù + +__magic_cook› +, + +314 +__cÚ¡ + * +__»¡riù + +__modes +, + +315 +_IO_cook›_io_funùiÚs_t + +__io_funcs +è +__THROW + +__wur +; + +318 #ifdeà +__USE_XOPEN2K8 + + +320 +FILE + * + $fmemݒ + (* +__s +, +size_t + +__Ën +, +__cÚ¡ + * +__modes +) + +321 +__THROW + +__wur +; + +326 +FILE + * + $ݒ_mem¡»am + (** +__buæoc +, +size_t + * +__siz–oc +è +__THROW + +__wur +; + +330 +__BEGIN_NAMESPACE_STD + + +333  + $£tbuf + ( +FILE + * +__»¡riù + +__¡»am +, *__»¡riù +__buf +è +__THROW +; + +337  + $£tvbuf + ( +FILE + * +__»¡riù + +__¡»am +, *__»¡riù +__buf +, + +338  +__modes +, +size_t + +__n +è +__THROW +; + +339 +__END_NAMESPACE_STD + + +341 #ifdef +__USE_BSD + + +344  + $£tbufãr + ( +FILE + * +__»¡riù + +__¡»am +, *__»¡riù +__buf +, + +345 +size_t + +__size +è +__THROW +; + +348  + $£Žšebuf + ( +FILE + * +__¡»am +è +__THROW +; + +352 +__BEGIN_NAMESPACE_STD + + +357  + `årštf + ( +FILE + * +__»¡riù + +__¡»am +, + +358 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...); + +363  + `´štf + ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...); + +365  + $¥rštf + (* +__»¡riù + +__s +, + +366 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__THROWNL +; + +372  + `vårštf + ( +FILE + * +__»¡riù + +__s +, +__cÚ¡ + *__»¡riù +__fÜm© +, + +373 +_G_va_li¡ + +__¬g +); + +378  + `v´štf + ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +); + +380  + $v¥rštf + (* +__»¡riù + +__s +, +__cÚ¡ + *__»¡riù +__fÜm© +, + +381 +_G_va_li¡ + +__¬g +è +__THROWNL +; + +382 +__END_NAMESPACE_STD + + +384 #ià +defšed + +__USE_BSD + || defšed +__USE_ISOC99 + || defšed +__USE_UNIX98 + + +385 +__BEGIN_NAMESPACE_C99 + + +387  + $¢´štf + (* +__»¡riù + +__s +, +size_t + +__maxËn +, + +388 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...) + +389 +__THROWNL + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 3, 4))); + +391  + $v¢´štf + (* +__»¡riù + +__s +, +size_t + +__maxËn +, + +392 +__cÚ¡ + * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +) + +393 +__THROWNL + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 3, 0))); + +394 +__END_NAMESPACE_C99 + + +397 #ifdeà +__USE_GNU + + +400  + $va¥rštf + (** +__»¡riù + +__±r +, +__cÚ¡ + *__»¡riù +__f +, + +401 +_G_va_li¡ + +__¬g +) + +402 +__THROWNL + + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__´štf__ +, 2, 0))è +__wur +; + +403  + $__a¥rštf + (** +__»¡riù + +__±r +, + +404 +__cÚ¡ + * +__»¡riù + +__fmt +, ...) + +405 +__THROWNL + + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__´štf__ +, 2, 3))è +__wur +; + +406  + $a¥rštf + (** +__»¡riù + +__±r +, + +407 +__cÚ¡ + * +__»¡riù + +__fmt +, ...) + +408 +__THROWNL + + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__´štf__ +, 2, 3))è +__wur +; + +411 #ifdeà +__USE_XOPEN2K8 + + +418  + $vd´štf + ( +__fd +, +__cÚ¡ + * +__»¡riù + +__fmt +, + +419 +_G_va_li¡ + +__¬g +) + +420 + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 2, 0))); + +421  + $d´štf + ( +__fd +, +__cÚ¡ + * +__»¡riù + +__fmt +, ...) + +422 + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 2, 3))); + +426 +__BEGIN_NAMESPACE_STD + + +431  + $fsÿnf + ( +FILE + * +__»¡riù + +__¡»am +, + +432 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__wur +; + +437  + $sÿnf + ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__wur +; + +439  + $ssÿnf + ( +__cÚ¡ + * +__»¡riù + +__s +, + +440 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__THROW +; + +442 #ià +defšed + +__USE_ISOC99 + && !defšed +__USE_GNU + \ + +443 && (! +defšed + +__LDBL_COMPAT + || !defšed +__REDIRECT +) \ + +444 && ( +defšed + +__STRICT_ANSI__ + || defšed +__USE_XOPEN2K +) + +445 #ifdeà +__REDIRECT + + +449  + `__REDIRECT + ( +fsÿnf +, ( +FILE + * +__»¡riù + +__¡»am +, + +450 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...), + +451 +__isoc99_fsÿnf +è +__wur +; + +452  + `__REDIRECT + ( +sÿnf +, ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...), + +453 +__isoc99_sÿnf +è +__wur +; + +454  + `__REDIRECT_NTH + ( +ssÿnf +, ( +__cÚ¡ + * +__»¡riù + +__s +, + +455 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...), + +456 +__isoc99_ssÿnf +); + +458  + $__isoc99_fsÿnf + ( +FILE + * +__»¡riù + +__¡»am +, + +459 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__wur +; + +460  + $__isoc99_sÿnf + ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__wur +; + +461  + $__isoc99_ssÿnf + ( +__cÚ¡ + * +__»¡riù + +__s +, + +462 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...è +__THROW +; + +463  + #fsÿnf + +__isoc99_fsÿnf + + + ) + +464  + #sÿnf + +__isoc99_sÿnf + + + ) + +465  + #ssÿnf + +__isoc99_ssÿnf + + + ) + +469 +__END_NAMESPACE_STD + + +471 #ifdef +__USE_ISOC99 + + +472 +__BEGIN_NAMESPACE_C99 + + +477  + $vfsÿnf + ( +FILE + * +__»¡riù + +__s +, +__cÚ¡ + *__»¡riù +__fÜm© +, + +478 +_G_va_li¡ + +__¬g +) + +479 + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__sÿnf__ +, 2, 0))è +__wur +; + +485  + $vsÿnf + ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +) + +486 + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__sÿnf__ +, 1, 0))è +__wur +; + +489  + $vssÿnf + ( +__cÚ¡ + * +__»¡riù + +__s +, + +490 +__cÚ¡ + * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +) + +491 +__THROW + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__sÿnf__ +, 2, 0))); + +493 #ià! +defšed + +__USE_GNU + \ + +494 && (! +defšed + +__LDBL_COMPAT + || !defšed +__REDIRECT +) \ + +495 && ( +defšed + +__STRICT_ANSI__ + || defšed +__USE_XOPEN2K +) + +496 #ifdeà +__REDIRECT + + +500  + `__REDIRECT + ( +vfsÿnf +, + +501 ( +FILE + * +__»¡riù + +__s +, + +502 +__cÚ¡ + * +__»¡riù + +__fÜm© +, +_G_va_li¡ + +__¬g +), + +503 +__isoc99_vfsÿnf +) + +504 + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__sÿnf__ +, 2, 0))è +__wur +; + +505  + `__REDIRECT + ( +vsÿnf +, ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, + +506 +_G_va_li¡ + +__¬g +), +__isoc99_vsÿnf +) + +507 + `__©Œibu‹__ + (( + $__fÜm©__ + ( +__sÿnf__ +, 1, 0))è +__wur +; + +508  + `__REDIRECT_NTH + ( +vssÿnf +, + +509 ( +__cÚ¡ + * +__»¡riù + +__s +, + +510 +__cÚ¡ + * +__»¡riù + +__fÜm© +, + +511 +_G_va_li¡ + +__¬g +), +__isoc99_vssÿnf +) + +512 + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__sÿnf__ +, 2, 0))); + +514  + $__isoc99_vfsÿnf + ( +FILE + * +__»¡riù + +__s +, + +515 +__cÚ¡ + * +__»¡riù + +__fÜm© +, + +516 +_G_va_li¡ + +__¬g +è +__wur +; + +517  + $__isoc99_vsÿnf + ( +__cÚ¡ + * +__»¡riù + +__fÜm© +, + +518 +_G_va_li¡ + +__¬g +è +__wur +; + +519  + $__isoc99_vssÿnf + ( +__cÚ¡ + * +__»¡riù + +__s +, + +520 +__cÚ¡ + * +__»¡riù + +__fÜm© +, + +521 +_G_va_li¡ + +__¬g +è +__THROW +; + +522  + #vfsÿnf + +__isoc99_vfsÿnf + + + ) + +523  + #vsÿnf + +__isoc99_vsÿnf + + + ) + +524  + #vssÿnf + +__isoc99_vssÿnf + + + ) + +528 +__END_NAMESPACE_C99 + + +532 +__BEGIN_NAMESPACE_STD + + +537  + `fg‘c + ( +FILE + * +__¡»am +); + +538  + `g‘c + ( +FILE + * +__¡»am +); + +544  + `g‘ch¬ + (); + +545 +__END_NAMESPACE_STD + + +549  + #g‘c +( +_å +è + `_IO_g‘c + (_å) + + ) + +551 #ià +defšed + +__USE_POSIX + || defšed +__USE_MISC + + +556  + `g‘c_uÆocked + ( +FILE + * +__¡»am +); + +557  + `g‘ch¬_uÆocked + (); + +560 #ifdeà +__USE_MISC + + +567  + `fg‘c_uÆocked + ( +FILE + * +__¡»am +); + +571 +__BEGIN_NAMESPACE_STD + + +579  + `åutc + ( +__c +, +FILE + * +__¡»am +); + +580  + `putc + ( +__c +, +FILE + * +__¡»am +); + +586  + `putch¬ + ( +__c +); + +587 +__END_NAMESPACE_STD + + +591  + #putc +( +_ch +, +_å +è + `_IO_putc + (_ch, _å) + + ) + +593 #ifdeà +__USE_MISC + + +600  + `åutc_uÆocked + ( +__c +, +FILE + * +__¡»am +); + +603 #ià +defšed + +__USE_POSIX + || defšed +__USE_MISC + + +608  + `putc_uÆocked + ( +__c +, +FILE + * +__¡»am +); + +609  + `putch¬_uÆocked + ( +__c +); + +613 #ià +defšed + +__USE_SVID + || defšed +__USE_MISC + \ + +614 || ( +defšed + +__USE_XOPEN + && !defšed +__USE_XOPEN2K +) + +616  + `g‘w + ( +FILE + * +__¡»am +); + +619  + `putw + ( +__w +, +FILE + * +__¡»am +); + +623 +__BEGIN_NAMESPACE_STD + + +628 * + $fg‘s + (* +__»¡riù + +__s +,  +__n +, +FILE + *__»¡riù +__¡»am +) + +629 +__wur +; + +636 * + $g‘s + (* +__s +è +__wur +; + +637 +__END_NAMESPACE_STD + + +639 #ifdeà +__USE_GNU + + +646 * + $fg‘s_uÆocked + (* +__»¡riù + +__s +,  +__n +, + +647 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +651 #ifdef +__USE_XOPEN2K8 + + +662 +_IO_ssize_t + + $__g‘d–im + (** +__»¡riù + +__lš•Œ +, + +663 +size_t + * +__»¡riù + +__n +,  +__d–im™” +, + +664 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +665 +_IO_ssize_t + + $g‘d–im + (** +__»¡riù + +__lš•Œ +, + +666 +size_t + * +__»¡riù + +__n +,  +__d–im™” +, + +667 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +675 +_IO_ssize_t + + $g‘lše + (** +__»¡riù + +__lš•Œ +, + +676 +size_t + * +__»¡riù + +__n +, + +677 +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +681 +__BEGIN_NAMESPACE_STD + + +686  + `åuts + ( +__cÚ¡ + * +__»¡riù + +__s +, +FILE + *__»¡riù +__¡»am +); + +692  + `puts + ( +__cÚ¡ + * +__s +); + +699  + `ung‘c + ( +__c +, +FILE + * +__¡»am +); + +706 +size_t + + $ä—d + (* +__»¡riù + +__±r +, +size_t + +__size +, + +707 +size_t + +__n +, +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +712 +size_t + + `fwr™e + ( +__cÚ¡ + * +__»¡riù + +__±r +, size_ˆ +__size +, + +713 +size_t + +__n +, +FILE + * +__»¡riù + +__s +); + +714 +__END_NAMESPACE_STD + + +716 #ifdeà +__USE_GNU + + +723  + `åuts_uÆocked + ( +__cÚ¡ + * +__»¡riù + +__s +, + +724 +FILE + * +__»¡riù + +__¡»am +); + +727 #ifdeà +__USE_MISC + + +734 +size_t + + $ä—d_uÆocked + (* +__»¡riù + +__±r +, +size_t + +__size +, + +735 +size_t + +__n +, +FILE + * +__»¡riù + +__¡»am +è +__wur +; + +736 +size_t + + `fwr™e_uÆocked + ( +__cÚ¡ + * +__»¡riù + +__±r +, size_ˆ +__size +, + +737 +size_t + +__n +, +FILE + * +__»¡riù + +__¡»am +); + +741 +__BEGIN_NAMESPACE_STD + + +746  + `f£ek + ( +FILE + * +__¡»am +,  +__off +,  +__wh’û +); + +751  + $á–l + ( +FILE + * +__¡»am +è +__wur +; + +756  + `»wšd + ( +FILE + * +__¡»am +); + +757 +__END_NAMESPACE_STD + + +764 #ià +defšed + +__USE_LARGEFILE + || defšed +__USE_XOPEN2K + + +765 #iâdeà +__USE_FILE_OFFSET64 + + +770  + `f£eko + ( +FILE + * +__¡»am +, +__off_t + +__off +,  +__wh’û +); + +775 +__off_t + + $á–lo + ( +FILE + * +__¡»am +è +__wur +; + +777 #ifdeà +__REDIRECT + + +778  + `__REDIRECT + ( +f£eko +, + +779 ( +FILE + * +__¡»am +, +__off64_t + +__off +,  +__wh’û +), + +780 +f£eko64 +); + +781 +__off64_t + + `__REDIRECT + ( +á–lo +, ( +FILE + * +__¡»am +), +á–lo64 +); + +783  + #f£eko + +f£eko64 + + + ) + +784  + #á–lo + +á–lo64 + + + ) + +789 +__BEGIN_NAMESPACE_STD + + +790 #iâdeà +__USE_FILE_OFFSET64 + + +795  + `fg‘pos + ( +FILE + * +__»¡riù + +__¡»am +, +åos_t + *__»¡riù +__pos +); + +800  + `f£os + ( +FILE + * +__¡»am +, +__cÚ¡ + +åos_t + * +__pos +); + +802 #ifdeà +__REDIRECT + + +803  + `__REDIRECT + ( +fg‘pos +, ( +FILE + * +__»¡riù + +__¡»am +, + +804 +åos_t + * +__»¡riù + +__pos +), +fg‘pos64 +); + +805  + `__REDIRECT + ( +f£os +, + +806 ( +FILE + * +__¡»am +, +__cÚ¡ + +åos_t + * +__pos +), +f£os64 +); + +808  + #fg‘pos + +fg‘pos64 + + + ) + +809  + #f£os + +f£os64 + + + ) + +812 +__END_NAMESPACE_STD + + +814 #ifdeà +__USE_LARGEFILE64 + + +815  + `f£eko64 + ( +FILE + * +__¡»am +, +__off64_t + +__off +,  +__wh’û +); + +816 +__off64_t + + $á–lo64 + ( +FILE + * +__¡»am +è +__wur +; + +817  + `fg‘pos64 + ( +FILE + * +__»¡riù + +__¡»am +, +åos64_t + *__»¡riù +__pos +); + +818  + `f£os64 + ( +FILE + * +__¡»am +, +__cÚ¡ + +åos64_t + * +__pos +); + +821 +__BEGIN_NAMESPACE_STD + + +823  + $þ—»¼ + ( +FILE + * +__¡»am +è +__THROW +; + +825  + $ãof + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +827  + $ã¼Ü + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +828 +__END_NAMESPACE_STD + + +830 #ifdeà +__USE_MISC + + +832  + $þ—»¼_uÆocked + ( +FILE + * +__¡»am +è +__THROW +; + +833  + $ãof_uÆocked + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +834  + $ã¼Ü_uÆocked + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +838 +__BEGIN_NAMESPACE_STD + + +843  + `³¼Ü + ( +__cÚ¡ + * +__s +); + +844 +__END_NAMESPACE_STD + + +850  + ~ + +853 #ifdef +__USE_POSIX + + +855  + $fž’o + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +858 #ifdeà +__USE_MISC + + +860  + $fž’o_uÆocked + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +864 #ià( +defšed + +__USE_POSIX2 + || defšed +__USE_SVID + || defšed +__USE_BSD + || \ + +865 +defšed + +__USE_MISC +) + +870 +FILE + * + $pݒ + ( +__cÚ¡ + * +__commªd +, __cÚ¡ * +__modes +è +__wur +; + +876  + `pþo£ + ( +FILE + * +__¡»am +); + +880 #ifdef +__USE_POSIX + + +882 * + $ù”mid + (* +__s +è +__THROW +; + +886 #ifdeà +__USE_XOPEN + + +888 * + `cu£rid + (* +__s +); + +892 #ifdef +__USE_GNU + + +893  +ob¡ack +; + +896  + $ob¡ack_´štf + ( +ob¡ack + * +__»¡riù + +__ob¡ack +, + +897 +__cÚ¡ + * +__»¡riù + +__fÜm© +, ...) + +898 +__THROWNL + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 2, 3))); + +899  + $ob¡ack_v´štf + ( +ob¡ack + * +__»¡riù + +__ob¡ack +, + +900 +__cÚ¡ + * +__»¡riù + +__fÜm© +, + +901 +_G_va_li¡ + +__¬gs +) + +902 +__THROWNL + + `__©Œibu‹__ + (( + `__fÜm©__ + ( +__´štf__ +, 2, 0))); + +906 #ià +defšed + +__USE_POSIX + || defšed +__USE_MISC + + +910  + $æockfže + ( +FILE + * +__¡»am +è +__THROW +; + +914  + $árylockfže + ( +FILE + * +__¡»am +è +__THROW + +__wur +; + +917  + $fuÆockfže + ( +FILE + * +__¡»am +è +__THROW +; + +920 #ià +defšed + +__USE_XOPEN + && !defšed +__USE_XOPEN2K + && !defšed +__USE_GNU + + +924  + #__Ãed_g‘Ýt + + + ) + +925  + ~ + +930 #ifdeà +__USE_EXTERN_INLINES + + +931  + ~ + +933 #ià +__USE_FORTIFY_LEVEL + > 0 && +defšed + +__ex‹º_®ways_šlše + + +934  + ~ + +936 #ifdeà +__LDBL_COMPAT + + +937  + ~ + +940 +__END_DECLS + + + @/usr/include/features.h + +20 #iâdef +_FEATURES_H + + +21  + #_FEATURES_H + 1 + + ) + +98 #undeà +__USE_ISOC99 + + +99 #undeà +__USE_ISOC95 + + +100 #undeà +__USE_POSIX + + +101 #undeà +__USE_POSIX2 + + +102 #undeà +__USE_POSIX199309 + + +103 #undeà +__USE_POSIX199506 + + +104 #undeà +__USE_XOPEN + + +105 #undeà +__USE_XOPEN_EXTENDED + + +106 #undeà +__USE_UNIX98 + + +107 #undeà +__USE_XOPEN2K + + +108 #undeà +__USE_XOPEN2KXSI + + +109 #undeà +__USE_XOPEN2K8 + + +110 #undeà +__USE_XOPEN2K8XSI + + +111 #undeà +__USE_LARGEFILE + + +112 #undeà +__USE_LARGEFILE64 + + +113 #undeà +__USE_FILE_OFFSET64 + + +114 #undeà +__USE_BSD + + +115 #undeà +__USE_SVID + + +116 #undeà +__USE_MISC + + +117 #undeà +__USE_ATFILE + + +118 #undeà +__USE_GNU + + +119 #undeà +__USE_REENTRANT + + +120 #undeà +__USE_FORTIFY_LEVEL + + +121 #undeà +__FAVOR_BSD + + +122 #undeà +__KERNEL_STRICT_NAMES + + +126 #iâdeà +_LOOSE_KERNEL_NAMES + + +127  + #__KERNEL_STRICT_NAMES + + + ) + +131  + #__USE_ANSI + 1 + + ) + +140 #ià +defšed + +__GNUC__ + && defšed +__GNUC_MINOR__ + + +141  + #__GNUC_PREREQ +( +maj +, +mš +) \ + +142 (( +__GNUC__ + << 16è+ +__GNUC_MINOR__ + >ð(( +maj +è<< 16è+ ( +mš +)) + + ) + +144  + #__GNUC_PREREQ +( +maj +, +mš +è0 + + ) + +149 #ià +defšed + +_BSD_SOURCE + && \ + +150 !( +defšed + + g_POSIX_SOURCE + || defšed + g_POSIX_C_SOURCE + || \ + +151 +defšed + + g_XOPEN_SOURCE + || defšed + g_GNU_SOURCE + || defšed + g_SVID_SOURCE +) + +152  + #__FAVOR_BSD + 1 + + ) + +156 #ifdeà +_GNU_SOURCE + + +157 #undeà +_ISOC95_SOURCE + + +158  + #_ISOC95_SOURCE + 1 + + ) + +159 #undeà +_ISOC99_SOURCE + + +160  + #_ISOC99_SOURCE + 1 + + ) + +161 #undeà +_POSIX_SOURCE + + +162  + #_POSIX_SOURCE + 1 + + ) + +163 #undeà +_POSIX_C_SOURCE + + +164  + #_POSIX_C_SOURCE + 200809L + + ) + +165 #undeà +_XOPEN_SOURCE + + +166  + #_XOPEN_SOURCE + 700 + + ) + +167 #undeà +_XOPEN_SOURCE_EXTENDED + + +168  + #_XOPEN_SOURCE_EXTENDED + 1 + + ) + +169 #undeà +_LARGEFILE64_SOURCE + + +170  + #_LARGEFILE64_SOURCE + 1 + + ) + +171 #undeà +_BSD_SOURCE + + +172  + #_BSD_SOURCE + 1 + + ) + +173 #undeà +_SVID_SOURCE + + +174  + #_SVID_SOURCE + 1 + + ) + +175 #undeà +_ATFILE_SOURCE + + +176  + #_ATFILE_SOURCE + 1 + + ) + +181 #ià(! +defšed + +__STRICT_ANSI__ + && !defšed +_ISOC99_SOURCE + && \ + +182 ! +defšed + + g_POSIX_SOURCE + && !defšed + g_POSIX_C_SOURCE + && \ + +183 ! +defšed + + g_XOPEN_SOURCE + && !defšed + g_BSD_SOURCE + && !defšed + g_SVID_SOURCE +) + +184  + #_BSD_SOURCE + 1 + + ) + +185  + #_SVID_SOURCE + 1 + + ) + +192 #ià( +defšed + +_ISOC99_SOURCE + || defšed +_ISOC9X_SOURCE + \ + +193 || ( +defšed + + g__STDC_VERSION__ + && __STDC_VERSION__ >= 199901L)) + +194  + #__USE_ISOC99 + 1 + + ) + +198 #ià( +defšed + +_ISOC99_SOURCE + || defšed +_ISOC9X_SOURCE + \ + +199 || ( +defšed + +__STDC_VERSION__ + && __STDC_VERSION__ >= 199409L)) + +200  + #__USE_ISOC95 + 1 + + ) + +205 #ià((! +defšed + +__STRICT_ANSI__ + || ( +_XOPEN_SOURCE + - 0) >= 500) && \ + +206 ! +defšed + +_POSIX_SOURCE + && !defšed +_POSIX_C_SOURCE +) + +207  + #_POSIX_SOURCE + 1 + + ) + +208 #ià +defšed + +_XOPEN_SOURCE + && (_XOPEN_SOURCE - 0) < 500 + +209  + #_POSIX_C_SOURCE + 2 + + ) + +210 #–ià +defšed + +_XOPEN_SOURCE + && (_XOPEN_SOURCE - 0) < 600 + +211  + #_POSIX_C_SOURCE + 199506L + + ) + +212 #–ià +defšed + +_XOPEN_SOURCE + && (_XOPEN_SOURCE - 0) < 700 + +213  + #_POSIX_C_SOURCE + 200112L + + ) + +215  + #_POSIX_C_SOURCE + 200809L + + ) + +217  + #__USE_POSIX_IMPLICITLY + 1 + + ) + +220 #ià +defšed + +_POSIX_SOURCE + || +_POSIX_C_SOURCE + >ð1 || defšed +_XOPEN_SOURCE + + +221  + #__USE_POSIX + 1 + + ) + +224 #ià +defšed + +_POSIX_C_SOURCE + && _POSIX_C_SOURCE >ð2 || defšed +_XOPEN_SOURCE + + +225  + #__USE_POSIX2 + 1 + + ) + +228 #ià( +_POSIX_C_SOURCE + - 0) >= 199309L + +229  + #__USE_POSIX199309 + 1 + + ) + +232 #ià( +_POSIX_C_SOURCE + - 0) >= 199506L + +233  + #__USE_POSIX199506 + 1 + + ) + +236 #ià( +_POSIX_C_SOURCE + - 0) >= 200112L + +237  + #__USE_XOPEN2K + 1 + + ) + +238 #undeà +__USE_ISOC95 + + +239  + #__USE_ISOC95 + 1 + + ) + +240 #undeà +__USE_ISOC99 + + +241  + #__USE_ISOC99 + 1 + + ) + +244 #ià( +_POSIX_C_SOURCE + - 0) >= 200809L + +245  + #__USE_XOPEN2K8 + 1 + + ) + +246 #undeà +_ATFILE_SOURCE + + +247  + #_ATFILE_SOURCE + 1 + + ) + +250 #ifdef +_XOPEN_SOURCE + + +251  + #__USE_XOPEN + 1 + + ) + +252 #ià( +_XOPEN_SOURCE + - 0) >= 500 + +253  + #__USE_XOPEN_EXTENDED + 1 + + ) + +254  + #__USE_UNIX98 + 1 + + ) + +255 #undeà +_LARGEFILE_SOURCE + + +256  + #_LARGEFILE_SOURCE + 1 + + ) + +257 #ià( +_XOPEN_SOURCE + - 0) >= 600 + +258 #ià( +_XOPEN_SOURCE + - 0) >= 700 + +259  + #__USE_XOPEN2K8 + 1 + + ) + +260  + #__USE_XOPEN2K8XSI + 1 + + ) + +262  + #__USE_XOPEN2K + 1 + + ) + +263  + #__USE_XOPEN2KXSI + 1 + + ) + +264 #undeà +__USE_ISOC95 + + +265  + #__USE_ISOC95 + 1 + + ) + +266 #undeà +__USE_ISOC99 + + +267  + #__USE_ISOC99 + 1 + + ) + +270 #ifdeà +_XOPEN_SOURCE_EXTENDED + + +271  + #__USE_XOPEN_EXTENDED + 1 + + ) + +276 #ifdeà +_LARGEFILE_SOURCE + + +277  + #__USE_LARGEFILE + 1 + + ) + +280 #ifdeà +_LARGEFILE64_SOURCE + + +281  + #__USE_LARGEFILE64 + 1 + + ) + +284 #ià +defšed + +_FILE_OFFSET_BITS + && _FILE_OFFSET_BITS == 64 + +285  + #__USE_FILE_OFFSET64 + 1 + + ) + +288 #ià +defšed + +_BSD_SOURCE + || defšed +_SVID_SOURCE + + +289  + #__USE_MISC + 1 + + ) + +292 #ifdef +_BSD_SOURCE + + +293  + #__USE_BSD + 1 + + ) + +296 #ifdef +_SVID_SOURCE + + +297  + #__USE_SVID + 1 + + ) + +300 #ifdef +_ATFILE_SOURCE + + +301  + #__USE_ATFILE + 1 + + ) + +304 #ifdef +_GNU_SOURCE + + +305  + #__USE_GNU + 1 + + ) + +308 #ià +defšed + +_REENTRANT + || defšed +_THREAD_SAFE + + +309  + #__USE_REENTRANT + 1 + + ) + +312 #ià +defšed + +_FORTIFY_SOURCE + && _FORTIFY_SOURCE > 0 \ + +313 && +__GNUC_PREREQ + (4, 1è&& +defšed + + g__OPTIMIZE__ + && __OPTIMIZE__ > 0 + +314 #ià +_FORTIFY_SOURCE + > 1 + +315  + #__USE_FORTIFY_LEVEL + 2 + + ) + +317  + #__USE_FORTIFY_LEVEL + 1 + + ) + +320  + #__USE_FORTIFY_LEVEL + 0 + + ) + +324  + ~ + +327  + #__STDC_ISO_10646__ + 200009L + + ) + +335 #undeà +__GNU_LIBRARY__ + + +336  + #__GNU_LIBRARY__ + 6 + + ) + +340  + #__GLIBC__ + 2 + + ) + +341  + #__GLIBC_MINOR__ + 15 + + ) + +343  + #__GLIBC_PREREQ +( +maj +, +mš +) \ + +344 (( +__GLIBC__ + << 16è+ +__GLIBC_MINOR__ + >ð(( +maj +è<< 16è+ ( +mš +)) + + ) + +347 #ià +defšed + +__GNUC__ + \ + +348 || ( +defšed + + g__PGI + && defšed + g__i386__ + ) \ + +349 || ( +defšed + + g__INTEL_COMPILER + && (defšed + g__i386__ + || defšed + g__Ÿ64__ +)) \ + +350 || ( +defšed + + g__STDC_VERSION__ + && __STDC_VERSION__ >= 199901L) + +351  + #__GLIBC_HAVE_LONG_LONG + 1 + + ) + +355 #iâdeà +__ASSEMBLER__ + + +356 #iâdeà +_SYS_CDEFS_H + + +357  + ~ + +362 #ià +defšed + +__USE_FILE_OFFSET64 + && !defšed +__REDIRECT + + +363  + #__USE_LARGEFILE + 1 + + ) + +364  + #__USE_LARGEFILE64 + 1 + + ) + +370 #ià +__GNUC_PREREQ + (2, 7è&& +defšed + +__OPTIMIZE__ + \ + +371 && ! +defšed + + g__OPTIMIZE_SIZE__ + && !defšed + g__NO_INLINE__ + \ + +372 && +defšed + + g__ex‹º_šlše + + +373  + #__USE_EXTERN_INLINES + 1 + + ) + +378 #ià +__GNUC_PREREQ + (2, 7è&& +defšed + +__OPTIMIZE__ + \ + +379 && ( +defšed + + g_LIBC + || !defšed + g__OPTIMIZE_SIZE__ +è&& !defšed + g__NO_INLINE__ + \ + +380 && +defšed + + g__ex‹º_šlše + + +381  + #__USE_EXTERN_INLINES_IN_LIBC + 1 + + ) + +389  + ~ + + @/usr/include/getopt.h + +21 #iâdeà +_GETOPT_H + + +23 #iâdeà +__Ãed_g‘Ýt + + +24  + #_GETOPT_H + 1 + + ) + +34 #ià! +defšed + +__GNU_LIBRARY__ + + +35  + ~<ùy³.h +> + +38 #iâdeà +__THROW + + +39 #iâdeà +__GNUC_PREREQ + + +40  + #__GNUC_PREREQ +( +maj +, +mš +è(0) + + ) + +42 #ià +defšed + +__ýlu¥lus + && +__GNUC_PREREQ + (2,8) + +43  + #__THROW + + `throw + () + + ) + +45  + #__THROW + + + ) + +49 #ifdef +__ýlu¥lus + + +59 * +ݏrg +; + +73  +Ýtšd +; + +78  +݋¼ +; + +82  +ÝtÝt +; + +84 #iâdeà +__Ãed_g‘Ýt + + +106  + sÝtiÚ + + +108 cÚ¡ * + gÇme +; + +111  + ghas_¬g +; + +112 * + gæag +; + +113  + gv® +; + +118  + #no_¬gum’t + 0 + + ) + +119  + #»quœed_¬gum’t + 1 + + ) + +120  + #ÝtiÚ®_¬gum’t + 2 + + ) + +148 #ifdeà +__GNU_LIBRARY__ + + +152  +g‘Ýt + ( +___¬gc +, *cÚ¡ * +___¬gv +, cÚ¡ * +__shÜtÝts +) + +153 +__THROW +; + +155 #ià +defšed + +__Ãed_g‘Ýt + && defšed +__USE_POSIX2 + \ + +156 && ! +defšed + + g__USE_POSIX_IMPLICITLY + && !defšed + g__USE_GNU + + +160 #ifdeà +__REDIRECT + + +161  +__REDIRECT_NTH + ( +g‘Ýt +, ( +___¬gc +, *cÚ¡ * +___¬gv +, + +162 cÚ¡ * +__shÜtÝts +), + +163 +__posix_g‘Ýt +); + +165  +__posix_g‘Ýt + ( +___¬gc +, *cÚ¡ * +___¬gv +, + +166 cÚ¡ * +__shÜtÝts +è +__THROW +; + +167  + #g‘Ýt + +__posix_g‘Ýt + + + ) + +171  +g‘Ýt + (); + +174 #iâdeà +__Ãed_g‘Ýt + + +175  +g‘Ýt_lÚg + ( +___¬gc +, *cÚ¡ * +___¬gv +, + +176 cÚ¡ * +__shÜtÝts +, + +177 cÚ¡  +ÝtiÚ + * +__lÚgÝts +, * +__lÚgšd +) + +178 +__THROW +; + +179  +g‘Ýt_lÚg_Úly + ( +___¬gc +, *cÚ¡ * +___¬gv +, + +180 cÚ¡ * +__shÜtÝts +, + +181 cÚ¡  +ÝtiÚ + * +__lÚgÝts +, * +__lÚgšd +) + +182 +__THROW +; + +186 #ifdef +__ýlu¥lus + + +191 #undeà +__Ãed_g‘Ýt + + + @/usr/include/libio.h + +29 #iâdeà +_IO_STDIO_H + + +30  + #_IO_STDIO_H + + + ) + +32  + ~<_G_cÚfig.h +> + +34  + #_IO_pos_t + +_G_åos_t + + + ) + +35  + #_IO_åos_t + +_G_åos_t + + + ) + +36  + #_IO_åos64_t + +_G_åos64_t + + + ) + +37  + #_IO_size_t + +_G_size_t + + + ) + +38  + #_IO_ssize_t + +_G_ssize_t + + + ) + +39  + #_IO_off_t + +_G_off_t + + + ) + +40  + #_IO_off64_t + +_G_off64_t + + + ) + +41  + #_IO_pid_t + +_G_pid_t + + + ) + +42  + #_IO_uid_t + +_G_uid_t + + + ) + +43  + #_IO_icÚv_t + +_G_icÚv_t + + + ) + +44  + #_IO_HAVE_SYS_WAIT + +_G_HAVE_SYS_WAIT + + + ) + +45  + #_IO_HAVE_ST_BLKSIZE + +_G_HAVE_ST_BLKSIZE + + + ) + +46  + #_IO_BUFSIZ + +_G_BUFSIZ + + + ) + +47  + #_IO_va_li¡ + +_G_va_li¡ + + + ) + +48  + #_IO_wšt_t + +_G_wšt_t + + + ) + +50 #ifdeà +_G_NEED_STDARG_H + + +52  + #__Ãed___va_li¡ + + + ) + +53  + ~<¡d¬g.h +> + +54 #ifdeà +__GNUC_VA_LIST + + +55 #undeà +_IO_va_li¡ + + +56  + #_IO_va_li¡ + +__gnuc_va_li¡ + + + ) + +60 #iâdeà +__P + + +61 #ià +_G_HAVE_SYS_CDEFS + + +62  + ~ + +64 #ifdeà +__STDC__ + + +65  + #__P +( +p +è + ) +p + +66  + #__PMT +( +p +è + ) +p + +68  + #__P +( +p +è() + + ) + +69  + #__PMT +( +p +è() + + ) + +75 #iâdeà +_PARAMS + + +76  + #_PARAMS +( +´Ùos +è + `__P +ÕrÙos) + + ) + +79 #iâdeà +__STDC__ + + +81 cÚ¡ + + ) + +84  + #_IO_UNIFIED_JUMPTABLES + 1 + + ) + +85 #iâdeà +_G_HAVE_PRINTF_FP + + +86  + #_IO_USE_DTOA + 1 + + ) + +89 #iâdeà +EOF + + +90  + #EOF + (-1) + + ) + +92 #iâdeà +NULL + + +93 #ià +defšed + +__GNUG__ + && \ + +94 ( + g__GNUC__ + > 2 || (__GNUC__ =ð2 && +__GNUC_MINOR__ + >= 8)) + +95  + #NULL + ( +__nuÎ +) + + ) + +97 #ià! +defšed +( +__ýlu¥lus +) + +98  + #NULL + ((*)0) + + ) + +100  + #NULL + (0) + + ) + +105  + #_IOS_INPUT + 1 + + ) + +106  + #_IOS_OUTPUT + 2 + + ) + +107  + #_IOS_ATEND + 4 + + ) + +108  + #_IOS_APPEND + 8 + + ) + +109  + #_IOS_TRUNC + 16 + + ) + +110  + #_IOS_NOCREATE + 32 + + ) + +111  + #_IOS_NOREPLACE + 64 + + ) + +112  + #_IOS_BIN + 128 + + ) + +120  + #_IO_MAGIC + 0xFBAD0000 + + ) + +121  + #_OLD_STDIO_MAGIC + 0xFABC0000 + + ) + +122  + #_IO_MAGIC_MASK + 0xFFFF0000 + + ) + +123  + #_IO_USER_BUF + 1 + + ) + +124  + #_IO_UNBUFFERED + 2 + + ) + +125  + #_IO_NO_READS + 4 + + ) + +126  + #_IO_NO_WRITES + 8 + + ) + +127  + #_IO_EOF_SEEN + 0x10 + + ) + +128  + #_IO_ERR_SEEN + 0x20 + + ) + +129  + #_IO_DELETE_DONT_CLOSE + 0x40 + + ) + +130  + #_IO_LINKED + 0x80 + + ) + +131  + #_IO_IN_BACKUP + 0x100 + + ) + +132  + #_IO_LINE_BUF + 0x200 + + ) + +133  + #_IO_TIED_PUT_GET + 0x400 + + ) + +134  + #_IO_CURRENTLY_PUTTING + 0x800 + + ) + +135  + #_IO_IS_APPENDING + 0x1000 + + ) + +136  + #_IO_IS_FILEBUF + 0x2000 + + ) + +137  + #_IO_BAD_SEEN + 0x4000 + + ) + +138  + #_IO_USER_LOCK + 0x8000 + + ) + +140  + #_IO_FLAGS2_MMAP + 1 + + ) + +141  + #_IO_FLAGS2_NOTCANCEL + 2 + + ) + +142 #ifdeà +_LIBC + + +143  + #_IO_FLAGS2_FORTIFY + 4 + + ) + +145  + #_IO_FLAGS2_USER_WBUF + 8 + + ) + +146 #ifdeà +_LIBC + + +147  + #_IO_FLAGS2_SCANF_STD + 16 + + ) + +148  + #_IO_FLAGS2_NOCLOSE + 32 + + ) + +149  + #_IO_FLAGS2_CLOEXEC + 64 + + ) + +153  + #_IO_SKIPWS + 01 + + ) + +154  + #_IO_LEFT + 02 + + ) + +155  + #_IO_RIGHT + 04 + + ) + +156  + #_IO_INTERNAL + 010 + + ) + +157  + #_IO_DEC + 020 + + ) + +158  + #_IO_OCT + 040 + + ) + +159  + #_IO_HEX + 0100 + + ) + +160  + #_IO_SHOWBASE + 0200 + + ) + +161  + #_IO_SHOWPOINT + 0400 + + ) + +162  + #_IO_UPPERCASE + 01000 + + ) + +163  + #_IO_SHOWPOS + 02000 + + ) + +164  + #_IO_SCIENTIFIC + 04000 + + ) + +165  + #_IO_FIXED + 010000 + + ) + +166  + #_IO_UNITBUF + 020000 + + ) + +167  + #_IO_STDIO + 040000 + + ) + +168  + #_IO_DONT_CLOSE + 0100000 + + ) + +169  + #_IO_BOOLALPHA + 0200000 + + ) + +172  +_IO_jump_t +;  + g_IO_FILE +; + +175 #ifdeà +_IO_MTSAFE_IO + + +176 #ià +defšed + +__GLIBC__ + && __GLIBC__ >= 2 + +177  + ~ + +182  + t_IO_lock_t +; + +188  + s_IO_m¬k” + { + +189  +_IO_m¬k” + * + m_Ãxt +; + +190  +_IO_FILE + * + m_sbuf +; + +194  + m_pos +; + +196  +£t_¡»ampos +( +¡»ampos + +¥ +è{ + m_¥os + = sp; } + +197  +£t_off£t +( +off£t +è{ + m_pos + = off£t; + m_¥os + = ( +¡»ampos +)(-2); } + +198 + mpublic +: + +199 +¡»amm¬k” +( +¡»ambuf + * +sb +); + +200 ~ +¡»amm¬k” +(); + +201  +§všg +(è{  + m_¥os + == -2; } + +202  +d– +( +¡»amm¬k” +&); + +203  +d– +(); + +208 + e__codecvt_»suÉ + + +210 + m__codecvt_ok +, + +211 + m__codecvt_·¹Ÿl +, + +212 + m__codecvt_”rÜ +, + +213 + m__codecvt_nocÚv + + +216 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +219  + s_IO_codecvt + + +221 (* + m__codecvt_de¡r +è( + m_IO_codecvt + *); + +222 +__codecvt_»suÉ + (* +__codecvt_do_out +è( + m_IO_codecvt + *, + +223 + m__mb¡©e_t + *, + +224 cÚ¡ + mwch¬_t + *, + +225 cÚ¡ + mwch¬_t + *, + +226 cÚ¡ + mwch¬_t + **, *, + +228 +__codecvt_»suÉ + (* +__codecvt_do_unshiá +è( + m_IO_codecvt + *, + +229 + m__mb¡©e_t + *, *, + +231 +__codecvt_»suÉ + (* +__codecvt_do_š +è( + m_IO_codecvt + *, + +232 + m__mb¡©e_t + *, + +234 cÚ¡ **, + mwch¬_t + *, + +235 + mwch¬_t + *, wchar_t **); + +236 (* + m__codecvt_do_’codšg +è( + m_IO_codecvt + *); + +237 (* + m__codecvt_do_®ways_nocÚv +è( + m_IO_codecvt + *); + +238 (* + m__codecvt_do_Ëngth +è( + m_IO_codecvt + *, + m__mb¡©e_t + *, + +239 cÚ¡ *, cÚ¡ *, + m_IO_size_t +); + +240 (* + m__codecvt_do_max_Ëngth +è( + m_IO_codecvt + *); + +242 +_IO_icÚv_t + + m__cd_š +; + +243 +_IO_icÚv_t + + m__cd_out +; + +247  + s_IO_wide_d©a + + +249 +wch¬_t + * + m_IO_»ad_±r +; + +250 +wch¬_t + * + m_IO_»ad_’d +; + +251 +wch¬_t + * + m_IO_»ad_ba£ +; + +252 +wch¬_t + * + m_IO_wr™e_ba£ +; + +253 +wch¬_t + * + m_IO_wr™e_±r +; + +254 +wch¬_t + * + m_IO_wr™e_’d +; + +255 +wch¬_t + * + m_IO_buf_ba£ +; + +256 +wch¬_t + * + m_IO_buf_’d +; + +258 +wch¬_t + * + m_IO_§ve_ba£ +; + +259 +wch¬_t + * + m_IO_backup_ba£ +; + +261 +wch¬_t + * + m_IO_§ve_’d +; + +263 +__mb¡©e_t + + m_IO_¡©e +; + +264 +__mb¡©e_t + + m_IO_Ï¡_¡©e +; + +265  +_IO_codecvt + + m_codecvt +; + +267 +wch¬_t + + m_shÜtbuf +[1]; + +269 cÚ¡  +_IO_jump_t + * + m_wide_vbË +; + +273  + s_IO_FILE + { + +274  + m_æags +; + +275  + #_IO_fže_æags + +_æags + + + ) + +279 * + m_IO_»ad_±r +; + +280 * + m_IO_»ad_’d +; + +281 * + m_IO_»ad_ba£ +; + +282 * + m_IO_wr™e_ba£ +; + +283 * + m_IO_wr™e_±r +; + +284 * + m_IO_wr™e_’d +; + +285 * + m_IO_buf_ba£ +; + +286 * + m_IO_buf_’d +; + +288 * + m_IO_§ve_ba£ +; + +289 * + m_IO_backup_ba£ +; + +290 * + m_IO_§ve_’d +; + +292  +_IO_m¬k” + * + m_m¬k”s +; + +294  +_IO_FILE + * + m_chaš +; + +296  + m_fž’o +; + +298  + m_blksize +; + +300  + m_æags2 +; + +302 +_IO_off_t + + m_Þd_off£t +; + +304  + #__HAVE_COLUMN + + + ) + +306  + m_cur_cÞumn +; + +307 sigÃd  + m_vbË_off£t +; + +308  + m_shÜtbuf +[1]; + +312 +_IO_lock_t + * + m_lock +; + +313 #ifdeà +_IO_USE_OLD_IO_FILE + + +316  + s_IO_FILE_com¶‘e + + +318  +_IO_FILE + + m_fže +; + +320 #ià +defšed + +_G_IO_IO_FILE_VERSION + && _G_IO_IO_FILE_VERSION == 0x20001 + +321 +_IO_off64_t + + m_off£t +; + +322 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +324  +_IO_codecvt + * + m_codecvt +; + +325  +_IO_wide_d©a + * + m_wide_d©a +; + +326  +_IO_FILE + * + m_䓻s_li¡ +; + +327 * + m_䓻s_buf +; + +328 +size_t + + m_䓻s_size +; + +330 * + m__·d1 +; + +331 * + m__·d2 +; + +332 * + m__·d3 +; + +333 * + m__·d4 +; + +334 +size_t + + m__·d5 +; + +336  + m_mode +; + +338  + m_unu£d2 +[15 *  (è- 4 *  (*è-  ( +size_t +)]; + +342 #iâdeà +__ýlu¥lus + + +343  +_IO_FILE + + t_IO_FILE +; + +346  + g_IO_FILE_¶us +; + +348  +_IO_FILE_¶us + +_IO_2_1_¡dš_ +; + +349  +_IO_FILE_¶us + +_IO_2_1_¡dout_ +; + +350  +_IO_FILE_¶us + +_IO_2_1_¡d”r_ +; + +351 #iâdeà +_LIBC + + +352  + #_IO_¡dš + (( +_IO_FILE +*)(& +_IO_2_1_¡dš_ +)) + + ) + +353  + #_IO_¡dout + (( +_IO_FILE +*)(& +_IO_2_1_¡dout_ +)) + + ) + +354  + #_IO_¡d”r + (( +_IO_FILE +*)(& +_IO_2_1_¡d”r_ +)) + + ) + +356 +_IO_FILE + * +_IO_¡dš + +©Œibu‹_hidd’ +; + +357 +_IO_FILE + * +_IO_¡dout + +©Œibu‹_hidd’ +; + +358 +_IO_FILE + * +_IO_¡d”r + +©Œibu‹_hidd’ +; + +366  +__ssize_t + + t__io_»ad_â + (* + t__cook› +, * + t__buf +, + tsize_t + + t__nby‹s +); + +374  +__ssize_t + + t__io_wr™e_â + (* + t__cook› +, + t__cÚ¡ + * + t__buf +, + +375 + tsize_t + + t__n +); + +383  + t__io_£ek_â + (* + t__cook› +, + t_IO_off64_t + * + t__pos +,  + t__w +); + +386  + t__io_þo£_â + (* + t__cook› +); + +389 #ifdeà +_GNU_SOURCE + + +391  +__io_»ad_â + + tcook›_»ad_funùiÚ_t +; + +392  +__io_wr™e_â + + tcook›_wr™e_funùiÚ_t +; + +393  +__io_£ek_â + + tcook›_£ek_funùiÚ_t +; + +394  +__io_þo£_â + + tcook›_þo£_funùiÚ_t +; + +399 +__io_»ad_â + * + m»ad +; + +400 +__io_wr™e_â + * + mwr™e +; + +401 +__io_£ek_â + * + m£ek +; + +402 +__io_þo£_â + * + mþo£ +; + +403 } + t_IO_cook›_io_funùiÚs_t +; + +404  +_IO_cook›_io_funùiÚs_t + + tcook›_io_funùiÚs_t +; + +406  + g_IO_cook›_fže +; + +409  +_IO_cook›_š™ + ( +_IO_cook›_fže + * +__cfže +,  +__»ad_wr™e +, + +410 * +__cook› +, +_IO_cook›_io_funùiÚs_t + +__âs +); + +414 #ifdeà +__ýlu¥lus + + +418  +__und”æow + ( +_IO_FILE + *); + +419  +__uæow + ( +_IO_FILE + *); + +420  +__ov”æow + ( +_IO_FILE + *, ); + +421 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +422 +_IO_wšt_t + +__wund”æow + ( +_IO_FILE + *); + +423 +_IO_wšt_t + +__wuæow + ( +_IO_FILE + *); + +424 +_IO_wšt_t + +__wov”æow + ( +_IO_FILE + *, _IO_wint_t); + +427 #ià +__GNUC__ + >= 3 + +428  + #_IO_BE +( +ex´ +, +»s +è + `__bužtš_ex³ù + (Óx´),„es) + + ) + +430  + #_IO_BE +( +ex´ +, +»s +èÓx´) + + ) + +433  + #_IO_g‘c_uÆocked +( +_å +) \ + +434 ( + `_IO_BE + (( +_å +)-> +_IO_»ad_±r + >ð(_å)-> +_IO_»ad_’d +, 0) \ + +435 ? + `__uæow + ( +_å +è: *(*è(_å)-> +_IO_»ad_±r +++) + + ) + +436  + #_IO_³ekc_uÆocked +( +_å +) \ + +437 ( + `_IO_BE + (( +_å +)-> +_IO_»ad_±r + >ð(_å)-> +_IO_»ad_’d +, 0) \ + +438 && + `__und”æow + ( +_å +è=ð +EOF + ? EOF \ + +439 : *(*è( +_å +)-> +_IO_»ad_±r +) + + ) + +440  + #_IO_putc_uÆocked +( +_ch +, +_å +) \ + +441 ( + `_IO_BE + (( +_å +)-> +_IO_wr™e_±r + >ð(_å)-> +_IO_wr™e_’d +, 0) \ + +442 ? + `__ov”æow + ( +_å +, (è( +_ch +)) \ + +443 : (è(*( +_å +)-> +_IO_wr™e_±r +++ = ( +_ch +))) + + ) + +445 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +446  + #_IO_g‘wc_uÆocked +( +_å +) \ + +447 ( + `_IO_BE + (( +_å +)-> +_wide_d©a + =ð +NULL + \ + +448 || (( +_å +)-> +_wide_d©a +-> +_IO_»ad_±r + \ + +449 >ð( +_å +)-> +_wide_d©a +-> +_IO_»ad_’d +), 0) \ + +450 ? + `__wuæow + ( +_å +è: ( +_IO_wšt_t +è*(_å)-> +_wide_d©a +-> +_IO_»ad_±r +++) + + ) + +451  + #_IO_putwc_uÆocked +( +_wch +, +_å +) \ + +452 ( + `_IO_BE + (( +_å +)-> +_wide_d©a + =ð +NULL + \ + +453 || (( +_å +)-> +_wide_d©a +-> +_IO_wr™e_±r + \ + +454 >ð( +_å +)-> +_wide_d©a +-> +_IO_wr™e_’d +), 0) \ + +455 ? + `__wov”æow + ( +_å +, +_wch +) \ + +456 : ( +_IO_wšt_t +è(*( +_å +)-> +_wide_d©a +-> +_IO_wr™e_±r +++ = ( +_wch +))) + + ) + +459  + #_IO_ãof_uÆocked +( +__å +è(((__å)-> +_æags + & +_IO_EOF_SEEN +è!ð0) + + ) + +460  + #_IO_ã¼Ü_uÆocked +( +__å +è(((__å)-> +_æags + & +_IO_ERR_SEEN +è!ð0) + + ) + +462  +_IO_g‘c + ( +_IO_FILE + * +__å +); + +463  +_IO_putc + ( +__c +, +_IO_FILE + * +__å +); + +464  +_IO_ãof + ( +_IO_FILE + * +__å +è +__THROW +; + +465  +_IO_ã¼Ü + ( +_IO_FILE + * +__å +è +__THROW +; + +467  +_IO_³ekc_locked + ( +_IO_FILE + * +__å +); + +470  + #_IO_PENDING_OUTPUT_COUNT +( +_å +) \ + +471 (( +_å +)-> +_IO_wr™e_±r + - (_å)-> +_IO_wr™e_ba£ +) + + ) + +473  +_IO_æockfže + ( +_IO_FILE + *è +__THROW +; + +474  +_IO_fuÆockfže + ( +_IO_FILE + *è +__THROW +; + +475  +_IO_árylockfže + ( +_IO_FILE + *è +__THROW +; + +477 #ifdeà +_IO_MTSAFE_IO + + +478  + #_IO_³ekc +( +_å +è + `_IO_³ekc_locked + (_å) + + ) + +479  + #_IO_æockfže +( +_å +) \ + +480 ià((( +_å +)-> +_æags + & +_IO_USER_LOCK +è=ð0è + `_IO_æockfže + (_å) + + ) + +481  + #_IO_fuÆockfže +( +_å +) \ + +482 ià((( +_å +)-> +_æags + & +_IO_USER_LOCK +è=ð0è + `_IO_fuÆockfže + (_å) + + ) + +484  + #_IO_³ekc +( +_å +è + `_IO_³ekc_uÆocked + (_å) + + ) + +485  + #_IO_æockfže +( +_å +è + + ) + +486  + #_IO_fuÆockfže +( +_å +è + + ) + +487  + #_IO_árylockfže +( +_å +è + + ) + +488  + #_IO_þ—nup_»giÚ_¡¬t +( +_fù +, +_å +è + + ) + +489  + #_IO_þ—nup_»giÚ_’d +( +_Do™ +è + + ) + +492  +_IO_vfsÿnf + ( +_IO_FILE + * +__»¡riù +, const * __restrict, + +493 +_IO_va_li¡ +, * +__»¡riù +); + +494  +_IO_vårštf + ( +_IO_FILE + * +__»¡riù +, const *__restrict, + +495 +_IO_va_li¡ +); + +496 +_IO_ssize_t + +_IO_·dn + ( +_IO_FILE + *, , _IO_ssize_t); + +497 +_IO_size_t + +_IO_sg‘n + ( +_IO_FILE + *, *, _IO_size_t); + +499 +_IO_off64_t + +_IO_£ekoff + ( +_IO_FILE + *, _IO_off64_t, , ); + +500 +_IO_off64_t + +_IO_£ekpos + ( +_IO_FILE + *, _IO_off64_t, ); + +502  +_IO_ä“_backup_¬— + ( +_IO_FILE + *è +__THROW +; + +504 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +505 +_IO_wšt_t + +_IO_g‘wc + ( +_IO_FILE + * +__å +); + +506 +_IO_wšt_t + +_IO_putwc + ( +wch¬_t + +__wc +, +_IO_FILE + * +__å +); + +507  +_IO_fwide + ( +_IO_FILE + * +__å +,  +__mode +è +__THROW +; + +508 #ià +__GNUC__ + >= 2 + +511 #ià +defšed + +_LIBC + && defšed +SHARED + + +512  + ~ + +513 #ià +SHLIB_COMPAT + ( +libc +, +GLIBC_2_0 +, +GLIBC_2_1 +) + +514  + #_IO_fwide_maybe_šcom·tibË + \ + +515 ( + `__bužtš_ex³ù + (& +_IO_¡dš_u£d + =ð +NULL +, 0)) + + ) + +516 cÚ¡  +_IO_¡dš_u£d +; + +517 +w—k_ex‹º + ( +_IO_¡dš_u£d +); + +520 #iâdeà +_IO_fwide_maybe_šcom·tibË + + +521  + #_IO_fwide_maybe_šcom·tibË + (0) + + ) + +525  + #_IO_fwide +( +__å +, +__mode +) \ + +526 ({  +__»suÉ + = ( +__mode +); \ + +527 ià( +__»suÉ + < 0 && ! +_IO_fwide_maybe_šcom·tibË +) \ + +529 ià(( +__å +)-> +_mode + == 0) \ + +531 ( +__å +)-> +_mode + = -1; \ + +532 +__»suÉ + = ( +__å +)-> +_mode +; \ + +534 ià( + `__bužtš_cÚ¡ªt_p + ( +__mode +) && (__mode) == 0) \ + +535 +__»suÉ + = +_IO_fwide_maybe_šcom·tibË + ? -1 : ( +__å +)-> +_mode +; \ + +537 +__»suÉ + = + `_IO_fwide + ( +__å +, __result); \ + +538 +__»suÉ +; }) + + ) + +541  +_IO_vfwsÿnf + ( +_IO_FILE + * +__»¡riù +, cÚ¡ +wch¬_t + * __restrict, + +542 +_IO_va_li¡ +, * +__»¡riù +); + +543  +_IO_vfw´štf + ( +_IO_FILE + * +__»¡riù +, cÚ¡ +wch¬_t + *__restrict, + +544 +_IO_va_li¡ +); + +545 +_IO_ssize_t + +_IO_w·dn + ( +_IO_FILE + *, +wšt_t +, _IO_ssize_t); + +546  +_IO_ä“_wbackup_¬— + ( +_IO_FILE + *è +__THROW +; + +549 #ifdeà +__LDBL_COMPAT + + +550  + ~ + +553 #ifdeà +__ýlu¥lus + + + @/usr/include/_G_config.h + +4 #iâdeà +_G_cÚfig_h + + +5  + #_G_cÚfig_h + 1 + + ) + +9  + ~ + +10  + #__Ãed_size_t + + + ) + +11 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +12  + #__Ãed_wch¬_t + + + ) + +14  + #__Ãed_NULL + + + ) + +15  + ~<¡ddef.h +> + +16  + #__Ãed_mb¡©e_t + + + ) + +17 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +18  + #__Ãed_wšt_t + + + ) + +20  + ~ + +21  + #_G_size_t + +size_t + + + ) + +24 +__off_t + + m__pos +; + +25 +__mb¡©e_t + + m__¡©e +; + +26 } + t_G_åos_t +; + +29 +__off64_t + + m__pos +; + +30 +__mb¡©e_t + + m__¡©e +; + +31 } + t_G_åos64_t +; + +32  + #_G_ssize_t + +__ssize_t + + + ) + +33  + #_G_off_t + +__off_t + + + ) + +34  + #_G_off64_t + +__off64_t + + + ) + +35  + #_G_pid_t + +__pid_t + + + ) + +36  + #_G_uid_t + +__uid_t + + + ) + +37  + #_G_wch¬_t + +wch¬_t + + + ) + +38  + #_G_wšt_t + +wšt_t + + + ) + +39  + #_G_¡©64 + +¡©64 + + + ) + +40 #ià +defšed + +_LIBC + || defšed +_GLIBCPP_USE_WCHAR_T + + +41  + ~ + +44  +__gcÚv_šfo + + m__cd +; + +47  +__gcÚv_šfo + + m__cd +; + +48  +__gcÚv_¡•_d©a + + m__d©a +; + +49 } + m__combšed +; + +50 } + t_G_icÚv_t +; + +53  + t_G_št16_t + + t__©Œibu‹__ + (( + t__mode__ + ( + t__HI__ +))); + +54  + t_G_št32_t + + t__©Œibu‹__ + (( + t__mode__ + ( + t__SI__ +))); + +55  + t_G_ušt16_t + + t__©Œibu‹__ + (( + t__mode__ + ( + t__HI__ +))); + +56  + t_G_ušt32_t + + t__©Œibu‹__ + (( + t__mode__ + ( + t__SI__ +))); + +58  + #_G_HAVE_BOOL + 1 + + ) + +62  + #_G_HAVE_ATEXIT + 1 + + ) + +63  + #_G_HAVE_SYS_CDEFS + 1 + + ) + +64  + #_G_HAVE_SYS_WAIT + 1 + + ) + +65  + #_G_NEED_STDARG_H + 1 + + ) + +66  + #_G_va_li¡ + +__gnuc_va_li¡ + + + ) + +68  + #_G_HAVE_PRINTF_FP + 1 + + ) + +69  + #_G_HAVE_MMAP + 1 + + ) + +70  + #_G_HAVE_MREMAP + 1 + + ) + +71  + #_G_HAVE_LONG_DOUBLE_IO + 1 + + ) + +72  + #_G_HAVE_IO_FILE_OPEN + 1 + + ) + +73  + #_G_HAVE_IO_GETLINE_INFO + 1 + + ) + +75  + #_G_IO_IO_FILE_VERSION + 0x20001 + + ) + +77  + #_G_OPEN64 + +__ݒ64 + + + ) + +78  + #_G_LSEEK64 + +__l£ek64 + + + ) + +79  + #_G_MMAP64 + +__mm­64 + + + ) + +80  + #_G_FSTAT64 +( +fd +, +buf +è + `__fx¡©64 + ( +_STAT_VER +, fd, buf) + + ) + +83  + #_G_HAVE_ST_BLKSIZE + + `defšed + ( +_STATBUF_ST_BLKSIZE +) + + ) + +85  + #_G_BUFSIZ + 8192 + + ) + +88  + #_G_NAMES_HAVE_UNDERSCORE + 0 + + ) + +89  + #_G_VTABLE_LABEL_HAS_LENGTH + 1 + + ) + +90  + #_G_USING_THUNKS + 1 + + ) + +91  + #_G_VTABLE_LABEL_PREFIX + "__vt_" + + ) + +92  + #_G_VTABLE_LABEL_PREFIX_ID + +__vt_ + + + ) + +95 #ià +defšed + +__ýlu¥lus + || defšed +__STDC__ + + +96  + #_G_ARGS +( +ARGLIST +è + ) +ARGLIST + +98  + #_G_ARGS +( +ARGLIST +è() + + ) + + @/usr/include/ctype.h + +24 #iâdef +_CTYPE_H + + +25  + #_CTYPE_H + 1 + + ) + +27  + ~<ã©u»s.h +> + +28  + ~ + +30 + g__BEGIN_DECLS + + +32 #iâdeà +_ISb™ + + +41  + ~<’dŸn.h +> + +42 #ià +__BYTE_ORDER + =ð +__BIG_ENDIAN + + +43  + #_ISb™ +( +b™ +è(1 << (b™)) + + ) + +45  + #_ISb™ +( +b™ +è((b™è< 8 ? ((1 << (b™)è<< 8è: ((1 << (b™)è>> 8)) + + ) + +50 + m_ISuµ” + = +_ISb™ + (0), + +51 + m_ISlow” + = +_ISb™ + (1), + +52 + m_IS®pha + = +_ISb™ + (2), + +53 + m_ISdig™ + = +_ISb™ + (3), + +54 + m_ISxdig™ + = +_ISb™ + (4), + +55 + m_IS¥aû + = +_ISb™ + (5), + +56 + m_IS´št + = +_ISb™ + (6), + +57 + m_ISg¿ph + = +_ISb™ + (7), + +58 + m_ISbÏnk + = +_ISb™ + (8), + +59 + m_ISúŒl + = +_ISb™ + (9), + +60 + m_ISpunù + = +_ISb™ + (10), + +61 + m_IS®num + = +_ISb™ + (11) + +81 +__cÚ¡ + ** + $__ùy³_b_loc + () + +82 +__THROW + + `__©Œibu‹__ + (( +__cÚ¡ +)); + +83 +__cÚ¡ + +__št32_t + ** + $__ùy³_tÞow”_loc + () + +84 +__THROW + + `__©Œibu‹__ + (( +__cÚ¡ +)); + +85 +__cÚ¡ + +__št32_t + ** + $__ùy³_touµ”_loc + () + +86 +__THROW + + `__©Œibu‹__ + (( +__cÚ¡ +)); + +89 #iâdeà +__ýlu¥lus + + +90  + #__isùy³ +( +c +, +ty³ +) \ + +91 ((* + `__ùy³_b_loc + ())[(è( +c +)] & (è +ty³ +) + + ) + +92 #–ià +defšed + +__USE_EXTERN_INLINES + + +93  + #__isùy³_f +( +ty³ +) \ + +94 +__ex‹º_šlše + \ + +95 +is +## + `ty³ + ( +__c +è +__THROW + \ + +97  (* + `__ùy³_b_loc + ())[(è( +__c +)] & (è +_IS +## +ty³ +; \ + +98 + } + + ) +} + +101  + #__i§scii +( +c +è(((cè& ~0x7fè=ð0è + + ) + +102  + #__tßscii +( +c +è((cè& 0x7fè + + ) + +104  + #__exùy³ +( +Çme +è  + `Çme + (è +__THROW + + + ) + +106 +__BEGIN_NAMESPACE_STD + + +112 +__exùy³ + ( +i§Êum +); + +113 +__exùy³ + ( +i§Íha +); + +114 +__exùy³ + ( +isúŒl +); + +115 +__exùy³ + ( +isdig™ +); + +116 +__exùy³ + ( +i¦ow” +); + +117 +__exùy³ + ( +isg¿ph +); + +118 +__exùy³ + ( +i¥ršt +); + +119 +__exùy³ + ( +i¥unù +); + +120 +__exùy³ + ( +is¥aû +); + +121 +__exùy³ + ( +isuµ” +); + +122 +__exùy³ + ( +isxdig™ +); + +126  + $tÞow” + ( +__c +è +__THROW +; + +129  + $touµ” + ( +__c +è +__THROW +; + +131 +__END_NAMESPACE_STD + + +135 #ifdef +__USE_ISOC99 + + +136 +__BEGIN_NAMESPACE_C99 + + +138 + `__exùy³ + ( +isbÏnk +); + +140 +__END_NAMESPACE_C99 + + +143 #ifdeà +__USE_GNU + + +145  + $isùy³ + ( +__c +,  +__mask +è +__THROW +; + +148 #ià +defšed + +__USE_SVID + || defšed +__USE_MISC + || defšed +__USE_XOPEN + + +152  + $i§scii + ( +__c +è +__THROW +; + +156  + $tßscii + ( +__c +è +__THROW +; + +160 + `__exùy³ + ( +_touµ” +); + +161 + `__exùy³ + ( +_tÞow” +); + +165  + #__tobody +( +c +, +f +, +a +, +¬gs +) \ + +166 ( +__ex‹nsiÚ__ + \ + +167 ({  +__»s +; \ + +168 ià( ( +c +) > 1) \ + +170 ià( + `__bužtš_cÚ¡ªt_p + ( +c +)) \ + +172  +__c + = ( +c +); \ + +173 +__»s + = +__c + < -128 || __ø> 255 ? __ø: ( +a +)[__c]; \ + +176 +__»s + = +f + +¬gs +; \ + +179 +__»s + = ( +a +)[(è( +c +)]; \ + +180 +__»s +; + } +})) + + ) + +182 #ià! +defšed + +__NO_CTYPE + + +183 #ifdeà +__isùy³_f + + +184 + $__isùy³_f + ( +®num +) + +185 + $__isùy³_f + ( +®pha +) + +186 + $__isùy³_f + ( +úŒl +) + +187 + $__isùy³_f + ( +dig™ +) + +188 + $__isùy³_f + ( +low” +) + +189 + $__isùy³_f + ( +g¿ph +) + +190 + $__isùy³_f + ( +´št +) + +191 + $__isùy³_f + ( +punù +) + +192 + $__isùy³_f + ( +¥aû +) + +193 + $__isùy³_f + ( +uµ” +) + +194 + $__isùy³_f + ( +xdig™ +) + +195 #ifdeà +__USE_ISOC99 + + +196 + $__isùy³_f + ( +bÏnk +) + +198 #–ià +defšed + +__isùy³ + + +199  + #i§Êum +( +c +è + `__isùy³ +((c), +_IS®num +) + + ) + +200  + #i§Íha +( +c +è + `__isùy³ +((c), +_IS®pha +) + + ) + +201  + #isúŒl +( +c +è + `__isùy³ +((c), +_ISúŒl +) + + ) + +202  + #isdig™ +( +c +è + `__isùy³ +((c), +_ISdig™ +) + + ) + +203  + #i¦ow” +( +c +è + `__isùy³ +((c), +_ISlow” +) + + ) + +204  + #isg¿ph +( +c +è + `__isùy³ +((c), +_ISg¿ph +) + + ) + +205  + #i¥ršt +( +c +è + `__isùy³ +((c), +_IS´št +) + + ) + +206  + #i¥unù +( +c +è + `__isùy³ +((c), +_ISpunù +) + + ) + +207  + #is¥aû +( +c +è + `__isùy³ +((c), +_IS¥aû +) + + ) + +208  + #isuµ” +( +c +è + `__isùy³ +((c), +_ISuµ” +) + + ) + +209  + #isxdig™ +( +c +è + `__isùy³ +((c), +_ISxdig™ +) + + ) + +210 #ifdeà +__USE_ISOC99 + + +211  + #isbÏnk +( +c +è + `__isùy³ +((c), +_ISbÏnk +) + + ) + +215 #ifdeà +__USE_EXTERN_INLINES + + +216 +__ex‹º_šlše +  + +217 + `__NTH + ( + $tÞow” + ( +__c +)) + +219  +__c + >ð-128 && __ø< 256 ? (* + `__ùy³_tÞow”_loc + ())[__c] : __c; + +220 + } +} + +222 +__ex‹º_šlše +  + +223 +__NTH + ( + $touµ” + ( +__c +)) + +225  +__c + >ð-128 && __ø< 256 ? (* + `__ùy³_touµ”_loc + ())[__c] : __c; + +226 + } +} + +229 #ià +__GNUC__ + >ð2 && +defšed + +__OPTIMIZE__ + && !defšed +__ýlu¥lus + + +230  + #tÞow” +( +c +è + `__tobody + (c, +tÞow” +, * + `__ùy³_tÞow”_loc + (), (c)) + + ) + +231  + #touµ” +( +c +è + `__tobody + (c, +touµ” +, * + `__ùy³_touµ”_loc + (), (c)) + + ) + +234 #ià +defšed + +__USE_SVID + || defšed +__USE_MISC + || defšed +__USE_XOPEN + + +235  + #i§scii +( +c +è + `__i§scii + (c) + + ) + +236  + #tßscii +( +c +è + `__tßscii + (c) + + ) + +238  + #_tÞow” +( +c +è((è(* + `__ùy³_tÞow”_loc + ())[(è(c)]) + + ) + +239  + #_touµ” +( +c +è((è(* + `__ùy³_touµ”_loc + ())[(è(c)]) + + ) + +245 #ifdeà +__USE_XOPEN2K8 + + +259  + ~ + +263  + #__isùy³_l +( +c +, +ty³ +, +loÿË +) \ + +264 (( +loÿË +)-> +__ùy³_b +[(è( +c +)] & (è +ty³ +) + + ) + +266  + #__exùy³_l +( +Çme +) \ + +267  + `Çme + (, +__loÿË_t +è +__THROW + + + ) + +273 +__exùy³_l + ( +i§Êum_l +); + +274 +__exùy³_l + ( +i§Íha_l +); + +275 +__exùy³_l + ( +isúŒl_l +); + +276 +__exùy³_l + ( +isdig™_l +); + +277 +__exùy³_l + ( +i¦ow”_l +); + +278 +__exùy³_l + ( +isg¿ph_l +); + +279 +__exùy³_l + ( +i¥ršt_l +); + +280 +__exùy³_l + ( +i¥unù_l +); + +281 +__exùy³_l + ( +is¥aû_l +); + +282 +__exùy³_l + ( +isuµ”_l +); + +283 +__exùy³_l + ( +isxdig™_l +); + +285 +__exùy³_l + ( +isbÏnk_l +); + +289  + $__tÞow”_l + ( +__c +, +__loÿË_t + +__l +è +__THROW +; + +290  + $tÞow”_l + ( +__c +, +__loÿË_t + +__l +è +__THROW +; + +293  + $__touµ”_l + ( +__c +, +__loÿË_t + +__l +è +__THROW +; + +294  + $touµ”_l + ( +__c +, +__loÿË_t + +__l +è +__THROW +; + +296 #ià +__GNUC__ + >ð2 && +defšed + +__OPTIMIZE__ + && !defšed +__ýlu¥lus + + +297  + #__tÞow”_l +( +c +, +loÿË +) \ + +298 + `__tobody + ( +c +, +__tÞow”_l +, ( +loÿË +)-> +__ùy³_tÞow” +, (c,†oÿË)) + + ) + +299  + #__touµ”_l +( +c +, +loÿË +) \ + +300 + `__tobody + ( +c +, +__touµ”_l +, ( +loÿË +)-> +__ùy³_touµ” +, (c,†oÿË)) + + ) + +301  + #tÞow”_l +( +c +, +loÿË +è + `__tÞow”_l + ((c), (loÿË)) + + ) + +302  + #touµ”_l +( +c +, +loÿË +è + `__touµ”_l + ((c), (loÿË)) + + ) + +306 #iâdeà +__NO_CTYPE + + +307  + #__i§Êum_l +( +c +, +l +è + `__isùy³_l +((c), +_IS®num +, (l)) + + ) + +308  + #__i§Íha_l +( +c +, +l +è + `__isùy³_l +((c), +_IS®pha +, (l)) + + ) + +309  + #__isúŒl_l +( +c +, +l +è + `__isùy³_l +((c), +_ISúŒl +, (l)) + + ) + +310  + #__isdig™_l +( +c +, +l +è + `__isùy³_l +((c), +_ISdig™ +, (l)) + + ) + +311  + #__i¦ow”_l +( +c +, +l +è + `__isùy³_l +((c), +_ISlow” +, (l)) + + ) + +312  + #__isg¿ph_l +( +c +, +l +è + `__isùy³_l +((c), +_ISg¿ph +, (l)) + + ) + +313  + #__i¥ršt_l +( +c +, +l +è + `__isùy³_l +((c), +_IS´št +, (l)) + + ) + +314  + #__i¥unù_l +( +c +, +l +è + `__isùy³_l +((c), +_ISpunù +, (l)) + + ) + +315  + #__is¥aû_l +( +c +, +l +è + `__isùy³_l +((c), +_IS¥aû +, (l)) + + ) + +316  + #__isuµ”_l +( +c +, +l +è + `__isùy³_l +((c), +_ISuµ” +, (l)) + + ) + +317  + #__isxdig™_l +( +c +, +l +è + `__isùy³_l +((c), +_ISxdig™ +, (l)) + + ) + +319  + #__isbÏnk_l +( +c +, +l +è + `__isùy³_l +((c), +_ISbÏnk +, (l)) + + ) + +321 #ià +defšed + +__USE_SVID + || defšed +__USE_MISC + + +322  + #__i§scii_l +( +c +, +l +è(Ö), + `__i§scii + (c)) + + ) + +323  + #__tßscii_l +( +c +, +l +è(Ö), + `__tßscii + (c)) + + ) + +326  + #i§Êum_l +( +c +, +l +è + `__i§Êum_l + ((c), (l)) + + ) + +327  + #i§Íha_l +( +c +, +l +è + `__i§Íha_l + ((c), (l)) + + ) + +328  + #isúŒl_l +( +c +, +l +è + `__isúŒl_l + ((c), (l)) + + ) + +329  + #isdig™_l +( +c +, +l +è + `__isdig™_l + ((c), (l)) + + ) + +330  + #i¦ow”_l +( +c +, +l +è + `__i¦ow”_l + ((c), (l)) + + ) + +331  + #isg¿ph_l +( +c +, +l +è + `__isg¿ph_l + ((c), (l)) + + ) + +332  + #i¥ršt_l +( +c +, +l +è + `__i¥ršt_l + ((c), (l)) + + ) + +333  + #i¥unù_l +( +c +, +l +è + `__i¥unù_l + ((c), (l)) + + ) + +334  + #is¥aû_l +( +c +, +l +è + `__is¥aû_l + ((c), (l)) + + ) + +335  + #isuµ”_l +( +c +, +l +è + `__isuµ”_l + ((c), (l)) + + ) + +336  + #isxdig™_l +( +c +, +l +è + `__isxdig™_l + ((c), (l)) + + ) + +338  + #isbÏnk_l +( +c +, +l +è + `__isbÏnk_l + ((c), (l)) + + ) + +340 #ià +defšed + +__USE_SVID + || defšed +__USE_MISC + + +341  + #i§scii_l +( +c +, +l +è + `__i§scii_l + ((c), (l)) + + ) + +342  + #tßscii_l +( +c +, +l +è + `__tßscii_l + ((c), (l)) + + ) + +349 +__END_DECLS + + + @/usr/include/endian.h + +19 #iâdef +_ENDIAN_H + + +20  + #_ENDIAN_H + 1 + + ) + +22  + ~<ã©u»s.h +> + +32  + #__LITTLE_ENDIAN + 1234 + + ) + +33  + #__BIG_ENDIAN + 4321 + + ) + +34  + #__PDP_ENDIAN + 3412 + + ) + +37  + ~ + +41 #iâdeà +__FLOAT_WORD_ORDER + + +42  + #__FLOAT_WORD_ORDER + +__BYTE_ORDER + + + ) + +45 #ifdef +__USE_BSD + + +46  + #LITTLE_ENDIAN + +__LITTLE_ENDIAN + + + ) + +47  + #BIG_ENDIAN + +__BIG_ENDIAN + + + ) + +48  + #PDP_ENDIAN + +__PDP_ENDIAN + + + ) + +49  + #BYTE_ORDER + +__BYTE_ORDER + + + ) + +52 #ià +__BYTE_ORDER + =ð +__LITTLE_ENDIAN + + +53  + #__LONG_LONG_PAIR +( +HI +, +LO +èLO, + ) +HI + +54 #–ià +__BYTE_ORDER + =ð +__BIG_ENDIAN + + +55  + #__LONG_LONG_PAIR +( +HI +, +LO +èHI, + ) +LO + +59 #ifdeà +__USE_BSD + + +61  + ~ + +63 #ià +__BYTE_ORDER + =ð +__LITTLE_ENDIAN + + +64  + #htobe16 +( +x +è + `__bsw­_16 + (x) + + ) + +65  + #htÞe16 +( +x +è(x) + + ) + +66  + #be16toh +( +x +è + `__bsw­_16 + (x) + + ) + +67  + #Ë16toh +( +x +è(x) + + ) + +69  + #htobe32 +( +x +è + `__bsw­_32 + (x) + + ) + +70  + #htÞe32 +( +x +è(x) + + ) + +71  + #be32toh +( +x +è + `__bsw­_32 + (x) + + ) + +72  + #Ë32toh +( +x +è(x) + + ) + +74  + #htobe64 +( +x +è + `__bsw­_64 + (x) + + ) + +75  + #htÞe64 +( +x +è(x) + + ) + +76  + #be64toh +( +x +è + `__bsw­_64 + (x) + + ) + +77  + #Ë64toh +( +x +è(x) + + ) + +79  + #htobe16 +( +x +è(x) + + ) + +80  + #htÞe16 +( +x +è + `__bsw­_16 + (x) + + ) + +81  + #be16toh +( +x +è(x) + + ) + +82  + #Ë16toh +( +x +è + `__bsw­_16 + (x) + + ) + +84  + #htobe32 +( +x +è(x) + + ) + +85  + #htÞe32 +( +x +è + `__bsw­_32 + (x) + + ) + +86  + #be32toh +( +x +è(x) + + ) + +87  + #Ë32toh +( +x +è + `__bsw­_32 + (x) + + ) + +89  + #htobe64 +( +x +è(x) + + ) + +90  + #htÞe64 +( +x +è + `__bsw­_64 + (x) + + ) + +91  + #be64toh +( +x +è(x) + + ) + +92  + #Ë64toh +( +x +è + `__bsw­_64 + (x) + + ) + + @/usr/include/gconv.h + +23 #iâdeà +_GCONV_H + + +24  + #_GCONV_H + 1 + + ) + +26  + ~<ã©u»s.h +> + +27  + #__Ãed_mb¡©e_t + + + ) + +28  + #__Ãed_wšt_t + + + ) + +29  + ~ + +30  + #__Ãed_size_t + + + ) + +31  + #__Ãed_wch¬_t + + + ) + +32  + ~<¡ddef.h +> + +35  + #__UNKNOWN_10646_CHAR + (( +wch¬_t +è0xfffd) + + ) + +40 + m__GCONV_OK + = 0, + +41 + m__GCONV_NOCONV +, + +42 + m__GCONV_NODB +, + +43 + m__GCONV_NOMEM +, + +45 + m__GCONV_EMPTY_INPUT +, + +46 + m__GCONV_FULL_OUTPUT +, + +47 + m__GCONV_ILLEGAL_INPUT +, + +48 + m__GCONV_INCOMPLETE_INPUT +, + +50 + m__GCONV_ILLEGAL_DESCRIPTOR +, + +51 + m__GCONV_INTERNAL_ERROR + + +58 + m__GCONV_IS_LAST + = 0x0001, + +59 + m__GCONV_IGNORE_ERRORS + = 0x0002, + +60 + m__GCONV_SWAP + = 0x0004 + +65  + g__gcÚv_¡• +; + +66  + g__gcÚv_¡•_d©a +; + +67  + g__gcÚv_lßded_objeù +; + +68  + g__gcÚv_Œªs_d©a +; + +72 (* + t__gcÚv_fù +è( + t__gcÚv_¡• + *,  + t__gcÚv_¡•_d©a + *, + +73 + t__cÚ¡ + **, __const *, + +74 **, + tsize_t + *, , ); + +77  + $wšt_t + (* + t__gcÚv_btowc_fù +è( + t__gcÚv_¡• + *, ); + +80 (* + t__gcÚv_š™_fù +è( + t__gcÚv_¡• + *); + +81 (* + t__gcÚv_’d_fù +è( + t__gcÚv_¡• + *); + +85 (* + t__gcÚv_Œªs_fù +è( + t__gcÚv_¡• + *, + +86  + t__gcÚv_¡•_d©a + *, *, + +87 + t__cÚ¡ + *, + +88 + t__cÚ¡ + **, + +89 + t__cÚ¡ + *, **, + +90 + tsize_t + *); + +93 (* + t__gcÚv_Œªs_cڋxt_fù +è(*, + t__cÚ¡ + *, + +94 + t__cÚ¡ + *, + +98 (* + t__gcÚv_Œªs_qu”y_fù +è( + t__cÚ¡ + *, __const ***, + +99 + tsize_t + *); + +102 (* + t__gcÚv_Œªs_š™_fù +) (**, const *); + +103 (* + t__gcÚv_Œªs_’d_fù +) (*); + +105  + s__gcÚv_Œªs_d©a + + +108 +__gcÚv_Œªs_fù + +__Œªs_fù +; + +109 +__gcÚv_Œªs_cڋxt_fù + +__Œªs_cڋxt_fù +; + +110 +__gcÚv_Œªs_’d_fù + +__Œªs_’d_fù +; + +111 * +__d©a +; + +112  +__gcÚv_Œªs_d©a + * +__Ãxt +; + +117  + s__gcÚv_¡• + + +119  +__gcÚv_lßded_objeù + * +__shlib_hªdË +; + +120 +__cÚ¡ + * +__modÇme +; + +122  +__couÁ” +; + +124 * +__äom_Çme +; + +125 * +__to_Çme +; + +127 +__gcÚv_fù + +__fù +; + +128 +__gcÚv_btowc_fù + +__btowc_fù +; + +129 +__gcÚv_š™_fù + +__š™_fù +; + +130 +__gcÚv_’d_fù + +__’d_fù +; + +134  +__mš_Ãeded_äom +; + +135  +__max_Ãeded_äom +; + +136  +__mš_Ãeded_to +; + +137  +__max_Ãeded_to +; + +140  +__¡©eful +; + +142 * +__d©a +; + +147  + s__gcÚv_¡•_d©a + + +149 * +__outbuf +; + +150 * +__outbuãnd +; + +154  +__æags +; + +158  +__švoÿtiÚ_couÁ” +; + +162  +__š‹º®_u£ +; + +164 +__mb¡©e_t + * +__¡©• +; + +165 +__mb¡©e_t + +__¡©e +; + +169  +__gcÚv_Œªs_d©a + * +__Œªs +; + +174  + s__gcÚv_šfo + + +176 +size_t + +__n¡•s +; + +177  +__gcÚv_¡• + * +__¡•s +; + +178 +__ex‹nsiÚ__ +  +__gcÚv_¡•_d©a + +__d©a + +__æex¬r +; + +179 } * + t__gcÚv_t +; + + @/usr/include/wchar.h + +24 #iâdeà +_WCHAR_H + + +26 #ià! +defšed + +__Ãed_mb¡©e_t + && !defšed +__Ãed_wšt_t + + +27  + #_WCHAR_H + 1 + + ) + +28  + ~<ã©u»s.h +> + +31 #ifdeà +_WCHAR_H + + +33  + #__Ãed___FILE + + + ) + +34 #ià +defšed + +__USE_UNIX98 + || defšed +__USE_XOPEN2K + + +35  + #__Ãed_FILE + + + ) + +37  + ~<¡dio.h +> + +39  + #__Ãed___va_li¡ + + + ) + +40  + ~<¡d¬g.h +> + +42  + ~ + +45  + #__Ãed_size_t + + + ) + +46  + #__Ãed_wch¬_t + + + ) + +47  + #__Ãed_NULL + + + ) + +49 #ià +defšed + +_WCHAR_H + || defšed +__Ãed_wšt_t + || !defšed +__WINT_TYPE__ + + +50 #undeà +__Ãed_wšt_t + + +51  + #__Ãed_wšt_t + + + ) + +52  + ~<¡ddef.h +> + +56 #iâdeà +_WINT_T + + +61  + #_WINT_T + + + ) + +62  + twšt_t +; + +66 #ià +defšed + +__ýlu¥lus + && defšed +_GLIBCPP_USE_NAMESPACES + \ + +67 && +defšed + +__WINT_TYPE__ + + +68 +__BEGIN_NAMESPACE_STD + + +69  +__WINT_TYPE__ + + twšt_t +; + +70 + g__END_NAMESPACE_STD + + +75 #ià +defšed + +__ýlu¥lus + && +__GNUC_PREREQ + (4, 4) + +76  + #__CORRECT_ISO_CPP_WCHAR_H_PROTO + + + ) + +80 #ià( +defšed + +_WCHAR_H + || defšed +__Ãed_mb¡©e_t +è&& !defšed +__mb¡©e_t_defšed + + +81  + #__mb¡©e_t_defšed + 1 + + ) + +85  + m__couÁ +; + +88 #ifdeà +__WINT_TYPE__ + + +89 +__WINT_TYPE__ + + m__wch +; + +91 +wšt_t + + m__wch +; + +93  + m__wchb +[4]; + +94 } + m__v®ue +; + +95 } + t__mb¡©e_t +; + +97 #undeà +__Ãed_mb¡©e_t + + +102 #ifdeà +_WCHAR_H + + +104 +__BEGIN_NAMESPACE_C99 + + +106  +__mb¡©e_t + + tmb¡©e_t +; + +107 + g__END_NAMESPACE_C99 + + +108 #ifdeà +__USE_GNU + + +109 + $__USING_NAMESPACE_C99 +( +mb¡©e_t +) + +112 #iâdeà +WCHAR_MIN + + +114  + #WCHAR_MIN + +__WCHAR_MIN + + + ) + +115  + #WCHAR_MAX + +__WCHAR_MAX + + + ) + +118 #iâdeà +WEOF + + +119  + #WEOF + (0xffffffffu) + + ) + +124 #ià +defšed + +__USE_XOPEN + && !defšed +__USE_UNIX98 + + +125  + ~ + +129 +__BEGIN_DECLS + + +131 +__BEGIN_NAMESPACE_STD + + +134  +tm +; + +135 +__END_NAMESPACE_STD + + +139 + $__USING_NAMESPACE_STD +( +tm +) + +142 +__BEGIN_NAMESPACE_STD + + +144 +wch¬_t + * + $wcsýy + ( +wch¬_t + * +__»¡riù + +__de¡ +, + +145 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__¤c +è +__THROW +; + +147 +wch¬_t + * + $wc¢ýy + ( +wch¬_t + * +__»¡riù + +__de¡ +, + +148 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__¤c +, +size_t + +__n +) + +149 +__THROW +; + +152 +wch¬_t + * + $wcsÿt + ( +wch¬_t + * +__»¡riù + +__de¡ +, + +153 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__¤c +è +__THROW +; + +155 +wch¬_t + * + $wc¢ÿt + ( +wch¬_t + * +__»¡riù + +__de¡ +, + +156 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__¤c +, +size_t + +__n +) + +157 +__THROW +; + +160  + $wcscmp + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +) + +161 +__THROW + +__©Œibu‹_pu»__ +; + +163  + $wc¢cmp + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +, +size_t + +__n +) + +164 +__THROW + +__©Œibu‹_pu»__ +; + +165 +__END_NAMESPACE_STD + + +167 #ifdeà +__USE_XOPEN2K8 + + +169  + $wcsÿ£cmp + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +è +__THROW +; + +172  + $wc¢ÿ£cmp + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +, + +173 +size_t + +__n +è +__THROW +; + +177  + ~ + +179  + $wcsÿ£cmp_l + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +, + +180 +__loÿË_t + +__loc +è +__THROW +; + +182  + $wc¢ÿ£cmp_l + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +, + +183 +size_t + +__n +, +__loÿË_t + +__loc +è +__THROW +; + +186 +__BEGIN_NAMESPACE_STD + + +189  + $wcscÞl + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +è +__THROW +; + +193 +size_t + + $wcsxäm + ( +wch¬_t + * +__»¡riù + +__s1 +, + +194 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s2 +, +size_t + +__n +è +__THROW +; + +195 +__END_NAMESPACE_STD + + +197 #ifdeà +__USE_XOPEN2K8 + + +203  + $wcscÞl_l + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +, + +204 +__loÿË_t + +__loc +è +__THROW +; + +209 +size_t + + $wcsxäm_l + ( +wch¬_t + * +__s1 +, +__cÚ¡ + wch¬_ˆ* +__s2 +, + +210 +size_t + +__n +, +__loÿË_t + +__loc +è +__THROW +; + +213 +wch¬_t + * + $wcsdup + ( +__cÚ¡ + +wch¬_t + * +__s +è +__THROW + +__©Œibu‹_m®loc__ +; + +216 +__BEGIN_NAMESPACE_STD + + +218 #ifdeà +__CORRECT_ISO_CPP_WCHAR_H_PROTO + + +219 "C++" +wch¬_t + * + $wcschr + ( +wch¬_t + * +__wcs +, wch¬_ˆ +__wc +) + +220 +__THROW + + `__asm + ("wcschr"è +__©Œibu‹_pu»__ +; + +221 "C++" +__cÚ¡ + +wch¬_t + * + $wcschr + ( +__cÚ¡ + +wch¬_t + * +__wcs +, wch¬_ˆ +__wc +) + +222 +__THROW + + `__asm + ("wcschr"è +__©Œibu‹_pu»__ +; + +224 +wch¬_t + * + $wcschr + ( +__cÚ¡ + +wch¬_t + * +__wcs +, wch¬_ˆ +__wc +) + +225 +__THROW + +__©Œibu‹_pu»__ +; + +228 #ifdeà +__CORRECT_ISO_CPP_WCHAR_H_PROTO + + +229 "C++" +wch¬_t + * + $wc¤chr + ( +wch¬_t + * +__wcs +, wch¬_ˆ +__wc +) + +230 +__THROW + + `__asm + ("wc¤chr"è +__©Œibu‹_pu»__ +; + +231 "C++" +__cÚ¡ + +wch¬_t + * + $wc¤chr + ( +__cÚ¡ + +wch¬_t + * +__wcs +, wch¬_ˆ +__wc +) + +232 +__THROW + + `__asm + ("wc¤chr"è +__©Œibu‹_pu»__ +; + +234 +wch¬_t + * + $wc¤chr + ( +__cÚ¡ + +wch¬_t + * +__wcs +, wch¬_ˆ +__wc +) + +235 +__THROW + +__©Œibu‹_pu»__ +; + +237 +__END_NAMESPACE_STD + + +239 #ifdeà +__USE_GNU + + +242 +wch¬_t + * + $wcschºul + ( +__cÚ¡ + +wch¬_t + * +__s +, wch¬_ˆ +__wc +) + +243 +__THROW + +__©Œibu‹_pu»__ +; + +246 +__BEGIN_NAMESPACE_STD + + +249 +size_t + + $wcsc¥n + ( +__cÚ¡ + +wch¬_t + * +__wcs +, __cÚ¡ wch¬_ˆ* +__»jeù +) + +250 +__THROW + +__©Œibu‹_pu»__ +; + +253 +size_t + + $wcs¥n + ( +__cÚ¡ + +wch¬_t + * +__wcs +, __cÚ¡ wch¬_ˆ* +__acû± +) + +254 +__THROW + +__©Œibu‹_pu»__ +; + +256 #ifdeà +__CORRECT_ISO_CPP_WCHAR_H_PROTO + + +257 "C++" +wch¬_t + * + $wc¥brk + ( +wch¬_t + * +__wcs +, +__cÚ¡ + wch¬_ˆ* +__acû± +) + +258 +__THROW + + `__asm + ("wc¥brk"è +__©Œibu‹_pu»__ +; + +259 "C++" +__cÚ¡ + +wch¬_t + * + $wc¥brk + ( +__cÚ¡ + +wch¬_t + * +__wcs +, + +260 +__cÚ¡ + +wch¬_t + * +__acû± +) + +261 +__THROW + + `__asm + ("wc¥brk"è +__©Œibu‹_pu»__ +; + +263 +wch¬_t + * + $wc¥brk + ( +__cÚ¡ + +wch¬_t + * +__wcs +, __cÚ¡ wch¬_ˆ* +__acû± +) + +264 +__THROW + +__©Œibu‹_pu»__ +; + +267 #ifdeà +__CORRECT_ISO_CPP_WCHAR_H_PROTO + + +268 "C++" +wch¬_t + * + $wcs¡r + ( +wch¬_t + * +__hay¡ack +, +__cÚ¡ + wch¬_ˆ* +__ÃedË +) + +269 +__THROW + + `__asm + ("wcs¡r"è +__©Œibu‹_pu»__ +; + +270 "C++" +__cÚ¡ + +wch¬_t + * + $wcs¡r + ( +__cÚ¡ + +wch¬_t + * +__hay¡ack +, + +271 +__cÚ¡ + +wch¬_t + * +__ÃedË +) + +272 +__THROW + + `__asm + ("wcs¡r"è +__©Œibu‹_pu»__ +; + +274 +wch¬_t + * + $wcs¡r + ( +__cÚ¡ + +wch¬_t + * +__hay¡ack +, __cÚ¡ wch¬_ˆ* +__ÃedË +) + +275 +__THROW + +__©Œibu‹_pu»__ +; + +279 +wch¬_t + * + $wc¡ok + ( +wch¬_t + * +__»¡riù + +__s +, + +280 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__d–im +, + +281 +wch¬_t + ** +__»¡riù + +__±r +è +__THROW +; + +284 +size_t + + $wc¦’ + ( +__cÚ¡ + +wch¬_t + * +__s +è +__THROW + +__©Œibu‹_pu»__ +; + +285 +__END_NAMESPACE_STD + + +287 #ifdeà +__USE_XOPEN + + +289 #ifdeà +__CORRECT_ISO_CPP_WCHAR_H_PROTO + + +290 "C++" +wch¬_t + * + $wcswcs + ( +wch¬_t + * +__hay¡ack +, +__cÚ¡ + wch¬_ˆ* +__ÃedË +) + +291 +__THROW + + `__asm + ("wcswcs"è +__©Œibu‹_pu»__ +; + +292 "C++" +__cÚ¡ + +wch¬_t + * + $wcswcs + ( +__cÚ¡ + +wch¬_t + * +__hay¡ack +, + +293 +__cÚ¡ + +wch¬_t + * +__ÃedË +) + +294 +__THROW + + `__asm + ("wcswcs"è +__©Œibu‹_pu»__ +; + +296 +wch¬_t + * + $wcswcs + ( +__cÚ¡ + +wch¬_t + * +__hay¡ack +, __cÚ¡ wch¬_ˆ* +__ÃedË +) + +297 +__THROW + +__©Œibu‹_pu»__ +; + +301 #ifdeà +__USE_XOPEN2K8 + + +303 +size_t + + $wc¢Ën + ( +__cÚ¡ + +wch¬_t + * +__s +, +size_t + +__maxËn +) + +304 +__THROW + +__©Œibu‹_pu»__ +; + +308 +__BEGIN_NAMESPACE_STD + + +310 #ifdeà +__CORRECT_ISO_CPP_WCHAR_H_PROTO + + +311 "C++" +wch¬_t + * + $wmemchr + ( +wch¬_t + * +__s +, wch¬_ˆ +__c +, +size_t + +__n +) + +312 +__THROW + + `__asm + ("wmemchr"è +__©Œibu‹_pu»__ +; + +313 "C++" +__cÚ¡ + +wch¬_t + * + $wmemchr + ( +__cÚ¡ + +wch¬_t + * +__s +, wch¬_ˆ +__c +, + +314 +size_t + +__n +) + +315 +__THROW + + `__asm + ("wmemchr"è +__©Œibu‹_pu»__ +; + +317 +wch¬_t + * + $wmemchr + ( +__cÚ¡ + +wch¬_t + * +__s +, wch¬_ˆ +__c +, +size_t + +__n +) + +318 +__THROW + +__©Œibu‹_pu»__ +; + +322  + $wmemcmp + ( +__cÚ¡ + +wch¬_t + * +__s1 +, __cÚ¡ wch¬_ˆ* +__s2 +, +size_t + +__n +) + +323 +__THROW + +__©Œibu‹_pu»__ +; + +326 +wch¬_t + * + $wmemýy + ( +wch¬_t + * +__»¡riù + +__s1 +, + +327 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s2 +, +size_t + +__n +è +__THROW +; + +331 +wch¬_t + * + $wmemmove + ( +wch¬_t + * +__s1 +, +__cÚ¡ + wch¬_ˆ* +__s2 +, +size_t + +__n +) + +332 +__THROW +; + +335 +wch¬_t + * + $wmem£t + ( +wch¬_t + * +__s +, wch¬_ˆ +__c +, +size_t + +__n +è +__THROW +; + +336 +__END_NAMESPACE_STD + + +338 #ifdeà +__USE_GNU + + +341 +wch¬_t + * + $wmempýy + ( +wch¬_t + * +__»¡riù + +__s1 +, + +342 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s2 +, +size_t + +__n +) + +343 +__THROW +; + +347 +__BEGIN_NAMESPACE_STD + + +350 +wšt_t + + $btowc + ( +__c +è +__THROW +; + +354  + $wùob + ( +wšt_t + +__c +è +__THROW +; + +358  + $mbsš™ + ( +__cÚ¡ + +mb¡©e_t + * +__ps +è +__THROW + +__©Œibu‹_pu»__ +; + +362 +size_t + + $mb¹owc + ( +wch¬_t + * +__»¡riù + +__pwc +, + +363 +__cÚ¡ + * +__»¡riù + +__s +, +size_t + +__n +, + +364 +mb¡©e_t + * +__p +è +__THROW +; + +367 +size_t + + $wütomb + (* +__»¡riù + +__s +, +wch¬_t + +__wc +, + +368 +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +371 +size_t + + $__mb¾’ + ( +__cÚ¡ + * +__»¡riù + +__s +, +size_t + +__n +, + +372 +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +373 +size_t + + $mb¾’ + ( +__cÚ¡ + * +__»¡riù + +__s +, +size_t + +__n +, + +374 +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +375 +__END_NAMESPACE_STD + + +377 #ifdeà +__USE_EXTERN_INLINES + + +383 +wšt_t + + $__btowc_®Ÿs + ( +__c +è + `__asm + ("btowc"); + +384 +__ex‹º_šlše + +wšt_t + + +385 + `__NTH + ( + $btowc + ( +__c +)) + +386 {  ( + `__bužtš_cÚ¡ªt_p + ( +__c +) && __c >= '\0' && __c <= '\x7f' + +387 ? ( +wšt_t +è +__c + : + `__btowc_®Ÿs + (__c)); + } +} + +389  + $__wùob_®Ÿs + ( +wšt_t + +__c +è + `__asm + ("wctob"); + +390 +__ex‹º_šlše +  + +391 + `__NTH + ( + $wùob + ( +wšt_t + +__wc +)) + +392 {  ( + `__bužtš_cÚ¡ªt_p + ( +__wc +è&& __wø>ð +L +'\0' && __wc <= L'\x7f' + +393 ? (è +__wc + : + `__wùob_®Ÿs + (__wc)); + } +} + +395 +__ex‹º_šlše + +size_t + + +396 +__NTH + ( + $mb¾’ + ( +__cÚ¡ + * +__»¡riù + +__s +, +size_t + +__n +, + +397 +mb¡©e_t + * +__»¡riù + +__ps +)) + +398 {  ( +__ps + !ð +NULL + + +399 ? + `mb¹owc + ( +NULL +, +__s +, +__n +, +__ps +è: + `__mb¾’ + (__s, __n, NULL)); + } +} + +402 +__BEGIN_NAMESPACE_STD + + +405 +size_t + + $mb¤towcs + ( +wch¬_t + * +__»¡riù + +__d¡ +, + +406 +__cÚ¡ + ** +__»¡riù + +__¤c +, +size_t + +__Ën +, + +407 +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +411 +size_t + + $wc¤tombs + (* +__»¡riù + +__d¡ +, + +412 +__cÚ¡ + +wch¬_t + ** +__»¡riù + +__¤c +, +size_t + +__Ën +, + +413 +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +414 +__END_NAMESPACE_STD + + +417 #ifdef +__USE_XOPEN2K8 + + +420 +size_t + + $mb¢¹owcs + ( +wch¬_t + * +__»¡riù + +__d¡ +, + +421 +__cÚ¡ + ** +__»¡riù + +__¤c +, +size_t + +__nmc +, + +422 +size_t + +__Ën +, +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +426 +size_t + + $wc¢¹ombs + (* +__»¡riù + +__d¡ +, + +427 +__cÚ¡ + +wch¬_t + ** +__»¡riù + +__¤c +, + +428 +size_t + +__nwc +, size_ˆ +__Ën +, + +429 +mb¡©e_t + * +__»¡riù + +__ps +è +__THROW +; + +434 #ifdeà +__USE_XOPEN + + +436  + $wcwidth + ( +wch¬_t + +__c +è +__THROW +; + +440  + $wcswidth + ( +__cÚ¡ + +wch¬_t + * +__s +, +size_t + +__n +è +__THROW +; + +444 +__BEGIN_NAMESPACE_STD + + +447  + $wc¡od + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +448 +wch¬_t + ** +__»¡riù + +__’d±r +è +__THROW +; + +449 +__END_NAMESPACE_STD + + +451 #ifdeà +__USE_ISOC99 + + +452 +__BEGIN_NAMESPACE_C99 + + +454  + $wc¡of + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +455 +wch¬_t + ** +__»¡riù + +__’d±r +è +__THROW +; + +456  + $wc¡Þd + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +457 +wch¬_t + ** +__»¡riù + +__’d±r +è +__THROW +; + +458 +__END_NAMESPACE_C99 + + +462 +__BEGIN_NAMESPACE_STD + + +465  + $wc¡Þ + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +466 +wch¬_t + ** +__»¡riù + +__’d±r +,  +__ba£ +è +__THROW +; + +470  + $wc¡oul + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +471 +wch¬_t + ** +__»¡riù + +__’d±r +,  +__ba£ +) + +472 +__THROW +; + +473 +__END_NAMESPACE_STD + + +475 #ià +defšed + +__USE_ISOC99 + || (defšed +__GNUC__ + && defšed +__USE_GNU +) + +476 +__BEGIN_NAMESPACE_C99 + + +479 +__ex‹nsiÚ__ + + +480  + $wc¡Þl + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +481 +wch¬_t + ** +__»¡riù + +__’d±r +,  +__ba£ +) + +482 +__THROW +; + +486 +__ex‹nsiÚ__ + + +487  + $wc¡ouÎ + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +488 +wch¬_t + ** +__»¡riù + +__’d±r +, + +489  +__ba£ +è +__THROW +; + +490 +__END_NAMESPACE_C99 + + +493 #ià +defšed + +__GNUC__ + && defšed +__USE_GNU + + +496 +__ex‹nsiÚ__ + + +497  + $wc¡oq + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +498 +wch¬_t + ** +__»¡riù + +__’d±r +,  +__ba£ +) + +499 +__THROW +; + +503 +__ex‹nsiÚ__ + + +504  + $wc¡ouq + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +505 +wch¬_t + ** +__»¡riù + +__’d±r +, + +506  +__ba£ +è +__THROW +; + +509 #ifdeà +__USE_GNU + + +523  + ~ + +527  + $wc¡Þ_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +528 +wch¬_t + ** +__»¡riù + +__’d±r +,  +__ba£ +, + +529 +__loÿË_t + +__loc +è +__THROW +; + +531  + $wc¡oul_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +532 +wch¬_t + ** +__»¡riù + +__’d±r +, + +533  +__ba£ +, +__loÿË_t + +__loc +è +__THROW +; + +535 +__ex‹nsiÚ__ + + +536  + $wc¡Þl_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +537 +wch¬_t + ** +__»¡riù + +__’d±r +, + +538  +__ba£ +, +__loÿË_t + +__loc +è +__THROW +; + +540 +__ex‹nsiÚ__ + + +541  + $wc¡ouÎ_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +542 +wch¬_t + ** +__»¡riù + +__’d±r +, + +543  +__ba£ +, +__loÿË_t + +__loc +) + +544 +__THROW +; + +546  + $wc¡od_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +547 +wch¬_t + ** +__»¡riù + +__’d±r +, +__loÿË_t + +__loc +) + +548 +__THROW +; + +550  + $wc¡of_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +551 +wch¬_t + ** +__»¡riù + +__’d±r +, +__loÿË_t + +__loc +) + +552 +__THROW +; + +554  + $wc¡Þd_l + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__Ō +, + +555 +wch¬_t + ** +__»¡riù + +__’d±r +, + +556 +__loÿË_t + +__loc +è +__THROW +; + +560 #ifdeà +__USE_XOPEN2K8 + + +563 +wch¬_t + * + $wýýy + ( +wch¬_t + * +__»¡riù + +__de¡ +, + +564 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__¤c +è +__THROW +; + +568 +wch¬_t + * + $wýnýy + ( +wch¬_t + * +__»¡riù + +__de¡ +, + +569 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__¤c +, +size_t + +__n +) + +570 +__THROW +; + +577 +__FILE + * + $ݒ_wmem¡»am + ( +wch¬_t + ** +__buæoc +, +size_t + * +__siz–oc +è +__THROW +; + +580 #ià +defšed + +__USE_ISOC95 + || defšed +__USE_UNIX98 + + +581 +__BEGIN_NAMESPACE_STD + + +584  + $fwide + ( +__FILE + * +__å +,  +__mode +è +__THROW +; + +591  + `fw´štf + ( +__FILE + * +__»¡riù + +__¡»am +, + +592 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +598  + `w´štf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +601  + $sw´štf + ( +wch¬_t + * +__»¡riù + +__s +, +size_t + +__n +, + +602 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +603 +__THROW + ; + +609  + `vfw´štf + ( +__FILE + * +__»¡riù + +__s +, + +610 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +611 +__gnuc_va_li¡ + +__¬g +) + +617  + `vw´štf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +618 +__gnuc_va_li¡ + +__¬g +) + +622  + $vsw´štf + ( +wch¬_t + * +__»¡riù + +__s +, +size_t + +__n +, + +623 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +624 +__gnuc_va_li¡ + +__¬g +) + +625 +__THROW + ; + +632  + `fwsÿnf + ( +__FILE + * +__»¡riù + +__¡»am +, + +633 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +639  + `wsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +642  + $swsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s +, + +643 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +644 +__THROW + ; + +646 #ià +defšed + +__USE_ISOC99 + && !defšed +__USE_GNU + \ + +647 && (! +defšed + +__LDBL_COMPAT + || !defšed +__REDIRECT +) \ + +648 && ( +defšed + +__STRICT_ANSI__ + || defšed +__USE_XOPEN2K +) + +649 #ifdeà +__REDIRECT + + +653  + `__REDIRECT + ( +fwsÿnf +, ( +__FILE + * +__»¡riù + +__¡»am +, + +654 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...), + +655 +__isoc99_fwsÿnf +) + +657  + `__REDIRECT + ( +wsÿnf +, ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...), + +658 +__isoc99_wsÿnf +) + +660  + `__REDIRECT_NTH + ( +swsÿnf +, ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s +, + +661 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +662 ...), +__isoc99_swsÿnf +) + +665  + `__isoc99_fwsÿnf + ( +__FILE + * +__»¡riù + +__¡»am +, + +666 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...); + +667  + `__isoc99_wsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...); + +668  + $__isoc99_swsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s +, + +669 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, ...) + +670 +__THROW +; + +671  + #fwsÿnf + +__isoc99_fwsÿnf + + + ) + +672  + #wsÿnf + +__isoc99_wsÿnf + + + ) + +673  + #swsÿnf + +__isoc99_swsÿnf + + + ) + +677 +__END_NAMESPACE_STD + + +680 #ifdeà +__USE_ISOC99 + + +681 +__BEGIN_NAMESPACE_C99 + + +686  + `vfwsÿnf + ( +__FILE + * +__»¡riù + +__s +, + +687 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +688 +__gnuc_va_li¡ + +__¬g +) + +694  + `vwsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +695 +__gnuc_va_li¡ + +__¬g +) + +698  + $vswsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s +, + +699 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +700 +__gnuc_va_li¡ + +__¬g +) + +701 +__THROW + ; + +703 #ià! +defšed + +__USE_GNU + \ + +704 && (! +defšed + +__LDBL_COMPAT + || !defšed +__REDIRECT +) \ + +705 && ( +defšed + +__STRICT_ANSI__ + || defšed +__USE_XOPEN2K +) + +706 #ifdeà +__REDIRECT + + +707  + `__REDIRECT + ( +vfwsÿnf +, ( +__FILE + * +__»¡riù + +__s +, + +708 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +709 +__gnuc_va_li¡ + +__¬g +), +__isoc99_vfwsÿnf +) + +711  + `__REDIRECT + ( +vwsÿnf +, ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +712 +__gnuc_va_li¡ + +__¬g +), +__isoc99_vwsÿnf +) + +714  + `__REDIRECT_NTH + ( +vswsÿnf +, ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s +, + +715 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +716 +__gnuc_va_li¡ + +__¬g +), +__isoc99_vswsÿnf +) + +719  + `__isoc99_vfwsÿnf + ( +__FILE + * +__»¡riù + +__s +, + +720 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +721 +__gnuc_va_li¡ + +__¬g +); + +722  + `__isoc99_vwsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +723 +__gnuc_va_li¡ + +__¬g +); + +724  + $__isoc99_vswsÿnf + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__s +, + +725 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +726 +__gnuc_va_li¡ + +__¬g +è +__THROW +; + +727  + #vfwsÿnf + +__isoc99_vfwsÿnf + + + ) + +728  + #vwsÿnf + +__isoc99_vwsÿnf + + + ) + +729  + #vswsÿnf + +__isoc99_vswsÿnf + + + ) + +733 +__END_NAMESPACE_C99 + + +737 +__BEGIN_NAMESPACE_STD + + +742 +wšt_t + + `fg‘wc + ( +__FILE + * +__¡»am +); + +743 +wšt_t + + `g‘wc + ( +__FILE + * +__¡»am +); + +749 +wšt_t + + `g‘wch¬ + (); + +756 +wšt_t + + `åutwc + ( +wch¬_t + +__wc +, +__FILE + * +__¡»am +); + +757 +wšt_t + + `putwc + ( +wch¬_t + +__wc +, +__FILE + * +__¡»am +); + +763 +wšt_t + + `putwch¬ + ( +wch¬_t + +__wc +); + +771 +wch¬_t + * + `fg‘ws + (wch¬_ˆ* +__»¡riù + +__ws +,  +__n +, + +772 +__FILE + * +__»¡riù + +__¡»am +); + +778  + `åutws + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__ws +, + +779 +__FILE + * +__»¡riù + +__¡»am +); + +786 +wšt_t + + `ung‘wc + (wšt_ˆ +__wc +, +__FILE + * +__¡»am +); + +787 +__END_NAMESPACE_STD + + +790 #ifdeà +__USE_GNU + + +798 +wšt_t + + `g‘wc_uÆocked + ( +__FILE + * +__¡»am +); + +799 +wšt_t + + `g‘wch¬_uÆocked + (); + +807 +wšt_t + + `fg‘wc_uÆocked + ( +__FILE + * +__¡»am +); + +815 +wšt_t + + `åutwc_uÆocked + ( +wch¬_t + +__wc +, +__FILE + * +__¡»am +); + +824 +wšt_t + + `putwc_uÆocked + ( +wch¬_t + +__wc +, +__FILE + * +__¡»am +); + +825 +wšt_t + + `putwch¬_uÆocked + ( +wch¬_t + +__wc +); + +834 +wch¬_t + * + `fg‘ws_uÆocked + (wch¬_ˆ* +__»¡riù + +__ws +,  +__n +, + +835 +__FILE + * +__»¡riù + +__¡»am +); + +843  + `åutws_uÆocked + ( +__cÚ¡ + +wch¬_t + * +__»¡riù + +__ws +, + +844 +__FILE + * +__»¡riù + +__¡»am +); + +848 +__BEGIN_NAMESPACE_C99 + + +852 +size_t + + $wcsáime + ( +wch¬_t + * +__»¡riù + +__s +, +size_t + +__maxsize +, + +853 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +854 +__cÚ¡ +  +tm + * +__»¡riù + +__ +è +__THROW +; + +855 +__END_NAMESPACE_C99 + + +857 #ifdeà +__USE_GNU + + +858  + ~ + +862 +size_t + + $wcsáime_l + ( +wch¬_t + * +__»¡riù + +__s +, +size_t + +__maxsize +, + +863 +__cÚ¡ + +wch¬_t + * +__»¡riù + +__fÜm© +, + +864 +__cÚ¡ +  +tm + * +__»¡riù + +__ +, + +865 +__loÿË_t + +__loc +è +__THROW +; + +874 #ià +defšed + +__USE_UNIX98 + && !defšed +__USE_GNU + + +875  + #__Ãed_iswxxx + + + ) + +876  + ~ + +880 #ià +__USE_FORTIFY_LEVEL + > 0 && +defšed + +__ex‹º_®ways_šlše + + +881  + ~ + +884 #ifdeà +__LDBL_COMPAT + + +885  + ~ + +888 +__END_DECLS + + +896 #undeà +__Ãed_mb¡©e_t + + +897 #undeà +__Ãed_wšt_t + + + @/usr/include/xlocale.h + +21 #iâdeà +_XLOCALE_H + + +22  + #_XLOCALE_H + 1 + + ) + +28  + s__loÿË_¡ruù + + +31  +__loÿË_d©a + * + m__loÿËs +[13]; + +34 cÚ¡ * + m__ùy³_b +; + +35 cÚ¡ * + m__ùy³_tÞow” +; + +36 cÚ¡ * + m__ùy³_touµ” +; + +39 cÚ¡ * + m__Çmes +[13]; + +40 } * + t__loÿË_t +; + +43  +__loÿË_t + + tloÿË_t +; + + @/usr/include/wctype.h + +24 #iâdeà +_WCTYPE_H + + +26  + ~<ã©u»s.h +> + +27  + ~ + +29 #iâdeà +__Ãed_iswxxx + + +30  + #_WCTYPE_H + 1 + + ) + +33  + #__Ãed_wšt_t + + + ) + +34  + ~ + +38 #iâdeà +WEOF + + +39  + #WEOF + (0xffffffffu) + + ) + +42 #undeà +__Ãed_iswxxx + + +47 #iâdeà +__iswxxx_defšed + + +48  + #__iswxxx_defšed + 1 + + ) + +50 +__BEGIN_NAMESPACE_C99 + + +53  + twùy³_t +; + +54 + g__END_NAMESPACE_C99 + + +56 #iâdeà +_ISwb™ + + +61  + ~<’dŸn.h +> + +62 #ià +__BYTE_ORDER + =ð +__BIG_ENDIAN + + +63  + #_ISwb™ +( +b™ +è(1 << (b™)) + + ) + +65  + #_ISwb™ +( +b™ +) \ + +66 (( +b™ +) < 8 ? () ((1UL << (bit)) << 24) \ + +67 : (( +b™ +) < 16 ? () ((1UL << (bit)) << 8) \ + +68 : (( +b™ +) < 24 ? () ((1UL << (bit)) >> 8) \ + +69 : (è((1UL << ( +b™ +)è>> 24)))) + + ) + +74 + m__ISwuµ” + = 0, + +75 + m__ISwlow” + = 1, + +76 + m__ISw®pha + = 2, + +77 + m__ISwdig™ + = 3, + +78 + m__ISwxdig™ + = 4, + +79 + m__ISw¥aû + = 5, + +80 + m__ISw´št + = 6, + +81 + m__ISwg¿ph + = 7, + +82 + m__ISwbÏnk + = 8, + +83 + m__ISwúŒl + = 9, + +84 + m__ISwpunù + = 10, + +85 + m__ISw®num + = 11, + +87 + m_ISwuµ” + = +_ISwb™ + ( +__ISwuµ” +), + +88 + m_ISwlow” + = +_ISwb™ + ( +__ISwlow” +), + +89 + m_ISw®pha + = +_ISwb™ + ( +__ISw®pha +), + +90 + m_ISwdig™ + = +_ISwb™ + ( +__ISwdig™ +), + +91 + m_ISwxdig™ + = +_ISwb™ + ( +__ISwxdig™ +), + +92 + m_ISw¥aû + = +_ISwb™ + ( +__ISw¥aû +), + +93 + m_ISw´št + = +_ISwb™ + ( +__ISw´št +), + +94 + m_ISwg¿ph + = +_ISwb™ + ( +__ISwg¿ph +), + +95 + m_ISwbÏnk + = +_ISwb™ + ( +__ISwbÏnk +), + +96 + m_ISwúŒl + = +_ISwb™ + ( +__ISwúŒl +), + +97 + m_ISwpunù + = +_ISwb™ + ( +__ISwpunù +), + +98 + m_ISw®num + = +_ISwb™ + ( +__ISw®num +) + +103 +__BEGIN_DECLS + + +105 +__BEGIN_NAMESPACE_C99 + + +112  + $isw®num + ( +wšt_t + +__wc +è +__THROW +; + +118  + $isw®pha + ( +wšt_t + +__wc +è +__THROW +; + +121  + $iswúŒl + ( +wšt_t + +__wc +è +__THROW +; + +125  + $iswdig™ + ( +wšt_t + +__wc +è +__THROW +; + +129  + $iswg¿ph + ( +wšt_t + +__wc +è +__THROW +; + +134  + $iswlow” + ( +wšt_t + +__wc +è +__THROW +; + +137  + $isw´št + ( +wšt_t + +__wc +è +__THROW +; + +142  + $iswpunù + ( +wšt_t + +__wc +è +__THROW +; + +147  + $isw¥aû + ( +wšt_t + +__wc +è +__THROW +; + +152  + $iswuµ” + ( +wšt_t + +__wc +è +__THROW +; + +157  + $iswxdig™ + ( +wšt_t + +__wc +è +__THROW +; + +162 #ifdeà +__USE_ISOC99 + + +163  + $iswbÏnk + ( +wšt_t + +__wc +è +__THROW +; + +172 +wùy³_t + + $wùy³ + ( +__cÚ¡ + * +__´Ý”ty +è +__THROW +; + +176  + $iswùy³ + ( +wšt_t + +__wc +, +wùy³_t + +__desc +è +__THROW +; + +177 +__END_NAMESPACE_C99 + + +184 +__BEGIN_NAMESPACE_C99 + + +187  +__cÚ¡ + + t__št32_t + * + twù¿ns_t +; + +188 +__END_NAMESPACE_C99 + + +189 #ifdeà +__USE_GNU + + +190 + $__USING_NAMESPACE_C99 +( +wù¿ns_t +) + +193 +__BEGIN_NAMESPACE_C99 + + +195 +wšt_t + + $towlow” + ( +wšt_t + +__wc +è +__THROW +; + +198 +wšt_t + + $towuµ” + ( +wšt_t + +__wc +è +__THROW +; + +199 +__END_NAMESPACE_C99 + + +201 +__END_DECLS + + +208 #ifdeà +_WCTYPE_H + + +214 +__BEGIN_DECLS + + +216 +__BEGIN_NAMESPACE_C99 + + +219 +wù¿ns_t + + $wù¿ns + ( +__cÚ¡ + * +__´Ý”ty +è +__THROW +; + +222 +wšt_t + + $towù¿ns + ( +wšt_t + +__wc +, +wù¿ns_t + +__desc +è +__THROW +; + +223 +__END_NAMESPACE_C99 + + +225 #ifdeà +__USE_XOPEN2K8 + + +227  + ~ + +231  + $isw®num_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +237  + $isw®pha_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +240  + $iswúŒl_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +244  + $iswdig™_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +248  + $iswg¿ph_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +253  + $iswlow”_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +256  + $isw´št_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +261  + $iswpunù_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +266  + $isw¥aû_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +271  + $iswuµ”_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +276  + $iswxdig™_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +281  + $iswbÏnk_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +285 +wùy³_t + + $wùy³_l + ( +__cÚ¡ + * +__´Ý”ty +, +__loÿË_t + +__loÿË +) + +286 +__THROW +; + +290  + $iswùy³_l + ( +wšt_t + +__wc +, +wùy³_t + +__desc +, +__loÿË_t + +__loÿË +) + +291 +__THROW +; + +299 +wšt_t + + $towlow”_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +302 +wšt_t + + $towuµ”_l + ( +wšt_t + +__wc +, +__loÿË_t + +__loÿË +è +__THROW +; + +306 +wù¿ns_t + + $wù¿ns_l + ( +__cÚ¡ + * +__´Ý”ty +, +__loÿË_t + +__loÿË +) + +307 +__THROW +; + +310 +wšt_t + + $towù¿ns_l + ( +wšt_t + +__wc +, +wù¿ns_t + +__desc +, + +311 +__loÿË_t + +__loÿË +è +__THROW +; + +315 +__END_DECLS + + + @ +1 +. +1 +/usr/include +15 +349 +include/setting-storage-main.h +include/setting-storage.h +src/setting-storage-main.c +src/setting-storage.c +/usr/include/stdio.h +/usr/include/features.h +/usr/include/getopt.h +/usr/include/libio.h +/usr/include/_G_config.h +/usr/include/ctype.h +/usr/include/endian.h +/usr/include/gconv.h +/usr/include/wchar.h +/usr/include/xlocale.h +/usr/include/wctype.h diff --git a/setting-storage/include/setting-storage-main.h b/setting-storage/include/setting-storage-main.h new file mode 100755 index 0000000..18d385a --- /dev/null +++ b/setting-storage/include/setting-storage-main.h @@ -0,0 +1,28 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_STORAGE_MAIN_H__ +#define __SETTING_STORAGE_MAIN_H__ + +#include + + + +#endif /* __SETTING_STORAGE_MAIN_H__ */ diff --git a/setting-storage/include/setting-storage.h b/setting-storage/include/setting-storage.h new file mode 100755 index 0000000..6ac71e8 --- /dev/null +++ b/setting-storage/include/setting-storage.h @@ -0,0 +1,105 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_STORAGE_H__ +#define __SETTING_STORAGE_H__ + +#include +#include + +#include + +#include +#include + +#define SETTING_STORAGE_MAX_STR_LEN 30 + +#define SETTING_STORAGE_DIR_PATH_LEN_MAX 4096 +#define SETTING_STORAGE_FILE_NAME_LEN_MAX 256 +#define SETTING_STORAGE_CHILDPATH_LEN 512 + + +#define SETTING_STORAGE_KILOBYTE_VALUE 1024 +#define SETTING_STORAGE_MEGABYTE_VALUE 1048576 +#define SETTING_STORAGE_GIGABYTE_VALUE 1073741824 + +typedef struct _Setting_Storage_Status { + double dTotal; + double dAvail; +} Setting_Storage_Status; + +typedef struct _Node_Info Node_Info; +struct _Node_Info { + char path[SETTING_STORAGE_DIR_PATH_LEN_MAX + 1]; + char name[SETTING_STORAGE_FILE_NAME_LEN_MAX + 1]; + unsigned int size; +}; + +typedef struct _SettingStorageUG SettingStorageUG; + +/** + * Setting Storage UG context + * all UG function has void* as an agument. this is casted back to SettingStorageUG + * and the functions access app context. + */ +struct _SettingStorageUG { + ui_gadget_h ug; + + /* add more variables here (move your appdata to here) */ + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + + Evas_Object *ly_main; + + Evas_Object *genlist; + Evas_Object *navibar; + + /* storage setting */ + Evas_Object *popup; + Elm_Genlist_Item_Class itc_2text_3_parent; + Elm_Genlist_Item_Class itc_1icon_1text_sub; + Elm_Genlist_Item_Class itc_1text_1icon_2; + Elm_Genlist_Item_Class itc_2text_2; + Elm_Genlist_Item_Class itc_group_item; + Elm_Genlist_Item_Class itc_bg_1icon; + Elm_Genlist_Item_Class itc_seperator; + Elm_Genlist_Item_Class itc_2text_1icon_3; + Elm_Genlist_Item_Class itc_1text; + Elm_Genlist_Item_Class itc_1icon; + + Setting_Storage_Status internal_status; + Setting_Storage_Status apps_status; + Setting_Storage_Status pics_videos_status; + Setting_Storage_Status downloads_status; + Setting_Storage_Status others_status; + + Setting_GenGroupItem_Data *internal; + Setting_GenGroupItem_Data *total; + Setting_GenGroupItem_Data *apps; + Setting_GenGroupItem_Data *pics_videos; + Setting_GenGroupItem_Data *downloads; + Setting_GenGroupItem_Data *others; + Setting_GenGroupItem_Data *avail; +}; + +extern setting_view setting_view_storage_main; + +#endif /* __SETTING_STORAGE_H__ */ diff --git a/setting-storage/src/setting-storage-main.c b/setting-storage/src/setting-storage-main.c new file mode 100755 index 0000000..c86fee1 --- /dev/null +++ b/setting-storage/src/setting-storage-main.c @@ -0,0 +1,805 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include + +static int setting_storage_main_create(void *cb); +static int setting_storage_main_destroy(void *cb); +static int setting_storage_main_update(void *cb); +static int setting_storage_main_cleanup(void *cb); + +static void __setting_storage_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info); + +setting_view setting_view_storage_main = { + .create = setting_storage_main_create, + .destroy = setting_storage_main_destroy, + .update = setting_storage_main_update, + .cleanup = setting_storage_main_cleanup, +}; + +#define SETTING_STORAGE_INTERNAL_STORAGE_STR "Internal storage" +#define SETTING_STORAGE_PICS_STR "IDS_ST_BODY_PICTURES_VIDEOS" +#define SETTING_STORAGE_DOWNS_STR "IDS_ST_BODY_DOWNLOADS" +#define SETTING_STORAGE_MISCES_STR "IDS_ST_BODY_MISCELLANEOUS_FILES" +#define SETTING_STORAGE_AVAIL_STR "IDS_ST_BODY_AVAILABLE" +#define SETTING_STORAGE_FORMAT_STR "IDS_ST_BODY_FORMAT_USB_STORAGE" +#define SETTING_STORAGE_FORMAT_DESC_STR "IDS_ST_BODY_ERASES_ALL_DATA_IN_USB_STORAGE_ABB" +#define SETTING_STORAGE_MOUNT_STR "IDS_ST_BODY_MOUNT_SD_CARD" +#define SETTING_STORAGE_INSERT_STR "IDS_ST_BODY_INSERT_SD_CARD" + +#define SETTING_STORAGE_APPS_ICON_PATH SETTING_ICON_PATH"/A01-1_icon_color_applications.png" +#define SETTING_STORAGE_PICS_ICON_PATH SETTING_ICON_PATH"/A01-1_icon_color_pictures.png" +#define SETTING_STORAGE_DOWNS_ICON_PATH SETTING_ICON_PATH"/A01-1_icon_color_downloads.png" +#define SETTING_STORAGE_MISCES_ICON_PATH SETTING_ICON_PATH"/A01-1_icon_color_miscellaneous_files.png" +#define SETTING_STORAGE_AVAIL_ICON_PATH SETTING_ICON_PATH"/A01-1_icon_color_available.png" + +#define SETTING_STORAGE_ICON_WIDTH ((int)660 * WIDGET_SCALE_FACTOR) +#define SETTING_STORAGE_ICON_HEIGHT ((int)68 * WIDGET_SCALE_FACTOR) + +#define SETTING_STORAGE_OPT_PATH "/opt" +#define SETTING_STORAGE_MEDIA_PATH "/opt/media" +#define SETTING_STORAGE_PICTURES_PATH "/opt/media/Images" +#define SETTING_STORAGE_VIDEOS_PATH "/opt/media/Videos" +#define SETTING_STORAGE_DOWNLOADS_PATH "/opt/media/Downloads" + +static Evas_Object *__gl_content_get(void *data, Evas_Object *obj, const char *part) +{ + retv_if(!data, NULL); + Setting_GenGroupItem_Data *item_data = data; + SettingStorageUG *ad = (SettingStorageUG *) item_data->userdata; + + int width = SETTING_STORAGE_ICON_WIDTH; + int height = SETTING_STORAGE_ICON_HEIGHT; + float temp_size = 0.0; + + if (!safeStrCmp(part, "elm.icon")){ + Evas_Object *status_box = NULL; + status_box = elm_box_add(obj); + retvm_if(status_box == NULL, NULL, "Cannot get box"); + elm_box_horizontal_set(status_box, 1); + evas_object_size_hint_align_set(status_box, 0.0, EVAS_HINT_FILL); + evas_object_show(status_box); + + Evas *evas = evas_object_evas_get(obj); + + /* apps */ + unsigned int apps_size = 0; + temp_size = ((float)ad->apps_status.dTotal / ad->internal_status.dTotal) * width; + if (temp_size < 1 && temp_size > 0) { + apps_size = 1; + } else { + apps_size = (unsigned int)temp_size; + } + if (apps_size > 0) { + Evas_Object *apps = NULL; + apps = evas_object_image_add(evas); + evas_object_size_hint_weight_set(apps, 0.0, EVAS_HINT_EXPAND); + evas_object_image_load_size_set(apps, apps_size, height); + evas_object_image_file_set(apps, SETTING_STORAGE_APPS_ICON_PATH, NULL); + evas_object_image_fill_set(apps, 0, 0, apps_size, height); + evas_object_size_hint_min_set(apps, apps_size, height); + evas_object_show(apps); + elm_box_pack_end(status_box, apps); + } + + /* pictures, videos */ + unsigned int pics_videos_size = 0; + temp_size = ((float)ad->pics_videos_status.dTotal / ad->internal_status.dTotal) * width; + if (temp_size < 1 && temp_size > 0) { + pics_videos_size = 1; + } else { + pics_videos_size = (unsigned int)temp_size; + } + if (pics_videos_size > 0) { + Evas_Object *pics = NULL; + pics = evas_object_image_add(evas); + evas_object_size_hint_weight_set(pics, 0.0, EVAS_HINT_EXPAND); + evas_object_image_load_size_set(pics, pics_videos_size, height); + evas_object_image_file_set(pics, SETTING_STORAGE_PICS_ICON_PATH, NULL); + evas_object_image_fill_set(pics, 0, 0, pics_videos_size, height); + evas_object_size_hint_min_set(pics, pics_videos_size, height); + evas_object_show(pics); + elm_box_pack_end(status_box, pics); + } + + /* downloads */ + unsigned int downloads_size = 0; + temp_size = ((float)ad->downloads_status.dTotal / ad->internal_status.dTotal) * width; + if (temp_size < 1 && temp_size > 0) { + downloads_size = 1; + } else { + downloads_size = (unsigned int)temp_size; + } + if (downloads_size > 0) { + Evas_Object *downs = NULL; + downs = evas_object_image_add(evas); + evas_object_size_hint_weight_set(downs, 0.0, EVAS_HINT_EXPAND); + evas_object_image_load_size_set(downs, downloads_size, height); + evas_object_image_file_set(downs, SETTING_STORAGE_DOWNS_ICON_PATH, NULL); + evas_object_image_fill_set(downs, 0, 0, downloads_size, height); + evas_object_size_hint_min_set(downs, downloads_size, height); + evas_object_show(downs); + elm_box_pack_end(status_box, downs); + } + + /* Miscellaneous files */ + unsigned int others_size = 0; + temp_size = ((float)ad->others_status.dTotal / ad->internal_status.dTotal) * width; + if (temp_size < 1 && temp_size > 0) { + others_size = 1; + } else { + others_size = (unsigned int)temp_size; + } + if (others_size > 0) { + Evas_Object *misc = NULL; + misc = evas_object_image_add(evas); + evas_object_size_hint_weight_set(misc, 0.0, EVAS_HINT_EXPAND); + evas_object_image_load_size_set(misc, others_size, height); + evas_object_image_file_set(misc, SETTING_STORAGE_MISCES_ICON_PATH, NULL); + evas_object_image_fill_set(misc, 0, 0, others_size, height); + evas_object_size_hint_min_set(misc, others_size, height); + evas_object_show(misc); + elm_box_pack_end(status_box, misc); + } + + /* available */ + unsigned int avail_size = 0; + temp_size = ((float)ad->internal_status.dAvail / ad->internal_status.dTotal) * width; + if (temp_size < 1 && temp_size > 0) { + avail_size = 1; + } else { + avail_size = (unsigned int)temp_size; + } + if (avail_size > 0) { + Evas_Object *avail = NULL; + avail = evas_object_image_add(evas); + evas_object_size_hint_weight_set(avail, 0.0, EVAS_HINT_EXPAND); + evas_object_image_load_size_set(avail, avail_size, height); + evas_object_image_file_set(avail, SETTING_STORAGE_AVAIL_ICON_PATH, NULL); + evas_object_image_fill_set(avail, 0, 0, avail_size, height); + evas_object_size_hint_min_set(avail, avail_size, height); + evas_object_show(avail); + elm_box_pack_end(status_box, avail); + } + + return status_box; + } + return NULL; +} + +static void __gl_del(void *data, Evas_Object *obj) +{ + /* SETTING_TRACE_BEGIN; */ + Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) data; + FREE(item_data); +} + +static int __setting_storage_main_fs_stat(double *total, double *avail, const char *path) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(NULL == total || NULL == avail, SETTING_RETURN_FAIL, "Null output parameters"); + + struct statvfs s; + + if (!statvfs(path, &s)) { + SETTING_TRACE("f_bsize = %ld f_blocks = %ld f_bavail = %ld f_frsize = %ld", + s.f_bsize, s.f_blocks, s.f_bavail, s.f_frsize); + *total = (double)s.f_frsize * s.f_blocks; + *avail = (double)s.f_bsize * s.f_bavail; + } else { + return SETTING_RETURN_FAIL; + } + + return SETTING_RETURN_SUCCESS; +} + +static int __setting_storage_main_file_stat_get(const char *filename, Node_Info **node) +{ + setting_retvm_if(!filename || !node, SETTING_RETURN_FAIL, "NULL input parameters"); + struct stat statbuf; + if (stat(filename, &statbuf) == -1) { + SETTING_TRACE_ERROR("failed to call stat"); + return SETTING_RETURN_FAIL; + } + + if (*node == NULL) { + SETTING_TRACE_ERROR("node is NULL"); + return SETTING_RETURN_FAIL; + } + + (*node)->size = statbuf.st_size; + + return SETTING_RETURN_SUCCESS; +} + +static int __setting_storage_main_file_list_get(char *path, Eina_List **dir_list, Eina_List **file_list) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(NULL == path, SETTING_RETURN_FAIL, "path is NULL"); + + DIR *pDir = NULL; + struct dirent *ent = NULL; + char childpath[SETTING_STORAGE_CHILDPATH_LEN] = {0,}; + + pDir = opendir(path); + setting_retvm_if(NULL == pDir, SETTING_RETURN_FAIL, "pDir is NULL"); + + while ((ent = readdir(pDir)) != NULL) { + if (safeStrCmp(ent->d_name, ".") == 0 || safeStrCmp(ent->d_name, "..") == 0) { + continue; + } + /*only deal with dirs and regular files*/ + if ((ent->d_type & DT_DIR) == 0 && (ent->d_type & DT_REG) == 0) { + continue; + } + + Node_Info *pNode = (Node_Info *)malloc(sizeof(Node_Info)); + + if (pNode == NULL) { + continue; + } + + memset(pNode, 0, sizeof(Node_Info)); + /*get path*/ + g_strlcpy(pNode->path, path, (gsize) sizeof(pNode->path)); + + /*get name*/ + g_strlcpy(pNode->name, ent->d_name, (gsize) sizeof(pNode->name)); + + /*get size*/ + int copiednum = g_sprintf(childpath, "%s/%s", path, ent->d_name); + if (copiednum < 0) { + FREE(pNode); + continue; + } + if (__setting_storage_main_file_stat_get(childpath, &pNode) == SETTING_RETURN_FAIL) { + FREE(pNode); + continue; + } + + if (ent->d_type & DT_DIR) { + *dir_list = eina_list_append(*dir_list, pNode); + } else { + *file_list = eina_list_append(*file_list, pNode); + } + } + closedir(pDir); + + return SETTING_RETURN_SUCCESS; +} + +static int __setting_storage_main_list_len_get(const Eina_List *list) +{ + if (list == NULL) + return 0; + + return eina_list_count(list); +} + +static long __setting_storage_main_folder_size_get(char *path) +{ + SETTING_TRACE_BEGIN; + setting_retvm_if(NULL == path, SETTING_RETURN_FAIL, "path is NULL"); + + unsigned long size = 0; + Eina_List *file_list = NULL; + Eina_List *dir_list = NULL; + + if (ecore_file_is_dir(path)) { + int ret = SETTING_RETURN_FAIL; + ret = __setting_storage_main_file_list_get(path, &dir_list, &file_list); + + if (ret == SETTING_RETURN_SUCCESS) { + int i = 0; + int dir_list_len = __setting_storage_main_list_len_get(dir_list); + int file_list_len = __setting_storage_main_list_len_get(file_list); + SETTING_TRACE("dir_list_len is [%d] file_list_len is [%d]", dir_list_len, file_list_len); + for (i = 0; i < file_list_len; i++) { + Node_Info *pNode = NULL; + pNode = (Node_Info *)eina_list_nth(file_list, i); + if (pNode == NULL) + continue; + size += pNode->size; + } + for (i = 0; i < dir_list_len; i++) { + Node_Info *pNode = NULL; + char *full_path = NULL; + pNode = (Node_Info *)eina_list_nth(dir_list, i); + if (pNode == NULL) + continue; + full_path = g_strconcat(pNode->path, "/", pNode->name, NULL); + SETTING_TRACE("full_path is [%s]", full_path); + size += (__setting_storage_main_folder_size_get(full_path)); + FREE(full_path); + } + } + } + + if (file_list) { + eina_list_free(file_list); + file_list = NULL; + } + + if (dir_list) { + eina_list_free(dir_list); + dir_list = NULL; + } + + return size; +} + +static int __setting_storage_status_size_transition(double size, char *size_desc) +{ + SETTING_TRACE_BEGIN; + SETTING_TRACE("size = %f", size); + double tmp_size = 0.0; + int ret = 0; + if (size < SETTING_STORAGE_MEGABYTE_VALUE) { // size < 1MB: show x.xKB + tmp_size = size / SETTING_STORAGE_KILOBYTE_VALUE; + ret = snprintf(size_desc, SETTING_STORAGE_MAX_STR_LEN, "%4.2lf%s", tmp_size, "KB"); + retv_if(ret < 0, SETTING_RETURN_FAIL); + } else if (size < SETTING_STORAGE_GIGABYTE_VALUE) { // size < 1GB: show x.xMB + tmp_size = size / SETTING_STORAGE_MEGABYTE_VALUE; + ret = snprintf(size_desc, SETTING_STORAGE_MAX_STR_LEN, "%4.2lf%s", tmp_size, "MB"); + retv_if(ret < 0, SETTING_RETURN_FAIL); + } else { // 1G <= size: show x.xGB + tmp_size = size / SETTING_STORAGE_GIGABYTE_VALUE; + ret = snprintf(size_desc, SETTING_STORAGE_MAX_STR_LEN, "%4.2lf%s", tmp_size, "GB"); + retv_if(ret < 0, SETTING_RETURN_FAIL); + } + + return SETTING_RETURN_SUCCESS; +} + + +static void __setting_storage_main_internal_storage_status_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + double dTotal = 0.0; + double dAvail = 0.0; + int ret = SETTING_RETURN_SUCCESS; + Setting_Storage_Status internal_status; + + ret = __setting_storage_main_fs_stat(&dTotal, &dAvail, SETTING_STORAGE_OPT_PATH); + setting_retm_if(ret == SETTING_RETURN_FAIL, "get opt status failed"); + internal_status.dTotal = dTotal; + internal_status.dAvail = dAvail; + + dTotal = 0.0; + dAvail = 0.0; + ret = __setting_storage_main_fs_stat(&dTotal, &dAvail, SETTING_STORAGE_MEDIA_PATH); + setting_retm_if(ret == SETTING_RETURN_FAIL, "get media status failed"); + internal_status.dTotal += dTotal; + internal_status.dAvail += dAvail; + + ad->internal_status = internal_status; +} + +static void __setting_storage_main_pictures_videos_status_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + double dTotal = 0.0; + int ret = SETTING_RETURN_SUCCESS; + Setting_Storage_Status pics_videos_status; + + dTotal = __setting_storage_main_folder_size_get(SETTING_STORAGE_PICTURES_PATH); + setting_retm_if(ret == SETTING_RETURN_FAIL, "get pictures status failed"); + pics_videos_status.dTotal = dTotal; + //SETTING_TRACE("pics_videos_status = %f", dTotal); + + dTotal = 0.0; + dTotal = __setting_storage_main_folder_size_get(SETTING_STORAGE_VIDEOS_PATH); + setting_retm_if(ret == SETTING_RETURN_FAIL, "get video status failed"); + //SETTING_TRACE("pics_videos_status = %f", dTotal); + pics_videos_status.dTotal += dTotal; + + //SETTING_TRACE("pics_videos_status = %f", pics_videos_status.dTotal); + + ad->pics_videos_status = pics_videos_status; +} + +static void __setting_storage_main_downloads_status_get(void *data) +{ + SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "Data parameter is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) data; + + double dTotal = 0.0; + int ret = SETTING_RETURN_SUCCESS; + Setting_Storage_Status downloads_status; + + dTotal = __setting_storage_main_folder_size_get(SETTING_STORAGE_DOWNLOADS_PATH); + setting_retm_if(ret == SETTING_RETURN_FAIL, "get pictures status failed"); + downloads_status.dTotal = dTotal; + + //SETTING_TRACE("downloads_status = %f", dTotal); + + ad->downloads_status = downloads_status; +} + +static void __setting_storage_main_launch_ug_destroy_cb(ui_gadget_h ug, void *priv) +{ + SETTING_TRACE_BEGIN; + /* restore the '<-' button on the navigate bar */ + retm_if(priv == NULL, "priv is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) priv; + if (ug) { + ug_destroy(ug); + } + Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navibar); + retm_if(navi_it == NULL, "navi_it is NULL"); + Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn"); + + if (back_btn != NULL) { + elm_object_style_set(back_btn, NAVI_BACK_BUTTON_STYLE); /* take into effect */ + } +} + +static void __setting_storage_main_launch_ug_layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) +{ + SETTING_TRACE_BEGIN; + retm_if(priv == NULL, "priv is NULL"); + SettingStorageUG *ad = (SettingStorageUG *) priv; + Evas_Object *base = NULL; + base = (Evas_Object *) ug_get_layout(ug); + retm_if(base == NULL, "base is NULL"); + + switch (mode) { + case UG_MODE_FULLVIEW: + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(ad->win_get, base); + evas_object_show(base); + break; + default: + /* do nothing */ + break; + } +} + +static void __setting_storage_main_launch_manage_app_ug(void *data) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retm_if(data == NULL, "Data parameter is NULL"); + + SettingStorageUG *ad = (SettingStorageUG *) data; + + service_h svc; + if (service_create(&svc)) { + return; + } + + service_add_extra_data(svc, "viewtype", "manage-applications"); + + struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); + if (!cbs) { + SETTING_TRACE_ERROR("calloc failed"); + service_destroy(svc); + return; + } + cbs->layout_cb = __setting_storage_main_launch_ug_layout_cb; + cbs->result_cb = NULL; + cbs->destroy_cb = __setting_storage_main_launch_ug_destroy_cb; + cbs->priv = (void *)ad; + + ui_gadget_h ug = ug_create(ad->ug, "setting-manage-applications-efl", UG_MODE_FULLVIEW, svc, cbs); + if (NULL == ug) { /* error handling */ + SETTING_TRACE_ERROR("NULL == ug"); + } + + //bundle_free(b); + service_destroy(svc); + FREE(cbs); +} + +static void __setting_storage_main_Gendial_mouse_up_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + Elm_Object_Item *item = (Elm_Object_Item *) event_info; + elm_genlist_item_selected_set(item, 0); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + SettingStorageUG *ad = (SettingStorageUG *) data; + + SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); + + if (!safeStrCmp("IDS_ST_BODY_APPLICATIONS", list_item->keyStr)) { + __setting_storage_main_launch_manage_app_ug(ad); + } else { + // do nothing now + } +} + +/* *************************************************** + * + *basic func + * + ***************************************************/ +static int setting_storage_main_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingStorageUG *ad = (SettingStorageUG *) cb; + + retvm_if(ad->win_main_layout == NULL, SETTING_DRAW_ERR_FAIL_LOAD_EDJ, + "win_main_layout is NULL"); + + int ret = SETTING_RETURN_SUCCESS; + + ad->ly_main = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _(KeyStr_Storage), + _("IDS_COM_BODY_BACK"), + NULL, + __setting_storage_main_click_softkey_back_cb, + NULL, + ad, &ad->genlist, &ad->navibar); + + setting_create_Gendial_field_titleItem(ad->genlist, &(ad->itc_group_item), + SETTING_STORAGE_INTERNAL_STORAGE_STR, + NULL); + + ad->itc_1icon.item_style = "dialogue/1icon"; + ad->itc_1icon.func.text_get = NULL; + ad->itc_1icon.func.content_get = __gl_content_get; + ad->itc_1icon.func.state_get = NULL; + ad->itc_1icon.func.del = __gl_del; + + __setting_storage_main_internal_storage_status_get(ad); + + __setting_storage_main_pictures_videos_status_get(ad); + + __setting_storage_main_downloads_status_get(ad); + + /* status */ + ad->internal = (Setting_GenGroupItem_Data *) calloc(1, sizeof(Setting_GenGroupItem_Data)); + setting_retvm_if(!ad->internal, SETTING_RETURN_FAIL, "calloc failed"); + + if (ad->internal) { + ad->internal->userdata = ad; + ad->internal->item = elm_genlist_item_append(ad->genlist, &(ad->itc_1icon), ad->internal, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(ad->internal->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->internal is NULL"); + return SETTING_RETURN_FAIL; + } + + /* Total space */ + char total_desc[SETTING_STORAGE_MAX_STR_LEN + 1] = {0,}; + ret = __setting_storage_status_size_transition(ad->internal_status.dTotal, total_desc); + setting_retvm_if(ret == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, "failed to transform") + + ad->total = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_2), NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, "IDS_ST_BODY_TOTAL_SPACE", + total_desc, NULL); + if (ad->total) { + ad->total->userdata = ad; + elm_genlist_item_select_mode_set(ad->total->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->total is NULL"); + return SETTING_RETURN_FAIL; + } + + /* Applications */ + ad->apps_status.dTotal = 230.45 * 1024 * 1024; /* for test*/ + char apps_desc[SETTING_STORAGE_MAX_STR_LEN + 1] = {0,}; + ret = __setting_storage_status_size_transition(ad->apps_status.dTotal, apps_desc); + setting_retvm_if(ret == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, "failed to transform") + + ad->apps = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_1icon_3), + __setting_storage_main_Gendial_mouse_up_cb, + ad, SWALLOW_Type_INVALID, SETTING_STORAGE_APPS_ICON_PATH, + NULL, 0, "IDS_ST_BODY_APPLICATIONS", + apps_desc, NULL); + if (ad->apps) { + ad->apps->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->apps is NULL"); + return SETTING_RETURN_FAIL; + } + + /* Pictures, Videos */ + char pics_videos_desc[SETTING_STORAGE_MAX_STR_LEN + 1] = {0,}; + ret = __setting_storage_status_size_transition(ad->pics_videos_status.dTotal, pics_videos_desc); + setting_retvm_if(ret == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, "failed to transform") + ad->pics_videos = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_1icon_3), NULL, + ad, SWALLOW_Type_INVALID, SETTING_STORAGE_PICS_ICON_PATH, + NULL, 0, SETTING_STORAGE_PICS_STR, + pics_videos_desc, NULL); + if (ad->pics_videos) { + ad->pics_videos->userdata = ad; + elm_genlist_item_select_mode_set(ad->pics_videos->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->pics_videos is NULL"); + return SETTING_RETURN_FAIL; + } + + /* Downloads */ + char downloads_desc[SETTING_STORAGE_MAX_STR_LEN + 1] = {0,}; + ret = __setting_storage_status_size_transition(ad->downloads_status.dTotal, downloads_desc); + setting_retvm_if(ret == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, "failed to transform") + ad->downloads = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_1icon_3), NULL, + ad, SWALLOW_Type_INVALID, SETTING_STORAGE_DOWNS_ICON_PATH, + NULL, 0, SETTING_STORAGE_DOWNS_STR, + downloads_desc, + NULL); + if (ad->downloads) { + ad->downloads->userdata = ad; + elm_genlist_item_select_mode_set(ad->downloads->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->downloads is NULL"); + return SETTING_RETURN_FAIL; + } + + /* Miscellaneous files */ + ad->others_status.dTotal = ad->internal_status.dTotal - ad->internal_status.dAvail + - ad->apps_status.dTotal - ad->pics_videos_status.dTotal - ad->downloads_status.dTotal; + ad->others_status.dAvail = 0.0; + char others_desc[SETTING_STORAGE_MAX_STR_LEN + 1] = {0,}; + ret = __setting_storage_status_size_transition(ad->others_status.dTotal, others_desc); + setting_retvm_if(ret == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, "failed to transform") + + ad->others = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_1icon_3), NULL, + ad, SWALLOW_Type_INVALID, SETTING_STORAGE_MISCES_ICON_PATH, + NULL, 0, SETTING_STORAGE_MISCES_STR, + others_desc, NULL); + if (ad->others) { + ad->others->userdata = ad; + elm_genlist_item_select_mode_set(ad->others->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->others is NULL"); + return SETTING_RETURN_FAIL; + } + + /* Available */ + char avail_desc[SETTING_STORAGE_MAX_STR_LEN + 1] = {0,}; + ret = __setting_storage_status_size_transition(ad->internal_status.dAvail, avail_desc); + setting_retvm_if(ret == SETTING_RETURN_FAIL, SETTING_RETURN_FAIL, "failed to transform") + + ad->avail = setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_1icon_3), NULL, + ad, SWALLOW_Type_INVALID, SETTING_STORAGE_AVAIL_ICON_PATH, + NULL, 0, SETTING_STORAGE_AVAIL_STR, + avail_desc, NULL); + if (ad->avail) { + ad->avail->userdata = ad; + elm_genlist_item_select_mode_set(ad->avail->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + } else { + SETTING_TRACE_ERROR("ad->avail is NULL"); + return SETTING_RETURN_FAIL; + } + + /* Format USB storage */ + setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, + SETTING_STORAGE_FORMAT_STR, + NULL, NULL); + + setting_create_Gendial_field_def(ad->genlist, &(ad->itc_bg_1icon), NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, + NULL, NULL, 0, SETTING_STORAGE_FORMAT_DESC_STR, NULL, + NULL); + + setting_create_Gendial_field_titleItem(ad->genlist, &(ad->itc_group_item), + "IDS_ST_BODY_SD_CARD", + NULL); + + /* Mound SD card */ + setting_create_Gendial_field_def(ad->genlist, &(ad->itc_2text_2), NULL, + ad, SWALLOW_Type_INVALID, NULL, + NULL, 0, SETTING_STORAGE_MOUNT_STR, + _(SETTING_STORAGE_INSERT_STR), + NULL); + + Elm_Object_Item *item = NULL; + item = elm_genlist_item_append(ad->genlist, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + setting_view_storage_main.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_storage_main_destroy(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingStorageUG *ad = (SettingStorageUG *) cb; + + if (ad->popup) { + evas_object_del(ad->popup); + ad->popup = NULL; + } + + if (ad->ly_main != NULL) { + evas_object_del(ad->ly_main); + setting_view_storage_main.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_storage_main_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingStorageUG *ad = (SettingStorageUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_show(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_storage_main_cleanup(void *cb) +{ + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingStorageUG *ad = (SettingStorageUG *) cb; + + if (ad->ly_main != NULL) { + evas_object_hide(ad->ly_main); + } + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void __setting_storage_main_click_softkey_back_cb(void *data, Evas_Object *obj, + void *event_info) +{ + /* error check */ + ret_if(data == NULL); + + SettingStorageUG *ad = (SettingStorageUG *) data; + /* Send destroy request */ + ug_destroy_me(ad->ug); +} diff --git a/setting-storage/src/setting-storage.c b/setting-storage/src/setting-storage.c new file mode 100755 index 0000000..999f085 --- /dev/null +++ b/setting-storage/src/setting-storage.c @@ -0,0 +1,198 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +static void setting_storage_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, + void *event_info) +{ + SettingStorageUG *ad = (SettingStorageUG *) data; + setting_view_update(&setting_view_storage_main, ad); +} + +static void *setting_storage_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) +{ + setting_retvm_if((!ug || !priv), NULL, "!ug || !priv"); + + SettingStorageUG *storageUG = priv; + storageUG->ug = ug; + storageUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + storageUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(storageUG->win_main_layout); + storageUG->evas = evas_object_evas_get(storageUG->win_main_layout); + + setting_retvm_if(storageUG->win_main_layout == NULL, NULL, "cannot get main window "); + + storageUG->itc_seperator.item_style = "dialogue/separator/21/with_line"; + storageUG->itc_seperator.func.text_get = NULL; + storageUG->itc_seperator.func.content_get = NULL; + storageUG->itc_seperator.func.state_get = NULL; + storageUG->itc_seperator.func.del = NULL; + + setting_create_Gendial_itc("dialogue/2text.3/expandable", &(storageUG->itc_2text_3_parent)); + setting_create_Gendial_itc("dialogue/1text.1icon/expandable2", &(storageUG->itc_1icon_1text_sub)); + setting_create_Gendial_itc("dialogue/2text.3", &(storageUG->itc_2text_2)); + setting_create_Gendial_itc("dialogue/1text.1icon.2", &(storageUG->itc_1text_1icon_2)); + setting_create_Gendial_itc("dialogue/title", &(storageUG->itc_group_item)); + setting_create_Gendial_itc("multiline/1text", &(storageUG->itc_bg_1icon)); + setting_create_Gendial_itc("dialogue/2text.1icon.3", &(storageUG->itc_2text_1icon_3)); + setting_create_Gendial_itc("dialogue/1text", &(storageUG->itc_1text)); + + /* creating a view. */ + setting_view_create(&setting_view_storage_main, (void *)storageUG); + evas_object_event_callback_add(storageUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_storage_ug_cb_resize, storageUG); + return storageUG->ly_main; +} + +static void setting_storage_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_storage_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_storage_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_storage_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!ug || !priv), "!ug || !priv"); + SettingStorageUG *storageUG = priv; + + evas_object_event_callback_del(storageUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_storage_ug_cb_resize); /* fix flash issue for gallery */ + storageUG->ug = ug; + + /* delete the allocated objects. */ + setting_view_destroy(&setting_view_storage_main, storageUG); + if (NULL != ug_get_layout(storageUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(storageUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(storageUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_storage_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_storage_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + switch (event) { + case UG_EVENT_LOW_MEMORY: + break; + case UG_EVENT_LOW_BATTERY: + break; + case UG_EVENT_LANG_CHANGE: + break; + case UG_EVENT_ROTATE_PORTRAIT: + break; + case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN: + break; + case UG_EVENT_ROTATE_LANDSCAPE: + break; + case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN: + break; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_storage_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + if (!ug) + return; + + switch (event) { + case UG_KEY_EVENT_END: + ug_destroy_me(ug); + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingStorageUG *storageUG = calloc(1, sizeof(SettingStorageUG)); + setting_retvm_if(!storageUG, -1, "Create SettingStorageUG obj failed"); + + ops->create = setting_storage_ug_on_create; + ops->start = setting_storage_ug_on_start; + ops->pause = setting_storage_ug_on_pause; + ops->resume = setting_storage_ug_on_resume; + ops->destroy = setting_storage_ug_on_destroy; + ops->message = setting_storage_ug_on_message; + ops->event = setting_storage_ug_on_event; + ops->key_event = setting_storage_ug_on_key_event; + ops->priv = storageUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingStorageUG *storageUG; + setting_retm_if(!ops, "ops == NULL"); + + storageUG = ops->priv; + if (storageUG) { + FREE(storageUG); + } +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/** +* Reset function to 'reset' the settings of the UG, it will be invoked by 'Reset' UG +*/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + int ret = 0; + return ret; +} diff --git a/setting-time/CMakeLists.txt b/setting-time/CMakeLists.txt index 71292d5..1825d2d 100755 --- a/setting-time/CMakeLists.txt +++ b/setting-time/CMakeLists.txt @@ -3,7 +3,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) INCLUDE(FindPkgConfig) -pkg_check_modules(pkgs_time REQUIRED evas elementary appcore-common appcore-efl ecore tapi heynoti ui-gadget bundle sysman pmapi icu-i18n icu-io icu-le icu-lx icu-uc) +pkg_check_modules(pkgs_time REQUIRED evas elementary appcore-common appcore-efl ecore tapi heynoti ui-gadget-1 capi-appfw-application sysman pmapi icu-i18n icu-io icu-le icu-lx icu-uc) FOREACH(flag ${pkgs_time_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") diff --git a/setting-time/include/setting-time-engine.h b/setting-time/include/setting-time-engine.h index c436f4e..5521ec0 100755 --- a/setting-time/include/setting-time-engine.h +++ b/setting-time/include/setting-time-engine.h @@ -1,18 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_TIME_ENGINE_H__ #define __SETTING_TIME_ENGINE_H__ @@ -23,6 +28,6 @@ int setting_save_time(time_t _time); -Eina_Bool setting_time_update_cb(void *data); +int setting_time_update_cb(void *data); #endif /* __SETTING_TIME_ENGINE_H__ */ diff --git a/setting-time/include/setting-time-main.h b/setting-time/include/setting-time-main.h index 4a47ddf..2807ec2 100755 --- a/setting-time/include/setting-time-main.h +++ b/setting-time/include/setting-time-main.h @@ -1,18 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_TIME_MAIN_H__ #define __SETTING_TIME_MAIN_H__ @@ -24,6 +29,9 @@ #define GMT_BUF_SIZE 10 #define __MAX_PATH_SIZE 1024 + +/* TODO once time changes, heynoti message is sent. + need to see this is proper design */ #define TIME_CHANGED_HEYNOTY_CALLBACK 1 #define SETTING_TIME_ZONEINFO_PATH "/usr/share/zoneinfo/" @@ -34,8 +42,6 @@ void setting_time_main_launch_worldclock_sg(void *data); void setting_time_main_close_worldclock_sg(gpointer cb_data, gint argc, gchar **argv); -Eina_Bool setting_time_main_set_date_time_substring(SettingTimeUG *ad); - void setting_time_main_click_softkey_left_cb(void *data, Evas_Object *obj, void *event_info); void setting_time_main_click_softkey_caller_exist_left_cb(void *data, diff --git a/setting-time/include/setting-time.h b/setting-time/include/setting-time.h old mode 100644 new mode 100755 index 6034e9b..6e39f34 --- a/setting-time/include/setting-time.h +++ b/setting-time/include/setting-time.h @@ -1,18 +1,23 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #ifndef __SETTING_TIME_H__ #define __SETTING_TIME_H__ @@ -22,41 +27,39 @@ #include #include #include - -#include #include #include -#include -#include -#include #include #include #include +#define ERR_BIGGER_THAN_2037 "Cannot Set the year bigger than 2037" +#define AUTO_TIME_UPDATE_ON "Automatic time update is ON!" +#define SETTING_TIME_AUTO_UPDATE_DESC "Use network-provided time information" typedef struct _SettingTimeUG SettingTimeUG; /** * Setting Time UG context - * all UG function has void* as an agument. this is casted back to SettingTimeUG + * all UG function has void* as an agument. this is casted back to SettingTimeUG * and the functions access app context. */ struct _SettingTimeUG { - struct ui_gadget *ug; /**< ug struct itself */ + ui_gadget_h ug; /**< ug struct itself */ /* add more variables here (move your appdata to here) */ int noti_fd; - bundle *bundle_data; /**< ug input data (key / value) */ + service_h bundle_data; /**< when loading this UG, bundle is stored */ Evas *evas; Evas_Object *win_main_layout; Evas_Object *win_get; Evas_Object *ly_main; - struct ui_gadget *ug_loading; + ui_gadget_h ug_loading; Evas_Object *navi_bar; Evas_Object *scrl_main; diff --git a/setting-time/src/setting-time-engine.c b/setting-time/src/setting-time-engine.c index b7c053e..cee9b35 100755 --- a/setting-time/src/setting-time-engine.c +++ b/setting-time/src/setting-time-engine.c @@ -1,33 +1,41 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ #include /* To set system time takes some time. It makes some time before firing heynoti of setting_time_changed.*/ -Eina_Bool setting_time_update_cb(void *data) +int setting_time_update_cb(void *data) { + /* time_t time_input = (time_t)data; */ + char time_str[SETTING_TIME_ENGINE_TIME_STR_LEN]; struct tm *ts; struct tm ts_ret; time_t ctime; - retv_if(data == NULL, ECORE_CALLBACK_CANCEL); + retv_if(data == NULL, -1); SettingTimeUG *ad = data; // get time from datefield UI ctime = ad->changed_time; + //ctime = time(NULL); ts = localtime_r(&ctime, &ts_ret); retv_if(!ts, 1); strftime(time_str, SETTING_TIME_ENGINE_TIME_STR_LEN, "%H:%M", &ts_ret); @@ -41,8 +49,5 @@ Eina_Bool setting_time_update_cb(void *data) evas_object_del(ad->pop_progress); ad->pop_progress = NULL; } - /* other module (ex. Indicator ) receives SETTING_TIME_CHANGED heynoti */ - heynoti_publish(SETTING_TIME_CHANGED); - ad->heynoti_timer = NULL; - return ECORE_CALLBACK_CANCEL; + return 0; } diff --git a/setting-time/src/setting-time-main.c b/setting-time/src/setting-time-main.c index f03df69..e147b93 100755 --- a/setting-time/src/setting-time-main.c +++ b/setting-time/src/setting-time-main.c @@ -1,33 +1,56 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + #include #include #include #include +#include +#include +#include +#include + #include #include #include #include #include +#define ONE_MINUTE 60 +#define PROGRESS_POPUP_SHOW 0 + /* ICU utilities*/ static UChar *uastrcpy(const char *chars); static void ICU_set_timezone(const char *timezone); static int get_timezone_isdst(int* isdst); +static void get_gmt_offset(char* str_buf); + +static char* get_timezone_str(); +static char* get_city_name_result(); +static bool get_city_name(char* tzname); + +static char* s_result; +static int query_callback(void *NotUsed, int argc, char **argv, char **azColName); + static int setting_time_main_create(void *cb); static int setting_time_main_destroy(void *cb); @@ -49,6 +72,12 @@ void time_changed_callback(void *data) { SETTING_TRACE_DEBUG("time and timezone have been changed: TIME_CHANGED_HEYNOTY_CALLBACK"); SettingTimeUG *ad = (SettingTimeUG *)data; + + int ret = setting_time_update_cb(ad); + if (ret != 0) { + SETTING_TRACE("FAIL: setting_time_update_db(ad)\n"); + } + if(EINA_TRUE == ad->is_datefield_selected) { /* Timezone is not changed and a selected value of the datefield is already changed */ SETTING_TRACE("Datefield is selected\n"); @@ -100,9 +129,7 @@ void setting_time_update_time_date_format_string(SettingTimeUG *ad) ret_if(!ts); /* set time in particular format */ - ret = - setting_get_int_slp_key(INT_SLP_SETTING_REGIONFORMAT_TIME1224, - &value, &err); + ret = setting_get_int_slp_key(INT_SLP_SETTING_REGIONFORMAT_TIME1224, &value, &err); if (ret == SETTING_RETURN_FAIL) value = VCONFKEY_TIME_FORMAT_12; @@ -142,19 +169,18 @@ bool setting_update_timezone(SettingTimeUG *ad) pa_city = vconf_get_str(VCONFKEY_SETAPPL_CITYNAME_INDEX_INT); pa_timezone = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_INT); - if ((pa_timezone != NULL) - && (_(pa_city) != NULL && safeStrCmp(_(pa_city), "NULL"))) { + //if ((pa_timezone != NULL) && (_(pa_city) != NULL && safeStrCmp(_(pa_city), "NULL"))) { + if ((pa_timezone != NULL) && (_(pa_city) != NULL )) { + /* SETTING_TRACE_DEBUG("*** timezone: %s *** ", timezone); */ + /* SETTING_TRACE_DEBUG("*** city: %s *** ", _(city)); */ + /* SETTING_TRACE_DEBUG("*** ret: %d, dst: %d *** ", ret, dst); */ - ret = snprintf(time_zone_sub_str, - CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT %s", - _(pa_city), pa_timezone); + ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT %s", _(pa_city), pa_timezone); + //ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT %s", pa_timezone, _(pa_city)); FREE(pa_city); retv_if(ret < 0, 0); } else { - ret = - snprintf(time_zone_sub_str, - CITY_BUF_SIZE + GMT_BUF_SIZE + 2, - "%s, GMT +09", _("IDS_WCL_BODY_CITYNAME_SEOUL")); + ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT +09", _("IDS_WCL_BODY_CITYNAME_SEOUL")); retv_if(ret < 0, 0); } SETTING_TRACE("ad->data_tz:%p", ad->data_tz); @@ -176,13 +202,15 @@ bool __update_timezone_idler(SettingTimeUG *ad) static void setting_time_main_int_vconf_change_cb(keynode_t *key, void *data) { - SETTING_TRACE_BEGIN; + /* SETTING_TRACE_BEGIN; */ ret_if(NULL == data); SettingTimeUG *ad = data; int status = vconf_keynode_get_int(key); char *vconf_name = vconf_keynode_get_name(key); + /* SETTING_TRACE("vconf_name:%s", vconf_name); */ if (!safeStrCmp(vconf_name, VCONFKEY_REGIONFORMAT_TIME1224)) { + if (ad->data_time) { /* VCONFKEY_REGIONFORMAT_TIME1224 1:12H 2:24H */ if (status <= 2 && status > 0) /* 1, 2 */ @@ -203,6 +231,14 @@ static void setting_time_main_int_vconf_change_cb(keynode_t *key, void *data) time_format = "%H : %M"; } +//get date format from datefiled itself, if elm_datetime_add() supports set date-format via ICU. +#ifdef SUPPORT_DATEFIELD_DATE_FORMAT_AUTOSET + const char *old_format = elm_datetime_format_get(ad->data_time->eo_check); + snprintf(datefield_format, MAX_DATE_FORMAT_LEN + 1, //add one space " " + "%s", old_format); + safeStrNCat(datefield_format, time_format, MAX_DATETIME_FORMAT_LEN); + SETTING_TRACE("datefield_format:%s", datefield_format); +#else int value = SETTING_DATE_FORMAT_DD_MM_YYYY; int err = -1; @@ -211,8 +247,9 @@ static void setting_time_main_int_vconf_change_cb(keynode_t *key, void *data) if (ret == SETTING_RETURN_FAIL) value = SETTING_DATE_FORMAT_DD_MM_YYYY; - snprintf(datefield_format, MAX_DATETIME_FORMAT_LEN, + snprintf(datefield_format, MAX_DATETIME_FORMAT_LEN, "%s %s", date_format_str[value], time_format); +#endif elm_datetime_format_set(ad->data_time->eo_check, datefield_format); } @@ -224,7 +261,6 @@ static void setting_time_main_int_vconf_change_cb(keynode_t *key, void *data) *basic func * ***************************************************/ -#define ONE_MINUTE 60 static void setting_time_main_datefield_change_cb(void *data, Evas_Object *obj, void *event_info) { @@ -247,76 +283,72 @@ static void setting_time_main_datefield_change_cb(void *data, Evas_Object *obj, } else { // otherwise, we apply a new date which has been changed by a user } - + struct tm _tm; elm_datetime_value_get(obj, &_tm); - SETTING_TRACE("year : %d, month : %d, day : %d, hour : %d, min : %d", _tm.tm_year, _tm.tm_mon, _tm.tm_mday, _tm.tm_hour, _tm.tm_min); if (2037 < _tm.tm_year) { - setting_create_popup_without_title(ad, ad->win_get, - _("Cannot Set the year bigger than 2037")); + setting_create_simple_popup(ad, ad->win_get, + NULL, _(ERR_BIGGER_THAN_2037)); return; } #if SUPPORT_SCREEN_PROTECTED /* if not lock the current state, after set the time, the screen will become dimmed */ pm_lock_state(LCD_NORMAL, STAY_CUR_STATE, 0); #endif _tm.tm_sec = 0; - + int isdst; if (get_timezone_isdst(&isdst) == SETTING_RETURN_SUCCESS) { _tm.tm_isdst = isdst; } else { - // error + // error SETTING_TRACE_ERROR("get_timezone_isdst() failed"); return; - } + } /* local time -> gmtime */ time_t the_time = mktime(&_tm); /* represent local time */ ad->changed_time = the_time; - if ((time(NULL)/ONE_MINUTE) == (the_time/ONE_MINUTE)) + if ( (time(NULL)/ONE_MINUTE) == (the_time/ONE_MINUTE) ) { SETTING_TRACE("Time is not changed\n"); //current time didn't change return; } - int ret = sysman_set_datetime(the_time); - setting_retm_if(ret == -1, "sysman_set_datetime call failed"); - //---------------------------------------------------------- - - - /* exceptional handling */ - if (ad->heynoti_timer) { - ecore_timer_del(ad->heynoti_timer); - ad->heynoti_timer = NULL; - } - ad->heynoti_timer = ecore_timer_add(1, (Ecore_Task_Cb) setting_time_update_cb, ad); - +#if PROGRESS_POPUP_SHOW + // remove popup if created if (ad->pop_progress) { evas_object_del(ad->pop_progress); ad->pop_progress = NULL; } - ad->pop_progress = setting_create_popup_with_progressbar(ad, ad->win_get, - "pending_list", - NULL, NULL, NULL, 0); + + // create new popup + ad->pop_progress = + setting_create_popup_with_progressbar(ad, ad->win_get, "pending_list", + NULL, NULL, NULL, 0, TRUE, TRUE); +#endif + + // invoke API to change time + int ret = sysman_set_datetime(the_time); + setting_retm_if(ret == -1, "sysman_set_datetime call failed"); SETTING_TRACE_END; } Eina_Bool __refresh_date_timer(void *data) { - //SETTING_TRACE_BEGIN; + SETTING_TRACE_BEGIN; SettingTimeUG *ad = data; if (ad->data_time) { time_t ctime = time(NULL); struct tm ts_ret; struct tm *ts = localtime_r(&ctime, &ts_ret); retv_if(!ts, 1); - + elm_datetime_value_set(ad->data_time->eo_check, &ts_ret); } return 1; @@ -411,39 +443,6 @@ static void __setting_time_main_exp_cb(void *data, Evas_Object *obj, SETTING_WEEKOFDAY_FORMAT_MONDAY, "IDS_ST_BODY_MONDAY", NULL); - setting_create_Gendial_exp_sub_field(scroller, - &(ad->itc_1icon_1text_sub), - NULL, rgd, parentItem, - SWALLOW_Type_1RADIO, rgd, - SETTING_WEEKOFDAY_FORMAT_TUESDAY, - "IDS_ST_BODY_TUESDAY", NULL); - setting_create_Gendial_exp_sub_field(scroller, - &(ad->itc_1icon_1text_sub), - NULL, rgd, parentItem, - SWALLOW_Type_1RADIO, rgd, - SETTING_WEEKOFDAY_FORMAT_WEDNESDAY, - "IDS_ST_BODY_WEDNESDAY", NULL); - setting_create_Gendial_exp_sub_field(scroller, - &(ad->itc_1icon_1text_sub), - NULL, rgd, parentItem, - SWALLOW_Type_1RADIO, rgd, - SETTING_WEEKOFDAY_FORMAT_THURSDAY, - "IDS_ST_BODY_THURSDAY", NULL); - - setting_create_Gendial_exp_sub_field(scroller, - &(ad->itc_1icon_1text_sub), - NULL, rgd, parentItem, - SWALLOW_Type_1RADIO, rgd, - SETTING_WEEKOFDAY_FORMAT_FRIDAY, - "IDS_ST_BODY_FRIDAY", NULL); - - setting_create_Gendial_exp_sub_field(scroller, - &(ad->itc_1icon_1text_sub), - NULL, rgd, parentItem, - SWALLOW_Type_1RADIO, rgd, - SETTING_WEEKOFDAY_FORMAT_SATURDAY, - "IDS_ST_BODY_SATURDAY", NULL); - setting_update_chk_status(rgd, data_parentItem->int_slp_setting_binded); } @@ -459,68 +458,61 @@ static int setting_time_main_create(void *cb) char *l_btn = NULL; char *r_btn = NULL; char *title = _("IDS_ST_BODY_DATE_AND_TIME"); - char *temp = NULL; char *caller = NULL; ad->is_datefield_selected = EINA_FALSE; setting_call_back_func l_button_cb = NULL; setting_call_back_func r_button_cb = NULL; - bundle *data = ad->bundle_data; + service_h service = ad->bundle_data; - if (data != NULL) { - if (NULL != (temp = (char *)bundle_get_val(data, "caller"))) - caller = temp; - if (NULL != (temp = (char *)bundle_get_val(data, "lbutton"))) { - l_btn = temp; - l_button_cb = - setting_time_main_click_softkey_caller_exist_left_cb; - } - if (NULL != (temp = (char *)bundle_get_val(data, "title"))) - title = temp; - if (NULL != (temp = (char *)bundle_get_val(data, "rbutton"))) { - r_btn = temp; - r_button_cb = - setting_time_main_click_softkey_caller_exist_right_cb; - } - } + service_get_extra_data(service, "caller", &caller); + service_get_extra_data(service, "lbutton", &l_btn); + if(l_btn) + l_button_cb = setting_time_main_click_softkey_caller_exist_left_cb; + service_get_extra_data(service, "title", &title); + service_get_extra_data(service, "rbutton", &r_btn); + if(r_btn) + r_button_cb = setting_time_main_click_softkey_caller_exist_right_cb; Evas_Object *scroller; /* scroller is a genlist */ ad->caller = caller; if (ad->caller) { - char *lbtn_str = (char *)g_strdup(l_btn); - bool same_flag = FALSE; - if (0 == safeStrCmp(l_btn, _("IDS_COM_BODY_BACK"))) { - l_btn = _("IDS_COM_BODY_BACK"); - same_flag = TRUE; - } + char *lbtn_str = (char *)g_strdup(l_btn); + bool same_flag = FALSE; + if (0 == safeStrCmp(l_btn, _("IDS_COM_BODY_BACK"))) { + l_btn = (char *)dgettext("sys_string", "IDS_COM_BODY_BACK"); + same_flag = TRUE; + } Evas_Object *controllbar = NULL; scroller = elm_genlist_add(ad->win_main_layout); - if(scroller == NULL) { - SETTING_TRACE_ERROR("Cannot set scroller object as contento of layout"); + elm_object_style_set(scroller, "dialogue"); + if(scroller == NULL) { + SETTING_TRACE_ERROR("Cannot set scroller object as contento of layout"); // free allocated data before return. FREE(lbtn_str); - return SETTING_DRAW_ERR_FAIL_SCROLLER; - } + return SETTING_DRAW_ERR_FAIL_SCROLLER; + } elm_genlist_clear(scroller); - ad->ly_main = setting_create_layout_navi_bar(ad->win_main_layout, ad->win_get, title, - l_btn, - r_btn, NULL, - l_button_cb, - r_button_cb, - NULL, ad, - scroller, + NULL, NULL, NULL, + NULL, NULL, NULL, + ad, scroller, &ad->navi_bar, &controllbar); + elm_toolbar_item_append(controllbar, IMG_PREVIOUS, l_btn, l_button_cb, ad); + elm_object_item_disabled_set(elm_toolbar_item_append(controllbar, NULL, "", NULL, NULL), EINA_TRUE); + elm_object_item_disabled_set(elm_toolbar_item_append(controllbar, NULL, "", NULL, NULL), EINA_TRUE); + elm_toolbar_item_append(controllbar, IMG_NEXT, r_btn, r_button_cb, ad); + if (same_flag) { setting_time_main_controlbar_lbtn_label_set(controllbar, lbtn_str); @@ -546,64 +538,66 @@ static int setting_time_main_create(void *cb) int err; int ret = 0; Elm_Object_Item *item; - bool auto_flag = TRUE; - if(!isEmulBin()) - { - item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, - ELM_GENLIST_ITEM_NONE, NULL, NULL); - elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, &value, &err); - auto_flag = value; - - /* UI automatic */ - ad->data_auto = - setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, &value, + &err); + bool auto_flag = value; + + /* UI automatic */ + ad->data_auto = + setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon), setting_time_main_mouse_up_Gendial_list_cb, ad, SWALLOW_Type_1TOGGLE, NULL, NULL, value, "IDS_ST_BODY_AUTOMATIC_UPDATE", NULL, setting_time_main_chk_btn_cb); - if (ad->data_auto) { - ad->data_auto->userdata = ad; - } else { - SETTING_TRACE_ERROR("ad->data_auto is NULL"); - } - } - else - { - setting_set_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, FALSE, &err); - auto_flag = FALSE; + if (ad->data_auto) { + ad->data_auto->userdata = ad; + } else { + SETTING_TRACE_ERROR("ad->data_auto is NULL"); } - /* UI add separator */ - item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, - ELM_GENLIST_ITEM_NONE, NULL, NULL); - elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL, + ad, SWALLOW_Type_LAYOUT_SPECIALIZTION, + NULL, NULL, 0, SETTING_TIME_AUTO_UPDATE_DESC, NULL, + NULL); appcore_set_i18n("worldclock", SETTING_TIME_SHARE_LOCAL_PATH); char time_zone_sub_str[CITY_BUF_SIZE + GMT_BUF_SIZE + 3] = { 0, }; char *pa_timezone = NULL; char *pa_city = NULL; - pa_city = vconf_get_str(VCONFKEY_SETAPPL_CITYNAME_INDEX_INT); - pa_timezone = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_INT); - if ((pa_timezone != NULL) - && (_(pa_city) != NULL && safeStrCmp(_(pa_city), "NULL"))) { - ret = - snprintf(time_zone_sub_str, - CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT %s", - _(pa_city), pa_timezone); + pa_city = vconf_get_str(VCONFKEY_SETAPPL_CITYNAME_INDEX_INT); // IDS_WCL_BODY_CITYNAME_SEOUL + pa_timezone = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_INT); // "Asia/Seoul" + + if ((pa_timezone != NULL) && (_(pa_city) != NULL)) { + + // don't use hard coded value + // get value from current timezone + + char str_buf[4]; + get_gmt_offset(str_buf); + str_buf[3] = '\0'; + + char* timezone_str = get_timezone_str(); + + bool ret = get_city_name(timezone_str); + if (ret) { + SETTING_TRACE(">>>>>> RESULT : %s", get_city_name_result()); + } + char* cityname_id = get_city_name_result(); + + ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT %s", _(cityname_id), _(str_buf)); FREE(pa_city); FREE(pa_timezone); retv_if(ret < 0, 0); } else { - ret = - snprintf(time_zone_sub_str, - CITY_BUF_SIZE + GMT_BUF_SIZE + 2, - "%s, GMT +09", _("IDS_WCL_BODY_CITYNAME_SEOUL")); + // default code + ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT +09", _("IDS_WCL_BODY_CITYNAME_SEOUL")); retv_if(ret < 0, 0); } @@ -622,7 +616,6 @@ static int setting_time_main_create(void *cb) /* create DATE_AND_TIME */ /* DATE_AND_TIME */ - ret = setting_get_int_slp_key(INT_SLP_SETTING_REGIONFORMAT_TIME1224, &value, &err); @@ -651,9 +644,7 @@ static int setting_time_main_create(void *cb) } else { SETTING_TRACE_ERROR("ad->data_time is NULL"); } - - item = - elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); @@ -662,8 +653,7 @@ static int setting_time_main_create(void *cb) __setting_time_main_exp_cb, NULL); char* pa_time_format = get_pa_time_format_str(); - ad->data_time_fmt = - setting_create_Gendial_exp_parent_field(scroller, + ad->data_time_fmt = setting_create_Gendial_exp_parent_field(scroller, &(ad->itc_2text_3_parent), setting_time_main_mouse_up_Gendial_list_cb, ad, SWALLOW_Type_INVALID, @@ -677,6 +667,24 @@ static int setting_time_main_create(void *cb) } G_FREE(pa_time_format); +#if APPLIED_DATATIME_DATA_FORMAT + char* pa_date_format = get_pa_date_format_str(); + ad->data_date_fmt = setting_create_Gendial_exp_parent_field(scroller, + &(ad->itc_2text_3_parent), + setting_time_main_mouse_up_Gendial_list_cb, + ad, SWALLOW_Type_INVALID, + "IDS_ST_BODY_DATE_FORMAT", + pa_time_format); + if (ad->data_date_fmt) { + ad->data_date_fmt->int_slp_setting_binded = + INT_SLP_SETTING_DATE_FORMAT; + } else { + SETTING_TRACE_ERROR("ad->data_date_fmt is NULL"); + } + G_FREE(pa_date_format); +#endif + +#if APPLIED_DATATIME_FIRSTDAY_WEEK char* pa_week = get_pa_week_format_str(); ad->data_firstday_week_fmt = setting_create_Gendial_exp_parent_field(scroller, @@ -692,6 +700,11 @@ static int setting_time_main_create(void *cb) SETTING_TRACE_ERROR("ad->data_firstday_week_fmt is NULL"); } G_FREE(pa_week); +#endif + + item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); if (auto_flag) { @@ -732,22 +745,19 @@ static int setting_time_main_create(void *cb) #endif /* register vconf key to get event callback for converting 12/24H */ - ret = - vconf_notify_key_changed(VCONFKEY_REGIONFORMAT_TIME1224, + ret = vconf_notify_key_changed(VCONFKEY_REGIONFORMAT_TIME1224, setting_time_main_int_vconf_change_cb, ad); setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", (char *)VCONFKEY_REGIONFORMAT_TIME1224, ret); /* register vconf key to get event callback for date format */ - ret = - vconf_notify_key_changed(VCONFKEY_SETAPPL_DATE_FORMAT_INT, + ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_DATE_FORMAT_INT, setting_time_main_int_vconf_change_cb, ad); setting_retvm_if(ret < 0, ret, "%s notifications Failed(%d)", (char *)VCONFKEY_SETAPPL_DATE_FORMAT_INT, ret); /* to avoid update time-diff, every per 3s to update. */ - ad->update_timer = - ecore_timer_add(3, (Ecore_Task_Cb) __refresh_date_timer, ad); + ad->update_timer = ecore_timer_add(3, (Ecore_Task_Cb) __refresh_date_timer, ad); return SETTING_RETURN_SUCCESS; } @@ -765,22 +775,22 @@ static int setting_time_main_destroy(void *cb) if (ad->noti_fd != -1)//first need to check the fd validation { heynoti_unsubscribe(ad->noti_fd, SETTING_TIME_CHANGED, time_changed_callback); + //heynoti_detach_handler() will be done in heynoti_close(). heynoti_close(ad->noti_fd); ad->noti_fd = -1; } -#endif +#endif if (ad->update_timer) { ecore_timer_del(ad->update_timer); ad->update_timer = NULL; } - if (ad->heynoti_timer) { - ecore_timer_del(ad->heynoti_timer); - ad->heynoti_timer = NULL; - } + +#if PROGRESS_POPUP_SHOW if (ad->pop_progress) { evas_object_del(ad->pop_progress); ad->pop_progress = NULL; } +#endif if (ad->update_timezone_idler) { ecore_idler_del(ad->update_timezone_idler); @@ -835,6 +845,7 @@ static int setting_time_main_cleanup(void *cb) return SETTING_RETURN_SUCCESS; } + /* *************************************************** ** **general func @@ -856,30 +867,33 @@ int setting_time_check_automatic_time_update_state() } -static int -__setting_set_city_tzone(const char* pTZPath) +static int __setting_set_city_tzone(const char* pTZPath) { // let's get city & timezone string from pTZPath // 1. city name char szTimezone[GMT_BUF_SIZE] = {0,}; char* pStr = strdup(pTZPath); - // 2. timezone string +/- ex. +9, -1 - time_t t = time(0); + // 2. timezone string +/- ex. +9, -1 + time_t t = time(0); // get unix time. sec. struct tm* data; - data = localtime(&t); + data = localtime(&t); // save time as structure. retv_if(!data, FALSE); - data->tm_isdst = 0; - + data->tm_isdst = 0; // summer time, not applied. time_t a = mktime(data); - data = gmtime(&t); - data->tm_isdst = 0; + data = gmtime(&a); + data->tm_isdst = 0; // summer time, not applied. time_t b = mktime(data); - int gmtoffset = (a-b)/3600; - snprintf(szTimezone, GMT_BUF_SIZE, "%+d", gmtoffset); - + + int gmtoffset_hour = (a-b)/3600; // result : hour. + int gmtoffset_min = ((a-b)%3600)/60; // result : min. + if(gmtoffset_min != 0) + gmtoffset_min = 30; + + snprintf(szTimezone, GMT_BUF_SIZE, "%+d:%u", gmtoffset_hour, gmtoffset_min); + SETTING_TRACE("szTimezone is of a valid format: GMT: %s", szTimezone); int ret = vconf_set_str(VCONFKEY_SETAPPL_TIMEZONE_INT, szTimezone); @@ -898,8 +912,8 @@ __setting_set_city_tzone(const char* pTZPath) } static void -setting_time_main_launch_worldclock_result_ug_cb(struct ui_gadget *ug, - bundle *result, void *priv) +setting_time_main_launch_worldclock_result_ug_cb(ui_gadget_h ug, + service_h result, void *priv) { SETTING_TRACE_BEGIN; /* error check */ @@ -907,8 +921,11 @@ setting_time_main_launch_worldclock_result_ug_cb(struct ui_gadget *ug, SettingTimeUG *ad = (SettingTimeUG *) priv; - const char *city = bundle_get_val(result, "city"); - const char *tzpath = bundle_get_val(result, "tzpath"); + char *city = NULL; + char *tzpath = NULL; + service_get_extra_data(result, "city", &city); + service_get_extra_data(result, "tzpath", &tzpath); + if (!tzpath) { SETTING_TRACE("tzpath from worldclock UG is null."); return; @@ -917,20 +934,17 @@ setting_time_main_launch_worldclock_result_ug_cb(struct ui_gadget *ug, } /* --------------------------------------------------------------------- */ - /* create symbolic link /etc/localtime to /usr/share/zoneinfo */ - /* TODO add error handler */ char tz_path[MAX_COMMON_BUFFER_LEN / 4 + 1]; safeCopyStr(tz_path, SETTING_TIME_ZONEINFO_PATH, MAX_COMMON_BUFFER_LEN / 4); g_strlcat(tz_path, tzpath, sizeof(tz_path)); SETTING_TRACE("full tz_path:%s", tz_path); - // ASSERT tzpath format Zone/cityname <<--- need to have '/' int ret = sysman_set_timezone(tz_path); if (ret < 0) { SETTING_TRACE("tzpath is not valid."); return; - } - SETTING_TRACE("copy_file SUCCEEDED *********************** %s \n", tz_path); + } else + SETTING_TRACE("sysman_set_timezone - successful : %s \n", tz_path); ret = vconf_set_str(VCONFKEY_SETAPPL_CITYNAME_INDEX_INT, city); setting_retm_if(ret != 0, "set vconf failed"); @@ -942,17 +956,17 @@ setting_time_main_launch_worldclock_result_ug_cb(struct ui_gadget *ug, return; } - ad->heynoti_timer = ecore_timer_add(1, (Ecore_Task_Cb) setting_time_update_cb, ad); - // update the display for timezone + // update the display for timezone setting_update_timezone(ad); - + heynoti_publish(SETTING_TIME_CHANGED); SETTING_TRACE_END; } -void setting_time_main_launch_worldclock_destroy_ug_cb(struct ui_gadget *ug, +void setting_time_main_launch_worldclock_destroy_ug_cb(ui_gadget_h ug, void *priv) { SETTING_TRACE_BEGIN; + /* if(ug) ug_destroy(ug); */ /* restore the '<-' button on the navigate bar */ ret_if(!priv); SettingTimeUG *ad = (SettingTimeUG *) priv; @@ -970,7 +984,7 @@ void setting_time_main_launch_worldclock_destroy_ug_cb(struct ui_gadget *ug, } -void setting_time_main_launch_worldclock_layout_ug_cb(struct ui_gadget *ug, +void setting_time_main_launch_worldclock_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) { @@ -978,7 +992,7 @@ void setting_time_main_launch_worldclock_layout_ug_cb(struct ui_gadget *ug, SettingTimeUG *ad = (SettingTimeUG *) priv; Evas_Object *base; - if (!ug || !priv) + if (!priv) return; base = (Evas_Object *) ug_get_layout(ug); @@ -998,13 +1012,14 @@ void setting_time_main_launch_worldclock_layout_ug_cb(struct ui_gadget *ug, SETTING_TRACE_END; } + void setting_time_main_launch_worldclock_sg(void *data) { SETTING_TRACE_BEGIN; /* error check */ retm_if(data == NULL, "Data parameter is NULL"); + SettingTimeUG *ad = (SettingTimeUG *) data; - if (ad->ug_loading) return; // prevent double-clicked struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs)); setting_retm_if(!cbs, "calloc failed"); @@ -1023,6 +1038,7 @@ void setting_time_main_launch_worldclock_sg(void *data) return; } + Eina_Bool setting_update_datefield(void *cb) { SETTING_TRACE_BEGIN; @@ -1071,14 +1087,14 @@ setting_time_main_click_softkey_caller_exist_left_cb(void *data, SettingTimeUG *ad = (SettingTimeUG *) data; /* Create Bundle and send message */ - bundle *b = NULL; - b = bundle_create(); - - if (!b) + service_h svc; + if (service_create(&svc)) return; - bundle_add(b, "result", "lbutton_click"); - ug_send_result(ad->ug, b); - bundle_free(b); + + service_add_extra_data(svc, "result", "lbutton_click"); + ug_send_result(ad->ug, svc); + + service_destroy(svc); /* Send destroy request */ ug_destroy_me(ad->ug); @@ -1096,14 +1112,14 @@ setting_time_main_click_softkey_caller_exist_right_cb(void *data, SettingTimeUG *ad = (SettingTimeUG *) data; /* Create Bundle and send message */ - bundle *b = NULL; - b = bundle_create(); - - if (!b) + service_h svc; + if (service_create(&svc)) return; - bundle_add(b, "result", "rbutton_click"); - ug_send_result(ad->ug, b); - bundle_free(b); + + service_add_extra_data(svc, "result", "rbutton_click"); + ug_send_result(ad->ug, svc); + + service_destroy(svc); /* Send destroy request */ ug_destroy_me(ad->ug); @@ -1154,11 +1170,9 @@ setting_time_main_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, &bvalue, &err); if (bvalue) { - (void) - setting_set_bool_slp_key - (BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, - SETTING_ON_OFF_BTN_OFF, &err); + (void) setting_set_bool_slp_key (BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, SETTING_ON_OFF_BTN_OFF, &err); elm_check_state_set(ad->chk_auto, 0); + if (ad->data_tz) { setting_enable_genlist_item(ad->data_tz->item); } @@ -1168,25 +1182,22 @@ setting_time_main_chk_btn_cb(void *data, Evas_Object *obj, void *event_info) setting_enable_evas_object(ad->data_time->eo_check); setting_enable_genlist_item(ad->data_time->item); } - + } else { ad->pop = - setting_create_popup_with_btn(ad, ad->win_get, - _ - ("IDS_ST_POP_RESTART_PHONE_TO_USE_AUTOMATIC_UPDATE_Q"), - NULL, + setting_create_popup_with_btn(ad, ad->win_get, NULL, + _("IDS_ST_POP_RESTART_PHONE_TO_USE_AUTOMATIC_UPDATE_Q"), setting_time_reboot_resp_cb, 0, 2, - dgettext("sys_string", + dgettext("sys_string", "IDS_COM_SK_OK"), _("IDS_COM_SK_CANCEL")); } - } } -static void -setting_time_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, + +static void setting_time_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info) { SETTING_TRACE_BEGIN; @@ -1202,17 +1213,15 @@ setting_time_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, SettingTimeUG *ad = (SettingTimeUG *) data; SETTING_TRACE("clicking item[%s]", _(list_item->keyStr)); - if (ad->data_time - && 0 != safeStrCmp("IDS_ST_BODY_DATE_AND_TIME", - list_item->keyStr)) { + if (ad->data_time && 0 != safeStrCmp("IDS_ST_BODY_DATE_AND_TIME", list_item->keyStr)) { elm_object_focus_set(ad->data_time->eo_check, EINA_FALSE); } if (!safeStrCmp("IDS_ST_BODY_TIME_ZONE", list_item->keyStr)) { ad->is_datefield_selected = EINA_FALSE; if (1 == setting_time_check_automatic_time_update_state()) { - setting_create_popup_without_title(ad, ad->win_get, - _("Automatic time update is ON!")); + setting_create_simple_popup(ad, ad->win_get, + NULL, _(AUTO_TIME_UPDATE_ON)); } else { setting_time_main_launch_worldclock_sg(ad); } @@ -1220,10 +1229,10 @@ setting_time_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, } else if (!safeStrCmp("IDS_ST_BODY_DATE_AND_TIME", list_item->keyStr)) { ad->is_datefield_selected = EINA_TRUE; if (1 == setting_time_check_automatic_time_update_state()) { - setting_create_popup_without_title(ad, ad->win_get, - _("Automatic time update is ON!")); + setting_create_simple_popup(ad, ad->win_get, + NULL, _(AUTO_TIME_UPDATE_ON)); } else { - // do nothing + /* setting_view_change(&setting_view_time_main, &setting_view_time_time, ad); */ } } else if (!safeStrCmp("IDS_ST_BODY_AUTOMATIC_UPDATE", list_item->keyStr)) { ad->is_datefield_selected = EINA_FALSE; @@ -1237,7 +1246,7 @@ setting_time_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, setting_set_bool_slp_key (BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, SETTING_ON_OFF_BTN_OFF, &err); - + if (ad->data_tz) { setting_enable_genlist_item(ad->data_tz->item); } @@ -1247,12 +1256,11 @@ setting_time_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, setting_enable_evas_object(ad->data_time->eo_check); setting_enable_genlist_item(ad->data_time->item); } - + } else { ad->pop = - setting_create_popup_with_btn(ad, ad->win_get, + setting_create_popup_with_btn(ad, ad->win_get, NULL, _("IDS_ST_POP_RESTART_PHONE_TO_USE_AUTOMATIC_UPDATE_Q"), - NULL, setting_time_reboot_resp_cb, 0, 2, dgettext("sys_string", "IDS_COM_SK_OK"), @@ -1268,6 +1276,7 @@ setting_time_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, } } + void setting_time_main_btn_update_ok_cb(void *cb) { SETTING_TRACE_BEGIN; @@ -1284,6 +1293,7 @@ void setting_time_main_btn_update_ok_cb(void *cb) /* It will return 0 on success or -1 if failed. */ } + void setting_time_main_btn_update_cancel_cb(void *cb) { SETTING_TRACE_BEGIN; @@ -1299,6 +1309,7 @@ void setting_time_main_btn_update_cancel_cb(void *cb) } + static UChar *uastrcpy(const char *chars) { int len = 0; @@ -1311,13 +1322,11 @@ static UChar *uastrcpy(const char *chars) return str; } -/** - * @todo how do this code represent error? - */ + static int get_timezone_isdst(int* isdst) { SETTING_TRACE_BEGIN; - struct tm *ts; + struct tm *ts; time_t ctime; enum { BUFFERSIZE = 1024 }; @@ -1338,12 +1347,13 @@ static int get_timezone_isdst(int* isdst) } SETTING_TRACE(" == tz_path = %s", buf); - SETTING_TRACE(" == isdst = %d\n", ts->tm_isdst); + SETTING_TRACE(" == isdst = %d\n", ts->tm_isdst); *isdst = ts->tm_isdst; - - return SETTING_RETURN_SUCCESS; + + return SETTING_RETURN_SUCCESS; } + static void ICU_set_timezone(const char *timezone) { SETTING_TRACE("ICU_set_timezone = %s ", timezone); @@ -1360,23 +1370,139 @@ static void ICU_set_timezone(const char *timezone) FREE(str); } + static void setting_time_main_controlbar_lbtn_label_set( Evas_Object *controlbar, char *label) { - SETTING_TRACE_BEGIN; - setting_retm_if(controlbar == NULL, "controlbar parameter is NULL"); - setting_retm_if(label == NULL, "label parameter is NULL"); + SETTING_TRACE_BEGIN; + setting_retm_if(controlbar == NULL, "controlbar parameter is NULL"); + setting_retm_if(label == NULL, "label parameter is NULL"); - Evas_Object *eo_lbtn = NULL; - Elm_Object_Item *first_item = NULL; + Evas_Object *eo_lbtn = NULL; + Elm_Object_Item *first_item = NULL; - first_item = elm_toolbar_first_item_get(controlbar); - setting_retm_if(first_item == NULL, "get first_item failed"); + first_item = elm_toolbar_first_item_get(controlbar); + setting_retm_if(first_item == NULL, "get first_item failed"); eo_lbtn = elm_object_item_part_content_get(first_item, "object"); + setting_retm_if(eo_lbtn == NULL, "get eo_lbtn failed"); + + elm_object_text_set(eo_lbtn, label); +} - setting_retm_if(eo_lbtn == NULL, "get eo_lbtn failed"); - elm_object_text_set(eo_lbtn, label); +/** + * ex) timezone : Asia/Seoul --> returns "+09" + * + * char outstr2[4]; + */ +static void get_gmt_offset(char* str_buf) +{ + struct tm* ts; + time_t ctime = time(NULL); + ts = localtime(&ctime); + + char outstr[256]; + if (strftime(outstr, sizeof(outstr), "%z", ts) == 0) { + fprintf(stderr, "strftime returned 0"); + } + printf("Result string is \"%s\"\n", outstr); + strncpy(str_buf, outstr, 3); + str_buf[3] = '\0'; +} + + +// automatic +static char* get_timezone_str() +{ + SETTING_TRACE_BEGIN; + + enum { BUFFERSIZE = 1024 }; + char buf[BUFFERSIZE]; + ssize_t len = readlink("/opt/etc/localtime", buf, sizeof(buf)-1); + + if (len != -1) { + buf[len] = '\0'; + } + else { + /* handle error condition */ + } + return g_strdup(buf+20); //Asia/Seoul } + +static char* get_city_name_result() +{ + return s_result; +} + + +// in_str = "Asia/Seoul" +static bool get_city_name(char* tzname) +{ + sqlite3 *pSQLite3 = NULL; + char *szErrMsg = NULL; + + int rst = sqlite3_open( "/opt/dbspace/.worldclock.db", &pSQLite3); + if ( rst ) + { + printf( "Can't open database: %s\n", sqlite3_errmsg( pSQLite3 )); + sqlite3_close( pSQLite3 ); + pSQLite3 = NULL; + return false; + } + else + { + printf("Database opened!!\n"); + char query_str[256]; + snprintf(query_str, 256, "SELECT city FROM city_table where tz_path=\"%s\"", tzname); + printf("%s \n", query_str); + rst = sqlite3_exec(pSQLite3, query_str, query_callback, 0, &szErrMsg); + } + + //객체해제 + sqlite3_free( szErrMsg ); + sqlite3_close( pSQLite3 ); + printf("Database close!!\n"); + return true; +} + +static int query_callback(void *NotUsed, int argc, char **argv, char **azColName) +{ + int i = 0; + printf("%s\n", argv[i] ? argv[i] : "NULL"); + s_result = g_strdup(argv[i] ? argv[i] : "NULL"); + return 0; +}; + + +#if 0 /* example */ +int main(int argc, char* argv[]) +{ + g_type_init (); + int ret; + // exporting - current status + if ( (argc == 2) && (0 == strcmp(argv[1], "export"))) { + setting_export(); + } + else if ( (argc == 2) && (0 == strcmp(argv[1], "timezone_init"))) { + + ////////////////////////////////////////////////////////////////////////// + char* tz_path_zone_city = get_timezone_str(); + bool ret = get_city_name(tz_path_zone_city); + if (ret) { + printf(">>>>>> RESULT : %s \n", get_city_name_result()); + } + ////////////////////////////////////////////////////////////////////////// + } + else { + // cfg create + // TRUE or FALSE + ret = setting_cfg_create(); + } + return 0; +} +#endif + + + diff --git a/setting-time/src/setting-time.c b/setting-time/src/setting-time.c index ca16809..13a736a 100755 --- a/setting-time/src/setting-time.c +++ b/setting-time/src/setting-time.c @@ -1,21 +1,33 @@ /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.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.tizenopensource.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. - */ + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ + /** *@defgroup setting-datetime *UG creation code for setting-datetime + * + * - Automatic update + * - Time zone + * - Date and time (elm_datefield) + * - Time format (12H/24H) + * - First day of week */ #include #ifndef UG_MODULE_API @@ -44,43 +56,37 @@ static void setting_time_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, * * @return */ -static void *setting_time_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, - bundle *data, void *priv) +static void *setting_time_ug_on_create(ui_gadget_h ug, enum ug_mode mode, + service_h service, void *priv) { SETTING_TRACE_BEGIN; - setting_retvm_if((!ug || !priv), NULL, "!ug || !priv"); + setting_retvm_if((!priv), NULL, "!priv"); SettingTimeUG *timeUG = priv; timeUG->ug = ug; - timeUG->bundle_data = data; + timeUG->bundle_data = service; timeUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); timeUG->win_get = (Evas_Object *) ug_get_window(); evas_object_show(timeUG->win_main_layout); timeUG->evas = evas_object_evas_get(timeUG->win_main_layout); + timeUG->pop_progress = NULL; /* Initialize Caller value */ timeUG->caller = NULL; - setting_retvm_if(timeUG->win_main_layout == NULL, NULL, - "cannot get main window "); + setting_retvm_if(timeUG->win_main_layout == NULL, NULL, "cannot get main window "); /* --------------------------------------------------------- */ char *pa_path = NULL;; pa_path = vconf_get_str(VCONFKEY_LANGSET); if (!pa_path) { - SETTING_TRACE - ("%s*** language setting has no proper value (nil) ***%s", - SETTING_FONT_BGREEN, SETTING_FONT_BLACK); + SETTING_TRACE ("%s*** language setting has no proper value (nil) ***%s", SETTING_FONT_BGREEN, SETTING_FONT_BLACK); return NULL; } - /* set launguage */ - setlocale(LC_ALL, ""); - bindtextdomain(SETTING_PACKAGE, SETTING_LOCALEDIR); - textdomain(SETTING_PACKAGE); - FREE(pa_path); - /* --------------------------------------------------------- */ + /* set launguage */ + appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR); /* register view node table */ setting_view_node_table_intialize(); @@ -90,7 +96,7 @@ static void *setting_time_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, setting_create_Gendial_itc("dialogue/1text.1icon", &(timeUG->itc_1text_1icon)); - setting_create_Gendial_itc("dialogue/1icon", &(timeUG->itc_layout)); + setting_create_Gendial_itc("dialogue/1text.1icon.5", &(timeUG->itc_layout)); setting_create_Gendial_itc("dialogue/2text.3/expandable", &(timeUG->itc_2text_3_parent)); @@ -112,31 +118,31 @@ static void *setting_time_ug_on_create(struct ui_gadget *ug, enum ug_mode mode, return timeUG->ly_main; } -static void setting_time_ug_on_start(struct ui_gadget *ug, bundle *data, +static void setting_time_ug_on_start(ui_gadget_h ug, service_h service, void *priv) { SETTING_TRACE_BEGIN; /* do nothing */ } -static void setting_time_ug_on_pause(struct ui_gadget *ug, bundle *data, +static void setting_time_ug_on_pause(ui_gadget_h ug, service_h service, void *priv) { SETTING_TRACE_BEGIN; /* do nothing */ } -static void setting_time_ug_on_resume(struct ui_gadget *ug, bundle *data, +static void setting_time_ug_on_resume(ui_gadget_h ug, service_h service, void *priv) { /* do nothing */ } -static void setting_time_ug_on_destroy(struct ui_gadget *ug, bundle *data, +static void setting_time_ug_on_destroy(ui_gadget_h ug, service_h service, void *priv) { SETTING_TRACE_BEGIN; - setting_retm_if((!ug || !priv), "!ug || !priv"); + setting_retm_if((!priv), "!priv"); SettingTimeUG *timeUG = priv; evas_object_event_callback_del(timeUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_time_ug_cb_resize); /* fix flash issue for gallery */ @@ -153,14 +159,14 @@ static void setting_time_ug_on_destroy(struct ui_gadget *ug, bundle *data, SETTING_TRACE_END; } -static void setting_time_ug_on_message(struct ui_gadget *ug, bundle *msg, - bundle *data, void *priv) +static void setting_time_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) { SETTING_TRACE_BEGIN; } -static void setting_time_ug_on_event(struct ui_gadget *ug, enum ug_event event, - bundle *data, void *priv) +static void setting_time_ug_on_event(ui_gadget_h ug, enum ug_event event, + service_h service, void *priv) { SETTING_TRACE_BEGIN; switch (event) { @@ -188,28 +194,27 @@ static void setting_time_ug_on_event(struct ui_gadget *ug, enum ug_event event, /** * @brief key event handler for UG */ -static void setting_time_ug_on_key_event(struct ui_gadget *ug, - enum ug_key_event event, bundle *data, +static void setting_time_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, service_h service, void *priv) { SETTING_TRACE_BEGIN; SettingTimeUG *ad = (SettingTimeUG *) priv; - if (!ug) - return; switch (event) { case UG_KEY_EVENT_END: { if (0 == safeStrCmp(ad->caller, "pwlock")) { /* Create Bundle and send message */ - bundle *b = NULL; - b = bundle_create(); - if (!b) + service_h svc; + if (service_create(&svc)) return; - bundle_add(b, "result", "lbutton_click"); - ug_send_result(ad->ug, b); - bundle_free(b); + + service_add_extra_data(svc, "result", "lbutton_click"); + ug_send_result(ad->ug, svc); + + service_destroy(svc); } if (elm_naviframe_top_item_get(ad->navi_bar) == @@ -267,16 +272,15 @@ UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) /** * Reset function to 'reset' the settings of the UG, it will be invoked by 'Reset' UG */ -UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) { SETTING_TRACE_BEGIN; int ret = 0; #if SUPPORT_RUN_SYSTEM_COMMAND - ret += excuteCmd(SETTING_POSTINST_FILE, 1, "timeAndData"); + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "timeAndData"); #else ret += vconf_set_bool(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, TRUE); - ret += vconf_set_bool(VCONFKEY_SETAPPL_STATE_DST_BOOL, FALSE); - + ret += vconf_set_int(VCONFKEY_REGIONFORMAT_TIME1224, VCONFKEY_TIME_FORMAT_12); ret += vconf_set_int(VCONFKEY_SETAPPL_DATE_FORMAT_INT, SETTING_DATE_FORMAT_DD_MM_YYYY); ret += vconf_set_int(VCONFKEY_SETAPPL_WEEKOFDAY_FORMAT_INT, SETTING_WEEKOFDAY_FORMAT_SUNDAY); @@ -286,7 +290,7 @@ UG_MODULE_API int setting_plugin_reset(bundle *data, void *priv) /** @todo replace with vconf ID */ ret += vconf_set_str(VCONFKEY_SETAPPL_TIMEZONE_ID, "Asia/Seoul"); - + #endif return ret; } diff --git a/setting-viewtype/CMakeLists.txt b/setting-viewtype/CMakeLists.txt new file mode 100755 index 0000000..d44cc5b --- /dev/null +++ b/setting-viewtype/CMakeLists.txt @@ -0,0 +1,33 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include) + + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs_viewtype REQUIRED elementary appcore-common appcore-efl ui-gadget-1 capi-appfw-application) + +FOREACH(flag ${pkgs_viewtype_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DSLP_DEBUG") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") + +ADD_LIBRARY(${SETTING_VIEWTYPE_UG} SHARED + ./src/setting-viewtype.c + ./src/setting-task-switcher-viewtype.c + ) + +TARGET_LINK_LIBRARIES(${SETTING_VIEWTYPE_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_VIEWTYPE_UG} ${pkgs_display_LDFLAGS}) + +INSTALL(TARGETS ${SETTING_VIEWTYPE_UG} DESTINATION /opt/ug/lib) diff --git a/setting-viewtype/include/setting-task-switcher-viewtype.h b/setting-viewtype/include/setting-task-switcher-viewtype.h new file mode 100755 index 0000000..ad667d7 --- /dev/null +++ b/setting-viewtype/include/setting-task-switcher-viewtype.h @@ -0,0 +1,35 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_TASKSWITCHER_VIEWTYPE_MAIN_H__ +#define __SETTING_TASKSWITCHER_VIEWTYPE_MAIN_H__ + +#include + +static void setting_task_switcher_viewtype_click_softkey_cancel_cb(void *data, + Evas_Object * + obj, void + *event_info); +static void setting_task_switcher_viewtype_click_softkey_set_cb(void *data, + Evas_Object * + obj, void + *event_info); + +#endif /* __SETTING_TASKSWITCHER_VIEWTYPE_MAIN_H__ */ diff --git a/setting-viewtype/include/setting-viewtype.h b/setting-viewtype/include/setting-viewtype.h new file mode 100755 index 0000000..01e8517 --- /dev/null +++ b/setting-viewtype/include/setting-viewtype.h @@ -0,0 +1,54 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#ifndef __SETTING_VIEWTYPE_H__ +#define __SETTING_VIEWTYPE_H__ + +#include +#include + +#include +#include + +typedef struct _SettingViewTypeUG SettingViewTypeUG; + +/** + * Setting ViewType UG context + * all UG function has void* as an agument. this is casted back to SettingViewTypeUG + * and the functions access app context. + */ +struct _SettingViewTypeUG { + ui_gadget_h ug; + Evas *evas; + Evas_Object *win_main_layout; + Evas_Object *win_get; + + Evas_Object *ly_task; + + Evas_Object *chk_task; + + setting_view *view_to_load; + Elm_Genlist_Item_Class itc_1text_1icon_2; + Elm_Genlist_Item_Class itc_seperator; +}; + +extern setting_view setting_view_task_switcher_viewtype; + +#endif /* __SETTING_VIEWTYPE_H__ */ diff --git a/setting-viewtype/src/setting-task-switcher-viewtype.c b/setting-viewtype/src/setting-task-switcher-viewtype.c new file mode 100755 index 0000000..088b74e --- /dev/null +++ b/setting-viewtype/src/setting-task-switcher-viewtype.c @@ -0,0 +1,205 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include + +static int setting_task_switcher_viewtype_create(void *cb); +static int setting_task_switcher_viewtype_destroy(void *cb); +static int setting_task_switcher_viewtype_update(void *cb); +static int setting_task_switcher_viewtype_cleanup(void *cb); + +setting_view setting_view_task_switcher_viewtype = { + .create = setting_task_switcher_viewtype_create, + .destroy = setting_task_switcher_viewtype_destroy, + .update = setting_task_switcher_viewtype_update, + .cleanup = setting_task_switcher_viewtype_cleanup, +}; + +/* *************************************************** + * + *basic func + * + ***************************************************/ + +static int setting_task_switcher_viewtype_create(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingViewTypeUG *ad = (SettingViewTypeUG *) cb; + + Evas_Object *navi_bar = NULL; + Evas_Object *scroller; + + ad->ly_task = + setting_create_layout_navi_bar_genlist(ad->win_main_layout, + ad->win_get, + _ + ("IDS_ST_BODY_TASK_SWITCHER"), + dgettext("sys_string", "IDS_COM_SK_CANCEL"), + dgettext("sys_string", "IDS_COM_SK_SET"), + setting_task_switcher_viewtype_click_softkey_cancel_cb, + setting_task_switcher_viewtype_click_softkey_set_cb, + ad, &scroller, &navi_bar); + + Elm_Object_Item *item = NULL;; + + item = + elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL, + ELM_GENLIST_ITEM_NONE, NULL, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + /* scroller is a genlist */ + SETTING_TRACE("scroller:%p", scroller); + ad->chk_task = elm_radio_add(scroller); + elm_radio_state_value_set(ad->chk_task, -1); + + setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_1icon_2), + setting_mouse_up_Gendial_list_radio_cb, + ad->chk_task, SWALLOW_Type_1RADIO, + ad->chk_task, + VCONFKEY_TASKSWITCHER_VIEWTYPE_LIST, + "IDS_ST_BODY_LIST_VIEW", NULL); + + setting_create_Gendial_field_1radio(scroller, &(ad->itc_1text_1icon_2), + setting_mouse_up_Gendial_list_radio_cb, + ad->chk_task, SWALLOW_Type_1RADIO, + ad->chk_task, + VCONFKEY_TASKSWITCHER_VIEWTYPE_CARD, + "Card view", NULL); +#ifdef UNUSED_VCONFKEY + setting_update_chk_status(ad->chk_task, + INT_SLP_SETTING_TASKSWITCHER_VIEWTYPE); +#endif + setting_view_task_switcher_viewtype.is_create = 1; + return SETTING_RETURN_SUCCESS; +} + +static int setting_task_switcher_viewtype_destroy(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingViewTypeUG *ad = (SettingViewTypeUG *) cb; + + if (ad->ly_task != NULL) { + evas_object_del(ad->ly_task); + setting_view_task_switcher_viewtype.is_create = 0; + } + + return SETTING_RETURN_SUCCESS; +} + +static int setting_task_switcher_viewtype_update(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingViewTypeUG *ad = (SettingViewTypeUG *) cb; + + if (ad->ly_task != NULL) { + evas_object_show(ad->ly_task); +#ifdef UNUSED_VCONFKEY + setting_update_chk_status(ad->chk_task, + INT_SLP_SETTING_TASKSWITCHER_VIEWTYPE); +#endif + } + return SETTING_RETURN_SUCCESS; +} + +static int setting_task_switcher_viewtype_cleanup(void *cb) +{ + SETTING_TRACE_BEGIN; + /* error check */ + retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER); + + SettingViewTypeUG *ad = (SettingViewTypeUG *) cb; + + if (ad->ly_task != NULL) { + evas_object_hide(ad->ly_task); + } + + return SETTING_RETURN_SUCCESS; +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/* *************************************************** + * + *call back func + * + ***************************************************/ + +static void +setting_task_switcher_viewtype_click_softkey_cancel_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + SettingViewTypeUG *ad = (SettingViewTypeUG *) data; + + /* Send destroy request */ + ug_destroy_me(ad->ug); +} + +static void +setting_task_switcher_viewtype_click_softkey_set_cb(void *data, + Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + int value = 0; + int err = 0; + int ret = 0; + + /* error check */ + setting_retm_if(data == NULL, "Data parameter is NULL"); + + SettingViewTypeUG *ad = (SettingViewTypeUG *) data; + + value = elm_radio_value_get(ad->chk_task); + SETTING_TRACE("value:%d", value); +#ifdef UNUSED_VCONFKEY + ret = + setting_set_int_slp_key(INT_SLP_SETTING_TASKSWITCHER_VIEWTYPE, + value, &err); +#endif + /* shared_gadget_send_command(SHARED_GADGET(ad), CLOSE_SETTING_DISPLAY_SG_CMD, NULL); */ + /* Send message to ug */ + /*bundle *b = bundle_create(); + if (!b) return; + bundle_add(b, "updateType", "ON_OFF_TEXT"); + bundle_add(b, "ON_OFF_TEXT", get_task_switcher_viewtype_str()); + ug_send_result(ad->ug, b); + bundle_free(b); */ + + /* Send destroy request */ + ug_destroy_me(ad->ug); +} diff --git a/setting-viewtype/src/setting-viewtype.c b/setting-viewtype/src/setting-viewtype.c new file mode 100755 index 0000000..399f00d --- /dev/null +++ b/setting-viewtype/src/setting-viewtype.c @@ -0,0 +1,256 @@ +/* + * setting + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. + * + * Contact: MyoungJune Park + * + * 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. + * + */ +#include + +#ifndef UG_MODULE_API +#define UG_MODULE_API __attribute__ ((visibility("default"))) +#endif + +setting_view *__get_viewtype_view_to_load(service_h service) +{ + SETTING_TRACE_BEGIN; + + const char *viewtype = NULL; + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + + SETTING_TRACE("viewtype:%s", viewtype); + + if (!safeStrCmp(viewtype, "taskswitcher")) { + return &setting_view_task_switcher_viewtype; + } else { + return NULL; /* &setting_view_viewtype_main; */ + } + +} + +Evas_Object *__get_viewtype_layout_to_return(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + SettingViewTypeUG *viewtypeUG = priv; + const char *viewtype = NULL; + service_get_extra_data(service, "viewtype", &viewtype); + if(!viewtype) + return NULL; + + SETTING_TRACE("viewtype:%s", viewtype); + + if (!safeStrCmp(viewtype, "taskswitcher")) { + return viewtypeUG->ly_task; + } else { + return NULL; /* &setting_view_viewtype_main; */ + } + +} + +static void setting_viewtype_ug_cb_resize(void *data, Evas *e, + Evas_Object *obj, void *event_info) +{ + SettingViewTypeUG *ad = (SettingViewTypeUG *) data; + /* setting_view_update(&setting_view_about_main, ad); */ + setting_view_update(ad->view_to_load, ad); +} + +static void *setting_viewtype_ug_on_create(ui_gadget_h ug, + enum ug_mode mode, service_h service, + void *priv) +{ + setting_retvm_if((!priv), NULL, "!priv"); + + SettingViewTypeUG *viewtypeUG = priv; + viewtypeUG->ug = ug; + + viewtypeUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug); + viewtypeUG->win_get = (Evas_Object *) ug_get_window(); + evas_object_show(viewtypeUG->win_main_layout); + viewtypeUG->evas = evas_object_evas_get(viewtypeUG->win_main_layout); + + setting_retvm_if(viewtypeUG->win_main_layout == NULL, NULL, + "cannot get main window "); + + + setting_create_Gendial_itc("dialogue/1text.1icon.2", + &(viewtypeUG->itc_1text_1icon_2)); + + viewtypeUG->itc_seperator.item_style = "dialogue/separator/21/with_line"; + viewtypeUG->itc_seperator.func.text_get = NULL; + viewtypeUG->itc_seperator.func.content_get = NULL; + viewtypeUG->itc_seperator.func.state_get = NULL; + viewtypeUG->itc_seperator.func.del = NULL; + + /* creating a view. */ + /* setting_view_create(&setting_view_viewtype_main, (void *)viewtypeUG); */ + viewtypeUG->view_to_load = __get_viewtype_view_to_load(data); + setting_retvm_if(NULL == viewtypeUG->view_to_load, NULL, + "NULL == viewtypeUG->view_to_load"); + setting_view_create(viewtypeUG->view_to_load, (void *)viewtypeUG); + evas_object_event_callback_add(viewtypeUG->win_main_layout, + EVAS_CALLBACK_RESIZE, + setting_viewtype_ug_cb_resize, + viewtypeUG); + return __get_viewtype_layout_to_return(data, viewtypeUG); +} + +static void setting_viewtype_ug_on_start(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_viewtype_ug_on_pause(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_viewtype_ug_on_resume(ui_gadget_h ug, service_h service, + void *priv) +{ +} + +static void setting_viewtype_ug_on_destroy(ui_gadget_h ug, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + setting_retm_if((!priv), "!priv"); + SettingViewTypeUG *viewtypeUG = priv; + + evas_object_event_callback_del(viewtypeUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_viewtype_ug_cb_resize); /* fix flash issue for gallery */ + viewtypeUG->ug = ug; + + /* called when this shared gadget is terminated. similar with app_exit */ + if (&setting_view_task_switcher_viewtype == viewtypeUG->view_to_load) { + setting_view_destroy(&setting_view_task_switcher_viewtype, + viewtypeUG); + } + + if (NULL != ug_get_layout(viewtypeUG->ug)) { + evas_object_hide((Evas_Object *) ug_get_layout(viewtypeUG->ug)); + evas_object_del((Evas_Object *) ug_get_layout(viewtypeUG->ug)); + } + + SETTING_TRACE_END; +} + +static void setting_viewtype_ug_on_message(ui_gadget_h ug, service_h msg, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; +} + +static void setting_viewtype_ug_on_event(ui_gadget_h ug, + enum ug_event event, service_h service, + void *priv) +{ + SETTING_TRACE_BEGIN; + switch (event) { + case UG_EVENT_LOW_MEMORY: + break; + case UG_EVENT_LOW_BATTERY: + break; + case UG_EVENT_LANG_CHANGE: + break; + case UG_EVENT_ROTATE_PORTRAIT: + break; + case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN: + break; + case UG_EVENT_ROTATE_LANDSCAPE: + break; + case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN: + break; + case UG_EVENT_REGION_CHANGE: + break; + default: + break; + } +} + +static void setting_viewtype_ug_on_key_event(ui_gadget_h ug, + enum ug_key_event event, + service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + + switch (event) { + case UG_KEY_EVENT_END: + ug_destroy_me(ug); + break; + default: + break; + } +} + +UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + SettingViewTypeUG *viewtypeUG = calloc(1, sizeof(SettingViewTypeUG)); + setting_retvm_if(!viewtypeUG, -1, + "Create SettingViewTypeUG obj failed"); + + ops->create = setting_viewtype_ug_on_create; + ops->start = setting_viewtype_ug_on_start; + ops->pause = setting_viewtype_ug_on_pause; + ops->resume = setting_viewtype_ug_on_resume; + ops->destroy = setting_viewtype_ug_on_destroy; + ops->message = setting_viewtype_ug_on_message; + ops->event = setting_viewtype_ug_on_event; + ops->key_event = setting_viewtype_ug_on_key_event; + ops->priv = viewtypeUG; + ops->opt = UG_OPT_INDICATOR_ENABLE; + + return 0; +} + +UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops) +{ + SETTING_TRACE_BEGIN; + struct SettingViewTypeUG *viewtypeUG; + setting_retm_if(!ops, "ops == NULL"); + + viewtypeUG = ops->priv; + if (viewtypeUG) + FREE(viewtypeUG); +} + +/* *************************************************** + * + *general func + * + ***************************************************/ + +/** +* Reset function to 'reset' the settings of the UG, it will be invoked by 'Reset' UG +*/ +UG_MODULE_API int setting_plugin_reset(service_h service, void *priv) +{ + SETTING_TRACE_BEGIN; + int ret = 0; + #if SUPPORT_RUN_SYSTEM_COMMAND + ret += excuteCmd(SETTING_POSTINST_FILE, 1, "viewtype"); + #else +#ifdef UNUSED_VCONFKEY + ret += vconf_set_int(VCONFKEY_TASKSWITCHER_VIEWTYPE, VCONFKEY_TASKSWITCHER_VIEWTYPE_LIST); +#endif + #endif + + return ret; +} + + diff --git a/settings.manifest b/settings.manifest new file mode 100644 index 0000000..1158428 --- /dev/null +++ b/settings.manifest @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 59bf39d..e471c2b 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,18 +1,17 @@ INCLUDE(FindPkgConfig) -##pkg_check_modules(pkgs_main REQUIRED glib-2.0 gthread-2.0 elementary appcore-common appcore-efl tapi utilX heynoti dlog json-glib-1.0 ui-gadget bundle aul setting-service) pkg_check_modules(pkgs_main REQUIRED glib-2.0 gthread-2.0 elementary appcore-common appcore-efl tapi utilX heynoti dlog json-glib-1.0 - ui-gadget bundle aul - ecore-imf ecore-x eina + ui-gadget-1 + capi-appfw-application aul + ecore-imf ecore-x eina capi-system-sensor ecore ecore-file ecore-input sysman icu-i18n icu-io icu-le icu-lx icu-uc - elm-webview - ewebkit + appsvc libxml-2.0 ##setting-service ) @@ -22,11 +21,12 @@ ENDFOREACH(flag) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") +SET(BUILD_ARCH "${ARCH}") -IF("${ARCH}" STREQUAL "arm") +IF("${BUILD_ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DTARGET") MESSAGE("********************** add -DTARGET") -ENDIF("${ARCH}" STREQUAL "arm") +ENDIF("${BUILD_ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"") @@ -45,9 +45,34 @@ ADD_EXECUTABLE(${PROJECT_NAME} ./setting.c ./setting-main.c ./setting-more-menu.c +# ./setting-plugin.c ) +####FOR TEST>>>>######## +# ADD_DEFINITIONS("-DPLUGIN") +# test server +#SET(TEST_PKG_NAME test_server) +# +#ADD_EXECUTABLE(${TEST_PKG_NAME} +# ./plugin-resource/test_server.c +# ) +#TARGET_LINK_LIBRARIES(${TEST_PKG_NAME} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +#TARGET_LINK_LIBRARIES(${TEST_PKG_NAME} ${pkgs_main_LDFLAGS} "-pie") +#INSTALL(TARGETS ${TEST_PKG_NAME} DESTINATION /opt/apps/${SETTING_PKG_NAME}/bin) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/plugin-resource/plugin-cfg DESTINATION /opt/data/setting FILES_MATCHING PATTERN "*.cfg") +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/plugin-resource/plugin-xml DESTINATION /opt/data/setting FILES_MATCHING PATTERN "*.xml") +####FOR TEST>>>>######## + +# conf_tool +SET(SETTING_CONFUTIL setting_conf_util) +ADD_EXECUTABLE(${SETTING_CONFUTIL} + ./conf_util/setting_confutil.c + ) +TARGET_LINK_LIBRARIES(${SETTING_CONFUTIL} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) +TARGET_LINK_LIBRARIES(${SETTING_CONFUTIL} ${pkgs_main_LDFLAGS} "-pie") +INSTALL(TARGETS ${SETTING_CONFUTIL} DESTINATION /opt/apps/${SETTING_PKG_NAME}/bin) +####FOR TEST>>>>######## TARGET_LINK_LIBRARIES(${PROJECT_NAME} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common) # dmalloc @@ -62,25 +87,50 @@ ADD_CUSTOM_TARGET(setting-theme.edj ${CMAKE_SOURCE_DIR}/resource/setting-theme.edc ${CMAKE_BINARY_DIR}/setting-theme.edj DEPENDS ${CMAKE_SOURCE_DIR}/resource/setting-theme.edc ) +ADD_CUSTOM_TARGET(setting-genlist-theme.edj + COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/resource/icons + ${CMAKE_SOURCE_DIR}/resource/setting-genlist-theme.edc + ${CMAKE_BINARY_DIR}/setting-genlist-theme.edj + DEPENDS ${CMAKE_SOURCE_DIR}/resource/setting-genlist-theme.edc +) ADD_DEPENDENCIES(${PROJECT_NAME} setting-theme.edj) - +ADD_DEPENDENCIES(${PROJECT_NAME} setting-genlist-theme.edj) INSTALL(FILES ${CMAKE_BINARY_DIR}/setting-theme.edj DESTINATION /opt/apps/${SETTING_PKG_NAME}/res/edje/) +INSTALL(FILES ${CMAKE_BINARY_DIR}/setting-genlist-theme.edj DESTINATION /opt/apps/${SETTING_PKG_NAME}/res/edje/) # install open source license -INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/Open_Source_Announcement.txt DESTINATION /opt/apps/${SETTING_PKG_NAME}/data) INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/Open_Source_Announcement.html DESTINATION /opt/apps/${SETTING_PKG_NAME}/data) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/ug-setting-accessibility-efl.xml DESTINATION /opt/share/packages) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/ug-setting-font-efl.xml DESTINATION /opt/share/packages) + + +#------------------------------------------------------------------------------------------ +INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/setting.cfg DESTINATION /opt/data/setting) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/langlist.xml DESTINATION /opt/data/setting) +#------------------------------------------------------------------------------------------ + # install desktop file & icon SET(PREFIX ${CMAKE_INSTALL_PREFIX}) -CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/${SETTING_PKG_NAME}.desktop.in ${CMAKE_SOURCE_DIR}/${SETTING_PKG_NAME}.desktop) -INSTALL(FILES ${CMAKE_SOURCE_DIR}/${SETTING_PKG_NAME}.desktop DESTINATION /opt/share/applications/) -INSTALL(FILES ${CMAKE_SOURCE_DIR}/${SETTING_PKG_NAME}.png DESTINATION /opt/apps/${SETTING_PKG_NAME}/res/icons/default/small) + +INSTALL(FILES ${CMAKE_SOURCE_DIR}/${SETTING_PKG_NAME}.xml DESTINATION /opt/share/packages/) + +INSTALL(FILES ${CMAKE_SOURCE_DIR}/${SETTING_PKG_NAME}.png DESTINATION /opt/share/icons/default/small) INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/resource/icons DESTINATION /opt/apps/${SETTING_PKG_NAME}/res FILES_MATCHING PATTERN "*.png") INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/resource/images DESTINATION /opt/apps/${SETTING_PKG_NAME}/res FILES_MATCHING PATTERN "*.png") +# install media-data +IF("${BUILD_ARCH}" STREQUAL "arm") + INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/resource/media-data/settings DESTINATION /opt/share PATTERN "*") +ELSE("${BUILD_ARCH}" STREQUAL "arm") + INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/resource/media-data-sdk/settings DESTINATION /opt/share PATTERN "*") +ENDIF("${BUILD_ARCH}" STREQUAL "arm") + +# install ini file +# INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.ini DESTINATION share/process-info) #add sub directory ADD_SUBDIRECTORY(po) diff --git a/src/conf_util/setting_confutil.c b/src/conf_util/setting_confutil.c new file mode 100755 index 0000000..1563860 --- /dev/null +++ b/src/conf_util/setting_confutil.c @@ -0,0 +1,64 @@ +/* + * setting_confutil + * + * + * + $ setting_confutil // create a cfg file in default + $ setting_confutil export // export current status to a xml file + $ setting_confutil timezone_init // timezone init + */ +#include + +#include +#include +#include +#include +#include +#include +#include + +static char* get_timezone(); + +/** +sh-4.1# /opt/apps/com.samsung.setting/bin/setting_conf_util timezone_check +debug level init 1(1) +>>> time zone : /usr/share/zoneinfo/Asia/Seoul +*/ +int main(int argc, char* argv[]) +{ + g_type_init (); + int ret; + // exporting - current status + if ( (argc == 2) && (0 == strcmp(argv[1], "export"))) { + setting_export(); + } + else if ( (argc == 2) && (0 == strcmp(argv[1], "timezone_init"))) { + char* tzpath = get_timezone(); + //printf(">>> time zone : %s \n", tzpath+20); + ret = vconf_set_str(VCONFKEY_SETAPPL_TIMEZONE_INT, tzpath+20); + } + else { + // cfg create + // TRUE or FALSE + ret = setting_cfg_create(); + } + return 0; +} + +// automatic +static char* get_timezone() +{ + SETTING_TRACE_BEGIN; + + enum { BUFFERSIZE = 1024 }; + char buf[BUFFERSIZE]; + ssize_t len = readlink("/opt/etc/localtime", buf, sizeof(buf)-1); + + if (len != -1) { + buf[len] = '\0'; + } + else { + /* handle error condition */ + } + return g_strdup(buf); +} diff --git a/src/conf_util/setting_confutil.h b/src/conf_util/setting_confutil.h new file mode 100644 index 0000000..0481124 --- /dev/null +++ b/src/conf_util/setting_confutil.h @@ -0,0 +1,7 @@ +#ifndef __SETTING_CONFIG_UTIL_ +#define __SETTING_CONFIG_UTIL_ + + + + +#endif diff --git a/src/plugin-resource/plugin-cfg/app.cfg b/src/plugin-resource/plugin-cfg/app.cfg new file mode 100755 index 0000000..b791884 --- /dev/null +++ b/src/plugin-resource/plugin-cfg/app.cfg @@ -0,0 +1,141 @@ +[ + { + "id" : "page1", + "title" : "app", + "type" : "navigationbar", + "elements" : [ + { + "id" : "nav_ok_btn", + "title" : "OK", + "type" : "button" + }, + { + "id" : "nav_cancel_btn", + "title" : "IDS_COM_BODY_BACK", + "type" : "button" + } + ] + }, + { + "id" : "grp1", + "title" : "Group name1", + "type" : "group", + "elements" : [ + { + "id" : "checkbox1", + "title" : "Checkbox test1", + "type" : "checkbox", + "state" : 1 + }, + { + "id" : "editbox1", + "title" : "Editbox test", + "type" : "editbox", + "string" : "This is changed String 6" + }, + { + "id" : "expanditem1", + "title" : "Backlight time", + "type" : "expanditem", + "string" : "30 seconds", + "elements" : [ + { + "id" : "radio1", + "title" : "15 seconds", + "type" : "radio" + }, + { + "id" : "radio2", + "title" : "30 seconds", + "type" : "radio" + }, + { + "id" : "radio3", + "title" : "1 minute", + "type" : "radio" + }, + { + "id" : "radio4", + "title" : "2 minutes", + "type" : "radio" + } + ] + } + ] + }, + { + "id" : "grp2", + "title" : "Group name2", + "type" : "group", + "elements" : [ + { + "id" : "checkbox2", + "title" : "Checkbox test2", + "type" : "checkbox", + "state" : 0 + }, + { + "id" : "slider2", + "type" : "slider", + "title" : "slider text in group2", + "min" : 0, + "max" : 10, + "value" : 7 + }, + { + "id" : "link2", + "type" : "link", + "value" : "app2.cfg" + }, + { + "id" : "expanditem2", + "title" : "Roaming network", + "type" : "expanditem", + "string" : "Auto download", + "elements" : [ + { + "id" : "radio1", + "title" : "Auto download", + "type" : "radio" + }, + { + "id" : "radio2", + "title" : "Manual", + "type" : "radio" + }, + { + "id" : "radio3", + "title" : "Always reject", + "type" : "radio" + } + ] + } + ] + }, + { + "id" : "grp3", + "title" : "Group name3", + "type" : "group", + "elements" : [ + { + "id" : "checkbox3", + "title" : "Checkbox test3", + "type" : "checkbox", + "state" : 0 + }, + { + "id" : "slider3", + "title" : "slider text in group3", + "type" : "slider", + "min" : 0, + "max" : 10, + "value" : 7 + }, + { + "id" : "link3", + "type" : "link", + "value" : "app2.cfg" + } + ] + } +] \ No newline at end of file diff --git a/src/plugin-resource/plugin-cfg/app2.cfg b/src/plugin-resource/plugin-cfg/app2.cfg new file mode 100755 index 0000000..6fd4221 --- /dev/null +++ b/src/plugin-resource/plugin-cfg/app2.cfg @@ -0,0 +1,53 @@ +[ + { + "id" : "page1", + "title" : "app2", + "type" : "navigationbar", + "elements" : [ + { + "id" : "nav_ok_btn", + "title" : "OK", + "type" : "button" + }, + { + "id" : "nav_cancel_btn", + "title" : "IDS_COM_BODY_BACK", + "type" : "button" + } + ] + }, + { + "id" : "grp1", + "title" : "Connectivicy", + "type" : "group" + }, + { + "id" : "grp2", + "title" : "System", + "type" : "group" + }, + { + "id" : "grp3", + "title" : "Applications", + "type" : "group" + }, + { + "id" : "grp4", + "title" : "Downloaded Apps", + "type" : "group", + "elements" : [ + { + "id" : "grp4.list1", + "title" : "Plugin Model", + "type" : "link", + "value" : "app.cfg" + }, + { + "id" : "grp4.list2", + "title" : "Apps Info", + "type" : "link", + "value" : "app.cfg" + } + ] + } +] \ No newline at end of file diff --git a/src/plugin-resource/plugin-cfg/app3.cfg b/src/plugin-resource/plugin-cfg/app3.cfg new file mode 100755 index 0000000..128191c --- /dev/null +++ b/src/plugin-resource/plugin-cfg/app3.cfg @@ -0,0 +1,100 @@ +[ + { + "id" : "page1", + "title" : "app3", + "type" : "navigationbar", + "elements" : [ + { + "id" : "nav_ok_btn", + "title" : "OK", + "type" : "button" + }, + { + "id" : "nav_cancel_btn", + "title" : "IDS_COM_BODY_BACK", + "type" : "button" + } + ] + }, + { + "id" : "grp1", + "title" : "Connectivicy", + "type" : "group", + "elements" : [ + { + "id" : "grp1.list1", + "title" : "Plugin Model", + "type" : "link", + "value" : "app.cfg", + "elements" : [ + { + "id" : "grp1.list1.child1", + "title" : "Child1", + "type" : "link", + "value" : "app.cfg" + }, + { + "id" : "grp1.list1.child2", + "title" : "Child2", + "type" : "link", + "value" : "app.cfg" + } + ] + }, + { + "id" : "grp1.list2", + "title" : "Apps Info", + "type" : "link", + "value" : "app.cfg" + } + ] + }, + { + "id" : "grp2", + "title" : "System", + "type" : "group" + }, + { + "id" : "grp3", + "title" : "Applications", + "type" : "group", + "elements" : [ + { + "id" : "grp4.list1", + "title" : "Plugin Model", + "type" : "link", + "value" : "app.cfg", + "elements" : [ + { + "id" : "grp4.list1.child1", + "title" : "Child1", + "type" : "link", + "value" : "app.cfg" + }, + { + "id" : "grp4.list1.child2", + "title" : "Child2", + "type" : "link", + "value" : "app.cfg" + } + ] + }, + { + "id" : "grp4.list2", + "title" : "Apps Info", + "type" : "link", + "value" : "app.cfg" + } + ] + }, + { + "id" : "grp4", + "title" : "Downloaded Apps", + "type" : "group" + }, + { + "id" : "grp5", + "title" : "System2", + "type" : "group" + } +] \ No newline at end of file diff --git a/src/plugin-resource/plugin-cfg/app4.cfg b/src/plugin-resource/plugin-cfg/app4.cfg new file mode 100755 index 0000000..2634647 --- /dev/null +++ b/src/plugin-resource/plugin-cfg/app4.cfg @@ -0,0 +1,92 @@ +[ + { + "id" : "page1", + "title" : "app4", + "type" : "navigationbar", + "elements" : + [ + { + "id" : "nav_ok_btn", + "title" : "OK", + "type" : "button" + }, + { + "id" : "nav_cancel_btn", + "title" : "IDS_COM_BODY_BACK", + "type" : "button" + } + ] + }, + { + "id" : "con1", + "title" : "Connectivity", + "type" : "group", + "elements" : + [ + { + "id" : "checkbox1", + "title" : "Checkbox test", + "type" : "checkbox", + "state" : 1 + }, + { + "id" : "editbox1", + "title" : "Editbox test", + "type" : "editbox", + "string" : "This is changed String 6" + } + ] + }, + { + "id" : "grp2", + "title" : "Group name2", + "type" : "group", + "elements" : + [ + { + "id" : "checkbox2", + "title" : "Checkbox test2", + "type" : "checkbox", + "state" : 0 + }, + { + "id" : "slider2", + "type" : "slider", + "min" : 0, + "max" : 10, + "value" : 7 + }, + { + "id" : "link2", + "type" : "link", + "value" : "app.cfg" + } + ] + }, + { + "id" : "grp3", + "title" : "Group name3", + "type" : "group", + "elements" : + [ + { + "id" : "checkbox3", + "title" : "Checkbox test3", + "type" : "checkbox", + "state" : 0 + }, + { + "id" : "slider3", + "type" : "slider", + "min" : 0, + "max" : 10, + "value" : 7 + }, + { + "id" : "link3", + "type" : "link", + "value" : "app.cfg" + } + ] + } +] diff --git a/src/plugin-resource/plugin-xml/app.xml b/src/plugin-resource/plugin-xml/app.xml new file mode 100644 index 0000000..e6f65bb --- /dev/null +++ b/src/plugin-resource/plugin-xml/app.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + +]> + + + + + +