From: Tanayc Date: Thu, 14 Apr 2016 09:25:10 +0000 (+0530) Subject: Initialize Recents X-Git-Tag: submit/tizen/20160908.064755~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=14437b29105e02031581a779586352e0e9181a56;p=profile%2Fwearable%2Fapps%2Fnative%2Ftaskmanager.git Initialize Recents Change-Id: Ia5be34da8c780d24e1bda1742151410154846482 --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..566bee7 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +Hong Kwon +Minho Kim diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..4352e27 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,72 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(task-mgr) +# FIND ALL SOURCE IN A SOURCE DIRECTORY +AUX_SOURCE_DIRECTORY(${CMAKE_SOURCE_DIR}/src SRCS) + +#INCLUDE FILE +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) +SET(PACKAGE "${PROJECT_NAME}") +SET(RESOURCE_DIR "${CMAKE_SOURCE_DIR}/res") +SET(EDJDIR "${RESOURCE_DIR}/edje/${PACKAGE}") + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs REQUIRED + appcore-efl + evas + edje + elementary + ecore + eina + capi-appfw-application + capi-system-info + capi-appfw-package-manager + capi-appfw-app-manager + dlog + pkgmgr-info + rua + feedback +) + +SET(PREFIX ${CMAKE_INSTALL_PREFIX}) +SET(RESDIR "${PREFIX}/res") +SET(EDJEDIR "${RESDIR}/edje") +SET(LOCALEDIR "${RESDIR}/locale") + +FOREACH(flag ${pkgs_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -fPIE") + +SET(CMAKE_C_FLAGS_PROFILING "-O0 -g -pg -fPIE") +SET(CMAKE_CXX_FLAGS_PROFILING "-O0 -std=c++0x -g -pg -fPIE") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fPIE") +SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -std=c++0x -g -fPIE") +SET(CMAKE_C_FLAGS_RELEASE "-O2 -g -fPIE") +SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -std=c++0x -g -fPIE") +SET(CMAKE_C_FLAGS_CCOV "-O2 -g --coverage -fPIE") +SET(CMAKE_CXX_FLAGS_CCOV "-O2 -std=c++0x -g --coverage -fPIE") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie") + +MESSAGE(${CMAKE_C_FLAGS}) + +ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"") +ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"") + +ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS}) + +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS}) + +# Install +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin) + +#Install images +INSTALL(DIRECTORY res/images/ DESTINATION res/images) + +# Install Manifest File +INSTALL(FILES data/org.tizen.task-mgr.xml DESTINATION /usr/share/packages) +INSTALL(FILES data/org.tizen.task-mgr.efl DESTINATION /etc/smack/accesses.d) +# End of a file +ADD_SUBDIRECTORY(res) diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..54b213e --- /dev/null +++ b/LICENSE @@ -0,0 +1,204 @@ +Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/NOTICE b/NOTICE new file mode 100755 index 0000000..b2e5019 --- /dev/null +++ b/NOTICE @@ -0,0 +1 @@ +Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. diff --git a/data/org.tizen.task-mgr.efl b/data/org.tizen.task-mgr.efl new file mode 100644 index 0000000..26ed423 --- /dev/null +++ b/data/org.tizen.task-mgr.efl @@ -0,0 +1,47 @@ +org.tizen.task-mgr system::homedir rwxat- ------ +org.tizen.task-mgr system::media rwxat- ------ +org.tizen.task-mgr system::share rwxat- ------ +org.tizen.task-mgr system::use_internet r----- ------ +org.tizen.task-mgr system::ext_storage rwxat- ------ +org.tizen.task-mgr secure-storage-client rw---- ------ +org.tizen.task-mgr pulseaudio rwxat- ------ +org.tizen.task-mgr system r-x--- ------ +org.tizen.task-mgr xorg rw---- ------ +org.tizen.task-mgr device::bklight rw---- ------ +org.tizen.task-mgr org.tizen.indicator rwx--- ------ +org.tizen.task-mgr org.tizen.quickpanel rwx--- ------ +org.tizen.task-mgr crash-popup r-x--- ------ +org.tizen.task-mgr system-server rwx--- ------ +org.tizen.task-mgr immvibed rw---- ------ +org.tizen.task-mgr display_wd r-x--- ------ +org.tizen.task-mgr sound_server rwxa-- ------ +org.tizen.task-mgr dbus rwx--- ------ +org.tizen.task-mgr e17 rw---- ------ +org.tizen.task-mgr aul rwx--- ------ +org.tizen.task-mgr aul::launch rwx--- ------ +org.tizen.task-mgr aul::terminate --x--- ------ +org.tizen.task-mgr app-svc rwx--- ------ +org.tizen.task-mgr aul_amd rwx--- ------ +org.tizen.task-mgr pkgmgr::db rwx--- ------ +org.tizen.task-mgr trm -w---- ------ +org.tizen.task-mgr svi-data r-x--- ------ +org.tizen.task-mgr org.tizen.oma-dm r-x--- ------ +org.tizen.task-mgr sys-assert::core rwxat- ------ +org.tizen.task-mgr isf rwx--- ------ +org.tizen.task-mgr media-server r-x--- ------ +org.tizen.task-mgr deviced rwx--- ------ +org.tizen.task-mgr notification::db rw---- ------ +org.tizen.task-mgr data-provider-master rw---- ------ +org.tizen.task-mgr data-provider-master::notification rw---- ------ +org.tizen.task-mgr data-provider-master::notification.client rw---- ------ +org.tizen.task-mgr org.tizen.setting::default-resources r-x--- ------ +org.tizen.task-mgr device::app_logging -w---- ------ +org.tizen.task-mgr device::sys_logging -w---- ------ +org.tizen.task-mgr oma-ds-agent::cfg r----- ------ +org.tizen.task-mgr oma-ds-agent::svc rw---- ------ +org.tizen.task-mgr rua::db rwx--- ------ +org.tizen.indicator org.tizen.task-mgr rwx--- ------ +e17 org.tizen.task-mgr rw---- ------ +system org.tizen.task-mgr -w---- ------ +display_wd org.tizen.task-mgr -w---- ------ +dbus org.tizen.task-mgr rwx--- ------ diff --git a/data/org.tizen.task-mgr.xml b/data/org.tizen.task-mgr.xml new file mode 100644 index 0000000..25c605d --- /dev/null +++ b/data/org.tizen.task-mgr.xml @@ -0,0 +1,11 @@ + + + + Kamil Maslanka + Michal Skorupinski + TASK MANAGER APPLICATION + + + + + diff --git a/include/conf.h b/include/conf.h new file mode 100644 index 0000000..f876075 --- /dev/null +++ b/include/conf.h @@ -0,0 +1,53 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * 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 __TASK_MGR_CONF_H__ +#define __TASK_MGR_CONF_H__ + +//size +#define BASE_WIDTH 720 +#define BASE_HEIGHT 1280 + +#define CLEAR_ICON_WIDTH 60 +#define CLEAR_ICON_HEIGHT 60 +#define CLEAR_LINE_WIDTH 2 +#define CLEAR_LINE_HEIGHT 120 +#define CLEAR_PAD_HEIGHT 100 +#define CLEAR_ITEM_WIDTH CLEAR_ICON_WIDTH +#define CLEAR_ITEM_HEIGHT CLEAR_LINE_HEIGHT+CLEAR_PAD_HEIGHT + +#define ITEM_ICON_WIDTH 118 +#define ITEM_ICON_HEIGHT 118 +#define ITEM_LINE_WIDTH 2 +#define ITEM_LINE_HEIGHT 174 +#define ITEM_WIDTH ITEM_ICON_WIDTH +#define ITEM_HEIGHT ITEM_LINE_HEIGHT + +//color +#define BG_COLOR (255*0.5) + +//edc +#define LAYOUT EDJEDIR"/layout.edj" +#define BOX_LAYOUT EDJEDIR"/box.edj" +#define ITEM_LAYOUT EDJEDIR"/item.edj" + +#define BOX_GROUP_NAME "box" +#define BG_PART_NAME "bg" + +#endif //__TASK_MGR_CONF_H__ diff --git a/include/item.h b/include/item.h new file mode 100644 index 0000000..3d1e7a8 --- /dev/null +++ b/include/item.h @@ -0,0 +1,40 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * 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 __TASK_MGR_ITEM_H__ +#define __TASK_MGR_ITEM_H__ + +#include "list.h" +#include "util.h" + + + +extern list_type_default_s *item_get_info(Evas_Object *item); + +extern void item_clear_set_disable(Evas_Object *scroller); +extern Evas_Object *item_clear_all_create(Evas_Object *scroller); +extern void item_clear_all_destroy(Evas_Object *scroller); + +extern Evas_Object *item_create(Evas_Object *scroller, list_type_default_s *info); +extern void item_destroy(Evas_Object *item); +extern void item_terminate(Evas_Object *item); + + + +#endif //__TASK_MGR_ITEM_H__ diff --git a/include/list.h b/include/list.h new file mode 100644 index 0000000..2d5361e --- /dev/null +++ b/include/list.h @@ -0,0 +1,51 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * 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 __TASK_MGR_LIST_H__ +#define __TASK_MGR_LIST_H__ + +#include "util.h" + +typedef struct { + + char *pkgid; + char *appid; + char *name; + char *icon; + char *arg; + + int pid; + Eina_Bool nodisplay; + Eina_Bool taskmanage; + Eina_Bool unmounted; + Eina_Bool multi_launch; + Eina_Bool isAlreadySet; + + time_t launch_time; + +} list_type_default_s; + + + +extern task_mgr_error_e list_create(Eina_List **pkg_list); +extern void list_destroy(Eina_List *pkg_list); + +extern task_mgr_error_e list_sort(Eina_List *pkg_list, int (*_sort_cb)(const void *d1, const void *d2)); + +#endif //__TASK_MGR_LIST_H__ diff --git a/include/log.h b/include/log.h new file mode 100755 index 0000000..3831fad --- /dev/null +++ b/include/log.h @@ -0,0 +1,115 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * 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 __TASK_MGR_LOG_H__ +#define __TASK_MGR_LOG_H__ + +#include +#include + +#undef LOG_TAG +#define LOG_TAG "TASK_MGR" + +#if !defined(_D) +#define _D(fmt, arg...) LOGD(fmt"\n", ##arg) +#endif + +#if !defined(_W) +#define _W(fmt, arg...) LOGW(fmt"\n", ##arg) +#endif + +#if !defined(_E) +#define _E(fmt, arg...) LOGE(fmt"\n", ##arg) +#endif + +#if !defined(_SD) +#define _SD(fmt, arg...) SECURE_LOGD(fmt"\n", ##arg) +#endif + +#if !defined(_SW) +#define _SW(fmt, arg...) SECURE_LOGW(fmt"\n", ##arg) +#endif + +#if !defined(_SE) +#define _SE(fmt, arg...) SECURE_LOGE(fmt"\n", ##arg) +#endif + +#define retvm_if_timer(timer, expr, val, fmt, arg...) do { \ + if (expr) { \ + _E(fmt, ##arg); \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + timer = NULL; \ + return (val); \ + } \ +} while (0) + +#define retvm_if(expr, val, fmt, arg...) do { \ + if(expr) { \ + _E(fmt, ##arg); \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return val; \ + } \ +} while (0) + +#define retv_if(expr, val) do { \ + if(expr) { \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return (val); \ + } \ +} while (0) + +#define retm_if(expr, fmt, arg...) do { \ + if(expr) { \ + _E(fmt, ##arg); \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return; \ + } \ +} while (0) + +#define ret_if(expr) do { \ + if(expr) { \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return; \ + } \ +} while (0) + +#define goto_if(expr, val) do { \ + if(expr) { \ + _E("(%s) -> goto", #expr); \ + goto val; \ + } \ +} while (0) + +#define break_if(expr) { \ + if(expr) { \ + _E("(%s) -> break", #expr); \ + break; \ + } \ +} + +#define continue_if(expr) { \ + if(expr) { \ + _E("(%s) -> continue", #expr); \ + continue; \ + } \ +} + + + +#endif //__TASK_MGR_LOG_H__ diff --git a/include/main.h b/include/main.h new file mode 100644 index 0000000..62c9bdd --- /dev/null +++ b/include/main.h @@ -0,0 +1,41 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * 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 __TASK_MGR_H__ +#define __TASK_MGR_H__ + +typedef struct { + Evas *e; + Evas_Object *win; + Evas_Object *bg; + Evas_Object *layout; + Evas_Object *scroller; + Evas_Object *box; + + Eina_List *pkg_list; + + int root_w; + int root_h; +} main_s; +typedef main_s *main_h; + + +extern main_h main_get_info(void); + +#endif //__TASK_MGR_H__ diff --git a/include/scroller.h b/include/scroller.h new file mode 100644 index 0000000..bf67ac9 --- /dev/null +++ b/include/scroller.h @@ -0,0 +1,44 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * 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 __TASK_MGR_SCROLLER_H__ +#define __TASK_MGR_SCROLLER_H__ + +#include "util.h" + + + +extern task_mgr_error_e scroller_push_item(Evas_Object *scroller, Evas_Object *item); +extern void scroller_pop_item(Evas_Object *scroller, Evas_Object *item, int terminate); + +extern task_mgr_error_e scroller_push_all_item(Evas_Object *scroller, Eina_List *list); +extern void scroller_pop_all_item(Evas_Object *scroller, int terminate); + +extern int scroller_count(Evas_Object *scroller); +extern Eina_Bool scroller_is_scrolling(Evas_Object *scroller); + +extern void scroller_freeze(Evas_Object *scroller); +extern void scroller_unfreeze(Evas_Object *scroller); + +extern Evas_Object *scroller_create(Evas_Object *layout); +extern void scroller_destroy(Evas_Object *scroller); + + + +#endif //__TASK_MGR_SCROLLER_H__ diff --git a/include/util.h b/include/util.h new file mode 100644 index 0000000..af2c727 --- /dev/null +++ b/include/util.h @@ -0,0 +1,52 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * 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 __TASK_MGR_UTIL_H__ + #define __TASK_MGR_UTIL_H__ + + + +/* data key */ +#define DATA_KEY_RUNNING_LIST "rn_list" +#define DATA_KEY_IS_SCROLLING "is_scing" +#define DATA_KEY_ITEM_INFO "it_if" + +/* Multi-language */ +#if !defined(_) +#define _(str) gettext(str) +#endif + + + +/* Enum */ +typedef enum { + TASK_MGR_ERROR_NONE = 0, + TASK_MGR_ERROR_FAIL = -1, + TASK_MGR_ERROR_DB_FAILED = -2, + TASK_MGR_ERROR_OUT_OF_MEMORY = -3, + TASK_MGR_ERROR_INVALID_PARAMETER = -4, + TASK_MGR_ERROR_NO_DATA = -5, +} task_mgr_error_e; + +extern Eina_Bool util_kill_app(const char *appid); +extern Eina_Bool util_launch_app(const char *appid); + + + +#endif //__TASK_MGR_UTIL_H__ diff --git a/org.tizen.task-mgr.manifest b/org.tizen.task-mgr.manifest new file mode 100644 index 0000000..9a6888c --- /dev/null +++ b/org.tizen.task-mgr.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/packaging/org.tizen.task-mgr.spec b/packaging/org.tizen.task-mgr.spec new file mode 100644 index 0000000..ed5119b --- /dev/null +++ b/packaging/org.tizen.task-mgr.spec @@ -0,0 +1,67 @@ +%define Exec task-mgr +%define AppInstallPath /usr/apps/%{name} + +Name: org.tizen.task-mgr +Summary: Taskmanager application +Version: 0.0.1 +Release: 1 +License: Apache-2.0 +Source0: %{name}-%{version}.tar.gz + +%if "%{?tizen_profile_name}" == "wearable" +ExcludeArch: %{arm} %ix86 x86_64 +%endif + +%if "%{?tizen_profile_name}" == "tv" +ExcludeArch: %{arm} %ix86 x86_64 +%endif + +BuildRequires: pkgconfig(appcore-efl) +BuildRequires: pkgconfig(capi-appfw-application) +BuildRequires: pkgconfig(ecore) +BuildRequires: pkgconfig(eina) +BuildRequires: pkgconfig(evas) +BuildRequires: pkgconfig(edje) +BuildRequires: edje-tools +BuildRequires: gettext-tools +BuildRequires: pkgconfig(dlog) +BuildRequires: pkgconfig(elementary) +BuildRequires: pkgconfig(capi-system-info) +BuildRequires: pkgconfig(capi-appfw-package-manager) +BuildRequires: pkgconfig(capi-appfw-app-manager) +BuildRequires: cmake +BuildRequires: pkgconfig(pkgmgr-info) +BuildRequires: pkgconfig(rua) +BuildRequires: pkgconfig(feedback) + +%description +Taskmanager application. + +%prep +%setup -q + +%build +export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE" +export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE" +export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE" + +cmake . -DCMAKE_INSTALL_PREFIX="%{AppInstallPath}" -DCMAKE_TARGET="%{Exec}" -DCMAKE_PACKAGE="%{name}" +make %{?jobs:-j%jobs} + +%install +rm -rf %{buildroot} +%make_install + +%post +/sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{AppInstallPath}/bin/task-mgr +%{AppInstallPath}/res/* +%{_datarootdir}/packages/%{name}.xml +/etc/smack/accesses.d/%{name}.efl +%{AppInstallPath}/res/locale/*/LC_MESSAGES/* diff --git a/res/CMakeLists.txt b/res/CMakeLists.txt new file mode 100644 index 0000000..5cc2056 --- /dev/null +++ b/res/CMakeLists.txt @@ -0,0 +1,3 @@ +ADD_SUBDIRECTORY(edje) +#ADD_SUBDIRECTORY(images) +ADD_SUBDIRECTORY(po) diff --git a/res/edje/CMakeLists.txt b/res/edje/CMakeLists.txt new file mode 100644 index 0000000..62354db --- /dev/null +++ b/res/edje/CMakeLists.txt @@ -0,0 +1,17 @@ +#install edj +ADD_CUSTOM_TARGET(layout.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images + ${CMAKE_CURRENT_SOURCE_DIR}/layout.edc layout.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/layout.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} layout.edj) +INSTALL(FILES layout.edj DESTINATION ${EDJEDIR}) + +ADD_CUSTOM_TARGET(item.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images + ${CMAKE_CURRENT_SOURCE_DIR}/item.edc item.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/item.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} item.edj) +INSTALL(FILES item.edj DESTINATION ${EDJEDIR}) + diff --git a/res/edje/conf.h b/res/edje/conf.h new file mode 120000 index 0000000..de97229 --- /dev/null +++ b/res/edje/conf.h @@ -0,0 +1 @@ +../../include/conf.h \ No newline at end of file diff --git a/res/edje/images/clear_all_button_icon.png b/res/edje/images/clear_all_button_icon.png new file mode 100644 index 0000000..4ba500c Binary files /dev/null and b/res/edje/images/clear_all_button_icon.png differ diff --git a/res/edje/images/clear_all_button_icon_disable.png b/res/edje/images/clear_all_button_icon_disable.png new file mode 100755 index 0000000..6f48ef4 Binary files /dev/null and b/res/edje/images/clear_all_button_icon_disable.png differ diff --git a/res/edje/item.edc b/res/edje/item.edc new file mode 100644 index 0000000..a8bfe85 --- /dev/null +++ b/res/edje/item.edc @@ -0,0 +1,294 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * 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.h" + + + +styles { + style { + name: "item_style"; + base: "font=Tizen:style=Bold font_size=32 color=#ffffff align=left style=shadow shadow_color=#000000bf wrap=mixed"; + tag: "br" "\n"; + tag: "hilight" "+ font_weight=Bold"; + tag: "b" "+ font_weight=Bold"; + tag: "tab" "\t"; + } +} + +images { + image: "clear_all_button_icon.png" COMP; + image: "clear_all_button_icon_disable.png" COMP; +} + +externals { + external: "feedback"; +} + +collections { + base_scale: 2.6; + plugins { + plugin { + name: "touch_sound"; + source: "feedback"; + param: "FEEDBACK_TYPE_SOUND FEEDBACK_PATTERN_TAP"; + } + } + group { + name: "item"; + parts { + part { + name: "bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 1.0 1.0; } + color: 255 255 255 0; + min: ITEM_WIDTH ITEM_HEIGHT; + visible: 1; + } + } + part{ + name: "line"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + color: 255 255 255 255; + rel1 { relative: 0.5 0.0; to: "bg"; } + rel2 { relative: 0.5 1.0; to: "bg"; } + min: ITEM_LINE_WIDTH 0; + fixed: 1 0; + visible: 1; + align: 0.5 0.5; + } + } + part { + name: "inner"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + visible: 1; + fixed: 1 1; + } + } + } + } + group { + name: "item_inner"; + parts { + part { + name: "bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 1.0 1.0; } + color: 255 255 255 0; + min: ITEM_WIDTH ITEM_HEIGHT; + visible: 1; + } + } + part { + name: "icon"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.5 0.0; to: "bg"; } + rel2 { relative: 0.5 0.0; to: "bg"; } + visible: 1; + min: ITEM_ICON_WIDTH ITEM_ICON_HEIGHT; + fixed: 1 1; + align: 0.5 0.0; + } + } + part { + name: "name"; + type: TEXTBLOCK; + scale: 1; + description { + state: "default" 0.0; + color: 255 255 255 255; + rel1 { relative: 1.0 0.0; to: "icon"; offset: 20 0; } + rel2 { relative: 1.0 1.0; to: "icon"; } + text { + text: ""; + style: "item_style"; + min: 1 0; + } + align: 0.0 0.5; + visible: 1; + } + } + part { + name: "event"; + type: RECT; + description { + state: "default" 0.0; + color: 0 0 0 0; + rel1 { relative: 0.0 0.0; to: "icon"; } + rel2 { relative: 1.0 1.0; to: "icon"; } + visible: 1; + } + } + } //parts + programs { + program { + name: "click,sound"; + signal: "clicked"; + source: "event"; + action: RUN_PLUGIN "touch_sound"; + } + } //programs + } //group + + group { + name: "clear_item"; + parts { + part { + name: "bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 1.0 1.0; } + color: 255 255 255 0; + min: ITEM_WIDTH CLEAR_ITEM_HEIGHT; + visible: 1; + } + } + part { + name: "top_pad"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; to: "bg"; } + rel2 { relative: 1.0 0.0; to: "bg"; } + min: 0 CLEAR_PAD_HEIGHT; + align: 0.5 0.0; + } + } + part{ + name: "line"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + color: 255 255 255 255; + rel1 { relative: 0.5 0.0; offset: 0 5; to: "clear_img"; } + rel2 { relative: 0.5 1.0; to: "bg"; } + min: CLEAR_LINE_WIDTH 0; + visible: 1; + align: 0.5 0.5; + fixed: 1 0; + } + } + part { + name: "clear_img"; + type: IMAGE; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.5 1.0; to: "top_pad"; } + rel2 { relative: 0.5 1.0; to: "top_pad"; } + image { + normal: "clear_all_button_icon.png"; + } + visible: 1; + min: CLEAR_ICON_WIDTH CLEAR_ICON_HEIGHT; + align: 0.5 0.0; + fixed: 1 1; + } + description { + state: "no,apps" 0.0; + inherit: "default" 0.0; + image { + normal: "clear_all_button_icon_disable.png"; + } + } + } + part { + name: "name"; + type: TEXTBLOCK; + scale: 1; + description { + state: "default" 0.0; + color: 255 255 255 255; + rel1 { relative: 1.0 0.0; to: "clear_img"; offset: 37 0; } + rel2 { relative: 1.0 1.0; to: "clear_img"; } + text { + text: "Clear all"; + style: "item_style"; + min: 1 0; + } + align: 0.0 0.5; + visible: 1; + fixed: 1 0; + } + description { + state: "no,apps" 0.0; + inherit: "default" 0.0; + color: 255 255 255 124; + } + } + part { + name: "event"; + type: RECT; + description { + state: "default" 0.0; + color: 0 0 0 0; + rel1.to: "clear_img"; + rel2.to: "clear_img"; + visible: 1; + } + description { + state: "no,apps" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + } //parts + programs { + program { + name: "click,sound"; + signal: "mouse,clicked,1"; + source: "event"; + action: RUN_PLUGIN "touch_sound"; + } + program { + name: "no,app"; + signal: "no,apps"; + source: "clear"; + action: STATE_SET "no,apps" 0.0; + target: "clear_img"; + target: "name"; + target: "event"; + } + } + } //group +} //collections diff --git a/res/edje/layout.edc b/res/edje/layout.edc new file mode 100644 index 0000000..37178c2 --- /dev/null +++ b/res/edje/layout.edc @@ -0,0 +1,99 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * 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.h" + +styles { + style { + name: "no_item_style"; + base: "font=Tizen:style=Bold font_size=32 color=#ffffff align=center style=shadow shadow_color=#000000bf wrap=mixed"; + tag: "br" "\n"; + tag: "hilight" "+ font_weight=Bold"; + tag: "b" "+ font_weight=Bold"; + tag: "tab" "\t"; + } +} + +collections { + base_scale: 2.6; + group { + name: "layout"; + parts { + part { + name: "bg"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 1.0 1.0; } + visible: 1; + } + } + part { + name: "scroller"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; to: "bg"; } + rel2 { relative: 1.0 1.0; to: "bg"; } + align: 0.5 1.0; + visible: 1; + } + } + part { + name: "no,apps,txt"; + type: TEXTBLOCK; + scale: 1; + description { + state: "default" 0.0; + color: 255 255 255 255; + rel1 { relative: 0.15 0.4; to: "bg"; } + rel2 { relative: 0.85 0.5; to: "bg"; } + text { + text: " "; + style: "no_item_style"; + align: 0.5 0.5; + } + visible: 0; + } + description { + state: "show" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } //parts + programs { + program { + signal: "no,apps,txt,show"; + source: "no,apps,txt"; + action: STATE_SET "show" 0.0; + target: "no,apps,txt"; + } + program { + signal: "no,apps,txt,hide"; + source: "no,apps,txt"; + action: STATE_SET "default" 0.0; + target: "no,apps,txt"; + } + } + } //group +} //collections diff --git a/res/images/default.png b/res/images/default.png new file mode 100644 index 0000000..9765b1b Binary files /dev/null and b/res/images/default.png differ diff --git a/res/po/CMakeLists.txt b/res/po/CMakeLists.txt new file mode 100644 index 0000000..2d1db70 --- /dev/null +++ b/res/po/CMakeLists.txt @@ -0,0 +1,23 @@ +# for i18n + +SET(POFILES ar.po az.po bg.po ca.po cs.po da.po de.po el_GR.po en.po en_PH.po en_US.po es_ES.po es_US.po et.po eu.po fi.po fr.po fr_CA.po ga.po gl.po hi.po hr.po hu.po hy.po is.po it_IT.po ja_JP.po ka.po kk.po ko_KR.po lt.po lv.po mk.po nb.po nl.po pl.po pt_BR.po pt_PT.po ro.po ru_RU.po sk.po sl.po sr.po sv.po tr_TR.po uk.po uz.po zh_CN.po zh_HK.po zh_TW.po) + +SET(MSGFMT "/usr/bin/msgfmt") + +FOREACH(pofile ${POFILES}) + SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile}) + MESSAGE("PO: ${pofile}") + GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE) + GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE) + SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo) + ADD_CUSTOM_COMMAND( + OUTPUT ${moFile} + COMMAND ${MSGFMT} -o ${moFile} ${absPofile} + DEPENDS ${absPofile} + ) + INSTALL(FILES ${moFile} DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo) + SET(moFiles ${moFiles} ${moFile}) +ENDFOREACH(pofile) + +MESSAGE(".mo files: ${moFiles}") +ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles}) diff --git a/res/po/POTFILES.in b/res/po/POTFILES.in new file mode 100644 index 0000000..2477469 --- /dev/null +++ b/res/po/POTFILES.in @@ -0,0 +1,10 @@ +# List of source files containing translatable strings. +taskmanager.c +_eina.c +_genlist.c +_info.c +_logic.c +_mem.c +_progressbar.c +_util_efl.c + diff --git a/res/po/ar.po b/res/po/ar.po new file mode 100755 index 0000000..2455a00 --- /dev/null +++ b/res/po/ar.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "ما من تطبيقات" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "مدير المهام" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "مسح الكل" + diff --git a/res/po/as.po b/res/po/as.po new file mode 100755 index 0000000..789e74a --- /dev/null +++ b/res/po/as.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "সকলো পৰিষ্কাৰ" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "কোনো এপ্লিকেশ্বন নাই" + diff --git a/res/po/az.po b/res/po/az.po new file mode 100755 index 0000000..10db1bf --- /dev/null +++ b/res/po/az.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Proqram yoxdur" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Tapşr mnc" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Hamısını sil" + diff --git a/res/po/bg.po b/res/po/bg.po new file mode 100755 index 0000000..e3e0f6a --- /dev/null +++ b/res/po/bg.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Няма приложения" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Задачи" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Изтр. всч" + diff --git a/res/po/bn.po b/res/po/bn.po new file mode 100755 index 0000000..6f12ad8 --- /dev/null +++ b/res/po/bn.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "সমস্ত পরিষ্কার" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "কোনও অ্যাপ্লিকেশন নেই" + diff --git a/res/po/ca.po b/res/po/ca.po new file mode 100755 index 0000000..8107e5d --- /dev/null +++ b/res/po/ca.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Cap aplicació" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Adm tasq" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Esbor tot" + diff --git a/res/po/cs.po b/res/po/cs.po new file mode 100755 index 0000000..e99f240 --- /dev/null +++ b/res/po/cs.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Žádné aplikace" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Sp. úloh" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Smazat vše" + diff --git a/res/po/da.po b/res/po/da.po new file mode 100755 index 0000000..953f0c0 --- /dev/null +++ b/res/po/da.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Ingen applikationer" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Opg.styr" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Slet alle" + diff --git a/res/po/de.po b/res/po/de.po new file mode 100755 index 0000000..cc49976 --- /dev/null +++ b/res/po/de.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Keine Anwendungen" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Task-Mgr." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Alle löschen" + diff --git a/res/po/de_DE.po b/res/po/de_DE.po new file mode 100644 index 0000000..7a289e1 --- /dev/null +++ b/res/po/de_DE.po @@ -0,0 +1,36 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_HISTORY_ABB" +msgstr "Verlauf löschen" + +msgid "IDS_TASKMGR_BUTTON_CLOSE_ALL_APPLICATIONS" +msgstr "Alle Anwendungen schließen" + +msgid "IDS_TASKMGR_HEADER_RUNNING" +msgstr "Ausführen" + +msgid "IDS_TASKMGR_MBODY_NO_APPS_OPEN" +msgstr "Keine Apps geöffnet" + +msgid "IDS_TASKMGR_MBODY_NO_RECENTLY_USED_APPS" +msgstr "Keine kürzli. verw. Apps" + +msgid "IDS_TASKMGR_MBODY_RECENTLY_USED" +msgstr "Kürzlich verwendet" + +msgid "IDS_TASKMGR_POP_CLEAR_ALL_APP_HISTORY_Q" +msgstr "Verlauf für alle Anwendungen löschen?" + +msgid "IDS_TASKMGR_POP_CLEAR_PS_HISTORY_Q" +msgstr "%s-Verlauf löschen?" + +msgid "IDS_TASKMGR_POP_CLOSE_ALL_APPS_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST" +msgstr "Alle Anwendungen schließen? Dadurch gehen möglicherweise Daten verloren." + +msgid "IDS_TASKMGR_POP_CLOSE_PS_APP_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST" +msgstr "Anwendung %s schließen? Dadurch gehen möglicherweise Daten verloren." + +msgid "IDS_TASKMGR_POP_UNABLE_TO_OPEN_APPLICATION" +msgstr "Öffnen der Anwendung nicht möglich." + +msgid "IDS_TASKMGR_HEADER_TASK_SWITCHER" +msgstr "Task-Switcher" + diff --git a/res/po/el_GR.po b/res/po/el_GR.po new file mode 100755 index 0000000..3e6c930 --- /dev/null +++ b/res/po/el_GR.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Καμία εφαρμογή" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Διαχ. ερ." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Διαγραφή όλων" + diff --git a/res/po/en.po b/res/po/en.po new file mode 100755 index 0000000..3f97657 --- /dev/null +++ b/res/po/en.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "No applications" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Task mgr" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Clear all" + diff --git a/res/po/en_GB.po b/res/po/en_GB.po new file mode 100644 index 0000000..7aaa29e --- /dev/null +++ b/res/po/en_GB.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "High volumes may harm your hearing if you listen for a long time" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Warning" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Headphones" + diff --git a/res/po/en_PH.po b/res/po/en_PH.po new file mode 100755 index 0000000..3f97657 --- /dev/null +++ b/res/po/en_PH.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "No applications" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Task mgr" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Clear all" + diff --git a/res/po/en_US.po b/res/po/en_US.po new file mode 100755 index 0000000..3f97657 --- /dev/null +++ b/res/po/en_US.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "No applications" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Task mgr" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Clear all" + diff --git a/res/po/es_ES.po b/res/po/es_ES.po new file mode 100755 index 0000000..8adcae0 --- /dev/null +++ b/res/po/es_ES.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "No hay aplicaciones" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Adm tarea" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Borrar todo" + diff --git a/res/po/es_MX.po b/res/po/es_MX.po new file mode 100644 index 0000000..75c339b --- /dev/null +++ b/res/po/es_MX.po @@ -0,0 +1,36 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_HISTORY_ABB" +msgstr "Eliminar historial" + +msgid "IDS_TASKMGR_BUTTON_CLOSE_ALL_APPLICATIONS" +msgstr "Cerrar todas las aplicaciones" + +msgid "IDS_TASKMGR_HEADER_RUNNING" +msgstr "En uso" + +msgid "IDS_TASKMGR_MBODY_NO_APPS_OPEN" +msgstr "No hay aplic. abiertas" + +msgid "IDS_TASKMGR_MBODY_NO_RECENTLY_USED_APPS" +msgstr "No hay aplic. usadas rec." + +msgid "IDS_TASKMGR_MBODY_RECENTLY_USED" +msgstr "De uso reciente" + +msgid "IDS_TASKMGR_POP_CLEAR_ALL_APP_HISTORY_Q" +msgstr "¿Eliminar historial de todas las aplicaciones?" + +msgid "IDS_TASKMGR_POP_CLEAR_PS_HISTORY_Q" +msgstr "¿Eliminar historial de %s?" + +msgid "IDS_TASKMGR_POP_CLOSE_ALL_APPS_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST" +msgstr "¿Cerrar todas las aplicaciones? Esto puede causar la pérdida de datos" + +msgid "IDS_TASKMGR_POP_CLOSE_PS_APP_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST" +msgstr "¿Cerrar aplicación %s? Esto puede causar la pérdida de datos" + +msgid "IDS_TASKMGR_POP_UNABLE_TO_OPEN_APPLICATION" +msgstr "No se pudo abrir la aplicación" + +msgid "IDS_TASKMGR_HEADER_TASK_SWITCHER" +msgstr "Conmutador de tareas" + diff --git a/res/po/es_US.po b/res/po/es_US.po new file mode 100755 index 0000000..948a691 --- /dev/null +++ b/res/po/es_US.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "No hay aplicaciones" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Adm. tar." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Eliminar todo" + diff --git a/res/po/et.po b/res/po/et.po new file mode 100755 index 0000000..c0ecffd --- /dev/null +++ b/res/po/et.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Rakendusi pole" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Ül. hal." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Tühjenda kõik" + diff --git a/res/po/eu.po b/res/po/eu.po new file mode 100755 index 0000000..312b761 --- /dev/null +++ b/res/po/eu.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Ez dago aplikaziorik" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Eg. kud." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Garbitu guztiak" + diff --git a/res/po/fa.po b/res/po/fa.po new file mode 100644 index 0000000..0cbf694 --- /dev/null +++ b/res/po/fa.po @@ -0,0 +1,36 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_HISTORY_ABB" +msgstr "پاک کردن تاریخچه" + +msgid "IDS_TASKMGR_BUTTON_CLOSE_ALL_APPLICATIONS" +msgstr "بستن همه برنامه ها" + +msgid "IDS_TASKMGR_HEADER_RUNNING" +msgstr "اجرا" + +msgid "IDS_TASKMGR_MBODY_NO_APPS_OPEN" +msgstr "برنامه ای باز نیست" + +msgid "IDS_TASKMGR_MBODY_NO_RECENTLY_USED_APPS" +msgstr "بدون برنامه استفاده اخیر" + +msgid "IDS_TASKMGR_MBODY_RECENTLY_USED" +msgstr "استفاده شده اخیر" + +msgid "IDS_TASKMGR_POP_CLEAR_ALL_APP_HISTORY_Q" +msgstr "پاک کردن همه سابقه برنامه؟" + +msgid "IDS_TASKMGR_POP_CLEAR_PS_HISTORY_Q" +msgstr "پاک کردن تاریخچه %s؟" + +msgid "IDS_TASKMGR_POP_CLOSE_ALL_APPS_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST" +msgstr "بستن همه برنامه ها؟ اینکار موجب از دست رفتن داده ها می شود" + +msgid "IDS_TASKMGR_POP_CLOSE_PS_APP_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST" +msgstr "بستن برنامه %s؟ اینکار موجب از دست رفتن داده ها می شود" + +msgid "IDS_TASKMGR_POP_UNABLE_TO_OPEN_APPLICATION" +msgstr "نمی تواند برنامه را باز کند" + +msgid "IDS_TASKMGR_HEADER_TASK_SWITCHER" +msgstr "تغییر دهنده کار" + diff --git a/res/po/fi.po b/res/po/fi.po new file mode 100755 index 0000000..9153502 --- /dev/null +++ b/res/po/fi.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Sovelluksia ei ole" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Teht.h." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Tyhj. kaikki" + diff --git a/res/po/fr.po b/res/po/fr.po new file mode 100755 index 0000000..4071977 --- /dev/null +++ b/res/po/fr.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Aucune application" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Gest. tâches" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Effacer tout" + diff --git a/res/po/fr_CA.po b/res/po/fr_CA.po new file mode 100755 index 0000000..4071977 --- /dev/null +++ b/res/po/fr_CA.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Aucune application" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Gest. tâches" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Effacer tout" + diff --git a/res/po/fr_FR.po b/res/po/fr_FR.po new file mode 100644 index 0000000..d805672 --- /dev/null +++ b/res/po/fr_FR.po @@ -0,0 +1,36 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_HISTORY_ABB" +msgstr "Effacer historique" + +msgid "IDS_TASKMGR_BUTTON_CLOSE_ALL_APPLICATIONS" +msgstr "Fermer toutes les applications" + +msgid "IDS_TASKMGR_HEADER_RUNNING" +msgstr "Exécution" + +msgid "IDS_TASKMGR_MBODY_NO_APPS_OPEN" +msgstr "Aucune appli ouverte" + +msgid "IDS_TASKMGR_MBODY_NO_RECENTLY_USED_APPS" +msgstr "Auc appli récemment util" + +msgid "IDS_TASKMGR_MBODY_RECENTLY_USED" +msgstr "Récemment utilisée" + +msgid "IDS_TASKMGR_POP_CLEAR_ALL_APP_HISTORY_Q" +msgstr "Effacer l'historique de toutes les applications ?" + +msgid "IDS_TASKMGR_POP_CLEAR_PS_HISTORY_Q" +msgstr "Effacer l'historique %s ?" + +msgid "IDS_TASKMGR_POP_CLOSE_ALL_APPS_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST" +msgstr "Fermer toutes les applications ? Cela peut entraîner la perte de données" + +msgid "IDS_TASKMGR_POP_CLOSE_PS_APP_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST" +msgstr "Fermer l'application %s ? Cela peut entraîner la perte de données" + +msgid "IDS_TASKMGR_POP_UNABLE_TO_OPEN_APPLICATION" +msgstr "Impossible d'ouvrir l'application" + +msgid "IDS_TASKMGR_HEADER_TASK_SWITCHER" +msgstr "Gestionnaire de tâches" + diff --git a/res/po/ga.po b/res/po/ga.po new file mode 100755 index 0000000..cbabc7e --- /dev/null +++ b/res/po/ga.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Níl feidhmchláir ann" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Bain. tasc" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Glan gach" + diff --git a/res/po/gl.po b/res/po/gl.po new file mode 100755 index 0000000..cff6ebe --- /dev/null +++ b/res/po/gl.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Non hai aplicacións" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Adm.tare." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Borrar todo" + diff --git a/res/po/gu.po b/res/po/gu.po new file mode 100755 index 0000000..6d7abd5 --- /dev/null +++ b/res/po/gu.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "બધું સાફ કરો" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "કોઇ એપ્લિકેશનો નથી" + diff --git a/res/po/he.po b/res/po/he.po new file mode 100644 index 0000000..d13bad1 --- /dev/null +++ b/res/po/he.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "עוצמות קול גבוהות עלולות לפגוע בשמיעה אם מאזינים להן למשך זמן רב" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "אזהרה" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "מדיה" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "אוזניות" + diff --git a/res/po/hi.po b/res/po/hi.po new file mode 100755 index 0000000..659efdc --- /dev/null +++ b/res/po/hi.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "कोई एप्लीकेशंस नहीं" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "कार्य प्रबंधक" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "सभी साफ करें" + diff --git a/res/po/hr.po b/res/po/hr.po new file mode 100755 index 0000000..ae80187 --- /dev/null +++ b/res/po/hr.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Nema aplikacija" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Zadaci" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Obriši sve" + diff --git a/res/po/hu.po b/res/po/hu.po new file mode 100755 index 0000000..3f911b5 --- /dev/null +++ b/res/po/hu.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Nincs alkalmazás" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Felad.kez." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Össz. Törlése" + diff --git a/res/po/hy.po b/res/po/hy.po new file mode 100755 index 0000000..b824401 --- /dev/null +++ b/res/po/hy.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Ծրագրեր չկան" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Առջ. կռվչ" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Մաքրել բոլորը" + diff --git a/res/po/id.po b/res/po/id.po new file mode 100755 index 0000000..f821a2c --- /dev/null +++ b/res/po/id.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Hps semua" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Tidak ada aplikasi" + diff --git a/res/po/is.po b/res/po/is.po new file mode 100755 index 0000000..18c3bfe --- /dev/null +++ b/res/po/is.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Engin forrit" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Verkstjórn" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Hreinsa allt" + diff --git a/res/po/it_IT.po b/res/po/it_IT.po new file mode 100755 index 0000000..8233878 --- /dev/null +++ b/res/po/it_IT.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Nessuna applicazione" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Gest att" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Cancella tutto" + diff --git a/res/po/ja_JP.po b/res/po/ja_JP.po new file mode 100755 index 0000000..8482108 --- /dev/null +++ b/res/po/ja_JP.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "アプリケーションがありません" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "タスクマネージャ" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "全て消去" + diff --git a/res/po/ka.po b/res/po/ka.po new file mode 100755 index 0000000..f719bfc --- /dev/null +++ b/res/po/ka.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "აპლიკაციები არ არის" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "მმართველი" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "ყველას წაშლა" + diff --git a/res/po/kk.po b/res/po/kk.po new file mode 100755 index 0000000..a55632a --- /dev/null +++ b/res/po/kk.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Бағдарламалар жоқ" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Тапс ртш" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Барлығын өшіру" + diff --git a/res/po/km.po b/res/po/km.po new file mode 100755 index 0000000..9834b7f --- /dev/null +++ b/res/po/km.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "ជម្រះ​ទាំងអស់" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "គ្មាន​កម្មវិធី" + diff --git a/res/po/kn.po b/res/po/kn.po new file mode 100755 index 0000000..b5c4367 --- /dev/null +++ b/res/po/kn.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "ಎಲ್ಲವನ್ನೂ ತೆರವುಗೊಳಿಸಿ" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "ಅನ್ವಯಿಸುವಿಕೆಗಳಿಲ್ಲ" + diff --git a/res/po/ko_KR.po b/res/po/ko_KR.po new file mode 100755 index 0000000..6f70f88 --- /dev/null +++ b/res/po/ko_KR.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "모두 삭제" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "애플리케이션이 없습니다" + diff --git a/res/po/lo.po b/res/po/lo.po new file mode 100755 index 0000000..57efa11 --- /dev/null +++ b/res/po/lo.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "ລຶບທັງໝົດ" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "ບໍ່ມີແອພພລິເຄຊັນ" + diff --git a/res/po/lt.po b/res/po/lt.po new file mode 100755 index 0000000..9d45bae --- /dev/null +++ b/res/po/lt.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Nėra programų" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Užd. tv." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Valyti viską" + diff --git a/res/po/lv.po b/res/po/lv.po new file mode 100755 index 0000000..5d4153f --- /dev/null +++ b/res/po/lv.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Nav programmu" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Uzd.pārv." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Notīrīt visu" + diff --git a/res/po/mk.po b/res/po/mk.po new file mode 100755 index 0000000..cfbda17 --- /dev/null +++ b/res/po/mk.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Нема апликации" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Уред.зад." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Бриши сѐ" + diff --git a/res/po/ml.po b/res/po/ml.po new file mode 100755 index 0000000..dda80d4 --- /dev/null +++ b/res/po/ml.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "എല്ലാം മായ്‌ക്കുക" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "ആപ്ലിക്കേഷനുകൾ ഒന്നുമില്ല" + diff --git a/res/po/mr.po b/res/po/mr.po new file mode 100755 index 0000000..2b9885b --- /dev/null +++ b/res/po/mr.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "सर्व साफ करा" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "कोणतेही अनुप्रयोग नाहीत" + diff --git a/res/po/ms.po b/res/po/ms.po new file mode 100755 index 0000000..6e06d99 --- /dev/null +++ b/res/po/ms.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Padam semua" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Tiada aplikasi" + diff --git a/res/po/my.po b/res/po/my.po new file mode 100755 index 0000000..b18cf92 --- /dev/null +++ b/res/po/my.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "အားလံုးကိုရွင္းပစ္ပါ" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "အပလီေကးရွင္းမ်ား မရွိပါ" + diff --git a/res/po/nb.po b/res/po/nb.po new file mode 100755 index 0000000..dc25bb9 --- /dev/null +++ b/res/po/nb.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Ingen apper" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Oppg.beh" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Tøm alle" + diff --git a/res/po/ne.po b/res/po/ne.po new file mode 100755 index 0000000..0c727cb --- /dev/null +++ b/res/po/ne.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "सबै सफा" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "कुनै अनुप्रयोगहरू छैनन्" + diff --git a/res/po/nl.po b/res/po/nl.po new file mode 100755 index 0000000..af0ea61 --- /dev/null +++ b/res/po/nl.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Geen applicaties" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Taakbeheer" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Wis alles" + diff --git a/res/po/nl_NL.po b/res/po/nl_NL.po new file mode 100644 index 0000000..d9e3864 --- /dev/null +++ b/res/po/nl_NL.po @@ -0,0 +1,36 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_HISTORY_ABB" +msgstr "Geschiedenis wissen" + +msgid "IDS_TASKMGR_BUTTON_CLOSE_ALL_APPLICATIONS" +msgstr "Alle toepassingen sluiten" + +msgid "IDS_TASKMGR_HEADER_RUNNING" +msgstr "Actief" + +msgid "IDS_TASKMGR_MBODY_NO_APPS_OPEN" +msgstr "Geen apps open" + +msgid "IDS_TASKMGR_MBODY_NO_RECENTLY_USED_APPS" +msgstr "Geen recent gebruik. apps" + +msgid "IDS_TASKMGR_MBODY_RECENTLY_USED" +msgstr "Recent gebruikt" + +msgid "IDS_TASKMGR_POP_CLEAR_ALL_APP_HISTORY_Q" +msgstr "Alle app-geschiedenis wissen?" + +msgid "IDS_TASKMGR_POP_CLEAR_PS_HISTORY_Q" +msgstr "Geschiedenis %s wissen?" + +msgid "IDS_TASKMGR_POP_CLOSE_ALL_APPS_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST" +msgstr "Alle apps sluiten? Hierbij kunnen gegevens verloren gaan" + +msgid "IDS_TASKMGR_POP_CLOSE_PS_APP_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST" +msgstr "App %s sluiten? Hierbij kunnen gegevens verloren gaan" + +msgid "IDS_TASKMGR_POP_UNABLE_TO_OPEN_APPLICATION" +msgstr "Kan applicatie niet openen" + +msgid "IDS_TASKMGR_HEADER_TASK_SWITCHER" +msgstr "Taak afwisselen" + diff --git a/res/po/no.po b/res/po/no.po new file mode 100644 index 0000000..b14a452 --- /dev/null +++ b/res/po/no.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Høy lydstyrke kan skade hørselen din hvis du lytter til det over lengre perioder" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Advarsel" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Medier" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Hodetelefoner" + diff --git a/res/po/or.po b/res/po/or.po new file mode 100755 index 0000000..bb3d337 --- /dev/null +++ b/res/po/or.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "ସମସ୍ତ ଖାଲି" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "କୌଣସି ଆପ୍ଲିକେସନ୍ ନାହିଁ" + diff --git a/res/po/pa.po b/res/po/pa.po new file mode 100755 index 0000000..90e577c --- /dev/null +++ b/res/po/pa.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "ਸਾਰੇ ਸਾਫ਼ ਕਰੋ" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "ਕੋਈ ਅਨੁਪ੍ਰਯੋਗ ਨਹੀਂ" + diff --git a/res/po/pl.po b/res/po/pl.po new file mode 100755 index 0000000..f44b22e --- /dev/null +++ b/res/po/pl.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Brak aplikacji" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Men. zad." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Wyczyść wszys." + diff --git a/res/po/pt_BR.po b/res/po/pt_BR.po new file mode 100755 index 0000000..d614a54 --- /dev/null +++ b/res/po/pt_BR.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Nenhum aplicativo" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Ger. tar." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Limpar tudo" + diff --git a/res/po/pt_PT.po b/res/po/pt_PT.po new file mode 100755 index 0000000..4ba0d24 --- /dev/null +++ b/res/po/pt_PT.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Sem aplicações" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Ges. tar." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Limpar tudo" + diff --git a/res/po/ro.po b/res/po/ro.po new file mode 100755 index 0000000..c32c3bd --- /dev/null +++ b/res/po/ro.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Nicio aplicaţie" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Man. act." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Şterg. totală" + diff --git a/res/po/ru_RU.po b/res/po/ru_RU.po new file mode 100755 index 0000000..41358f3 --- /dev/null +++ b/res/po/ru_RU.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Нет приложений" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Диспетчер" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Очистить все" + diff --git a/res/po/si.po b/res/po/si.po new file mode 100755 index 0000000..f317038 --- /dev/null +++ b/res/po/si.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "සියල්ල මකන්න" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "යෙදුම් නොමැත" + diff --git a/res/po/sk.po b/res/po/sk.po new file mode 100755 index 0000000..f5fe503 --- /dev/null +++ b/res/po/sk.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Žiadne aplikácie" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Spr. úloh" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Vymazať všetko" + diff --git a/res/po/sl.po b/res/po/sl.po new file mode 100755 index 0000000..4ddc82e --- /dev/null +++ b/res/po/sl.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Ni aplikacij" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Upr. opr." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Počisti vse" + diff --git a/res/po/sr.po b/res/po/sr.po new file mode 100755 index 0000000..6324641 --- /dev/null +++ b/res/po/sr.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Nema aplikacija" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Men. zad." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Obriši sve" + diff --git a/res/po/sv.po b/res/po/sv.po new file mode 100755 index 0000000..9269f2c --- /dev/null +++ b/res/po/sv.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Inga program" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Uppg.hant" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Rensa allt" + diff --git a/res/po/ta.po b/res/po/ta.po new file mode 100755 index 0000000..3fa77fc --- /dev/null +++ b/res/po/ta.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "அனைத்தும் துடை" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "பயன்பாடுகள் ஏதுமில்லை" + diff --git a/res/po/taskmgr.pot b/res/po/taskmgr.pot new file mode 100644 index 0000000..54670e3 --- /dev/null +++ b/res/po/taskmgr.pot @@ -0,0 +1,58 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-11-23 18:20+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: _genlist.c:153 +#, c-format +msgid "IDS_TASKMGR_WARNNING_TERMINATE_ALL_TASKS" +msgstr "" + +#: _genlist.c:170 +#, c-format +msgid "IDS_TASKMGR_ASK_DELETE_ALL_HISTORY" +msgstr "" + +#: _genlist.c:186 +#, c-format +msgid "IDS_TASKMGR_ASK_TERMINATE_TASK" +msgstr "" + +#: _genlist.c:203 +#, c-format +msgid "IDS_TASKMGR_ASK_CLEAR_HISTORY" +msgstr "" + +#: _genlist.c:264 +msgid "IDS_TASKMGR_CANNOT_LAUNCH_APPLICATION" +msgstr "" + +#: _info.c:122 +msgid "IDS_TASKMGR_INFO_MESSAGE" +msgstr "" + +#: _logic.c:150 +msgid "IDS_TASKMGR_HEADER_TASK_SWITCHER" +msgstr "" + +#: _util_efl.c:181 +msgid "Warning!" +msgstr "" + +#: _util_efl.c:184 +msgid "IDS_COM_POP_CANCEL" +msgstr "" diff --git a/res/po/te.po b/res/po/te.po new file mode 100755 index 0000000..b71d74f --- /dev/null +++ b/res/po/te.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "అన్ని క్లియర్ చేయి" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "అప్లికేషన్‌లు లేవు" + diff --git a/res/po/th.po b/res/po/th.po new file mode 100755 index 0000000..16ec7cd --- /dev/null +++ b/res/po/th.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "ลบทั้ง​หมด" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "ไม่มีแอพพลิเคชั่น" + diff --git a/res/po/tl.po b/res/po/tl.po new file mode 100755 index 0000000..6ee739a --- /dev/null +++ b/res/po/tl.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "I-clear lahat" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Walang mga application" + diff --git a/res/po/tr_TR.po b/res/po/tr_TR.po new file mode 100755 index 0000000..a7297e1 --- /dev/null +++ b/res/po/tr_TR.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Uygulama yok" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Grv yntcs" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Tümünü sil" + diff --git a/res/po/uk.po b/res/po/uk.po new file mode 100755 index 0000000..7e8d9e3 --- /dev/null +++ b/res/po/uk.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Немає програм" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Дис.завд." + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Очистити все" + diff --git a/res/po/update-po.sh b/res/po/update-po.sh new file mode 100755 index 0000000..1869cbd --- /dev/null +++ b/res/po/update-po.sh @@ -0,0 +1,57 @@ +#!/bin/sh + +PACKAGE=taskmgr +SRCROOT=../src +POTFILES=POTFILES.in + +#ALL_LINGUAS= am az be ca cs da de el en_CA en_GB es et fi fr hr hu it ja ko lv mk ml ms nb ne nl pa pl pt pt_BR ru rw sk sl sr sr@Latn sv ta tr uk vi zh_CN zh_TW +ALL_LINGUAS="en_US en_GB ja ko zh_CN" + +XGETTEXT=/usr/bin/xgettext +MSGMERGE=/usr/bin/msgmerge + +echo -n "Make ${PACKAGE}.pot " +if [ ! -e $POTFILES ] ; then + echo "$POTFILES not found" + exit 1 +fi + +$XGETTEXT --default-domain=${PACKAGE} --directory=${SRCROOT} \ + --add-comments --keyword=_ --keyword=N_ --files-from=$POTFILES \ +&& test ! -f ${PACKAGE}.po \ + || (rm -f ${PACKAGE}.pot && mv ${PACKAGE}.po ${PACKAGE}.pot) + +if [ $? -ne 0 ]; then + echo "error" + exit 1 +else + echo "done" +fi + +for LANG in $ALL_LINGUAS; do + echo "$LANG : " + + if [ ! -e $LANG.po ] ; then + cp ${PACKAGE}.pot ${LANG}.po + echo "${LANG}.po created" + else + if $MSGMERGE ${LANG}.po ${PACKAGE}.pot -o ${LANG}.new.po ; then + if cmp ${LANG}.po ${LANG}.new.po > /dev/null 2>&1; then + rm -f ${LANG}.new.po + else + if mv -f ${LANG}.new.po ${LANG}.po; then + echo "" + else + echo "msgmerge for $LANG.po failed: cannot move $LANG.new.po to $LANG.po" 1>&2 + rm -f ${LANG}.new.po + exit 1 + fi + fi + else + echo "msgmerge for $LANG failed!" + rm -f ${LANG}.new.po + fi + fi + echo "" +done + diff --git a/res/po/ur.po b/res/po/ur.po new file mode 100755 index 0000000..259dd69 --- /dev/null +++ b/res/po/ur.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "سب صاف کریں" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "کوئی ایپلیکیشنز نہیں" + diff --git a/res/po/uz.po b/res/po/uz.po new file mode 100755 index 0000000..60438bd --- /dev/null +++ b/res/po/uz.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Ilovalar yo‘q" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "Vaz. mnjr" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Barini tozala" + diff --git a/res/po/vi.po b/res/po/vi.po new file mode 100755 index 0000000..ca4578b --- /dev/null +++ b/res/po/vi.po @@ -0,0 +1,6 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "Xóa tất cả" + +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "Không có ứng dụng" + diff --git a/res/po/zh_CN.po b/res/po/zh_CN.po new file mode 100755 index 0000000..369f1e0 --- /dev/null +++ b/res/po/zh_CN.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "无应用程序" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "任务管理器" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "全部清除" + diff --git a/res/po/zh_HK.po b/res/po/zh_HK.po new file mode 100755 index 0000000..3486f99 --- /dev/null +++ b/res/po/zh_HK.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "無應用程式" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "工作管理員" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "全部清除" + diff --git a/res/po/zh_SG.po b/res/po/zh_SG.po new file mode 100644 index 0000000..19088c5 --- /dev/null +++ b/res/po/zh_SG.po @@ -0,0 +1,36 @@ +msgid "IDS_TASKMGR_BUTTON_CLEAR_HISTORY_ABB" +msgstr "清除历史" + +msgid "IDS_TASKMGR_BUTTON_CLOSE_ALL_APPLICATIONS" +msgstr "关闭所有应用程序" + +msgid "IDS_TASKMGR_HEADER_RUNNING" +msgstr "正在运行" + +msgid "IDS_TASKMGR_MBODY_NO_APPS_OPEN" +msgstr "无开启应用程序" + +msgid "IDS_TASKMGR_MBODY_NO_RECENTLY_USED_APPS" +msgstr "无最近使用的应用程序" + +msgid "IDS_TASKMGR_MBODY_RECENTLY_USED" +msgstr "最近使用" + +msgid "IDS_TASKMGR_POP_CLEAR_ALL_APP_HISTORY_Q" +msgstr "是否清除所有应用程序历史?" + +msgid "IDS_TASKMGR_POP_CLEAR_PS_HISTORY_Q" +msgstr "是否清除 %s 历史?" + +msgid "IDS_TASKMGR_POP_CLOSE_ALL_APPS_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST" +msgstr "是否关闭所有应用程序?这可能导致数据丢失" + +msgid "IDS_TASKMGR_POP_CLOSE_PS_APP_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST" +msgstr "是否关闭 %s 应用程序?这可能导致数据丢失" + +msgid "IDS_TASKMGR_POP_UNABLE_TO_OPEN_APPLICATION" +msgstr "无法打开应用程序" + +msgid "IDS_TASKMGR_HEADER_TASK_SWITCHER" +msgstr "任务切换器" + diff --git a/res/po/zh_TW.po b/res/po/zh_TW.po new file mode 100755 index 0000000..3486f99 --- /dev/null +++ b/res/po/zh_TW.po @@ -0,0 +1,9 @@ +msgid "IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2" +msgstr "無應用程式" + +msgid "IDS_TASKMGR_BUTTON_TASK_MGR_ABB" +msgstr "工作管理員" + +msgid "IDS_TASKMGR_BUTTON_CLEAR_ALL" +msgstr "全部清除" + diff --git a/src/item.c b/src/item.c new file mode 100644 index 0000000..af78e57 --- /dev/null +++ b/src/item.c @@ -0,0 +1,698 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include +#include + +#include "conf.h" +#include "item.h" +#include "list.h" +#include "log.h" +#include "main.h" +#include "scroller.h" +#include "util.h" + +#define PRIVATE_DATA_KEY_CLEAR "p_clr" +#define PRIVATE_DATA_KEY_NEXT_ITEM "p_n_it" +#define PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING "p_in_mv" +#define PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING "p_an_mv" +#define PRIVATE_DATA_KEY_ITEM_X "p_it_x" +#define PRIVATE_DATA_KEY_ITEM_Y "p_it_y" +#define PRIVATE_DATA_KEY_ITEM_W "p_it_w" +#define PRIVATE_DATA_KEY_ITEM_H "p_it_h" +#define PRIVATE_DATA_KEY_DOWN_X "p_dw_x" +#define PRIVATE_DATA_KEY_DOWN_Y "p_dw_y" +#define PRIVATE_DATA_KEY_DOWN_TIME "p_dw_t" +#define PRIVATE_DATA_KEY_SCROLLED "p_sc" +#define PRIVATE_DATA_KEY_PRESSED "p_pre" +#define PRIVATE_DATA_KEY_ITEM_MOVED "p_it_mv" + +#define PRIVATE_MOVE_THRESHOLD 30 +#define PRIVATE_FLICK_TIME 100 +#define PRIVATE_ITEM_TERMINATE_THRESHOLD 2.0 +#define PRIVATE_ITEM_ALPHA 0.8 +#define PRIVATE_ITEM_ALPHA_MAX 100 + + + +extern list_type_default_s *item_get_info(Evas_Object *item) +{ + retv_if(!item, NULL); + list_type_default_s *info = NULL; + + info = evas_object_data_get(item, DATA_KEY_ITEM_INFO); + + return info; +} + + + +extern void item_clear_set_disable(Evas_Object *scroller) +{ + Evas_Object *clear_item = NULL; + ret_if(!scroller); + + clear_item = evas_object_data_get(scroller, PRIVATE_DATA_KEY_CLEAR); + ret_if(!clear_item); + elm_layout_signal_emit(main_get_info()->layout, "no,apps,txt,show", "no,apps,txt"); + elm_layout_signal_emit(clear_item, "no,apps", "clear"); + +} + + + +static void _clear_all_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) +{ + Evas_Object *scroller = data; + ret_if(!scroller); + _D("clear all item is clicked"); + scroller_pop_all_item(scroller, 1); +} + + + +extern Evas_Object *item_clear_all_create(Evas_Object *scroller) +{ + retv_if(!scroller, NULL); + + Evas_Object *clear_item = NULL; + + clear_item = elm_layout_add(scroller); + retv_if(!clear_item, NULL); + + if (!elm_layout_file_set(clear_item, ITEM_LAYOUT, "clear_item")) { + _E("Failed to set the layout"); + evas_object_del(clear_item); + return NULL; + } + + elm_object_part_text_set(clear_item, "name", _("IDS_TASKMGR_BUTTON_CLEAR_ALL")); + + elm_object_signal_callback_add(clear_item, "mouse,clicked,1", "event", _clear_all_clicked_cb, scroller); + evas_object_data_set(scroller, PRIVATE_DATA_KEY_CLEAR, clear_item); + + evas_object_size_hint_weight_set(clear_item, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_show(clear_item); + + return clear_item; + +} + + + +extern void item_clear_all_destroy(Evas_Object *scroller) +{ + ret_if(!scroller); + + Evas_Object *clear_item = NULL; + + clear_item = evas_object_data_del(scroller, PRIVATE_DATA_KEY_CLEAR); + if (clear_item) evas_object_del(clear_item); +} + + + +static Evas_Object *_content_set_item_inner(Evas_Object *item_outer) +{ + Evas_Object *box = NULL; + Evas_Object *item_inner = NULL; + Evas_Object *next_item = NULL; + + box = main_get_info()->box; + retv_if(!box, NULL); + + item_inner = evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING); + retv_if(!item_inner, NULL); + + next_item = evas_object_data_del(item_outer, PRIVATE_DATA_KEY_NEXT_ITEM); + + elm_box_unpack(box, item_outer); + elm_object_part_content_set(item_outer, "inner", item_inner); + + if (!next_item) { + elm_box_pack_end(box, item_outer); + } else { + elm_box_pack_before(box, item_outer, next_item); + } + return item_outer; +} + + + +static Evas_Object *_content_unset_item_inner(Evas_Object *item_outer) +{ + Evas_Object *box = NULL; + Evas_Object *item_inner = NULL; + Evas_Object *tmp_item = NULL; + Eina_List *list = NULL; + const Eina_List *l = NULL; + const Eina_List *ln = NULL; + + + box = main_get_info()->box; + retv_if(!box, NULL); + + item_inner = elm_object_part_content_unset(item_outer, "inner"); + retv_if(!item_inner, NULL); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING, item_inner); + + list = elm_box_children_get(box); + retv_if(!list, NULL); + + EINA_LIST_FOREACH_SAFE(list, l, ln, tmp_item) { + if (item_outer != tmp_item) continue; + Evas_Object *next_item = eina_list_data_get(ln); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_NEXT_ITEM, next_item); + break; + } + eina_list_free(list); + + return item_outer; +} + + + +#define ANIM_RATE 5 +#define ANIM_RATE_SPARE ANIM_RATE - 1 +static Eina_Bool _anim_move_item(void *data) +{ + Evas_Object *scroller = NULL; + Evas_Object *item_inner = NULL; + Evas_Object *item_outer = NULL; + + int cur_x, cur_y; + int end_x, end_y; + int end_pos, cur_pos; + int vec_pos; + + item_outer = data; + goto_if(!data, ERROR); + + scroller = main_get_info()->scroller; + goto_if(!scroller, ERROR); + + item_inner = evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING); + goto_if(!item_inner, ERROR); + + evas_object_geometry_get(item_inner, &cur_x, &cur_y, NULL, NULL); + evas_object_geometry_get(item_outer, &end_x, &end_y, NULL, NULL); + + end_pos = end_x; + vec_pos = (end_x - cur_x)/ANIM_RATE; + cur_x += vec_pos; + cur_pos = cur_x; + + if ((end_pos - cur_pos) < 0) { // Move : Right -> Left + evas_object_move(item_inner, cur_x, cur_y); + int alp = 255 - ((cur_pos - end_pos) * PRIVATE_ITEM_ALPHA) - 1; + if (alp < PRIVATE_ITEM_ALPHA_MAX) alp = PRIVATE_ITEM_ALPHA_MAX; + evas_object_color_set(item_inner, alp, alp, alp, alp); + + if (cur_pos - ANIM_RATE_SPARE <= end_pos) { + evas_object_move(item_inner, end_x, end_y); + goto_if (! _content_set_item_inner(item_outer), ERROR); + /* unfreeze the scroller after setting the content */ + scroller_unfreeze(scroller); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING); + return ECORE_CALLBACK_CANCEL; + } + } + else { // Move : Left -> Right + evas_object_move(item_inner, cur_x, cur_y); + int alp = 255 - ((end_pos - cur_pos) * PRIVATE_ITEM_ALPHA) - 1; + if (alp < PRIVATE_ITEM_ALPHA_MAX) alp = PRIVATE_ITEM_ALPHA_MAX; + evas_object_color_set(item_inner, alp, alp, alp, alp); + + if (cur_pos + ANIM_RATE_SPARE >= end_pos) { + evas_object_move(item_inner, end_x, end_y); + goto_if (NULL == _content_set_item_inner(item_outer), ERROR); + /* unfreeze the scroller after setting the content */ + scroller_unfreeze(scroller); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING); + return ECORE_CALLBACK_CANCEL; + } + } + return ECORE_CALLBACK_RENEW; + +ERROR: + if (item_outer) { + scroller_unfreeze(scroller); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING); + } + return ECORE_CALLBACK_CANCEL; +} + + + +#define SLIPPED_LENGTH 40 +static Eina_Bool _anim_slipped_item(void *data) +{ + Evas_Object *scroller = NULL; + Evas_Object *item_outer = data; + + int item_outer_w, item_outer_h; + + goto_if(!item_outer, ERROR); + + scroller = main_get_info()->scroller; + goto_if(!scroller, ERROR); + + item_outer_w = (int)evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_W); + item_outer_h = (int)evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_H); + + item_outer_h -= SLIPPED_LENGTH; + evas_object_size_hint_min_set(item_outer, ELM_SCALE_SIZE(item_outer_w), ELM_SCALE_SIZE(item_outer_h)); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_H, (void *)item_outer_h); + + if (item_outer_h <= 0) { + scroller_pop_item(scroller, item_outer, 1); + + if (scroller_count(scroller) < 2) { + item_clear_set_disable(scroller); + } + goto ERROR; + } + + return ECORE_CALLBACK_RENEW; + +ERROR: + if (item_outer) { + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_W); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_H); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING); + } + return ECORE_CALLBACK_CANCEL; +} + + + +#define TERMINATE_LENGTH 60 +static Eina_Bool _anim_terminate_item(void *data) +{ + Evas_Object *item_outer = data; + Evas_Object *item_inner = NULL; + + int item_x, item_y, item_w, item_h, is_boundary = 0; + int outer_x, outer_y; + + goto_if(!item_outer, ERROR); + + item_inner = evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING); + if(!item_inner) { + item_inner = elm_object_part_content_unset(item_outer, "inner"); + retv_if(!item_inner, ECORE_CALLBACK_CANCEL); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING, item_inner); + } + + evas_object_geometry_get(item_inner, &item_x, &item_y, &item_w, &item_h); + evas_object_geometry_get(item_outer, &outer_x, &outer_y, NULL, NULL); + + if (item_x >= outer_x) { + item_x += TERMINATE_LENGTH; + } else { + item_x -= TERMINATE_LENGTH; + } + + if (item_x >= main_get_info()->root_w || (item_x + item_w) <= 0) { + is_boundary = 1; + } + + evas_object_move(item_inner, item_x, item_y); + + if (is_boundary) { + Evas_Object *scroller = NULL; + Ecore_Animator *anim = NULL; + + scroller = main_get_info()->scroller; + goto_if(!scroller, ERROR); + + /* unfreeze the scroller after setting the content */ + scroller_unfreeze(scroller); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING); + evas_object_color_set(item_inner, 255, 255, 255, 0); + elm_object_part_content_set(item_outer, "inner", item_inner); + + anim = evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING); + if (anim) { + ecore_animator_del(anim); + anim = NULL; + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING); + } + anim = ecore_animator_add(_anim_slipped_item, item_outer); + goto_if(!anim, ERROR); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING, anim); + return ECORE_CALLBACK_CANCEL; + } + return ECORE_CALLBACK_RENEW; + +ERROR: + if (item_outer) { + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING); + } + return ECORE_CALLBACK_CANCEL; +} + + + +static void _down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Down *ei = event_info; + Evas_Object *item_outer = data; + Evas_Object *item_inner = NULL; + + int x = ei->output.x; + int y = ei->output.y; + int down_time = ei->timestamp; + int rect_x, rect_y, rect_w, rect_h; + + ret_if(!item_outer); + + _D("Down (%d, %d)", x, y); + + item_inner = elm_object_part_content_get(item_outer, "inner"); + if (!item_inner) { + item_inner = evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING); + ret_if(!item_inner); + elm_object_part_content_set(item_outer, "inner", item_inner); + } + + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_PRESSED, (void *) 1); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_DOWN_X, (void *) x); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_DOWN_Y, (void *) y); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_DOWN_TIME, (void *)down_time); + + evas_object_geometry_get(item_outer, &rect_x, &rect_y, &rect_w, &rect_h); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_X, (void *) rect_x); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_Y, (void *) rect_y); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_W, (void *) rect_w); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_H, (void *) rect_h); +} + + + +#define LAUNCHING_LENGTH 60 +#define SCROLLER_THRESHOLD 15 +static void _move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Move *ei = event_info; + Evas_Object *item_outer = data; + + Evas_Object *layout = NULL; + Evas_Object *item_inner = NULL; + Evas_Object *scroller = NULL; + Ecore_Animator *anim = NULL; + + int down_x, down_y; + int outer_x, outer_y; + int cur_x, cur_y, vec_x, vec_y; + int alpha = 0; + + if (!item_outer) return; + if (!evas_object_data_get(item_outer, PRIVATE_DATA_KEY_PRESSED)) return; + + scroller = main_get_info()->scroller; + ret_if(!scroller); + if (scroller_is_scrolling(scroller)) { + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_SCROLLED, (void *)1); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_PRESSED); + + return; + } + + layout = main_get_info()->layout; + ret_if(!layout); + + anim = evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING); + if (anim) return; + + down_x = (int) evas_object_data_get(item_outer, PRIVATE_DATA_KEY_DOWN_X); + down_y = (int) evas_object_data_get(item_outer, PRIVATE_DATA_KEY_DOWN_Y); + + outer_x = (int)evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_X); + outer_y = (int)evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_Y); + + cur_x = ei->cur.output.x; + cur_y = ei->cur.output.y; + + vec_x = cur_x - down_x; + vec_y = cur_y - down_y; + + outer_x += vec_x; + + if (!evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_MOVED)) { + if (abs(vec_y) > abs(vec_x) + SCROLLER_THRESHOLD) { + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_SCROLLED, (void *)1); + return; + } + if (abs(vec_x) <= PRIVATE_MOVE_THRESHOLD) return; + if (abs(vec_y) >= SCROLLER_THRESHOLD) return; + } + + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_MOVED, (void *) 1); + item_inner = evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING); + if (!item_inner) { + /* freeze the scroller before unsetting the content */ + scroller_freeze(scroller); + ret_if(!_content_unset_item_inner(item_outer)); + } + + alpha = 255 -(abs(vec_x) * PRIVATE_ITEM_ALPHA); + if (alpha < PRIVATE_ITEM_ALPHA_MAX) { + alpha = PRIVATE_ITEM_ALPHA_MAX; + } + + evas_object_color_set(item_inner, alpha, alpha, alpha, alpha); + evas_object_move(item_inner, outer_x, outer_y); +} + + + +static void _item_terminate_anim(Evas_Object *item_outer) +{ + Ecore_Animator *anim = NULL; + + anim = evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING); + if (anim) { + ecore_animator_del(anim); + anim = NULL; + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING); + } + + anim = ecore_animator_add(_anim_terminate_item, item_outer); + ret_if(!anim); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING, anim); +} + + + +static void _up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Up *ei = event_info; + Evas_Object *item_outer = data; + + Evas_Object *scroller = NULL; + + int x = ei->output.x; + int y = ei->output.y; + int up_time = ei->timestamp; + int down_time = 0; + int init_pos, item_pos, item_size, tm_threshold; + + _D("Up (%d, %d)", x, y); + + ret_if (!item_outer); + + scroller = main_get_info()->scroller; + ret_if(!scroller); + + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_PRESSED); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_DOWN_Y); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_DOWN_X); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_MOVED); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_SCROLLED); + + down_time = (int) evas_object_data_del(item_outer, PRIVATE_DATA_KEY_DOWN_TIME); + + /* This means the inner item has not been moved */ + Evas_Object *item_inner = evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING); + if (!item_inner) return; + + init_pos = (int) evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_X); + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_Y); + evas_object_geometry_get(item_inner, &item_pos, NULL, &item_size, NULL); + tm_threshold = item_size * PRIVATE_ITEM_TERMINATE_THRESHOLD; + + if (abs(item_pos - init_pos) > tm_threshold || (up_time - down_time < PRIVATE_FLICK_TIME && abs(item_pos - init_pos) > 0)) { + _item_terminate_anim(item_outer); + + } else if (item_pos != init_pos) { + Ecore_Animator *anim = NULL; + anim = evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING); + if (anim) { + ecore_animator_del(anim); + anim = NULL; + evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING); + } + + anim = ecore_animator_add(_anim_move_item, item_outer); + ret_if(NULL == anim); + evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_ANIM_FOR_MOVING, anim); + } +} + + + +static void _clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) +{ + _D("Clicked"); + + ret_if(!data); + Evas_Object *item = data; + Evas_Object *item_inner = NULL; + + const char *appid = NULL; + + list_type_default_s *info = NULL; + + item_inner = elm_object_part_content_get(item, "inner"); + if (!item_inner) return; + + info = item_get_info(item); + ret_if(!info); + + appid = info->appid; + ret_if(!appid); + + elm_object_signal_emit(item_inner, "clicked", "event"); + + util_launch_app(appid); + //layout_hide_with_timer(); +} + + + +extern Evas_Object *item_create(Evas_Object *scroller, list_type_default_s *info) +{ + retv_if(NULL == scroller, NULL); + retv_if(NULL == info, NULL); + + Evas_Object *icon = NULL; + Evas_Object *item = NULL; + Evas_Object *item_inner = NULL; + + item = elm_layout_add(scroller); + retv_if(NULL == item, NULL); + elm_layout_file_set(item, ITEM_LAYOUT, "item"); + evas_object_size_hint_weight_set(item, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_show(item); + + item_inner = elm_layout_add(scroller); + goto_if(NULL == item_inner, ERROR); + elm_layout_file_set(item_inner, ITEM_LAYOUT, "item_inner"); + evas_object_size_hint_weight_set(item_inner, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_show(item_inner); + elm_object_part_content_set(item, "inner", item_inner); + evas_object_event_callback_add(item_inner, EVAS_CALLBACK_MOUSE_DOWN, _down_cb, item); + evas_object_event_callback_add(item_inner, EVAS_CALLBACK_MOUSE_MOVE, _move_cb, item); + evas_object_event_callback_add(item_inner, EVAS_CALLBACK_MOUSE_UP, _up_cb, item); + + icon = evas_object_image_add(main_get_info()->e); + goto_if(NULL == icon, ERROR); + evas_object_image_file_set(icon, info->icon, NULL); + evas_object_image_filled_set(icon, EINA_TRUE); + evas_object_show(icon); + elm_object_part_content_set(item_inner, "icon", icon); + elm_object_part_text_set(item_inner, "name", info->name); + + elm_object_signal_callback_add(item_inner, "mouse,clicked,1", "event", _clicked_cb, item); + + evas_object_data_set(item, DATA_KEY_ITEM_INFO, info); + + return item; + +ERROR: + item_destroy(item); + return NULL; +} + + + +extern void item_destroy(Evas_Object *item) +{ + ret_if(!item); + + Evas_Object *icon = NULL; + Evas_Object *item_inner = NULL; + + item_inner = elm_object_part_content_unset(item, "inner"); + if (!item_inner) { + _E("cannot get the object"); + evas_object_del(item); + return; + } + + icon = elm_object_part_content_unset(item_inner, "icon"); + if (icon) { + evas_object_del(icon); + } else { + _E("cannot get the object"); + } + + evas_object_data_del(item, DATA_KEY_ITEM_INFO); + + evas_object_del(item_inner); + evas_object_del(item); +} + + + +extern void item_terminate(Evas_Object *item) +{ + char *appid = NULL; + int ret; + bool running = false; + + ret_if(!item); + ret_if(!item_get_info(item)); + appid = item_get_info(item)->appid; + ret_if(!appid); + + ret = app_manager_is_running(appid, &running); + ret_if(APP_MANAGER_ERROR_NONE != ret); + + _D("Terminate: %s(%d)", appid, running); + if (running) { + util_kill_app(appid); + } + + if (0 != rua_delete_history_with_pkgname(appid)) { + _E("Cannot delete history for package(%s)", appid); + } +} + + + +//End of a file diff --git a/src/list.c b/src/list.c new file mode 100644 index 0000000..43bc501 --- /dev/null +++ b/src/list.c @@ -0,0 +1,375 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include + +#include "list.h" +#include "log.h" +#include "main.h" +#include "util.h" + +typedef struct pkginfo { + char *appid; + bool taskmanage; + char *pkgid; + char *icon; + char *name; + bool nodisplay; +} private_pkginfo_s; + +typedef struct { + char *appid; + int pid; +} private_pid_s; + +static struct { + Eina_Hash *pkginfo_table; +} private_table_s = { + .pkginfo_table = NULL, +}; + + + +static void _pkglist_unretrieve_item(list_type_default_s *default_info) +{ + if (!default_info) { + return; + } + + if (default_info->name) { + free(default_info->name); + default_info->name = NULL; + } + if (default_info->icon) { + free(default_info->icon); + default_info->icon = NULL; + } + if (default_info->pkgid) { + free(default_info->pkgid); + default_info->pkgid = NULL; + } + if (default_info->arg) { + free(default_info->arg); + default_info->arg = NULL; + } + if (default_info->appid) { + free(default_info->appid); + default_info->appid = NULL; + } + if (default_info) { + free(default_info); + default_info = NULL; + } +} + + + +static list_type_default_s *_pkglist_retrieve_item(const char *appid, const char *arg, time_t launch_time) +{ + retv_if(!appid, NULL); + + private_pkginfo_s *pkg_info = NULL; + list_type_default_s *default_info = NULL; + + pkg_info = eina_hash_find(private_table_s.pkginfo_table, appid); + if (!pkg_info) { + _D("app(%s) is not taskmanage app", appid); + return NULL; + } + + if (!pkg_info->taskmanage) { + _D("app(%s) is not taskmanage app", appid); + return NULL; + } + + default_info = calloc(1, sizeof(*default_info)); + retv_if(!default_info, NULL); + + default_info->taskmanage = pkg_info->taskmanage; + default_info->launch_time = launch_time; + default_info->nodisplay = pkg_info->nodisplay; + + default_info->appid = strdup(appid); + goto_if(!default_info->appid, ERROR); + + if (arg) { + default_info->arg = strdup(arg); + goto_if(!default_info->arg, ERROR); + } + + if (pkg_info->pkgid) { + default_info->pkgid = strdup(pkg_info->pkgid); + goto_if(!default_info->pkgid, ERROR); + } else { + _E("Fail to get pkgid from pkg info table"); + goto ERROR; + } + + if (pkg_info->icon) { + default_info->icon = strdup(pkg_info->icon); + goto_if(!default_info->icon, ERROR); + } else { + _E("Fail to get icon from pkg info table"); + goto ERROR; + } + + if (pkg_info->name) { + default_info->name = strdup(pkg_info->name); + goto_if(!default_info->name, ERROR); + } else { + _E("Fail to get name from pkg info table"); + goto ERROR; + } + + _D("list add id : [%s], icon : [%s], name : [%s]", pkg_info->pkgid, pkg_info->icon, pkg_info->name); + + return default_info; + +ERROR: + + _pkglist_unretrieve_item(default_info); + return NULL; +} + + + +int _get_pkginfo_cb(pkgmgrinfo_appinfo_h app_handle, void *user_data) +{ + char *appid = NULL; + char *pkgid = NULL; + char *name = NULL; + char *icon = NULL; + private_pkginfo_s *pkg_info = NULL; + + pkg_info = calloc(1, sizeof(*pkg_info)); + retv_if(!pkg_info, PMINFO_R_ERROR); + + memset(pkg_info, 0, sizeof(private_pkginfo_s)); + + pkgmgrinfo_appinfo_get_appid(app_handle, &appid); + goto_if(!appid, ERROR); + + pkg_info->appid = strdup(appid); + goto_if(!pkg_info->appid, ERROR); + + if (PMINFO_R_OK != pkgmgrinfo_appinfo_is_taskmanage(app_handle, &pkg_info->taskmanage)) { + goto ERROR; + } + + if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_pkgid(app_handle, &pkgid)) { + goto ERROR; + } + pkg_info->pkgid = strdup(pkgid); + goto_if(!pkg_info->pkgid, ERROR); + + if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_icon(app_handle, &icon)) { + goto ERROR; + } + if (icon) { + pkg_info->icon= strdup(icon); + goto_if(!pkg_info->icon, ERROR); + } + + if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_label(app_handle, &name)) { + goto ERROR; + } + if (name) { + pkg_info->name= strdup(name); + goto_if(!pkg_info->name, ERROR); + } + + if (PMINFO_R_OK != pkgmgrinfo_appinfo_is_nodisplay(app_handle, &pkg_info->nodisplay)) { + goto ERROR; + } + + eina_hash_add(private_table_s.pkginfo_table, pkg_info->appid, pkg_info); + + return PMINFO_R_OK; + +ERROR: + if (pkg_info->name) free(pkg_info->name); + if (pkg_info->icon) free(pkg_info->icon); + if (pkg_info->pkgid) free(pkg_info->pkgid); + if (pkg_info->appid) free(pkg_info->appid); + free(pkg_info); + + return PMINFO_R_ERROR; +} + + + +static task_mgr_error_e _create_pkginfo_table(void) +{ + _D(""); + pkgmgrinfo_appinfo_filter_h handle; + + int ret = 0; + + private_table_s.pkginfo_table = eina_hash_string_superfast_new(NULL); + + ret = pkgmgrinfo_appinfo_filter_create(&handle); + if (PMINFO_R_OK != ret) { + return TASK_MGR_ERROR_FAIL; + } + + ret = pkgmgrinfo_appinfo_filter_add_bool(handle, PMINFO_APPINFO_PROP_APP_TASKMANAGE, 1); + if (PMINFO_R_OK != ret) { + pkgmgrinfo_appinfo_filter_destroy(handle); + return TASK_MGR_ERROR_FAIL; + } + + ret = pkgmgrinfo_appinfo_filter_foreach_appinfo(handle, _get_pkginfo_cb, NULL); + if (ret != PMINFO_R_OK) { + pkgmgrinfo_appinfo_filter_destroy(handle); + return TASK_MGR_ERROR_FAIL; + } + + pkgmgrinfo_appinfo_filter_destroy(handle); + + return TASK_MGR_ERROR_NONE; +} + + + +static Eina_Bool _remove_pkginfo(const Eina_Hash *hash, const void *key, void *data, void *fdata) +{ + retv_if(!data, EINA_FALSE); + + private_pkginfo_s *pkg_info = data; + + if (pkg_info->name) free(pkg_info->name); + if (pkg_info->icon) free(pkg_info->icon); + if (pkg_info->pkgid) free(pkg_info->pkgid); + if (pkg_info->appid) free(pkg_info->appid); + + return EINA_TRUE; +} + + + +static void _destroy_pkginfo_table(void) +{ + _D(""); + + eina_hash_foreach(private_table_s.pkginfo_table, _remove_pkginfo, NULL); + eina_hash_free(private_table_s.pkginfo_table); + private_table_s.pkginfo_table = NULL; +} + + + +static int _launch_time_sort_cb(const void *d1, const void *d2) +{ + list_type_default_s *tmp1 = (list_type_default_s *) d1; + list_type_default_s *tmp2 = (list_type_default_s *) d2; + + if (!tmp1) return -1; + if (!tmp2) return 1; + + if (!tmp1->appid) return 1; + else if (!tmp2->appid) return -1; + + return tmp1->launch_time >= tmp2->launch_time ? -1 : 1; +} + + + +extern task_mgr_error_e list_sort(Eina_List *list, int (*_sort_cb)(const void *d1, const void *d2)) +{ + retv_if(!list, TASK_MGR_ERROR_INVALID_PARAMETER); + + list = eina_list_sort(list, eina_list_count(list), _sort_cb); + retv_if(!list, TASK_MGR_ERROR_FAIL); + + return TASK_MGR_ERROR_NONE; +} + + + +extern task_mgr_error_e list_create(Eina_List **pkg_list) +{ + _D(""); + + rua_init(); + char **table = NULL; + list_type_default_s *default_info = NULL; + + int nrows = 0, ncols = 0; + int row = 0; + + retv_if (TASK_MGR_ERROR_NONE != _create_pkginfo_table(), TASK_MGR_ERROR_FAIL); + + if (-1 == rua_history_load_db(&table, &nrows, &ncols)) { + if (table) { + rua_history_unload_db(&table); + } + return TASK_MGR_ERROR_FAIL; + } + + _D("Apps in rua history is %d", nrows); + + for (; row < nrows; row++) { + struct rua_rec rec_result = {0, }; + rua_history_get_rec(&rec_result, table, nrows, ncols, row); + default_info = _pkglist_retrieve_item(rec_result.pkg_name, rec_result.arg, rec_result.launch_time); + if (default_info) { + *pkg_list = eina_list_append(*pkg_list, default_info); + } + } + + if (*pkg_list && TASK_MGR_ERROR_NONE != list_sort(*pkg_list, _launch_time_sort_cb)) { + _E("Cannot sort pkg_list"); + } + + if (!eina_list_count(*pkg_list)) { + _D("list is empty."); + _pkglist_unretrieve_item(default_info); + return TASK_MGR_ERROR_NO_DATA; + + } + + return TASK_MGR_ERROR_NONE; +} + + + +extern void list_destroy(Eina_List *pkg_list) +{ + _D(""); + list_type_default_s *default_info = NULL; + + _destroy_pkginfo_table(); + + if (!pkg_list) { + _D("pkg_list is null"); + return; + } + + EINA_LIST_FREE(pkg_list, default_info) { + if (!default_info) { + continue; + } + _pkglist_unretrieve_item(default_info); + } + + pkg_list = NULL; + rua_fini(); +} diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..7d4eb11 --- /dev/null +++ b/src/main.c @@ -0,0 +1,309 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include +#include +#include + +#include "conf.h" +#include "item.h" +#include "list.h" +#include "log.h" +#include "main.h" +#include "scroller.h" +#include "util.h" + +#define KEY_BACK "XF86Back" +#define PRIVATE_DATA_KEY_LIST_TIMER "pri_list_tm" + +static main_s main_info = { + .e = NULL, + .win = NULL, + .layout = NULL, + .scroller = NULL, + .box = NULL, + .pkg_list = NULL, + + .root_w = 0, + .root_h = 0, +}; +//main_h main_info_h = &main_info; + + + +extern main_h main_get_info(void) +{ + return &main_info; +} + + + +static Eina_Bool _back_key_pressed(void *data, Evas_Object *obj, Evas_Object *src, Evas_Callback_Type type, void *event_info) +{ + _D(""); + Evas_Event_Key_Down *ev = event_info; + + if (type == EVAS_CALLBACK_KEY_DOWN && strncmp(KEY_BACK, ev->key, strlen(KEY_BACK)) == 0) { + _D("KEY PRESSED: %s", ev->key); + + elm_exit(); + return EINA_TRUE; + } else { + return EINA_FALSE; + } +} + + + +static task_mgr_error_e _create_layout(Evas_Object *parent) +{ + _D(""); + Evas_Object *layout = NULL; + Evas_Object *rect = NULL; + Eina_Bool ret = EINA_FALSE; + + // create bg + main_info.bg = elm_bg_add(main_info.win); + if (!main_info.bg) { + _E("cannot create bg"); + evas_object_del(main_info.win); + } + + elm_win_resize_object_add(main_info.win, main_info.bg); + evas_object_color_set(main_info.bg, 0, 0, 0, BG_COLOR); + evas_object_show(main_info.bg); + + // create layout + layout = elm_layout_add(parent); + goto_if (!layout, ERROR); + + ret = elm_layout_file_set(layout, LAYOUT, "layout"); + goto_if(EINA_FALSE == ret, ERROR); + + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_move(layout, 0, 0); + evas_object_resize(layout, main_info.root_w, main_info.root_h); + evas_object_show(layout); + + main_info.layout = layout; + + // create layout bg + rect = evas_object_rectangle_add(evas_object_evas_get(layout)); + evas_object_size_hint_min_set(rect, main_info.root_w, main_info.root_h); + evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_resize(rect, main_info.root_w, main_info.root_h); + evas_object_color_set(rect, 0, 0, 0, 0); + evas_object_show(rect); + elm_object_part_content_set(layout, BG_PART_NAME, rect); + + // create scroller + main_info.scroller = scroller_create(layout); + goto_if(!main_info.scroller, ERROR); + + return TASK_MGR_ERROR_NONE; + +ERROR: + if (layout) evas_object_del(layout); + if (main_info.bg) evas_object_del(main_info.bg); + evas_object_del(main_info.win); + return TASK_MGR_ERROR_FAIL; +} + + + +static void _destroy_layout(void) +{ + Evas_Object *rect = NULL; + + if (main_info.layout) { + rect = elm_object_part_content_unset(main_info.layout, BG_PART_NAME); + if (rect) { + evas_object_del(rect); + } + evas_object_del(main_info.layout); + main_info.layout = NULL; + } +} + + + +static Eina_Bool _list_timer_cb(void *data) +{ + _D(""); + Evas_Object *clear_item = NULL; + task_mgr_error_e ret = TASK_MGR_ERROR_NONE; + + if (main_info.pkg_list) { + _D("Already loaded"); + goto END; + } + + clear_item = item_clear_all_create(main_info.scroller); + if (!clear_item) { + _E("Fail to create clear all button"); + return ECORE_CALLBACK_CANCEL; + } + scroller_push_item(main_info.scroller, clear_item); + + ret = list_create(&main_info.pkg_list); + elm_object_part_text_set(main_info.layout, "no,apps,txt", _("IDS_TASKMGR_NPBODY_NO_APPLICATIONS_ABB2")); + if (TASK_MGR_ERROR_NO_DATA == ret) { + _D("There is no application"); + item_clear_set_disable(main_info.scroller); + } else if (TASK_MGR_ERROR_NONE != ret) { + _E("Fail to create pkglist"); + goto END; + } + + goto_if(TASK_MGR_ERROR_NONE != scroller_push_all_item(main_info.scroller, main_info.pkg_list), END); + +END: + evas_object_data_del(main_info.win, PRIVATE_DATA_KEY_LIST_TIMER); + return ECORE_CALLBACK_CANCEL; +} + + + +static bool _create_cb(void *data) +{ + _D(""); + + Ecore_Timer *timer = NULL; + + main_info.win = elm_win_add(NULL, "Task-mgr", ELM_WIN_BASIC); + retv_if(!main_info.win, false); + + elm_app_base_scale_set(2.6); + elm_win_screen_size_get(main_info.win, NULL, NULL, &main_info.root_w, &main_info.root_h); + _D("screen size is (%d, %d)", main_info.root_w, main_info.root_h); + + elm_object_event_callback_add(main_info.win, _back_key_pressed, NULL); + + elm_win_indicator_mode_set(main_info.win, ELM_WIN_INDICATOR_SHOW); + elm_win_indicator_opacity_set(main_info.win, ELM_WIN_INDICATOR_TRANSPARENT); + + elm_win_borderless_set(main_info.win, EINA_TRUE); + elm_win_alpha_set(main_info.win, EINA_TRUE); + evas_object_show(main_info.win); + + main_info.e = evas_object_evas_get(main_info.win); + + if (_create_layout(main_info.win) != TASK_MGR_ERROR_NONE) { + _E("Failed to create a layout"); + return false; + } + + //create the list + timer = evas_object_data_get(main_info.win, PRIVATE_DATA_KEY_LIST_TIMER); + if (timer) { + ecore_timer_del(timer); + } + + timer = ecore_timer_add(0.001f, _list_timer_cb, NULL); + if (timer) { + evas_object_data_set(main_info.win, PRIVATE_DATA_KEY_LIST_TIMER, timer); + } else { + _E("Cannot add a create list timer"); + } + + return true; +} + + + +static void _terminate_cb(void *data) +{ + _D(""); + + /* list destroy */ + list_destroy(main_info.pkg_list); + evas_object_data_del(main_info.win, PRIVATE_DATA_KEY_LIST_TIMER); + + elm_cache_all_flush(); + malloc_trim(0); + appcore_flush_memory(); + + scroller_destroy(main_info.scroller); + _destroy_layout(); + + /** + * Even though the window is deleted automatically, + * It is good habit to delete window explicitly by your hands. + */ + + if (main_info.win) { + evas_object_del(main_info.win); + main_info.win = NULL; + } +} + + + +static void _app_control(app_control_h service, void *data) +{ + _D(""); + + return; +} + + + +static void _pause_cb(void *data) +{ + _D(""); + + elm_exit(); + return; +} + + + +static void _language_changed(app_event_info_h event_info, void *data) +{ + _D(""); +} + + + +int main(int argc, char **argv) +{ + int ret; + ui_app_lifecycle_callback_s lifecycle_callback = {0, }; + app_event_handler_h event_handlers[5] = {NULL, }; + + lifecycle_callback.create = _create_cb; + lifecycle_callback.terminate = _terminate_cb; + lifecycle_callback.pause = _pause_cb; + lifecycle_callback.resume = NULL; + lifecycle_callback.app_control = _app_control; + + ui_app_add_event_handler(&event_handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, NULL, NULL); + ui_app_add_event_handler(&event_handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, NULL, NULL); + ui_app_add_event_handler(&event_handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, NULL, NULL); + ui_app_add_event_handler(&event_handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, _language_changed, NULL); + ui_app_add_event_handler(&event_handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, NULL, NULL); + + ret = ui_app_main(argc, argv, &lifecycle_callback, &main_info); + + return ret; +} + +/* End of a file */ diff --git a/src/scroller.c b/src/scroller.c new file mode 100644 index 0000000..1b0cb00 --- /dev/null +++ b/src/scroller.c @@ -0,0 +1,500 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + + #include + + #include "conf.h" + #include "item.h" + #include "list.h" + #include "log.h" + #include "main.h" + #include "scroller.h" + #include "util.h" + +#define PRIVATE_DATA_KEY_DRAG "pri_drag" +#define PRIVATE_DATA_KEY_MOUSE_DOWN "pri_m_dw" +#define PRIVATE_DATA_KEY_POP_ALL_TIMER "pri_pop_tm" +#define PRIVATE_DATA_KEY_REVERSE_LIST "pri_re_li" +#define PRIVATE_DATA_KEY_TERMINATE "pri_tm" + + + +extern task_mgr_error_e scroller_push_item(Evas_Object *scroller, Evas_Object *item) +{ + _D(""); + retv_if(!scroller, TASK_MGR_ERROR_INVALID_PARAMETER); + retv_if(!item, TASK_MGR_ERROR_INVALID_PARAMETER); + + Evas_Object *box_layout = NULL; + Evas_Object *box = NULL; + Eina_List *list = NULL; + + box_layout = elm_object_content_get(scroller); + retv_if(!box_layout, TASK_MGR_ERROR_FAIL); + + list = elm_box_children_get(box_layout); + retv_if(!list, TASK_MGR_ERROR_FAIL); + + box = eina_list_nth(list, 0); + retv_if(!box, TASK_MGR_ERROR_FAIL); + + eina_list_free(list); + + elm_box_pack_end(box, item); + + return TASK_MGR_ERROR_NONE; +} + + + +extern void scroller_pop_item(Evas_Object *scroller, Evas_Object *item, int terminate) +{ + ret_if(!scroller); + ret_if(!item); + + Evas_Object *box_layout = NULL; + Evas_Object *box = NULL; + Evas_Object *tmp_item = NULL; + + Eina_List *box_list = NULL; + Eina_List *list = NULL; + const Eina_List *l = NULL; + const Eina_List *ln = NULL; + + box_layout = elm_object_content_get(scroller); + ret_if(!box_layout); + + box_list = elm_box_children_get(box_layout); + ret_if(!box_list); + + box = eina_list_nth(box_list, 0); + ret_if(!box); + + eina_list_free(box_list); + + list = elm_box_children_get(box); + ret_if(!list); + + EINA_LIST_FOREACH_SAFE(list, l, ln, tmp_item) { + if (item != tmp_item) continue; + if (terminate) item_terminate(item); + + elm_box_unpack(box, item); + item_destroy(item); + break; + } + eina_list_free(list); +} + + + +extern task_mgr_error_e scroller_push_all_item(Evas_Object *scroller, Eina_List *list) +{ + const Eina_List *l = NULL; + const Eina_List *ln = NULL; + list_type_default_s *info = NULL; + Evas_Object *item = NULL; + + if (!list) { + _D("No app in the history list"); + return TASK_MGR_ERROR_NONE; + } + + EINA_LIST_FOREACH_SAFE(list, l, ln, info) { + if (!info) continue; + item = item_create(scroller, info); + continue_if(!item); + scroller_push_item(scroller, item); + } + + return TASK_MGR_ERROR_NONE; +} + + + +static Eina_Bool _pop_all_item_cb(void *data) +{ + Evas_Object *scroller = data; + Evas_Object *item = NULL; + Eina_List *list = NULL; + static int i = 0; + int count = 0; + int terminate = (int) evas_object_data_get(scroller, PRIVATE_DATA_KEY_TERMINATE); + + list = evas_object_data_get(scroller, PRIVATE_DATA_KEY_REVERSE_LIST); + goto_if(!list, END); + + count = eina_list_count(list); + _D("remove list count(include clear button) : %d", count); + if (i >= count-1) goto END; + + item = eina_list_nth(list, i); + i++; + goto_if(!item, END); + + scroller_pop_item(scroller, item, terminate); + return ECORE_CALLBACK_RENEW; + +END: + i = 0; + eina_list_free(list); + evas_object_data_del(scroller, PRIVATE_DATA_KEY_REVERSE_LIST); + evas_object_data_del(scroller, PRIVATE_DATA_KEY_TERMINATE); + evas_object_data_del(scroller, PRIVATE_DATA_KEY_POP_ALL_TIMER); + item_clear_set_disable(scroller); + + return ECORE_CALLBACK_CANCEL; +} + + + +extern void scroller_pop_all_item(Evas_Object *scroller, int terminate) +{ + Evas_Object *box_layout = NULL; + Evas_Object *box = NULL; + Eina_List *box_list = NULL; + Eina_List *list = NULL; + Eina_List *reverse_list = NULL; + Ecore_Timer *timer = NULL; + + ret_if(!scroller); + + timer = evas_object_data_del(scroller, PRIVATE_DATA_KEY_POP_ALL_TIMER); + if (timer) { + _D("There is already a timer for popping all items."); + ecore_timer_del(timer); + } + + /* An user tap the end all button, all items have to be terminated even if paused. */ + if (!evas_object_data_get(scroller, PRIVATE_DATA_KEY_TERMINATE)) { + evas_object_data_set(scroller, PRIVATE_DATA_KEY_TERMINATE, (void *) terminate); + } + + box_layout = elm_object_content_get(scroller); + ret_if(!box_layout); + + box_list = elm_box_children_get(box_layout); + ret_if(!box_list); + + box = eina_list_nth(box_list, 0); + ret_if(!box); + + eina_list_free(box_list); + + list = elm_box_children_get(box); + if (!list) return; + + /* This reverse list should be freed in the timer */ + reverse_list = eina_list_reverse_clone(list); + eina_list_free(list); + ret_if(!reverse_list); + evas_object_data_set(scroller, PRIVATE_DATA_KEY_REVERSE_LIST, reverse_list); + + timer = ecore_timer_add(0.01f, _pop_all_item_cb, scroller); + if (!timer) { + _E("Cannot add a timer"); + evas_object_data_del(scroller, PRIVATE_DATA_KEY_REVERSE_LIST); + evas_object_data_del(scroller, PRIVATE_DATA_KEY_TERMINATE); + eina_list_free(reverse_list); + return; + } + + evas_object_data_set(scroller, PRIVATE_DATA_KEY_POP_ALL_TIMER, timer); +} + + + +extern int scroller_count(Evas_Object *scroller) +{ + Evas_Object *box_layout = NULL; + Evas_Object *box = NULL; + Eina_List *box_list = NULL; + Eina_List *list = NULL; + + retv_if(!scroller, 0); + + box_layout = elm_object_content_get(scroller); + retv_if(!box_layout, 0); + + box_list = elm_box_children_get(box_layout); + retv_if(!box_list, 0); + + box = eina_list_nth(box_list, 0); + retv_if(!box, 0); + + eina_list_free(box_list); + + list = elm_box_children_get(box); + if (!list) { + _D("list is null"); + return 0; + } + + return eina_list_count(list); +} + + + +extern Eina_Bool scroller_is_scrolling(Evas_Object *scroller) +{ + return evas_object_data_get(scroller, DATA_KEY_IS_SCROLLING)? EINA_TRUE:EINA_FALSE; +} + + + +extern void scroller_freeze(Evas_Object *scroller) +{ + Evas_Object *box_layout = NULL; + Evas_Object *box = NULL; + Eina_List *list = NULL; + + ret_if(!scroller); + + box_layout = elm_object_content_get(scroller); + ret_if(!box_layout); + + list = elm_box_children_get(box_layout); + ret_if(!list); + + box = eina_list_nth(list, 0); + ret_if(!box); + + eina_list_free(list); + + elm_object_scroll_freeze_push(box); +} + + + +extern void scroller_unfreeze(Evas_Object *scroller) +{ + Evas_Object *box_layout = NULL; + Evas_Object *box = NULL; + Eina_List *list = NULL; + + ret_if(!scroller); + + box_layout = elm_object_content_get(scroller); + ret_if(!box_layout); + + list = elm_box_children_get(box_layout); + ret_if(!list); + + box = eina_list_nth(list, 0); + ret_if(!box); + + eina_list_free(list); + + while (elm_object_scroll_freeze_get(box)) { + elm_object_scroll_freeze_pop(box); + } +} + + + +static void _mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + _D("Mouse is down"); + evas_object_data_set(obj, PRIVATE_DATA_KEY_MOUSE_DOWN, (void *) 1); +} + + + +static void _mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + _D("Mouse is up"); + evas_object_data_del(obj, PRIVATE_DATA_KEY_MOUSE_DOWN); + if (evas_object_data_get(obj, PRIVATE_DATA_KEY_DRAG)) return; + evas_object_data_del(obj, DATA_KEY_IS_SCROLLING); +} + + + +static void _anim_start_cb(void *data, Evas_Object *scroller, void *event_info) +{ + _D("start the scroller animation"); + evas_object_data_set(scroller, DATA_KEY_IS_SCROLLING, (void *) 1); +} + + + +static void _anim_stop_cb(void *data, Evas_Object *scroller, void *event_info) +{ + _D("stop the scroller animation"); + if (evas_object_data_get(scroller, PRIVATE_DATA_KEY_MOUSE_DOWN)) return; + evas_object_data_del(scroller, DATA_KEY_IS_SCROLLING); +} + + + +static void _drag_start_cb(void *data, Evas_Object *scroller, void *event_info) +{ + _D("start to drag the scroller animation"); + evas_object_data_set(scroller, PRIVATE_DATA_KEY_DRAG, (void *) 1); +} + + + +static void _drag_stop_cb(void *data, Evas_Object *scroller, void *event_info) +{ + _D("stop to drag the scroller animation"); + evas_object_data_del(scroller, PRIVATE_DATA_KEY_DRAG); +} + + + +static void _scroll_cb(void *data, Evas_Object *scroller, void *event_info) +{ + evas_object_data_set(scroller, DATA_KEY_IS_SCROLLING, (void *) 1); +} + + + +static void __resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Evas_Object *scroller = obj; + + int x, y, w, h; + + ret_if(!scroller); + + evas_object_geometry_get(scroller, &x, &y, &w, &h); + _D("%s resize(%d, %d, %d, %d)", data, x, y, w, h); +} + + + +extern Evas_Object *scroller_create(Evas_Object *layout) +{ + retv_if(!layout, NULL); + + Evas_Object *box = NULL; + Evas_Object *box_layout = NULL; + Evas_Object *rect = NULL; + Evas_Object *scroller = NULL; + + scroller = elm_scroller_add(layout); + retv_if(!scroller, NULL); + + elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_FALSE); + elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); + elm_object_style_set(scroller, "effect"); + + elm_object_part_content_set(layout, "scroller", scroller); + evas_object_show(scroller); + evas_object_size_hint_align_set(scroller, 0.5, 1.0); + + evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, NULL); + evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, NULL); + evas_object_smart_callback_add(scroller, "scroll,anim,start", _anim_start_cb, NULL); + evas_object_smart_callback_add(scroller, "scroll,anim,stop", _anim_stop_cb, NULL); + evas_object_smart_callback_add(scroller, "scroll,drag,start", _drag_start_cb, NULL); + evas_object_smart_callback_add(scroller, "scroll,drag,stop", _drag_stop_cb, NULL); + evas_object_smart_callback_add(scroller, "scroll", _scroll_cb, NULL); + + /* Because change an align in box, use the another box betweein box and scroller. */ + box_layout = elm_box_add(scroller); + if (!box_layout) { + _E("Fail to create box layout"); + evas_object_del(scroller); + return NULL; + } + elm_box_horizontal_set(box_layout, EINA_FALSE); + elm_box_align_set(box_layout, 0.5, 1.0); + evas_object_size_hint_align_set(box_layout, 0.5, 1.0); + evas_object_size_hint_weight_set(box_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_content_set(scroller, box_layout); + evas_object_show(box_layout); + + box = elm_box_add(scroller); + if (!box) { + _E("Fail to create box"); + evas_object_del(box_layout); + evas_object_del(scroller); + return NULL; + } + elm_box_horizontal_set(box, EINA_FALSE); + elm_box_align_set(box, 0.5, 1.0); + evas_object_size_hint_align_set(box, 0.5, 1.0); + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_box_pack_end(box_layout, box); + evas_object_show(box); + main_get_info()->box = box; + + evas_object_event_callback_add(scroller, EVAS_CALLBACK_RESIZE, __resize_cb, "scroller"); + evas_object_event_callback_add(box_layout, EVAS_CALLBACK_RESIZE, __resize_cb, "box_layout"); + evas_object_event_callback_add(box, EVAS_CALLBACK_RESIZE, __resize_cb, "box"); + + return scroller; +} + + + +void scroller_destroy(Evas_Object *scroller) +{ + ret_if(!scroller); + + Evas_Object *item = NULL; + Evas_Object *box_layout = NULL; + Evas_Object *box = NULL; + Evas_Object *rect = NULL; + Eina_List *box_list = NULL; + Eina_List *list = NULL; + + ret_if(!scroller); + + box_layout = elm_object_content_get(scroller); + ret_if(!box_layout); + + box_list = elm_box_children_get(box_layout); + ret_if(!box_list); + + box = eina_list_nth(box_list, 0); + ret_if(!box); + eina_list_free(box_list); + + list = elm_box_children_get(box); + if (!list) { + _D("list is empty"); + return; + } + + EINA_LIST_FREE(list, item) { + if (!item) break; + elm_box_unpack(box, item); + item_destroy(item); + } + + evas_object_del(box); + evas_object_del(box_layout); + + evas_object_event_callback_del(scroller, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb); + evas_object_event_callback_del(scroller, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb); + evas_object_smart_callback_del(scroller, "scroll,anim,start", _anim_start_cb); + evas_object_smart_callback_del(scroller, "scroll,anim,stop", _anim_stop_cb); + evas_object_smart_callback_del(scroller, "scroll,drag,start", _drag_start_cb); + evas_object_smart_callback_del(scroller, "scroll,drag,stop", _drag_stop_cb); + evas_object_smart_callback_del(scroller, "scroll", _scroll_cb); + + evas_object_del(scroller); +} + + + +/* End of the file */ diff --git a/src/util.c b/src/util.c new file mode 100644 index 0000000..332b3ee --- /dev/null +++ b/src/util.c @@ -0,0 +1,109 @@ +/* + * Task Manager + * + * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include +#include +#include + +#include "log.h" +#include "util.h" + + + +extern Eina_Bool util_kill_app(const char *appid) +{ + app_context_h context = NULL; + Eina_Bool ret = EINA_TRUE; + + retv_if(!appid, EINA_FALSE); + + ret = app_manager_get_app_context(appid, &context); + if (ret != APP_MANAGER_ERROR_NONE) { + _E("fail to app_manager_get_app_context(%d)", ret); + return EINA_FALSE; + } + + ret = app_manager_terminate_app(context); + app_context_destroy(context); + + if (ret != APP_MANAGER_ERROR_NONE) { + _E("fail to terminate_app (%d)", ret); + return EINA_FALSE; + } + + _D("terminate app = %s", appid); + + return ret; +} + + + +extern Eina_Bool util_launch_app(const char *appid) +{ + int ret; + bool running = false; + + if (!appid || strlen(appid) == 0) { + _E("Fail to launch, due to Null appid."); + return EINA_FALSE; + } + _D("Launching: %s", appid); + ret = app_manager_is_running(appid, &running); + retv_if(APP_MANAGER_ERROR_NONE != ret, EINA_FALSE); + + if (running) { + _D("THE APP IS RUNNING"); + + app_context_h context = NULL; + ret = app_manager_get_app_context(appid, &context); + if (ret != APP_MANAGER_ERROR_NONE) { + _E("fail to app_manager_get_app_context(%d)", ret); + return EINA_FALSE; + } + + ret = app_manager_resume_app(context); + app_context_destroy(context); + + if (ret != APP_MANAGER_ERROR_NONE) { + _E("fail to app_manager_resume_app(%d)", ret); + return EINA_FALSE; + } + + } else { + _D("THE APP IS NOT RUNNING"); + + app_control_h service = NULL; + retv_if(APP_CONTROL_ERROR_NONE != app_control_create(&service), EINA_FALSE); + retv_if(!service, EINA_FALSE); + + app_control_set_app_id(service, appid); + + ret = app_control_send_launch_request(service, NULL, NULL); + (void)app_control_destroy(service); + retv_if(APP_CONTROL_ERROR_NONE != ret, EINA_FALSE); + } + + return EINA_TRUE; +} + + + +//End of file diff --git a/task-mgr-spin.creator.user b/task-mgr-spin.creator.user new file mode 100644 index 0000000..2b896cd --- /dev/null +++ b/task-mgr-spin.creator.user @@ -0,0 +1,186 @@ + + + + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + false + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + true + 1 + true + 1 + true + 1 + 8 + true + 1 + false + true + true + true + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop + {684c47e8-d6bb-4ad1-a9c6-9180bed66dfd} + 0 + 0 + 0 + + /home/khee85/spin/task-mgr-lite + + + + all + + false + + + true + Make + + GenericProjectManager.GenericMakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + + clean + + true + + + true + Make + + GenericProjectManager.GenericMakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Default + Default + GenericProjectManager.GenericBuildConfiguration + + 1 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy locally + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + + false + %{buildDir} + Custom Executable + + ProjectExplorer.CustomExecutableRunConfiguration + 3768 + true + false + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.EnvironmentId + {34f591bc-6b5b-4cb5-922e-abe922ef66f6} + + + ProjectExplorer.Project.Updater.FileVersion + 15 + +