tizen 2.3 release tizen_2.3 submit/tizen_2.3/20150202.053354 tizen_2.3_release
authorjk7744.park <jk7744.park@samsung.com>
Sun, 1 Feb 2015 04:04:06 +0000 (13:04 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Sun, 1 Feb 2015 04:04:06 +0000 (13:04 +0900)
110 files changed:
AUTHORS
CMakeLists.txt [changed mode: 0644->0755]
LICENSE.Flora [deleted file]
NOTICE [deleted file]
data/CMakeLists.txt
data/edje/all_apps_portrait.edc
data/edje/button_edit.edc
data/edje/group_4x4_portrait.edc
data/edje/index.edc
data/edje/item_4x4.edc
data/edje/layout_portrait.edc
data/icons/org.tizen.menu-screen.png [new file with mode: 0755]
data/main_operation.launch [new file with mode: 0644]
data/org.tizen.menu-screen.desktop.in [deleted file]
data/org.tizen.menu-screen.xml.in
data/po/CMakeLists.txt
data/po/ar.po
data/po/az.po
data/po/bg.po
data/po/ca.po
data/po/cs.po
data/po/da.po
data/po/de.po [new file with mode: 0755]
data/po/el_GR.po
data/po/en.po
data/po/en_PH.po
data/po/en_US.po
data/po/es_ES.po
data/po/es_US.po [new file with mode: 0755]
data/po/et.po
data/po/eu.po
data/po/fi.po
data/po/fr.po [new file with mode: 0755]
data/po/fr_CA.po
data/po/ga.po
data/po/gl.po
data/po/hi.po
data/po/hr.po
data/po/hu.po
data/po/hy.po
data/po/is.po
data/po/it_IT.po
data/po/ja_JP.po
data/po/ka.po
data/po/kk.po
data/po/ko_KR.po
data/po/lt.po
data/po/lv.po
data/po/mk.po
data/po/nl.po [new file with mode: 0755]
data/po/pl.po
data/po/pt_BR.po
data/po/pt_PT.po
data/po/ro.po
data/po/ru_RU.po
data/po/sk.po
data/po/sl.po
data/po/sr.po
data/po/sv.po
data/po/tr_TR.po
data/po/uk.po
data/po/uz.po
data/po/zh_CN.po
data/po/zh_HK.po
data/po/zh_TW.po
include/all_apps/db.h
include/all_apps/layout.h
include/all_apps/list.h
include/all_apps/shortcut.h
include/conf.h
include/db.h
include/index.h
include/item.h
include/item_badge.h
include/item_event.h
include/key.h
include/layout.h
include/list.h
include/mapbuf.h
include/menu_screen.h
include/mouse.h
include/page.h
include/page_scroller.h
include/pkgmgr.h
include/popup.h
include/util.h
org.tizen.menu-screen.efl [new file with mode: 0755]
org.tizen.menu-screen.manifest
org.tizen.menu-screen.rule [deleted file]
packaging/org.tizen.menu-screen.spec [changed mode: 0644->0755]
src/all_apps/db.c
src/all_apps/layout.c
src/all_apps/list.c
src/all_apps/shortcut.c
src/db.c
src/index.c
src/item.c
src/item_badge.c
src/item_event.c
src/key.c
src/layout.c
src/list.c
src/mapbuf.c
src/menu_screen.c [changed mode: 0644->0755]
src/mouse.c
src/page.c
src/page_scroller.c
src/pkgmgr.c
src/popup.c
src/util.c

diff --git a/AUTHORS b/AUTHORS
index 95e12541804057c684e5c1c1f05ced4d850547f6..49e578bc817a0bce989a4ba674184b99beef61c2 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,2 +1,3 @@
 Jin Yoon <jinny.yoon at samsung dot com>
+Junkyu Han <junkyu.han at samsung dot com>
 Youngjoo Park <yjoo93.part at samsung dot com>
old mode 100644 (file)
new mode 100755 (executable)
index 5fe2f0d..744947a
@@ -7,14 +7,25 @@ SET(EXEC_PREFIX "${PREFIX}/bin")
 SET(LIBDIR "${PREFIX}/lib")
 SET(DATADIR "/opt${PREFIX}/data")
 SET(RESDIR "${PREFIX}/res")
+SET(ICONDIR "/usr/share/icons/default/small")
 SET(IMAGEDIR "${RESDIR}/images")
 SET(EDJEDIR "${RESDIR}/edje")
 SET(LOCALEDIR "${RESDIR}/locale")
 SET(VERSION 0.1.0)
 
+#IF("${ARCH}" STREQUAL "arm")
+#      OPTION(USE_ARM "Use Arm" ON)
+#      ADD_DEFINITIONS("-DARM_TYPE")
+#ELSE()
+#      OPTION(USE_EMULATOR "Use Emulator" ON)
+#      ADD_DEFINITIONS("-DEMULATOR_TYPE")
+#ENDIF()
+#MESSAGE("ARCH: ${ARCH}")
+
 INCLUDE(FindPkgConfig)
 pkg_check_modules(MENU_PKGS REQUIRED
        ail
+       appcore-efl
        appsvc
        aul
        badge
@@ -33,15 +44,20 @@ pkg_check_modules(MENU_PKGS REQUIRED
        eina
        elementary
        evas
-       heynoti
        pkgmgr
        pkgmgr-info
        shortcut
-       sysman
        syspopup-caller
        utilX
 )
 
+IF(USE_ARM)
+pkg_check_modules(ARM_PKGS REQUIRED
+       bincfg
+       factory
+)
+ENDIF()
+
 ADD_DEFINITIONS("-DENABLE_BGIMAGE")
 ADD_DEFINITIONS("-DLOG_TAG=\"MENU_SCREEN\"")
 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
@@ -57,6 +73,10 @@ FOREACH (flag ${MENU_PKGS_CFLAGS})
     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
+FOREACH(flag ${ARM_PKGS_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fdata-sections -ffunction-sections -Wl,--gc-sections")
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
@@ -85,13 +105,12 @@ ADD_EXECUTABLE(${PROJECT_NAME}
        src/all_apps/shortcut.c
 )
 
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -lm)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ARM_PKGS_LDFLAGS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${MENU_PKGS_LDFLAGS})
 
-# Install 
+# Install
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${EXEC_PREFIX})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.Flora DESTINATION /usr/share/license RENAME ${PACKAGE_NAME})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PACKAGE_NAME}.rule DESTINATION /opt/etc/smack/accesses.d)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PACKAGE_NAME}.efl DESTINATION /etc/smack/accesses.d)
 
 ADD_SUBDIRECTORY(data)
 
diff --git a/LICENSE.Flora b/LICENSE.Flora
deleted file mode 100644 (file)
index 571fe79..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-Flora License
-
-Version 1.1, April, 2013
-
-http://floralicense.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 Tizen Compliance Specification
-and passes the Tizen Compliance Tests 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
-     and your own copyright statement or terms and conditions do not conflict
-     the conditions stated in the License including section 3.
-
-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.1 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://floralicense.org/license/
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
diff --git a/NOTICE b/NOTICE
deleted file mode 100644 (file)
index 04443b1..0000000
--- a/NOTICE
+++ /dev/null
@@ -1,3 +0,0 @@
-Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
-Except as noted, this software is licensed under the Flora License, Version 1.1.
-Please, see the LICENCE.Flora file for the Flora License, Version 1.1 terms and conditions.
index b491de59c776131acd15ebabee73212aa155a221..9c423e5257f5281f65b4f3fdea0f70c21564d374 100644 (file)
@@ -4,6 +4,9 @@ SET(MANIFESTDIR "/usr/share/packages")
 CONFIGURE_FILE(${PACKAGE_NAME}.xml.in ${CMAKE_BINARY_DIR}/${PACKAGE_NAME}.xml)
 INSTALL(FILES ${CMAKE_BINARY_DIR}/${PACKAGE_NAME}.xml DESTINATION ${MANIFESTDIR})
 
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/main_operation.launch DESTINATION ${RESDIR}/data)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/${PACKAGE_NAME}.png DESTINATION /usr/share/icons/default/small)
+
 ADD_SUBDIRECTORY(edje)
 ADD_SUBDIRECTORY(images)
 ADD_SUBDIRECTORY(po)
index b413286aa9f6246975ee08393686a03e62adbefc..4b2c759b14c1b43969504f843ed09abfe2f3049b 100644 (file)
@@ -1,28 +1,37 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
 
+ * 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 "conf.edc"
+
+#define _BASE_HEIGHT 1280
 
 collections {
+       base_scale: 1.8;
        group {
                name: "all_apps";
                parts {
                        part {
                                name: "bg";
-                               type: RECT;
+                               type: SWALLOW;
                                scale: 1;
                                mouse_events: 1;
                                description {
@@ -32,7 +41,17 @@ collections {
                                        visible: 0;
                                }
                        }
-
+                       part {
+                               name: "indicator_spacer";
+                               type: SPACER;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0; to, "bg"; }
+                                       rel2 { relative: 1.0 INDICATOR_HEIGHT_PROP; to, "bg"; }
+                               }
+                       }
                        part {
                                name: "index_bg";
                                type: RECT;
@@ -40,9 +59,8 @@ collections {
                                mouse_events: 0;
                                description {
                                        state: "default" 0.0;
-                                       rel1 { relative: 0.0 20/1210; to, "bg";} // 1280 - 70(indicator)
-                                       rel2 { relative: 1.0 124/1210; to, "bg";} // 174 - 70
-                                       color: 0 0 0 255;
+                                       rel1 { relative: 0.0 80/_BASE_HEIGHT; to, "bg";} // 1280 - 70(indicator)
+                                       rel2 { relative: 1.0 184/_BASE_HEIGHT; to, "bg";} // 174 - 70
                                        visible: 0;
                                }
                        }
@@ -79,8 +97,8 @@ collections {
                                mouse_events: 1;
                                description {
                                        state: "default" 0.0;
-                                       rel1 { relative: 0.0 134/1210; to, "bg"; } // 154 - 70
-                                       rel2 { relative: 1.0 1164/1210; to, "bg"; }
+                                       rel1 { relative: 0.0 194/_BASE_HEIGHT; to, "bg"; } // 154 - 70
+                                       rel2 { relative: 1.0 1224/_BASE_HEIGHT; to, "bg"; }
                                        color: 34 34 34 255;
                                        visible: 0;
                                }
index 982220c887f777a534301f9b89a9d9d0c1f46445..fefa59fcbfae6064f488bd0326daf03711a6862a 100644 (file)
@@ -1,23 +1,31 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
 
+ * 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.
+ *
+ */
 
 #define BUTTON_EDIT_BG_SIZE 98 56
+#define BUTTON_EDIT_BG_SIZE_MIN 45 30
 #define BUTTON_EDIT_IMAGE_SIZE 35 35
+#define BUTTON_EDIT_IMAGE_SIZE_MIN 17 17
+#define BUTTON_EDIT_W 128
+#define BUTTON_EDIT_H 80
 
 
 
@@ -33,6 +41,7 @@ images {
 
 
 collections {
+       base_scale: 1.8;
        group {
                name: "button_edit";
                parts {
@@ -63,14 +72,13 @@ collections {
                                mouse_events: 1;
                                description {
                                        state: "default" 0.0;
-                                       rel1 { relative: 0.5 0.5; to, "edit_button"; }
-                                       rel2 { relative: 0.5 0.5; to, "edit_button"; }
-                                       min: BUTTON_EDIT_BG_SIZE;
-                                       max: BUTTON_EDIT_BG_SIZE;
+                                       rel1 { relative: 15/BUTTON_EDIT_W 12/BUTTON_EDIT_H; to, "edit_button"; }
+                                       rel2 { relative: 113/BUTTON_EDIT_W 68/BUTTON_EDIT_H; to, "edit_button"; }
+                                       min: BUTTON_EDIT_BG_SIZE_MIN;
                                        fixed: 1 1;
                                        image {
                                                normal: "../images/btn_edit_nor.9.png";
-                                               border: 30 30 0 0;
+                                               border: 15 15 0 0;
                                                middle: DEFAULT;
                                                border_scale: 1;
                                        }
@@ -107,13 +115,12 @@ collections {
                 description {
                     state: "default" 0.0;
                     align: 0.5 0.5;
-                                       rel1 { relative: 0.5 0.5; to, "edit_button_bg";}
-                                       rel2 { relative: 0.5 0.5; to, "edit_button_bg";}
+                                       rel1 { relative: 46/BUTTON_EDIT_W 22/BUTTON_EDIT_H; to, "edit_button_bg";}
+                                       rel2 { relative: 81/BUTTON_EDIT_W 57/BUTTON_EDIT_H; to, "edit_button_bg";}
                                        image {
                                                normal: "../images/icon_btn_edit_nor.png";
                                        }
-                                       min: BUTTON_EDIT_IMAGE_SIZE;
-                                       max: BUTTON_EDIT_IMAGE_SIZE;
+                                       min: BUTTON_EDIT_IMAGE_SIZE_MIN;
                                        fixed: 1 1;
                                        visible: 1;
                 }
index de78a2ac8776399b8a38805d31dccb0de73f3eca..ff7a34a2889632e634425d379a01c6ff154b7823 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
 
+ * 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.
+ *
+ */
 
 #define MENU(part_name, p_relx, p_rely, relx, rely, n_relx, n_rely)  \
        part { \
 #define ITEM_15_Y ITEM_12_Y
 
 collections {
+       base_scale: 1.8;
        group {
                name: "menu_bg";
                parts {
index a5f2336d58c6c9ee9f2a68d498bdd208f295da79..713e38240a8c6817dcfb98154c81a3ccaa586110 100644 (file)
@@ -1,18 +1,24 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
 
 #define INDEX_PAGECONTROL_IND_INC 35 35
 #define INDEX_PAGECONTROL_IND_MIN_INC 35 35
@@ -20,6 +26,7 @@
 #define INDEX_PAGECONTROL_FONT_SIZE_INC 18
 
 collections {
+   base_scale: 1.8;
    group {
       name: "elm/index/base/vertical/menuscreen/index";
       alias: "elm/index/base/horizontal/menuscreen/index";
index 6d9716bb2cf6e51849d1411fd21dd67320c8a904..541e59c56a54a9f993a5ad1e58ffc746eba3b139 100644 (file)
@@ -1,24 +1,29 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
 
+ * 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 "conf.edc"
 
-
+#define _ITEM_HEIGHT 180.0
+#define _ITEM_WIDTH 198.0
 
 styles {
        style {
@@ -38,6 +43,7 @@ images {
 
 
 collections {
+       base_scale: 1.8;
        group {
                name: "icon";
 
@@ -62,10 +68,10 @@ collections {
                                mouse_events: 1;
                                description {
                                        state: "default" 0.0;
-                                       rel1 { relative: 0.5 60/ITEM_HEIGHT; to: "bg"; }
-                                       rel2 { relative: 0.5 60/ITEM_HEIGHT; to: "bg"; }
+                                       rel1 { relative: 31/_ITEM_WIDTH 0.0; to: "bg"; }
+                                       rel2 { relative: 148/_ITEM_WIDTH 117/_ITEM_HEIGHT; to: "bg"; }
                                        align: 0.5 0.5;
-                                       min: 117 117;
+                                       //min: 117 117;
                                        fixed: 1 1;
                                }
                        }
@@ -91,8 +97,8 @@ collections {
                                description {
                                        state: "default" 0.0;
                                        visible: 0;
-                                       rel1 { relative: 110/ITEM_WIDTH 0.0; to, "bg"; }
-                                       rel2 { relative: 170/ITEM_WIDTH 60/ITEM_HEIGHT; to, "bg"; }
+                                       rel1 { relative: 110/_ITEM_WIDTH 0.0; to, "bg"; }
+                                       rel2 { relative: 170/_ITEM_WIDTH 60/_ITEM_HEIGHT; to, "bg"; }
                                        image {
                                                normal: "../images/menu_badge_01.png";
                                        }
@@ -158,12 +164,12 @@ collections {
                                mouse_events: 1;
                                description {
                                        state: "default" 0.0;
-                                       rel1 { relative: 40/ITEM_WIDTH 30/ITEM_HEIGHT; to, "bg"; }
-                                       rel2 { relative: 40/ITEM_WIDTH 30/ITEM_HEIGHT; to, "bg"; }
+                                       rel1 { relative: 13/_ITEM_WIDTH 3/_ITEM_HEIGHT; to, "bg"; }
+                                       rel2 { relative: 67/_ITEM_WIDTH 57/_ITEM_HEIGHT; to, "bg"; }
                                        image {
                                                normal: "../images/RM06_App tray_Btn_Uninstall.png";
                                        }
-                                       min: 54 54;
+                                       //min: 54 54;
                                        fixed: 1 1;
                                        visible: 0;
                                }
@@ -199,9 +205,10 @@ collections {
                                        text {
                                                text_class: "tizen";
                                                font: "TIZEN:style=medium";
-                                               size: 16;
+                                               size: 24;
                                                align: 0.5 0.1;
                                        }
+                                       visible: 1;
                                }
                                description
                                {
@@ -277,6 +284,21 @@ collections {
                                source: "icon_image_event";
                                action: SIGNAL_EMIT "item,up" "menu";
                        }
+                       program {
+                               name: "text,on";
+                               signal: "text,on";
+                               source: "menu";
+                               action: STATE_SET "default" 0.0;
+                               target: "txt";
+                       }
+                       program {
+                               name: "text,off";
+                               signal: "text,off";
+                               source: "menu";
+                               action: STATE_SET "hide" 0.0;
+                               target: "txt";
+                       }
+
 
                        // Badge
                        program {
index 50c40e26446d539b7834c0d3bd040f07aadb5c38..dc95b87b08b3d2e7df608beb85796889fe182510 100644 (file)
@@ -1,35 +1,65 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
+
+styles {
+       style {
+               name: "factory_text_style_big";
+               base: "font=TIZEN:style=MEDIUM font_size=28 align=left valign=top color=#FFFFFF style=soft_shadow shadow_color=#00000060 ellipsis=1";
+
+               tag: "b" "+ font_weight=Bold";
+               tag: "u" "+ underline=on underline_color=#FFFFFF";
+       }
+       style {
+               name: "factory_text_style_small";
+               base: "font=TIZEN:style=MEDIUM font_size=10 align=left valign=top color=#FFFFFF style=soft_shadow shadow_color=#00000060 ellipsis=1";
+
+               tag: "b" "+ font_weight=Bold";
+               tag: "u" "+ underline=on underline_color=#FFFFFF";
+       }
+       style {
+               name: "factory_text_style_middle";
+               base: "font=TIZEN:style=MEDIUM font_size=17 align=left valign=top color=#FFFFFF style=soft_shadow shadow_color=#00000060 ellipsis=1";
+
+               tag: "b" "+ font_weight=Bold";
+               tag: "u" "+ underline=on underline_color=#FFFFFF";
+       }
+}
 
 
 
 collections {
+       base_scale: 1.8;
        group {
                name: "layout";
                parts {
                        part {
                                name: "bg";
-                               type: RECT;
+                               type: SWALLOW;
                                scale: 1;
                                mouse_events: 1;
                                description {
                                        state: "default" 0.0;
                                        rel1 { relative: 0.0 0.0; }
                                        rel2 { relative: 1.0 1.0; }
-                                       color: 0 0 0 0;
                                        visible: 0;
                                }
                        }
@@ -45,6 +75,84 @@ collections {
                                        visible: 1;
                                }
                        }
+
+                       part {
+                               name: "factory_bg";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.05 0.0;
+                                                       to_x: "bg";
+                                                       to_y: "factory_text";
+                                                       offset: 0 -15;
+                                       }
+                                       rel2 { relative: 0.95 1.0;
+                                                       to_x: "bg";
+                                                       to_y: "factory_text";
+                                                       offset: 0 15;
+                                       }
+                                       color: 0 0 0 125;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                               description {
+                                       state: "show_small" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                               description {
+                                       state: "show_middle" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part {
+                               name: "factory_text";
+                               type: TEXTBLOCK;
+                               scale: 1;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.1 0.9; to, "bg"; }
+                                       rel2 { relative: 0.1 0.9; to, "bg"; }
+                                       text {
+                                               style: "factory_text_style_big";
+                                               align: 0.0 0.5;
+                                               min: 1 1;
+                                       }
+                                       align: 0.0 1.0;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "show_big" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                               description {
+                                       state: "show_small" 0.0;
+                                       inherit: "default" 0.0;
+                                       text {
+                                               style: "factory_text_style_small";
+                                       }
+                                       visible: 1;
+                               }
+                               description {
+                                       state: "show_middle" 0.0;
+                                       inherit: "default" 0.0;
+                                       text {
+                                               style: "factory_text_style_middle";
+                                       }
+                                       visible: 1;
+                               }
+                       }
                        part {
                                name: "content,blocker";
                                type: RECT;
@@ -81,6 +189,38 @@ collections {
                                action: STATE_SET "default" 0.0;
                                target: "content,blocker";
                        }
+                       program {
+                               name: "factory_text,hide";
+                               signal: "hide";
+                               source: "factory_text";
+                               action: STATE_SET "default" 0.0;
+                               target: "factory_bg";
+                               target: "factory_text";
+                       }
+                       program {
+                               name: "factory_text,show";
+                               signal: "show";
+                               source: "factory_text";
+                               action: STATE_SET "show" 0.0;
+                               target: "factory_bg";
+                               target: "factory_text";
+                       }
+                       program {
+                               name: "factory_text,show_small";
+                               signal: "show_small";
+                               source: "factory_text";
+                               action: STATE_SET "show_small" 0.0;
+                               target: "factory_bg";
+                               target: "factory_text";
+                       }
+                       program {
+                               name: "factory_text,show_middle";
+                               signal: "show_middle";
+                               source: "factory_text";
+                               action: STATE_SET "show_middle" 0.0;
+                               target: "factory_bg";
+                               target: "factory_text";
+                       }
                }
        } // group
 } // collections
diff --git a/data/icons/org.tizen.menu-screen.png b/data/icons/org.tizen.menu-screen.png
new file mode 100755 (executable)
index 0000000..ee06044
Binary files /dev/null and b/data/icons/org.tizen.menu-screen.png differ
diff --git a/data/main_operation.launch b/data/main_operation.launch
new file mode 100644 (file)
index 0000000..5bac5ca
--- /dev/null
@@ -0,0 +1,2 @@
+org.tizen.phone
+org.tizen.contacts
diff --git a/data/org.tizen.menu-screen.desktop.in b/data/org.tizen.menu-screen.desktop.in
deleted file mode 100644 (file)
index a762e53..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Name=Simple Menu Screen
-Type=Application
-Exec=@EXEC_PREFIX@/@PROJECT_NAME@
-Icon=@PACKAGE_NAME@.png
-NoDisplay=True
-X-Tizen-TaskManage=False
-X-Tizen-Removable=False
index a814e390725c3f7e4f84540a641fd4e476969c8a..fa3a35cc157cc1480bb0fb5f3a8e9c41bc6b001a 100755 (executable)
@@ -1,11 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="@PACKAGE_NAME@" version="1.2.7" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="@PACKAGE_NAME@" version="1.2.5" install-location="internal-only">
        <label>Simple Menu-screen</label>
        <author email="jinny.yoon@samsung.com" href="www.samsung.com">Jin Yoon</author>
+       <author email="junkyu.han@samsung.com" href="www.samsung.com">Junkyu Han</author>
        <author email="yjoo93.park@samsung.com" href="www.samsung.com">Youngjoo Park</author>
        <description>Simple Menu-screen Application</description>
        <ui-application appid="@PACKAGE_NAME@" exec="@EXEC_PREFIX@/@PROJECT_NAME@" nodisplay="true" multiple="false" type="capp" taskmanage="false">
                <label>Simple Menu-screen</label>
                <category name="http://tizen.org/category/homeapp"/>
+               <icon>/usr/share/icons/default/small/org.tizen.menu-screen.png</icon>
        </ui-application>
 </manifest>
index 794280d08b8ad2a7f2624ab7d68800c4e227683e..e804a6a8ea12f92d6a556f4cb722368a2777610a 100644 (file)
@@ -7,19 +7,18 @@ SET(POFILES
        ca.po
        cs.po
        da.po
-       de_DE.po
+       de.po
        el_GR.po
        en.po
        en_PH.po
        en_US.po
        es_ES.po
-       es_MX.po
+       es_US.po
        et.po
        eu.po
-       fa.po
        fi.po
        fr_CA.po
-       fr_FR.po
+       fr.po
        ga.po
        gl.po
        hi.po
@@ -36,7 +35,7 @@ SET(POFILES
        lv.po
        mk.po
        nb.po
-       nl_NL.po
+       nl.po
        pl.po
        pt_BR.po
        pt_PT.po
@@ -46,15 +45,13 @@ SET(POFILES
        sl.po
        sr.po
        sv.po
-       th.po
        tr_TR.po
        uk.po
-       ur.po
        uz.po
        zh_CN.po
        zh_HK.po
-       zh_SG.po
        zh_TW.po
+       zh_SG.po
 )
 
 SET(MSGFMT "/usr/bin/msgfmt")
index 31821ad2c5c97af338b7ed07ec22835141b16e99..319a578071d40bf9decfe4d7b5023968198692ad 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "هل تريد إلغاء تثبيت %s؟"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "إلغاء التثبيت"
\ No newline at end of file
+msgstr "إلغاء التثبيت"
+
index 991ce1698f16b4777a378140838cbe55b658fb03..b6bf27008112c19be6807c0bb1c9a38836a27474 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "%s silinsin?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Quraşdırılma ləğv edilsin"
\ No newline at end of file
+msgstr "Quraşdırılma ləğv edilsin"
+
index 20cb7d5cb2ccf4bce346ddc606677a475fa1594b..f82bad05f92eba51aa60475239f2a6d6f3814797 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Деинсталиране на %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Деинсталиране"
\ No newline at end of file
+msgstr "Деинсталиране"
+
index a4bc2cb474d3354e4eac5f71c431578d0066a522..cc107cfb7375bf20efec3be06520c9f4101c3da3 100644 (file)
@@ -1,8 +1,9 @@
 msgid "IDS_HS_BUTTON_DONE"
-msgstr "Realit"
+msgstr "Fet"
 
 msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Desinstal·lar %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Desinstal·lar"
\ No newline at end of file
+msgstr "Desinstal·lar"
+
index 71d19423cd1bbc37d8ccd7810cea7b5fb25f3fbc..792da6be2d5db1cb830d01a374baef15c5e765c3 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Odinstalovat %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Odinstalovat"
\ No newline at end of file
+msgstr "Odinstalovat"
+
index d99306a40a9e5e2e41c0e4a0806bef70a3f9addd..0acd840d71512bdcd5c11df6c2577cbb477cb1e1 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Afinstallér %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Afinstallér"
\ No newline at end of file
+msgstr "Afinstallér"
+
diff --git a/data/po/de.po b/data/po/de.po
new file mode 100755 (executable)
index 0000000..b356e8b
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_HS_BUTTON_DONE"
+msgstr "Fertig"
+
+msgid "IDS_AT_POP_UNINSTALL_PS_Q"
+msgstr "%s deinstallieren?"
+
+msgid "IDS_AT_BODY_UNINSTALL"
+msgstr "Deinstallieren"
+
index be489f7da7ffb6e3cd912df943f627906b106248..094af6f34a9b168069f92cf5af7fbae165ceb9e5 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Κατάργηση της εγκατάστασης του %s;"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Κατάργηση εγκατάστασης"
\ No newline at end of file
+msgstr "Κατάργηση εγκατάστασης"
+
index 953689939cb926b2e7b7a9858ed919f3ac018099..43627f4ac8e5e7aa503a55276b38e3867ba24b99 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Uninstall %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Uninstall"
\ No newline at end of file
+msgstr "Uninstall"
+
index 953689939cb926b2e7b7a9858ed919f3ac018099..43627f4ac8e5e7aa503a55276b38e3867ba24b99 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Uninstall %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Uninstall"
\ No newline at end of file
+msgstr "Uninstall"
+
index 953689939cb926b2e7b7a9858ed919f3ac018099..43627f4ac8e5e7aa503a55276b38e3867ba24b99 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Uninstall %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Uninstall"
\ No newline at end of file
+msgstr "Uninstall"
+
index 02cc7573006e008b76a9a8157f81b5b8df5c3780..0678bb5839931b13c01d8f2657453d724600ab3a 100644 (file)
@@ -1,8 +1,9 @@
 msgid "IDS_HS_BUTTON_DONE"
-msgstr "Finalizado"
+msgstr "Hecho"
 
 msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "¿Desinstalar %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Desinstalar"
\ No newline at end of file
+msgstr "Desinstalar"
+
diff --git a/data/po/es_US.po b/data/po/es_US.po
new file mode 100755 (executable)
index 0000000..c83a4b6
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_HS_BUTTON_DONE"
+msgstr "Aceptar"
+
+msgid "IDS_AT_POP_UNINSTALL_PS_Q"
+msgstr "¿Desinstalar %s?"
+
+msgid "IDS_AT_BODY_UNINSTALL"
+msgstr "Desinstalar"
+
index be64f0cbbb0b5f7024ee648515cb64f1507c7edf..ff243b2c782c0e8b09206e9cf12b3908f38d61c2 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Kas desinstallida %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Deinstalli"
\ No newline at end of file
+msgstr "Deinstalli"
+
index 13b57956ec83c10a5ef4f54f343e5f601c19a9b2..9bbcfbec7bb902382bd85641ade4a1cfa767d505 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Desinstalatu %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Desinstalatu"
\ No newline at end of file
+msgstr "Desinstalatu"
+
index 0802515a65e7d1c3e4da62608c61be0957bfe714..73c0bc12f300e6cb4bdba6a09b933b3e16ec56cd 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Poistetaanko kohteen %s asennus?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Poista asennus"
\ No newline at end of file
+msgstr "Poista asennus"
+
diff --git a/data/po/fr.po b/data/po/fr.po
new file mode 100755 (executable)
index 0000000..a08eb14
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_HS_BUTTON_DONE"
+msgstr "OK"
+
+msgid "IDS_AT_POP_UNINSTALL_PS_Q"
+msgstr "Désinstaller %s ?"
+
+msgid "IDS_AT_BODY_UNINSTALL"
+msgstr "Désinstaller"
+
index 7977fd83826798a357341700472b50eea89fb525..a08eb14aca9436c04feecb5216d6bf0f4a41adaf 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Désinstaller %s ?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Désinstaller"
\ No newline at end of file
+msgstr "Désinstaller"
+
index 36117b4ccbe0fc5d054f56bf9f10287de4db5b02..58c44f070300d47e260449180ca6fc71a5a28845 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Díshuiteáil %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Díshuiteáil"
\ No newline at end of file
+msgstr "Díshuiteáil"
+
index 5c99a7f0b5c08cf2f4e546192e403f9b6b48b391..d6b9554ca2d9d27645b14276a30ad0b4cf00c1f0 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Desexas desinstalar %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Desinstalar"
\ No newline at end of file
+msgstr "Desinstalar"
+
index 78e0813c80e4a9c1d2ea46a2feb898461ef9ea8b..463c7338aa0e01bca4e50ecd51fb04f8ee9c062a 100644 (file)
@@ -1,8 +1,9 @@
 msgid "IDS_HS_BUTTON_DONE"
-msgstr "पà¥\82रा à¤¹à¥\81à¤\86"
+msgstr "पà¥\82रà¥\8dण"
 
 msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "%s की स्थापना रद्द करें?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "à¤\85सà¥\8dथापित करें"
\ No newline at end of file
+msgstr "सà¥\8dथापना à¤°à¤¦à¥\8dद करें"
+
index 8a4cf42bfafd807fa4f293a3ca0f6f5e8ee25af5..abe4bc55557d64f9a31edd2730a14961523eaa32 100644 (file)
@@ -1,8 +1,9 @@
 msgid "IDS_HS_BUTTON_DONE"
-msgstr "Kraj"
+msgstr "OK"
 
 msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Deinstalirati %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Deinstaliraj"
\ No newline at end of file
+msgstr "Deinstaliraj"
+
index 61409918392d3561b866ba7bdf6f1d3941607b3b..a2decccfeeff42ffc242c326ea6a0ec95f2f784d 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Eltávolítja a(z) %s animált emotikont?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Eltávolítás"
\ No newline at end of file
+msgstr "Eltávolítás"
+
index ec74b44f9de3b1a3081dce7c9c1fe613d2907375..7c199ddde9e35c8ca9c32510d9d092dadc15b8c6 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Ապատեղադրե՞լ %s-ը:"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Ապատեղադրել"
\ No newline at end of file
+msgstr "Ապատեղադրել"
+
index 0d5ee011073a7439e4db7a3a15282bb8ff999ef4..78593e2362cbecaaf5dd96a4643d9396c84d2d41 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Fjarlægja %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Fjarlægja"
\ No newline at end of file
+msgstr "Fjarlægja"
+
index 81b02daa5c7a746a9f64ceaaacae45b56a52e532..ccaa8bc99f07696228af77e755953e187bbbb4fd 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Disinstallare %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Disinstalla"
\ No newline at end of file
+msgstr "Disinstalla"
+
index bacd41c4db2f42af7414b18ab2a1739bd7989680..3396a5072a7d22b55e8a2314a5ba3d0c86a2b31b 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "%sをアンインストールしますか?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "アンインストール"
\ No newline at end of file
+msgstr "アンインストール"
+
index 31d27265a88d778dfa33fb2d384a39e547674fe8..5143b5073f0f672a103abe0ac8d4b8d2e010b3b5 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "ამოინსტალირდეს %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "ინსტალაციის გაუქმება"
\ No newline at end of file
+msgstr "ინსტალაციის გაუქმება"
+
index c1d9813ebb95830516882c83535ea2237304e9dc..42005b69238e9c65038031000f8754efc57d782d 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "%s жою керек пе?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Жою"
\ No newline at end of file
+msgstr "Жою"
+
index 606c7c2d283f6e1c7ef2b577857d7a6ebb341740..f7f6c2c27a9874e51fddfda8d0bb47947b563113 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "%s을(를) 삭제할까요?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "삭제"
\ No newline at end of file
+msgstr "삭제"
+
index dd44366eba4daad18e256ce01760ce75d0ab5070..357647f3e74f14ba2424095a86ca9f92c3495a50 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Pašalinti „%s“?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Pašalinti"
\ No newline at end of file
+msgstr "Pašalinti"
+
index 8160d6ca1dbcfc82cfa41b4560dca5b109e1e11e..3aeba4defcca864f7a262c96e78364247180152c 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Vai atinstalēt %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Atinstalēt"
\ No newline at end of file
+msgstr "Atinstalēt"
+
index eb6aca3be6d1b1e49489686e34b8732bb332432c..2ff16dcddb1e13010103594a5a3de99e95b64f57 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Да се деинсталира %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Деинсталирај"
\ No newline at end of file
+msgstr "Деинсталирај"
+
diff --git a/data/po/nl.po b/data/po/nl.po
new file mode 100755 (executable)
index 0000000..2084f23
--- /dev/null
@@ -0,0 +1,9 @@
+msgid "IDS_HS_BUTTON_DONE"
+msgstr "Gereed"
+
+msgid "IDS_AT_POP_UNINSTALL_PS_Q"
+msgstr "%s verwijderen?"
+
+msgid "IDS_AT_BODY_UNINSTALL"
+msgstr "Verwijderen"
+
index c971254f4a3897ef7cc5ca3b6a3b804d6144ef2d..092015d3e47b08f396275d6726724955d37f3e39 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Odinstalować %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Odinstaluj"
\ No newline at end of file
+msgstr "Odinstaluj"
+
index 28b996a1f6ea09b6566b48c7f680799f72a07492..c173dd4d070b8b5e859b4d73be965471685a8193 100644 (file)
@@ -1,8 +1,9 @@
 msgid "IDS_HS_BUTTON_DONE"
-msgstr "Concluído"
+msgstr "OK"
 
 msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Desinstalar %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Desinstalar"
\ No newline at end of file
+msgstr "Desinstalar"
+
index 814098007c5bd8030eea73364132ccc68946e9db..77e33c53bbedc25a570d4e5799eac34f2a82d2ce 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Desinstalar %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Desinstalar"
\ No newline at end of file
+msgstr "Desinstalar"
+
index a93f22646d93a53fcfb834175f9639a0a699f0c2..ba7787e52ddd72521572a7502bf141e97cae4fc0 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Dezinstalaţi %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Dezinstalare"
\ No newline at end of file
+msgstr "Dezinstalare"
+
index 83768b3a02903415d94fd946fd88272062455859..576f9c23450d8f22433e7680b83ba9c62f0c40d6 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Удалить %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Удалить"
\ No newline at end of file
+msgstr "Удалить"
+
index bd962da966ad1e4953b57f09db2a8712d5decd87..20559e20a9e28ac1c31da38f2f46a7b833f95b9d 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Odinštalovať program %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Odinštalovať"
\ No newline at end of file
+msgstr "Odinštalovať"
+
index 4b5555ebbf3976a1582af9fabe09041cdae5f853..cf4858b9bbadf49fbb790b611ac6a36cc7281eda 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Želite odstraniti %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Odstrani"
\ No newline at end of file
+msgstr "Odstrani"
+
index a9fb72159c79173cf8deab15e7762bdde25a8a0a..e559c922afdf5a006d332933790f5ef6328916b1 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Deinstalirati %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Deinstaliraj"
\ No newline at end of file
+msgstr "Deinstaliraj"
+
index 330726d003e62160f435c5df363111898c97d7fa..494db5bdb28e53ac54d181a7706231dcc0690d9d 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Avinstallera %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Avinstallera"
\ No newline at end of file
+msgstr "Avinstallera"
+
index 32ce85c00577a45f577313a6bde7fb5c763cb084..e0a2c44294ce480a5645fb7862f0c5c1bc2276ea 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "%s kaldırılsın mı?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Kaldır"
\ No newline at end of file
+msgstr "Kaldır"
+
index d50f5c567949367cb943f3f7155770ceb12a5aa4..02250aeec3f64ae1e2c4c30fe57d7e4b3d3776c8 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "Видалити %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Видалити"
\ No newline at end of file
+msgstr "Видалити"
+
index 170b97a0e41d530ec53d4d2920658282b376e9c0..6234c678b779290814c5e7e12ca91ac4b1137f41 100644 (file)
@@ -1,8 +1,9 @@
 msgid "IDS_HS_BUTTON_DONE"
-msgstr "Qilindi"
+msgstr "OK"
 
 msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "%s olib tashlansinmi?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Olib tashlash"
\ No newline at end of file
+msgstr "Olib tashlash"
+
index 781b4f0f4b8cbbef9522fe6fa75b8fc27829745a..e47a0eeb47f1b57bde888d1794867156a1b3321e 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "是否卸载 %s?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "卸载"
\ No newline at end of file
+msgstr "卸载"
+
index 708e6ef25d62274d279b2e57fe59a317d99dc2f6..81236c8b2c2e9ea9b288d5c1d50418d09d17f643 100644 (file)
@@ -5,4 +5,5 @@ msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "解除安裝 %s 嗎?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "解除安裝"
\ No newline at end of file
+msgstr "解除安裝"
+
index 708e6ef25d62274d279b2e57fe59a317d99dc2f6..629d4dba2fdf687ca29f068d7197d4ff7a1be742 100644 (file)
@@ -1,8 +1,9 @@
 msgid "IDS_HS_BUTTON_DONE"
-msgstr "完成"
+msgstr "確定"
 
 msgid "IDS_AT_POP_UNINSTALL_PS_Q"
 msgstr "解除安裝 %s 嗎?"
 
 msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "解除安裝"
\ No newline at end of file
+msgstr "解除安裝"
+
index 60aeeb669eeafb59d29424eace6bcecf41a2b5c4..08997d5440b788670f774042cb5520964f5f29db 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_ALL_APPS_DB_H__
 #define __MENU_SCREEN_ALL_APPS_DB_H__
@@ -25,7 +29,6 @@
 typedef struct _db_info {
        long long rowid;
        int type;
-
        char *appid;
        char *name;
        char *content_info;
index 73cd02374af2117ecf55b3eae2e1935ba7925977..f3d615196ed786500e24b1a85e9614ab32a894c4 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 _MENU_SCREEN_CONTROLBAR_ALL_APPS_H_
 #define _MENU_SCREEN_CONTROLBAR_ALL_APPS_H_
index fe93e4f618d686640537970cbba88847bbba9ab8..126aed85b79dc09b6a1e652294fc8db3e42a02c3 100644 (file)
@@ -1,25 +1,30 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
 
+ * 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 __MENU_SCREEN_LIST_ALL_APPS_H__
 #define __MENU_SCREEN_LIST_ALL_APPS_H__
 
 extern app_list *all_apps_list_create(void);
+extern int all_apps_list_find_installed_time(const char *id);
 extern void all_apps_list_destroy(app_list *list);
 
 #endif //__MENU_SCREEN_LIST_ALL_APPS_H__
index 0d536bf168764a5bbb20c8f19de2280c2632731f..2421671dbf3ea359f7460b2f8f739613e689a890 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 _MENU_SCREEN_ALL_APPS_SHORTCUT_H_
 #define _MENU_SCREEN_ALL_APPS_SHORTCUT_H_
index 50d40f88ac80e72f038be62ac9ef59a1c7049ffb..47cb96c21fbccd563b0f41046d1a66746bba53cc 100644 (file)
@@ -1,35 +1,44 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 _MENU_SCREEN_CONF_H_
 #define _MENU_SCREEN_CONF_H_
 
-#define MAX_PAGE_NO 9
+#define MAX_PAGE_NO 10
 
 #define BASE_HEIGHT 1280.0f
 #define BASE_WIDTH 720.0f
 
+#define INDICATOR_PORT_HEIGHT 70
+#define INDICATOR_HEIGHT_PROP (INDICATOR_PORT_HEIGHT/BASE_HEIGHT)
+
 #define PAGE_PORTRAIT_HEIGHT 1030.0f
 #define INDEX_HEIGHT 70
 
-#define ITEM_WIDTH 180.0
+#define ITEM_WIDTH 180.0 //180.0
+#define LITE_ITEM_WIDTH 90.0
 #define ITEM_WIDTH_PROP (ITEM_WIDTH/BASE_WIDTH)
-#define ITEM_HEIGHT 198.0
+#define ITEM_HEIGHT 198.0 //198.0
+#define LITE_ITEM_HEIGHT 99.0
 #define ITEM_HEIGHT_PROP (ITEM_HEIGHT/BASE_HEIGHT)
 
 #endif // _MENU_SCREEN_CONF_H_
index dd962f618f66703518e191014b623a735bdaf553..5ec5bd910d94fb42d87f6b6d821e0d0190844b48 100644 (file)
@@ -1,18 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_DB_H__
 #define __MENU_SCREEN_DB_H__
index fcc2454b0995953a0f63c43b8c78823cd00085ef..27ef1c0c893a23531aefb0c94e2d8949f8c963dd 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_PAGE_CONTROL_H__
 #define __MENU_SCREEN_PAGE_CONTROL_H__
index ab7fe211afd9b2d6374a52a512d611a94328ad2e..a42d3c82fc60e7ff450777ee3b2615f5646143ea 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_ITEM_H__
 #define __MENU_SCREEN_ITEM_H__
@@ -30,6 +34,9 @@ extern void item_set_icon(Evas_Object *item, char *icon, int sync);
 extern char *item_get_name(Evas_Object *item);
 extern void item_set_name(Evas_Object *item, char *name, int sync);
 
+extern void item_set_pkgid(Evas_Object *edje, char *package, int sync);
+extern char *item_get_pkgid(Evas_Object *edje);
+
 extern char *item_get_package(Evas_Object *item);
 extern void item_set_package(Evas_Object *item, char *package, int sync);
 
index 068d03bf0b9ff9f109e552bb7451b68c581f4b11..659b32301c7fbfce2102969cdded43625f7a00a7 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_BADGE_H__
 #define __MENU_SCREEN_BADGE_H__
index 547103a43ecd33531951bfce017455967e1c8284..d140130f15dcb5d79b82f2b55588972e54d9f195 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
 
+ * 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 __MENU_SCREEN_ITEM_EVENT_H__
 #define __MENU_SCREEN_ITEM_EVENT_H__
index def465ffbcc30a5244b459f735f8d9393210e5f5..b3bb91c88f50bffccb9e89f41b03f8f531e5a4fe 100644 (file)
@@ -1,18 +1,24 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_INPUT_KEY_H__
 #define __MENU_SCREEN_INPUT_KEY_H__
index d24aad087b1c5bf5872531a22de6af1a4d27e53d..4edc6b011331a6c4d479fc4777ea10df792dbf87 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_LAYOUT_H__
 #define __MENU_SCREEN_LAYOUT_H__
@@ -31,6 +35,10 @@ extern void layout_disable_block(Evas_Object *layout);
 extern Evas_Object* layout_load_edj(Evas_Object *parent, const char *edjname, const char *grpname);
 extern void layout_unload_edj(Evas_Object *layout);
 
+HAPI void layout_create_package(Evas_Object *layout, const char *package);
+HAPI void layout_update_package(Evas_Object *layout, const char *package);
+HAPI void layout_delete_package(Evas_Object *layout, const char *package);
+
 #endif //__MENU_SCREEN_LAYOUT_H__
 
 // End of a file
index e39d285030ebe20ac258508708ddff6bee7c8ba0..9c6c1b9c642db52fa4b262fbf6b8bff9ea22cd77 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
 
+ * 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 __MENU_SCREEN_LIST_H__
 #define __MENU_SCREEN_LIST_H__
@@ -26,7 +30,8 @@
 
 typedef struct
 {
-       char *package;
+       char *pkgid;
+       char *package; /* appid */
        char *exec;
        char *name;
        char *icon;
@@ -48,7 +53,7 @@ typedef struct _app_list_item {
        char *package;
        pid_t pid;
        time_t launch_time;
-       long long installed_time;
+       int installed_time;
        void *data;
 } app_list_item;
 
@@ -64,6 +69,7 @@ extern void list_free_values(app_info_t *ai);
 extern menu_screen_error_e list_append_item(app_list *list, app_list_item *item);
 extern menu_screen_error_e list_remove_item(app_list *list, app_list_item *item);
 extern menu_screen_error_e list_sort(app_list *list, int (*_sort_cb)(const void *d1, const void *d2));
+extern app_list_item *list_nth(app_list *parent, unsigned int nth);
 
 #endif //__MENU_SCREEN_LIST_H__
 
index d42f1f580636a0de03486d547333355f313f2060..db209041ffe3440f120ed9707b0d7838a97d2152 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_MAPBUF_H__
 #define __MENU_SCREEN_MAPBUF_H__
index 03848f329a4aa30dfe648f8171430a5121d97298..06d8fc3041c427b56d7f7b0a2519e2d2975131b2 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
 
+ * 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 __MENU_SCREEN_H__
 #define __MENU_SCREEN_H__
@@ -33,6 +37,10 @@ extern void menu_screen_set_done(bool is_done);
 extern int menu_screen_get_state(void);
 extern int menu_screen_is_tts(void);
 
+extern void menu_screen_inc_booting_state(void);
+extern void menu_screen_dec_booting_state(void);
+extern int menu_screen_get_booting_state(void);
+
 #endif //__MENU_SCREEN_H__
 
 // End of a file
index 50b34425e05dbf601295ee015c9a812cfebcab5b..85d0a29c30570fe35934ee785975998dc7b81d3c 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_EVENT_H__
 #define __MENU_SCREEN_EVENT_H__
index 990d8609d18d286300bc80f96c06c05e5c644303..4c4ad3aeb7432ea28c703e07ab2c7efa71a0508a 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_PAGE_H__
 #define __MENU_SCREEN_PAGE_H__
index 282a5f206471a44fe7d9282950da064f1f36fb9e..da9e4f25ad971d40f6a6846baf2f9ffebbac5e79 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_PAGE_SCROLLER_H__
 #define __MENU_SCREEN_PAGE_SCROLLER_H__
@@ -40,6 +44,7 @@ extern unsigned int page_scroller_count_page(Evas_Object *scroller);
 extern int page_scroller_get_page_no(Evas_Object* scroller, Evas_Object *page);
 
 extern Evas_Object *page_scroller_push_item(Evas_Object *scroller, app_info_t *ai);
+extern Evas_Object *page_scroller_push_item_by_order(Evas_Object *scroller, app_info_t *ai);
 extern int page_scroller_get_current_page_no(Evas_Object *scroller);
 extern Evas_Object *page_scroller_find_item_by_package(Evas_Object *scroller, const char *package, int *page_no);
 extern void page_scroller_trim_items(Evas_Object *scroller);
index 42b29c1ca38417ea980fe482250aabc9d9dc04ae..bd2aa06732252dbdf6b726219acc8d493ffd1733 100644 (file)
@@ -1,65 +1,42 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_PKGMGR_H__
 #define __MENU_SCREEN_PKGMGR_H__
 
-#include <Evas.h>
-
-#include "list.h"
-#include "util.h"
-
-
-
-enum package_install_status {
-       UNKNOWN = 0x00,
-       DOWNLOAD_BEGIN,
-       DOWNLOADING,
-       DOWNLOAD_END,
-       INSTALL_BEGIN,
-       INSTALLING,
-       INSTALL_END,
-       UNINSTALL_BEGIN,
-       UNINSTALLING,
-       UNINSTALL_END,
-       UPDATE_BEGIN,
-       UPDATING,
-       UPDATE_END,
-       MAX_STATUS,
-};
-
 
+HAPI menu_screen_error_e pkgmgr_item_list_append_item(const char *pkg_id, const char *app_id, Evas_Object *item);
+HAPI menu_screen_error_e pkgmgr_item_list_remove_item(const char *pkg_id, const char *app_id, Evas_Object *item);
 
-struct package_info {
-       enum package_install_status status;
-       app_info_t ai;
-       Evas_Object *item;
-       Evas_Object *page;
-       Eina_Bool desktop_file_found;
-       int error_count;
-};
+HAPI void pkgmgr_item_list_affect_pkgid(const char *pkg_id, Eina_Bool (*_affected_cb)(const char *, Evas_Object *, void *), void *data);
+HAPI void pkgmgr_item_list_affect_appid(const char *app_id, Eina_Bool (*_affected_cb)(const char *, Evas_Object *, void *), void *data);
 
+HAPI inline menu_screen_error_e pkgmgr_uninstall(Evas_Object *item);
 
+HAPI menu_screen_error_e pkgmgr_reserve_list_push_request(const char *package, const char *key, const char *val);
+HAPI menu_screen_error_e pkgmgr_reserve_list_pop_request(void);
 
-extern menu_screen_error_e pkgmgr_init(Evas_Object *scroller);
-extern void pkgmgr_fini(void);
-extern Evas_Object *pkgmgr_find_pended_object(const char *package, int with_desktop_file, Evas_Object *scroller, Evas_Object **page);
-extern menu_screen_error_e pkgmgr_uninstall(Evas_Object *obj);
+HAPI menu_screen_error_e pkgmgr_init(void);
+HAPI void pkgmgr_fini(void);
 
 #endif //__MENU_SCREEN_PKGMGR_H__
 
index b894376ef6f56fa51201d57b0109e0999851cf72..d871b919713dc04f2032406a907eefd049773d23 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
 
+ * 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 __MENU_SCREEN_POPUP_H__
 #define __MENU_SCREEN_POPUP_H__
index 44579b31f0f56697281e628b7bbe9833b110c38a..4ddc2b71bb2e296993f39553119880e4b07d51e3 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_UTIL_H__
 #define __MENU_SCREEN_UTIL_H__
 #define STR_ENV_MAPBUF "BEATUX_MAPBUF"
 
 #define ALL_APPS_TABLE "all_apps"
+#define BOOTING_STATE_DONE 1
+
+/* Data key */
+#define DATA_KEY_MAIN_OPERATION_LIST "ma_op_li"
 
 /* Accessibility */
 #define ACCESS_BUTTON "button"
diff --git a/org.tizen.menu-screen.efl b/org.tizen.menu-screen.efl
new file mode 100755 (executable)
index 0000000..ee4a59f
--- /dev/null
@@ -0,0 +1,98 @@
+org.tizen.menu-screen app-svc rwx--- ------
+org.tizen.menu-screen pkgmgr::db rw---l ------
+org.tizen.menu-screen ail::db rw---- ------
+org.tizen.menu-screen system::use_internet r----- ------
+org.tizen.menu-screen device::app_logging -w---- ------
+org.tizen.menu-screen net-config r-x--- ------
+org.tizen.menu-screen xorg rwx--- ------
+org.tizen.menu-screen isf rwx--- ------
+org.tizen.menu-screen dbus rwx--- ------
+org.tizen.menu-screen ug-image-viewer-efl r-x--- ------
+org.tizen.menu-screen cbhm r-x--- ------
+org.tizen.menu-screen sound_server rwx--- ------
+org.tizen.menu-screen svi-data r-x--- ------
+org.tizen.menu-screen data-provider-master rwx--- ------
+org.tizen.menu-screen org.tizen.indicator rwx--- ------
+org.tizen.menu-screen org.tizen.setting r-x--- ------
+org.tizen.menu-screen sqlfs r-x--- ------
+org.tizen.menu-screen e17 rwx--- ------
+org.tizen.menu-screen dlogutil r-x--- ------
+org.tizen.menu-screen immvibed rwx--- ------
+org.tizen.menu-screen rua::db rw---- ------
+org.tizen.menu-screen org.tizen.clock -w---- ------
+org.tizen.menu-screen badge::db rw---- ------
+org.tizen.menu-screen aul rwx--- ------
+org.tizen.menu-screen system-server r-x--- ------
+org.tizen.menu-screen deviced r-x--- ------
+org.tizen.menu-screen sensor-framework r-x--- ------
+org.tizen.menu-screen secure-storage r-x--- ------
+org.tizen.menu-screen pkgmgr-client r-x--- ------
+org.tizen.menu-screen syslogd -w---- ------
+org.tizen.indicator org.tizen.menu-screen rwx--- ------
+org.tizen.browser org.tizen.menu-screen rw---- ------
+org.tizen.contact org.tizen.menu-screen rw---- ------
+org.tizen.youtube-shortcut org.tizen.menu-screen rw---- ------
+org.tizen.message org.tizen.menu-screen rw---- ------
+org.tizen.voicerecorder org.tizen.menu-screen rw---- ------
+org.tizen.calendar org.tizen.menu-screen rw---- ------
+org.tizen.episode org.tizen.menu-screen rw---- ------
+org.tizen.keepit org.tizen.menu-screen rw---- ------
+org.tizen.calculator org.tizen.menu-screen rw---- ------
+org.tizen.clock org.tizen.menu-screen rw---- ------
+org.tizen.camera-app org.tizen.menu-screen rw---- ------
+org.tizen.svoice org.tizen.menu-screen rw---- ------
+org.tizen.group-cast org.tizen.menu-screen rw---- ------
+org.tizen.phone org.tizen.menu-screen rw---- ------
+org.tizen.smartsearch org.tizen.menu-screen rw---- ------
+org.tizen.setting org.tizen.menu-screen rw---- ------
+org.tizen.myfile org.tizen.menu-screen rw---- ------
+org.tizen.rcs-im org.tizen.menu-screen rw---- ------
+org.tizen.smemo org.tizen.menu-screen rw---- ------
+org.tizen.facebook org.tizen.menu-screen rw---- ------
+org.tizen.gallery org.tizen.menu-screen rw---- ------
+org.tizen.email org.tizen.menu-screen rw---- ------
+org.tizen.music-player org.tizen.menu-screen rw---- ------
+org.tizen.nfc-app org.tizen.menu-screen rw---- ------
+org.tizen.video-player org.tizen.menu-screen rw---- ------
+org.tizen.contacts org.tizen.menu-screen rw---- ------
+dbus org.tizen.menu-screen rwx--- ------
+stest-service org.tizen.menu-screen r-x--- ------
+org.tizen.menu-screen stest-service -w---- ------
+org.tizen.menu-screen org.tizen.setting::default-resources r-x--- ------
+org.tizen.menu-screen pkgmgr::svc r-x--- ------
+org.tizen.menu-screen pkgmgr::info r----- ------
+org.tizen.menu-screen system::vconf_system rw---- ------
+org.tizen.menu-screen system::vconf_inhouse rw---- ------
+org.tizen.menu-screen aul::launch --x--- ------
+org.tizen.menu-screen data-provider-master::shortcut rw---- ------
+org.tizen.menu-screen data-provider-master::shortcut.shortcut -w---- ------
+org.tizen.menu-screen data-provider-master::notification rw---- ------
+org.tizen.menu-screen data-provider-master::notification.client -w---- ------
+org.tizen.menu-screen data-provider-master::badge rw---- ------
+org.tizen.menu-screen data-provider-master::badge.client -w---- ------
+org.tizen.menu-screen tts-server rwx--- ------
+org.tizen.menu-screen idlescreen::vconf rwx--- ------
+org.tizen.app-tray org.tizen.menu-screen r-x--- ------
+org.tizen.menu-screen factory-15 r-x--- ------
+org.tizen.menu-screen telephony_framework::api_manager r----- ------
+org.tizen.menu-screen telephony_framework::api_modem r-x--- ------
+org.tizen.menu-screen telephony_framework::api_network r-x--- ------
+org.tizen.menu-screen atd-server r----- ------
+org.tizen.menu-screen factory::vconf rw---- ------
+org.tizen.menu-screen dfms-kernel r----- ------
+org.tizen.menu-screen system::homedir rwxat- ------
+org.tizen.menu-screen system::vconf rwxat- ------
+org.tizen.menu-screen system::media rwxat- ------
+org.tizen.menu-screen system::share rwxat- ------
+org.tizen.menu-screen pulseaudio rwxat- ------
+e17 org.tizen.menu-screen -w---- ------
+org.tizen.menu-screen sys-assert::core rwxat- ------
+org.tizen.menu-screen privacy-manager::db r----l ------
+org.tizen.menu-screen system::vconf_setting rw---- ------
+org.tizen.menu-screen system::vconf_privacy rw---- ------
+org.tizen.menu-screen system::vconf_multimedia rw---- ------
+org.tizen.menu-screen system::vconf_network rw---- ------
+org.tizen.menu-screen system::vconf_misc rw---- ------
+org.tizen.menu-screen ecore::lock rwxat- ------
+org.tizen.menu-screen org.tizen.wallpaper-ui-service rwxat- ------
+org.tizen.menu-screen system::storage rwxat- ------
index af98acf1c3b38400604255482357f3edd875ae8e..180519a0705dd6238a5858457b9b2b6391274716 100644 (file)
@@ -7,5 +7,6 @@
        </request>
        <assign>
                <filesystem path="/usr/share/packages/org.tizen.menu-screen.xml" label="_" />
+               <filesystem path="/usr/share/icons/default/small/org.tizen.menu-screen.png" label="_" />
        </assign>
-</manifest>
\ No newline at end of file
+</manifest>
diff --git a/org.tizen.menu-screen.rule b/org.tizen.menu-screen.rule
deleted file mode 100644 (file)
index fe79e16..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-org.tizen.menu-screen pkgmgr::db rw
-org.tizen.menu-screen ail::db rw
-org.tizen.menu-screen system::homedir rwxat
-org.tizen.menu-screen system::vconf rwxat
-org.tizen.menu-screen system::media rwxat
-org.tizen.menu-screen system::share rwxat
-org.tizen.menu-screen system::use_internet r
-org.tizen.menu-screen device::app_logging w
-org.tizen.menu-screen device::camera rwx
-org.tizen.menu-screen sys-assert::core rwxat
-org.tizen.menu-screen pulseaudio rwxat
-org.tizen.menu-screen net-config rx
-org.tizen.menu-screen xorg rwx
-org.tizen.menu-screen isf rwx
-org.tizen.menu-screen dbus rwx
-org.tizen.menu-screen ug-image-viewer-efl rx
-org.tizen.menu-screen cbhm rx
-org.tizen.menu-screen sound_server rwx
-org.tizen.menu-screen svi-data rx
-org.tizen.menu-screen data-provider-master rwx
-org.tizen.menu-screen org.tizen.indicator rwx
-org.tizen.menu-screen org.tizen.setting rx
-org.tizen.menu-screen sqlfs rx
-org.tizen.menu-screen e17 rwx
-org.tizen.menu-screen dlogutil rx
-org.tizen.menu-screen immvibed rwx
-org.tizen.menu-screen rua::db rw
-org.tizen.menu-screen org.tizen.clock w
-org.tizen.menu-screen badge::db rw
-org.tizen.menu-screen aul rwx
-org.tizen.menu-screen system-server rx
-org.tizen.menu-screen deviced rx
-org.tizen.menu-screen sensor-framework rx
-org.tizen.menu-screen secure-storage rx
-org.tizen.menu-screen pkgmgr-client rx
-org.tizen.menu-screen syslogd w
-org.tizen.menu-screen system::vconf_multimedia rw
-org.tizen.indicator org.tizen.menu-screen rwx
-org.tizen.browser org.tizen.menu-screen rw
-org.tizen.contact org.tizen.menu-screen rw
-org.tizen.youtube-shortcut org.tizen.menu-screen rw
-org.tizen.message org.tizen.menu-screen rw
-org.tizen.voicerecorder org.tizen.menu-screen rw
-org.tizen.calendar org.tizen.menu-screen rw
-org.tizen.episode org.tizen.menu-screen rw
-org.tizen.keepit org.tizen.menu-screen rw
-org.tizen.calculator org.tizen.menu-screen rw
-org.tizen.clock org.tizen.menu-screen rw
-org.tizen.camera-app org.tizen.menu-screen rw
-org.tizen.svoice org.tizen.menu-screen rw
-org.tizen.group-cast org.tizen.menu-screen rw
-org.tizen.phone org.tizen.menu-screen rw
-org.tizen.smartsearch org.tizen.menu-screen rw
-org.tizen.setting org.tizen.menu-screen rw
-org.tizen.myfile org.tizen.menu-screen rw
-org.tizen.rcs-im org.tizen.menu-screen rw
-org.tizen.smemo org.tizen.menu-screen rw
-org.tizen.facebook org.tizen.menu-screen rw
-org.tizen.dailybriefing-ynews org.tizen.menu-screen rw
-org.tizen.gallery org.tizen.menu-screen rw
-org.tizen.email org.tizen.menu-screen rw
-org.tizen.dailybriefing-yfinance org.tizen.menu-screen rw
-org.tizen.music-player org.tizen.menu-screen rw
-org.tizen.nfc-app org.tizen.menu-screen rw
-org.tizen.dailybriefing-accuweather org.tizen.menu-screen rw
-org.tizen.video-player org.tizen.menu-screen rw
-org.tizen.contacts org.tizen.menu-screen rw
-dbus org.tizen.menu-screen rwx
-e17 org.tizen.menu-screen rwx
-stest-service org.tizen.menu-screen rx
-org.tizen.menu-screen stest-service w
-org.tizen.menu-screen org.tizen.setting::default-resources rx
-org.tizen.menu-screen pkgmgr::svc rx
-org.tizen.menu-screen pkgmgr::info r
-org.tizen.menu-screen system::vconf_system rw
-org.tizen.menu-screen system::vconf_inhouse rw
-org.tizen.menu-screen aul::launch x
-org.tizen.menu-screen data-provider-master::shortcut rw
-org.tizen.menu-screen data-provider-master::shortcut.shortcut w
-org.tizen.menu-screen data-provider-master::notification rw
-org.tizen.menu-screen data-provider-master::notification.client w
-org.tizen.menu-screen data-provider-master::badge rw
-org.tizen.menu-screen data-provider-master::badge.client w
-org.tizen.menu-screen tts-server rwx
-org.tizen.menu-screen idlescreen::vconf rwx
-org.tizen.app-tray org.tizen.menu-screen rx
-org.tizen.menu-screen factory-15 rx
-org.tizen.menu-screen telephony_framework::api_manager r
-org.tizen.menu-screen telephony_framework::api_modem r
-org.tizen.menu-screen telephony_framework::api_network r
-org.tizen.menu-screen atd-server r
-org.tizen.menu-screen factory::vconf rw
-org.tizen.menu-screen mobileprint x
-org.tizen.menu-screen _ wx
old mode 100644 (file)
new mode 100755 (executable)
index bb6eab5..0a8155c
 
 Name:       org.tizen.menu-screen
 Summary:    An utility library of the menu screen
-Version:    1.2.7
+Version:    1.2.5
 Release:    1.1
 Group:      TO_BE/FILLED_IN
-License:    Flora Software License
+License:    Apache
 Source0:    %{name}-%{version}.tar.gz
 BuildRequires:  pkgconfig(ail)
 BuildRequires:  pkgconfig(appcore-efl)
@@ -40,17 +40,22 @@ BuildRequires:  pkgconfig(eet)
 BuildRequires:  pkgconfig(eina)
 BuildRequires:  pkgconfig(elementary)
 BuildRequires:  pkgconfig(evas)
-BuildRequires:  pkgconfig(heynoti)
 BuildRequires:  pkgconfig(pkgmgr)
 BuildRequires:  pkgconfig(pkgmgr-info)
 BuildRequires:  pkgconfig(shortcut)
-BuildRequires:  pkgconfig(sysman)
 BuildRequires:  pkgconfig(syspopup-caller)
 BuildRequires:  pkgconfig(utilX)
 BuildRequires:  cmake
 BuildRequires:  edje-tools
 BuildRequires:  gettext-tools
-
+BuildRequires:  hash-signer
+# %ifarch %{arm}
+# %define ARCH arm
+# BuildRequires:  pkgconfig(bincfg)
+# BuildRequires:  pkgconfig(factory)
+# %else
+# %define ARCH emulator
+# %endif
 
 %description
 An utility library for developers of the menu screen.
@@ -70,23 +75,47 @@ An utility library for developers of the menu screen (devel)
 %setup -q
 
 %build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
-CFLAGS="${CFLAGS} -Wall" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
+CFLAGS+=" -fPIC -fPIE ";export CFLAGS
+CXXFLAGS+=" -fPIC -fPIE -fvisibility=hidden -fvisibility-inlines-hidden ";export CXXFLAGS
+LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -pie ";export LDFLAGS
+
+%if 0%{?sec_build_binary_debug_enable}
+export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
+export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+%endif
+
+%if 0%{?tizen_build_binary_release_type_eng}
+export CFLAGS="${CFLAGS} -DTIZEN_ENGINEER_MODE"
+export CXXFLAGS="${CXXFLAGS} -DTIZEN_ENGINEER_MODE"
+export FFLAGS="${FFLAGS} -DTIZEN_ENGINEER_MODE"
+%endif
+
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCH=%{ARCH}
 make %{?jobs:-j%jobs}
 
 %install
 %make_install
+%define tizen_sign 1
+%define tizen_sign_base %{_packagedir}
+%define tizen_sign_level platform
+%define tizen_author_sign 1
+%define tizen_dist_sign 1
+
 mkdir -p %{buildroot}%{_datadir}
 mkdir -p %{buildroot}/usr/share/license
 
 %post
-INHOUSE_ID="5000"
+/usr/bin/signing-client/hash-signer-client.sh -a -d -p platform %{_packagedir}
+
+VCONF_OPTION="-f -u 5000"
+PRIVATE_OPTION="-s org.tizen.menu-screen"
+INHOUSE_OPTION="-s idlescreen::vconf"
 
 init_vconf()
 {
-       vconftool set -t int memory/idle-screen/top 0 -i -u 5000 -f
-       vconftool set -t string file/private/org.tizen.menu-screen/engine "gl" -i -u 5000 -f
-       vconftool set -t string db/setting/menuscreen/package_name "org.tizen.menu-screen" -i -u 5000 -f
+       vconftool set -t int memory/idle-screen/top 0 -i $VCONF_OPTION $INHOUSE_OPTION
+       vconftool set -t string file/private/org.tizen.menu-screen/engine "gl" $VCONF_OPTION $PRIVATE_OPTION
 }
 init_vconf
 
@@ -137,7 +166,9 @@ fi
 %{_resdir}/edje/layout_portrait.edj
 %{_resdir}/edje/index.edj
 %{_resdir}/images/default.png
+%{_resdir}/data/main_operation.launch
 %{_localedir}/*/*/*.mo
+%{_usr_datadir}/icons/default/small/org.tizen.menu-screen.png
 %{_usr_datadir}/packages/org.tizen.menu-screen.xml
-%{_usr_datadir}/license/%{name}
-/opt/etc/smack/accesses.d/%{_package_name}.rule
+%{_packagedir}/*.xml
+/etc/smack/accesses.d/%{_package_name}.efl
index ffed9c73dc831de574b6e1220e5e2fcfc7266c04..eb5485d55b91896d93bbf85b5474ba07a8f2bd9b 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <sys/stat.h>
 #include <string.h>
@@ -27,7 +31,7 @@
 
 #define QUERY_LEN 1024
 
-#define MENU_SCREEN_DB_FILE "/opt/usr/apps/com.samsung.menu-screen/data/dbspace/.menu_screen.db"
+#define MENU_SCREEN_DB_FILE "/opt/usr/apps/org.tizen.menu-screen/data/dbspace/.menu_screen.db"
 #define SHORTCUT_TABLE "shortcut"
 #define QUERY_INSERT_SHORTCUT "INSERT INTO "SHORTCUT_TABLE" ("\
        "appid,"\
@@ -152,20 +156,24 @@ HAPI void all_apps_db_unretrieve_all_info(Eina_List *list)
 
 HAPI int all_apps_db_count_shortcut(const char *appid, const char *name)
 {
+       int count = -1;
+       char q[QUERY_LEN];
+       menu_screen_error_e ret = MENU_SCREEN_ERROR_FAIL;
+
        retv_if(MENU_SCREEN_ERROR_OK != db_open(MENU_SCREEN_DB_FILE), -1);
 
-       char q[QUERY_LEN];
        snprintf(q, sizeof(q), QUERY_COUNT_SHORTCUT, appid, name);
 
        stmt_h *st;
        st = db_prepare(q);
        retv_if(NULL == st, -1);
 
-       menu_screen_error_e ret = MENU_SCREEN_ERROR_FAIL;
        ret = db_next(st);
-       retv_if(MENU_SCREEN_ERROR_FAIL == ret, -1);
+       if (MENU_SCREEN_ERROR_FAIL == ret) {
+               db_finalize(st);
+               return -1;
+       }
 
-       int count = -1;
        count = db_get_int(st, 0);
 
        db_finalize(st);
index 71824814bbb09e5a367ce6e3c712b36a14b959eb..3842193c6df44e2d0346efbb7b42aae4c7eb294c 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <Elementary.h>
 
@@ -223,7 +227,7 @@ static menu_screen_error_e _load_item(Evas_Object *scroller, app_list_item *item
                return MENU_SCREEN_ERROR_OK;
        }
 
-       retv_if(NULL == page_scroller_push_item(scroller, ai), MENU_SCREEN_ERROR_FAIL);
+       retv_if(NULL == page_scroller_push_item_by_order(scroller, ai), MENU_SCREEN_ERROR_FAIL);
 
        return MENU_SCREEN_ERROR_OK;
 
@@ -257,6 +261,7 @@ ERROR:
        page_scroller_bring_in(scroller, 0);
        page_scroller_focus(scroller);
        menu_screen_set_done(true);
+       menu_screen_inc_booting_state();
 
        return ECORE_CALLBACK_CANCEL;
 }
@@ -299,6 +304,8 @@ HAPI Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate)
        Evas_Object *all_apps;
        Evas_Object *index;
        Evas_Object *scroller;
+       Evas_Object *bg;
+       Evas *evas;
 
        static const char item_edje[] = EDJEDIR"/item_4x4.edj";
        static const char *page_edje;
@@ -313,7 +320,7 @@ HAPI Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate)
        all_apps_edje = ALL_APPS_EDJE_PORTRAIT;
        page_edje = GROUP_4X4_EDJE_PORTRAIT;
        width = menu_screen_get_root_width();
-       height = menu_screen_get_root_height() - INDEX_HEIGHT;
+       height = menu_screen_get_root_height();
 
        item_width = ITEM_WIDTH_PROP * menu_screen_get_root_width();
        item_height = ITEM_HEIGHT_PROP * menu_screen_get_root_height();
@@ -324,6 +331,14 @@ HAPI Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate)
                return NULL;
        }
 
+       evas = menu_screen_get_evas();
+       bg = evas_object_rectangle_add(evas);
+       evas_object_size_hint_min_set(bg, width, height);
+       evas_object_size_hint_max_set(bg, width, height);
+       evas_object_resize(bg, width, height);
+       elm_object_part_content_set(all_apps, "bg", bg);
+       evas_object_show(bg);
+
        evas_object_data_set(all_apps, "win", evas_object_data_get(controlbar, "win"));
        evas_object_data_set(all_apps, "layout", evas_object_data_get(controlbar, "layout"));
        evas_object_data_set(all_apps, "controlbar", controlbar);
index ee06cfc5eaa2ab388b0a8a2c47afab05ca2b2988..2144455a58572f857ec5b1bc6a3caefe6658a062 100644 (file)
@@ -1,27 +1,64 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <Elementary.h>
+#include <pkgmgr-info.h>
 #include <ail.h>
 
 #include "menu_screen.h"
 #include "conf.h"
 #include "list.h"
+#include "all_apps/layout.h"
+
+
+HAPI int all_apps_list_find_installed_time(const char *id)
+{
+       pkgmgrinfo_pkginfo_h handle = NULL;
+       pkgmgrinfo_appinfo_h appinfo_h = NULL;
+
+       int ret = 0;
+       int installed_time = 0;
+
+       goto_if(0> pkgmgrinfo_appinfo_get_appinfo(id, &appinfo_h), ERROR);
+
+       char *pkgid = NULL;
+       goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_get_pkgid(appinfo_h, &pkgid), ERROR);
+       goto_if (NULL == pkgid, ERROR);
+
+       goto_if (0>pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle), ERROR);
+
+       ret = pkgmgrinfo_pkginfo_get_installed_time(handle, &installed_time);
+       goto_if (ret != PMINFO_R_OK, ERROR);
+
+       pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
+       pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+
+       return installed_time;
+
+ERROR:
+       if (appinfo_h) pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
+       if (handle) pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+       return 0;
+}
 
 
 
@@ -29,6 +66,8 @@ static ail_cb_ret_e _all_apps_cb(ail_appinfo_h ai, void *data)
 {
        app_list *list = data;
        app_list_item *item;
+       app_info_t *item_info;
+       int installed_time = 0;
        char *value;
 
        retv_if(ail_appinfo_get_str(ai, AIL_PROP_PACKAGE_STR, &value) == AIL_ERROR_FAIL, AIL_CB_RET_CANCEL);
@@ -52,6 +91,31 @@ static ail_cb_ret_e _all_apps_cb(ail_appinfo_h ai, void *data)
                return AIL_CB_RET_CANCEL;
        }
 
+       item_info = item->data;
+       if (NULL == item_info) {
+               free(item->data);
+               free(item->package);
+               free(item);
+               return AIL_CB_RET_CANCEL;
+       }
+
+       if (item_info->nodisplay || !item_info->enabled) {
+               free(item->data);
+               free(item->package);
+               free(item);
+               return AIL_CB_RET_CONTINUE;
+       }
+
+       installed_time = all_apps_list_find_installed_time(item->package);
+       item->installed_time = installed_time;
+
+       if (0 == item->installed_time) {
+               free(item->data);
+               free(item->package);
+               free(item);
+               return AIL_CB_RET_CANCEL;
+       }
+
        if (list_append_item(list, item) != MENU_SCREEN_ERROR_OK) {
                free(item->data);
                free(item->package);
@@ -66,6 +130,24 @@ static ail_cb_ret_e _all_apps_cb(ail_appinfo_h ai, void *data)
 
 
 
+static int _all_apps_installed_time_sort_cb(const void *d1, const void *d2)
+{
+       app_list_item *item[2];
+
+       retv_if(NULL == d1, 0);
+       retv_if(NULL == d2, 0);
+
+       item[0] = (app_list_item *) d1;
+       item[1] = (app_list_item *) d2;
+
+
+       if (item[0]->installed_time > item[1]->installed_time) return (1);
+       if (item[0]->installed_time < item[1]->installed_time) return (-1);
+       else return (0);
+}
+
+
+
 static int _all_apps_sort_cb(const void *d1, const void *d2)
 {
        app_info_t *ai[2];
@@ -85,6 +167,29 @@ static int _all_apps_sort_cb(const void *d1, const void *d2)
 
 
 
+HAPI void all_apps_list_destroy(app_list *list)
+{
+       app_list_item *item;
+
+       ret_if(NULL == list);
+       ret_if(NULL == list->list);
+
+       EINA_LIST_FREE(list->list, item) {
+               if (NULL == item) break;
+               if (item->package) free(item->package);
+               if (item->data) {
+                       list_free_values(item->data);
+                       free(item->data);
+               }
+               free(item);
+       }
+
+       eina_list_free(list->list);
+       free(list);
+}
+
+
+
 HAPI app_list *all_apps_list_create(void)
 {
        int count = 0;
@@ -109,39 +214,36 @@ HAPI app_list *all_apps_list_create(void)
        ail_filter_list_appinfo_foreach(f, _all_apps_cb, list);
        ail_filter_destroy(f);
 
-       if(MENU_SCREEN_ERROR_FAIL == list_sort(list, _all_apps_sort_cb)) {
-               _D("Cannot sort apps.");
-       }
-
-       if(MENU_SCREEN_ERROR_FAIL == list_count(list, &count)) {
+       if (MENU_SCREEN_ERROR_FAIL == list_count(list, &count)) {
                _D("Cannot count apps.");
        }
+
        _D("Total package count = %d", count);
 
-       return list;
-}
+       if (count > (MAX_PAGE_NO * PAGE_MAX_APP)) {
 
+               int i;
 
+               if (MENU_SCREEN_ERROR_FAIL == list_sort(list, _all_apps_installed_time_sort_cb)) {
+               _E("Cannot sort installed_time");
+               }
 
-HAPI void all_apps_list_destroy(app_list *list)
-{
-       app_list_item *item;
+               for(i = (MAX_PAGE_NO * PAGE_MAX_APP); i<count; i++) {
+                       app_list_item *item = list_nth(list, (MAX_PAGE_NO * PAGE_MAX_APP));
+                       if(!item)
+                               continue;
 
-       ret_if(NULL == list);
-       ret_if(NULL == list->list);
+                       _D("%d: %s will be removed", i, item->package);
 
-       EINA_LIST_FREE(list->list, item) {
-               if (NULL == item) break;
-               if (item->package) free(item->package);
-               if (item->data) {
-                       list_free_values(item->data);
-                       free(item->data);
+                       retv_if(MENU_SCREEN_ERROR_FAIL == list_remove_item(list, item), NULL);
                }
-               free(item);
        }
 
-       eina_list_free(list->list);
-       free(list);
+       if (MENU_SCREEN_ERROR_FAIL == list_sort(list, _all_apps_sort_cb)) {
+               _D("Cannot sort apps.");
+       }
+
+       return list;
 }
 
 
index fff1a61d704e2a6e5fd2c77b17fc31097ca71c23..0554491ec3cae5ef35396f994636393375dc74f7 100644 (file)
@@ -1,20 +1,24 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <shortcut.h>
 #include <stdbool.h>
@@ -49,8 +53,8 @@ HAPI Evas_Object *all_apps_shortcut_add(
        ai.x_slp_removable = 1;
        ai.x_slp_taskmanage = 0;
 
-       if (ADD_TO_HOME_IS_LIVEBOX(type)) {
-               _D("This is a livebox");
+       if (ADD_TO_HOME_IS_DYNAMICBOX(type)) {
+               _D("This is a dynamic box");
                return NULL;
        }
 
index 58a489cd02e6b5e490d84c01c00f8f399c3714ab..9efce2d498a95348da7c81ee98821611c35afc9a 100644 (file)
--- a/src/db.c
+++ b/src/db.c
@@ -1,20 +1,24 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <db-util.h>
 #include <sqlite3.h>
@@ -205,7 +209,9 @@ HAPI menu_screen_error_e db_finalize(stmt_h *handle)
        retv_if(NULL == handle->stmt, MENU_SCREEN_ERROR_INVALID_PARAMETER);
 
        ret = sqlite3_finalize(handle->stmt);
-       retv_with_dbmsg_if(ret != SQLITE_OK, MENU_SCREEN_ERROR_FAIL);
+       if(ret != SQLITE_OK) {
+               _E("Cannot finalize handle");
+       }
        free(handle);
 
        return MENU_SCREEN_ERROR_OK;
@@ -226,21 +232,20 @@ HAPI long long db_last_insert_rowid(void)
 
 HAPI menu_screen_error_e db_exec(const char *query)
 {
-       int ret;
-       char *errmsg;
-
        retv_if(NULL == query, MENU_SCREEN_ERROR_INVALID_PARAMETER);
        retv_if(NULL == db_info.db, MENU_SCREEN_ERROR_FAIL);
 
-       ret = sqlite3_exec(db_info.db, query, NULL, NULL, &errmsg);
-       if (ret != SQLITE_OK) {
-               _E("Cannot execute this query - %s. because %s",
-                               query, errmsg? errmsg:"uncatched error");
-               sqlite3_free(errmsg);
-               return MENU_SCREEN_ERROR_FAIL;
-       }
+       stmt_h *handle = db_prepare(query);
+       retv_if(NULL == handle, MENU_SCREEN_ERROR_FAIL);
+
+       goto_if(MENU_SCREEN_ERROR_FAIL == db_next(handle), ERROR);
+       if (MENU_SCREEN_ERROR_OK != db_finalize(handle)) return MENU_SCREEN_ERROR_FAIL;
 
        return MENU_SCREEN_ERROR_OK;
+
+ERROR:
+       if (handle) db_finalize(handle);
+       return MENU_SCREEN_ERROR_FAIL;
 }
 
 
@@ -305,7 +310,12 @@ HAPI menu_screen_error_e db_end_transaction(bool success)
                        }
                }
        } else {
-               sqlite3_exec(db_info.db, "ROLLBACK TRANSACTION", NULL, NULL, NULL);
+               ret = sqlite3_exec(db_info.db, "ROLLBACK TRANSACTION", NULL, NULL, NULL);
+               if (SQLITE_OK != ret) {
+                       _E("sqlite3_exec() Faild(%d)", ret);
+
+                       return MENU_SCREEN_ERROR_FAIL;
+               }
        }
 
        return MENU_SCREEN_ERROR_OK;
index fb2170520875d6d5688ddced60397f4e90a19228..afac24bd09eccec9f6ac6b71e3d771d1d9cf598d 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <Elementary.h>
 
index b29b03d25fdb052a2c5000877a0fe0582b7280d4..f063db89f64b8a99c897af4b417dea83b307a183 100644 (file)
@@ -1,25 +1,32 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <string.h>
 #include <Elementary.h>
 #include <ail.h>
 #include <appsvc.h>
+#include <app_control.h>
 #include <aul.h>
 
 #include "menu_screen.h"
@@ -40,6 +47,8 @@
 #define LAYOUT_BLOCK_INTERVAL          1.0
 #define ITEM_GROUP_NAME "icon"
 
+#define DATA_KEY_ITEM_LAUNCH_MAIN_OPERATION "dk_it_launch"
+#define STR_ATTRIBUTE_PKGID "pkgid"
 #define STR_ATTRIBUTE_NAME "name"
 #define STR_ATTRIBUTE_ICON "icon"
 #define STR_ATTRIBUTE_PKG_NAME "package"
@@ -107,8 +116,9 @@ HAPI void item_set_name(Evas_Object *edje, char *name, int sync)
                ret_if(NULL == tmp);
                evas_object_data_set(edje, STR_ATTRIBUTE_NAME, tmp);
                if (edje_object_part_text_set(_EDJ(edje), "txt", tmp) == EINA_FALSE){
-                       //_E("Failed to set text on the part");
+                       _E("Failed to set text on the part");
                }
+               elm_object_signal_emit(edje, "text,on", "menu");
        }
 }
 
@@ -212,6 +222,40 @@ HAPI char *item_get_package(Evas_Object *edje)
 
 
 
+HAPI void item_set_pkgid(Evas_Object *edje, char *package, int sync)
+{
+       char *tmp;
+       int changed;
+
+       tmp = evas_object_data_get(edje, STR_ATTRIBUTE_PKGID);
+       changed = (package && tmp) ? strcmp(tmp, package) : 1;
+
+       if (!changed) {
+               return;
+       }
+
+       free(tmp);
+       evas_object_data_del(edje, STR_ATTRIBUTE_PKGID);
+
+       if (package) {
+               tmp = strdup(package);
+               if (!tmp) {
+                       _E("No more space for string \"%s\"", package);
+               } else {
+                       evas_object_data_set(edje, STR_ATTRIBUTE_PKGID, tmp);
+               }
+       }
+}
+
+
+
+HAPI char *item_get_pkgid(Evas_Object *edje)
+{
+       return evas_object_data_get(edje, STR_ATTRIBUTE_PKGID);
+}
+
+
+
 HAPI void item_set_removable(Evas_Object *edje, int removable, int sync)
 {
        int value;
@@ -498,6 +542,32 @@ HAPI menu_screen_error_e item_is_edje_icon(const char *icon)
 
 
 
+static int _is_main_operation_launch(Evas_Object *scroller, const char *package)
+{
+       Eina_List *main_operation_list;
+
+       retv_if(!package, 0);
+
+       main_operation_list = evas_object_data_get(scroller, DATA_KEY_MAIN_OPERATION_LIST);
+       if (!main_operation_list) {
+               _D("main operation list is NULL");
+               return 0;
+       }
+
+       const Eina_List *l, *l_next;
+       char *data;
+       EINA_LIST_FOREACH_SAFE(main_operation_list, l, l_next, data) {
+               continue_if(!data);
+               if (!strcmp(package, data)) {
+                       return 1;
+               }
+       }
+
+       return 0;
+}
+
+
+
 HAPI void item_update(Evas_Object *item, app_info_t *ai)
 {
        Evas_Object *icon = NULL;
@@ -549,6 +619,7 @@ HAPI void item_update(Evas_Object *item, app_info_t *ai)
                evas_object_data_set(item, "icon_image", icon);
        }
 
+       item_set_pkgid(item, ai->pkgid, 0);
        item_set_package(item, ai->package, 0);
        item_set_desktop(item, ai->desktop, 0);
        item_set_name(item, ai->name, 0);
@@ -626,7 +697,6 @@ static char *_access_uninstall_cb(void *data, Evas_Object *obj)
 static void _uninstall_focus_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
        Evas_Object *win;
-       Evas_Object *scroller;
        char *package;
 
        win = menu_screen_get_win();
@@ -635,11 +705,8 @@ static void _uninstall_focus_clicked_cb(void *data, Evas_Object *obj, void *even
        _D("Uninstall button is up");
 
        Evas_Object *item = data;
-       scroller = evas_object_data_get(item, "scroller");
-
        package = item_get_package(item);
        ret_if(!package || strlen(package) == 0);
-       ret_if(pkgmgr_find_pended_object(package, 0, scroller, NULL));
 
        _D("Uninstalling... [%s]", package);
 
@@ -706,8 +773,6 @@ HAPI Evas_Object *item_create(Evas_Object *scroller, app_info_t* ai)
        evas_object_size_hint_max_set(bg, item_width, item_height);
        elm_object_part_content_set(item, "bg", bg);
 
-       edje_object_text_class_set(_EDJ(item), "tizen", "TIZEN:style=medium", 24);
-
        evas_object_data_set(item, "win", evas_object_data_get(scroller, "win"));
        evas_object_data_set(item, "layout", evas_object_data_get(scroller, "layout"));
        evas_object_data_set(item, "controlbar", evas_object_data_get(scroller, "controlbar"));
@@ -719,9 +784,17 @@ HAPI Evas_Object *item_create(Evas_Object *scroller, app_info_t* ai)
        evas_object_data_set(item, "x", (void *) 0);
        evas_object_data_set(item, "y", (void *) 0);
        evas_object_data_set(item, "dirty", (void *) 0);
+       if (_is_main_operation_launch(scroller, ai->package)) {
+               evas_object_data_set(item, DATA_KEY_ITEM_LAUNCH_MAIN_OPERATION, (void *) 1);
+       }
 
        item_update(item, ai);
        item_event_register(item);
+       if (MENU_SCREEN_ERROR_OK !=
+                                       pkgmgr_item_list_append_item(ai->pkgid, ai->package, item))
+       {
+               _E("Cannot append an item into the item list");
+       }
 
        return item;
 }
@@ -737,16 +810,27 @@ HAPI void item_destroy(Evas_Object *item)
        Eina_List *n;
        Eina_List *t;
        Evas_Object *pend_item;
-       int pending_idx;
        const char *icon_image_type;
+       char *pkgid = NULL;
+       char *package= NULL;
 
        ret_if(NULL == item);
 
+       pkgid = item_get_pkgid(item);
+       package = item_get_package(item);
+
+       if (pkgid
+               && package
+               && MENU_SCREEN_ERROR_OK !=
+                                       pkgmgr_item_list_remove_item(pkgid, package, item))
+       {
+               _E("Cannot remove an item in the item list");
+       }
+
        page = item_get_page(item);
        pending_list = evas_object_data_get(page, "pending,list");
        EINA_LIST_FOREACH_SAFE(pending_list, n, t, pend_item) {
                if (pend_item == item) {
-                       pending_idx = (int)evas_object_data_get(pend_item, "pending,idx");
                        pending_list = eina_list_remove(pending_list, pend_item);
                        evas_object_data_set(page, "pending,list", pending_list);
                        evas_object_data_del(pend_item, "pending,idx");
@@ -758,6 +842,7 @@ HAPI void item_destroy(Evas_Object *item)
        }
        item_event_unregister(item);
 
+       item_set_pkgid(item, NULL, 0);
        item_set_package(item, NULL, 1);
        item_set_desktop(item, NULL, 1);
        item_set_name(item, NULL, 1);
@@ -793,6 +878,7 @@ HAPI void item_destroy(Evas_Object *item)
        evas_object_data_del(item, "x");
        evas_object_data_del(item, "y");
        evas_object_data_del(item, "dirty");
+       evas_object_data_del(item, DATA_KEY_ITEM_LAUNCH_MAIN_OPERATION);
 
        do {
                Evas_Object *focus = NULL;
@@ -830,32 +916,32 @@ static void _run_cb(bundle *b, int request_code, appsvc_result_val result, void
 }
 
 
-
+#define BUNDLE_KEY_OPERATION    "__APP_SVC_OP_TYPE__"
 HAPI void item_launch(Evas_Object *obj)
 {
        char *package;
        char *name;
-       int ret_aul;
-       Evas_Object *layout;
+       bundle *b = NULL;
+       Evas_Object *layout = NULL;
 
-       ret_if(NULL == obj);
+       Evas_Object *item = obj;
+       ret_if(NULL == item);
 
-       name = item_get_name(obj);
-       package = item_get_package(obj);
+       name = item_get_name(item);
+       package = item_get_package(item);
        ret_if(NULL == package);
 
        layout = evas_object_data_get(menu_screen_get_win(), "layout");
        layout_enable_block(layout);
 
-       bool is_shortcut = (bool) evas_object_data_get(obj, "is_shortcut");
-       bool shortcut_launch_package = (bool) evas_object_data_get(obj, "shortcut_launch_package");
+       bool is_shortcut = (bool) evas_object_data_get(item, "is_shortcut");
+       bool shortcut_launch_package = (bool) evas_object_data_get(item, "shortcut_launch_package");
        if (is_shortcut && !shortcut_launch_package) {
-               bundle *b = NULL;
                b = bundle_create();
                ret_if(NULL == b);
 
                appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
-               appsvc_set_uri(b, evas_object_data_get(obj, "content_info"));
+               appsvc_set_uri(b, evas_object_data_get(item, "content_info"));
 
                int ret = -1;
                ret = appsvc_run_service(b, 0, _run_cb, NULL);
@@ -869,34 +955,55 @@ HAPI void item_launch(Evas_Object *obj)
 
                bundle_free(b);
        } else {
-               ret_aul = aul_open_app(package);
-               if (ret_aul == AUL_R_EINVAL) {
-                       char* sinform;
-                       int len;
+               int ret_aul = AUL_R_OK;
+               if (evas_object_data_get(item, DATA_KEY_ITEM_LAUNCH_MAIN_OPERATION)) {
+                       b = bundle_create();
+                       ret_if(NULL == b);
+
+                       if (0 != bundle_add(b, BUNDLE_KEY_OPERATION, APP_CONTROL_OPERATION_MAIN)) {
+                               _E("Cannot add to a bundle");
+                               bundle_free(b);
+                               return;
+                       }
 
-                       if (!name) {
-                               name = package;
+                       if (b) {
+                               ret_aul = aul_launch_app(package, b);
+                               if (AUL_R_EINVAL == ret_aul) {
+                                       _E("cannot launch app");
+                               }
+                               bundle_free(b);
                        }
+               } else {
+                       ret_aul = aul_open_app(package);
+                       if (AUL_R_EINVAL == ret_aul) {
+                               char* sinform;
+                               int len;
 
-                       // IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS : "Unable to launch %s"
-                       len = strlen(D_("IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS")) + strlen(name) + 1;
+                               if (!name) {
+                                       name = package;
+                               }
 
-                       sinform = calloc(len, sizeof(char));
-                       if (!sinform) {
-                               _E("cannot calloc for popup.");
-                               return;
-                       }
+                               // IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS : "Unable to launch %s"
+                               len = strlen(D_("IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS")) + strlen(name) + 1;
 
-                       snprintf(sinform, len, D_("IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS"), name);
-                       popup_create_confirm(layout, sinform);
+                               sinform = calloc(len, sizeof(char));
+                               if (!sinform) {
+                                       _E("cannot calloc for popup.");
+                                       return;
+                               }
 
-                       free(sinform);
-                       layout_disable_block(layout);
-               } else {
-                       _D("Launch app's ret : [%d]", ret_aul);
-                       _T(package);
-                       ecore_timer_add(LAYOUT_BLOCK_INTERVAL, _unblock_cb, NULL);
+                               snprintf(sinform, len, D_("IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS"), name);
+                               popup_create_confirm(layout, sinform);
+
+                               free(sinform);
+                               layout_disable_block(layout);
+                       }
                }
+
+               _D("Launch app's ret : [%d]", ret_aul);
+
+               _T(package);
+               ecore_timer_add(LAYOUT_BLOCK_INTERVAL, _unblock_cb, NULL);
        }
 }
 
index aa9527202aef844ca5ebec438c450ba5edd34542..ce4c853b0aa3d30f4beb518688d0efc62dae9cc0 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <badge.h>
 #include <Elementary.h>
index 4b9ef37d3e71c7aafea02c579bdf3456659b5bfa..01aa4f1cd4ae2e9395ffd3f8ab84ee64e372ae06 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <Elementary.h>
 #include <string.h>
index c8130fba54cdda2b19539fb194d8bb464e85923c..0cb68034257bcd7c9548d40f5d1f840a7463ec82 100644 (file)
--- a/src/key.c
+++ b/src/key.c
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <stdlib.h>
 #include <Elementary.h>
index 8ac737448632c5df0a75988bb4bfaf12a52dbbe4..6eef4b3b4bec151511eb4e12ea9a5a1249eec788 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <Elementary.h>
 #include <Ecore_X.h>
@@ -27,6 +31,7 @@
 #include "layout.h"
 #include "mapbuf.h"
 #include "page.h"
+#include "page_scroller.h"
 #include "item.h"
 #include "util.h"
 #include "all_apps/layout.h"
@@ -36,6 +41,8 @@
 HAPI Evas_Object *layout_create(Evas_Object *conformant, const char *file, const char *group, int rotate)
 {
        Evas_Object *layout;
+       Evas_Object *bg;
+       Evas *evas;
 
        do {
                int width;
@@ -45,7 +52,7 @@ HAPI Evas_Object *layout_create(Evas_Object *conformant, const char *file, const
                retv_if(NULL == layout, NULL);
 
                width = menu_screen_get_root_width();
-               height = menu_screen_get_root_height() - INDEX_HEIGHT;
+               height = menu_screen_get_root_height();
 
                evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
                evas_object_size_hint_min_set(layout, width, height);
@@ -53,6 +60,14 @@ HAPI Evas_Object *layout_create(Evas_Object *conformant, const char *file, const
                evas_object_resize(layout, width, height);
                evas_object_show(layout);
 
+               evas = evas_object_evas_get(layout);
+               bg = evas_object_rectangle_add(evas);
+               evas_object_size_hint_min_set(bg, width, height);
+               evas_object_size_hint_max_set(bg, width, height);
+               evas_object_resize(bg, width, height);
+               elm_object_part_content_set(layout, "bg", bg);
+               evas_object_show(bg);
+
                evas_object_data_set(layout, "win", menu_screen_get_win());
                evas_object_data_set(layout, "rotate", (void *) rotate);
                evas_object_data_set(layout, "width", (void *) width);
@@ -148,4 +163,150 @@ HAPI void layout_unload_edj(Evas_Object *layout)
 
 
 
+HAPI void layout_create_package(Evas_Object *layout, const char *package)
+{
+       app_info_t ai = {0,};
+       Evas_Object *all_apps = NULL;
+       Evas_Object *scroller = NULL;
+       Evas_Object *item = NULL;
+
+       if (MENU_SCREEN_ERROR_FAIL == list_get_values(package, &ai)) {
+               list_free_values(&ai);
+               return;
+       }
+
+       if (ai.nodisplay) {
+               _D("This app(%s) is nodisplay", ai.package);
+               list_free_values(&ai);
+               return;
+       }
+
+
+       all_apps = evas_object_data_get(layout, "all_apps");
+       goto_if(!all_apps, EXIT);
+
+       scroller = evas_object_data_get(all_apps, "scroller");
+       goto_if(!scroller, EXIT);
+
+       /* Update the package */
+       item = page_scroller_find_item_by_package(scroller, ai.package, NULL);
+       if (item) {
+               _D("Package %s is found, update it!", package);
+               item_update(item, &ai);
+               goto EXIT;
+       }
+
+       /* Create the package */
+       _D("package %s is installed directly", package);
+       item = page_scroller_push_item_by_order(scroller, &ai);
+       if (!item) _E("item is NULL");
+
+EXIT:
+       list_free_values(&ai);
+       return;
+}
+
+
+
+HAPI void layout_update_package(Evas_Object *layout, const char *package)
+{
+    layout_create_package(layout, package);
+}
+
+
+
+static Evas_Object *_animated_unpack_item(Evas_Object *scroller, Evas_Object *page, unsigned int pos)
+{
+       Evas_Object *out = NULL;
+       Evas_Object *item;
+       Evas_Object *next_page;
+
+       char buf[32];
+       unsigned int page_max_app;
+       unsigned int page_no;
+       page_scroller_sort_type_e sort_type;
+
+       out = page_unpack_item_at(page, pos);
+       retv_if(NULL == out, NULL);
+
+       page_no = page_scroller_get_page_no(scroller, page);
+       page_max_app = (unsigned int) evas_object_data_get(scroller, "page_max_app");
+       sort_type = (page_scroller_sort_type_e) evas_object_data_get(scroller, "sort_type");
+
+       pos ++;
+       while (page && page_no < MAX_PAGE_NO) {
+               if (0 == page_count_item(page)) {
+                       page_destroy(scroller, page);
+                       break;
+               }
+
+               for (; pos < page_max_app; pos ++) {
+                       item = page_unpack_item_at(page, pos);
+                       if (NULL == item) continue;
+
+                       page_pack_item(page, pos - 1, item);
+                       snprintf(buf, 32, "menu%d", pos - 1);
+                       edje_object_signal_emit(_EDJ(page), STR_MOVE_NEXT, buf);
+                       edje_object_signal_emit(_EDJ(page), STR_ANI_RETURN, buf);
+               }
+
+               if (sort_type == PAGE_SCROLLER_SORT_MAX) {
+                       return NULL;
+               }
+
+               page_no ++;
+               next_page = page_scroller_get_page_at(scroller, page_no);
+               if (next_page) {
+                       item = page_unpack_item_at(next_page, 0);
+                       if (NULL == item) continue;
+
+                       page_pack_item(page, page_max_app - 1, item);
+               } else break;
+
+               pos = 1;
+               page = next_page;
+       }
+
+       return out;
+}
+
+
+
+HAPI void layout_delete_package(Evas_Object *layout, const char *package)
+{
+       Evas_Object *all_apps = NULL;
+       Evas_Object *scroller = NULL;
+       Evas_Object *page = NULL;
+       Evas_Object *item = NULL;
+       int page_no = 0;
+       register unsigned int i;
+       unsigned int page_max_app;
+
+       all_apps = evas_object_data_get(layout, "all_apps");
+       ret_if(!all_apps);
+
+       scroller = evas_object_data_get(all_apps, "scroller");
+       ret_if(!scroller);
+
+       item = page_scroller_find_item_by_package(scroller, package, &page_no);
+       if (!item) return;
+
+       page = page_scroller_get_page_at(scroller, page_no);
+       ret_if(!page);
+
+       page_max_app = (unsigned int) evas_object_data_get(scroller, "page_max_app");
+       for (i = 0; i < page_max_app; i++) {
+               if (item == page_get_item_at(page, i)) {
+                       break;
+               }
+       }
+       if (i == page_max_app) return;
+
+       item = _animated_unpack_item(scroller, page, i);
+       ret_if(!item);
+       item_destroy(item);
+}
+
+
+
 // End of file
index 94fe8df55c0fe8cb9d1943ba47234671519daff8..35328879a6fed544c963983f5b68da3c883b9903 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <stdbool.h>
 #include <stdlib.h>
@@ -95,10 +99,11 @@ HAPI menu_screen_error_e list_get_item(app_list *list, app_list_item **item)
 
 
 
-
+/* FIXME : package -> appid */
 HAPI menu_screen_error_e list_get_values(const char *package, app_info_t *ai)
 {
        ail_appinfo_h appinfo_h;
+       char *pkgid;
        char *exec;
        char *name;
        char *icon;
@@ -111,6 +116,8 @@ HAPI menu_screen_error_e list_get_values(const char *package, app_info_t *ai)
        ret = ail_get_appinfo(ai->package, &appinfo_h);
        if (AIL_ERROR_OK == ret) {
                do {
+                       /* FIXME : Please check this */
+                       break_if(ail_appinfo_get_str(appinfo_h, AIL_PROP_X_SLP_PKGID_STR, &pkgid) < 0);
                        break_if(ail_appinfo_get_str(appinfo_h, AIL_PROP_EXEC_STR, &exec) < 0);
                        break_if(ail_appinfo_get_str(appinfo_h, AIL_PROP_NAME_STR, &name) < 0);
                        break_if(ail_appinfo_get_str(appinfo_h, AIL_PROP_ICON_STR, &icon) < 0);
@@ -119,6 +126,7 @@ HAPI menu_screen_error_e list_get_values(const char *package, app_info_t *ai)
                        break_if(ail_appinfo_get_bool(appinfo_h, AIL_PROP_X_SLP_REMOVABLE_BOOL, &ai->x_slp_removable) < 0);
                        break_if(ail_appinfo_get_bool(appinfo_h, AIL_PROP_X_SLP_TASKMANAGE_BOOL, &ai->x_slp_taskmanage) < 0);
 
+                       break_if(NULL == pkgid || NULL == (ai->pkgid = strdup(pkgid)));
                        break_if(NULL == exec || NULL == (ai->exec = strdup(exec)));
                        break_if(NULL == name || NULL == (ai->name = strdup(name)));
                        break_if(NULL == icon || NULL == (ai->icon = strdup(icon)));
@@ -135,6 +143,8 @@ HAPI menu_screen_error_e list_get_values(const char *package, app_info_t *ai)
                return MENU_SCREEN_ERROR_OK;
        }
 
+       if (appinfo_h) ail_destroy_appinfo(appinfo_h);
+
        return MENU_SCREEN_ERROR_FAIL;
 }
 
@@ -145,6 +155,11 @@ HAPI void list_free_values(app_info_t *ai)
        ret_if(NULL == ai);
 
        /* Origin field */
+       if (ai->pkgid) {
+               free(ai->pkgid);
+               ai->pkgid = NULL;
+       }
+
        if (ai->package) {
                free(ai->package);
                ai->package = NULL;
@@ -206,4 +221,18 @@ HAPI menu_screen_error_e list_sort(app_list *list, int (*_sort_cb)(const void *d
 
 
 
+HAPI app_list_item *list_nth(app_list *parent, unsigned int nth)
+{
+       Eina_List *list;
+
+       retv_if(NULL == parent, NULL);
+
+       list = parent->list;
+       retv_if(NULL == list, NULL);
+
+       return eina_list_nth(list, nth);
+}
+
+
+
 // End of a file
index af319328c25c9bb2b6dd14d46d214f45a5d1d5ad..a9fb5bb3fca07dd4d387326ab979e92493a090b0 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <Elementary.h>
 
old mode 100644 (file)
new mode 100755 (executable)
index 5ad84b9..42c3998
@@ -1,23 +1,28 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <ail.h>
 #include <app.h>
+#include <appcore-efl.h>
 #include <aul.h>
 #include <Ecore_X.h>
 #include <Elementary.h>
@@ -34,6 +39,7 @@
 #include "mouse.h"
 #include "page.h"
 #include "page_scroller.h"
+#include "pkgmgr.h"
 #include "util.h"
 
 #define MENU_SCREEN_ENGINE "file/private/org.tizen.menu-screen/engine"
@@ -50,6 +56,7 @@ static struct {
        int root_width;
        int root_height;
        int is_tts;
+       int booting_state;
        Evas *evas;
        Ecore_Evas *ee;
        Evas_Object *win;
@@ -58,6 +65,7 @@ static struct {
 } menu_screen_info = {
        .state = APP_STATE_PAUSE,
        .is_tts = false,
+       .booting_state = 0,
        .evas = NULL,
        .ee = NULL,
        .win = NULL,
@@ -129,6 +137,52 @@ HAPI int menu_screen_is_tts(void)
 }
 
 
+static Eina_Bool _appcore_flush_cb(void *data)
+{
+       if (APP_STATE_PAUSE != menu_screen_info.state) return ECORE_CALLBACK_CANCEL;
+       if (0 != appcore_flush_memory()) _E("Cannot flush memory");
+       return ECORE_CALLBACK_CANCEL;
+}
+
+
+
+HAPI void menu_screen_inc_booting_state(void)
+{
+       menu_screen_info.booting_state++;
+       if (BOOTING_STATE_DONE > menu_screen_info.booting_state) return;
+
+       menu_screen_error_e ret = MENU_SCREEN_ERROR_OK;
+       do {
+               ret = pkgmgr_reserve_list_pop_request();
+       } while (MENU_SCREEN_ERROR_OK == ret);
+
+       /*  Cache memory is cleared when the application paused (every time, after 5 seconds (in appcore)),
+       *  but after running in a minimized mode (HIDE_LAUNCH) application have status AS_RUNNING.
+       *  Application have status AS_PAUSED only after change of visibility to hidden condition by user (on hiding window)
+       *  Cleaning must be performed only once after application loading in hidden condition
+       *  (and stay in a hidden condition at time of cleaning).
+       */
+       if (APP_STATE_PAUSE == menu_screen_info.state)
+               ecore_timer_add(5, _appcore_flush_cb, NULL);
+}
+
+
+
+HAPI void menu_screen_dec_booting_state(void)
+{
+       menu_screen_info.booting_state --;
+}
+
+
+
+HAPI int menu_screen_get_booting_state(void)
+{
+       return menu_screen_info.booting_state;
+}
+
+
+
+
 
 static menu_screen_error_e _create_canvas(char *name, char *title)
 {
@@ -320,6 +374,8 @@ static Evas_Object *_create_conformant(Evas_Object *win)
 
        elm_object_style_set(conformant, "nokeypad");
        evas_object_size_hint_weight_set(conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_signal_emit(conformant, "elm,state,indicator,overlap", "elm");
+       elm_win_indicator_mode_set(menu_screen_info.win, ELM_WIN_INDICATOR_SHOW);
        evas_object_data_set(conformant, "win", win);
        evas_object_show(conformant);
 
@@ -338,6 +394,50 @@ static void _destroy_conformant(Evas_Object *conformant)
 }
 
 
+static char *_replace_str(char *str, const char *before, const char *after)
+{
+       retv_if(NULL == str, NULL);
+       retv_if(NULL == before, NULL);
+       retv_if(NULL == after, NULL);
+
+       size_t before_len = strlen(before);
+       retv_if(before_len < 1, str);
+
+       size_t after_len = strlen(after);
+       size_t i, count = 0;
+       if (after_len != before_len) {
+               for (i = 0; str[i] != '\0';) {
+                       if (0 == memcmp(&str[i], before, before_len)) {
+                               count++;
+                               i += before_len;
+                       } else {
+                               i++;
+                       }
+               }
+       } else {
+               i = strlen(str);
+       }
+
+       char *result;
+       result = malloc(i + 1 + count * (after_len - before_len));
+       retv_if(result == NULL, NULL);
+
+       char *sr;
+       sr = result;
+       while (*str) {
+               if (0 == memcmp(str, before, before_len)) {
+                       memcpy(sr, after, after_len);
+                       sr += after_len;
+                       str += before_len;
+               } else {
+                       *sr++ = *str++;
+               }
+       }
+       *sr = '\0';
+
+       return result;
+}
+
 
 static void _tts_cb(keynode_t *node, void *data)
 {
@@ -360,7 +460,6 @@ static bool _create_cb(void *data)
        _get_window_size();
        _init_theme();
        retv_if(MENU_SCREEN_ERROR_FAIL == _create_canvas(PACKAGE, PACKAGE), false);
-       elm_win_indicator_mode_set(menu_screen_info.win, ELM_WIN_INDICATOR_SHOW);
 
        if (vconf_notify_key_changed(VCONFKEY_BGSET, _change_bg_cb, NULL) < 0) {
                _E("Failed to register a vconf cb for %s\n", VCONFKEY_BGSET);
@@ -381,7 +480,7 @@ static bool _create_cb(void *data)
        }
        evas_object_data_set(menu_screen_info.win, "layout", layout);
 
-if (vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, _tts_cb, NULL) < 0) {
+       if (vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, _tts_cb, NULL) < 0) {
                _E("Failed to register the tts callback");
        }
        retv_if(vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &menu_screen_info.is_tts) < 0, MENU_SCREEN_ERROR_FAIL);
@@ -391,6 +490,9 @@ if (vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, _tts_cb, NULL)
        aul_listen_app_dead_signal(_dead_cb, NULL);
        key_register();
 
+       // FIXME : This will be enabled after rebuilding the routine for appid <-> pkgid.
+       pkgmgr_init();
+
        return true;
 }
 
@@ -401,6 +503,9 @@ static void _terminate_cb(void *data)
        Evas_Object *conformant;
        Evas_Object *layout;
 
+       // FIXME : This will be enabled after rebuilding the routine for appid <-> pkgid.
+       pkgmgr_fini();
+
        if (vconf_ignore_key_changed(VCONFKEY_BGSET, _change_bg_cb) < 0) {
                _E("Failed to remove bgset [%s]\n", VCONFKEY_BGSET);
        }
@@ -432,10 +537,6 @@ static void _pause_cb(void *data)
 {
        _D("Pause start");
 
-       if (vconf_set_int(VCONFKEY_IDLE_SCREEN_TOP, VCONFKEY_IDLE_SCREEN_TOP_FALSE) < 0) {
-               _E("Failed to set %s to 0", VCONFKEY_IDLE_SCREEN_TOP);
-       }
-
        menu_screen_info.state = APP_STATE_PAUSE;
 }
 
@@ -445,10 +546,6 @@ static void _resume_cb(void *data)
 {
        _D("START RESUME");
 
-       if (vconf_set_int(VCONFKEY_IDLE_SCREEN_TOP, VCONFKEY_IDLE_SCREEN_TOP_TRUE) < 0) {
-               _E("Failed to set %s to 1", VCONFKEY_IDLE_SCREEN_TOP);
-       }
-
        do { // Focus
                Evas_Object *layout = evas_object_data_get(menu_screen_info.win, "layout");
                break_if(NULL == layout);
@@ -467,14 +564,10 @@ static void _resume_cb(void *data)
 
 
 
-static void _service_cb(service_h service, void *data)
+static void _app_control_cb(app_control_h service, void *data)
 {
        _D("START RESET : %d", menu_screen_info.state);
 
-       if (vconf_set_int(VCONFKEY_IDLE_SCREEN_TOP, VCONFKEY_IDLE_SCREEN_TOP_TRUE) < 0) {
-               _E("Failed to set %s to 1", VCONFKEY_IDLE_SCREEN_TOP);
-       }
-
        do { // Focus
                Evas_Object *layout = evas_object_data_get(menu_screen_info.win, "layout");
                break_if(NULL == layout);
@@ -532,7 +625,10 @@ static void _language_changed_cb(void *data)
                        item = page_get_item_at(page, j);
                        if (!item) continue;
 
-                       if (ail_get_appinfo(item_get_package(item), &ai) < 0) continue;
+                       if (ail_get_appinfo(item_get_package(item), &ai) < 0) {
+                               ail_destroy_appinfo(ai);
+                               continue;
+                       }
                        if (ail_appinfo_get_str(ai, AIL_PROP_NAME_STR, &name) < 0) {
                                ail_destroy_appinfo(ai);
                                continue;
@@ -560,7 +656,7 @@ static void _init(app_event_callback_s *event_callback)
        event_callback->terminate = _terminate_cb;
        event_callback->pause = _pause_cb;
        event_callback->resume = _resume_cb;
-       event_callback->service = _service_cb;
+       event_callback->app_control = _app_control_cb;
        event_callback->low_memory = NULL;
        event_callback->low_battery = NULL;
        event_callback->device_orientation = NULL;
@@ -576,18 +672,27 @@ static void _fini(void)
 
 
 
-#define QP_EMUL_STR            "Emulator"
 static bool _is_emulator_on(void)
 {
-       char *info;
+       int ret;
+       char *model;
 
-       if (system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &info) == 0) {
-               if (info == NULL) return false;
-               if (!strncmp(QP_EMUL_STR, info, strlen(info))) {
-                       return true;
+       ret = system_info_get_platform_string("tizen.org/system/model_name", &model);
+       if (SYSTEM_INFO_ERROR_NONE != ret) {
+               if (model) {
+                       free(model);
                }
+               return false;
+       }
+
+       if (!strncmp(model, "Emulator", strlen(model))) {
+               _D("This model is on Emulator");
+               free(model);
+               return true;
        }
 
+       _D("This model is NOT on Emulator");
+       free(model);
        return false;
 }
 
index e27d284d06e71201714f062498ef3f8471a690f7..1dec1dbf5d0c223261e54643144032194c8dcd45 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <stdio.h>
 #include <stdlib.h>
index dffa633f3a2cbae5a858db2dd35a828cf347b4c2..e51349bc9ae2eb00cf2c573fc596697973de9c17 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <Elementary.h>
 
@@ -147,8 +151,6 @@ HAPI Evas_Object *page_create(Evas_Object *scroller, int idx, int rotate)
        Evas_Object *box;
 
        char *page_edje;
-       bool enable_bg_image;
-
        unsigned int count;
        int page_height;
        int page_width;
@@ -156,7 +158,6 @@ HAPI Evas_Object *page_create(Evas_Object *scroller, int idx, int rotate)
        _D("Create a new page[%d]", idx);
 
        page_edje = evas_object_data_get(scroller, "page_edje");
-       enable_bg_image = (bool) evas_object_data_get(scroller, "enable_bg_image");
 
        page = layout_load_edj(scroller, page_edje, PAGE_GROUP_NAME);
        retv_if(!page, NULL);
index aefcc493b3dbd52f43ca31c1294b4d400e9528ca..178fd8ec9fdb0609e1e2ceaf1495e6a8280d662a 100644 (file)
@@ -1,22 +1,27 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <Elementary.h>
+#include <stdio.h>
 #include <vconf.h>
 
 #include "item_badge.h"
@@ -169,6 +174,56 @@ static void _scroll_cb(void *data, Evas_Object *scroller, void *event_info)
 
 
 
+static menu_screen_error_e _find_position_all_page(Evas_Object *scroller, int *candidate_page, int *candidate_pos, void *data)
+{
+       Evas_Object *page;
+       Evas_Object *item;
+       register unsigned int page_no;
+       register unsigned int position_no;
+       int nr_of_pages;
+       int page_max_app;
+
+       retv_if(NULL == scroller, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+       retv_if(NULL == candidate_page, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+       retv_if(NULL == candidate_pos, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+
+       *candidate_page = -1;
+       *candidate_pos = -1;
+       nr_of_pages = page_scroller_count_page(scroller);
+       page_max_app = (int) evas_object_data_get(scroller, "page_max_app");
+
+       page = page_scroller_get_page_at(scroller, nr_of_pages-1);
+       page_no = nr_of_pages-1;
+       for (position_no = 0; position_no < page_max_app; position_no ++) {
+               item = page_get_item_at(page, position_no);
+               if (!item) {
+                       *candidate_page = page_no;
+                       *candidate_pos = position_no;
+                       return MENU_SCREEN_ERROR_OK;
+               }
+       }
+
+       for (page_no = 0; page_no < nr_of_pages -1; page_no ++) {
+               page = page_scroller_get_page_at(scroller, page_no);
+               if(!page) {
+                       return MENU_SCREEN_ERROR_FAIL;
+               }
+
+               for (position_no = 0; position_no < page_max_app; position_no ++) {
+                       item = page_get_item_at(page, position_no);
+                       if (!item) {
+                               *candidate_page = page_no;
+                               *candidate_pos = position_no;
+                               return MENU_SCREEN_ERROR_OK;
+                       }
+               }
+       }
+
+       return MENU_SCREEN_ERROR_OK;
+}
+
+
+
 static menu_screen_error_e _find_position_by_default(Evas_Object *scroller, int *candidate_page, int *candidate_pos, void *data)
 {
        Evas_Object *page;
@@ -361,63 +416,6 @@ static menu_screen_error_e _animated_pack_item(Evas_Object *item, Evas_Object *s
 
 
 
-static Evas_Object *_animated_unpack_item(Evas_Object *scroller, Evas_Object *page, unsigned int pos)
-{
-       Evas_Object *out = NULL;
-       Evas_Object *item;
-       Evas_Object *next_page;
-
-       char buf[32];
-       unsigned int page_max_app;
-       unsigned int page_no;
-       page_scroller_sort_type_e sort_type;
-
-       out = page_unpack_item_at(page, pos);
-       retv_if(NULL == out, NULL);
-
-       page_no = page_scroller_get_page_no(scroller, page);
-       page_max_app = (unsigned int) evas_object_data_get(scroller, "page_max_app");
-       sort_type = (page_scroller_sort_type_e) evas_object_data_get(scroller, "sort_type");
-
-       pos ++;
-       while (page && page_no < MAX_PAGE_NO) {
-               if (0 == page_count_item(page)) {
-                       page_destroy(scroller, page);
-                       break;
-               }
-
-               for (; pos < page_max_app; pos ++) {
-                       item = page_unpack_item_at(page, pos);
-                       if (NULL == item) continue;
-
-                       page_pack_item(page, pos - 1, item);
-                       snprintf(buf, 32, "menu%d", pos - 1);
-                       edje_object_signal_emit(_EDJ(page), STR_MOVE_NEXT, buf);
-                       edje_object_signal_emit(_EDJ(page), STR_ANI_RETURN, buf);
-               }
-
-               if (sort_type == PAGE_SCROLLER_SORT_MAX) {
-                       return NULL;
-               }
-
-               page_no ++;
-               next_page = page_scroller_get_page_at(scroller, page_no);
-               if (next_page) {
-                       item = page_unpack_item_at(next_page, 0);
-                       if (NULL == item) continue;
-
-                       page_pack_item(page, page_max_app - 1, item);
-               } else break;
-
-               pos = 1;
-               page = next_page;
-       }
-
-       return out;
-}
-
-
-
 HAPI Evas_Object *page_scroller_push_item(Evas_Object *scroller, app_info_t *ai)
 {
        Evas_Object *page;
@@ -484,240 +482,21 @@ HAPI Evas_Object *page_scroller_push_item(Evas_Object *scroller, app_info_t *ai)
 
 
 
-static inline menu_screen_error_e _create_cb(const char *package, void *data)
+HAPI Evas_Object *page_scroller_push_item_by_order(Evas_Object *scroller, app_info_t *ai)
 {
-       app_info_t ai = {0,};
-       Evas_Object *item;
-       Evas_Object *scroller = data;
-
-       if (MENU_SCREEN_ERROR_FAIL == list_get_values(package, &ai)) {
-               list_free_values(&ai);
-               return MENU_SCREEN_ERROR_FAIL;
-       }
-
-       do {
-               if (!scroller) {
-                       _D("Scroller is NULL.");
-                       break;
-               }
-
-               if (ai.nodisplay || !ai.enabled)
-               {
-                       Evas_Object *page;
-
-                       _D("package %s is not visible", package);
-                       item = pkgmgr_find_pended_object(ai.package, 1, scroller, &page);
-                       if (item) {
-                               if (page) {
-                                       page_unpack_item(page, item);
-                                       page_scroller_trim_items(scroller);
-                               }
-
-                               item_destroy(item);
-                       }
-
-                       break;
-               }
-
-               item = pkgmgr_find_pended_object(ai.package, 1, scroller, NULL);
-               if (!item) {
-                       item = page_scroller_find_item_by_package(scroller, ai.package, NULL);
-                       if (!item) {
-                               Evas_Object *item;
-                               _D("package %s is installed directly", package);
-                               item = page_scroller_push_item(scroller, &ai);
-                               if (item) {
-                                       break;
-                               } else {
-                                       list_free_values(&ai);
-                                       retv_if(1, MENU_SCREEN_ERROR_FAIL);
-                               }
-                       }
-               }
-
-               _D("Package %s is found, update it!", package);
-               item_update(item, &ai);
-       } while(0);
-
-       list_free_values(&ai);
-       return MENU_SCREEN_ERROR_OK;
-}
-
-
-
-static inline menu_screen_error_e _update_cb(const char *package, void *data)
-{
-       Evas_Object *scroller = data;
-       Evas_Object *item;
-       int page_no = 0;
-       app_info_t ai = {0,};
-
-       if (MENU_SCREEN_ERROR_FAIL == list_get_values(package, &ai)) {
-               list_free_values(&ai);
-               return MENU_SCREEN_ERROR_FAIL;
-       }
-
-       do {
-               if (!scroller) {
-                       _D("Scroller is NULL.");
-                       break;
-               }
-
-               item = page_scroller_find_item_by_package(scroller, package, &page_no);
-               if (!item) {
-                       Evas_Object *page;
-                       _D("There is no loaded item is found");
-                       item = pkgmgr_find_pended_object(package, 1, scroller, &page);
-                       if (item) {
-                               if (!ai.nodisplay && ai.enabled) {
-                                       _D("Item is found for updating from the install list, Ignore this.");
-                                       item_update(item, &ai);
-                               } else {
-                                       _D("Item is found for updating from the install list, But nodisplay");
-                                       if (page) {
-                                               page_unpack_item(page, item);
-                                               page_scroller_trim_items(scroller);
-                                       }
-                                       item_destroy(item);
-                               }
-                       } else {
-                               Evas_Object *item;
-                               _D("Item is not found. Create a new one");
-                               item = ((!ai.nodisplay && ai.enabled) ? page_scroller_push_item(scroller, &ai) : NULL);
-                               if (item) {
-                                       break;
-                               } else {
-                                       list_free_values(&ai);
-                                       retv_if(1, MENU_SCREEN_ERROR_FAIL);
-                               }
-                       }
-               } else {
-                       Evas_Object *page;
-                       Evas_Object *pended_item;
-
-                       pended_item = pkgmgr_find_pended_object(package, 1, scroller, &page);
-                       if (!pended_item ) {
-                               _D("Cannot find package in the install list");
-                       }
-
-                       if (!ai.nodisplay && ai.enabled) {
-                               item_update(item, &ai);
-                               break;
-                       }
-
-                       page = page_scroller_get_page_at(scroller, page_no);
-                       if (page) {
-                               page_unpack_item(page, item);
-                               page_scroller_trim_items(scroller);
-                       }
-                       item_destroy(item);
-               }
-       } while (0);
-
-       list_free_values(&ai);
-       return MENU_SCREEN_ERROR_OK;
-}
-
-
-
-static inline menu_screen_error_e _delete_cb(const char *package, void *data)
-{
-       Evas_Object *item;
-       Evas_Object *page;
-       Evas_Object *scroller = data;
-       Evas_Object *tmp;
-       int page_no = 0;
-       register unsigned int i;
-       unsigned int page_max_app;
-
-       do {
-               if (!scroller) {
-                       _D("Scroller is NULL.");
-                       break;
-               }
-
-               tmp = pkgmgr_find_pended_object(package, 1, scroller, NULL);
-
-               item = page_scroller_find_item_by_package(scroller, package, &page_no);
-               retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL);
-
-               if (tmp != item) {
-                       _D("Pended item is %p, Found item is %p", tmp, item);
-               }
-
-               page = page_scroller_get_page_at(scroller, page_no);
-               retv_if(NULL == page, MENU_SCREEN_ERROR_FAIL);
-
-               page_max_app = (unsigned int) evas_object_data_get(scroller, "page_max_app");
-               for (i = 0; i < page_max_app; i++) {
-                       if (item == page_get_item_at(page, i)) {
-                               break;
-                       }
-               }
-
-               item = _animated_unpack_item(scroller, page, i);
-               retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL);
-               item_destroy(item);
-       } while (0);
-
-       return MENU_SCREEN_ERROR_OK;
-}
-
-
-
-static struct pkg_event_handler {
-       const char *event_name;
-       int (*event_handler)(const char *package, void *data);
-} event_table[] = {
-       {
-               .event_name = "create",
-               .event_handler = _create_cb,
-       },
-       {
-               .event_name = "update",
-               .event_handler = _update_cb,
-       },
-       {
-               .event_name = "delete",
-               .event_handler = _delete_cb,
-       },
-       {
-               .event_name = NULL,
-               .event_handler = NULL,
-       },
-};
-
-
-
-static void _desktop_cb(keynode_t *node, void *data)
-{
-       char *event;
-       char type[10];
-       char package[BUFSZE];
-       register int i;
-
-       event = vconf_get_str(vconf_keynode_get_name(node));
-       ret_if(NULL == event);
-
-       if (sscanf(event, "%10[^:]:%1023s", type, package) != 2) {
-               _D("Failed to parse the event format : [%s], [%s]", type, package);
-       }
-
-       _D("command[%s], package[%s]", type, package);
-
-       for (i = 0; event_table[i].event_name; i ++) {
-               if (!strcasecmp(type, event_table[i].event_name)) {
-                       if (event_table[i].event_handler(package, data) == MENU_SCREEN_ERROR_FAIL) {
-                               _E("Failed to handles the desktop notification event");
-                       }
+       int candidate_page = -1;
+       int candidate_pos = -1;
+       Evas_Object *item = NULL;
 
-                       free(event);
-                       return;
+       if (MAX_PAGE_NO == page_scroller_count_page(scroller)) {
+               _find_position_all_page(scroller, &candidate_page, &candidate_pos, &ai);
+               if (-1 != candidate_page || -1 != candidate_pos) {
+                       item = page_scroller_push_item(scroller, ai);
                }
        }
+       else item = page_scroller_push_item(scroller, ai);
 
-       _E("Failed to find a proper event handler");
-       free(event);
+       return item;
 }
 
 
@@ -786,6 +565,97 @@ static void _mouse_wheel_cb(void *data, Evas *e, Evas_Object *obj, void *event_i
 
 
 
+static inline char *_ltrim(char *str)
+{
+       retv_if(NULL == str, NULL);
+       while (*str && (*str == ' ' || *str == '\t' || *str == '\n')) str ++;
+       return str;
+}
+
+
+
+static inline int _rtrim(char *str)
+{
+       int len;
+
+       retv_if(NULL == str, 0);
+
+       len = strlen(str);
+       while (--len >= 0 && (str[len] == ' ' || str[len] == '\n' || str[len] == '\t')) {
+               str[len] = '\0';
+       }
+
+       return len;
+}
+
+
+
+static int _create_main_operation_list(Evas_Object *scroller)
+{
+       FILE *fp;
+       const char *filename = RESDIR"/data/main_operation.launch";
+       char *line = NULL;
+       size_t size = 0;
+       ssize_t read;
+       char *data = NULL;
+       Eina_List *main_operation_list = NULL;
+
+       fp = fopen(filename, "r");
+       if (!fp) {
+               _D("cannot open fp");
+               return 0;
+       }
+
+       while ((read = getline(&line, &size, fp)) != -1) {
+               char *begin;
+
+               if (size <= 0) {
+                       free(line);
+                       line = NULL;
+                       break;
+               }
+
+               begin = _ltrim(line);
+               _rtrim(line);
+
+               if (*begin == '#' || *begin == '\0') {
+                       free(line);
+                       line = NULL;
+                       continue;
+               }
+
+               data = strdup(begin);
+               main_operation_list = eina_list_append(main_operation_list, data);
+
+               if (line) {
+                       free(line);
+                       line = NULL;
+               }
+       }
+
+       fclose(fp);
+       evas_object_data_set(scroller, DATA_KEY_MAIN_OPERATION_LIST, main_operation_list);
+
+       return 1;
+}
+
+
+
+static void _destroy_main_operation_list(Evas_Object *scroller)
+{
+       char *data = NULL;
+       Eina_List *main_operation_list = NULL;
+
+       main_operation_list = evas_object_data_del(scroller, DATA_KEY_MAIN_OPERATION_LIST);
+       ret_if(!main_operation_list);
+
+       EINA_LIST_FREE(main_operation_list, data) {
+               free(data);
+       }
+}
+
+
+
 HAPI Evas_Object *page_scroller_create(Evas_Object *tab, Evas_Object *index, page_scroller_sort_type_e sort_type, int rotate)
 {
        Evas_Object *box;
@@ -852,17 +722,14 @@ HAPI Evas_Object *page_scroller_create(Evas_Object *tab, Evas_Object *index, pag
        evas_object_show(box);
        evas_object_show(scroller);
 
-       if (vconf_notify_key_changed(VCONFKEY_AIL_INFO_STATE, _desktop_cb, scroller) < 0) {
-               _E("Failed to register a desktop change event handler");
-       }
-
        if (vconf_notify_key_changed("memory/menuscreen/mapbuf", _mapbuf_cb, scroller) < 0) {
                _E("Failed to register a vconf cb for %s", "memory/menuscreen/mapbuf");
        }
 
-       // FIXME : This will be enabled after rebuilding the routine for appid <-> pkgid.
-       //pkgmgr_init(scroller);
        item_badge_register_changed_cb(scroller);
+       if (!_create_main_operation_list(scroller)) {
+               _E("Cannot create the main operation list");
+       }
 
        return scroller;
 }
@@ -883,11 +750,9 @@ HAPI void page_scroller_destroy(Evas_Object *scroller)
        ret_if(NULL == (box = evas_object_data_get(scroller, "box")));
        ret_if(NULL == (page_list = elm_box_children_get(box)));
 
+       _destroy_main_operation_list(scroller);
        item_badge_unregister_changed_cb();
 
-       // FIXME : This will be enabled after rebuilding the routine for appid <-> pkgid.
-       //pkgmgr_fini();
-
        EINA_LIST_FOREACH_SAFE(page_list, l, ln, page) {
                int count;
 
@@ -942,10 +807,6 @@ HAPI void page_scroller_destroy(Evas_Object *scroller)
 
        evas_object_del(scroller);
 
-       if (vconf_ignore_key_changed(VCONFKEY_AIL_INFO_STATE, _desktop_cb) < 0) {
-               _E("Failed to ignore the desktop event");
-       }
-
        if (vconf_ignore_key_changed("memory/menuscreen/mapbuf", _mapbuf_cb) < 0) {
                _E("Failed to remove vconf %s", "memory/menuscreen/mapbuf");
        }
@@ -992,7 +853,7 @@ HAPI Evas_Object *page_scroller_get_page_at(Evas_Object *scroller, unsigned int
        Evas_Object *item;
        Evas_Object *box;
 
-       retv_if(idx >= MAX_PAGE_NO, NULL);
+       retv_if(idx > MAX_PAGE_NO, NULL);
 
        box = evas_object_data_get(scroller, "box");
        retv_if(NULL == box, NULL);
@@ -1190,7 +1051,7 @@ HAPI void page_scroller_edit(Evas_Object *scroller)
        page_max_app = (int) evas_object_data_get(scroller, "page_max_app");
        for (page_no = 0; page_no < nr_of_pages; page_no ++) {
                page = page_scroller_get_page_at(scroller, page_no);
-               ret_if(NULL == page);
+               if(!page) continue;
 
                for (position_no = 0; position_no < page_max_app; position_no ++) {
                        item = page_get_item_at(page, position_no);
@@ -1225,11 +1086,8 @@ HAPI void page_scroller_unedit(Evas_Object *scroller)
        page_max_app = (int) evas_object_data_get(scroller, "page_max_app");
 
        for (page_no = nr_of_pages - 1; page_no >= 0; page_no --) {
-               int count;
-
                page = page_scroller_get_page_at(scroller, page_no);
-               if (NULL == page) break;
-               count = page_count_item(page);
+               if(NULL == page) continue;
 
                page_scroller_trim_items(scroller);
 
index d7fecc266a2f65a2b3a112a215c90cba0c6de84e..8ffe7ede78a644f202e4455cb9dfc63b8720ed0a 100644 (file)
@@ -1,32 +1,36 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <Elementary.h>
 #include <package-manager.h>
 #include <pkgmgr-info.h>
 
 #include "conf.h"
-#include "index.h"
+#include "menu_screen.h"
 #include "item.h"
+#include "layout.h"
 #include "list.h"
 #include "page.h"
 #include "page_scroller.h"
-#include "mapbuf.h"
 #include "pkgmgr.h"
 #include "util.h"
 
@@ -37,276 +41,330 @@ struct pkgmgr_handler {
        int (*func)(const char *package, const char *val, void *data);
 };
 
+typedef struct {
+       char* package;
+       char* key;
+       char* val;
+} pkgmgr_reserve_s;
+
+typedef struct {
+       char* package;
+       char* status;
+} pkgmgr_request_s;
 
+typedef struct {
+       char* pkg_id;
+       char* app_id;
+       Evas_Object *item;
+} pkgmgr_install_s;
 
 static struct {
        pkgmgr_client *listen_pc;
+       Eina_List *reserve_list;
+       Eina_List *request_list;
+       Eina_List *item_list;
 } pkg_mgr_info = {
        .listen_pc = NULL,
+       .reserve_list = NULL,
+       .request_list = NULL,
+       .item_list = NULL,
 };
 
 
 
-HAPI inline menu_screen_error_e pkgmgr_uninstall(Evas_Object *item)
+static menu_screen_error_e _append_request_in_list(const char *package, const char *status)
 {
-       int ret = MENU_SCREEN_ERROR_OK;
+       retv_if(NULL == package, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+       retv_if(NULL == status, MENU_SCREEN_ERROR_INVALID_PARAMETER);
 
-       retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL);
+       pkgmgr_request_s *rt = calloc(1, sizeof(pkgmgr_request_s));
+       retv_if(NULL == rt, MENU_SCREEN_ERROR_FAIL);
 
-       char *pkgid = NULL;
-       char *appid = item_get_package(item);
-       retv_if(NULL == appid, MENU_SCREEN_ERROR_FAIL);
+       rt->package = strdup(package);
+       goto_if(NULL == rt->package, ERROR);
 
-       pkgmgr_client *req_pc = NULL;
-       req_pc = pkgmgr_client_new(PC_REQUEST);
-       retv_if(NULL == req_pc, MENU_SCREEN_ERROR_FAIL);
+       rt->status = strdup(status);
+       goto_if(NULL == rt->status, ERROR);
 
-       pkgmgrinfo_appinfo_h handle;
-       if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_appinfo(appid, &handle)) {
-               if (PKGMGR_R_OK != pkgmgr_client_free(req_pc)) {
-                       _E("cannot free pkgmgr_client for request.");
-               }
-               return MENU_SCREEN_ERROR_FAIL;
-       }
+       pkg_mgr_info.request_list = eina_list_append(pkg_mgr_info.request_list, rt);
+       goto_if(NULL == pkg_mgr_info.request_list, ERROR);
 
-       if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_pkgid(handle, &pkgid)) {
-               if (PMINFO_R_OK != pkgmgrinfo_appinfo_destroy_appinfo(handle)) {
-                       _E("cannot destroy the appinfo");
-               }
+       return MENU_SCREEN_ERROR_OK;
 
-               if (PKGMGR_R_OK != pkgmgr_client_free(req_pc)) {
-                       _E("cannot free pkgmgr_client for request.");
-               }
+ERROR:
+       if (rt->status) free(rt->status);
+       if (rt->package) free(rt->package);
+       if (rt) free(rt);
 
-               return MENU_SCREEN_ERROR_FAIL;
-       }
+       return MENU_SCREEN_ERROR_FAIL;
+}
 
-       if (!pkgid) pkgid = appid;
 
-       _D("Uninstall a package[%s] from an app[%s]", pkgid, appid);
-       if (pkgmgr_client_uninstall(req_pc, NULL, pkgid, PM_QUIET, NULL, NULL) < 0) {
-               _E("cannot uninstall %s.", item_get_package(item));
-               ret = MENU_SCREEN_ERROR_FAIL;
+
+static menu_screen_error_e _remove_request_in_list(const char *package)
+{
+       retv_if(NULL == package, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+
+       if (NULL == pkg_mgr_info.request_list) return MENU_SCREEN_ERROR_OK;
+
+       const Eina_List *l = NULL;
+       const Eina_List *ln = NULL;
+       pkgmgr_request_s *rt = NULL;
+       EINA_LIST_FOREACH_SAFE(pkg_mgr_info.request_list, l, ln, rt) {
+               if (!rt) continue;
+               if (!rt->package) continue;
+               if (strcmp(rt->package, package)) continue;
+
+               pkg_mgr_info.request_list = eina_list_remove(pkg_mgr_info.request_list, rt);
+               free(rt->package);
+               if (rt->status) free(rt->status);
+               free(rt);
+               return MENU_SCREEN_ERROR_OK;
        }
 
-       if (PMINFO_R_OK != pkgmgrinfo_appinfo_destroy_appinfo(handle)) {
-               _E("cannot destroy the appinfo");
-               ret = MENU_SCREEN_ERROR_FAIL;
+       return MENU_SCREEN_ERROR_FAIL;
+}
+
+
+
+static int _exist_request_in_list(const char *package)
+{
+       retv_if(NULL == package, 0);
+
+       if (NULL == pkg_mgr_info.request_list) return 0;
+
+       const Eina_List *l = NULL;
+       const Eina_List *ln = NULL;
+       pkgmgr_request_s *rt = NULL;
+       EINA_LIST_FOREACH_SAFE(pkg_mgr_info.request_list, l, ln, rt) {
+               if (!rt) continue;
+               if (!rt->package) continue;
+               if (strcmp(rt->package, package)) continue;
+               return 1;
        }
 
-       if (PMINFO_R_OK != pkgmgr_client_free(req_pc)) {
-               _E("cannot free pkgmgr_client");
-               ret = MENU_SCREEN_ERROR_FAIL;
+       return 0;
+}
+
+
+
+static pkgmgr_request_s *_get_request_in_list(const char *package)
+{
+       retv_if(NULL == package, NULL);
+
+       if (NULL == pkg_mgr_info.request_list) return NULL;
+
+       const Eina_List *l = NULL;
+       const Eina_List *ln = NULL;
+       pkgmgr_request_s *rt = NULL;
+       EINA_LIST_FOREACH_SAFE(pkg_mgr_info.request_list, l, ln, rt) {
+               if (!rt) continue;
+               if (!rt->package) continue;
+               if (strcmp(rt->package, package)) continue;
+               return rt;
        }
 
-       return ret;
+       return NULL;
 }
 
 
 
-static menu_screen_error_e _start_download(const char *package, void *scroller)
+HAPI menu_screen_error_e pkgmgr_item_list_append_item(const char *pkg_id, const char *app_id, Evas_Object *item)
 {
-       struct package_info *pi;
-       Eina_List *install_list;
+       retv_if(NULL == pkg_id, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+       retv_if(NULL == app_id, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+       retv_if(NULL == item, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+
+       char *tmp_pkg_id = NULL;
+       char *tmp_app_id = NULL;
 
-       install_list = evas_object_data_get(scroller, "install_list");
-       pi = calloc(1, sizeof(struct package_info));
-       retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
+       pkgmgr_install_s *pi = calloc(1, sizeof(pkgmgr_install_s));
+       goto_if(NULL == pi, ERROR);
 
-       pi->status = DOWNLOAD_BEGIN;
-       pi->ai.package = strdup(package);
-       pi->ai.name = strdup("Download");
+       tmp_pkg_id = strdup(pkg_id);
+       goto_if(NULL == tmp_pkg_id, ERROR);
 
-       install_list = eina_list_append(install_list, pi);
-       evas_object_data_set(scroller, "install_list", install_list);
-       _D("Package [%s] is jump into the downloading phase", package);
+       tmp_app_id = strdup(app_id);
+       goto_if(NULL == tmp_app_id, ERROR);
+
+       pi->pkg_id = tmp_pkg_id;
+       pi->app_id = tmp_app_id;
+       pi->item = item;
+
+       pkg_mgr_info.item_list = eina_list_append(pkg_mgr_info.item_list, pi);
+       goto_if(NULL == pkg_mgr_info.item_list, ERROR);
 
        return MENU_SCREEN_ERROR_OK;
+
+ERROR:
+       if (tmp_app_id) free(tmp_app_id);
+       if (tmp_pkg_id) free(tmp_pkg_id);
+       free(pi);
+
+       return MENU_SCREEN_ERROR_FAIL;
 }
 
 
 
-static menu_screen_error_e _start_uninstall(const char *package, void *scroller)
+HAPI menu_screen_error_e pkgmgr_item_list_remove_item(const char *pkg_id, const char *app_id, Evas_Object *item)
 {
-       Eina_List *l;
-       Eina_List *tmp;
-       int page_no = 0;
-       struct package_info *pi = NULL;
-       Eina_List *install_list;
-
-       install_list = evas_object_data_get(scroller, "install_list");
-       EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
-               if (pi->ai.package && !strcmp(pi->ai.package, package)) {
-                       break;
-               }
-               pi = NULL;
-       }
+       retv_if(NULL == pkg_id, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+       retv_if(NULL == app_id, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+       retv_if(NULL == item, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+
+       const Eina_List *l = NULL;
+       const Eina_List *ln = NULL;
+       pkgmgr_install_s *pi = NULL;
+       EINA_LIST_FOREACH_SAFE(pkg_mgr_info.item_list, l, ln, pi) {
+               continue_if(NULL == pi);
+               continue_if(NULL == pi->pkg_id);
+               continue_if(NULL == pi->app_id);
+               continue_if(NULL == pi->item);
+
+               if (strcmp(pi->pkg_id, pkg_id)) continue;
+               if (strcmp(pi->app_id, app_id)) continue;
+               if (pi->item != item) continue;
+
+               pkg_mgr_info.item_list = eina_list_remove(pkg_mgr_info.item_list, pi);
+
+               free(pi->app_id);
+               free(pi->pkg_id);
+               free(pi);
 
-       retv_if(pi, MENU_SCREEN_ERROR_FAIL);
+               return MENU_SCREEN_ERROR_OK;
+       }
 
-       pi = calloc(1, sizeof(struct package_info));
-       retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
+       return MENU_SCREEN_ERROR_FAIL;
+}
 
-       pi->status = UNINSTALL_BEGIN;
-       pi->ai.package = strdup(package);
-       pi->ai.nodisplay = false;
-       pi->ai.enabled = true;
-       pi->item = page_scroller_find_item_by_package(scroller, package, &page_no);
-       pi->page = page_scroller_get_page_at(scroller, page_no);
 
-       install_list = eina_list_append(install_list, pi);
-       evas_object_data_set(scroller, "install_list", install_list);
 
-       return MENU_SCREEN_ERROR_OK;
+HAPI void pkgmgr_item_list_affect_pkgid(const char *pkg_id, Eina_Bool (*_affected_cb)(const char *, Evas_Object *, void *), void *data)
+{
+       ret_if(NULL == pkg_mgr_info.item_list);
+       ret_if(NULL == pkg_id);
+       ret_if(NULL == _affected_cb);
+
+       const Eina_List *l;
+       const Eina_List *ln;
+       pkgmgr_install_s *pi;
+       EINA_LIST_FOREACH_SAFE(pkg_mgr_info.item_list, l, ln, pi) {
+               continue_if(NULL == pi);
+               continue_if(NULL == pi->app_id);
+               continue_if(NULL == pi->item);
+
+               if (strcmp(pkg_id, pi->pkg_id)) continue;
+               /* It's possible that many items with the same package name are in the install list */
+               continue_if(EINA_TRUE != _affected_cb(pi->app_id, pi->item, data));
+       }
 }
 
 
 
-static menu_screen_error_e _start_update(const char *package, void *scroller)
+HAPI void pkgmgr_item_list_affect_appid(const char *app_id, Eina_Bool (*_affected_cb)(const char *, Evas_Object *, void *), void *data)
 {
-       Eina_List *l;
-       Eina_List *tmp;
-       struct package_info *pi = NULL;
-       Eina_List *install_list;
-
-       install_list = evas_object_data_get(scroller, "install_list");
-       EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
-               if (pi->ai.package && !strcmp(pi->ai.package, package)) {
-                       break;
-               }
-               pi = NULL;
+       ret_if(NULL == pkg_mgr_info.item_list);
+       ret_if(NULL == app_id);
+       ret_if(NULL == _affected_cb);
+
+       const Eina_List *l;
+       const Eina_List *ln;
+       pkgmgr_install_s *pi;
+       EINA_LIST_FOREACH_SAFE(pkg_mgr_info.item_list, l, ln, pi) {
+               continue_if(NULL == pi);
+               continue_if(NULL == pi->app_id);
+               continue_if(NULL == pi->item);
+
+               if (strcmp(app_id, pi->app_id)) continue;
+               /* It's possible that many items with the same package name are in the install list */
+               if (EINA_FALSE == _affected_cb(pi->app_id, pi->item, data)) break;
        }
+}
 
-       if (!pi) {
-               int page_no = 0;
-               _D("Package [%s] is starting update phase directly (without downloading phase)", package);
 
-               pi = calloc(1, sizeof(struct package_info));
-               retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
 
-               pi->ai.package = strdup(package);
-               pi->item = page_scroller_find_item_by_package(scroller, package, &page_no);
-               if (pi->item) {
-                       pi->page = page_scroller_get_page_at(scroller, page_no);
-               }
+HAPI inline menu_screen_error_e pkgmgr_uninstall(Evas_Object *item)
+{
+       char *pkgid = NULL;
+       char *appid = NULL;
+       pkgmgr_client *req_pc = NULL;
+       pkgmgrinfo_appinfo_h handle = NULL;
+       int ret = MENU_SCREEN_ERROR_OK;
 
-               if (pi->item && pi->page) {
-                       pi->ai.nodisplay = false;
-                       pi->ai.enabled = true;
-               }
+       retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL);
 
-               install_list = eina_list_append(install_list, pi);
-               evas_object_data_set(scroller, "install_list", install_list);
-       } else {
-               if (pi->status != DOWNLOAD_END && pi->status != INSTALL_END) {
-                       _D("Package [%s] is in invalid state (%d), cancel this", package, pi->status);
-                       install_list = eina_list_remove(install_list, pi);
-                       evas_object_data_set(scroller, "install_list", install_list);
-                       if (pi->item) {
-                               page_unpack_item(pi->page, pi->item);
-                               page_scroller_trim_items(scroller);
-                               item_destroy(pi->item);
-                       }
-
-                       list_free_values(&pi->ai);
-                       free(pi);
-                       return MENU_SCREEN_ERROR_FAIL;
+       pkgid = item_get_pkgid(item);
+       retv_if(NULL == pkgid, MENU_SCREEN_ERROR_FAIL);
+
+       appid = item_get_package(item);
+       retv_if(NULL == appid, MENU_SCREEN_ERROR_FAIL);
+
+       req_pc = pkgmgr_client_new(PC_REQUEST);
+       retv_if(NULL == req_pc, MENU_SCREEN_ERROR_FAIL);
+
+       if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_appinfo(appid, &handle)) {
+               if (PKGMGR_R_OK != pkgmgr_client_free(req_pc)) {
+                       _E("cannot free pkgmgr_client for request.");
                }
+               return MENU_SCREEN_ERROR_FAIL;
        }
 
-       pi->status = UPDATE_BEGIN;
-       pi->ai.name = strdup("Update");
-       if (pi->item) {
-               item_set_name(pi->item, pi->ai.name, 0);
+       if (PMINFO_R_OK != pkgmgrinfo_appinfo_destroy_appinfo(handle)) {
+               _E("cannot destroy the appinfo");
+               ret = MENU_SCREEN_ERROR_FAIL;
        }
 
-       _D("Package [%s] is jump into the updating phase", package);
+       _D("Uninstall a package[%s] from an app[%s]", pkgid, appid);
+       if (pkgmgr_client_uninstall(req_pc, NULL, pkgid, PM_QUIET, NULL, NULL) < 0) {
+               _E("cannot uninstall %s.", item_get_package(item));
+               ret = MENU_SCREEN_ERROR_FAIL;
+       }
 
-       return MENU_SCREEN_ERROR_OK;
+       if (PMINFO_R_OK != pkgmgr_client_free(req_pc)) {
+               _E("cannot free pkgmgr_client");
+               ret = MENU_SCREEN_ERROR_FAIL;
+       }
+
+       return ret;
 }
 
 
 
-static menu_screen_error_e _start_recover(const char *package, void *scroller)
+static menu_screen_error_e _start_download(const char *package, void *scroller)
 {
+       _D("Start downloading for the package(%s)", package);
        return MENU_SCREEN_ERROR_OK;
 }
 
 
 
-static menu_screen_error_e _start_install(const char *package, void *scroller)
+static menu_screen_error_e _start_uninstall(const char *package, void *scroller)
 {
-       Eina_List *l;
-       Eina_List *tmp;
-       struct package_info *pi = NULL;
-       Eina_List *install_list;
-
-       install_list = evas_object_data_get(scroller, "install_list");
-       EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
-               if (pi->ai.package && !strcmp(pi->ai.package, package)) {
-                       break;
-               }
-               pi = NULL;
-       }
+       _D("Start uninstalling for the package(%s)", package);
+       return MENU_SCREEN_ERROR_OK;
+}
 
-       if (!pi) {
-               int page_no = 0;
-               _D("Package [%s] is starting install phase directly (without downloading phase)", package);
-               pi = calloc(1, sizeof(struct package_info));
-               retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
 
-               pi->ai.package = strdup(package);
-               if (!pi->ai.package) {
-                       free(pi);
-                       return MENU_SCREEN_ERROR_FAIL;
-               }
 
-               pi->ai.icon = strdup(DEFAULT_ICON);
-               if (!pi->ai.icon) {
-                       free(pi->ai.package);
-                       free(pi);
-                       return MENU_SCREEN_ERROR_FAIL;
-               }
+static menu_screen_error_e _start_update(const char *package, void *scroller)
+{
+       _D("Start updating for the package(%s)", package);
+       return MENU_SCREEN_ERROR_OK;
+}
 
-               pi->item = page_scroller_find_item_by_package(scroller, package, &page_no);
-               if (!pi->item) {
-                       if (NULL == page_scroller_push_item(scroller, &pi->ai)) _E("Cannot push an item");
-               }
-               pi->item = page_scroller_find_item_by_package(scroller, package, &page_no);
-               pi->page = page_scroller_get_page_at(scroller, page_no);
 
-               if (pi->item && pi->page) {
-                       pi->ai.nodisplay = false;
-                       pi->ai.enabled = true;
-               }
 
-               install_list = eina_list_append(install_list, pi);
-               evas_object_data_set(scroller, "install_list", install_list);
-       } else {
-               if (pi->status != DOWNLOAD_END && pi->status != INSTALL_END) {
-                       _D("Package [%s] is in invalid state (%d), cancel this", package, pi->status);
-                       install_list = eina_list_remove(install_list, pi);
-                       evas_object_data_set(scroller, "install_list", install_list);
-                       if (pi->item) {
-                               page_unpack_item(pi->page, pi->item);
-                               page_scroller_trim_items(scroller);
-                               item_destroy(pi->item);
-                       }
-
-                       list_free_values(&pi->ai);
-                       free(pi);
-                       return MENU_SCREEN_ERROR_FAIL;
-               }
-       }
+static menu_screen_error_e _start_recover(const char *package, void *scroller)
+{
+       _D("Start recovering for the package(%s)", package);
+       return MENU_SCREEN_ERROR_OK;
+}
 
-       pi->status = INSTALL_BEGIN;
-       pi->ai.name = strdup("Install");
-       if (pi->item) {
-               // Update app name to install
-               item_set_name(pi->item, pi->ai.name, 0);
-       }
-       _D("Package [%s] is jump into the installing phase", package);
 
+
+static menu_screen_error_e _start_install(const char *package, void *scroller)
+{
+       _D("Start installing for the package(%s)", package);
        return MENU_SCREEN_ERROR_OK;
 }
 
@@ -344,18 +402,18 @@ static menu_screen_error_e _start(const char *package, const char *val, void *sc
                },
        };
 
-       register unsigned int i;
-
-       _D("package [%s]", package);
+       _D("package [%s], val [%s]", package, val);
+       retv_if(_exist_request_in_list(package), MENU_SCREEN_ERROR_FAIL);
+       retv_if(MENU_SCREEN_ERROR_OK != _append_request_in_list(package, val), MENU_SCREEN_ERROR_FAIL);
 
+       register unsigned int i;
        for (i = 0; start_cb[i].name; i ++) {
-               if (!strcasecmp(val, start_cb[i].name) && start_cb[i].handler) {
-                       return start_cb[i].handler(package, scroller);
-               }
+               if (strcasecmp(val, start_cb[i].name)) continue;
+               break_if(NULL == start_cb[i].handler);
+               return start_cb[i].handler(package, scroller);
        }
 
-       _D("Unknown status for starting phase signal'd from package manager");
-
+       _E("Unknown status for starting phase signal'd from package manager");
        return MENU_SCREEN_ERROR_OK;
 }
 
@@ -363,47 +421,7 @@ static menu_screen_error_e _start(const char *package, const char *val, void *sc
 
 static menu_screen_error_e _icon_path(const char *package, const char *val, void *scroller)
 {
-       Eina_List *l;
-       Eina_List *tmp;
-       struct package_info *pi = NULL;
-       Eina_List *install_list;
-
-       install_list = evas_object_data_get(scroller, "install_list");
-       retv_if(!package, MENU_SCREEN_ERROR_FAIL);
-       retv_if(!val, MENU_SCREEN_ERROR_FAIL);
-
-       _D("package [%s] with %s", package, val);
-
-       EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
-               if (pi->ai.package && !strcmp(pi->ai.package, package)) {
-                       break;
-               }
-               pi = NULL;
-       }
-       retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
-
-       if (strlen(val)) {
-               pi->ai.icon = strdup(val);
-               retv_if (NULL == pi->ai.icon, MENU_SCREEN_ERROR_OUT_OF_MEMORY);
-
-               if (!pi->item) {
-                       _D("There is no item for [%s]", package);
-                       pi->ai.nodisplay = false;
-                       pi->ai.enabled = true;
-
-                       if (NULL == page_scroller_push_item(scroller, &pi->ai)) {
-                               _E("Failed to create a new item, remove this package from the installing list");
-                               list_free_values(&pi->ai);
-                               install_list = eina_list_remove(install_list, pi);
-                               evas_object_data_set(scroller, "install_list", install_list);
-                               free(pi);
-                       }
-               } else {
-                       _D("There is an item for [%s:%p]", package, pi->item);
-                       item_update(pi->item, &pi->ai);
-               }
-       }
-
+       _D("package(%s) with %s", package, val);
        return MENU_SCREEN_ERROR_OK;
 }
 
@@ -411,39 +429,7 @@ static menu_screen_error_e _icon_path(const char *package, const char *val, void
 
 static menu_screen_error_e _download_percent(const char *package, const char *val, void *scroller)
 {
-       Eina_List *l;
-       Eina_List *tmp;
-       struct package_info *pi = NULL;
-       Eina_List *install_list;
-
-       _D("package [%s] with %s", package, val);
-
-       install_list = evas_object_data_get(scroller, "install_list");
-       EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
-               if (pi->ai.package && !strcmp(pi->ai.package, package)) {
-                       break;
-               }
-               pi = NULL;
-       }
-
-       retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
-
-       if (pi->status == DOWNLOAD_BEGIN) {
-               pi->status = DOWNLOADING;
-       } else if (pi->status == DOWNLOADING) {
-               // Do nothing, just we are in proper state
-       } else {
-               _D("Invalid state for %s, This is not started from the download_begin state(%s)", package, val);
-       }
-
-       if (!pi->ai.nodisplay && pi->ai.enabled && pi->item) {
-               if (!item_is_enabled_progress(pi->item)) {
-                       item_enable_progress(pi->item);
-               }
-
-               item_update_progress(pi->item, atoi(val));
-       }
-
+       _D("package(%s) with %s", package, val);
        return MENU_SCREEN_ERROR_OK;
 }
 
@@ -451,51 +437,9 @@ static menu_screen_error_e _download_percent(const char *package, const char *va
 
 static menu_screen_error_e _install_percent(const char *package, const char *val, void *scroller)
 {
-       Eina_List *l;
-       Eina_List *tmp;
-       struct package_info *pi;
-       int progress;
-       Eina_List *install_list;
-
-       _D("package [%s] with %s", package, val);
-
-       pi = NULL;
-       install_list = evas_object_data_get(scroller, "install_list");
-       EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
-               if (pi->ai.package && !strcmp(pi->ai.package, package)) {
-                       break;
-               }
-
-               pi = NULL;
-       }
-
-       retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
-
-       progress = atoi(val);
-
-       if (pi->status == INSTALL_BEGIN) {
-               pi->status = INSTALLING;
-       } else if (pi->status == UNINSTALL_BEGIN) {
-               progress = 100 - progress;
-               pi->status = UNINSTALLING;
-       } else if (pi->status == UPDATE_BEGIN) {
-               pi->status = UPDATING;
-       } else if (pi->status == INSTALLING) {
-       } else if (pi->status == UNINSTALLING) {
-               progress = 100 - progress;
-       } else if (pi->status == UPDATING) {
-       } else {
-               _D("Invalid state for %s, This is not the uninstall or install_begin state(%s)", package, val);
-       }
-
-       if (!pi->ai.nodisplay && pi->ai.enabled && pi->item) {
-               if (!item_is_enabled_progress(pi->item)) {
-                       item_enable_progress(pi->item);
-               }
-
-               item_update_progress(pi->item, progress);
-       }
-
+       _D("package(%s) with %s", package, val);
+       if (_exist_request_in_list(package)) return MENU_SCREEN_ERROR_OK;
+       retv_if(MENU_SCREEN_ERROR_OK != _append_request_in_list(package, "install"), MENU_SCREEN_ERROR_FAIL);
        return MENU_SCREEN_ERROR_OK;
 }
 
@@ -503,250 +447,115 @@ static menu_screen_error_e _install_percent(const char *package, const char *val
 
 static menu_screen_error_e _error(const char *package, const char *val, void *scroller)
 {
-       struct package_info *pi = NULL;
-       Eina_List *l;
-       Eina_List *tmp;
-       Eina_List *install_list;
-
-       _D("package [%s] with %s", package, val);
-
-       install_list = evas_object_data_get(scroller, "install_list");
-       EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
-               if (pi->ai.package && !strcmp(pi->ai.package, package)) {
-                       break;
-               }
-
-               pi = NULL;
-       }
-
-       retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
-
-       pi->error_count ++;
+       _D("package(%s) with %s", package, val);
        return MENU_SCREEN_ERROR_OK;
 }
 
 
 
-static menu_screen_error_e _end_downloading(const char *package, struct package_info *pi, void *scroller)
+static int _end_cb(pkgmgrinfo_appinfo_h handle, void *user_data)
 {
-       pi->status = DOWNLOAD_END;
-       _D("Package downloading is complete, waiting install progress");
-       return MENU_SCREEN_ERROR_OK;
-}
+       retv_if(NULL == handle, -1);
+       retv_if(NULL == user_data, -1);
 
+       char *appid = NULL;
+       pkgmgrinfo_appinfo_get_appid(handle, &appid);
 
+       Evas_Object *layout = evas_object_data_get(menu_screen_get_win(), "layout");
+       retv_if(NULL == layout, MENU_SCREEN_ERROR_FAIL);
 
-static menu_screen_error_e _end_installing(const char *package, struct package_info *pi, void *scroller)
-{
-       // This status will not be referenced from the others.
-       // because it will be freed right after set it. ;)
-       Eina_List *install_list;
-
-       pi->status = INSTALL_END;
-       _D("Package installing is complete");
-
-       install_list = evas_object_data_get(scroller, "install_list");
-       if (pi->desktop_file_found == 1) {
-               install_list = eina_list_remove(install_list, pi);
-               evas_object_data_set(scroller, "install_list", install_list);
-               list_free_values(&pi->ai);
-               free(pi);
+       pkgmgr_request_s *rt = user_data;
+       if (!strcmp(rt->status, "install")) {
+               layout_create_package(layout, appid);
+       } else if (!strcmp(rt->status, "update")) {
+               layout_update_package(layout, appid);
+       } else {
+               _E("No routines for this status (%s:%s)", rt->package, rt->status);
        }
 
-
-       // TODO: Need to register a timer callback
-       return MENU_SCREEN_ERROR_OK;
+       return 0;
 }
 
 
 
-static menu_screen_error_e _end_updating(const char *package, struct package_info *pi, void *scroller)
+static Eina_Bool _uninstall_cb(const char *app_id, Evas_Object *item, void *data)
 {
-       // This status will not be referenced from the others.
-       // because it will be freed right after set it. ;)
-       Eina_List *install_list;
-
-       pi->status = UPDATE_END;
-       _D("Package updating is complete");
-
-       install_list = evas_object_data_get(scroller, "install_list");
-       if (pi->desktop_file_found == 1) {
-               install_list = eina_list_remove(install_list, pi);
-               evas_object_data_set(scroller, "install_list", install_list);
-               list_free_values(&pi->ai);
-               free(pi);
-       }
+       retv_if(NULL == data, EINA_FALSE);
 
+       Evas_Object *layout = data;
+       layout_delete_package(layout, app_id);
 
-       // TODO: Need to register a timer callback
-       return MENU_SCREEN_ERROR_OK;
+       return EINA_TRUE;
 }
 
 
 
-static menu_screen_error_e _end_uninstalling(const char *package, struct package_info *pi, void *scroller)
+static Eina_Bool _set_removable_cb(const char *app_id, Evas_Object *item, void *data)
 {
-       Eina_List *install_list;
+       retv_if(NULL == item, EINA_FALSE);
 
-       pi->status = UNINSTALL_END;
-       _D("Package uninstalling is complete");
+       item_set_removable(item, 1, 0);
+       elm_object_signal_emit(item, "uninstall,on", "menu");
 
-       install_list = evas_object_data_get(scroller, "install_list");
-       if (pi->desktop_file_found == 1) {
-               install_list = eina_list_remove(install_list, pi);
-               evas_object_data_set(scroller, "install_list", install_list);
-               list_free_values(&pi->ai);
-               free(pi);
-       }
-
-       return MENU_SCREEN_ERROR_OK;
+       return EINA_TRUE;
 }
 
 
 
-static menu_screen_error_e _end_unknown(const char *package, struct package_info *pi, void *scroller)
+static menu_screen_error_e _end(const char *package, const char *val, void *data)
 {
-       Eina_List *install_list;
-
-       install_list = evas_object_data_get(scroller, "install_list");
-       install_list = eina_list_remove(install_list, pi);
-       evas_object_data_set(scroller, "install_list", install_list);
-
-       if (pi->item) {
-               // Remove an item only if it is installing.
-               if (
-                       pi->status == INSTALL_BEGIN || pi->status == INSTALLING || pi->status == INSTALL_END ||
-                       pi->status == DOWNLOAD_BEGIN || pi->status == DOWNLOADING || pi->status == DOWNLOAD_END
-               )
-               {
-                       if (pi->page) {
-                               page_unpack_item(pi->page, pi->item);
-                               page_scroller_trim_items(scroller);
-                       } else {
-                               _D("Page is not valid (%s)", package);
-                       }
-                       item_destroy(pi->item);
-                       page_scroller_trim_items(scroller);
-               }
-       }
+       pkgmgrinfo_pkginfo_h handle = NULL;
 
-       list_free_values(&pi->ai);
-       free(pi);
-
-       return MENU_SCREEN_ERROR_OK;
-}
+       retv_if(!_exist_request_in_list(package), MENU_SCREEN_ERROR_FAIL);
 
+       pkgmgr_request_s *rt = _get_request_in_list(package);
+       retv_if(NULL == rt, MENU_SCREEN_ERROR_FAIL);
+       if(strcasecmp(val, "ok")) {
+               pkgmgr_item_list_affect_pkgid(package, _set_removable_cb, NULL);
+               _E("cannot end that package(%s) is %s", rt->package, rt->status);
 
+               goto ERROR;
+       }
 
-static menu_screen_error_e _end(const char *package, const char *val, void *scroller)
-{
-       Eina_List *l;
-       Eina_List *tmp;
-       struct package_info *pi;
-       register int i;
-       struct end_cb_set {
-               int status;
-               int (*handler)(const char *package, struct package_info *pi, void *scroller);
-       } end_cb[] = {
-               {
-                       .status = DOWNLOADING,
-                       .handler = _end_downloading,
-               },
-               {
-                       .status = INSTALLING,
-                       .handler = _end_installing,
-               },
-               {
-                       .status = UNINSTALLING,
-                       .handler = _end_uninstalling,
-               },
-               {
-                       .status = UPDATING,
-                       .handler = _end_updating,
-               },
-               {
-                       .status = UNKNOWN,
-                       .handler = _end_unknown,
-               },
-               {
-                       .status = MAX_STATUS,
-                       .handler = NULL,
-               },
-       };
-       Eina_List *install_list;
+       _D("Package(%s) : key(%s) - val(%s)", package, rt->status, val);
 
-       _D("package [%s], val [%s]", package, val);
+       /* Criteria : pkgid */
+       if (!strcasecmp("uninstall", rt->status)) {
+               Evas_Object *layout = evas_object_data_get(menu_screen_get_win(), "layout");
+               goto_if(NULL == layout, ERROR);
 
-       pi = NULL;
-       install_list = evas_object_data_get(scroller, "install_list");
-       EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
-               if (pi->ai.package && !strcmp(pi->ai.package, package)) {
-                       break;
-               }
-               pi = NULL;
+               pkgmgr_item_list_affect_pkgid(package, _uninstall_cb, layout);
+               goto OUT;
        }
 
-       retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
-
-       list_free_values(&pi->ai);
-       if (MENU_SCREEN_ERROR_OK != list_get_values(package, &pi->ai)) _E("Cannot get values");
-       item_update(pi->item, &pi->ai);
+       goto_if(PMINFO_R_OK != pkgmgrinfo_pkginfo_get_pkginfo(package, &handle), ERROR);
 
-       if (item_is_enabled_progress(pi->item)) {
-               item_disable_progress(pi->item);
+       /* Criteria : appid */
+       if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_list(handle, PMINFO_UI_APP, _end_cb, rt)) {
+               goto ERROR;
        }
 
-       // NOTE: Don't release the 'pi'
-       //       Release it from each handler
-       for (i = 0; end_cb[i].handler; i ++) {
-               if (end_cb[i].status == pi->status && end_cb[i].handler) {
-                       int ret;
+OUT:
+       if (MENU_SCREEN_ERROR_OK != _remove_request_in_list(package))
+               _E("cannot remove a request(%s:%s)", rt->package, rt->status);
+       if (handle) pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
 
-                       if (strcasecmp(val, "ok")) {
-                               ret = _end_unknown(package, pi, scroller);
-                       } else {
-                               ret = end_cb[i].handler(package, pi, scroller);
-                       }
+       return MENU_SCREEN_ERROR_OK;
 
-                       return ret;
-               }
-       }
+ERROR:
+       if (MENU_SCREEN_ERROR_OK != _remove_request_in_list(package))
+               _E("cannot remove a request(%s:%s)", rt->package, rt->status);
+       if (handle) pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
 
-       return _end_unknown(package, pi, scroller);
+       return MENU_SCREEN_ERROR_FAIL;
 }
 
 
 
 static menu_screen_error_e _change_pkg_name(const char *package, const char *val, void *scroller)
 {
-       Eina_List *l;
-       Eina_List *tmp;
-       struct package_info *pi;
-       Eina_List *install_list;
-
-       _D("package [%s]", package);
-
-       install_list = evas_object_data_get(scroller, "install_list");
-       EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
-               if (!pi) {
-                       continue;
-               }
-               if (pi->ai.package && !strcmp(pi->ai.package, package)) {
-                       _D("Replace package name %s to %s", pi->ai.package, val);
-                       free(pi->ai.package);
-                       pi->ai.package = strdup(val);
-                       if (!pi->ai.package) {
-                               _E("cannot strdup");
-                               return MENU_SCREEN_ERROR_FAIL;
-                       }
-                       if (pi->item) {
-                               item_set_package(pi->item, (char*) val, 0);
-                       }
-                       return MENU_SCREEN_ERROR_OK;
-               }
-       }
-
-       return MENU_SCREEN_ERROR_FAIL;
+       _D("package(%s) with %s", package, val);
+       return MENU_SCREEN_ERROR_OK;
 }
 
 
@@ -767,21 +576,23 @@ static struct pkgmgr_handler pkgmgr_cbs[] = {
 static menu_screen_error_e _pkgmgr_cb(int req_id, const char *pkg_type, const char *package, const char *key, const char *val, const void *pmsg, void *data)
 {
        register unsigned int i;
-       Evas_Object *scroller = data;
 
-       _D("pkgmgr request [%s] for %s, val(%s)", key, package, val);
+       _D("pkgmgr request [%s:%s] for %s", key, val, package);
+
+       if (BOOTING_STATE_DONE > menu_screen_get_booting_state()) {
+               pkgmgr_reserve_list_push_request(package, key, val);
+               return MENU_SCREEN_ERROR_OK;
+       }
 
        for (i = 0; i < sizeof(pkgmgr_cbs) / sizeof(struct pkgmgr_handler); i++) {
-               if (!strcasecmp(pkgmgr_cbs[i].key, key)) {
-                       if (pkgmgr_cbs[i].func) {
-                               if (MENU_SCREEN_ERROR_OK != pkgmgr_cbs[i].func(package, val, scroller)) {
-                                       _E("pkgmgr_cbs[%u].func has errors.", i);
-                               }
-                       } else {
-                               _E("Cannot find pkgmgr_cbs[%u].func.", i);
-                       }
-                       return MENU_SCREEN_ERROR_OK;
+               if (strcasecmp(pkgmgr_cbs[i].key, key)) continue;
+               break_if(!pkgmgr_cbs[i].func);
+
+               if (MENU_SCREEN_ERROR_OK != pkgmgr_cbs[i].func(package, val, NULL)) {
+                       _E("pkgmgr_cbs[%u].func has errors.", i);
                }
+
+               return MENU_SCREEN_ERROR_OK;
        }
 
        return MENU_SCREEN_ERROR_FAIL;
@@ -789,7 +600,76 @@ static menu_screen_error_e _pkgmgr_cb(int req_id, const char *pkg_type, const ch
 
 
 
-HAPI menu_screen_error_e pkgmgr_init(Evas_Object *scroller)
+HAPI menu_screen_error_e pkgmgr_reserve_list_push_request(const char *package, const char *key, const char *val)
+{
+       retv_if(NULL == package, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+       retv_if(NULL == key, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+       retv_if(NULL == val, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+
+       char *tmp_package = NULL;
+       char *tmp_key = NULL;
+       char *tmp_val = NULL;
+
+       pkgmgr_reserve_s *pr = calloc(1, sizeof(pkgmgr_reserve_s));
+       retv_if(NULL == pr, MENU_SCREEN_ERROR_FAIL);
+
+       tmp_package = strdup(package);
+       goto_if(NULL == tmp_package, ERROR);
+       pr->package = tmp_package;
+
+       tmp_key = strdup(key);
+       goto_if(NULL == tmp_key, ERROR);
+       pr->key = tmp_key;
+
+       tmp_val = strdup(val);
+       goto_if(NULL == tmp_val, ERROR);
+       pr->val = tmp_val;
+
+       pkg_mgr_info.reserve_list = eina_list_append(pkg_mgr_info.reserve_list, pr);
+       goto_if(NULL == pkg_mgr_info.reserve_list, ERROR);
+
+       return MENU_SCREEN_ERROR_OK;
+
+ERROR:
+       if (tmp_val) free(tmp_val);
+       if (tmp_key) free(tmp_key);
+       if (tmp_package) free(tmp_package);
+       free(pr);
+
+       return MENU_SCREEN_ERROR_FAIL;
+}
+
+
+
+HAPI menu_screen_error_e pkgmgr_reserve_list_pop_request(void)
+{
+       if (!pkg_mgr_info.reserve_list) return MENU_SCREEN_ERROR_NO_DATA;
+
+       pkgmgr_reserve_s *pr = eina_list_nth(pkg_mgr_info.reserve_list, 0);
+       if (!pr) return MENU_SCREEN_ERROR_NO_DATA;
+       pkg_mgr_info.reserve_list = eina_list_remove(pkg_mgr_info.reserve_list, pr);
+
+       goto_if(MENU_SCREEN_ERROR_OK != _pkgmgr_cb(0, NULL, pr->package, pr->key, pr->val, NULL, NULL), ERROR);
+
+       if (pr->package) free(pr->package);
+       if (pr->key) free(pr->key);
+       if (pr->val) free(pr->val);
+       free(pr);
+
+       return MENU_SCREEN_ERROR_OK;
+
+ERROR:
+       if (pr->package) free(pr->package);
+       if (pr->key) free(pr->key);
+       if (pr->val) free(pr->val);
+       free(pr);
+
+       return MENU_SCREEN_ERROR_FAIL;
+}
+
+
+
+HAPI menu_screen_error_e pkgmgr_init(void)
 {
        if (NULL != pkg_mgr_info.listen_pc) {
                return MENU_SCREEN_ERROR_OK;
@@ -798,7 +678,7 @@ HAPI menu_screen_error_e pkgmgr_init(Evas_Object *scroller)
        pkg_mgr_info.listen_pc = pkgmgr_client_new(PC_LISTENING);
        retv_if(NULL == pkg_mgr_info.listen_pc, MENU_SCREEN_ERROR_FAIL);
        retv_if(pkgmgr_client_listen_status(pkg_mgr_info.listen_pc,
-                       _pkgmgr_cb, scroller) != PKGMGR_R_OK, MENU_SCREEN_ERROR_FAIL);
+                       _pkgmgr_cb, NULL) != PKGMGR_R_OK, MENU_SCREEN_ERROR_FAIL);
 
        return MENU_SCREEN_ERROR_OK;
 }
@@ -816,50 +696,4 @@ HAPI void pkgmgr_fini(void)
 
 
 
-HAPI Evas_Object *pkgmgr_find_pended_object(const char *package, int with_desktop_file, Evas_Object *scroller, Evas_Object **page)
-{
-       Eina_List *l;
-       Eina_List *tmp;
-       struct package_info *pi;
-       Eina_List *install_list;
-
-       _D("package [%s]", package);
-
-       retv_if(NULL == package, NULL);
-       install_list = evas_object_data_get(scroller, "install_list");
-       EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
-               if (!pi) {
-                       continue;
-               }
-               if (pi->ai.package && !strcmp(pi->ai.package, package)) {
-                       Evas_Object *item;
-                       _D("Installing(Downloading) package is found (%p)", pi->item);
-
-                       item = pi->item;
-
-                       if (with_desktop_file) {
-                               pi->desktop_file_found = 1;
-
-                               if (pi->status == INSTALL_END || pi->status == UNINSTALL_END || pi->status == UPDATE_END) {
-                                       install_list = eina_list_remove(install_list, pi);
-                                       evas_object_data_set(scroller, "install_list", install_list);
-                                       list_free_values(&pi->ai);
-                                       free(pi);
-                                       pi = NULL;
-                               }
-                       }
-
-                       if (page) {
-                               *page = pi ? pi->page : NULL;
-                       }
-                       return item;
-               }
-       }
-
-       _D("Failed to find a installing/downloading package");
-       return NULL;
-}
-
-
-
 // End of a file
index a3fa311d3173af48a532ea1612e2261c82552bba..d340c0331b8cfe22f93160cd6df132a3cdd12740 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <Elementary.h>
 
@@ -138,6 +142,7 @@ static void _uninstall_yes_cb(void *data, Evas_Object *obj, void *event_info)
 
        Evas_Object *item;
        item = evas_object_data_del(popup, "item");
+       ret_if(!item);
 
        evas_object_del(evas_object_data_del(popup, "button1"));
        evas_object_del(evas_object_data_del(popup, "button2"));
@@ -192,6 +197,8 @@ HAPI Evas_Object *popup_create_uninstall(Evas_Object *parent, Evas_Object *item)
        Evas_Object *btn2;
        char warning[BUFSZE];
 
+       ret_if(!item);
+
        popup_destroy_all();
 
        popup = elm_popup_add(parent);
index 864cb1ed37ecfcb416cd63df36732e9333c035b7..2f518bcaa002228483c17dada85354cd2cca78af 100644 (file)
@@ -1,20 +1,24 @@
- /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://floralicense.org/license/
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ *          Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 <Evas.h>